[Pkg-cli-apps-commits] [smuxi] 02/12: Imported Upstream version 0.9

Mirco Bauer meebey at alioth.debian.org
Sun Aug 25 21:23:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

meebey pushed a commit to branch master
in repository smuxi.

commit 238161321b5486119d6f7eabde5a180890a159d0
Author: Mirco Bauer <meebey at meebey.net>
Date:   Sun Aug 25 21:28:50 2013 +0200

    Imported Upstream version 0.9
---
 Makefile.am                                        |   51 +-
 Makefile.in                                        |  357 +-
 aclocal.m4                                         |  966 +--
 config.guess                                       |  184 +-
 config.sub                                         |   97 +-
 configure                                          |  872 ++-
 configure.ac                                       |  106 +-
 glade/smuxi-frontend-gnome.glade                   |   20 +-
 install-sh                                         |   14 +-
 lib/JabbR/JabbR.Client/ClientEvents.cs             |   28 +
 .../JabbR.Client/DefaultAuthenticationProvider.cs  |   65 +
 lib/JabbR/JabbR.Client/HttpHelper.cs               |  108 +
 lib/JabbR/JabbR.Client/IAuthenticationProvider.cs  |   14 +
 lib/JabbR/JabbR.Client/IJabbRClient.cs             |   61 +
 lib/JabbR/JabbR.Client/JabbR.Client.csproj         |   90 +
 lib/JabbR/JabbR.Client/JabbRClient.cs              |  437 ++
 lib/JabbR/JabbR.Client/Models/LogOnInfo.cs         |   15 +
 lib/JabbR/JabbR.Client/Models/Message.cs           |   13 +
 lib/JabbR/JabbR.Client/Models/Room.cs              |   17 +
 lib/JabbR/JabbR.Client/Models/User.cs              |   22 +
 lib/JabbR/JabbR.Client/Models/UserStatus.cs        |    9 +
 lib/JabbR/JabbR.Client/Properties/AssemblyInfo.cs  |    9 +
 lib/JabbR/JabbR.Client/StreamExtensions.cs         |   61 +
 lib/JabbR/JabbR.Client/TaskAsyncHelper.cs          | 1090 ++++
 lib/JabbR/JabbR/Models/ClientMessage.cs            |    9 +
 lib/JabbR/JabbR/Models/ClientNotification.cs       |   10 +
 lib/Makefile.am                                    |  124 +-
 lib/Makefile.in                                    |  372 +-
 lib/SignalR/src/Common/CommonAssemblyInfo.cs       |   20 +
 lib/SignalR/src/Common/CommonVersionInfo.cs        |    7 +
 .../src/Common/Microsoft.AspNet.SignalR.targets    |   40 +
 .../Microsoft.AspNet.SignalR.Client/Connection.cs  |  796 +++
 .../ConnectionExtensions.cs                        |  108 +
 .../ConnectionState.cs                             |   12 +
 .../HeaderDictionary.cs                            |  119 +
 .../HeartBeatMonitor.cs                            |  144 +
 .../Http/DefaultHttpClient.cs                      |   49 +
 .../Http/HttpHelper.cs                             |  129 +
 .../Http/HttpWebRequestWrapper.cs                  |  146 +
 .../Http/HttpWebResponseWrapper.cs                 |   37 +
 .../Http/IHttpClient.cs                            |   33 +
 .../Http/IHttpClientExtensions.cs                  |   30 +
 .../Http/IRequest.cs                               |   63 +
 .../Http/IResponse.cs                              |   21 +
 .../Http/IResponseExtensions.cs                    |   40 +
 .../Hubs/HubConnection.cs                          |  187 +
 .../Hubs/HubInvocation.cs                          |   29 +
 .../Hubs/HubProxy.cs                               |  176 +
 .../Hubs/HubProxyExtensions.cs                     |  393 ++
 .../Hubs/HubRegistrationData.cs                    |    9 +
 .../Hubs/HubResult.cs                              |   40 +
 .../Hubs/Hubservable.cs                            |   36 +
 .../Hubs/IHubConnection.cs                         |   11 +
 .../Hubs/IHubProxy.cs                              |   50 +
 .../Hubs/Subscription.cs                           |   24 +
 .../Microsoft.AspNet.SignalR.Client/IConnection.cs |   57 +
 .../Infrastructure/ErrorExtensions.cs              |   85 +
 .../Infrastructure/ExceptionHelper.cs              |   37 +
 .../Infrastructure/SignalRError.cs                 |   72 +
 .../Infrastructure/StreamExtensions.cs             |   87 +
 .../Infrastructure/ThreadSafeInvoker.cs            |   53 +
 .../Infrastructure/UrlEncoder.cs                   |  146 +
 .../KeepAliveData.cs                               |   41 +
 .../Microsoft.AspNet.SignalR.Client.csproj         |  144 +
 .../NegotiationResponse.cs                         |   18 +
 .../ObservableConnection.cs                        |   60 +
 .../Properties/AssemblyInfo.cs                     |    6 +
 .../Resources.Designer.cs                          |  149 +
 .../Microsoft.AspNet.SignalR.Client/Resources.resx |  144 +
 .../Microsoft.AspNet.SignalR.Client/StateChange.cs |   31 +
 .../Microsoft.AspNet.SignalR.Client/TraceLevels.cs |   14 +
 .../Transports/AsyncStreamReader.cs                |  219 +
 .../Transports/AutoTransport.cs                    |  170 +
 .../Transports/HttpBasedTransport.cs               |  228 +
 .../Transports/IClientTransport.cs                 |   23 +
 .../Transports/LongPolling/NegotiateInitializer.cs |   70 +
 .../LongPolling/PollingRequestHandler.cs           |  168 +
 .../Transports/LongPollingTransport.cs             |  256 +
 .../Transports/ServerSentEvents/ChunkBuffer.cs     |   63 +
 .../ServerSentEvents/EventSourceStreamReader.cs    |   73 +
 .../Transports/ServerSentEvents/EventType.cs       |   10 +
 .../Transports/ServerSentEvents/SseEvent.cs        |   48 +
 .../Transports/ServerSentEventsTransport.cs        |  255 +
 .../Transports/TransportHelper.cs                  |  211 +
 .../Infrastructure/CancellationTokenExtensions.cs  |   83 +
 .../Infrastructure/DisposableAction.cs             |   43 +
 .../Infrastructure/Disposer.cs                     |   62 +
 .../Infrastructure/ExceptionsExtensions.cs         |   28 +
 .../TaskAsyncHelper.cs                             | 1119 ++++
 lib/SmartIrc4net/API_CHANGE                        |   70 -
 lib/SmartIrc4net/CHANGELOG                         |  181 -
 lib/SmartIrc4net/CREDITS                           |   41 -
 lib/SmartIrc4net/FEATURES                          |   34 -
 lib/SmartIrc4net/LICENSE                           |  509 --
 lib/SmartIrc4net/Makefile.am                       |   13 -
 lib/SmartIrc4net/Makefile.in                       |  720 ---
 lib/SmartIrc4net/README                            |   47 -
 lib/SmartIrc4net/SmartIrc4net.csproj               |   19 +-
 lib/SmartIrc4net/TODO                              |   24 -
 lib/SmartIrc4net/aclocal.m4                        |  856 ---
 lib/SmartIrc4net/configure                         | 3952 ------------
 lib/SmartIrc4net/configure.ac                      |   73 -
 .../examples/benchmark/AssemblyInfo.cs             |   32 +
 lib/SmartIrc4net/examples/benchmark/benchmark.cs   |  136 +
 .../examples/stresstest/AssemblyInfo.cs            |   32 +
 lib/SmartIrc4net/examples/stresstest/stresstest.cs |  155 +
 lib/SmartIrc4net/examples/test/AssemblyInfo.cs     |   32 +
 lib/SmartIrc4net/examples/test/Test.cs             |  222 +
 lib/SmartIrc4net/expansions.m4                     |   50 -
 lib/SmartIrc4net/mono.m4                           |   55 -
 lib/SmartIrc4net/programs.m4                       |   15 -
 lib/SmartIrc4net/smartirc4net.pc.in                |    8 -
 lib/SmartIrc4net/smartirc4net.snk                  |  Bin 596 -> 0 bytes
 lib/SmartIrc4net/src/AssemblyInfo.cs.in            |   70 -
 lib/SmartIrc4net/src/IrcClient/Channel.cs          |   15 +
 lib/SmartIrc4net/src/IrcClient/Delegates.cs        |    1 +
 lib/SmartIrc4net/src/IrcClient/EventArgs.cs        |   20 +
 lib/SmartIrc4net/src/IrcClient/IrcClient.cs        |  399 ++
 lib/SmartIrc4net/src/IrcClient/ServerProperties.cs |  681 ++
 lib/SmartIrc4net/src/IrcCommands/IrcCommands.cs    |  175 +-
 .../src/IrcConnection/IrcConnection.cs             |   39 +-
 .../src/IrcConnection/PrimaryOrFallbackEncoding.cs |  114 +
 lib/SmartIrc4net/src/Makefile.am                   |   56 -
 lib/SmartIrc4net/src/Makefile.in                   |  477 --
 .../CreateConnectionAsyncCompletedEventArgs.cs     |    0
 .../Exceptions/ProxyException.cs                   |    0
 .../src/starksoftproxy/HttpProxyClient.cs          |  461 ++
 .../IProxyClient.cs                                |    0
 .../ProxyClientFactory.cs                          |    0
 .../Socks4ProxyClient.cs                           |    0
 .../Socks4aProxyClient.cs                          |    0
 .../Socks5ProxyClient.cs                           |    0
 .../{StarkSoftProxy => starksoftproxy}/Utils.cs    |    0
 .../CreateConnectionAsyncCompletedEventArgs.cs     |    0
 .../StarkSoftProxy/Exceptions/ProxyException.cs    |    0
 .../src => }/StarkSoftProxy/HttpProxyClient.cs     |    0
 .../src => }/StarkSoftProxy/IProxyClient.cs        |    0
 .../src => }/StarkSoftProxy/ProxyClientFactory.cs  |    0
 .../src => }/StarkSoftProxy/Socks4ProxyClient.cs   |    0
 .../src => }/StarkSoftProxy/Socks4aProxyClient.cs  |    0
 .../src => }/StarkSoftProxy/Socks5ProxyClient.cs   |    0
 lib/StarkSoftProxy/StarkSoftProxy.csproj           |   51 +
 lib/{SmartIrc4net/src => }/StarkSoftProxy/Utils.cs |    0
 .../Twitterizer2/Core/OptionalProperties.cs        |    2 +-
 .../Methods/Timeline/MentionsCommand.cs            |    2 +-
 lib/Twitterizer/Twitterizer2/OAuth/OAuthUtility.cs |    4 +-
 lib/agsxmpp/agsxmpp/Collections/BareJidComparer.cs |   53 +
 lib/agsxmpp/agsxmpp/Collections/FullJidComparer.cs |   53 +
 lib/agsxmpp/agsxmpp/Exceptions/JidException.cs     |   44 +
 .../agsxmpp/Exceptions/RegisterException.cs        |   37 +
 lib/agsxmpp/agsxmpp/Exceptions/XmlRpcException.cs  |   50 +
 lib/agsxmpp/agsxmpp/Factory/ElementFactory.cs      |  365 ++
 lib/agsxmpp/agsxmpp/Factory/ElementType.cs         |   55 +
 lib/agsxmpp/agsxmpp/Factory/SaslFactory.cs         |   86 +
 .../agsxmpp/IO/Compression/Checksums/Adler32.cs    |  200 +
 .../agsxmpp/IO/Compression/Checksums/IChecksum.cs  |   93 +
 lib/agsxmpp/agsxmpp/IO/Compression/Deflater.cs     |  552 ++
 .../agsxmpp/IO/Compression/DeflaterConstants.cs    |  186 +
 .../agsxmpp/IO/Compression/DeflaterEngine.cs       |  791 +++
 .../agsxmpp/IO/Compression/DeflaterHuffman.cs      |  886 +++
 .../agsxmpp/IO/Compression/DeflaterPending.cs      |   57 +
 lib/agsxmpp/agsxmpp/IO/Compression/Inflater.cs     |  817 +++
 .../agsxmpp/IO/Compression/InflaterDynHeader.cs    |  207 +
 .../agsxmpp/IO/Compression/InflaterHuffmanTree.cs  |  225 +
 .../agsxmpp/IO/Compression/PendingBuffer.cs        |  274 +
 .../IO/Compression/SharpZipBaseException.cs        |   73 +
 .../agsxmpp/IO/Compression/Streams/OutputWindow.cs |  226 +
 .../IO/Compression/Streams/StreamManipulator.cs    |  270 +
 lib/agsxmpp/agsxmpp/IO/StringWriterWithEncoding.cs |   51 +
 lib/agsxmpp/agsxmpp/Id.cs                          |  110 +
 lib/agsxmpp/agsxmpp/Idn/CombiningClass.cs          |  560 ++
 lib/agsxmpp/agsxmpp/Idn/Composition.cs             |  756 +++
 lib/agsxmpp/agsxmpp/Idn/DecompositionKeys.cs       | 3865 ++++++++++++
 lib/agsxmpp/agsxmpp/Idn/DecompositionMappings.cs   | 3004 +++++++++
 lib/agsxmpp/agsxmpp/Idn/IDNA.cs                    |  305 +
 lib/agsxmpp/agsxmpp/Idn/IDNAException.cs           |   48 +
 lib/agsxmpp/agsxmpp/Idn/NFKC.cs                    |  373 ++
 lib/agsxmpp/agsxmpp/Idn/Punycode.cs                |  298 +
 lib/agsxmpp/agsxmpp/Idn/PunycodeException.cs       |   41 +
 lib/agsxmpp/agsxmpp/Idn/RFC3454.cs                 | 4275 +++++++++++++
 lib/agsxmpp/agsxmpp/Idn/Stringprep.cs              |  463 ++
 lib/agsxmpp/agsxmpp/Idn/StringprepException.cs     |   38 +
 lib/agsxmpp/agsxmpp/IqGrabber.cs                   |  194 +
 lib/agsxmpp/agsxmpp/Jid.cs                         |  548 ++
 lib/agsxmpp/agsxmpp/MessageGrabber.cs              |  133 +
 lib/agsxmpp/agsxmpp/Net/BaseSocket.cs              |  233 +
 lib/agsxmpp/agsxmpp/Net/BoshClientSocket.cs        |  935 +++
 lib/agsxmpp/agsxmpp/Net/CertificateVerifier.cs     |   45 +
 lib/agsxmpp/agsxmpp/Net/ClientSocket.cs            |  613 ++
 lib/agsxmpp/agsxmpp/Net/Dns/Enums.cs               |  148 +
 .../agsxmpp/Net/Dns/IPConfigurationInformation.cs  |   53 +
 .../agsxmpp/Net/Dns/InvalidResponseException.cs    |   57 +
 lib/agsxmpp/agsxmpp/Net/Dns/NoResponseException.cs |   52 +
 lib/agsxmpp/agsxmpp/Net/Dns/Pointer.cs             |  184 +
 lib/agsxmpp/agsxmpp/Net/Dns/Question.cs            |  100 +
 lib/agsxmpp/agsxmpp/Net/Dns/RecordBase.cs          |   39 +
 lib/agsxmpp/agsxmpp/Net/Dns/Request.cs             |  176 +
 lib/agsxmpp/agsxmpp/Net/Dns/Resolver.cs            |  197 +
 lib/agsxmpp/agsxmpp/Net/Dns/ResourceRecord.cs      |  117 +
 lib/agsxmpp/agsxmpp/Net/Dns/Response.cs            |  129 +
 lib/agsxmpp/agsxmpp/Net/Dns/SRVRecord.cs           |  100 +
 lib/agsxmpp/agsxmpp/Net/PollClientSocket.cs        |  442 ++
 lib/agsxmpp/agsxmpp/Net/PollingSocketException.cs  |   35 +
 lib/agsxmpp/agsxmpp/Net/SocketConnectionType.cs    |   48 +
 lib/agsxmpp/agsxmpp/Net/SslStream.cs               |  214 +
 lib/agsxmpp/agsxmpp/Net/SynchronousAsyncResult.cs  |   79 +
 lib/agsxmpp/agsxmpp/PacketGrabber.cs               |   61 +
 lib/agsxmpp/agsxmpp/PresenceGrabber.cs             |  141 +
 lib/agsxmpp/agsxmpp/Properties/AssemblyInfo.cs     |   80 +
 .../agsxmpp/Sasl/Anonymous/AnonymousMechanism.cs   |   83 +
 .../agsxmpp/Sasl/DigestMD5/DigestMD5Mechanism.cs   |   67 +
 lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step1.cs        |  197 +
 lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step2.cs        |  335 +
 lib/agsxmpp/agsxmpp/Sasl/ExtendedData.cs           |   26 +
 .../agsxmpp/Sasl/Facebook/FacebookExtendedData.cs  |   28 +
 .../agsxmpp/Sasl/Facebook/FacebookMechanism.cs     |  127 +
 lib/agsxmpp/agsxmpp/Sasl/Gssapi/GssapiMechanism.cs |  111 +
 lib/agsxmpp/agsxmpp/Sasl/Gssapi/SSPIHelper.cs      |  618 ++
 lib/agsxmpp/agsxmpp/Sasl/Mechanism.cs              |   89 +
 lib/agsxmpp/agsxmpp/Sasl/Plain/PlainMechanism.cs   |   74 +
 lib/agsxmpp/agsxmpp/Sasl/SaslEventArgs.cs          |   70 +
 lib/agsxmpp/agsxmpp/Sasl/SaslHandler.cs            |  301 +
 .../agsxmpp/Sasl/Scram/ScramSha1Mechanism.cs       |  205 +
 .../Sasl/XGoogleToken/XGoogleTokenMechanism.cs     |  172 +
 lib/agsxmpp/agsxmpp/Uri.cs                         |  267 +
 lib/agsxmpp/agsxmpp/Util/Date.cs                   |  112 +
 lib/agsxmpp/agsxmpp/Util/Enum.cs                   |  142 +
 lib/agsxmpp/agsxmpp/Util/Exceptions.cs             |   19 +
 lib/agsxmpp/agsxmpp/Util/Hash.cs                   |  180 +
 .../agsxmpp/Util/RNGCryptoServiceProvider.cs       |   90 +
 lib/agsxmpp/agsxmpp/Util/RandomNumberGenerator.cs  |   61 +
 lib/agsxmpp/agsxmpp/Util/Runtime.cs                |   25 +
 lib/agsxmpp/agsxmpp/Util/WinCeApi.cs               |   47 +
 lib/agsxmpp/agsxmpp/Xml/Dom/CData.cs               |   40 +
 lib/agsxmpp/agsxmpp/Xml/Dom/Comment.cs             |   40 +
 lib/agsxmpp/agsxmpp/Xml/Dom/Document.cs            |  132 +
 lib/agsxmpp/agsxmpp/Xml/Dom/DomLoader.cs           |   48 +
 lib/agsxmpp/agsxmpp/Xml/Dom/Element.cs             | 1244 ++++
 lib/agsxmpp/agsxmpp/Xml/Dom/ElementList.cs         |   62 +
 lib/agsxmpp/agsxmpp/Xml/Dom/Node.cs                |  269 +
 lib/agsxmpp/agsxmpp/Xml/Dom/NodeList.cs            |  114 +
 lib/agsxmpp/agsxmpp/Xml/Dom/Text.cs                |   39 +
 lib/agsxmpp/agsxmpp/Xml/StreamParser.cs            |  483 ++
 lib/agsxmpp/agsxmpp/Xml/Xpnet/BufferAggregate.cs   |  140 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/ContentToken.cs      |  191 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/Encoding.cs          | 3120 ++++++++++
 lib/agsxmpp/agsxmpp/Xml/Xpnet/Exceptions.cs        |  171 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/NS.cs                |  134 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/NamespaceStack.cs    |  108 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/Position.cs          |   78 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/Token.cs             |   81 +
 lib/agsxmpp/agsxmpp/Xml/Xpnet/UTF8Encoding.cs      |  299 +
 lib/agsxmpp/agsxmpp/XmppClientConnection.cs        | 1602 +++++
 lib/agsxmpp/agsxmpp/XmppClientConnectionState.cs   |   93 +
 lib/agsxmpp/agsxmpp/XmppComponentConnection.cs     |  362 ++
 lib/agsxmpp/agsxmpp/XmppConnection.cs              |  455 ++
 lib/agsxmpp/agsxmpp/agsxmpp.csproj                 |  416 ++
 lib/agsxmpp/agsxmpp/protocol/Base/Avatar.cs        |   73 +
 .../agsxmpp/protocol/Base/DirectionalElement.cs    |  116 +
 lib/agsxmpp/agsxmpp/protocol/Base/Group.cs         |   53 +
 lib/agsxmpp/agsxmpp/protocol/Base/Item.cs          |   63 +
 lib/agsxmpp/agsxmpp/protocol/Base/RosterItem.cs    |   94 +
 lib/agsxmpp/agsxmpp/protocol/Base/Stanza.cs        |  117 +
 lib/agsxmpp/agsxmpp/protocol/Base/Stream.cs        |   67 +
 lib/agsxmpp/agsxmpp/protocol/Error.cs              |  396 ++
 lib/agsxmpp/agsxmpp/protocol/Stream.cs             |   38 +
 lib/agsxmpp/agsxmpp/protocol/Time/Time.cs          |   88 +
 lib/agsxmpp/agsxmpp/protocol/client/Error.cs       |  593 ++
 lib/agsxmpp/agsxmpp/protocol/client/Handler.cs     |   29 +
 lib/agsxmpp/agsxmpp/protocol/client/IQ.cs          |  181 +
 lib/agsxmpp/agsxmpp/protocol/client/Message.cs     |  445 ++
 lib/agsxmpp/agsxmpp/protocol/client/MessageType.cs |   57 +
 lib/agsxmpp/agsxmpp/protocol/client/Presence.cs    |  263 +
 .../agsxmpp/protocol/client/PresenceManager.cs     |  117 +
 .../agsxmpp/protocol/client/PresenceType.cs        |   79 +
 lib/agsxmpp/agsxmpp/protocol/client/ShowType.cs    |   61 +
 lib/agsxmpp/agsxmpp/protocol/component/Error.cs    |   66 +
 lib/agsxmpp/agsxmpp/protocol/component/Handler.cs  |   29 +
 .../agsxmpp/protocol/component/Handshake.cs        |   65 +
 lib/agsxmpp/agsxmpp/protocol/component/IQ.cs       |   77 +
 lib/agsxmpp/agsxmpp/protocol/component/Log.cs      |   92 +
 lib/agsxmpp/agsxmpp/protocol/component/Message.cs  |  183 +
 lib/agsxmpp/agsxmpp/protocol/component/Presence.cs |   73 +
 lib/agsxmpp/agsxmpp/protocol/component/Route.cs    |  104 +
 .../agsxmpp/protocol/extensions/amp/Action.cs      |   34 +
 lib/agsxmpp/agsxmpp/protocol/extensions/amp/Amp.cs |  114 +
 .../agsxmpp/protocol/extensions/amp/Condition.cs   |   33 +
 .../agsxmpp/protocol/extensions/amp/Rule.cs        |  114 +
 .../extensions/bookmarks/BookmarkManager.cs        |  178 +
 .../protocol/extensions/bookmarks/Conference.cs    |  120 +
 .../protocol/extensions/bookmarks/RosterNote.cs    |   91 +
 .../protocol/extensions/bookmarks/RosterNotes.cs   |   94 +
 .../protocol/extensions/bookmarks/Storage.cs       |  188 +
 .../protocol/extensions/bookmarks/StorageIq.cs     |   57 +
 .../agsxmpp/protocol/extensions/bookmarks/Url.cs   |   68 +
 .../agsxmpp/protocol/extensions/bosh/Body.cs       |  223 +
 .../agsxmpp/protocol/extensions/bosh/BoshType.cs   |   30 +
 .../protocol/extensions/bytestreams/Activate.cs    |   63 +
 .../protocol/extensions/bytestreams/ByteStream.cs  |  212 +
 .../extensions/bytestreams/ByteStreamIq.cs         |   71 +
 .../protocol/extensions/bytestreams/Mode.cs        |   35 +
 .../protocol/extensions/bytestreams/StreamHost.cs  |  120 +
 .../extensions/bytestreams/StreamHostUsed.cs       |   82 +
 .../protocol/extensions/bytestreams/UdpSuccess.cs  |   54 +
 .../protocol/extensions/caps/Capabilities.cs       |  259 +
 .../protocol/extensions/chatstates/Active.cs       |   42 +
 .../protocol/extensions/chatstates/Chatstate.cs    |   57 +
 .../protocol/extensions/chatstates/Composing.cs    |   42 +
 .../agsxmpp/protocol/extensions/chatstates/Gone.cs |   42 +
 .../protocol/extensions/chatstates/Inactive.cs     |   41 +
 .../protocol/extensions/chatstates/Paused.cs       |   41 +
 .../agsxmpp/protocol/extensions/commands/Action.cs |   49 +
 .../protocol/extensions/commands/Actions.cs        |  157 +
 .../protocol/extensions/commands/Command.cs        |  178 +
 .../agsxmpp/protocol/extensions/commands/Note.cs   |   88 +
 .../protocol/extensions/commands/NoteType.cs       |   32 +
 .../agsxmpp/protocol/extensions/commands/Status.cs |   44 +
 .../protocol/extensions/compression/Compress.cs    |   68 +
 .../protocol/extensions/compression/Compressed.cs  |   42 +
 .../extensions/compression/CompressionMethod.cs    |   32 +
 .../protocol/extensions/compression/Failure.cs     |   58 +
 .../protocol/extensions/featureneg/FeatureNeg.cs   |   88 +
 .../protocol/extensions/featureneg/FeatureNegIq.cs |   80 +
 .../protocol/extensions/filetransfer/File.cs       |  149 +
 .../protocol/extensions/filetransfer/Range.cs      |   71 +
 .../agsxmpp/protocol/extensions/geoloc/GeoLoc.cs   |  148 +
 .../agsxmpp/protocol/extensions/geoloc/GeoLocIq.cs |   64 +
 .../agsxmpp/protocol/extensions/html/Body.cs       |   57 +
 .../agsxmpp/protocol/extensions/html/Html.cs       |   68 +
 .../agsxmpp/protocol/extensions/ibb/Base.cs        |   48 +
 .../agsxmpp/protocol/extensions/ibb/Close.cs       |   55 +
 .../agsxmpp/protocol/extensions/ibb/Data.cs        |   83 +
 .../agsxmpp/protocol/extensions/ibb/Open.cs        |   75 +
 .../extensions/jivesoftware/phone/ActionType.cs    |   41 +
 .../extensions/jivesoftware/phone/PhoneAction.cs   |  109 +
 .../extensions/jivesoftware/phone/PhoneEvent.cs    |  110 +
 .../extensions/jivesoftware/phone/PhoneStatus.cs   |   64 +
 .../jivesoftware/phone/PhoneStatusType.cs          |   40 +
 .../protocol/extensions/msgreceipts/Received.cs    |   42 +
 .../protocol/extensions/msgreceipts/Request.cs     |   42 +
 .../protocol/extensions/nickname/Nickname.cs       |   42 +
 .../agsxmpp/protocol/extensions/ping/Ping.cs       |   41 +
 .../agsxmpp/protocol/extensions/ping/PingIq.cs     |   60 +
 .../agsxmpp/protocol/extensions/primary/Primary.cs |   46 +
 .../agsxmpp/protocol/extensions/pubsub/Access.cs   |   48 +
 .../protocol/extensions/pubsub/Affiliation.cs      |   86 +
 .../protocol/extensions/pubsub/AffiliationType.cs  |   39 +
 .../protocol/extensions/pubsub/Affiliations.cs     |   81 +
 .../protocol/extensions/pubsub/Configure.cs        |   89 +
 .../agsxmpp/protocol/extensions/pubsub/Create.cs   |   74 +
 .../agsxmpp/protocol/extensions/pubsub/Item.cs     |   60 +
 .../agsxmpp/protocol/extensions/pubsub/Items.cs    |   91 +
 .../agsxmpp/protocol/extensions/pubsub/Options.cs  |  126 +
 .../agsxmpp/protocol/extensions/pubsub/PubSub.cs   |  211 +
 .../protocol/extensions/pubsub/PubSubAction.cs     |   57 +
 .../agsxmpp/protocol/extensions/pubsub/PubSubIq.cs |   79 +
 .../protocol/extensions/pubsub/PubSubManager.cs    | 1192 ++++
 .../agsxmpp/protocol/extensions/pubsub/Publish.cs  |  123 +
 .../agsxmpp/protocol/extensions/pubsub/Retract.cs  |   69 +
 .../protocol/extensions/pubsub/Subscribe.cs        |   83 +
 .../protocol/extensions/pubsub/SubscribeOptions.cs |   87 +
 .../protocol/extensions/pubsub/Subscription.cs     |  209 +
 .../extensions/pubsub/SubscriptionState.cs         |   60 +
 .../protocol/extensions/pubsub/Subscriptions.cs    |  101 +
 .../agsxmpp/protocol/extensions/pubsub/Type.cs     |   32 +
 .../protocol/extensions/pubsub/Unsubscribe.cs      |   74 +
 .../protocol/extensions/pubsub/event/Delete.cs     |   49 +
 .../protocol/extensions/pubsub/event/Event.cs      |   88 +
 .../protocol/extensions/pubsub/event/Item.cs       |   93 +
 .../protocol/extensions/pubsub/event/Items.cs      |  124 +
 .../protocol/extensions/pubsub/event/Purge.cs      |   49 +
 .../protocol/extensions/pubsub/owner/Affiliate.cs  |  106 +
 .../protocol/extensions/pubsub/owner/Affiliates.cs |  124 +
 .../protocol/extensions/pubsub/owner/Configure.cs  |   68 +
 .../protocol/extensions/pubsub/owner/Delete.cs     |   43 +
 .../protocol/extensions/pubsub/owner/Pending.cs    |   71 +
 .../protocol/extensions/pubsub/owner/PubSub.cs     |  123 +
 .../protocol/extensions/pubsub/owner/PubSubIq.cs   |   79 +
 .../protocol/extensions/pubsub/owner/Purge.cs      |   41 +
 .../protocol/extensions/pubsub/owner/Subscriber.cs |  106 +
 .../extensions/pubsub/owner/Subscribers.cs         |  118 +
 .../agsxmpp/protocol/extensions/shim/Header.cs     |   58 +
 .../agsxmpp/protocol/extensions/shim/Headers.cs    |  109 +
 lib/agsxmpp/agsxmpp/protocol/extensions/si/SI.cs   |  121 +
 lib/agsxmpp/agsxmpp/protocol/extensions/si/SIIq.cs |   81 +
 lib/agsxmpp/agsxmpp/protocol/iq/agent/Agent.cs     |  131 +
 lib/agsxmpp/agsxmpp/protocol/iq/agent/Agents.cs    |   58 +
 lib/agsxmpp/agsxmpp/protocol/iq/agent/AgentsIq.cs  |   65 +
 lib/agsxmpp/agsxmpp/protocol/iq/auth/Auth.cs       |  118 +
 lib/agsxmpp/agsxmpp/protocol/iq/auth/AuthIq.cs     |   64 +
 lib/agsxmpp/agsxmpp/protocol/iq/avatar/Avatar.cs   |   46 +
 lib/agsxmpp/agsxmpp/protocol/iq/avatar/AvatarIq.cs |   65 +
 lib/agsxmpp/agsxmpp/protocol/iq/bind/Bind.cs       |   73 +
 lib/agsxmpp/agsxmpp/protocol/iq/bind/BindIq.cs     |   57 +
 lib/agsxmpp/agsxmpp/protocol/iq/browse/Browse.cs   |   94 +
 lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseIq.cs |   62 +
 .../agsxmpp/protocol/iq/browse/BrowseItem.cs       |   80 +
 lib/agsxmpp/agsxmpp/protocol/iq/browse/Service.cs  |  149 +
 .../agsxmpp/protocol/iq/disco/DiscoFeature.cs      |   81 +
 .../agsxmpp/protocol/iq/disco/DiscoIdentity.cs     |  105 +
 lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfo.cs |  169 +
 .../agsxmpp/protocol/iq/disco/DiscoInfoIq.cs       |   54 +
 lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItem.cs |   76 +
 .../agsxmpp/protocol/iq/disco/DiscoItems.cs        |  124 +
 .../agsxmpp/protocol/iq/disco/DiscoItemsIq.cs      |   94 +
 .../agsxmpp/protocol/iq/disco/DiscoManager.cs      |  245 +
 lib/agsxmpp/agsxmpp/protocol/iq/disco/Features.cs  |  156 +
 lib/agsxmpp/agsxmpp/protocol/iq/last/Last.cs       |   55 +
 lib/agsxmpp/agsxmpp/protocol/iq/last/LastIq.cs     |   63 +
 lib/agsxmpp/agsxmpp/protocol/iq/oob/Oob.cs         |   73 +
 lib/agsxmpp/agsxmpp/protocol/iq/oob/OobIq.cs       |   63 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Action.cs  |   41 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Active.cs  |   42 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Default.cs |   42 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Item.cs    |  239 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/List.cs    |   89 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Privacy.cs |  100 +
 .../agsxmpp/protocol/iq/privacy/PrivacyIq.cs       |   64 +
 .../agsxmpp/protocol/iq/privacy/PrivacyManager.cs  |  384 ++
 .../agsxmpp/protocol/iq/privacy/RuleManager.cs     |  116 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Stanza.cs  |   67 +
 lib/agsxmpp/agsxmpp/protocol/iq/privacy/Type.cs    |   46 +
 lib/agsxmpp/agsxmpp/protocol/iq/private/Private.cs |   73 +
 .../agsxmpp/protocol/iq/private/PrivateIq.cs       |   61 +
 .../agsxmpp/protocol/iq/register/Register.cs       |  126 +
 .../protocol/iq/register/RegisterEventArgs.cs      |   60 +
 .../agsxmpp/protocol/iq/register/RegisterIq.cs     |   63 +
 .../agsxmpp/protocol/iq/roster/Delimiter.cs        |   69 +
 lib/agsxmpp/agsxmpp/protocol/iq/roster/Roster.cs   |   63 +
 lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterIq.cs |   55 +
 .../agsxmpp/protocol/iq/roster/RosterItem.cs       |  107 +
 .../agsxmpp/protocol/iq/roster/RosterManager.cs    |  169 +
 lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodCall.cs  |   92 +
 .../agsxmpp/protocol/iq/rpc/MethodResponse.cs      |  233 +
 lib/agsxmpp/agsxmpp/protocol/iq/rpc/Rpc.cs         |  101 +
 lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcHelper.cs   |  121 +
 lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcIq.cs       |   66 +
 lib/agsxmpp/agsxmpp/protocol/iq/search/Search.cs   |  178 +
 lib/agsxmpp/agsxmpp/protocol/iq/search/SearchIq.cs |   75 +
 .../agsxmpp/protocol/iq/search/SearchItem.cs       |  132 +
 lib/agsxmpp/agsxmpp/protocol/iq/session/Session.cs |   39 +
 .../agsxmpp/protocol/iq/session/SessionIq.cs       |   60 +
 lib/agsxmpp/agsxmpp/protocol/iq/time/Time.cs       |  104 +
 lib/agsxmpp/agsxmpp/protocol/iq/time/TimeIq.cs     |   64 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Address.cs   |  146 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Email.cs     |  107 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Name.cs      |   70 +
 .../agsxmpp/protocol/iq/vcard/Organization.cs      |   65 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Photo.cs     |  198 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Telephone.cs |  110 +
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/Vcard.cs     |  391 ++
 lib/agsxmpp/agsxmpp/protocol/iq/vcard/VcardIq.cs   |   86 +
 lib/agsxmpp/agsxmpp/protocol/iq/version/Version.cs |   71 +
 .../agsxmpp/protocol/iq/version/VersionIq.cs       |   60 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Abort.cs         |   39 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Auth.cs          |   63 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Challenge.cs     |   41 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Failure.cs       |   87 +
 .../agsxmpp/protocol/sasl/FailureCondition.cs      |   45 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Mechanism.cs     |  247 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Mechanisms.cs    |   84 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Response.cs      |   58 +
 lib/agsxmpp/agsxmpp/protocol/sasl/Success.cs       |   40 +
 lib/agsxmpp/agsxmpp/protocol/server/Presence.cs    |   33 +
 lib/agsxmpp/agsxmpp/protocol/storage/Avatar.cs     |   47 +
 lib/agsxmpp/agsxmpp/protocol/storage/AvatarIq.cs   |   72 +
 lib/agsxmpp/agsxmpp/protocol/stream/Features.cs    |  207 +
 .../agsxmpp/protocol/stream/feature/Register.cs    |   47 +
 .../stream/feature/compression/Compression.cs      |  109 +
 .../protocol/stream/feature/compression/Method.cs  |   72 +
 lib/agsxmpp/agsxmpp/protocol/tls/Failure.cs        |   44 +
 lib/agsxmpp/agsxmpp/protocol/tls/Proceed.cs        |   42 +
 lib/agsxmpp/agsxmpp/protocol/tls/StartTls.cs       |   64 +
 lib/agsxmpp/agsxmpp/protocol/x/Avatar.cs           |   59 +
 lib/agsxmpp/agsxmpp/protocol/x/Conference.cs       |   60 +
 lib/agsxmpp/agsxmpp/protocol/x/Delay.cs            |   76 +
 lib/agsxmpp/agsxmpp/protocol/x/Event.cs            |  123 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Data.cs        |  167 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Field.cs       |  340 +
 .../agsxmpp/protocol/x/data/FieldContainer.cs      |   98 +
 lib/agsxmpp/agsxmpp/protocol/x/data/FieldTypes.cs  |   88 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Item.cs        |   42 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Option.cs      |   99 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Reported.cs    |   43 +
 lib/agsxmpp/agsxmpp/protocol/x/data/Value.cs       |   50 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Actor.cs        |   43 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Affiliation.cs  |   40 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Decline.cs      |   83 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Destroy.cs      |  105 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/History.cs      |  138 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Invitation.cs   |   48 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Invite.cs       |  115 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Item.cs         |  153 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Muc.cs          |   74 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/MucManager.cs   | 1718 ++++++
 lib/agsxmpp/agsxmpp/protocol/x/muc/Role.cs         |   39 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/Status.cs       |   70 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/StatusCode.cs   |  131 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/User.cs         |  164 +
 .../agsxmpp/protocol/x/muc/iq/admin/Admin.cs       |   86 +
 .../agsxmpp/protocol/x/muc/iq/admin/AdminIq.cs     |   79 +
 .../agsxmpp/protocol/x/muc/iq/admin/Item.cs        |  114 +
 .../agsxmpp/protocol/x/muc/iq/owner/Owner.cs       |   42 +
 .../agsxmpp/protocol/x/muc/iq/owner/OwnerIq.cs     |   79 +
 .../agsxmpp/protocol/x/muc/owner/Destroy.cs        |  105 +
 lib/agsxmpp/agsxmpp/protocol/x/muc/user/Destroy.cs |   54 +
 .../agsxmpp/protocol/x/rosterx/RosterItem.cs       |   77 +
 lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterX.cs  |   87 +
 .../agsxmpp/protocol/x/vcard_update/VcardUpdate.cs |   78 +
 .../CreateConnectionAsyncCompletedEventArgs.cs     |    0
 .../starksoftproxy}/Exceptions/ProxyException.cs   |    0
 .../agsxmpp/starksoftproxy}/HttpProxyClient.cs     |    0
 .../agsxmpp/starksoftproxy}/IProxyClient.cs        |    0
 .../agsxmpp/starksoftproxy}/ProxyClientFactory.cs  |    0
 .../agsxmpp/starksoftproxy}/Socks4ProxyClient.cs   |    0
 .../agsxmpp/starksoftproxy}/Socks4aProxyClient.cs  |    0
 .../agsxmpp/starksoftproxy}/Socks5ProxyClient.cs   |    0
 .../agsxmpp/starksoftproxy}/Utils.cs               |    0
 lib/jabber-net/2005-jabber-net.csproj              |  479 --
 lib/jabber-net/AssemblyInfo.cs                     |   24 -
 lib/jabber-net/ConsoleClient/AssemblyInfo.cs       |   71 -
 lib/jabber-net/ConsoleClient/Main.cs               |  229 -
 lib/jabber-net/Example/AddContact.cs               |  325 -
 lib/jabber-net/Example/AddGroup.cs                 |  128 -
 lib/jabber-net/Example/AssemblyInfo.cs             |   72 -
 lib/jabber-net/Example/ConferenceForm.cs           |  253 -
 lib/jabber-net/Example/MainForm.cs                 | 1224 ----
 lib/jabber-net/Example/PubSubDisplay.cs            |  155 -
 lib/jabber-net/Example/PubSubSubscribeForm.cs      |  191 -
 lib/jabber-net/Example/SendMessage.cs              |  209 -
 lib/jabber-net/Example/ServiceDisplay.cs           |  248 -
 lib/jabber-net/bedrock/Delegates.cs                |   42 -
 lib/jabber-net/bedrock/collections/ByteStack.cs    |  160 -
 lib/jabber-net/bedrock/collections/GraphNode.cs    |  150 -
 lib/jabber-net/bedrock/collections/ISet.cs         |   66 -
 lib/jabber-net/bedrock/collections/IndexedTrie.cs  |  146 -
 lib/jabber-net/bedrock/collections/LinkedList.cs   |  565 --
 lib/jabber-net/bedrock/collections/Set.cs          |  229 -
 lib/jabber-net/bedrock/collections/SkipList.cs     |  519 --
 lib/jabber-net/bedrock/collections/StringSet.cs    |  440 --
 lib/jabber-net/bedrock/collections/Tree.cs         |  839 ---
 lib/jabber-net/bedrock/collections/Trie.cs         |  466 --
 lib/jabber-net/bedrock/collections/TrieNode.cs     |  267 -
 lib/jabber-net/bedrock/io/BufferAggregate.cs       |  133 -
 lib/jabber-net/bedrock/io/ReadEventStream.cs       |  236 -
 lib/jabber-net/bedrock/io/ZlibStream.cs            |  444 --
 lib/jabber-net/bedrock/net/Address.cs              |  354 --
 lib/jabber-net/bedrock/net/AsyncSocket.cs          | 1314 ----
 lib/jabber-net/bedrock/net/BaseSocket.cs           |  180 -
 lib/jabber-net/bedrock/net/CertUtil.cs             |   60 -
 lib/jabber-net/bedrock/net/Exceptions.cs           |   69 -
 lib/jabber-net/bedrock/net/HttpSocket.cs           |  647 --
 lib/jabber-net/bedrock/net/IHttpSocket.cs          |   19 -
 lib/jabber-net/bedrock/net/ProxySocket.cs          |  318 -
 lib/jabber-net/bedrock/net/ShttpProxy.cs           |  173 -
 lib/jabber-net/bedrock/net/SocketEventListener.cs  |  203 -
 lib/jabber-net/bedrock/net/SocketWatcher.cs        |  318 -
 lib/jabber-net/bedrock/net/Socks4Proxy.cs          |  176 -
 lib/jabber-net/bedrock/net/Socks5Proxy.cs          |  265 -
 lib/jabber-net/bedrock/net/XEP124Socket.cs         |  673 --
 lib/jabber-net/bedrock/net/XEP25Socket.cs          |  518 --
 lib/jabber-net/bedrock/util/ConfigFile.cs          |  163 -
 lib/jabber-net/bedrock/util/GetOptBase.cs          |  553 --
 lib/jabber-net/bedrock/util/IdleTime.cs            |  217 -
 lib/jabber-net/bedrock/util/Version.cs             |  632 --
 lib/jabber-net/jabber/JID.cs                       |  723 ---
 lib/jabber-net/jabber/client/BookmarkManager.cs    |  293 -
 lib/jabber-net/jabber/client/JabberClient.bmp      |  Bin 246 -> 0 bytes
 lib/jabber-net/jabber/client/JabberClient.cs       | 1031 ----
 lib/jabber-net/jabber/client/JabberClient.resx     |  105 -
 lib/jabber-net/jabber/client/PresenceManager.bmp   |  Bin 1334 -> 0 bytes
 lib/jabber-net/jabber/client/PresenceManager.cs    |  566 --
 lib/jabber-net/jabber/client/PresenceManager.resx  |  105 -
 lib/jabber-net/jabber/client/RosterManager.bmp     |  Bin 1334 -> 0 bytes
 lib/jabber-net/jabber/client/RosterManager.cs      |  471 --
 lib/jabber-net/jabber/client/RosterManager.resx    |  105 -
 .../jabber/connection/BindingStanzaStream.cs       |   48 -
 lib/jabber-net/jabber/connection/CapsManager.bmp   |  Bin 822 -> 0 bytes
 lib/jabber-net/jabber/connection/CapsManager.cs    |  573 --
 .../jabber/connection/CertificatePrompt.cs         |  240 -
 .../jabber/connection/CertificatePrompt.resx       |  129 -
 .../jabber/connection/ConferenceManager.bmp        |  Bin 594 -> 0 bytes
 .../jabber/connection/ConferenceManager.cs         | 1658 -----
 lib/jabber-net/jabber/connection/DiscoManager.bmp  |  Bin 822 -> 0 bytes
 lib/jabber-net/jabber/connection/DiscoManager.cs   | 1332 ----
 lib/jabber-net/jabber/connection/FileMap.cs        |  220 -
 .../jabber/connection/HttpStanzaStream.cs          |  302 -
 lib/jabber-net/jabber/connection/HttpUploader.cs   |   78 -
 lib/jabber-net/jabber/connection/IQTracker.cs      |  230 -
 .../jabber/connection/PollingStanzaStream.cs       |   50 -
 lib/jabber-net/jabber/connection/PubSubManager.bmp |  Bin 822 -> 0 bytes
 lib/jabber-net/jabber/connection/PubSubManager.cs  | 1164 ----
 .../jabber/connection/SocketStanzaStream.cs        |  467 --
 lib/jabber-net/jabber/connection/StanzaStream.cs   |  296 -
 lib/jabber-net/jabber/connection/States.cs         |  216 -
 .../jabber/connection/StreamComponent.cs           |  149 -
 lib/jabber-net/jabber/connection/XmppStream.cs     | 1774 ------
 lib/jabber-net/jabber/connection/XmppStream.resx   |   42 -
 .../jabber/connection/sasl/ExternalProcessor.cs    |   44 -
 .../jabber/connection/sasl/KerbProcessor.cs        |  798 ---
 .../jabber/connection/sasl/MD5Processor.cs         |  339 -
 .../jabber/connection/sasl/PlainProcessor.cs       |   63 -
 .../jabber/connection/sasl/SASLProcessor.cs        |  191 -
 .../jabber/protocol/AsynchElementStream.cs         |  398 --
 lib/jabber-net/jabber/protocol/Element.cs          |  958 ---
 lib/jabber-net/jabber/protocol/ElementFactory.cs   |  198 -
 lib/jabber-net/jabber/protocol/ElementList.cs      |  332 -
 lib/jabber-net/jabber/protocol/ElementStream.cs    |  166 -
 lib/jabber-net/jabber/protocol/EnumParser.cs       |  189 -
 lib/jabber-net/jabber/protocol/NS.cs               |  106 -
 lib/jabber-net/jabber/protocol/Packet.cs           |   89 -
 .../jabber/protocol/SynchElementStream.cs          |  177 -
 lib/jabber-net/jabber/protocol/URI.cs              |  267 -
 lib/jabber-net/jabber/protocol/accept/Factory.cs   |   41 -
 lib/jabber-net/jabber/protocol/accept/Handshake.cs |   67 -
 lib/jabber-net/jabber/protocol/accept/Log.cs       |  121 -
 lib/jabber-net/jabber/protocol/accept/Route.cs     |   93 -
 lib/jabber-net/jabber/protocol/accept/Xdb.cs       |  136 -
 lib/jabber-net/jabber/protocol/client/Error.cs     |  428 --
 lib/jabber-net/jabber/protocol/client/Factory.cs   |   41 -
 lib/jabber-net/jabber/protocol/client/IQ.cs        |  230 -
 lib/jabber-net/jabber/protocol/client/Message.cs   |  185 -
 lib/jabber-net/jabber/protocol/client/Presence.cs  |  362 --
 .../jabber/protocol/client/ProtocolException.cs    |  112 -
 lib/jabber-net/jabber/protocol/iq/Agents.cs        |  229 -
 lib/jabber-net/jabber/protocol/iq/Auth.cs          |  175 -
 lib/jabber-net/jabber/protocol/iq/Bookmarks.cs     |  344 --
 lib/jabber-net/jabber/protocol/iq/Browse.cs        |  158 -
 lib/jabber-net/jabber/protocol/iq/Disco.cs         |  552 --
 lib/jabber-net/jabber/protocol/iq/Factory.cs       |  151 -
 lib/jabber-net/jabber/protocol/iq/GeoLoc.cs        |  146 -
 lib/jabber-net/jabber/protocol/iq/Last.cs          |   87 -
 lib/jabber-net/jabber/protocol/iq/MUC.cs           | 1145 ----
 lib/jabber-net/jabber/protocol/iq/OOB.cs           |   87 -
 lib/jabber-net/jabber/protocol/iq/Private.cs       |   66 -
 lib/jabber-net/jabber/protocol/iq/PubSub.cs        | 1278 ----
 lib/jabber-net/jabber/protocol/iq/PubSubErrors.cs  |  779 ---
 lib/jabber-net/jabber/protocol/iq/PubSubEvent.cs   |  459 --
 lib/jabber-net/jabber/protocol/iq/PubSubOwner.cs   |  419 --
 lib/jabber-net/jabber/protocol/iq/Register.cs      |  278 -
 lib/jabber-net/jabber/protocol/iq/Roster.cs        |  300 -
 lib/jabber-net/jabber/protocol/iq/Time.cs          |  113 -
 lib/jabber-net/jabber/protocol/iq/VCard.cs         |  965 ---
 lib/jabber-net/jabber/protocol/iq/Version.cs       |   88 -
 lib/jabber-net/jabber/protocol/stream/Bind.cs      |   65 -
 .../jabber/protocol/stream/Compression.cs          |  194 -
 lib/jabber-net/jabber/protocol/stream/Error.cs     |   56 -
 lib/jabber-net/jabber/protocol/stream/Factory.cs   |   59 -
 lib/jabber-net/jabber/protocol/stream/Features.cs  |   77 -
 lib/jabber-net/jabber/protocol/stream/HttpBind.cs  |  461 --
 lib/jabber-net/jabber/protocol/stream/SASL.cs      |  559 --
 lib/jabber-net/jabber/protocol/stream/Session.cs   |   47 -
 lib/jabber-net/jabber/protocol/stream/StartTLS.cs  |  127 -
 lib/jabber-net/jabber/protocol/stream/Stream.cs    |   82 -
 lib/jabber-net/jabber/protocol/x/Caps.cs           |  125 -
 lib/jabber-net/jabber/protocol/x/Data.cs           |  640 --
 lib/jabber-net/jabber/protocol/x/Delay.cs          |  134 -
 lib/jabber-net/jabber/protocol/x/Event.cs          |  183 -
 lib/jabber-net/jabber/protocol/x/Factory.cs        |   45 -
 lib/jabber-net/jabber/server/JabberService.bmp     |  Bin 1078 -> 0 bytes
 lib/jabber-net/jabber/server/JabberService.cs      |  466 --
 lib/jabber-net/jabber/server/JabberService.resx    |   42 -
 lib/jabber-net/jabber/server/XdbTracker.cs         |  166 -
 lib/jabber-net/muzzle/AssemblyInfo.cs              |   26 -
 lib/jabber-net/muzzle/BottomScrollRichText.cs      |  414 --
 lib/jabber-net/muzzle/ChatHistory.cs               |  101 -
 lib/jabber-net/muzzle/ClientLogin.cs               |  663 --
 lib/jabber-net/muzzle/ComponentLogin.cs            |  277 -
 lib/jabber-net/muzzle/InputBox.cs                  |  168 -
 lib/jabber-net/muzzle/JidMulti.cs                  |  226 -
 lib/jabber-net/muzzle/Litmus.cs                    |  272 -
 lib/jabber-net/muzzle/OptionForm.cs                |  501 --
 lib/jabber-net/muzzle/RosterTree.cs                |  699 ---
 lib/jabber-net/muzzle/StreamControl.cs             |  111 -
 lib/jabber-net/muzzle/StripChart.cs                |  755 ---
 lib/jabber-net/muzzle/XDataForm.cs                 |  715 ---
 lib/jabber-net/muzzle/XmppDebugger.cs              |  390 --
 .../netlib.Dns/Properties/AssemblyInfo.cs          |   31 -
 lib/jabber-net/netlib.Dns/dns.cs                   | 2087 -------
 lib/jabber-net/stringprep/AssemblyInfo.cs          |   74 -
 lib/jabber-net/stringprep/Nameprep.cs              |   35 -
 lib/jabber-net/stringprep/Plain.cs                 |   35 -
 lib/jabber-net/stringprep/Profile.cs               |  137 -
 lib/jabber-net/stringprep/ResTool/AssemblyInfo.cs  |   72 -
 lib/jabber-net/stringprep/ResTool/Main.cs          |   55 -
 lib/jabber-net/stringprep/XmppNode.cs              |   50 -
 lib/jabber-net/stringprep/XmppResource.cs          |   36 -
 lib/jabber-net/stringprep/steps/BidiStep.cs        |  106 -
 lib/jabber-net/stringprep/steps/MapStep.cs         |   87 -
 lib/jabber-net/stringprep/steps/NFKCStep.cs        |  177 -
 lib/jabber-net/stringprep/steps/ProfileStep.cs     |   50 -
 lib/jabber-net/stringprep/steps/ProhibitStep.cs    |  138 -
 lib/jabber-net/stringprep/steps/RFC3454.cs         | 2655 --------
 lib/jabber-net/stringprep/steps/ResourceLoader.cs  |   47 -
 lib/jabber-net/stringprep/unicode/Combining.cs     |   38 -
 lib/jabber-net/stringprep/unicode/CombiningData.cs |  550 --
 lib/jabber-net/stringprep/unicode/Compose.cs       |  107 -
 lib/jabber-net/stringprep/unicode/ComposeData.cs   |  729 ---
 lib/jabber-net/stringprep/unicode/Decompose.cs     |   51 -
 lib/jabber-net/stringprep/unicode/DecomposeData.cs | 6470 --------------------
 .../stringprep/unicode/ResourceLoader.cs           |   47 -
 lib/jabber-net/test/AssemblyInfo.cs                |   74 -
 .../test/bedrock/collections/ByteStackTest.cs      |   89 -
 lib/jabber-net/test/bedrock/collections/SetTest.cs |  114 -
 .../test/bedrock/collections/SkipListTest.cs       |  152 -
 .../test/bedrock/collections/StringSet.cs          |  145 -
 .../test/bedrock/collections/TreeTest.cs           |  179 -
 .../test/bedrock/collections/TrieNodeTest.cs       |   43 -
 .../test/bedrock/collections/TrieTest.cs           |  103 -
 lib/jabber-net/test/bedrock/io/ZlibStream.cs       |   73 -
 lib/jabber-net/test/bedrock/net/AsyncSocketTest.cs |  188 -
 lib/jabber-net/test/bedrock/net/HttpSocketTest.cs  |  197 -
 lib/jabber-net/test/bedrock/net/HttpUploadTest.cs  |   58 -
 .../test/bedrock/net/SSLAsyncSocketTest.cs         |  218 -
 lib/jabber-net/test/bedrock/util/GetOptBaseTest.cs |  323 -
 lib/jabber-net/test/bedrock/util/VersionTest.cs    |  161 -
 lib/jabber-net/test/jabber/JIDTest.cs              |  367 --
 .../test/jabber/client/PresenceManagerTest.cs      |  295 -
 .../test/jabber/client/RosterManagerTest.cs        |   85 -
 .../test/jabber/connection/CapsManagerTest.cs      |  223 -
 .../jabber/connection/ConferenceManagerTest.cs     |  438 --
 .../test/jabber/connection/DiscoManagerTest.cs     |  268 -
 lib/jabber-net/test/jabber/connection/FileMap.cs   |   83 -
 .../test/jabber/connection/PubSubManagerTest.cs    |  285 -
 .../test/jabber/connection/sasl/MD5Processor.cs    |   48 -
 .../test/jabber/protocol/ElementListTest.cs        |   84 -
 .../test/jabber/protocol/ElementStreamTest.cs      |  153 -
 .../test/jabber/protocol/EnumParserTest.cs         |  115 -
 lib/jabber-net/test/jabber/protocol/PacketTest.cs  |   70 -
 .../test/jabber/protocol/accept/RouteTest.cs       |   41 -
 .../test/jabber/protocol/client/IQTest.cs          |   48 -
 .../test/jabber/protocol/client/MessageTest.cs     |   87 -
 .../test/jabber/protocol/client/PresenceTest.cs    |   79 -
 .../test/jabber/protocol/iq/AgentTest.cs           |   90 -
 lib/jabber-net/test/jabber/protocol/iq/AuthTest.cs |   78 -
 .../test/jabber/protocol/iq/PubSubTest.cs          |   57 -
 .../test/jabber/protocol/iq/RegisterTest.cs        |   52 -
 .../test/jabber/protocol/iq/RosterTest.cs          |  110 -
 lib/jabber-net/test/jabber/protocol/iq/TimeTest.cs |   48 -
 .../test/jabber/protocol/stream/FactoryTest.cs     |   37 -
 .../test/jabber/protocol/stream/StreamTest.cs      |   64 -
 lib/jabber-net/test/jabber/protocol/x/DataTest.cs  |  130 -
 lib/jabber-net/test/jabber/protocol/x/EventTest.cs |   58 -
 lib/jabber-net/test/stringprep/TestDecompose.cs    |   37 -
 lib/jabber-net/test/stringprep/TestDraft.cs        |  669 --
 lib/jabber-net/test/stringprep/TestNFKC.cs         |  146 -
 lib/jabber-net/test/stringprep/TestNameprep.cs     |  359 --
 lib/jabber-net/test/stringprep/TestNodeprep.cs     |  100 -
 lib/jabber-net/test/stringprep/TestResourceprep.cs |   51 -
 lib/jabber-net/xpnet/ContentToken.cs               |  191 -
 lib/jabber-net/xpnet/Encoding.cs                   | 3177 ----------
 lib/jabber-net/xpnet/Exceptions.cs                 |  180 -
 lib/jabber-net/xpnet/Position.cs                   |   74 -
 lib/jabber-net/xpnet/Token.cs                      |   73 -
 lib/jabber-net/xpnet/UTF8Encoding.cs               |  266 -
 ltmain.sh                                          |    4 +-
 missing                                            |  414 +-
 po-Engine-Campfire/LINGUAS                         |    3 +
 po-Engine-Campfire/POTFILES.skip                   |    2 +
 po-Engine-Campfire/cs.po                           |   79 +
 po-Engine-Campfire/da.po                           |   26 +-
 po-Engine-Campfire/de.po                           |   26 +-
 po-Engine-Campfire/fi.po                           |   79 +
 po-Engine-Campfire/fr.po                           |   24 +-
 po-Engine-Campfire/pt_BR.po                        |   79 +
 po-Engine-Campfire/sv.po                           |   24 +-
 po-Engine-Campfire/zh_CN.po                        |   26 +-
 po-Engine-IRC/LINGUAS                              |    1 +
 po-Engine-IRC/POTFILES.skip                        |    2 +
 po-Engine-IRC/cs.po                                |  290 +-
 po-Engine-IRC/da.po                                |  211 +-
 po-Engine-IRC/de.po                                |  218 +-
 po-Engine-IRC/fi.po                                |  209 +-
 po-Engine-IRC/fr.po                                |  239 +-
 po-Engine-IRC/pt_BR.po                             |  356 ++
 po-Engine-IRC/sv.po                                |  211 +-
 po-Engine-IRC/zh_CN.po                             |  211 +-
 po-Engine-Twitter/LINGUAS                          |    1 +
 po-Engine-Twitter/POTFILES.skip                    |    2 +
 po-Engine-Twitter/cs.po                            |  149 +-
 po-Engine-Twitter/da.po                            |    6 +-
 po-Engine-Twitter/de.po                            |    6 +-
 po-Engine-Twitter/fi.po                            |  150 +-
 po-Engine-Twitter/fr.po                            |   74 +-
 po-Engine-Twitter/pt_BR.po                         |  171 +
 po-Engine-Twitter/sv.po                            |    4 +-
 po-Engine-Twitter/zh_CN.po                         |    6 +-
 po-Engine/LINGUAS                                  |    1 +
 po-Engine/POTFILES.skip                            |    2 +
 po-Engine/cs.po                                    |  220 +-
 po-Engine/da.po                                    |   78 +-
 po-Engine/de.po                                    |   78 +-
 po-Engine/fi.po                                    |   76 +-
 po-Engine/fr.po                                    |  112 +-
 po-Engine/pt_BR.po                                 |  229 +
 po-Engine/sv.po                                    |   76 +-
 po-Engine/zh_CN.po                                 |   78 +-
 po-Frontend-GNOME-IRC/LINGUAS                      |    1 +
 po-Frontend-GNOME-IRC/POTFILES.skip                |    2 +
 po-Frontend-GNOME-IRC/cs.po                        |   76 +-
 po-Frontend-GNOME-IRC/da.po                        |   58 +-
 po-Frontend-GNOME-IRC/de.po                        |   58 +-
 po-Frontend-GNOME-IRC/fr.po                        |   42 +-
 po-Frontend-GNOME-IRC/pt_BR.po                     |   90 +
 po-Frontend-GNOME-IRC/sv.po                        |   58 +-
 po-Frontend-GNOME-IRC/zh_CN.po                     |   60 +-
 .../LINGUAS                                        |    0
 po-Frontend-GNOME-XMPP/Makefile.in.in              |  218 +
 po-Frontend-GNOME-XMPP/POTFILES.in                 |    3 +
 po-Frontend-GNOME-XMPP/POTFILES.skip               |   18 +
 po-Frontend-GNOME-XMPP/cs.po                       |   78 +
 po-Frontend-GNOME-XMPP/da.po                       |   79 +
 po-Frontend-GNOME-XMPP/de.po                       |   79 +
 po-Frontend-GNOME-XMPP/en_GB.po                    |   76 +
 po-Frontend-GNOME-XMPP/es.po                       |   79 +
 po-Frontend-GNOME-XMPP/es_AR.po                    |   61 +
 po-Frontend-GNOME-XMPP/fr.po                       |   79 +
 po-Frontend-GNOME-XMPP/hr.po                       |   82 +
 po-Frontend-GNOME-XMPP/it.po                       |   80 +
 po-Frontend-GNOME-XMPP/pl.po                       |   81 +
 po-Frontend-GNOME-XMPP/pt.po                       |   80 +
 po-Frontend-GNOME-XMPP/ru.po                       |   62 +
 po-Frontend-GNOME-XMPP/sv.po                       |   79 +
 po-Frontend-GNOME-XMPP/zh_CN.po                    |   81 +
 po-Frontend-GNOME/LINGUAS                          |    1 +
 po-Frontend-GNOME/POTFILES.skip                    |    2 +
 po-Frontend-GNOME/cs.po                            | 1330 ++--
 po-Frontend-GNOME/da.po                            |  256 +-
 po-Frontend-GNOME/de.po                            |  259 +-
 po-Frontend-GNOME/fi.po                            |  674 +-
 po-Frontend-GNOME/fr.po                            |  393 +-
 po-Frontend-GNOME/pt_BR.po                         | 1213 ++++
 po-Frontend-GNOME/sv.po                            |  254 +-
 po-Frontend-GNOME/zh_CN.po                         |  256 +-
 po-Frontend/LINGUAS                                |    1 +
 po-Frontend/POTFILES.skip                          |    2 +
 po-Frontend/cs.po                                  |  114 +-
 po-Frontend/da.po                                  |   12 +-
 po-Frontend/de.po                                  |   12 +-
 po-Frontend/fr.po                                  |    6 +-
 po-Frontend/pt_BR.po                               |  119 +
 po-Frontend/sv.po                                  |   10 +-
 po-Frontend/zh_CN.po                               |   12 +-
 po-Server/LINGUAS                                  |    1 +
 po-Server/POTFILES.skip                            |    2 +
 po-Server/cs.po                                    |   98 +-
 po-Server/da.po                                    |   26 +-
 po-Server/de.po                                    |   29 +-
 po-Server/fr.po                                    |    2 +-
 po-Server/pt_BR.po                                 |  132 +
 po-Server/sv.po                                    |   26 +-
 po-Server/zh_CN.po                                 |   14 +-
 po/Makefile.in.in                                  |   15 +-
 src/AssemblyVersion.cs                             |    2 +-
 src/Common/Defines.cs                              |    6 +-
 src/Common/Makefile.in                             |  106 +-
 src/Common/Platform.cs                             |    4 +-
 src/Common/TaskQueue.cs                            |    4 +-
 src/Engine-Campfire/AssemblyInfo.cs                |    4 +-
 src/Engine-Campfire/Makefile.in                    |  166 +-
 .../Protocols/Campfire/CampfireProtocolManager.cs  |   18 +-
 src/Engine-IRC/AssemblyInfo.cs                     |    4 +-
 src/Engine-IRC/Makefile.am                         |   17 +-
 src/Engine-IRC/Makefile.in                         |  123 +-
 .../Protocols/Irc/IrcGroupPersonModel.cs           |   59 +-
 src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs |  946 ++-
 src/Engine-JabbR/AssemblyInfo.cs                   |   35 +
 src/Engine-JabbR/JabbrMessageBuilder.cs            |   67 +
 src/Engine-JabbR/JabbrProtocolManager.cs           |  513 ++
 src/Engine-JabbR/Makefile.am                       |   37 +
 src/Engine-JabbR/Makefile.in                       |  940 +++
 src/Engine-JabbR/smuxi-engine-jabbr.pc.in          |    6 +
 src/Engine-Twitter/AssemblyInfo.cs                 |    4 +-
 src/Engine-Twitter/Makefile.in                     |  166 +-
 .../Protocols/Twitter/TwitterProtocolManager.cs    |   48 +-
 src/Engine-XMPP/AssemblyInfo.cs                    |    6 +-
 src/Engine-XMPP/Config/XmppPersonModel.cs          |  135 +
 src/Engine-XMPP/Makefile.am                        |    5 +-
 src/Engine-XMPP/Makefile.in                        |  173 +-
 src/Engine-XMPP/Protocols/Xmpp/IQ/OwnMessage.cs    |   48 +-
 .../Protocols/Xmpp/XmppGroupChatModel.cs           |    7 +-
 .../Protocols/Xmpp/XmppProtocolManager.cs          | 2007 ++++--
 src/Engine/AssemblyInfo.cs                         |    2 +-
 src/Engine/CertificateValidator.cs                 |  114 +
 src/Engine/Chats/ChatModel.cs                      |    2 +
 src/Engine/Config/Config.cs                        |   18 +-
 src/Engine/Config/FrontendConfig.cs                |    7 +-
 src/Engine/Config/ProxySettings.cs                 |   36 +-
 src/Engine/Config/UserConfig.cs                    |   21 +-
 src/Engine/Makefile.am                             |    2 +
 src/Engine/Makefile.in                             |  107 +-
 src/Engine/Messages/MessageBuilder.cs              |  152 +-
 src/Engine/Persons/ContactModel.cs                 |   32 +-
 src/Engine/Session.cs                              |  117 +-
 src/Engine/TextColorPalettes.cs                    |   61 +
 src/Engine/TextColorTools.cs                       |   17 +-
 src/Frontend-Curses/Makefile.in                    |  106 +-
 src/Frontend-GNOME-IRC/AssemblyInfo.cs             |    2 +-
 src/Frontend-GNOME-IRC/CtcpMenu.cs                 |  108 +-
 src/Frontend-GNOME-IRC/InviteToMenu.cs             |   37 +-
 src/Frontend-GNOME-IRC/IrcGroupChatView.cs         |  146 +-
 src/Frontend-GNOME-IRC/IrcPersonChatView.cs        |   20 +-
 src/Frontend-GNOME-IRC/Makefile.am                 |    6 +-
 src/Frontend-GNOME-IRC/Makefile.in                 |  111 +-
 src/Frontend-GNOME-XMPP/AssemblyInfo.cs            |    3 +-
 src/Frontend-GNOME-XMPP/InviteToMenu.cs            |  117 +
 src/Frontend-GNOME-XMPP/Makefile.am                |   16 +-
 src/Frontend-GNOME-XMPP/Makefile.in                |  121 +-
 src/Frontend-GNOME-XMPP/XmppGroupChatView.cs       |  260 +
 src/Frontend-GNOME-XMPP/XmppPersonChatView.cs      |  133 +
 src/Frontend-GNOME/AboutDialog.cs                  |    7 +-
 src/Frontend-GNOME/AssemblyInfo.cs                 |    2 +-
 src/Frontend-GNOME/ChatViewManager.cs              |   11 +-
 src/Frontend-GNOME/Entry.cs                        |  140 +-
 src/Frontend-GNOME/Frontend.cs                     |   27 +-
 src/Frontend-GNOME/Makefile.in                     |  113 +-
 src/Frontend-GNOME/NetworkManager.cs               |   11 +-
 .../Preferences/PreferencesDialog.cs               |   16 +-
 src/Frontend-GNOME/QuickConnectDialog.cs           |   14 +-
 src/Frontend-GNOME/Views/Chats/ChatView.cs         |   29 +-
 src/Frontend-GNOME/Views/Chats/GroupChatView.cs    |  123 +-
 src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs |   35 +-
 src/Frontend-GNOME/Views/MenuWidget.cs             |   42 +-
 src/Frontend-GNOME/Views/MessageTextView.cs        |    5 -
 src/Frontend-GNOME/Views/ServerDialog.cs           |   23 +
 src/Frontend-GNOME/Views/ServerWidget.cs           |   83 +-
 .../gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs     |   14 +-
 .../gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs   |   22 +-
 src/Frontend-GNOME/gtk-gui/gui.stetic              |   20 +-
 src/Frontend-GNOME/smuxi-frontend-gnome.desktop    |   12 +
 src/Frontend-STFL/AssemblyInfo.cs                  |    2 +-
 src/Frontend-STFL/ChatViewManager.cs               |   18 +
 src/Frontend-STFL/Entry.cs                         |   11 +-
 src/Frontend-STFL/MainWindow.cs                    |   33 +
 src/Frontend-STFL/MainWindow.stfl                  |    8 +-
 src/Frontend-STFL/Makefile.am                      |    1 +
 src/Frontend-STFL/Makefile.in                      |  269 +-
 src/Frontend-STFL/STFL/Form.cs                     |   18 +-
 src/Frontend-STFL/STFL/Makefile.in                 |  107 +-
 src/Frontend-STFL/STFL/TextView.cs                 |  167 +-
 src/Frontend-STFL/STFL/Widget.cs                   |    2 +-
 src/Frontend-STFL/StflUI.cs                        |   29 +-
 src/Frontend-STFL/Views/ChatView.cs                |   40 +-
 src/Frontend-STFL/Views/GroupChatView.cs           |   25 +-
 src/Frontend-STFL/smuxi-frontend-stfl.exe.config   |    3 +-
 src/Frontend-SWF/Chats/GroupChatView.cs            |   11 +-
 src/Frontend-SWF/Entry.cs                          |    1 -
 src/Frontend-SWF/Makefile.in                       |  104 +-
 src/Frontend-Test/Makefile.in                      |  106 +-
 src/Frontend/AssemblyInfo.cs                       |    2 +-
 src/Frontend/ChatViewSyncManager.cs                |    7 +
 src/Frontend/CommandManager.cs                     |   56 +
 src/Frontend/EngineManager.cs                      |    1 +
 src/Frontend/Makefile.in                           |  105 +-
 src/Frontend/NickCompleter.cs                      |    7 +-
 src/Makefile.am                                    |    5 +
 src/Makefile.in                                    |  281 +-
 src/Server/Makefile.in                             |  105 +-
 src/smuxi-win32.nsis.in                            |   14 +-
 959 files changed, 94004 insertions(+), 89102 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index be1d1f8..885b4fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,10 @@ if ENABLE_FRONTEND_GNOME_IRC
 PO_FRONTEND_GNOME_IRC = po-Frontend-GNOME-IRC
 endif
 
+if ENABLE_FRONTEND_GNOME_XMPP
+PO_FRONTEND_GNOME_XMPP = po-Frontend-GNOME-XMPP
+endif
+
 ACLOCAL_AMFLAGS = -I .
 
 EXTRA_DIST =	install-sh \
@@ -34,6 +38,13 @@ EXTRA_DIST =	install-sh \
 		BUGS \
 		TODO
 
+# HACK: distclean in po/ does not work for some reason
+DISTCLEANFILES = \
+		po/POTFILES \
+		po/Makefile \
+		po/stamp-it \
+		po/Makefile.in
+
 PODIRS =	po \
 		po-Engine \
 		$(PO_ENGINE_CAMPFIRE) \
@@ -42,7 +53,8 @@ PODIRS =	po \
 		po-Server \
 		po-Frontend \
 		$(PO_FRONTEND_GNOME) \
-		$(PO_FRONTEND_GNOME_IRC)
+		$(PO_FRONTEND_GNOME_IRC) \
+		$(PO_FRONTEND_GNOME_XMPP)
 
 SUBDIRS = 	lib \
 		src \
@@ -65,7 +77,7 @@ update-pot:
 	done
 
 update-transifex:
-	tx pull -l ca,da,de,en_GB,es,fi,hr,nb_NO,pl,ru,sk,sv,tr,ur,zh_CN
+	tx pull -f -l ca,cs,da,de,en_GB,es,fi,fr,hr,nb_NO,pl,pt_BR,ru,sk,sv,tr,ur,zh_CN
 
 mail-po: update-po
 	for PODIR in $(PODIRS); do \
@@ -95,13 +107,18 @@ call-po: update-po
 			--call; \
 	done
 	
+install-po:
+	for PODIR in $(PODIRS); do \
+		$(MAKE) -C $$PODIR install itlocaledir=$(abs_top_builddir)/bin/$(PROFILE)/locale; \
+	done
+
 LIB_DIR = $(top_builddir)/lib
 BUILD_DIR = $(top_builddir)/bin/$(PROFILE)
 WIN32_LIB_DIR = $(LIB_DIR)/win32
 WIN32_BUILD_DIR = $(top_builddir)/bin-win32
-WIN32_ICON_THEME_DIR = $(top_srcdir)/images/Faenza-Smuxi
+WIN32_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
 OSX_LIB_DIR = $(LIB_DIR)/osx
-OSX_ICON_THEME_DIR = $(top_srcdir)/images/Faenza-Smuxi
+OSX_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
 OSX_BUILD_DIR = $(top_builddir)/bin-osx
 OSX_APP_DIR = $(OSX_BUILD_DIR)/Smuxi.app
 OSX_CONTENTS_DIR = $(OSX_APP_DIR)/Contents
@@ -124,6 +141,7 @@ WIN32_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-campfire.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
+	$(BUILD_DIR)/smuxi-engine-jabbr.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
 	$(BUILD_DIR)/smuxi-engine-xmpp.dll \
 	$(BUILD_DIR)/smuxi-frontend-gnome-irc.dll \
@@ -131,11 +149,14 @@ WIN32_FILES = \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll \
-	$(BUILD_DIR)/jabber-net.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Db4objects.Db4o.dll \
 	$(BUILD_DIR)/ServiceStack.Text.dll \
 	$(BUILD_DIR)/ServiceStack.Interfaces.dll \
 	$(BUILD_DIR)/ServiceStack.Common.dll \
+	$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(BUILD_DIR)/JabbR.Client.dll \
 	$(WIN32_LIB_DIR)/smuxi-frontend-gnome.exe.config \
 	$(WIN32_LIB_DIR)/smuxi-server.exe.config
 
@@ -150,17 +171,21 @@ OSX_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-campfire.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
+	$(BUILD_DIR)/smuxi-engine-jabbr.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
 	$(BUILD_DIR)/smuxi-engine-xmpp.dll \
 	$(BUILD_DIR)/smuxi-frontend.dll \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll \
-	$(BUILD_DIR)/jabber-net.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Db4objects.Db4o.dll \
 	$(BUILD_DIR)/ServiceStack.Text.dll \
 	$(BUILD_DIR)/ServiceStack.Interfaces.dll \
-	$(BUILD_DIR)/ServiceStack.Common.dll
+	$(BUILD_DIR)/ServiceStack.Common.dll \
+	$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(BUILD_DIR)/JabbR.Client.dll
 
 LINUX_STATIC_FILES = \
 	$(LIB_DIR)/Mono.Posix.dll \
@@ -170,7 +195,9 @@ LINUX_STATIC_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll
 		
@@ -224,7 +251,15 @@ dist-linux-x86-static:
 		cp $$FILE $(LINUX_STATIC_BUILD_DIR); \
 	done
 	tar -czf smuxi-server-$(VERSION)-linux-x86-static.tar.gz $(LINUX_STATIC_BUILD_DIR)
- 
+
+dist-linux-debs:
+	git checkout -- debian/changelog
+	dch -b \
+		-v "1:$(VERSION)+git-1~$$(date +%Y%m%d%H%M%S).$$(git rev-parse --short=8 HEAD)" \
+		-D "$$(lsb_release -r -s)" \
+		"Building git snapshot."
+	dpkg-buildpackage -b -us -uc
+
 run: run-gnome
 run-gnome: all
 	cd $(BUILD_DIR) && \
diff --git a/Makefile.in b/Makefile.in
index 32ab82b..98c6982 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,10 +78,10 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(top_srcdir)/configure \
-	$(top_srcdir)/lib/osx/Info.plist.in TODO config.guess \
-	config.rpath config.sub install-sh ltmain.sh missing
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(top_srcdir)/lib/osx/Info.plist.in README TODO config.guess \
+	config.rpath config.sub install-sh missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
 	$(top_srcdir)/intltool.m4 $(top_srcdir)/libtool.m4 \
@@ -69,15 +96,28 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES = lib/osx/Info.plist
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -85,14 +125,35 @@ am__can_run_installinfo = \
   esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir dist dist-all distcheck
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = lib src po po-Engine po-Engine-Campfire po-Engine-IRC \
 	po-Engine-Twitter po-Server po-Frontend po-Frontend-GNOME \
-	po-Frontend-GNOME-IRC
+	po-Frontend-GNOME-IRC po-Frontend-GNOME-XMPP
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -102,6 +163,7 @@ am__remove_distdir = \
       && rm -rf "$(distdir)" \
       || { sleep 5 && rm -rf "$(distdir)"; }; \
   else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -129,6 +191,7 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -177,6 +240,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -281,7 +345,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -361,6 +424,7 @@ twitter_api_key = @twitter_api_key@
 # Frontends
 @ENABLE_FRONTEND_GNOME_TRUE at PO_FRONTEND_GNOME = po-Frontend-GNOME
 @ENABLE_FRONTEND_GNOME_IRC_TRUE at PO_FRONTEND_GNOME_IRC = po-Frontend-GNOME-IRC
+ at ENABLE_FRONTEND_GNOME_XMPP_TRUE@PO_FRONTEND_GNOME_XMPP = po-Frontend-GNOME-XMPP
 ACLOCAL_AMFLAGS = -I .
 EXTRA_DIST = install-sh \
 		expansions.m4 \
@@ -374,6 +438,14 @@ EXTRA_DIST = install-sh \
 		BUGS \
 		TODO
 
+
+# HACK: distclean in po/ does not work for some reason
+DISTCLEANFILES = \
+		po/POTFILES \
+		po/Makefile \
+		po/stamp-it \
+		po/Makefile.in
+
 PODIRS = po \
 		po-Engine \
 		$(PO_ENGINE_CAMPFIRE) \
@@ -382,7 +454,8 @@ PODIRS = po \
 		po-Server \
 		po-Frontend \
 		$(PO_FRONTEND_GNOME) \
-		$(PO_FRONTEND_GNOME_IRC)
+		$(PO_FRONTEND_GNOME_IRC) \
+		$(PO_FRONTEND_GNOME_XMPP)
 
 SUBDIRS = lib \
 		src \
@@ -392,9 +465,9 @@ LIB_DIR = $(top_builddir)/lib
 BUILD_DIR = $(top_builddir)/bin/$(PROFILE)
 WIN32_LIB_DIR = $(LIB_DIR)/win32
 WIN32_BUILD_DIR = $(top_builddir)/bin-win32
-WIN32_ICON_THEME_DIR = $(top_srcdir)/images/Faenza-Smuxi
+WIN32_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
 OSX_LIB_DIR = $(LIB_DIR)/osx
-OSX_ICON_THEME_DIR = $(top_srcdir)/images/Faenza-Smuxi
+OSX_ICON_THEME_DIR = $(top_srcdir)/images/Smuxi-Symbolic
 OSX_BUILD_DIR = $(top_builddir)/bin-osx
 OSX_APP_DIR = $(OSX_BUILD_DIR)/Smuxi.app
 OSX_CONTENTS_DIR = $(OSX_APP_DIR)/Contents
@@ -416,6 +489,7 @@ WIN32_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-campfire.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
+	$(BUILD_DIR)/smuxi-engine-jabbr.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
 	$(BUILD_DIR)/smuxi-engine-xmpp.dll \
 	$(BUILD_DIR)/smuxi-frontend-gnome-irc.dll \
@@ -423,11 +497,14 @@ WIN32_FILES = \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll \
-	$(BUILD_DIR)/jabber-net.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Db4objects.Db4o.dll \
 	$(BUILD_DIR)/ServiceStack.Text.dll \
 	$(BUILD_DIR)/ServiceStack.Interfaces.dll \
 	$(BUILD_DIR)/ServiceStack.Common.dll \
+	$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(BUILD_DIR)/JabbR.Client.dll \
 	$(WIN32_LIB_DIR)/smuxi-frontend-gnome.exe.config \
 	$(WIN32_LIB_DIR)/smuxi-server.exe.config
 
@@ -442,17 +519,21 @@ OSX_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-campfire.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
+	$(BUILD_DIR)/smuxi-engine-jabbr.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
 	$(BUILD_DIR)/smuxi-engine-xmpp.dll \
 	$(BUILD_DIR)/smuxi-frontend.dll \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll \
-	$(BUILD_DIR)/jabber-net.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Db4objects.Db4o.dll \
 	$(BUILD_DIR)/ServiceStack.Text.dll \
 	$(BUILD_DIR)/ServiceStack.Interfaces.dll \
-	$(BUILD_DIR)/ServiceStack.Common.dll
+	$(BUILD_DIR)/ServiceStack.Common.dll \
+	$(BUILD_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(BUILD_DIR)/JabbR.Client.dll
 
 LINUX_STATIC_FILES = \
 	$(LIB_DIR)/Mono.Posix.dll \
@@ -462,7 +543,9 @@ LINUX_STATIC_FILES = \
 	$(BUILD_DIR)/smuxi-engine.dll \
 	$(BUILD_DIR)/smuxi-engine-irc.dll \
 	$(BUILD_DIR)/smuxi-engine-twitter.dll \
+	$(BUILD_DIR)/agsxmpp.dll \
 	$(BUILD_DIR)/Meebey.SmartIrc4net.dll \
+	$(BUILD_DIR)/StarkSoftProxy.dll \
 	$(BUILD_DIR)/Twitterizer2.dll \
 	$(BUILD_DIR)/Newtonsoft.Json.dll
 
@@ -516,22 +599,25 @@ distclean-libtool:
 	-rm -f libtool config.lt
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -546,57 +632,12 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -612,12 +653,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -629,15 +665,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -646,9 +678,31 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
@@ -716,40 +770,36 @@ distdir: $(DISTFILES)
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-shar: distdir
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -760,8 +810,6 @@ distcheck: dist
 	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
 	*.tar.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
@@ -773,9 +821,9 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod u+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -807,7 +855,7 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -868,6 +916,7 @@ clean-generic:
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -942,14 +991,13 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
 
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-	dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
-	dist-zip distcheck distclean distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	clean-libtool cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-generic \
 	distclean-libtool distclean-tags distcleancheck distdir \
 	distuninstallcheck dvi dvi-am html html-am info info-am \
 	install install-am install-data install-data-am install-dvi \
@@ -959,7 +1007,7 @@ uninstall-am:
 	install-strip installcheck installcheck-am installdirs \
 	installdirs-am maintainer-clean maintainer-clean-generic \
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-recursive uninstall uninstall-am
+	ps ps-am tags tags-am uninstall uninstall-am
 
 
 # forcely disable parallel builds
@@ -979,7 +1027,7 @@ update-pot:
 	done
 
 update-transifex:
-	tx pull -l ca,da,de,en_GB,es,fi,hr,nb_NO,pl,ru,sk,sv,tr,ur,zh_CN
+	tx pull -f -l ca,cs,da,de,en_GB,es,fi,fr,hr,nb_NO,pl,pt_BR,ru,sk,sv,tr,ur,zh_CN
 
 mail-po: update-po
 	for PODIR in $(PODIRS); do \
@@ -1009,6 +1057,11 @@ call-po: update-po
 			--call; \
 	done
 
+install-po:
+	for PODIR in $(PODIRS); do \
+		$(MAKE) -C $$PODIR install itlocaledir=$(abs_top_builddir)/bin/$(PROFILE)/locale; \
+	done
+
 dist-win32:
 	if [ -x /usr/bin/dmcs ]; then \
 		COMPILER_OVERRIDE="MCS=/usr/bin/dmcs"; \
@@ -1060,6 +1113,14 @@ dist-linux-x86-static:
 	done
 	tar -czf smuxi-server-$(VERSION)-linux-x86-static.tar.gz $(LINUX_STATIC_BUILD_DIR)
 
+dist-linux-debs:
+	git checkout -- debian/changelog
+	dch -b \
+		-v "1:$(VERSION)+git-1~$$(date +%Y%m%d%H%M%S).$$(git rev-parse --short=8 HEAD)" \
+		-D "$$(lsb_release -r -s)" \
+		"Building git snapshot."
+	dpkg-buildpackage -b -us -uc
+
 run: run-gnome
 run-gnome: all
 	cd $(BUILD_DIR) && \
diff --git a/aclocal.m4 b/aclocal.m4
index edf5b0a..8e853c5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -12,16 +11,17 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
 [m4_warning([this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# gettext.m4 serial 63 (gettext-0.18)
-dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+# gettext.m4 serial 66 (gettext-0.18.2)
+dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -57,7 +57,7 @@ dnl    will be ignored.  If NEEDSYMBOL is specified and is
 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 dnl INTLDIR is used to find the intl libraries.  If empty,
-dnl    the value `$(top_builddir)/intl/' is used.
+dnl    the value '$(top_builddir)/intl/' is used.
 dnl
 dnl The result of the configuration is one of three cases:
 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
@@ -119,7 +119,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
   ])
 
-  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
   gt_INTL_MACOSX
 
   dnl Set USE_NLS.
@@ -179,12 +179,18 @@ changequote([,])dnl
         fi
 
         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
-         [AC_TRY_LINK([#include <libintl.h>
+         [AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
-            [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+extern int *_nl_domain_bindings;
+               ]],
+               [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+               ]])],
             [eval "$gt_func_gnugettext_libc=yes"],
             [eval "$gt_func_gnugettext_libc=no"])])
 
@@ -205,35 +211,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
             gt_save_LIBS="$LIBS"
             LIBS="$LIBS $LIBINTL"
             dnl Now see whether libintl exists and does not depend on libiconv.
-            AC_TRY_LINK([#include <libintl.h>
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
-const char *_nl_expand_alias (const char *);],
-              [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+const char *_nl_expand_alias (const char *);
+                 ]],
+                 [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                 ]])],
               [eval "$gt_func_gnugettext_libintl=yes"],
               [eval "$gt_func_gnugettext_libintl=no"])
             dnl Now see whether libintl exists and depends on libiconv.
             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
               LIBS="$LIBS $LIBICONV"
-              AC_TRY_LINK([#include <libintl.h>
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[
+#include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
-const char *_nl_expand_alias (const char *);],
-                [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-               [LIBINTL="$LIBINTL $LIBICONV"
-                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                eval "$gt_func_gnugettext_libintl=yes"
-               ])
+const char *_nl_expand_alias (const char *);
+                   ]],
+                   [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+                   ]])],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+                ])
             fi
             CPPFLAGS="$gt_save_CPPFLAGS"
             LIBS="$gt_save_LIBS"])
@@ -404,8 +422,8 @@ AC_DEFUN([AM_GNU_GETTEXT_NEED],
 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
-# iconv.m4 serial 11 (gettext-0.18.1)
-dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+# iconv.m4 serial 18 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -436,27 +454,35 @@ AC_DEFUN([AM_ICONV_LINK],
   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
   dnl because if the user has installed libiconv and not disabled its use
   dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
   am_save_CPPFLAGS="$CPPFLAGS"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
   AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[
+#include <stdlib.h>
+#include <iconv.h>
+         ]],
+         [[iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);]])],
       [am_cv_func_iconv=yes])
     if test "$am_cv_func_iconv" != yes; then
       am_save_LIBS="$LIBS"
       LIBS="$LIBS $LIBICONV"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+           ]],
+           [[iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);]])],
         [am_cv_lib_iconv=yes]
         [am_cv_func_iconv=yes])
       LIBS="$am_save_LIBS"
@@ -464,16 +490,19 @@ AC_DEFUN([AM_ICONV_LINK],
   ])
   if test "$am_cv_func_iconv" = yes; then
     AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
-      dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+      dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+      dnl Solaris 10.
       am_save_LIBS="$LIBS"
       if test $am_cv_lib_iconv = yes; then
         LIBS="$LIBS $LIBICONV"
       fi
-      AC_TRY_RUN([
+      AC_RUN_IFELSE(
+        [AC_LANG_SOURCE([[
 #include <iconv.h>
 #include <string.h>
 int main ()
 {
+  int result = 0;
   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
      returns.  */
   {
@@ -490,7 +519,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
       }
   }
   /* Test against Solaris 10 bug: Failures are not distinguishable from
@@ -509,7 +539,27 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        const char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #if 0 /* This bug could be worked around by the caller.  */
@@ -528,7 +578,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if ((int)res > 0)
-          return 1;
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #endif
@@ -542,13 +593,19 @@ int main ()
       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
       /* Try HP-UX names.  */
       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    return 1;
-  return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
-        [case "$host_os" in
+    result |= 16;
+  return result;
+}]])],
+        [am_cv_func_iconv_works=yes],
+        [am_cv_func_iconv_works=no],
+        [
+changequote(,)dnl
+         case "$host_os" in
            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
            *)            am_cv_func_iconv_works="guessing yes" ;;
-         esac])
+         esac
+changequote([,])dnl
+        ])
       LIBS="$am_save_LIBS"
     ])
     case "$am_cv_func_iconv_works" in
@@ -589,38 +646,53 @@ m4_define([gl_iconv_AC_DEFUN],
   m4_version_prereq([2.64],
     [[AC_DEFUN_ONCE(
         [$1], [$2])]],
-    [[AC_DEFUN(
-        [$1], [$2])]]))
+    [m4_ifdef([gl_00GNULIB],
+       [[AC_DEFUN_ONCE(
+           [$1], [$2])]],
+       [[AC_DEFUN(
+           [$1], [$2])]])]))
 gl_iconv_AC_DEFUN([AM_ICONV],
 [
   AM_ICONV_LINK
   if test "$am_cv_func_iconv" = yes; then
     AC_MSG_CHECKING([for iconv declaration])
     AC_CACHE_VAL([am_cv_proto_iconv], [
-      AC_TRY_COMPILE([
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
 #include <stdlib.h>
 #include <iconv.h>
 extern
 #ifdef __cplusplus
 "C"
 #endif
-#if defined(__STDC__) || defined(__cplusplus)
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 #else
 size_t iconv();
 #endif
-], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+           ]],
+           [[]])],
+        [am_cv_proto_iconv_arg1=""],
+        [am_cv_proto_iconv_arg1="const"])
       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
     AC_MSG_RESULT([
          $am_cv_proto_iconv])
     AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
       [Define as const if the declaration of iconv() needs const.])
+    dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+    m4_ifdef([gl_ICONV_H_DEFAULTS],
+      [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+       if test -n "$am_cv_proto_iconv_arg1"; then
+         ICONV_CONST="const"
+       fi
+      ])
   fi
 ])
 
-# intlmacosx.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -634,35 +706,40 @@ dnl by the GNU Library General Public License, and the rest of the GNU
 dnl gettext package package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
 dnl Defines INTL_MACOSX_LIBS.
 AC_DEFUN([gt_INTL_MACOSX],
 [
-  dnl Check for API introduced in MacOS X 10.2.
+  dnl Check for API introduced in Mac OS X 10.2.
   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
     [gt_cv_func_CFPreferencesCopyAppValue],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
-       [CFPreferencesCopyAppValue(NULL, NULL)],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
        [gt_cv_func_CFPreferencesCopyAppValue=yes],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
-      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
   fi
-  dnl Check for API introduced in MacOS X 10.3.
+  dnl Check for API introduced in Mac OS X 10.3.
   AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
     [gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
-     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
        [gt_cv_func_CFLocaleCopyCurrent=yes],
        [gt_cv_func_CFLocaleCopyCurrent=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
-      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
   fi
   INTL_MACOSX_LIBS=
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
@@ -671,53 +748,59 @@ AC_DEFUN([gt_INTL_MACOSX],
   AC_SUBST([INTL_MACOSX_LIBS])
 ])
 
-# lib-ld.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
 
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
+  acl_cv_prog_gnu_ld=yes
+  ;;
 *)
-  acl_cv_prog_gnu_ld=no ;;
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
+  AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -727,11 +810,11 @@ if test "$GCC" = yes; then
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
@@ -752,23 +835,26 @@ else
 fi
 AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       acl_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-        test "$with_gnu_ld" != no && break ;;
+        test "$with_gnu_ld" != no && break
+        ;;
       *)
-        test "$with_gnu_ld" != yes && break ;;
+        test "$with_gnu_ld" != yes && break
+        ;;
       esac
     fi
   done
-  IFS="$ac_save_ifs"
+  IFS="$acl_save_ifs"
 else
   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 fi])
@@ -782,8 +868,8 @@ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 AC_LIB_PROG_LD_GNU
 ])
 
-# lib-link.m4 serial 21 (gettext-0.18)
-dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
+# lib-link.m4 serial 26 (gettext-0.18.2)
+dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -802,9 +888,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
   AC_REQUIRE([AC_LIB_RPATH])
-  pushdef([Name],[translit([$1],[./-], [___])])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
     AC_LIB_LINKFLAGS_BODY([$1], [$2])
     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -842,9 +928,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
   AC_REQUIRE([AC_LIB_RPATH])
-  pushdef([Name],[translit([$1],[./-], [___])])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 
   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
   dnl accordingly.
@@ -869,7 +955,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
       *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
       *)       LIBS="$LIB[]NAME $LIBS" ;;
     esac
-    AC_TRY_LINK([$3], [$4],
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
       [ac_cv_lib[]Name=yes],
       [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
     LIBS="$ac_save_LIBS"
@@ -899,6 +986,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 dnl Determine the platform dependent parameters needed to use rpath:
 dnl   acl_libext,
 dnl   acl_shlibext,
+dnl   acl_libname_spec,
+dnl   acl_library_names_spec,
 dnl   acl_hardcode_libdir_flag_spec,
 dnl   acl_hardcode_libdir_separator,
 dnl   acl_hardcode_direct,
@@ -941,15 +1030,15 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
 dnl macro call that searches for libname.
 AC_DEFUN([AC_LIB_FROMPACKAGE],
 [
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   define([acl_frompackage_]NAME, [$2])
   popdef([NAME])
   pushdef([PACK],[$2])
-  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
-                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   define([acl_libsinpackage_]PACKUP,
-    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
   popdef([PACKUP])
   popdef([PACK])
 ])
@@ -962,14 +1051,14 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 [
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
-  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
-                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
   dnl Autoconf >= 2.61 supports dots in --with options.
-  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
   AC_LIB_WITH_FINAL_PREFIX([
@@ -1026,7 +1115,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         names_already_handled="$names_already_handled $name"
         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
         dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -1558,7 +1647,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
 ])
 
 # lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -1783,7 +1872,7 @@ sixtyfour bits
 ])
 
 # nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -1975,8 +2064,8 @@ else
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# po.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
+# po.m4 serial 21 (gettext-0.18.3)
+dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -1994,14 +2083,15 @@ dnl Authors:
 dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
 
-AC_PREREQ([2.50])
+AC_PREREQ([2.60])
 
 dnl Checks for all prerequisites of the po subdirectory.
 AC_DEFUN([AM_PO_SUBDIRS],
 [
   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
   AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+  AC_REQUIRE([AC_PROG_SED])dnl
   AC_REQUIRE([AM_NLS])dnl
 
   dnl Release version of the gettext macros. This is used to ensure that
@@ -2079,7 +2169,7 @@ changequote([,])dnl
       case "$ac_file" in */Makefile.in)
         # Adjust a relative srcdir.
         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
         # In autoconf-2.13 it is called $ac_given_srcdir.
         # In autoconf-2.50 it is called $srcdir.
@@ -2095,7 +2185,8 @@ changequote([,])dnl
         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
           rm -f "$ac_dir/POTFILES"
           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
           POMAKEFILEDEPS="POTFILES.in"
           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
           # on $ac_dir but don't depend on user-specified configuration
@@ -2106,12 +2197,12 @@ changequote([,])dnl
               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
             # The set of available languages was given in configure.in.
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           # Compute POFILES
@@ -2203,7 +2294,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 changequote(,)dnl
   # Adjust a relative srcdir.
   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
   # In autoconf-2.13 it is called $ac_given_srcdir.
   # In autoconf-2.50 it is called $srcdir.
@@ -2231,6 +2322,7 @@ EOT
   fi
 
   # A sed script that extracts the value of VARIABLE from a Makefile.
+  tab=`printf '\t'`
   sed_x_variable='
 # Test if the hold space is empty.
 x
@@ -2238,9 +2330,9 @@ s/P/P/
 x
 ta
 # Yes it was empty. Look if we have the expected variable definition.
-/^[	 ]*VARIABLE[	 ]*=/{
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
   # Seen the first line of the variable definition.
-  s/^[	 ]*VARIABLE[	 ]*=//
+  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
   ba
 }
 bd
@@ -2292,7 +2384,7 @@ changequote([,])dnl
     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
   fi
-  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  # Hide the ALL_LINGUAS assignment from automake < 1.5.
   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
   # Compute POFILES
   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
@@ -2382,14 +2474,15 @@ changequote([,])dnl
   fi
 
   sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCL [...]
+  tab=`printf '\t'`
   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
     # Add dependencies that cannot be formulated as a simple suffix rule.
     for lang in $ALL_LINGUAS; do
       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
       cat >> "$ac_file.tmp" <<EOF
 $frobbedlang.msg: $lang.po
-	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 EOF
     done
   fi
@@ -2399,8 +2492,8 @@ EOF
       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
       cat >> "$ac_file.tmp" <<EOF
 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
-	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 EOF
     done
   fi
@@ -2425,8 +2518,8 @@ AC_DEFUN([AM_XGETTEXT_OPTION],
   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
 ])
 
-# progtest.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
+# progtest.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -2454,15 +2547,14 @@ AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
 
 # Find out how to test for executable files. Don't use a zero-byte file,
@@ -2518,25 +2610,22 @@ fi
 AC_SUBST([$1])dnl
 ])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.13'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.6], [],
+m4_if([$1], [1.13.3], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -2552,24 +2641,22 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.6])dnl
+[AM_AUTOMAKE_VERSION([1.13.3])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -2588,7 +2675,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -2614,22 +2701,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -2648,16 +2732,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -2667,7 +2749,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -2680,12 +2762,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -2693,8 +2776,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -2734,16 +2817,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -2752,8 +2835,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
@@ -2761,7 +2844,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # This compiler won't grok '-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -2809,7 +2892,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -2819,9 +2902,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
@@ -2836,20 +2923,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -2862,7 +2947,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
+    # We used to match only the files named 'Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -2874,21 +2959,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # from the Makefile without running 'make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -2906,7 +2989,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
+# is enabled.  FIXME.  This creates each '.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -2916,15 +2999,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 16
-
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
@@ -2940,7 +3020,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -2969,31 +3049,40 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -3004,28 +3093,32 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+		  [_AM_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
@@ -3053,15 +3146,12 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -3075,16 +3165,14 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -3101,20 +3189,17 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
 # can override the default with the --enable/--disable switch.
 AC_DEFUN([AM_MAINTAINER_MODE],
 [m4_case(m4_default([$1], [disable]),
@@ -3125,10 +3210,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
   MAINT=$MAINTAINER_MODE_TRUE
@@ -3136,18 +3222,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 ]
 )
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -3165,7 +3247,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -3192,15 +3274,12 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -3208,11 +3287,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
@@ -3225,54 +3303,22 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -3282,7 +3328,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 # --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
 # ------------------------
@@ -3296,14 +3342,12 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_RUN_LOG(COMMAND)
 # -------------------
 # Run COMMAND, save the exit status in ac_status, and log it.
@@ -3317,22 +3361,16 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -3343,32 +3381,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -3378,46 +3424,118 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
 
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -3431,18 +3549,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -3452,76 +3568,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
diff --git a/config.guess b/config.guess
index d622a44..b79252d 100755
--- a/config.guess
+++ b/config.guess
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2013-06-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches at gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -54,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
 	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
 	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -801,6 +820,9 @@ EOF
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
 	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
@@ -852,21 +874,21 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +901,54 @@ EOF
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -950,54 +967,63 @@ EOF
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     or32:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
+	echo powerpc64-unknown-linux-${LIBC}
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1201,6 +1227,9 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	echo i586-pc-haiku
 	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1227,19 +1256,21 @@ EOF
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1256,7 +1287,7 @@ EOF
     NEO-?:NONSTOP_KERNEL:*:*)
 	echo neo-tandem-nsk${UNAME_RELEASE}
 	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
     NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1361,6 @@ EOF
 	exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
diff --git a/config.sub b/config.sub
index 6205f84..9633db7 100755
--- a/config.sub
+++ b/config.sub
@@ -1,24 +1,18 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-04-18'
+timestamp='2013-08-10'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,7 +116,7 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
@@ -156,7 +149,7 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze)
+	-apple | -axis | -knuth | -cray | -microblaze*)
 		os=
 		basic_machine=$1
 		;;
@@ -259,10 +252,12 @@ case $basic_machine in
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
 	| bfin \
-	| c4x | clipper \
+	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
 	| epiphany \
 	| fido | fr30 | frv \
@@ -273,7 +268,7 @@ case $basic_machine in
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep | metag \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -291,16 +286,17 @@ case $basic_machine in
 	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| moxie \
 	| mt \
 	| msp430 \
 	| nds32 | nds32le | nds32be \
-	| nios | nios2 \
+	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
 	| open8 \
-	| or32 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
@@ -370,13 +366,13 @@ case $basic_machine in
 	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| clipper-* | craynv-* | cydra-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -389,7 +385,8 @@ case $basic_machine in
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
@@ -407,12 +404,13 @@ case $basic_machine in
 	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
 	| mipstx39-* | mipstx39el-* \
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
 	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
 	| orion-* \
@@ -788,11 +786,15 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-	microblaze)
+	microblaze*)
 		basic_machine=microblaze-xilinx
 		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
-		basic_machine=i386-pc
+		basic_machine=i686-pc
 		os=-mingw32
 		;;
 	mingw32ce)
@@ -828,7 +830,7 @@ case $basic_machine in
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
-		basic_machine=i386-pc
+		basic_machine=i686-pc
 		os=-msys
 		;;
 	mvs)
@@ -1019,7 +1021,11 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
-	rdos)
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
 		basic_machine=i386-pc
 		os=-rdos
 		;;
@@ -1346,21 +1352,21 @@ case $os in
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
 	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-uclibc* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1492,9 +1498,6 @@ case $os in
 	-aros*)
 		os=-aros
 		;;
-	-kaos*)
-		os=-kaos
-		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
@@ -1543,6 +1546,9 @@ case $basic_machine in
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
+	c8051-*)
+		os=-elf
+		;;
 	hexagon-*)
 		os=-elf
 		;;
@@ -1586,6 +1592,9 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
diff --git a/configure b/configure
index d2117b7..0105c93 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for smuxi 0.8.11.
+# Generated by GNU Autoconf 2.69 for smuxi 0.9.
 #
-# Report bugs to <http://www.smuxi.org/issues/new>.
+# Report bugs to <https://smuxi.im/issues/new>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -275,7 +275,7 @@ fi
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
     $as_echo "$0: Please tell bug-autoconf at gnu.org and
-$0: http://www.smuxi.org/issues/new about your system,
+$0: https://smuxi.im/issues/new about your system,
 $0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
@@ -590,9 +590,9 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='smuxi'
 PACKAGE_TARNAME='smuxi'
-PACKAGE_VERSION='0.8.11'
-PACKAGE_STRING='smuxi 0.8.11'
-PACKAGE_BUGREPORT='http://www.smuxi.org/issues/new'
+PACKAGE_VERSION='0.9'
+PACKAGE_STRING='smuxi 0.9'
+PACKAGE_BUGREPORT='https://smuxi.im/issues/new'
 PACKAGE_URL=''
 
 # Factoring default headers for most tests.
@@ -665,6 +665,8 @@ GTK_SHARP_20_CFLAGS
 GLIB_SHARP_20_LIBS
 GLIB_SHARP_20_CFLAGS
 SERVER_COMPILER_FLAGS
+ENABLE_ENGINE_JABBR_FALSE
+ENABLE_ENGINE_JABBR_TRUE
 twitter_api_key
 ENABLE_ENGINE_TWITTER_FALSE
 ENABLE_ENGINE_TWITTER_TRUE
@@ -674,7 +676,6 @@ ENABLE_ENGINE_CAMPFIRE_FALSE
 ENABLE_ENGINE_CAMPFIRE_TRUE
 ENABLE_ENGINE_IRC_FALSE
 ENABLE_ENGINE_IRC_TRUE
-SMARTIRC4NET_FILES
 GTKSPELL_LIBS
 GTKSPELL_CFLAGS
 NDESK_DBUS_GLIB_LIBS
@@ -752,6 +753,7 @@ GETTEXT_PACKAGE_FRONTEND_GNOME_IRC
 GETTEXT_PACKAGE_FRONTEND_GNOME
 GETTEXT_PACKAGE_FRONTEND
 GETTEXT_PACKAGE_SERVER
+GETTEXT_PACKAGE_ENGINE_JABBR
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE
 GETTEXT_PACKAGE_ENGINE_TWITTER
 GETTEXT_PACKAGE_ENGINE_XMPP
@@ -791,7 +793,6 @@ INTLTOOL_V_MERGE_OPTIONS
 INTLTOOL__v_MERGE_0
 INTLTOOL__v_MERGE_
 INTLTOOL_V_MERGE
-AM_DEFAULT_VERBOSITY
 INTLTOOL_EXTRACT
 INTLTOOL_MERGE
 INTLTOOL_UPDATE
@@ -847,6 +848,10 @@ PKG_CONFIG
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -911,6 +916,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 enable_maintainer_mode
 enable_static
 enable_shared
@@ -938,6 +944,7 @@ enable_engine_campfire
 enable_engine_xmpp
 enable_engine_twitter
 with_twitter_api_key
+enable_engine_jabbr
 enable_frontend_gnome
 enable_frontend_stfl
 enable_frontend_curses
@@ -993,8 +1000,7 @@ GLADE_SHARP_20_CFLAGS
 GLADE_SHARP_20_LIBS
 STFL_CFLAGS
 STFL_LIBS'
-ac_subdirs_all='lib/messagingmenu-sharp
-lib/SmartIrc4net'
+ac_subdirs_all='lib/messagingmenu-sharp'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1534,7 +1540,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures smuxi 0.8.11 to adapt to many kinds of systems.
+\`configure' configures smuxi 0.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1604,7 +1610,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of smuxi 0.8.11:";;
+     short | recursive ) echo "Configuration of smuxi 0.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1612,14 +1618,19 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
   --enable-static[=PKGS]  build static libraries [default=no]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
@@ -1630,6 +1641,7 @@ Optional Features:
                           Enable Campfire protocol support (default yes)
   --enable-engine-xmpp    Enable XMPP (Jabber) protocol support (default yes)
   --enable-engine-twitter Enable Twitter support (default yes)
+  --enable-engine-jabbr   Enable JabbR support (default yes)
   --enable-frontend-gnome Enable GNOME frontend (default yes)
   --enable-frontend-stfl  Enable STFL frontend (default no)
   --enable-frontend-curses
@@ -1647,7 +1659,7 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-sysroot=DIR Search for dependent libraries within DIR
                         (or the compiler's sysroot if not specified).
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
@@ -1751,7 +1763,7 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <http://www.smuxi.org/issues/new>.
+Report bugs to <https://smuxi.im/issues/new>.
 _ACEOF
 ac_status=$?
 fi
@@ -1814,7 +1826,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-smuxi configure 0.8.11
+smuxi configure 0.9
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2092,7 +2104,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by smuxi $as_me 0.8.11, which was
+It was created by smuxi $as_me 0.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2443,7 +2455,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 # using the --foreign option makes automake less strict about GNU policy
 
-am__api_version='1.11'
+am__api_version='1.13'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2569,9 +2581,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -2582,32 +2591,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$2" = conftest.file
    )
 then
@@ -2619,6 +2636,16 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -2641,12 +2668,12 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
 if test x"${install_sh}" != xset; then
@@ -2658,10 +2685,10 @@ if test x"${install_sh}" != xset; then
   esac
 fi
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
 if test "$cross_compiling" != no; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -2800,12 +2827,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -2888,6 +2909,45 @@ else
 fi
 rmdir .tst 2>/dev/null
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -2910,7 +2970,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='smuxi'
- VERSION='0.8.11'
+ VERSION='0.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2938,6 +2998,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
@@ -2945,86 +3011,125 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 AMTAR='$${TAR-tar}'
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
-$as_echo_n "checking how to create a ustar tar archive... " >&6; }
-# Loop over all known methods to create a tar archive until one works.
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar plaintar pax cpio none'
-_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      { echo "$as_me:$LINENO: $_am_tar --version" >&5
+
+# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
+$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
+      if test $am_uid -le $am_max_uid; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         _am_tools=none
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
+$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
+      if test $am_gid -le $am_max_gid; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        _am_tools=none
+      fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
+$as_echo_n "checking how to create a ustar tar archive... " >&6; }
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        { echo "$as_me:$LINENO: $_am_tar --version" >&5
    ($_am_tar --version) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } && break
-    done
-    am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x ustar -w "$$tardir"'
-    am__tar_='pax -L -x ustar -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
-    am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
-    am__untar='cpio -i -H ustar -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
+      done
+      am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x ustar -w "$$tardir"'
+      am__tar_='pax -L -x ustar -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
+      am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
+      am__untar='cpio -i -H ustar -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_ustar}" && break
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_ustar}" && break
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
    (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
    ($am__untar <conftest.tar) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); }
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
+      { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+   (cat conftest.dir/file) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
+  rm -rf conftest.dir
 
-if ${am_cv_prog_tar_ustar+:} false; then :
+  if ${am_cv_prog_tar_ustar+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   am_cv_prog_tar_ustar=$_am_tool
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
 $as_echo "$am_cv_prog_tar_ustar" >&6; }
 
 
@@ -3032,6 +3137,7 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; }
 
 
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
@@ -3317,7 +3423,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
 case `$am_make -s -f confmf 2> /dev/null` in #(
 *the\ am__doit\ target*)
   am__include=include
@@ -4161,8 +4267,8 @@ else
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
   rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
@@ -4197,16 +4303,16 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -4215,8 +4321,8 @@ else
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
 	continue
       else
@@ -4224,7 +4330,7 @@ else
       fi
       ;;
     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+      # This compiler won't grok '-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
       am__obj=conftest.${OBJEXT-o}
@@ -12263,6 +12369,7 @@ POSUB="
 	po-Engine-Campfire
 	po-Engine-IRC
 	po-Engine-XMPP
+	po-Engine-JabbR
 	po-Server
 	po-Frontend
 	po-Frontend-GNOME
@@ -12314,6 +12421,14 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+GETTEXT_PACKAGE_ENGINE_TWITTER=smuxi-engine-jabbr
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE_ENGINE_JABBR "$GETTEXT_PACKAGE_ENGINE_JABBR"
+_ACEOF
+
+
 GETTEXT_PACKAGE_SERVER=smuxi-server
 
 
@@ -12396,15 +12511,14 @@ _ACEOF
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
 
 # Find out how to test for executable files. Don't use a zero-byte file,
@@ -12519,15 +12633,14 @@ fi
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
 
 # Find out how to test for executable files. Don't use a zero-byte file,
@@ -12597,15 +12710,14 @@ fi
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
 
 # Find out how to test for executable files. Don't use a zero-byte file,
@@ -12689,6 +12801,7 @@ fi
   prefix="$acl_save_prefix"
 
 
+
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
@@ -12699,21 +12812,21 @@ fi
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -12723,11 +12836,11 @@ $as_echo_n "checking for ld used by GCC... " >&6; }
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [\\/]* | [A-Za-z]:[\\/]*)
+    [\\/]* | ?:[\\/]*)
       re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
@@ -12752,23 +12865,26 @@ if ${acl_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       acl_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-        test "$with_gnu_ld" != no && break ;;
+        test "$with_gnu_ld" != no && break
+        ;;
       *)
-        test "$with_gnu_ld" != yes && break ;;
+        test "$with_gnu_ld" != yes && break
+        ;;
       esac
     fi
   done
-  IFS="$ac_save_ifs"
+  IFS="$acl_save_ifs"
 else
   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 fi
@@ -12788,12 +12904,14 @@ $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
 if ${acl_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
+  acl_cv_prog_gnu_ld=yes
+  ;;
 *)
-  acl_cv_prog_gnu_ld=no ;;
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
@@ -12976,7 +13094,7 @@ fi
       done
       if test -z "$already_handled"; then
         names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -13505,15 +13623,19 @@ if eval \${$gt_func_gnugettext_libc+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
 extern int *_nl_domain_bindings;
+
 int
 main ()
 {
+
 bindtextdomain ("", "");
 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+
   ;
   return 0;
 }
@@ -13571,14 +13693,16 @@ else
     am_cv_lib_iconv=no
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <stdlib.h>
 #include <iconv.h>
+
 int
 main ()
 {
 iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);
   ;
   return 0;
 }
@@ -13593,14 +13717,16 @@ rm -f core conftest.err conftest.$ac_objext \
       LIBS="$LIBS $LIBICONV"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <stdlib.h>
 #include <iconv.h>
+
 int
 main ()
 {
 iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);
   ;
   return 0;
 }
@@ -13624,15 +13750,17 @@ if ${am_cv_func_iconv_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-            am_save_LIBS="$LIBS"
+                  am_save_LIBS="$LIBS"
       if test $am_cv_lib_iconv = yes; then
         LIBS="$LIBS $LIBICONV"
       fi
       if test "$cross_compiling" = yes; then :
-  case "$host_os" in
+
+         case "$host_os" in
            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
            *)            am_cv_func_iconv_works="guessing yes" ;;
          esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -13641,6 +13769,7 @@ else
 #include <string.h>
 int main ()
 {
+  int result = 0;
   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
      returns.  */
   {
@@ -13657,7 +13786,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
       }
   }
   /* Test against Solaris 10 bug: Failures are not distinguishable from
@@ -13676,7 +13806,27 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if (res == 0)
-          return 1;
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        const char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #if 0 /* This bug could be worked around by the caller.  */
@@ -13695,7 +13845,8 @@ int main ()
                             (char **) &inptr, &inbytesleft,
                             &outptr, &outbytesleft);
         if ((int)res > 0)
-          return 1;
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
       }
   }
 #endif
@@ -13709,8 +13860,8 @@ int main ()
       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
       /* Try HP-UX names.  */
       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    return 1;
-  return 0;
+    result |= 16;
+  return result;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
@@ -13827,7 +13978,7 @@ fi
       done
       if test -z "$already_handled"; then
         names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -14225,6 +14376,7 @@ else
             LIBS="$LIBS $LIBINTL"
                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
@@ -14233,11 +14385,14 @@ extern
 "C"
 #endif
 const char *_nl_expand_alias (const char *);
+
 int
 main ()
 {
+
 bindtextdomain ("", "");
 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
   ;
   return 0;
 }
@@ -14253,6 +14408,7 @@ rm -f core conftest.err conftest.$ac_objext \
               LIBS="$LIBS $LIBICONV"
               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
 #include <libintl.h>
 $gt_revision_test_code
 extern int _nl_msg_cat_cntr;
@@ -14261,19 +14417,22 @@ extern
 "C"
 #endif
 const char *_nl_expand_alias (const char *);
+
 int
 main ()
 {
+
 bindtextdomain ("", "");
 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   LIBINTL="$LIBINTL $LIBICONV"
-                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                eval "$gt_func_gnugettext_libintl=yes"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
@@ -15377,8 +15536,8 @@ fi
 WITH_MESSAGINGMENU=$with_messagingmenu
 if test "x$WITH_MESSAGINGMENU" = "xauto"; then
 	if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp-0.1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp-0.1") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
@@ -15416,12 +15575,12 @@ if test -n "$MESSAGINGMENU_SHARP_CFLAGS"; then
     pkg_cv_MESSAGINGMENU_SHARP_CFLAGS="$MESSAGINGMENU_SHARP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp-0.1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp-0.1") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_MESSAGINGMENU_SHARP_CFLAGS=`$PKG_CONFIG --cflags "messagingmenu-sharp-0.1" 2>/dev/null`
+  pkg_cv_MESSAGINGMENU_SHARP_CFLAGS=`$PKG_CONFIG --cflags "messagingmenu-sharp" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -15433,12 +15592,12 @@ if test -n "$MESSAGINGMENU_SHARP_LIBS"; then
     pkg_cv_MESSAGINGMENU_SHARP_LIBS="$MESSAGINGMENU_SHARP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp-0.1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp-0.1") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"messagingmenu-sharp\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "messagingmenu-sharp") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_MESSAGINGMENU_SHARP_LIBS=`$PKG_CONFIG --libs "messagingmenu-sharp-0.1" 2>/dev/null`
+  pkg_cv_MESSAGINGMENU_SHARP_LIBS=`$PKG_CONFIG --libs "messagingmenu-sharp" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -15459,14 +15618,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        MESSAGINGMENU_SHARP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "messagingmenu-sharp-0.1" 2>&1`
+	        MESSAGINGMENU_SHARP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "messagingmenu-sharp" 2>&1`
         else
-	        MESSAGINGMENU_SHARP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "messagingmenu-sharp-0.1" 2>&1`
+	        MESSAGINGMENU_SHARP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "messagingmenu-sharp" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$MESSAGINGMENU_SHARP_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (messagingmenu-sharp-0.1) were not met:
+	as_fn_error $? "Package requirements (messagingmenu-sharp) were not met:
 
 $MESSAGINGMENU_SHARP_PKG_ERRORS
 
@@ -16486,13 +16645,75 @@ else
 fi
 
 if test "x$ENABLE_ENGINE_IRC" != "xno"; then
-	if test ! -f "$srcdir/lib/SmartIrc4net/configure.ac"; then
+	# Extract the first word of "xbuild", so it can be a program name with args.
+set dummy xbuild; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XBUILD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XBUILD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XBUILD="$XBUILD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_XBUILD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_XBUILD" && ac_cv_path_XBUILD="no"
+  ;;
+esac
+fi
+XBUILD=$ac_cv_path_XBUILD
+if test -n "$XBUILD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XBUILD" >&5
+$as_echo "$XBUILD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	if test "x$XBUILD" = "xno"; then
+		as_fn_error $? "You need to install xbuild for irc support" "$LINENO" 5
+	fi
+
+	if test ! -f "$srcdir/lib/SmartIrc4net/SmartIrc4net.csproj"; then
 		as_fn_error $? "lib/SmartIrc4net is empty!" "$LINENO" 5
 	fi
-	ac_configure_args="$ac_configure_args --disable-pkg-config --disable-pkg-lib --disable-pkg-gac"
-	subdirs="$subdirs lib/SmartIrc4net"
 
-	SMARTIRC4NET_FILES="lib/SmartIrc4net/bin/Meebey.SmartIrc4net.dll"
+
+	for asm in $(echo "2.0,System
+		Mono.Posix
+	" | cut -d, -f2- | sed 's/\,/ /g')
+	do
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono 2.0 GAC for $asm.dll" >&5
+$as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; }
+		if test \
+			-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
+			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
+			then \
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+			as_fn_error $? "missing reqired Mono 2.0 assembly: $asm.dll" "$LINENO" 5
+		fi
+	done
+
 
 fi
  if test "x$ENABLE_ENGINE_IRC" = "xyes"; then
@@ -16575,13 +16796,14 @@ fi
 		as_fn_error $? "You need to install xbuild for XMPP support" "$LINENO" 5
 	fi
 
-	if test ! -f "$srcdir/lib/jabber-net/2005-jabber-net.csproj"; then
-		as_fn_error $? "lib/jabber-net is empty!" "$LINENO" 5
+	if test ! -f "$srcdir/lib/agsxmpp/agsxmpp/agsxmpp.csproj"; then
+		as_fn_error $? "lib/agsxmpp is empty!" "$LINENO" 5
 	fi
 
 
 	for asm in $(echo "2.0,System
-		System.Drawing
+		System.Core
+		Mono.Posix
 		System.Xml
 	" | cut -d, -f2- | sed 's/\,/ /g')
 	do
@@ -16611,6 +16833,10 @@ else
 fi
 
 
+if test ! -f "$srcdir/lib/StarkSoftProxy/StarkSoftProxy.csproj"; then
+	as_fn_error $? "lib/StarkSoftProxy is empty!" "$LINENO" 5
+fi
+
 # Check whether --enable-engine-twitter was given.
 if test "${enable_engine_twitter+set}" = set; then :
   enableval=$enable_engine_twitter; ENABLE_ENGINE_TWITTER=$enableval
@@ -16762,6 +16988,182 @@ fi
 twitter_api_key=$with_twitter_api_key
 
 
+# Check whether --enable-engine-jabbr was given.
+if test "${enable_engine_jabbr+set}" = set; then :
+  enableval=$enable_engine_jabbr; ENABLE_ENGINE_JABBR=$enableval
+else
+  ENABLE_ENGINE_JABBR=yes
+
+fi
+
+if test "x$ENABLE_ENGINE_JABBR" != "xno"; then
+	# Extract the first word of "xbuild", so it can be a program name with args.
+set dummy xbuild; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XBUILD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XBUILD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XBUILD="$XBUILD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_XBUILD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_XBUILD" && ac_cv_path_XBUILD="no"
+  ;;
+esac
+fi
+XBUILD=$ac_cv_path_XBUILD
+if test -n "$XBUILD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XBUILD" >&5
+$as_echo "$XBUILD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	if test "x$XBUILD" = "xno"; then
+		as_fn_error $? "You need to install xbuild for JabbR support" "$LINENO" 5
+	fi
+
+	# compiling Json.NET with the C# compiler of Mono 2.4 will result in
+	# a endless loop with eating all memory :/
+	# SignalR.Client requires System.Threading.Tasks which is part of .NET 4.0
+	# thus Mono 2.10 with dmcs is required!
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono >= 2.10" >&5
+$as_echo_n "checking for Mono >= 2.10... " >&6; }
+	if $PKG_CONFIG 'mono >= 2.10'; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		as_fn_error $? "You need Mono 2.10 or later for JabbR support (or use --disable-engine-jabbr)" "$LINENO" 5
+	fi
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 4.0 compiler" >&5
+$as_echo_n "checking for 4.0 compiler... " >&6; }
+	if test "x$CLI_RUNTIME" = "x2.0"; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		as_fn_error $? "You need to compile with a 4.0 compiler (dmcs) for JabbR support (or use --disable-engine-jabbr)" "$LINENO" 5
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	fi
+
+	if test ! -f "$srcdir/lib/Newtonsoft.Json/Src/Newtonsoft.Json/Newtonsoft.Json.csproj"; then
+		as_fn_error $? "lib/Newtonsoft.Json is empty!" "$LINENO" 5
+	fi
+
+
+	for asm in $(echo "2.0,System
+		System.Core
+		System.Data
+		System.Runtime.Serialization
+		System.Web
+		System.Xml
+		System.Xml.Linq
+	" | cut -d, -f2- | sed 's/\,/ /g')
+	do
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono 2.0 GAC for $asm.dll" >&5
+$as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; }
+		if test \
+			-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
+			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
+			then \
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+			as_fn_error $? "missing reqired Mono 2.0 assembly: $asm.dll" "$LINENO" 5
+		fi
+	done
+
+
+
+	if test ! -f "$srcdir/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Microsoft.AspNet.SignalR.Client.csproj"; then
+		as_fn_error $? "lib/SignalR is empty!" "$LINENO" 5
+	fi
+
+
+	for asm in $(echo "2.0,System
+		System.Core
+	" | cut -d, -f2- | sed 's/\,/ /g')
+	do
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono 2.0 GAC for $asm.dll" >&5
+$as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; }
+		if test \
+			-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
+			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
+			then \
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+			as_fn_error $? "missing reqired Mono 2.0 assembly: $asm.dll" "$LINENO" 5
+		fi
+	done
+
+
+
+	if test ! -f "$srcdir/lib/JabbR/JabbR.Client/JabbR.Client.csproj"; then
+		as_fn_error $? "lib/JabbR is empty!" "$LINENO" 5
+	fi
+
+
+	for asm in $(echo "2.0,System
+		System.Core
+		System.Data
+		System.Data.DataSetExtensions
+		System.Xml
+		System.Xml.Linq
+	" | cut -d, -f2- | sed 's/\,/ /g')
+	do
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono 2.0 GAC for $asm.dll" >&5
+$as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; }
+		if test \
+			-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
+			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
+			then \
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+			as_fn_error $? "missing reqired Mono 2.0 assembly: $asm.dll" "$LINENO" 5
+		fi
+	done
+
+
+fi
+ if test "x$ENABLE_ENGINE_JABBR" = "xyes"; then
+  ENABLE_ENGINE_JABBR_TRUE=
+  ENABLE_ENGINE_JABBR_FALSE='#'
+else
+  ENABLE_ENGINE_JABBR_TRUE='#'
+  ENABLE_ENGINE_JABBR_FALSE=
+fi
+
+
 # Server
 if $PKG_CONFIG 'mono >= 2.6'; then
 	SERVER_COMPILER_FLAGS+=" -platform:x86"
@@ -17353,7 +17755,7 @@ else
 fi
 
 
-ac_config_files="$ac_config_files Makefile src/Makefile src/AssemblyVersion.cs src/smuxi-win32.nsis src/Common/Makefile src/Common/Defines.cs src/Common/smuxi-common.pc src/Engine/Makefile src/Engine/smuxi-engine.pc src/Engine-IRC/Makefile src/Engine-IRC/smuxi-engine-irc.pc src/Engine-Twitter/Makefile src/Engine-XMPP/Makefile src/Engine-XMPP/smuxi-engine-xmpp.pc src/Engine-Campfire/Makefile src/Server/Makefile src/Server/smuxi-server src/Frontend/Makefile src/Frontend/smuxi-frontend.pc s [...]
+ac_config_files="$ac_config_files Makefile src/Makefile src/AssemblyVersion.cs src/smuxi-win32.nsis src/Common/Makefile src/Common/Defines.cs src/Common/smuxi-common.pc src/Engine/Makefile src/Engine/smuxi-engine.pc src/Engine-IRC/Makefile src/Engine-IRC/smuxi-engine-irc.pc src/Engine-JabbR/Makefile src/Engine-JabbR/smuxi-engine-jabbr.pc src/Engine-Twitter/Makefile src/Engine-XMPP/Makefile src/Engine-XMPP/smuxi-engine-xmpp.pc src/Engine-Campfire/Makefile src/Server/Makefile src/Server/sm [...]
 
 
 cat >confcache <<\_ACEOF
@@ -17501,6 +17903,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
  if test -n "$EXEEXT"; then
   am__EXEEXT_TRUE=
   am__EXEEXT_FALSE='#'
@@ -17573,6 +17983,10 @@ if test -z "${ENABLE_ENGINE_TWITTER_TRUE}" && test -z "${ENABLE_ENGINE_TWITTER_F
   as_fn_error $? "conditional \"ENABLE_ENGINE_TWITTER\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_ENGINE_JABBR_TRUE}" && test -z "${ENABLE_ENGINE_JABBR_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_ENGINE_JABBR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_FRONTEND_GNOME_TRUE}" && test -z "${ENABLE_FRONTEND_GNOME_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_FRONTEND_GNOME\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -18006,7 +18420,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by smuxi $as_me 0.8.11, which was
+This file was extended by smuxi $as_me 0.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18057,13 +18471,13 @@ $config_files
 Configuration commands:
 $config_commands
 
-Report bugs to <http://www.smuxi.org/issues/new>."
+Report bugs to <https://smuxi.im/issues/new>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-smuxi config.status 0.8.11
+smuxi config.status 0.9
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -18479,6 +18893,8 @@ do
     "src/Engine/smuxi-engine.pc") CONFIG_FILES="$CONFIG_FILES src/Engine/smuxi-engine.pc" ;;
     "src/Engine-IRC/Makefile") CONFIG_FILES="$CONFIG_FILES src/Engine-IRC/Makefile" ;;
     "src/Engine-IRC/smuxi-engine-irc.pc") CONFIG_FILES="$CONFIG_FILES src/Engine-IRC/smuxi-engine-irc.pc" ;;
+    "src/Engine-JabbR/Makefile") CONFIG_FILES="$CONFIG_FILES src/Engine-JabbR/Makefile" ;;
+    "src/Engine-JabbR/smuxi-engine-jabbr.pc") CONFIG_FILES="$CONFIG_FILES src/Engine-JabbR/smuxi-engine-jabbr.pc" ;;
     "src/Engine-Twitter/Makefile") CONFIG_FILES="$CONFIG_FILES src/Engine-Twitter/Makefile" ;;
     "src/Engine-XMPP/Makefile") CONFIG_FILES="$CONFIG_FILES src/Engine-XMPP/Makefile" ;;
     "src/Engine-XMPP/smuxi-engine-xmpp.pc") CONFIG_FILES="$CONFIG_FILES src/Engine-XMPP/smuxi-engine-xmpp.pc" ;;
@@ -18511,6 +18927,7 @@ do
     "po-Frontend/Makefile.in") CONFIG_FILES="$CONFIG_FILES po-Frontend/Makefile.in" ;;
     "po-Frontend-GNOME/Makefile.in") CONFIG_FILES="$CONFIG_FILES po-Frontend-GNOME/Makefile.in" ;;
     "po-Frontend-GNOME-IRC/Makefile.in") CONFIG_FILES="$CONFIG_FILES po-Frontend-GNOME-IRC/Makefile.in" ;;
+    "po-Frontend-GNOME-XMPP/Makefile.in") CONFIG_FILES="$CONFIG_FILES po-Frontend-GNOME-XMPP/Makefile.in" ;;
     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
@@ -18942,7 +19359,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   case $ac_file$ac_mode in
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -18955,7 +19372,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # Strip MF so we end up with the name of the file.
     mf=`echo "$mf" | sed -e 's/:.*$//'`
     # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named `Makefile.in', but
+    # We used to match only the files named 'Makefile.in', but
     # some people rename them; so instead we look at the file content.
     # Grep'ing the first line is not enough: some people post-process
     # each Makefile.in and add a new line on top of each file to say so.
@@ -18989,21 +19406,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # from the Makefile without running 'make'.
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
     # simplest approach to changing $(DEPDIR) to its actual value in the
     # expansion.
     for file in `sed -n "
       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -19676,7 +20091,7 @@ fi
       case "$ac_file" in */Makefile.in)
         # Adjust a relative srcdir.
         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
         # In autoconf-2.13 it is called $ac_given_srcdir.
         # In autoconf-2.50 it is called $srcdir.
@@ -19692,7 +20107,8 @@ fi
         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
           rm -f "$ac_dir/POTFILES"
           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
           POMAKEFILEDEPS="POTFILES.in"
           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
           # on $ac_dir but don't depend on user-specified configuration
@@ -19703,12 +20119,12 @@ fi
               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
             fi
             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
           else
             # The set of available languages was given in configure.in.
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            # Hide the ALL_LINGUAS assignment from automake < 1.5.
             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
           fi
           # Compute POFILES
@@ -20002,6 +20418,7 @@ fi
 	  XMPP:                $ENABLE_ENGINE_XMPP
 	  Twitter:             $ENABLE_ENGINE_TWITTER
 	  Campfire:            $ENABLE_ENGINE_CAMPFIRE
+	  JabbR:               $ENABLE_ENGINE_JABBR
 
 	* Frontends
 	  ---------
@@ -20033,6 +20450,7 @@ $as_echo "
 	  XMPP:                $ENABLE_ENGINE_XMPP
 	  Twitter:             $ENABLE_ENGINE_TWITTER
 	  Campfire:            $ENABLE_ENGINE_CAMPFIRE
+	  JabbR:               $ENABLE_ENGINE_JABBR
 
 	* Frontends
 	  ---------
diff --git a/configure.ac b/configure.ac
index 73a270d..f40e107 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.54])
-AC_INIT([smuxi], [0.8.11], [http://www.smuxi.org/issues/new])
+AC_INIT([smuxi], [0.9], [https://smuxi.im/issues/new])
 # using the --foreign option makes automake less strict about GNU policy 
 AC_CONFIG_MACRO_DIR([.])
 AM_INIT_AUTOMAKE([foreign tar-ustar])
@@ -25,6 +25,7 @@ POSUB="
 	po-Engine-Campfire
 	po-Engine-IRC
 	po-Engine-XMPP
+	po-Engine-JabbR
 	po-Server
 	po-Frontend
 	po-Frontend-GNOME
@@ -56,6 +57,10 @@ GETTEXT_PACKAGE_ENGINE_CAMPFIRE=smuxi-engine-campfire
 AC_SUBST(GETTEXT_PACKAGE_ENGINE_CAMPFIRE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE_ENGINE_CAMPFIRE, "$GETTEXT_PACKAGE_ENGINE_CAMPFIRE", [Gettext package])
 
+GETTEXT_PACKAGE_ENGINE_TWITTER=smuxi-engine-jabbr
+AC_SUBST(GETTEXT_PACKAGE_ENGINE_JABBR)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE_ENGINE_JABBR, "$GETTEXT_PACKAGE_ENGINE_JABBR", [Gettext package])
+
 GETTEXT_PACKAGE_SERVER=smuxi-server
 AC_SUBST(GETTEXT_PACKAGE_SERVER)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE_SERVER, "$GETTEXT_PACKAGE_SERVER", [Gettext package])
@@ -242,7 +247,7 @@ AC_ARG_WITH([messaging-menu],
 )
 WITH_MESSAGINGMENU=$with_messagingmenu
 if test "x$WITH_MESSAGINGMENU" = "xauto"; then
-	PKG_CHECK_EXISTS([messagingmenu-sharp-0.1], FOUND_MESSAGINGMENU_SHARP=yes, FOUND_MESSAGINGMENU_SHARP=no)
+	PKG_CHECK_EXISTS([messagingmenu-sharp], FOUND_MESSAGINGMENU_SHARP=yes, FOUND_MESSAGINGMENU_SHARP=no)
 	if test "x$FOUND_MESSAGINGMENU_SHARP" = "xyes"; then
 		WITH_MESSAGINGMENU=system
 	else
@@ -255,7 +260,7 @@ if test "x$WITH_MESSAGINGMENU" = "xauto"; then
 	fi
 fi
 if test "x$WITH_MESSAGINGMENU" = "xsystem"; then
-	PKG_CHECK_MODULES([MESSAGINGMENU_SHARP], [messagingmenu-sharp-0.1])
+	PKG_CHECK_MODULES([MESSAGINGMENU_SHARP], [messagingmenu-sharp])
 fi
 if test "x$WITH_MESSAGINGMENU" = "xincluded"; then
 	if test ! -f "$srcdir/lib/messagingmenu-sharp/configure.ac"; then
@@ -357,12 +362,18 @@ AC_ARG_ENABLE([engine-irc],
 	ENABLE_ENGINE_IRC=yes
 )
 if test "x$ENABLE_ENGINE_IRC" != "xno"; then
-	if test ! -f "$srcdir/lib/SmartIrc4net/configure.ac"; then
+	AC_PATH_PROG(XBUILD, xbuild, no)
+	if test "x$XBUILD" = "xno"; then
+		AC_MSG_ERROR([You need to install xbuild for irc support])
+	fi
+
+	if test ! -f "$srcdir/lib/SmartIrc4net/SmartIrc4net.csproj"; then
 		AC_MSG_ERROR([lib/SmartIrc4net is empty!])
 	fi
-	ac_configure_args="$ac_configure_args --disable-pkg-config --disable-pkg-lib --disable-pkg-gac"
-	AC_CONFIG_SUBDIRS([lib/SmartIrc4net])
-	AC_SUBST([SMARTIRC4NET_FILES], "lib/SmartIrc4net/bin/Meebey.SmartIrc4net.dll")
+	SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+		System
+		Mono.Posix
+	])
 fi
 AM_CONDITIONAL(ENABLE_ENGINE_IRC, test "x$ENABLE_ENGINE_IRC" = "xyes")
 
@@ -384,17 +395,22 @@ if test "x$ENABLE_ENGINE_XMPP" != "xno"; then
 		AC_MSG_ERROR([You need to install xbuild for XMPP support])
 	fi
 
-	if test ! -f "$srcdir/lib/jabber-net/2005-jabber-net.csproj"; then
-		AC_MSG_ERROR([lib/jabber-net is empty!])
+	if test ! -f "$srcdir/lib/agsxmpp/agsxmpp/agsxmpp.csproj"; then
+		AC_MSG_ERROR([lib/agsxmpp is empty!])
 	fi
 	SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
 		System
-		System.Drawing
+		System.Core
+		Mono.Posix
 		System.Xml
 	])
 fi
 AM_CONDITIONAL(ENABLE_ENGINE_XMPP, test "x$ENABLE_ENGINE_XMPP" = "xyes")
 
+if test ! -f "$srcdir/lib/StarkSoftProxy/StarkSoftProxy.csproj"; then
+	AC_MSG_ERROR([lib/StarkSoftProxy is empty!])
+fi
+
 AC_ARG_ENABLE([engine-twitter],
 	AC_HELP_STRING([--enable-engine-twitter], [Enable Twitter support (default yes)]),
 	ENABLE_ENGINE_TWITTER=$enableval,
@@ -452,6 +468,72 @@ AC_ARG_WITH([twitter-api-key],
 )
 AC_SUBST([twitter_api_key], $with_twitter_api_key)
 
+AC_ARG_ENABLE([engine-jabbr],
+	AC_HELP_STRING([--enable-engine-jabbr], [Enable JabbR support (default yes)]),
+	ENABLE_ENGINE_JABBR=$enableval,
+	ENABLE_ENGINE_JABBR=yes
+)
+if test "x$ENABLE_ENGINE_JABBR" != "xno"; then
+	AC_PATH_PROG(XBUILD, xbuild, no)
+	if test "x$XBUILD" = "xno"; then
+		AC_MSG_ERROR([You need to install xbuild for JabbR support])
+	fi
+
+	# compiling Json.NET with the C# compiler of Mono 2.4 will result in
+	# a endless loop with eating all memory :/
+	# SignalR.Client requires System.Threading.Tasks which is part of .NET 4.0
+	# thus Mono 2.10 with dmcs is required!
+	AC_MSG_CHECKING([for Mono >= 2.10])
+	if $PKG_CONFIG 'mono >= 2.10'; then
+		AC_MSG_RESULT(yes)
+	else
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR([You need Mono 2.10 or later for JabbR support (or use --disable-engine-jabbr)])
+	fi
+
+	AC_MSG_CHECKING([for 4.0 compiler])
+	if test "x$CLI_RUNTIME" = "x2.0"; then
+		AC_MSG_RESULT(no)
+		AC_MSG_ERROR([You need to compile with a 4.0 compiler (dmcs) for JabbR support (or use --disable-engine-jabbr)])
+	else
+		AC_MSG_RESULT(yes)
+	fi
+
+	if test ! -f "$srcdir/lib/Newtonsoft.Json/Src/Newtonsoft.Json/Newtonsoft.Json.csproj"; then
+		AC_MSG_ERROR([lib/Newtonsoft.Json is empty!])
+	fi
+	SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+		System
+		System.Core
+		System.Data
+		System.Runtime.Serialization
+		System.Web
+		System.Xml
+		System.Xml.Linq
+	])
+
+	if test ! -f "$srcdir/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Microsoft.AspNet.SignalR.Client.csproj"; then
+		AC_MSG_ERROR([lib/SignalR is empty!])
+	fi
+	SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+		System
+		System.Core
+	])
+
+	if test ! -f "$srcdir/lib/JabbR/JabbR.Client/JabbR.Client.csproj"; then
+		AC_MSG_ERROR([lib/JabbR is empty!])
+	fi
+	SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
+		System
+		System.Core
+		System.Data
+		System.Data.DataSetExtensions
+		System.Xml
+		System.Xml.Linq
+	])
+fi
+AM_CONDITIONAL(ENABLE_ENGINE_JABBR, test "x$ENABLE_ENGINE_JABBR" = "xyes")
+
 # Server
 if $PKG_CONFIG 'mono >= 2.6'; then
 	SERVER_COMPILER_FLAGS+=" -platform:x86"
@@ -573,6 +655,8 @@ AC_CONFIG_FILES([
 	src/Engine/smuxi-engine.pc
 	src/Engine-IRC/Makefile
 	src/Engine-IRC/smuxi-engine-irc.pc
+	src/Engine-JabbR/Makefile
+	src/Engine-JabbR/smuxi-engine-jabbr.pc
 	src/Engine-Twitter/Makefile
 	src/Engine-XMPP/Makefile
 	src/Engine-XMPP/smuxi-engine-xmpp.pc
@@ -605,6 +689,7 @@ AC_CONFIG_FILES([
 	po-Frontend/Makefile.in
 	po-Frontend-GNOME/Makefile.in
 	po-Frontend-GNOME-IRC/Makefile.in
+	po-Frontend-GNOME-XMPP/Makefile.in
 ])
 
 AC_OUTPUT
@@ -628,6 +713,7 @@ AC_MSG_RESULT([
 	  XMPP:                $ENABLE_ENGINE_XMPP
 	  Twitter:             $ENABLE_ENGINE_TWITTER
 	  Campfire:            $ENABLE_ENGINE_CAMPFIRE
+	  JabbR:               $ENABLE_ENGINE_JABBR
 
 	* Frontends
 	  ---------
diff --git a/glade/smuxi-frontend-gnome.glade b/glade/smuxi-frontend-gnome.glade
index e4e5740..ff07cb8 100644
--- a/glade/smuxi-frontend-gnome.glade
+++ b/glade/smuxi-frontend-gnome.glade
@@ -61,7 +61,7 @@
                             <child>
                               <widget class="GtkTable" id="table1">
                                 <property name="visible">True</property>
-                                <property name="n_rows">4</property>
+                                <property name="n_rows">5</property>
                                 <property name="n_columns">2</property>
                                 <property name="column_spacing">5</property>
                                 <property name="row_spacing">5</property>
@@ -225,6 +225,24 @@
                                     <property name="y_options">GTK_FILL</property>
                                   </packing>
                                 </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="AutoConvertUTF8CheckButton">
+                                    <property name="label" translatable="yes">Automatically convert UTF-8 characters</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="_OnChanged"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
                               </widget>
                             </child>
                           </widget>
diff --git a/install-sh b/install-sh
index a9244eb..377bb86 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
@@ -156,7 +156,7 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
-	# Protect names problematic for `test' and other utilities.
+	# Protect names problematic for 'test' and other utilities.
 	case $dst_arg in
 	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
 	esac
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
-    # Protect names problematic for `test' and other utilities.
+    # Protect names problematic for 'test' and other utilities.
     case $dst_arg in
       -* | [=\(\)!]) dst_arg=./$dst_arg;;
     esac
@@ -202,7 +202,7 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
@@ -240,7 +240,7 @@ fi
 
 for src
 do
-  # Protect names problematic for `test' and other utilities.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
     -* | [=\(\)!]) src=./$src;;
   esac
@@ -354,7 +354,7 @@ do
 	      if test -z "$dir_arg" || {
 		   # Check for POSIX incompatibilities with -m.
 		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
+		   # other-writable bit of parent directory when it shouldn't.
 		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
 		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
 		   case $ls_ld_tmpdir in
diff --git a/lib/JabbR/JabbR.Client/ClientEvents.cs b/lib/JabbR/JabbR.Client/ClientEvents.cs
new file mode 100644
index 0000000..5f20a76
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/ClientEvents.cs
@@ -0,0 +1,28 @@
+namespace JabbR.Client
+{
+    public static class ClientEvents
+    {
+        public static readonly string AddMessage = "addMessage";
+        public static readonly string AddMessageContent = "addMessageContent";
+        public static readonly string AddUser = "addUser";
+        public static readonly string Leave = "leave";
+        public static readonly string LogOn = "logOn";
+        public static readonly string LogOut = "logOut";
+        public static readonly string Kick = "kick";
+        public static readonly string UpdateRoomCount = "updateRoomCount";
+        public static readonly string UpdateActivity = "updateActivity";
+        public static readonly string MarkInactive = "markInactive";
+        public static readonly string SendPrivateMessage = "sendPrivateMessage";
+        public static readonly string SetTyping = "setTyping";
+        public static readonly string JoinRoom = "joinRoom";
+        public static readonly string RoomCreated = "roomCreated";
+        public static readonly string GravatarChanged = "changeGravatar";
+        public static readonly string MeMessageReceived = "sendMeMessage";
+        public static readonly string UsernameChanged = "changeUserName";
+        public static readonly string NoteChanged = "changeNote";
+        public static readonly string FlagChanged = "changeFlag";
+        public static readonly string TopicChanged = "changeTopic";
+        public static readonly string OwnerAdded = "addOwner";
+        public static readonly string OwnerRemoved = "removeOwner";
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/DefaultAuthenticationProvider.cs b/lib/JabbR/JabbR.Client/DefaultAuthenticationProvider.cs
new file mode 100644
index 0000000..7718c58
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/DefaultAuthenticationProvider.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Net;
+using System.Security;
+using System.Text;
+using System.Threading.Tasks;
+
+using Microsoft.AspNet.SignalR.Client.Hubs;
+
+namespace JabbR.Client
+{
+    public class DefaultAuthenticationProvider : IAuthenticationProvider
+    {
+        private readonly string _url;
+
+        public DefaultAuthenticationProvider(string url)
+        {
+            _url = url;
+        }
+
+        public Task<HubConnection> Connect(string userName, string password)
+        {
+            var content = String.Format("username={0}&password={1}", Uri.EscapeUriString(userName), Uri.EscapeUriString(password));
+            var contentBytes = Encoding.ASCII.GetBytes(content);
+
+            var authUri = new UriBuilder(_url)
+            {
+                Path = "account/login"
+            };
+
+            var cookieJar = new CookieContainer();
+            var request = (HttpWebRequest)WebRequest.Create(authUri.Uri);
+            request.CookieContainer = cookieJar;
+            request.Method = "POST";
+            request.ContentType = "application/x-www-form-urlencoded";
+            request.ContentLength = contentBytes.Length;
+
+            return request.GetHttpRequestStreamAsync()
+                .Then(stream => stream.WriteAsync(contentBytes).Then(() => stream.Dispose()))
+                .Then(() => request.GetHttpResponseAsync())
+                .Then(response => {
+                    var respStatusCode = response.StatusCode;
+                    
+                    if (respStatusCode < HttpStatusCode.OK || respStatusCode > (HttpStatusCode)299)
+                    {
+                        throw new WebException(String.Format("Response status code does not indicate success: {0}", respStatusCode));
+                    }
+                    
+                    // Verify the cookie
+                    var cookie = cookieJar.GetCookies(new Uri(_url));
+                    if (cookie == null || cookie["jabbr.id"] == null)
+                    {
+                        throw new SecurityException("Didn't get a cookie from JabbR! Ensure your User Name/Password are correct");
+                    }
+                    
+                    // Create a hub connection and give it our cookie jar
+                    var connection = new HubConnection(_url)
+                    {
+                        CookieContainer = cookieJar
+                    };
+                    
+                    return connection;
+            });
+        }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/HttpHelper.cs b/lib/JabbR/JabbR.Client/HttpHelper.cs
new file mode 100644
index 0000000..a055ca8
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/HttpHelper.cs
@@ -0,0 +1,108 @@
+// <copyright file="HttpHelper.cs" company="Microsoft Open Technologies, Inc.">
+// Copyright 2011-2013 Microsoft Open Technologies, Inc. All rights reserved.
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// </copyright>
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JabbR.Client
+{
+    internal static class HttpHelper
+    {
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<HttpWebResponse> GetHttpResponseAsync(this HttpWebRequest request)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<HttpWebResponse>(request.BeginGetResponse, ar => (HttpWebResponse)request.EndGetResponse(ar), null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<HttpWebResponse>(ex);
+            }
+        }
+        
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<Stream> GetHttpRequestStreamAsync(this HttpWebRequest request)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<Stream>(request.BeginGetRequestStream, request.EndGetRequestStream, null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<Stream>(ex);
+            }
+        }
+        
+        public static Task<HttpWebResponse> GetAsync(string url, Action<HttpWebRequest> requestPreparer)
+        {
+            HttpWebRequest request = CreateWebRequest(url);
+            if (requestPreparer != null)
+            {
+                requestPreparer(request);
+            }
+            return request.GetHttpResponseAsync();
+        }
+        
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Callers check for null return.")]
+        public static string ReadAsString(this HttpWebResponse response)
+        {
+            try
+            {
+                using (response)
+                {
+                    using (Stream stream = response.GetResponseStream())
+                    {
+                        var reader = new StreamReader(stream);
+                        
+                        return reader.ReadToEnd();
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                #if NET35
+                Debug.WriteLine(String.Format(System.Globalization.CultureInfo.InvariantCulture, "Failed to read response: {0}", ex));
+                #else
+                Debug.WriteLine("Failed to read response: {0}", ex);
+                #endif
+                // Swallow exceptions when reading the response stream and just try again.
+                return null;
+            }
+        }
+        
+        private static HttpWebRequest CreateWebRequest(string url)
+        {
+            HttpWebRequest request = null;
+            #if WINDOWS_PHONE
+            request = (HttpWebRequest)WebRequest.Create(url);
+            request.AllowReadStreamBuffering = false;
+            #elif SILVERLIGHT
+            request = (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
+            request.AllowReadStreamBuffering = false;
+            #else
+            request = (HttpWebRequest)WebRequest.Create(url);
+            #endif
+            return request;
+        }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/IAuthenticationProvider.cs b/lib/JabbR/JabbR.Client/IAuthenticationProvider.cs
new file mode 100644
index 0000000..4e52012
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/IAuthenticationProvider.cs
@@ -0,0 +1,14 @@
+using System.Threading.Tasks;
+
+using Microsoft.AspNet.SignalR.Client.Hubs;
+
+namespace JabbR.Client
+{
+    /// <summary>
+    /// Interface that wraps SignalR's IClientTransport and provides a way to add authentication information
+    /// </summary>
+    public interface IAuthenticationProvider
+    {
+        Task<HubConnection> Connect(string userName, string password);
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/IJabbRClient.cs b/lib/JabbR/JabbR.Client/IJabbRClient.cs
new file mode 100644
index 0000000..7e6d7d6
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/IJabbRClient.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Threading.Tasks;
+using JabbR.Client.Models;
+using JabbR.Models;
+using Microsoft.AspNet.SignalR.Client;
+
+namespace JabbR.Client
+{
+    public interface IJabbRClient
+    {
+        event Action<Message, string> MessageReceived;
+        event Action<IEnumerable<string>> LoggedOut;
+        event Action<User, string, bool> UserJoined;
+        event Action<User, string> UserLeft;
+        event Action<string> Kicked;
+        event Action<string, string, string> PrivateMessage;
+        event Action<User, string> UserTyping;
+        event Action<User, string> GravatarChanged;
+        event Action<string, string, string> MeMessageReceived;
+        event Action<string, User, string> UsernameChanged;
+        event Action<User, string> NoteChanged;
+        event Action<User, string> FlagChanged;
+        event Action<Room> TopicChanged;
+        event Action<User, string> OwnerAdded;
+        event Action<User, string> OwnerRemoved;
+        event Action<string, string, string> AddMessageContent;
+        event Action<Room> JoinedRoom;
+        event Action<Room, int> RoomCountChanged;
+        event Action<User> UserActivityChanged;
+        event Action<IEnumerable<User>> UsersInactive;
+        event Action Disconnected;
+        event Action<StateChange> StateChanged;
+
+        string SourceUrl { get; }
+        bool AutoReconnect { get; set; }
+        ICredentials Credentials { get; set; }
+
+        Task<LogOnInfo> Connect(string name, string password);
+        Task<User> GetUserInfo();
+        Task LogOut();
+        Task<bool> Send(string message, string roomName);
+        Task<bool> Send(ClientMessage message);
+        Task CreateRoom(string roomName);
+        Task JoinRoom(string roomName);
+        Task LeaveRoom(string roomName);
+        Task SetFlag(string countryCode);
+        Task SetNote(string noteText);
+        Task SendPrivateMessage(string userName, string message);
+        Task Kick(string userName, string roomName);
+        Task<bool> CheckStatus();
+        Task SetTyping(string roomName);
+        Task PostNotification(ClientNotification notification);
+        Task PostNotification(ClientNotification notification, bool executeContentProviders);
+        Task<IEnumerable<Message>> GetPreviousMessages(string fromId);
+        Task<Room> GetRoomInfo(string roomName);
+        Task<IEnumerable<Room>> GetRooms();
+        void Disconnect();
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/JabbR.Client.csproj b/lib/JabbR/JabbR.Client/JabbR.Client.csproj
new file mode 100644
index 0000000..164c113
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/JabbR.Client.csproj
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{A4A1D183-FD80-4DBD-806F-883DDADD4967}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>JabbR.Client</RootNamespace>
+    <AssemblyName>JabbR.Client</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\JabbR\Models\ClientMessage.cs">
+      <Link>Models\ClientMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\JabbR\Models\ClientNotification.cs">
+      <Link>Models\ClientNotification.cs</Link>
+    </Compile>
+    <Compile Include="ClientEvents.cs" />
+    <Compile Include="DefaultAuthenticationProvider.cs" />
+    <Compile Include="HttpHelper.cs" />
+    <Compile Include="IJabbRClient.cs" />
+    <Compile Include="IAuthenticationProvider.cs" />
+    <Compile Include="JabbRClient.cs" />
+    <Compile Include="Models\LogOnInfo.cs" />
+    <Compile Include="Models\Message.cs" />
+    <Compile Include="Models\Room.cs" />
+    <Compile Include="Models\User.cs" />
+    <Compile Include="Models\UserStatus.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="StreamExtensions.cs" />
+    <Compile Include="TaskAsyncHelper.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+    <None Include="Properties\JabbR.Client.nuspec" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ItemGroup>
+    <ProjectReference Include="..\..\Newtonsoft.Json\Src\Newtonsoft.Json\Newtonsoft.Json.csproj">
+      <Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
+      <Name>Newtonsoft.Json</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\SignalR\src\Microsoft.AspNet.SignalR.Client\Microsoft.AspNet.SignalR.Client.csproj">
+      <Project>{EB46B9C6-EE37-48F9-835E-E49580E40E0A}</Project>
+      <Name>Microsoft.AspNet.SignalR.Client</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
diff --git a/lib/JabbR/JabbR.Client/JabbRClient.cs b/lib/JabbR/JabbR.Client/JabbRClient.cs
new file mode 100644
index 0000000..d84aebd
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/JabbRClient.cs
@@ -0,0 +1,437 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using JabbR.Client.Models;
+using JabbR.Models;
+using Microsoft.AspNet.SignalR.Client;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Client.Hubs;
+using Microsoft.AspNet.SignalR.Client.Transports;
+
+namespace JabbR.Client
+{
+    public class JabbRClient : IJabbRClient
+    {
+        private readonly IAuthenticationProvider _authenticationProvider;
+        private readonly Func<IClientTransport> _transportFactory;
+
+        private IHubProxy _chat;
+        private HubConnection _connection;
+        private int _initialized;
+
+        public JabbRClient(string url)
+            : this(url, authenticationProvider: null, transportFactory: () => new AutoTransport(new DefaultHttpClient()))
+        { }
+
+        public JabbRClient(string url, IAuthenticationProvider authenticationProvider, Func<IClientTransport> transportFactory)
+        {
+            SourceUrl = url;
+            _authenticationProvider = authenticationProvider ?? new DefaultAuthenticationProvider(url);
+            _transportFactory = transportFactory;
+            TraceLevel = TraceLevels.All;
+        }
+
+        public event Action<Message, string> MessageReceived;
+        public event Action<IEnumerable<string>> LoggedOut;
+        public event Action<User, string, bool> UserJoined;
+        public event Action<User, string> UserLeft;
+        public event Action<string> Kicked;
+        public event Action<string, string, string> PrivateMessage;
+        public event Action<User, string> UserTyping;
+        public event Action<User, string> GravatarChanged;
+        public event Action<string, string, string> MeMessageReceived;
+        public event Action<string, User, string> UsernameChanged;
+        public event Action<User, string> NoteChanged;
+        public event Action<User, string> FlagChanged;
+        public event Action<Room> TopicChanged;
+        public event Action<User, string> OwnerAdded;
+        public event Action<User, string> OwnerRemoved;
+        public event Action<string, string, string> AddMessageContent;
+        public event Action<Room> JoinedRoom;
+
+        // Global
+        public event Action<Room, int> RoomCountChanged;
+        public event Action<User> UserActivityChanged;
+        public event Action<IEnumerable<User>> UsersInactive;
+
+        public string SourceUrl { get; private set; }
+        public bool AutoReconnect { get; set; }
+        public TextWriter TraceWriter { get; set; }
+        public TraceLevels TraceLevel { get; set; }
+
+        public HubConnection Connection
+        {
+            get
+            {
+                return _connection;
+            }
+        }
+
+        public ICredentials Credentials
+        {
+            get
+            {
+                return _connection.Credentials;
+            }
+            set
+            {
+                _connection.Credentials = value;
+            }
+        }
+
+        public event Action Disconnected
+        {
+            add
+            {
+                _connection.Closed += value;
+            }
+            remove
+            {
+                _connection.Closed -= value;
+            }
+        }
+
+        public event Action<StateChange> StateChanged
+        {
+            add
+            {
+                _connection.StateChanged += value;
+            }
+            remove
+            {
+                _connection.StateChanged -= value;
+            }
+        }
+
+        public Task<LogOnInfo> Connect(string name, string password)
+        {
+            var taskCompletionSource = new TaskCompletionSource<LogOnInfo>();
+
+            _authenticationProvider.Connect(name, password)
+                .Then(connection =>
+                {
+                    _connection = connection;
+
+                    if (TraceWriter != null)
+                    {
+                        _connection.TraceWriter = TraceWriter;
+                    }
+
+                    _connection.TraceLevel = TraceLevel;
+
+                    _chat = _connection.CreateHubProxy("chat");
+
+                    SubscribeToEvents();
+
+                    return _connection.Start(_transportFactory());
+                })
+                .Then(tcs => LogOn(tcs), taskCompletionSource)
+                .Catch(ex => taskCompletionSource.TrySetException(ex));
+
+            return taskCompletionSource.Task;
+        }
+
+        private void LogOn(TaskCompletionSource<LogOnInfo> tcs)
+        {
+            IDisposable logOn = null;
+
+            Action<LogOnInfo> callback = logOnInfo =>
+            {
+                if (logOn != null)
+                {
+                    logOn.Dispose();
+                }
+
+                tcs.TrySetResult(logOnInfo);
+            };
+
+            // Wait for the logOn callback to get triggered
+            logOn = _chat.On<IEnumerable<Room>>(ClientEvents.LogOn, rooms =>
+            {
+                callback(new LogOnInfo
+                {
+                    Rooms = rooms,
+                    UserId = (string)_chat["id"]
+                });
+            });
+
+            // Join JabbR
+            _chat.Invoke("Join").ContinueWith(task =>
+            {
+                if (task.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(task.Exception);
+                }
+                else if (task.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+            },
+            TaskContinuationOptions.NotOnRanToCompletion);
+        }
+
+        public Task<User> GetUserInfo()
+        {
+            return _chat.Invoke<User>("GetUserInfo");
+        }
+
+        public Task LogOut()
+        {
+            return _chat.Invoke("LogOut");
+        }
+
+        public Task<bool> Send(string message, string roomName)
+        {
+            return _chat.Invoke<bool>("Send", message, roomName);
+        }
+
+        public Task<bool> Send(ClientMessage message)
+        {
+            return _chat.Invoke<bool>("Send", message);
+        }
+
+        public Task PostNotification(ClientNotification notification, bool executeContentProviders)
+        {
+            return _chat.Invoke("PostNotification", notification, executeContentProviders);
+        }
+
+        public Task PostNotification(ClientNotification notification)
+        {
+            return _chat.Invoke("PostNotification", notification);
+        }
+
+        public Task CreateRoom(string roomName)
+        {
+            var tcs = new TaskCompletionSource<object>();
+
+            IDisposable createRoom = null;
+
+            createRoom = _chat.On<Room>(ClientEvents.RoomCreated, room =>
+            {
+                createRoom.Dispose();
+                tcs.SetResult(null);
+            });
+
+            SendCommand("create {0}", roomName).ContinueWithNotComplete(tcs);
+
+            return tcs.Task;
+        }
+
+        public Task JoinRoom(string roomName)
+        {
+            var tcs = new TaskCompletionSource<object>();
+
+            IDisposable joinRoom = null;
+
+            joinRoom = _chat.On<Room>(ClientEvents.JoinRoom, room =>
+            {
+                joinRoom.Dispose();
+
+                tcs.SetResult(null);
+            });
+
+            SendCommand("join {0}", roomName).ContinueWithNotComplete(tcs);
+
+            return tcs.Task;
+        }
+
+        public Task LeaveRoom(string roomName)
+        {
+            return SendCommand("leave {0}", roomName);
+        }
+
+        public Task SetFlag(string countryCode)
+        {
+            return SendCommand("flag {0}", countryCode);
+        }
+
+        public Task SetNote(string noteText)
+        {
+            return SendCommand("note {0}", noteText);
+        }
+
+        public Task SendPrivateMessage(string userName, string message)
+        {
+            return SendCommand("msg {0} {1}", userName, message);
+        }
+
+        public Task Kick(string userName, string roomName)
+        {
+            return SendCommand("kick {0} {1}", userName, roomName);
+        }
+
+        public Task<bool> CheckStatus()
+        {
+            return _chat.Invoke<bool>("CheckStatus");
+        }
+
+        public Task SetTyping(string roomName)
+        {
+            return _chat.Invoke("Typing", roomName);
+        }
+
+        public Task<IEnumerable<Message>> GetPreviousMessages(string fromId)
+        {
+            return _chat.Invoke<IEnumerable<Message>>("GetPreviousMessages", fromId);
+        }
+
+        public Task<Room> GetRoomInfo(string roomName)
+        {
+            return _chat.Invoke<Room>("GetRoomInfo", roomName);
+        }
+
+        public Task<IEnumerable<Room>> GetRooms()
+        {
+            return _chat.Invoke<IEnumerable<Room>>("GetRooms");
+        }
+
+        public void Disconnect()
+        {
+            _connection.Stop();
+        }
+
+        private void SubscribeToEvents()
+        {
+            if (Interlocked.Exchange(ref _initialized, 1) != 0)
+            {
+                return;
+            }
+
+            if (AutoReconnect)
+            {
+                Disconnected += OnDisconnected;
+            }
+
+            _chat.On<Message, string>(ClientEvents.AddMessage, (message, room) =>
+            {
+                Execute(MessageReceived, messageReceived => messageReceived(message, room));
+            });
+
+            _chat.On<IEnumerable<string>>(ClientEvents.LogOut, rooms =>
+            {
+                Execute(LoggedOut, loggedOut => loggedOut(rooms));
+            });
+
+            _chat.On<User, string, bool>(ClientEvents.AddUser, (user, room, isOwner) =>
+            {
+                Execute(UserJoined, userJoined => userJoined(user, room, isOwner));
+            });
+
+            _chat.On<User, string>(ClientEvents.Leave, (user, room) =>
+            {
+                Execute(UserLeft, userLeft => userLeft(user, room));
+            });
+
+            _chat.On<string>(ClientEvents.Kick, room =>
+            {
+                Execute(Kicked, kicked => kicked(room));
+            });
+
+            _chat.On<Room, int>(ClientEvents.UpdateRoomCount, (room, count) =>
+            {
+                Execute(RoomCountChanged, roomCountChanged => roomCountChanged(room, count));
+            });
+
+            _chat.On<User>(ClientEvents.UpdateActivity, user =>
+            {
+                Execute(UserActivityChanged, userActivityChanged => userActivityChanged(user));
+            });
+
+            _chat.On<string, string, string>(ClientEvents.SendPrivateMessage, (from, to, message) =>
+            {
+                Execute(PrivateMessage, privateMessage => privateMessage(from, to, message));
+            });
+
+            _chat.On<IEnumerable<User>>(ClientEvents.MarkInactive, (users) =>
+            {
+                Execute(UsersInactive, usersInactive => usersInactive(users));
+            });
+
+            _chat.On<User, string>(ClientEvents.SetTyping, (user, room) =>
+            {
+                Execute(UserTyping, userTyping => userTyping(user, room));
+            });
+
+            _chat.On<User, string>(ClientEvents.GravatarChanged, (user, room) =>
+            {
+                Execute(GravatarChanged, gravatarChanged => gravatarChanged(user, room));
+            });
+
+            _chat.On<string, string, string>(ClientEvents.MeMessageReceived, (user, content, room) =>
+            {
+                Execute(MeMessageReceived, meMessageReceived => meMessageReceived(user, content, room));
+            });
+
+            _chat.On<string, User, string>(ClientEvents.UsernameChanged, (oldUserName, user, room) =>
+            {
+                Execute(UsernameChanged, usernameChanged => usernameChanged(oldUserName, user, room));
+            });
+
+            _chat.On<User, string>(ClientEvents.NoteChanged, (user, room) =>
+            {
+                Execute(NoteChanged, noteChanged => noteChanged(user, room));
+            });
+
+            _chat.On<User, string>(ClientEvents.FlagChanged, (user, room) =>
+            {
+                Execute(FlagChanged, flagChanged => flagChanged(user, room));
+            });
+
+            _chat.On<Room>(ClientEvents.TopicChanged, (room) =>
+            {
+                Execute(TopicChanged, topicChanged => topicChanged(room));
+            });
+
+            _chat.On<User, string>(ClientEvents.OwnerAdded, (user, room) =>
+            {
+                Execute(OwnerAdded, ownerAdded => ownerAdded(user, room));
+            });
+
+            _chat.On<User, string>(ClientEvents.OwnerRemoved, (user, room) =>
+            {
+                Execute(OwnerRemoved, ownerRemoved => ownerRemoved(user, room));
+            });
+
+            _chat.On<string, string, string>(ClientEvents.AddMessageContent, (messageId, extractedContent, roomName) =>
+            {
+                Execute(AddMessageContent, addMessageContent => addMessageContent(messageId, extractedContent, roomName));
+            });
+
+            _chat.On<Room>(ClientEvents.JoinRoom, (room) =>
+            {
+                Execute(JoinedRoom, joinedRoom => joinedRoom(room));
+            });
+        }
+
+        private void OnDisconnected()
+        {
+            TaskAsyncHelper.Delay(TimeSpan.FromSeconds(5)).Then(() =>
+            {
+                _connection.Start(_transportFactory()).Then(() =>
+                {
+                    // Join JabbR
+                    _chat.Invoke("Join", false);
+                });
+            });
+        }
+
+        private static void Execute<T>(T handlers, Action<T> action) where T : class
+        {
+            Task.Factory.StartNew(() =>
+            {
+                if (handlers != null)
+                {
+                    action(handlers);
+                }
+            }).Catch();
+        }
+
+        private Task SendCommand(string command, params object[] args)
+        {
+            return _chat.Invoke("Send", String.Format("/" + command, args), "");
+        }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Models/LogOnInfo.cs b/lib/JabbR/JabbR.Client/Models/LogOnInfo.cs
new file mode 100644
index 0000000..1eb0884
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Models/LogOnInfo.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+
+namespace JabbR.Client.Models
+{
+    public class LogOnInfo
+    {
+        public string UserId { get; set; }
+        public IEnumerable<Room> Rooms { get; set; }
+
+        public LogOnInfo()
+        {
+            Rooms = new List<Room>();
+        }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Models/Message.cs b/lib/JabbR/JabbR.Client/Models/Message.cs
new file mode 100644
index 0000000..9ca237b
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Models/Message.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace JabbR.Client.Models
+{
+    public class Message
+    {
+        public bool HtmlEncoded { get; set; }
+        public string Id { get; set; }
+        public string Content { get; set; }
+        public DateTimeOffset When { get; set; }
+        public User User { get; set; }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Models/Room.cs b/lib/JabbR/JabbR.Client/Models/Room.cs
new file mode 100644
index 0000000..542687a
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Models/Room.cs
@@ -0,0 +1,17 @@
+using System.Collections.Generic;
+
+namespace JabbR.Client.Models
+{
+    public class Room
+    {
+        public string Name { get; set; }
+        public int Count { get; set; }
+        public bool Private { get; set; }
+        public string Topic { get; set; }
+        public bool Closed { get; set; }
+        public string Welcome { get; set; }
+        public IEnumerable<User> Users { get; set; }
+        public IEnumerable<string> Owners { get; set; }
+        public IEnumerable<Message> RecentMessages { get; set; }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Models/User.cs b/lib/JabbR/JabbR.Client/Models/User.cs
new file mode 100644
index 0000000..da03852
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Models/User.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace JabbR.Client.Models
+{
+    public class User
+    {
+        public string Name { get; set; }
+        public string Hash { get; set; }
+        public bool Active { get; set; }
+        public UserStatus Status { get; set; }
+        public string Note { get; set; }
+        public string AfkNote { get; set; }
+        public bool IsAfk { get; set; }
+        public string Flag { get; set; }
+        public string Country { get; set; }
+        public DateTime LastActivity { get; set; }
+        public bool IsAdmin { get; set; }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Models/UserStatus.cs b/lib/JabbR/JabbR.Client/Models/UserStatus.cs
new file mode 100644
index 0000000..7ceb434
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Models/UserStatus.cs
@@ -0,0 +1,9 @@
+namespace JabbR.Client.Models
+{
+    public enum UserStatus
+    {
+        Active,
+        Inactive,
+        Offline
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/Properties/AssemblyInfo.cs b/lib/JabbR/JabbR.Client/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..9c8fa75
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/Properties/AssemblyInfo.cs
@@ -0,0 +1,9 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("JabbR.Client")]
+[assembly: AssemblyDescription(".NET Client for JabbR (https://github.com/davidfowl/JabbR)")]
+[assembly: AssemblyCompany("David Fowler")]
+[assembly: AssemblyProduct("JabbR.Client")]
+
+[assembly: AssemblyVersion("0.1")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/lib/JabbR/JabbR.Client/StreamExtensions.cs b/lib/JabbR/JabbR.Client/StreamExtensions.cs
new file mode 100644
index 0000000..3309928
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/StreamExtensions.cs
@@ -0,0 +1,61 @@
+// <copyright file="StreamExtensions.cs" company="Microsoft Open Technologies, Inc.">
+// Copyright 2011-2013 Microsoft Open Technologies, Inc. All rights reserved.
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// </copyright>
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace JabbR.Client
+{
+    internal static class StreamExtensions
+    {
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<int> ReadAsync(this Stream stream, byte[] buffer)
+        {
+#if NETFX_CORE
+            return stream.ReadAsync(buffer, 0, buffer.Length);
+#else
+            try
+            {
+                return Task.Factory.FromAsync((cb, state) => stream.BeginRead(buffer, 0, buffer.Length, cb, state), ar => stream.EndRead(ar), null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<int>(ex);
+            }
+#endif
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared class.")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task WriteAsync(this Stream stream, byte[] buffer)
+        {
+#if NETFX_CORE
+            return stream.WriteAsync(buffer, 0, buffer.Length);
+#else
+            try
+            {
+                return Task.Factory.FromAsync((cb, state) => stream.BeginWrite(buffer, 0, buffer.Length, cb, state), ar => stream.EndWrite(ar), null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError(ex);
+            }
+#endif
+        }
+    }
+}
diff --git a/lib/JabbR/JabbR.Client/TaskAsyncHelper.cs b/lib/JabbR/JabbR.Client/TaskAsyncHelper.cs
new file mode 100644
index 0000000..04ab041
--- /dev/null
+++ b/lib/JabbR/JabbR.Client/TaskAsyncHelper.cs
@@ -0,0 +1,1090 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace JabbR.Client
+{
+    internal static class TaskAsyncHelper
+    {
+        private static readonly Task _emptyTask = MakeTask<object>(null);
+        private static readonly Task<bool> _trueTask = MakeTask<bool>(true);
+        private static readonly Task<bool> _falseTask = MakeTask<bool>(false);
+
+        private static Task<T> MakeTask<T>(T value)
+        {
+            return FromResult<T>(value);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Empty
+        {
+            get
+            {
+                return _emptyTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<bool> True
+        {
+            get
+            {
+                return _trueTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<bool> False
+        {
+            get
+            {
+                return _falseTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task OrEmpty(this Task task)
+        {
+            return task ?? Empty;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> OrEmpty<T>(this Task<T> task)
+        {
+            return task ?? TaskCache<T>.Empty;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromAsync(Func<AsyncCallback, object, IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, object state)
+        {
+            try
+            {
+                return Task.Factory.FromAsync(beginMethod, endMethod, state);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<T> FromAsync<T>(Func<AsyncCallback, object, IAsyncResult> beginMethod, Func<IAsyncResult, T> endMethod, object state)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<T>(beginMethod, endMethod, state);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<T>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Series(Func<object, Task>[] tasks, object[] state)
+        {
+            Task prev = TaskAsyncHelper.Empty;
+            Task finalTask = TaskAsyncHelper.Empty;
+
+            for (int i = 0; i < tasks.Length; i++)
+            {
+                prev = finalTask;
+                finalTask = prev.Then(tasks[i], state[i]);
+            }
+
+            return finalTask;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task) where TTask : Task
+        {
+            return Catch(task, ex => { });
+        }
+
+#if PERFCOUNTERS
+        public static TTask Catch<TTask>(this TTask task, params IPerformanceCounter[] counters) where TTask : Task
+        {
+            return Catch(task, _ =>
+                {
+                    if (counters == null)
+                    {
+                        return;
+                    }
+                    for (var i = 0; i < counters.Length; i++)
+                    {
+                        counters[i].Increment();
+                    }
+                });
+        }
+#endif
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task, Action<AggregateException, object> handler, object state) where TTask : Task
+        {
+            if (task != null && task.Status != TaskStatus.RanToCompletion)
+            {
+                if (task.Status == TaskStatus.Faulted)
+                {
+                    ExecuteOnFaulted(handler, state, task.Exception);
+                }
+                else
+                {
+                    AttachFaultedContinuation<TTask>(task, handler, state);
+                }
+            }
+
+            return task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static void AttachFaultedContinuation<TTask>(TTask task, Action<AggregateException, object> handler, object state) where TTask : Task
+        {
+            task.ContinueWith(innerTask =>
+            {
+                ExecuteOnFaulted(handler, state, innerTask.Exception);
+            },
+            TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static void ExecuteOnFaulted(Action<AggregateException, object> handler, object state, AggregateException exception)
+        {
+            // observe Exception
+#if !WINDOWS_PHONE && !SILVERLIGHT && !NETFX_CORE && !ANDROID && !IOS
+            Trace.TraceError("SignalR exception thrown by Task: {0}", exception);
+#endif
+            handler(exception, state);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task, Action<AggregateException> handler) where TTask : Task
+        {
+            return task.Catch((ex, state) => ((Action<AggregateException>)state).Invoke(ex),
+                              handler);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task ContinueWithNotComplete(this Task task, Action action)
+        {
+            if (task.IsCanceled)
+            {
+                action();
+            }
+            else if (task.IsFaulted)
+            {
+                action();
+            }
+            else
+            {
+                task.ContinueWith(t =>
+                {
+                    if (t.IsFaulted || t.IsCanceled)
+                    {
+                        action();
+                    }
+                },
+                TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.NotOnRanToCompletion);
+            }
+
+            return task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWithNotComplete(this Task task, TaskCompletionSource<object> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.SetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.SetCanceled();
+                }
+            },
+            TaskContinuationOptions.NotOnRanToCompletion);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWith(this Task task, TaskCompletionSource<object> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+                else
+                {
+                    tcs.TrySetResult(null);
+                }
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWith<T>(this Task<T> task, TaskCompletionSource<T> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+                else
+                {
+                    tcs.TrySetResult(t.Result);
+                }
+            });
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Return(this Task[] tasks)
+        {
+            return Then(tasks, () => { });
+        }
+
+        // Then extesions
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task task, Action successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult>(this Task task, Func<TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, TResult>.RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task[] tasks, Action successor)
+        {
+            if (tasks.Length == 0)
+            {
+                return FromMethod(successor);
+            }
+
+            var tcs = new TaskCompletionSource<object>();
+            Task.Factory.ContinueWhenAll(tasks, completedTasks =>
+            {
+                var faulted = completedTasks.FirstOrDefault(t => t.IsFaulted);
+                if (faulted != null)
+                {
+                    tcs.SetUnwrappedException(faulted.Exception);
+                    return;
+                }
+                var cancelled = completedTasks.FirstOrDefault(t => t.IsCanceled);
+                if (cancelled != null)
+                {
+                    tcs.SetCanceled();
+                    return;
+                }
+
+                successor();
+                tcs.SetResult(null);
+            });
+
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1>(this Task task, Action<T1> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1);
+
+                default:
+                    return GenericDelegates<object, object, T1, object>.ThenWithArgs(task, successor, arg1);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1, T2>(this Task task, Action<T1, T2> successor, T1 arg1, T2 arg2)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1, arg2);
+
+                default:
+                    return GenericDelegates<object, object, T1, T2>.ThenWithArgs(task, successor, arg1, arg2);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1>(this Task task, Func<T1, Task> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1);
+
+                default:
+                    return GenericDelegates<object, Task, T1, object>.ThenWithArgs(task, successor, arg1)
+                                                                     .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1, T2>(this Task task, Func<T1, T2, Task> successor, T1 arg1, T2 arg2)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1, arg2);
+
+                default:
+                    return GenericDelegates<object, Task, T1, T2>.ThenWithArgs(task, successor, arg1, arg2)
+                                                                 .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, TResult>(this Task<T> task, Func<T, Task<TResult>> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<T, Task<TResult>>.RunTask(task, t => successor(t.Result))
+                                                        .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, TResult>(this Task<T> task, Func<T, TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<T, TResult>.RunTask(task, t => successor(t.Result));
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, T1, TResult>(this Task<T> task, Func<T, T1, TResult> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result, arg1);
+
+                default:
+                    return GenericDelegates<T, TResult, T1, object>.ThenWithArgs(task, successor, arg1);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task task, Func<Task> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, Task>.RunTask(task, successor)
+                                                    .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult>(this Task task, Func<Task<TResult>> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, Task<TResult>>.RunTask(task, successor)
+                                                             .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<TResult>(this Task<TResult> task, Action<TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<TResult, object>.RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<TResult>(this Task<TResult> task, Func<TResult, Task> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<TResult, Task>.RunTask(task, t => successor(t.Result))
+                                                     .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult, T1>(this Task<TResult> task, Func<Task<TResult>, T1, Task<TResult>> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task, arg1);
+
+                default:
+                    return GenericDelegates<TResult, Task<TResult>, T1, object>.ThenWithArgs(task, successor, arg1)
+                                                                               .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed to the caller")]
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Finally(this Task task, Action<object> next, object state)
+        {
+            try
+            {
+                switch (task.Status)
+                {
+                    case TaskStatus.Faulted:
+                    case TaskStatus.Canceled:
+                        next(state);
+                        return task;
+                    case TaskStatus.RanToCompletion:
+                        return FromMethod(next, state);
+
+                    default:
+                        return RunTaskSynchronously(task, next, state, onlyOnSuccess: false);
+                }
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task RunSynchronously(this Task task, Action successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return RunTaskSynchronously(task, state => ((Action)state).Invoke(), successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task FastUnwrap(this Task<Task> task)
+        {
+            var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null;
+            return innerTask ?? task.Unwrap();
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> FastUnwrap<T>(this Task<Task<T>> task)
+        {
+            var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null;
+            return innerTask ?? task.Unwrap();
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Delay(TimeSpan timeOut)
+        {
+#if NETFX_CORE
+            return Task.Delay(timeOut);
+#else
+            var tcs = new TaskCompletionSource<object>();
+
+            var timer = new Timer(tcs.SetResult,
+            null,
+            timeOut,
+            TimeSpan.FromMilliseconds(-1));
+
+            return tcs.Task.ContinueWith(_ =>
+            {
+                timer.Dispose();
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+#endif
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod(Action func)
+        {
+            try
+            {
+                func();
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1>(Action<T1> func, T1 arg)
+        {
+            try
+            {
+                func(arg);
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1, T2>(Action<T1, T2> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                func(arg1, arg2);
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod(Func<Task> func)
+        {
+            try
+            {
+                return func();
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<TResult>(Func<Task<TResult>> func)
+        {
+            try
+            {
+                return func();
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<TResult>(Func<TResult> func)
+        {
+            try
+            {
+                return FromResult<TResult>(func());
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1>(Func<T1, Task> func, T1 arg)
+        {
+            try
+            {
+                return func(arg);
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1, T2>(Func<T1, T2, Task> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return func(arg1, arg2);
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, TResult>(Func<T1, Task<TResult>> func, T1 arg)
+        {
+            try
+            {
+                return func(arg);
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, TResult>(Func<T1, TResult> func, T1 arg)
+        {
+            try
+            {
+                return FromResult<TResult>(func(arg));
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, T2, TResult>(Func<T1, T2, Task<TResult>> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return func(arg1, arg2);
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, T2, TResult>(Func<T1, T2, TResult> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return FromResult<TResult>(func(arg1, arg2));
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> FromResult<T>(T value)
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetResult(value);
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static Task FromError(Exception e)
+        {
+            return FromError<object>(e);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static Task<T> FromError<T>(Exception e)
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetUnwrappedException<T>(e);
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static void SetUnwrappedException<T>(this TaskCompletionSource<T> tcs, Exception e)
+        {
+            var aggregateException = e as AggregateException;
+            if (aggregateException != null)
+            {
+                tcs.SetException(aggregateException.InnerExceptions);
+            }
+            else
+            {
+                tcs.SetException(e);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static bool TrySetUnwrappedException<T>(this TaskCompletionSource<T> tcs, Exception e)
+        {
+            var aggregateException = e as AggregateException;
+            if (aggregateException != null)
+            {
+                return tcs.TrySetException(aggregateException.InnerExceptions);
+            }
+            else
+            {
+                return tcs.TrySetException(e);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task Canceled()
+        {
+            var tcs = new TaskCompletionSource<object>();
+            tcs.SetCanceled();
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task<T> Canceled<T>()
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetCanceled();
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        private static Task RunTask(Task task, Action successor)
+        {
+            var tcs = new TaskCompletionSource<object>();
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.SetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.SetCanceled();
+                }
+                else
+                {
+                    try
+                    {
+                        successor();
+                        tcs.SetResult(null);
+                    }
+                    catch (Exception ex)
+                    {
+                        tcs.SetUnwrappedException(ex);
+                    }
+                }
+            });
+
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task RunTaskSynchronously(Task task, Action<object> next, object state, bool onlyOnSuccess = true)
+        {
+            var tcs = new TaskCompletionSource<object>();
+            task.ContinueWith(t =>
+            {
+                try
+                {
+                    if (t.IsFaulted)
+                    {
+                        if (!onlyOnSuccess)
+                        {
+                            next(state);
+                        }
+
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        if (!onlyOnSuccess)
+                        {
+                            next(state);
+                        }
+
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        next(state);
+                        tcs.SetResult(null);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    tcs.SetUnwrappedException(ex);
+                }
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+
+            return tcs.Task;
+        }
+
+        private static class TaskRunners<T, TResult>
+        {
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task RunTask(Task<T> task, Action<T> successor)
+            {
+                var tcs = new TaskCompletionSource<object>();
+                task.ContinueWith(t =>
+                {
+                    if (t.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            successor(t.Result);
+                            tcs.SetResult(null);
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task<TResult> RunTask(Task task, Func<TResult> successor)
+            {
+                var tcs = new TaskCompletionSource<TResult>();
+                task.ContinueWith(t =>
+                {
+                    if (t.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            tcs.SetResult(successor());
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task<TResult> RunTask(Task<T> task, Func<Task<T>, TResult> successor)
+            {
+                var tcs = new TaskCompletionSource<TResult>();
+                task.ContinueWith(t =>
+                {
+                    if (task.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (task.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            tcs.SetResult(successor(t));
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+        }
+
+        private static class GenericDelegates<T, TResult, T1, T2>
+        {
+            internal static Task ThenWithArgs(Task task, Action<T1> successor, T1 arg1)
+            {
+                return RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task ThenWithArgs(Task task, Action<T1, T2> successor, T1 arg1, T2 arg2)
+            {
+                return RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task task, Func<T1, TResult> successor, T1 arg1)
+            {
+                return TaskRunners<object, TResult>.RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task task, Func<T1, T2, TResult> successor, T1 arg1, T2 arg2)
+            {
+                return TaskRunners<object, TResult>.RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task<T> task, Func<T, T1, TResult> successor, T1 arg1)
+            {
+                return TaskRunners<T, TResult>.RunTask(task, t => successor(t.Result, arg1));
+            }
+
+            internal static Task<Task> ThenWithArgs(Task task, Func<T1, Task> successor, T1 arg1)
+            {
+                return TaskRunners<object, Task>.RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task<Task> ThenWithArgs(Task task, Func<T1, T2, Task> successor, T1 arg1, T2 arg2)
+            {
+                return TaskRunners<object, Task>.RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<Task<TResult>> ThenWithArgs(Task<T> task, Func<T, T1, Task<TResult>> successor, T1 arg1)
+            {
+                return TaskRunners<T, Task<TResult>>.RunTask(task, t => successor(t.Result, arg1));
+            }
+
+            internal static Task<Task<T>> ThenWithArgs(Task<T> task, Func<Task<T>, T1, Task<T>> successor, T1 arg1)
+            {
+                return TaskRunners<T, Task<T>>.RunTask(task, t => successor(t, arg1));
+            }
+        }
+
+        private static class TaskCache<T>
+        {
+            public static Task<T> Empty = MakeTask<T>(default(T));
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/JabbR/JabbR/Models/ClientMessage.cs b/lib/JabbR/JabbR/Models/ClientMessage.cs
new file mode 100644
index 0000000..aa4a5aa
--- /dev/null
+++ b/lib/JabbR/JabbR/Models/ClientMessage.cs
@@ -0,0 +1,9 @@
+namespace JabbR.Models
+{
+    public class ClientMessage
+    {
+        public string Id { get; set; }
+        public string Content { get; set; }
+        public string Room { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/JabbR/JabbR/Models/ClientNotification.cs b/lib/JabbR/JabbR/Models/ClientNotification.cs
new file mode 100644
index 0000000..fca149c
--- /dev/null
+++ b/lib/JabbR/JabbR/Models/ClientNotification.cs
@@ -0,0 +1,10 @@
+namespace JabbR.Models
+{
+    public class ClientNotification
+    {
+        public string Room { get; set; }
+        public string ImageUrl { get; set; }
+        public string Source { get; set; }
+        public string Content { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f927463..b067696 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,5 +1,4 @@
-SUBDIRS =	SmartIrc4net \
-			$(MESSAGINGMENU_SHARP_SUBDIR)
+SUBDIRS =	$(MESSAGINGMENU_SHARP_SUBDIR)
 
 if WITH_MESSAGINGMENU_SHARP_INCLUDED
 MESSAGINGMENU_SHARP_SUBDIR = messagingmenu-sharp
@@ -77,17 +76,35 @@ TWITTERIZER_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(TWITTERIZER_ASSEMBLY_NAME)
 TWITTERIZER_BUILD_FILE = $(TWITTERIZER_SRCDIR)/Twitterizer2.csproj
 TWITTERIZER_XBUILD_FLAGS = $(XBUILD_FLAGS) /p:PostBuildEvent=
 
-JABBER_NET_SUBDIR = jabber-net
+JABBER_NET_SUBDIR = agsxmpp/agsxmpp
 JABBER_NET_SRCDIR = $(srcdir)/$(JABBER_NET_SUBDIR)
 JABBER_NET_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(JABBER_NET_SRCDIR)/$(pattern)))
-JABBER_NET_EXTRA_FILES = \
-	$(JABBER_NET_BUILD_FILE) \
-	$(wildcard $(JABBER_NET_SRCDIR)/jabber/*/*.bmp) $(wildcard $(JABBER_NET_SRCDIR)/jabber/*/*.resx)
+JABBER_NET_EXTRA_FILES = $(JABBER_NET_SRCDIR)/agsxmpp.csproj
 JABBER_NET_CLEAN_FILES = $(wildcard $(OBJECT_DIR)/*.bmp)
-JABBER_NET_ASSEMBLY_NAME = jabber-net.dll
+JABBER_NET_ASSEMBLY_NAME = agsxmpp.dll
 JABBER_NET_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(JABBER_NET_ASSEMBLY_NAME)
-JABBER_NET_BUILD_FILE = $(JABBER_NET_SRCDIR)/2005-jabber-net.csproj
-JABBER_NET_XBUILD_FLAGS = $(XBUILD_FLAGS)
+JABBER_NET_BUILD_FILE = $(JABBER_NET_SRCDIR)/agsxmpp.csproj
+JABBER_NET_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="TRACE,DEBUG,SSL,STRINGPREP,MONO"
+
+STARKSOFTPROXY_SUBDIR = StarkSoftProxy
+STARKSOFTPROXY_SRCDIR = $(srcdir)/$(STARKSOFTPROXY_SUBDIR)
+STARKSOFTPROXY_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(STARKSOFTPROXY_SRCDIR)/$(pattern)))
+STARKSOFTPROXY_EXTRA_FILES = $(STARKSOFTPROXY_SRCDIR)/StarkSoftProxy.csproj
+STARKSOFTPROXY_CLEAN_FILES =
+STARKSOFTPROXY_ASSEMBLY_NAME = StarkSoftProxy.dll
+STARKSOFTPROXY_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(STARKSOFTPROXY_ASSEMBLY_NAME)
+STARKSOFTPROXY_BUILD_FILE = $(STARKSOFTPROXY_SRCDIR)/StarkSoftProxy.csproj
+STARKSOFTPROXY_XBUILD_FLAGS = $(XBUILD_FLAGS)
+
+SMARTIRC4NET_SUBDIR = SmartIrc4net
+SMARTIRC4NET_SRCDIR = $(srcdir)/$(SMARTIRC4NET_SUBDIR)
+SMARTIRC4NET_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(SMARTIRC4NET_SRCDIR)/$(pattern)))
+SMARTIRC4NET_EXTRA_FILES = $(SMARTIRC4NET_SRCDIR)/SmartIrc4net.csproj
+SMARTIRC4NET_CLEAN_FILES =
+SMARTIRC4NET_ASSEMBLY_NAME = Meebey.SmartIrc4net.dll
+SMARTIRC4NET_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(SMARTIRC4NET_ASSEMBLY_NAME)
+SMARTIRC4NET_BUILD_FILE = $(SMARTIRC4NET_SRCDIR)/SmartIrc4net.csproj
+SMARTIRC4NET_XBUILD_FLAGS = $(XBUILD_FLAGS)
 
 DB4O_SUBDIR = db4o-net
 DB4O_SRCDIR = $(srcdir)/$(DB4O_SUBDIR)/Db4objects.Db4o
@@ -112,16 +129,60 @@ DB4O_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="NET_3_5,MONO,EMBE
 #DB4O_NQ_BUILD_FILE = $(DB4O_NQ_SRCDIR)/Db4objects.Db4o.NativeQueries-2008.csproj
 #DB4O_NQ_XBUILD_FLAGS = $(DB4O_XBUILD_FLAGS)
 
+SIGNALR_CLIENT_SUBDIR = SignalR
+SIGNALR_CLIENT_SRCDIR = $(srcdir)/$(SIGNALR_CLIENT_SUBDIR)/src/Microsoft.AspNet.SignalR.Client
+SIGNALR_CLIENT_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(SIGNALR_CLIENT_SRCDIR)/$(pattern))) \
+	$(foreach file, ../Common/CommonAssemblyInfo.cs ../Common/CommonVersionInfo.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs ../Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs, $(SIGNALR_CLIENT_SRCDIR)/$(file))
+SIGNALR_CLIENT_EXTRA_FILES = \
+	$(SIGNALR_CLIENT_BUILD_FILE) \
+	$(SIGNALR_CLIENT_SRCDIR)/Resources.resx \
+	$(SIGNALR_CLIENT_SRCDIR)/../Common/Microsoft.AspNet.SignalR.targets
+#SIGNALR_CLIENT_CLEAN_FILES = $(OBJECT_DIR)/Newtonsoft.Json.Dynamic.snk
+SIGNALR_CLIENT_ASSEMBLY_NAME = Microsoft.AspNet.SignalR.Client.dll
+SIGNALR_CLIENT_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(SIGNALR_CLIENT_ASSEMBLY_NAME)
+SIGNALR_CLIENT_BUILD_FILE = $(SIGNALR_CLIENT_SRCDIR)/Microsoft.AspNet.SignalR.Client.csproj
+SIGNALR_CLIENT_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="MONO"
+
+JABBR_CLIENT_SUBDIR = JabbR
+JABBR_CLIENT_SRCDIR = $(srcdir)/$(JABBR_CLIENT_SUBDIR)/JabbR.Client
+JABBR_CLIENT_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(JABBR_CLIENT_SRCDIR)/$(pattern)))
+JABBR_CLIENT_EXTRA_FILES = \
+	$(JABBR_CLIENT_BUILD_FILE) \
+	$(JABBR_CLIENT_SRCDIR)/../JabbR/Models/ClientMessage.cs \
+	$(JABBR_CLIENT_SRCDIR)/../JabbR/Models/ClientNotification.cs
+#JABBR_CLIENT_CLEAN_FILES = $(OBJECT_DIR)/Newtonsoft.Json.Dynamic.snk
+JABBR_CLIENT_ASSEMBLY_NAME = JabbR.Client.dll
+JABBR_CLIENT_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(JABBR_CLIENT_ASSEMBLY_NAME)
+JABBR_CLIENT_BUILD_FILE = $(JABBR_CLIENT_SRCDIR)/JabbR.Client.csproj
+JABBR_CLIENT_XBUILD_FLAGS = $(XBUILD_FLAGS)
+
 # magic automake variables
 if ENABLE_ENGINE_TWITTER
+EXTRA_JSON_LIBS = \
+	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb
 EXTRA_TWITTER_LIBS = \
-	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb \
 	$(TWITTERIZER_ASSEMBLY_TARGET) $(TWITTERIZER_ASSEMBLY_TARGET).mdb
 endif
 if ENABLE_ENGINE_XMPP
 EXTRA_XMPP_LIBS = \
 	$(JABBER_NET_ASSEMBLY_TARGET) $(JABBER_NET_ASSEMBLY_TARGET).mdb
 endif
+if ENABLE_ENGINE_JABBR
+EXTRA_JSON_LIBS = \
+	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb
+EXTRA_JABBR_LIBS = \
+	$(SIGNALR_CLIENT_ASSEMBLY_TARGET) $(SIGNALR_CLIENT_ASSEMBLY_TARGET).mdb \
+	$(JABBR_CLIENT_ASSEMBLY_TARGET) $(JABBR_CLIENT_ASSEMBLY_TARGET).mdb
+endif
+
+if ENABLE_ENGINE_IRC
+EXTRA_IRC_LIBS = \
+	$(SMARTIRC4NET_ASSEMBLY_TARGET) $(SMARTIRC4NET_ASSEMBLY_TARGET).mdb
+endif
+
+EXTRA_PROXY_LIBS = \
+	$(STARKSOFTPROXY_ASSEMBLY_TARGET) $(STARKSOFTPROXY_ASSEMBLY_TARGET).mdb
+
 if BUNDLE_DB4O
 EXTRA_DB4O_LIBS = \
 	$(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb
@@ -129,7 +190,15 @@ EXTRA_DB4O_LIBS = \
 #	$(DB4O_NQ_ASSEMBLY_TARGET) $(DB4O_NQ_ASSEMBLY_TARGET).mdb
 endif
 pkgappdir = $(pkglibdir)
-pkgapp_DATA = $(EXTRA_SERVICESTACK_LIBS) $(EXTRA_TWITTER_LIBS) $(EXTRA_XMPP_LIBS) $(EXTRA_DB4O_LIBS)
+pkgapp_DATA = \
+	$(EXTRA_SERVICESTACK_LIBS) \
+	$(EXTRA_JSON_LIBS) \
+	$(EXTRA_TWITTER_LIBS) \
+	$(EXTRA_XMPP_LIBS) \
+	$(EXTRA_DB4O_LIBS) \
+        $(EXTRA_IRC_LIBS) \
+        $(EXTRA_PROXY_LIBS) \
+	$(EXTRA_JABBR_LIBS)
 
 EXTRA_DIST = \
 	$(SERVICESTACK_TEXT_SRCDIR) $(SERVICESTACK_TEXT_EXTRA_FILES) \
@@ -138,7 +207,11 @@ EXTRA_DIST = \
 	$(JSON_SRCDIR) $(JSON_EXTRA_FILES) \
 	$(TWITTERIZER_SRCDIR) $(TWITTERIZER_EXTRA_FILES) \
 	$(JABBER_NET_SRCDIR) $(JABBER_NET_EXTRA_FILES) \
-	$(DB4O_SRCDIR) $(DB4O_EXTRA_FILES)
+	$(DB4O_SRCDIR) $(DB4O_EXTRA_FILES) \
+	$(STARKSOFTPROXY_SRCDIR) $(STARKSOFTPROXY_EXTRA_FILES) \
+	$(SMARTIRC4NET_SRCDIR) $(SMARTIRC4NET_EXTRA_FILES) \
+	$(SIGNALR_CLIENT_SOURCE_FILES) $(SIGNALR_CLIENT_EXTRA_FILES) \
+	$(JABBR_CLIENT_SOURCE_FILES) $(JABBR_CLIENT_EXTRA_FILES)
 
 #	 $(SERVICESTACK_TEXT_SOURCE_FILES) $(SERVICESTACK_TEXT_BUILD_FILE) \
 #	 $(SERVICESTACK_INTERFACES_SOURCE_FILES) $(SERVICESTACK_INTERFACES_BUILD_FILE) \
@@ -153,7 +226,11 @@ EXTRA_DIST = \
 CLEANFILES = \
 	$(JSON_CLEAN_FILES) \
 	$(JABBER_NET_CLEAN_FILES) \
-	$(TWITTERIZER_CLEAN_FILES)
+	$(TWITTERIZER_CLEAN_FILES) \
+	$(SIGNALR_CLIENT_CLEAN_FILES) \
+	$(SMARTIRC4NET_CLEAN_FILES) \
+	$(STARKSOFTPROXY_CLEAN_FILES) \
+	$(JABBR_CLIENT_CLEAN_FILES)
 # end of magic
 
 $(SERVICESTACK_TEXT_ASSEMBLY_TARGET) $(SERVICESTACK_TEXT_ASSEMBLY_TARGET).mdb: $(SERVICESTACK_TEXT_BUILD_FILE) $(SERVICESTACK_TEXT_SOURCE_FILES)
@@ -173,6 +250,12 @@ $(TWITTERIZER_ASSEMBLY_TARGET) $(TWITTERIZER_ASSEMBLY_TARGET).mdb: $(TWITTERIZER
 
 $(JABBER_NET_ASSEMBLY_TARGET) $(JABBER_NET_ASSEMBLY_TARGET).mdb: $(JABBER_NET_BUILD_FILE) $(JABBER_NET_SOURCE_FILES)
 	$(XBUILD) $(JABBER_NET_XBUILD_FLAGS) $(JABBER_NET_BUILD_FILE)
+	
+$(SMARTIRC4NET_ASSEMBLY_TARGET) $(SMARTIRC4NET_ASSEMBLY_TARGET).mdb: $(SMARTIRC4NET_BUILD_FILE) $(SMARTIRC4NET_SOURCE_FILES)
+	$(XBUILD) $(SMARTIRC4NET_XBUILD_FLAGS) $(SMARTIRC4NET_BUILD_FILE)
+	
+$(STARKSOFTPROXY_ASSEMBLY_TARGET) $(STARKSOFTPROXY_ASSEMBLY_TARGET).mdb: $(STARKSOFTPROXY_BUILD_FILE) $(STARKSOFTPROXY_SOURCE_FILES)
+	$(XBUILD) $(STARKSOFTPROXY_XBUILD_FLAGS) $(STARKSOFTPROXY_BUILD_FILE)
 
 $(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb: $(DB4O_BUILD_FILE) $(DB4O_SOURCE_FILES)
 	$(XBUILD) $(DB4O_XBUILD_FLAGS) $(DB4O_BUILD_FILE)
@@ -183,10 +266,20 @@ $(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb: $(DB4O_BUILD_FILE) $(DB4O_S
 #$(DB4O_NQ_ASSEMBLY_TARGET) $(DB4O_NQ_ASSEMBLY_TARGET).mdb: $(DB4O_NQ_BUILD_FILE) $(DB4O_NQ_SOURCE_FILES)
 #	$(XBUILD) $(DB4O_NQ_XBUILD_FLAGS) $(DB4O_NQ_BUILD_FILE)
 
+$(SIGNALR_CLIENT_ASSEMBLY_TARGET) $(SIGNALR_CLIENT_ASSEMBLY_TARGET).mdb: $(SIGNALR_CLIENT_BUILD_FILE) $(SIGNALR_CLIENT_SOURCE_FILES)
+	$(XBUILD) $(SIGNALR_CLIENT_XBUILD_FLAGS) $(SIGNALR_CLIENT_BUILD_FILE)
+
+$(JABBR_CLIENT_ASSEMBLY_TARGET) $(JABBR_CLIENT_ASSEMBLY_TARGET).mdb: $(JABBR_CLIENT_BUILD_FILE) $(JABBR_CLIENT_SOURCE_FILES)
+	$(XBUILD) $(JABBR_CLIENT_XBUILD_FLAGS) $(JABBR_CLIENT_BUILD_FILE)
+
 clean-local:
 	$(XBUILD) $(SERVICESTACK_TEXT_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_TEXT_BUILD_FILE)
 	$(XBUILD) $(SERVICESTACK_INTERFACES_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_INTERFACES_BUILD_FILE)
 	$(XBUILD) $(SERVICESTACK_COMMON_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_COMMON_BUILD_FILE)
+if ENABLE_ENGINE_IRC
+	$(XBUILD) $(SMARTIRC4NET_XBUILD_FLAGS) /t:Clean $(SMARTIRC4NET_BUILD_FILE)
+endif
+	$(XBUILD) $(STARKSOFTPROXY_XBUILD_FLAGS) /t:Clean $(STARKSOFTPROXY_BUILD_FILE)
 if ENABLE_ENGINE_TWITTER
 	$(XBUILD) $(JSON_XBUILD_FLAGS) /t:Clean $(JSON_BUILD_FILE)
 	$(XBUILD) $(TWITTERIZER_XBUILD_FLAGS) /t:Clean $(TWITTERIZER_BUILD_FILE)
@@ -194,6 +287,11 @@ endif
 if ENABLE_ENGINE_XMPP
 	$(XBUILD) $(JABBER_NET_XBUILD_FLAGS) /t:Clean $(JABBER_NET_BUILD_FILE)
 endif
+if ENABLE_ENGINE_JABBR
+	$(XBUILD) $(JSON_XBUILD_FLAGS) /t:Clean $(JSON_BUILD_FILE)
+	$(XBUILD) $(SIGNALR_CLIENT_XBUILD_FLAGS) /t:Clean $(SIGNALR_CLIENT_BUILD_FILE)
+	$(XBUILD) $(JABBR_CLIENT_XBUILD_FLAGS) /t:Clean $(JABBR_CLIENT_BUILD_FILE)
+endif
 if BUNDLE_DB4O
 	$(XBUILD) $(DB4O_XBUILD_FLAGS) /t:Clean $(DB4O_BUILD_FILE)
 #	$(XBUILD) $(DB4O_INSTR_XBUILD_FLAGS) /t:Clean $(DB4O_INSTR_BUILD_FILE)
diff --git a/lib/Makefile.in b/lib/Makefile.in
index a601c90..0026526 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,23 +15,51 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,7 +79,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = lib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
 	$(top_srcdir)/intltool.m4 $(top_srcdir)/libtool.m4 \
@@ -65,15 +92,28 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -110,9 +150,29 @@ am__installdirs = "$(DESTDIR)$(pkgappdir)"
 DATA = $(pkgapp_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
 	distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -185,6 +245,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -289,7 +350,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -365,9 +425,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 twitter_api_key = @twitter_api_key@
-SUBDIRS = SmartIrc4net \
-			$(MESSAGINGMENU_SHARP_SUBDIR)
-
+SUBDIRS = $(MESSAGINGMENU_SHARP_SUBDIR)
 @WITH_MESSAGINGMENU_SHARP_INCLUDED_TRUE at MESSAGINGMENU_SHARP_SUBDIR = messagingmenu-sharp
 # HACK: override DIST_SUBDIRS so distcheck/distclean works on systems without
 # libmessaging-menu-dev installed
@@ -437,18 +495,33 @@ TWITTERIZER_ASSEMBLY_NAME = Twitterizer2.dll
 TWITTERIZER_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(TWITTERIZER_ASSEMBLY_NAME)
 TWITTERIZER_BUILD_FILE = $(TWITTERIZER_SRCDIR)/Twitterizer2.csproj
 TWITTERIZER_XBUILD_FLAGS = $(XBUILD_FLAGS) /p:PostBuildEvent=
-JABBER_NET_SUBDIR = jabber-net
+JABBER_NET_SUBDIR = agsxmpp/agsxmpp
 JABBER_NET_SRCDIR = $(srcdir)/$(JABBER_NET_SUBDIR)
 JABBER_NET_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(JABBER_NET_SRCDIR)/$(pattern)))
-JABBER_NET_EXTRA_FILES = \
-	$(JABBER_NET_BUILD_FILE) \
-	$(wildcard $(JABBER_NET_SRCDIR)/jabber/*/*.bmp) $(wildcard $(JABBER_NET_SRCDIR)/jabber/*/*.resx)
-
+JABBER_NET_EXTRA_FILES = $(JABBER_NET_SRCDIR)/agsxmpp.csproj
 JABBER_NET_CLEAN_FILES = $(wildcard $(OBJECT_DIR)/*.bmp)
-JABBER_NET_ASSEMBLY_NAME = jabber-net.dll
+JABBER_NET_ASSEMBLY_NAME = agsxmpp.dll
 JABBER_NET_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(JABBER_NET_ASSEMBLY_NAME)
-JABBER_NET_BUILD_FILE = $(JABBER_NET_SRCDIR)/2005-jabber-net.csproj
-JABBER_NET_XBUILD_FLAGS = $(XBUILD_FLAGS)
+JABBER_NET_BUILD_FILE = $(JABBER_NET_SRCDIR)/agsxmpp.csproj
+JABBER_NET_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="TRACE,DEBUG,SSL,STRINGPREP,MONO"
+STARKSOFTPROXY_SUBDIR = StarkSoftProxy
+STARKSOFTPROXY_SRCDIR = $(srcdir)/$(STARKSOFTPROXY_SUBDIR)
+STARKSOFTPROXY_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(STARKSOFTPROXY_SRCDIR)/$(pattern)))
+STARKSOFTPROXY_EXTRA_FILES = $(STARKSOFTPROXY_SRCDIR)/StarkSoftProxy.csproj
+STARKSOFTPROXY_CLEAN_FILES = 
+STARKSOFTPROXY_ASSEMBLY_NAME = StarkSoftProxy.dll
+STARKSOFTPROXY_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(STARKSOFTPROXY_ASSEMBLY_NAME)
+STARKSOFTPROXY_BUILD_FILE = $(STARKSOFTPROXY_SRCDIR)/StarkSoftProxy.csproj
+STARKSOFTPROXY_XBUILD_FLAGS = $(XBUILD_FLAGS)
+SMARTIRC4NET_SUBDIR = SmartIrc4net
+SMARTIRC4NET_SRCDIR = $(srcdir)/$(SMARTIRC4NET_SUBDIR)
+SMARTIRC4NET_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(SMARTIRC4NET_SRCDIR)/$(pattern)))
+SMARTIRC4NET_EXTRA_FILES = $(SMARTIRC4NET_SRCDIR)/SmartIrc4net.csproj
+SMARTIRC4NET_CLEAN_FILES = 
+SMARTIRC4NET_ASSEMBLY_NAME = Meebey.SmartIrc4net.dll
+SMARTIRC4NET_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(SMARTIRC4NET_ASSEMBLY_NAME)
+SMARTIRC4NET_BUILD_FILE = $(SMARTIRC4NET_SRCDIR)/SmartIrc4net.csproj
+SMARTIRC4NET_XBUILD_FLAGS = $(XBUILD_FLAGS)
 DB4O_SUBDIR = db4o-net
 DB4O_SRCDIR = $(srcdir)/$(DB4O_SUBDIR)/Db4objects.Db4o
 DB4O_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(DB4O_SRCDIR)/$(pattern)))
@@ -471,22 +544,74 @@ DB4O_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="NET_3_5,MONO,EMBE
 #DB4O_NQ_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(DB4O_NQ_ASSEMBLY_NAME)
 #DB4O_NQ_BUILD_FILE = $(DB4O_NQ_SRCDIR)/Db4objects.Db4o.NativeQueries-2008.csproj
 #DB4O_NQ_XBUILD_FLAGS = $(DB4O_XBUILD_FLAGS)
+SIGNALR_CLIENT_SUBDIR = SignalR
+SIGNALR_CLIENT_SRCDIR = $(srcdir)/$(SIGNALR_CLIENT_SUBDIR)/src/Microsoft.AspNet.SignalR.Client
+SIGNALR_CLIENT_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(SIGNALR_CLIENT_SRCDIR)/$(pattern))) \
+	$(foreach file, ../Common/CommonAssemblyInfo.cs ../Common/CommonVersionInfo.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs ../Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs ../Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs, $(SIGNALR_CLIENT_SRCDIR)/$(file))
+
+SIGNALR_CLIENT_EXTRA_FILES = \
+	$(SIGNALR_CLIENT_BUILD_FILE) \
+	$(SIGNALR_CLIENT_SRCDIR)/Resources.resx \
+	$(SIGNALR_CLIENT_SRCDIR)/../Common/Microsoft.AspNet.SignalR.targets
+
+#SIGNALR_CLIENT_CLEAN_FILES = $(OBJECT_DIR)/Newtonsoft.Json.Dynamic.snk
+SIGNALR_CLIENT_ASSEMBLY_NAME = Microsoft.AspNet.SignalR.Client.dll
+SIGNALR_CLIENT_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(SIGNALR_CLIENT_ASSEMBLY_NAME)
+SIGNALR_CLIENT_BUILD_FILE = $(SIGNALR_CLIENT_SRCDIR)/Microsoft.AspNet.SignalR.Client.csproj
+SIGNALR_CLIENT_XBUILD_FLAGS = $(XBUILD_FLAGS) /property:DefineConstants="MONO"
+JABBR_CLIENT_SUBDIR = JabbR
+JABBR_CLIENT_SRCDIR = $(srcdir)/$(JABBR_CLIENT_SUBDIR)/JabbR.Client
+JABBR_CLIENT_SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(JABBR_CLIENT_SRCDIR)/$(pattern)))
+JABBR_CLIENT_EXTRA_FILES = \
+	$(JABBR_CLIENT_BUILD_FILE) \
+	$(JABBR_CLIENT_SRCDIR)/../JabbR/Models/ClientMessage.cs \
+	$(JABBR_CLIENT_SRCDIR)/../JabbR/Models/ClientNotification.cs
+
+#JABBR_CLIENT_CLEAN_FILES = $(OBJECT_DIR)/Newtonsoft.Json.Dynamic.snk
+JABBR_CLIENT_ASSEMBLY_NAME = JabbR.Client.dll
+JABBR_CLIENT_ASSEMBLY_TARGET = $(OUTPUT_DIR)/$(JABBR_CLIENT_ASSEMBLY_NAME)
+JABBR_CLIENT_BUILD_FILE = $(JABBR_CLIENT_SRCDIR)/JabbR.Client.csproj
+JABBR_CLIENT_XBUILD_FLAGS = $(XBUILD_FLAGS)
+ at ENABLE_ENGINE_JABBR_TRUE@EXTRA_JSON_LIBS = \
+ at ENABLE_ENGINE_JABBR_TRUE@	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb
+
 
 # magic automake variables
+ at ENABLE_ENGINE_TWITTER_TRUE@EXTRA_JSON_LIBS = \
+ at ENABLE_ENGINE_TWITTER_TRUE@	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb
+
 @ENABLE_ENGINE_TWITTER_TRUE at EXTRA_TWITTER_LIBS = \
- at ENABLE_ENGINE_TWITTER_TRUE@	$(JSON_ASSEMBLY_TARGET) $(JSON_ASSEMBLY_TARGET).mdb \
 @ENABLE_ENGINE_TWITTER_TRUE@	$(TWITTERIZER_ASSEMBLY_TARGET) $(TWITTERIZER_ASSEMBLY_TARGET).mdb
 
 @ENABLE_ENGINE_XMPP_TRUE at EXTRA_XMPP_LIBS = \
 @ENABLE_ENGINE_XMPP_TRUE@	$(JABBER_NET_ASSEMBLY_TARGET) $(JABBER_NET_ASSEMBLY_TARGET).mdb
 
+ at ENABLE_ENGINE_JABBR_TRUE@EXTRA_JABBR_LIBS = \
+ at ENABLE_ENGINE_JABBR_TRUE@	$(SIGNALR_CLIENT_ASSEMBLY_TARGET) $(SIGNALR_CLIENT_ASSEMBLY_TARGET).mdb \
+ at ENABLE_ENGINE_JABBR_TRUE@	$(JABBR_CLIENT_ASSEMBLY_TARGET) $(JABBR_CLIENT_ASSEMBLY_TARGET).mdb
+
+ at ENABLE_ENGINE_IRC_TRUE@EXTRA_IRC_LIBS = \
+ at ENABLE_ENGINE_IRC_TRUE@	$(SMARTIRC4NET_ASSEMBLY_TARGET) $(SMARTIRC4NET_ASSEMBLY_TARGET).mdb
+
+EXTRA_PROXY_LIBS = \
+	$(STARKSOFTPROXY_ASSEMBLY_TARGET) $(STARKSOFTPROXY_ASSEMBLY_TARGET).mdb
+
 @BUNDLE_DB4O_TRUE at EXTRA_DB4O_LIBS = \
 @BUNDLE_DB4O_TRUE@	$(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb
 
 #	$(DB4O_INSTR_ASSEMBLY_TARGET) $(DB4O_INSTR_ASSEMBLY_TARGET).mdb \
 #	$(DB4O_NQ_ASSEMBLY_TARGET) $(DB4O_NQ_ASSEMBLY_TARGET).mdb
 pkgappdir = $(pkglibdir)
-pkgapp_DATA = $(EXTRA_SERVICESTACK_LIBS) $(EXTRA_TWITTER_LIBS) $(EXTRA_XMPP_LIBS) $(EXTRA_DB4O_LIBS)
+pkgapp_DATA = \
+	$(EXTRA_SERVICESTACK_LIBS) \
+	$(EXTRA_JSON_LIBS) \
+	$(EXTRA_TWITTER_LIBS) \
+	$(EXTRA_XMPP_LIBS) \
+	$(EXTRA_DB4O_LIBS) \
+        $(EXTRA_IRC_LIBS) \
+        $(EXTRA_PROXY_LIBS) \
+	$(EXTRA_JABBR_LIBS)
+
 EXTRA_DIST = \
 	$(SERVICESTACK_TEXT_SRCDIR) $(SERVICESTACK_TEXT_EXTRA_FILES) \
 	$(SERVICESTACK_INTERFACES_SRCDIR) $(SERVICESTACK_INTERFACES_EXTRA_FILES) \
@@ -494,7 +619,11 @@ EXTRA_DIST = \
 	$(JSON_SRCDIR) $(JSON_EXTRA_FILES) \
 	$(TWITTERIZER_SRCDIR) $(TWITTERIZER_EXTRA_FILES) \
 	$(JABBER_NET_SRCDIR) $(JABBER_NET_EXTRA_FILES) \
-	$(DB4O_SRCDIR) $(DB4O_EXTRA_FILES)
+	$(DB4O_SRCDIR) $(DB4O_EXTRA_FILES) \
+	$(STARKSOFTPROXY_SRCDIR) $(STARKSOFTPROXY_EXTRA_FILES) \
+	$(SMARTIRC4NET_SRCDIR) $(SMARTIRC4NET_EXTRA_FILES) \
+	$(SIGNALR_CLIENT_SOURCE_FILES) $(SIGNALR_CLIENT_EXTRA_FILES) \
+	$(JABBR_CLIENT_SOURCE_FILES) $(JABBR_CLIENT_EXTRA_FILES)
 
 
 #	 $(SERVICESTACK_TEXT_SOURCE_FILES) $(SERVICESTACK_TEXT_BUILD_FILE) \
@@ -509,7 +638,11 @@ EXTRA_DIST = \
 CLEANFILES = \
 	$(JSON_CLEAN_FILES) \
 	$(JABBER_NET_CLEAN_FILES) \
-	$(TWITTERIZER_CLEAN_FILES)
+	$(TWITTERIZER_CLEAN_FILES) \
+	$(SIGNALR_CLIENT_CLEAN_FILES) \
+	$(SMARTIRC4NET_CLEAN_FILES) \
+	$(STARKSOFTPROXY_CLEAN_FILES) \
+	$(JABBR_CLIENT_CLEAN_FILES)
 
 all: all-recursive
 
@@ -573,22 +706,25 @@ uninstall-pkgappDATA:
 	dir='$(DESTDIR)$(pkgappdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -603,57 +739,12 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -669,12 +760,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -686,15 +772,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -703,6 +785,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -811,12 +908,11 @@ ps-am:
 
 uninstall-am: uninstall-pkgappDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
 
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	clean-local ctags ctags-recursive distclean distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool clean-local \
+	cscopelist-am ctags ctags-am distclean distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
@@ -826,8 +922,7 @@ uninstall-am: uninstall-pkgappDATA
 	installcheck installcheck-am installdirs installdirs-am \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags tags-recursive uninstall uninstall-am \
-	uninstall-pkgappDATA
+	tags tags-am uninstall uninstall-am uninstall-pkgappDATA
 
 # end of magic
 
@@ -849,6 +944,12 @@ $(TWITTERIZER_ASSEMBLY_TARGET) $(TWITTERIZER_ASSEMBLY_TARGET).mdb: $(TWITTERIZER
 $(JABBER_NET_ASSEMBLY_TARGET) $(JABBER_NET_ASSEMBLY_TARGET).mdb: $(JABBER_NET_BUILD_FILE) $(JABBER_NET_SOURCE_FILES)
 	$(XBUILD) $(JABBER_NET_XBUILD_FLAGS) $(JABBER_NET_BUILD_FILE)
 
+$(SMARTIRC4NET_ASSEMBLY_TARGET) $(SMARTIRC4NET_ASSEMBLY_TARGET).mdb: $(SMARTIRC4NET_BUILD_FILE) $(SMARTIRC4NET_SOURCE_FILES)
+	$(XBUILD) $(SMARTIRC4NET_XBUILD_FLAGS) $(SMARTIRC4NET_BUILD_FILE)
+
+$(STARKSOFTPROXY_ASSEMBLY_TARGET) $(STARKSOFTPROXY_ASSEMBLY_TARGET).mdb: $(STARKSOFTPROXY_BUILD_FILE) $(STARKSOFTPROXY_SOURCE_FILES)
+	$(XBUILD) $(STARKSOFTPROXY_XBUILD_FLAGS) $(STARKSOFTPROXY_BUILD_FILE)
+
 $(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb: $(DB4O_BUILD_FILE) $(DB4O_SOURCE_FILES)
 	$(XBUILD) $(DB4O_XBUILD_FLAGS) $(DB4O_BUILD_FILE)
 
@@ -858,13 +959,24 @@ $(DB4O_ASSEMBLY_TARGET) $(DB4O_ASSEMBLY_TARGET).mdb: $(DB4O_BUILD_FILE) $(DB4O_S
 #$(DB4O_NQ_ASSEMBLY_TARGET) $(DB4O_NQ_ASSEMBLY_TARGET).mdb: $(DB4O_NQ_BUILD_FILE) $(DB4O_NQ_SOURCE_FILES)
 #	$(XBUILD) $(DB4O_NQ_XBUILD_FLAGS) $(DB4O_NQ_BUILD_FILE)
 
+$(SIGNALR_CLIENT_ASSEMBLY_TARGET) $(SIGNALR_CLIENT_ASSEMBLY_TARGET).mdb: $(SIGNALR_CLIENT_BUILD_FILE) $(SIGNALR_CLIENT_SOURCE_FILES)
+	$(XBUILD) $(SIGNALR_CLIENT_XBUILD_FLAGS) $(SIGNALR_CLIENT_BUILD_FILE)
+
+$(JABBR_CLIENT_ASSEMBLY_TARGET) $(JABBR_CLIENT_ASSEMBLY_TARGET).mdb: $(JABBR_CLIENT_BUILD_FILE) $(JABBR_CLIENT_SOURCE_FILES)
+	$(XBUILD) $(JABBR_CLIENT_XBUILD_FLAGS) $(JABBR_CLIENT_BUILD_FILE)
+
 clean-local:
 	$(XBUILD) $(SERVICESTACK_TEXT_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_TEXT_BUILD_FILE)
 	$(XBUILD) $(SERVICESTACK_INTERFACES_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_INTERFACES_BUILD_FILE)
 	$(XBUILD) $(SERVICESTACK_COMMON_XBUILD_FLAGS) /t:Clean $(SERVICESTACK_COMMON_BUILD_FILE)
+ at ENABLE_ENGINE_IRC_TRUE@	$(XBUILD) $(SMARTIRC4NET_XBUILD_FLAGS) /t:Clean $(SMARTIRC4NET_BUILD_FILE)
+	$(XBUILD) $(STARKSOFTPROXY_XBUILD_FLAGS) /t:Clean $(STARKSOFTPROXY_BUILD_FILE)
 @ENABLE_ENGINE_TWITTER_TRUE@	$(XBUILD) $(JSON_XBUILD_FLAGS) /t:Clean $(JSON_BUILD_FILE)
 @ENABLE_ENGINE_TWITTER_TRUE@	$(XBUILD) $(TWITTERIZER_XBUILD_FLAGS) /t:Clean $(TWITTERIZER_BUILD_FILE)
 @ENABLE_ENGINE_XMPP_TRUE@	$(XBUILD) $(JABBER_NET_XBUILD_FLAGS) /t:Clean $(JABBER_NET_BUILD_FILE)
+ at ENABLE_ENGINE_JABBR_TRUE@	$(XBUILD) $(JSON_XBUILD_FLAGS) /t:Clean $(JSON_BUILD_FILE)
+ at ENABLE_ENGINE_JABBR_TRUE@	$(XBUILD) $(SIGNALR_CLIENT_XBUILD_FLAGS) /t:Clean $(SIGNALR_CLIENT_BUILD_FILE)
+ at ENABLE_ENGINE_JABBR_TRUE@	$(XBUILD) $(JABBR_CLIENT_XBUILD_FLAGS) /t:Clean $(JABBR_CLIENT_BUILD_FILE)
 @BUNDLE_DB4O_TRUE@	$(XBUILD) $(DB4O_XBUILD_FLAGS) /t:Clean $(DB4O_BUILD_FILE)
 #	$(XBUILD) $(DB4O_INSTR_XBUILD_FLAGS) /t:Clean $(DB4O_INSTR_BUILD_FILE)
 #	$(XBUILD) $(DB4O_NQ_XBUILD_FLAGS) /t:Clean $(DB4O_NQ_BUILD_FILE)
diff --git a/lib/SignalR/src/Common/CommonAssemblyInfo.cs b/lib/SignalR/src/Common/CommonAssemblyInfo.cs
new file mode 100644
index 0000000..c245672
--- /dev/null
+++ b/lib/SignalR/src/Common/CommonAssemblyInfo.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyCompany("Microsoft Open Technologies, Inc.")]
+[assembly: AssemblyCopyright("© Microsoft Open Technologies, Inc. All rights reserved.")]
+
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+
+[assembly: NeutralResourcesLanguage("en-US")]
\ No newline at end of file
diff --git a/lib/SignalR/src/Common/CommonVersionInfo.cs b/lib/SignalR/src/Common/CommonVersionInfo.cs
new file mode 100644
index 0000000..da1575b
--- /dev/null
+++ b/lib/SignalR/src/Common/CommonVersionInfo.cs
@@ -0,0 +1,7 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Reflection;
+
+[assembly: AssemblyVersion("1.1.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
+[assembly: AssemblyInformationalVersion("1.1.2")]
diff --git a/lib/SignalR/src/Common/Microsoft.AspNet.SignalR.targets b/lib/SignalR/src/Common/Microsoft.AspNet.SignalR.targets
new file mode 100644
index 0000000..291b985
--- /dev/null
+++ b/lib/SignalR/src/Common/Microsoft.AspNet.SignalR.targets
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="'$(ArtifactsDir)' != ''">
+    <OutputPath Condition="$(UseBinPath) == ''">$(ArtifactsDir)\$(MSBuildProjectName)</OutputPath>
+    <OutputPath Condition="$(UseBinPath) == 'true'">$(ArtifactsDir)\$(MSBuildProjectName)\bin</OutputPath>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Microsoft.AspNet.SignalR.ruleset</CodeAnalysisRuleSet>
+    <RunCodeAnalysis Condition="'$(RunCodeAnalysis)' == ''">false</RunCodeAnalysis>
+    <NoWarn>1591</NoWarn>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(RunCodeAnalysis)' == 'true'">
+      <DefineConstants>$(DefineConstants);CODE_ANALYSIS</DefineConstants>
+      <VisualStudioVersion>11.0</VisualStudioVersion>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
+      <DefineConstants>$(DefineConstants);MONO</DefineConstants>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(KeyFile)' != '' And '$(DisableSigning)' != 'true'">
+    <DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
+    <SignAssembly>true</SignAssembly>
+    <DelaySign>true</DelaySign>
+    <AssemblyOriginatorKeyFile>$(KeyFile)</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+
+  <ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)GlobalSuppressions.cs')">
+    <Compile Include="$(MSBuildThisFileDirectory)GlobalSuppressions.cs">
+        <Link>GlobalSuppressions.cs</Link>
+    </Compile>
+  </ItemGroup>
+
+  <ItemGroup>
+  <CodeAnalysisDictionary Include="$(MSBuildThisFileDirectory)CodeAnalysisDictionary.xml" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Connection.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Connection.cs
new file mode 100644
index 0000000..aa1b91f
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Connection.cs
@@ -0,0 +1,796 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Client.Transports;
+using Microsoft.AspNet.SignalR.Infrastructure;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+#if (NET4 || NET45)
+using System.Security.Cryptography.X509Certificates;
+#endif
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    /// <summary>
+    /// Provides client connections for SignalR services.
+    /// </summary>
+    [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "_disconnectCts is disposed on disconnect.")]
+    public class Connection : IConnection
+    {
+        internal static readonly TimeSpan DefaultAbortTimeout = TimeSpan.FromSeconds(30);
+
+        private static Version _assemblyVersion;
+
+        private IClientTransport _transport;
+
+        // Propagates notification that connection should be stopped.
+        private CancellationTokenSource _disconnectCts;
+
+        // The amount of time the client should attempt to reconnect before stopping.
+        private TimeSpan _disconnectTimeout;
+
+        // Provides a way to cancel the the timeout that stops a reconnect cycle
+        private IDisposable _disconnectTimeoutOperation;
+
+        // The default connection state is disconnected
+        private ConnectionState _state;
+
+        private KeepAliveData _keepAliveData;
+
+        private Task _connectTask;
+
+        private TextWriter _traceWriter;
+
+        // Used to synchronize state changes
+        private readonly object _stateLock = new object();
+
+        // Used to synchronize starting and stopping specifically
+        private readonly object _startLock = new object();
+
+        // Used to ensure we don't write to the Trace TextWriter from multiple threads simultaneously 
+        private readonly object _traceLock = new object();
+
+        // Keeps track of when the last keep alive from the server was received
+        private HeartbeatMonitor _monitor;
+
+        //The json serializer for the connections
+        private JsonSerializer _jsonSerializer = new JsonSerializer();
+
+#if (NET4 || NET45)
+        private readonly X509CertificateCollection certCollection = new X509CertificateCollection();
+#endif
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> has received data from the server.
+        /// </summary>
+        public event Action<string> Received;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> has encountered an error.
+        /// </summary>
+        public event Action<Exception> Error;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> is stopped.
+        /// </summary>
+        public event Action Closed;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> starts reconnecting after an error.
+        /// </summary>
+        public event Action Reconnecting;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> successfully reconnects after a timeout.
+        /// </summary>
+        public event Action Reconnected;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> state changes.
+        /// </summary>
+        public event Action<StateChange> StateChanged;
+
+        /// <summary>
+        /// Occurs when the <see cref="Connection"/> is about to timeout
+        /// </summary>
+        public event Action ConnectionSlow;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Connection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        public Connection(string url)
+            : this(url, (string)null)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Connection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        public Connection(string url, IDictionary<string, string> queryString)
+            : this(url, CreateQueryString(queryString))
+        {
+
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Connection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        public Connection(string url, string queryString)
+        {
+            if (url == null)
+            {
+                throw new ArgumentNullException("url");
+            }
+
+            if (url.Contains("?"))
+            {
+                throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UrlCantContainQueryStringDirectly), "url");
+            }
+
+            if (!url.EndsWith("/", StringComparison.Ordinal))
+            {
+                url += "/";
+            }
+
+            Url = url;
+            QueryString = queryString;
+            _disconnectTimeoutOperation = DisposableAction.Empty;
+            Items = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
+            State = ConnectionState.Disconnected;
+            TraceLevel = TraceLevels.All;
+            TraceWriter = new DebugTextWriter();
+            Headers = new HeaderDictionary(this);
+        }
+
+        /// <summary>
+        /// Object to store the various keep alive timeout values
+        /// </summary>
+        KeepAliveData IConnection.KeepAliveData
+        {
+            get
+            {
+                return _keepAliveData;
+            }
+            set
+            {
+                _keepAliveData = value;
+            }
+        }
+
+        public TraceLevels TraceLevel { get; set; }
+
+        public TextWriter TraceWriter
+        {
+            get
+            {
+                return _traceWriter;
+            }
+            set
+            {
+                if (value == null)
+                {
+                    throw new ArgumentNullException("value");
+                }
+
+                _traceWriter = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the serializer used by the connection
+        /// </summary>
+        public JsonSerializer JsonSerializer
+        {
+            get
+            {
+                return _jsonSerializer;
+            }
+            set
+            {
+                if (value == null)
+                {
+                    throw new ArgumentNullException("value");
+                }
+
+                _jsonSerializer = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the cookies associated with the connection.
+        /// </summary>
+        public CookieContainer CookieContainer { get; set; }
+
+        /// <summary>
+        /// Gets or sets authentication information for the connection.
+        /// </summary>
+        public ICredentials Credentials { get; set; }
+
+        /// <summary>
+        /// Gets and sets headers for the requests
+        /// </summary>
+        public IDictionary<string, string> Headers { get; private set; }
+
+#if !SILVERLIGHT
+        /// <summary>
+        /// Gets of sets proxy information for the connection.
+        /// </summary>
+        public IWebProxy Proxy { get; set; }
+#endif
+
+        /// <summary>
+        /// Gets the url for the connection.
+        /// </summary>
+        public string Url { get; private set; }
+
+        /// <summary>
+        /// Gets or sets the last message id for the connection.
+        /// </summary>
+        public string MessageId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the connection id for the connection.
+        /// </summary>
+        public string ConnectionId { get; set; }
+
+        /// <summary>
+        /// Gets or sets the connection token for the connection.
+        /// </summary>
+        public string ConnectionToken { get; set; }
+
+        /// <summary>
+        /// Gets or sets the groups token for the connection.
+        /// </summary>
+        public string GroupsToken { get; set; }
+
+        /// <summary>
+        /// Gets a dictionary for storing state for a the connection.
+        /// </summary>
+        public IDictionary<string, object> Items { get; private set; }
+
+        /// <summary>
+        /// Gets the querystring specified in the ctor.
+        /// </summary>
+        public string QueryString { get; private set; }
+
+        public IClientTransport Transport
+        {
+            get
+            {
+                return _transport;
+            }
+        }
+
+        /// <summary>
+        /// Gets the current <see cref="ConnectionState"/> of the connection.
+        /// </summary>
+        public ConnectionState State
+        {
+            get
+            {
+                return _state;
+            }
+            private set
+            {
+                lock (_stateLock)
+                {
+                    if (_state != value)
+                    {
+                        var stateChange = new StateChange(oldState: _state, newState: value);
+                        _state = value;
+                        if (StateChanged != null)
+                        {
+                            StateChanged(stateChange);
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Starts the <see cref="Connection"/>.
+        /// </summary>
+        /// <returns>A task that represents when the connection has started.</returns>
+        public Task Start()
+        {
+            return Start(new DefaultHttpClient());
+        }
+
+        /// <summary>
+        /// Starts the <see cref="Connection"/>.
+        /// </summary>
+        /// <param name="httpClient">The http client</param>
+        /// <returns>A task that represents when the connection has started.</returns>
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "This is disposed on close")]
+        public Task Start(IHttpClient httpClient)
+        {
+            // Pick the best transport supported by the client
+            return Start(new AutoTransport(httpClient));
+        }
+
+        /// <summary>
+        /// Starts the <see cref="Connection"/>.
+        /// </summary>
+        /// <param name="transport">The transport to use.</param>
+        /// <returns>A task that represents when the connection has started.</returns>
+        public Task Start(IClientTransport transport)
+        {
+            lock (_startLock)
+            {
+                _connectTask = TaskAsyncHelper.Empty;
+                _disconnectCts = new CancellationTokenSource();
+
+                if (!ChangeState(ConnectionState.Disconnected, ConnectionState.Connecting))
+                {
+                    return _connectTask;
+                }
+
+                _monitor = new HeartbeatMonitor(this, _stateLock);
+                _transport = transport;
+
+                _connectTask = Negotiate(transport);
+            }
+
+            return _connectTask;
+        }
+
+        protected virtual string OnSending()
+        {
+            return null;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The exception is flowed back to the caller via the tcs.")]
+        private Task Negotiate(IClientTransport transport)
+        {
+            return transport.Negotiate(this)
+                            .Then(negotiationResponse =>
+                            {
+                                VerifyProtocolVersion(negotiationResponse.ProtocolVersion);
+
+                                ConnectionId = negotiationResponse.ConnectionId;
+                                ConnectionToken = negotiationResponse.ConnectionToken;
+                                _disconnectTimeout = TimeSpan.FromSeconds(negotiationResponse.DisconnectTimeout);
+
+                                // If we have a keep alive
+                                if (negotiationResponse.KeepAliveTimeout != null)
+                                {
+                                    _keepAliveData = new KeepAliveData(TimeSpan.FromSeconds(negotiationResponse.KeepAliveTimeout.Value));
+                                }
+
+                                var data = OnSending();
+                                return StartTransport(data);
+                            })
+                            .ContinueWithNotComplete(() => Disconnect());
+        }
+
+        private Task StartTransport(string data)
+        {
+            return _transport.Start(this, data, _disconnectCts.Token)
+                             .RunSynchronously(() =>
+                             {
+                                 ChangeState(ConnectionState.Connecting, ConnectionState.Connected);
+
+                                 if (_keepAliveData != null)
+                                 {
+                                     // Start the monitor to check for server activity
+                                     _monitor.Start();
+                                 }
+                             });
+        }
+
+        private bool ChangeState(ConnectionState oldState, ConnectionState newState)
+        {
+            return ((IConnection)this).ChangeState(oldState, newState);
+        }
+
+        bool IConnection.ChangeState(ConnectionState oldState, ConnectionState newState)
+        {
+            lock (_stateLock)
+            {
+                // If we're in the expected old state then change state and return true
+                if (_state == oldState)
+                {
+                    Trace(TraceLevels.StateChanges, "ChangeState({0}, {1})", oldState, newState);
+
+                    State = newState;
+                    return true;
+                }
+            }
+
+            // Invalid transition
+            return false;
+        }
+
+        private static void VerifyProtocolVersion(string versionString)
+        {
+            Version version;
+
+            if (String.IsNullOrEmpty(versionString) ||
+                !TryParseVersion(versionString, out version) ||
+                !(version.Major == 1 && version.Minor == 2))
+            {
+                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture,
+                                                                  Resources.Error_IncompatibleProtocolVersion,
+                                                                  "1.2",
+                                                                  versionString ?? "null"));
+            }
+        }
+
+        /// <summary>
+        /// Stops the <see cref="Connection"/> and sends an abort message to the server.
+        /// </summary>
+        public void Stop()
+        {
+            Stop(DefaultAbortTimeout);
+        }
+
+        /// <summary>
+        /// Stops the <see cref="Connection"/> and sends an abort message to the server.
+        /// <param name="timeout">The timeout</param>
+        /// </summary>
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We don't want to raise the Start exception on Stop.")]
+        public void Stop(TimeSpan timeout)
+        {
+            lock (_startLock)
+            {
+                // Wait for the connection to connect
+                if (_connectTask != null)
+                {
+                    try
+                    {
+                        _connectTask.Wait(timeout);
+                    }
+                    catch (Exception ex)
+                    {
+                        Trace(TraceLevels.Events, "Error: {0}", ex.GetBaseException());
+                    }
+                }
+
+                lock (_stateLock)
+                {
+                    // Do nothing if the connection is offline
+                    if (State != ConnectionState.Disconnected)
+                    {
+                        string connectionId = ConnectionId;
+
+                        Trace(TraceLevels.Events, "Stop");
+
+                        // Dispose the heart beat monitor so we don't fire notifications when waiting to abort
+                        _monitor.Dispose();
+
+                        _transport.Abort(this, timeout);
+
+                        Disconnect();
+
+                        _disconnectCts.Dispose();
+
+                        if (_transport != null)
+                        {
+                            Trace(TraceLevels.Events, "Transport.Dispose({0})", connectionId);
+
+                            _transport.Dispose();
+                            _transport = null;
+                        }
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Stops the <see cref="Connection"/> without sending an abort message to the server.
+        /// This function is called after we receive a disconnect message from the server.
+        /// </summary>
+        void IConnection.Disconnect()
+        {
+            Disconnect();
+        }
+
+        private void Disconnect()
+        {
+            lock (_stateLock)
+            {
+                // Do nothing if the connection is offline
+                if (State != ConnectionState.Disconnected)
+                {
+                    // Change state before doing anything else in case something later in the method throws
+                    State = ConnectionState.Disconnected;
+
+                    Trace(TraceLevels.StateChanges, "Disconnect");
+
+                    _disconnectTimeoutOperation.Dispose();
+                    _disconnectCts.Cancel();
+                    _monitor.Dispose();
+
+                    Trace(TraceLevels.Events, "Closed");
+
+                    // Clear the state for this connection
+                    ConnectionId = null;
+                    ConnectionToken = null;
+                    GroupsToken = null;
+                    MessageId = null;
+
+                    // TODO: Do we want to trigger Closed if we are connecting?
+                    if (Closed != null)
+                    {
+                        Closed();
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Sends data asynchronously over the connection.
+        /// </summary>
+        /// <param name="data">The data to send.</param>
+        /// <returns>A task that represents when the data has been sent.</returns>
+        public Task Send(string data)
+        {
+            if (State == ConnectionState.Disconnected)
+            {
+                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_StartMustBeCalledBeforeDataCanBeSent));
+            }
+
+            if (State == ConnectionState.Connecting)
+            {
+                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_ConnectionHasNotBeenEstablished));
+            }
+
+            return _transport.Send(this, data);
+        }
+
+        /// <summary>
+        /// Sends an object that will be JSON serialized asynchronously over the connection.
+        /// </summary>
+        /// <param name="value">The value to serialize.</param>
+        /// <returns>A task that represents when the data has been sent.</returns>
+        public Task Send(object value)
+        {
+            return Send(this.JsonSerializeObject(value));
+        }
+
+#if (NET4 || NET45)
+        /// <summary>
+        /// Adds a client certificate to the request
+        /// </summary>
+        /// <param name="certificate">Client Certificate</param>
+        public void AddClientCertificate(X509Certificate certificate)
+        {
+            lock (_stateLock)
+            {
+                if (State != ConnectionState.Disconnected)
+                {
+                    throw new InvalidOperationException(Resources.Error_CertsCanOnlyBeAddedWhenDisconnected);
+                }
+
+                certCollection.Add(certificate);
+            }
+        }
+#endif
+
+        public void Trace(TraceLevels level, string format, params object[] args)
+        {
+            lock (_traceLock)
+            {
+                if (TraceLevel.HasFlag(level))
+                {
+                    _traceWriter.WriteLine(
+                        DateTime.UtcNow.ToString("HH:mm:ss.fffffff", CultureInfo.InvariantCulture) + " - " +
+                            (ConnectionId ?? "null") + " - " +
+                            format,
+                        args);
+                }
+            }
+        }
+
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "This is called by the transport layer")]
+        void IConnection.OnReceived(JToken message)
+        {
+            OnMessageReceived(message);
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "This is called by the transport layer")]
+        protected virtual void OnMessageReceived(JToken message)
+        {
+            if (Received != null)
+            {
+                Received(message.ToString());
+            }
+        }
+
+        void IConnection.OnError(Exception error)
+        {
+            Trace(TraceLevels.Events, "OnError({0})", error);
+
+            if (Error != null)
+            {
+                Error(error);
+            }
+        }
+
+        void IConnection.OnReconnecting()
+        {
+            // Only allow the client to attempt to reconnect for a _disconnectTimout TimeSpan which is set by
+            // the server during negotiation.
+            // If the client tries to reconnect for longer the server will likely have deleted its ConnectionId
+            // topic along with the contained disconnect message.
+            _disconnectTimeoutOperation = SetTimeout(_disconnectTimeout, Disconnect);
+            if (Reconnecting != null)
+            {
+                Reconnecting();
+            }
+        }
+
+        void IConnection.OnReconnected()
+        {
+            // Prevent the timeout set OnReconnecting from firing and stopping the connection if we have successfully
+            // reconnected before the _disconnectTimeout delay.
+            _disconnectTimeoutOperation.Dispose();
+
+            if (Reconnected != null)
+            {
+                Reconnected();
+            }
+
+            ((IConnection)this).UpdateLastKeepAlive();
+        }
+
+        void IConnection.OnConnectionSlow()
+        {
+            Trace(TraceLevels.Events, "OnConnectionSlow");
+
+            if (ConnectionSlow != null)
+            {
+                ConnectionSlow();
+            }
+        }
+
+        /// <summary>
+        /// Sets LastKeepAlive to the current time 
+        /// </summary>
+        void IConnection.UpdateLastKeepAlive()
+        {
+            if (_keepAliveData != null)
+            {
+                _keepAliveData.LastKeepAlive = DateTime.UtcNow;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "This is called by the transport layer")]
+        void IConnection.PrepareRequest(IRequest request)
+        {
+#if WINDOWS_PHONE
+            // http://msdn.microsoft.com/en-us/library/ff637320(VS.95).aspx
+            request.UserAgent = CreateUserAgentString("SignalR.Client.WP7");
+#else
+#if SILVERLIGHT
+            // Useragent is not possible to set with Silverlight, not on the UserAgent property of the request nor in the Headers key/value in the request
+#else
+            request.UserAgent = CreateUserAgentString("SignalR.Client");
+#endif
+#endif
+            if (Credentials != null)
+            {
+                request.Credentials = Credentials;
+            }
+
+            if (CookieContainer != null)
+            {
+                request.CookieContainer = CookieContainer;
+            }
+
+#if !SILVERLIGHT
+            if (Proxy != null)
+            {
+                request.Proxy = Proxy;
+            }
+#endif
+            request.SetRequestHeaders(Headers);
+
+#if (NET4 || NET45) && !MONO
+            request.AddClientCerts(certCollection);
+#endif
+        }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Can be called via other clients.")]
+        private static string CreateUserAgentString(string client)
+        {
+            if (_assemblyVersion == null)
+            {
+#if NETFX_CORE
+                _assemblyVersion = new Version("1.1.0");
+#else
+                _assemblyVersion = new AssemblyName(typeof(Connection).Assembly.FullName).Version;
+#endif
+            }
+
+#if NETFX_CORE
+            return String.Format(CultureInfo.InvariantCulture, "{0}/{1} ({2})", client, _assemblyVersion, "Unknown OS");
+#else
+            return String.Format(CultureInfo.InvariantCulture, "{0}/{1} ({2})", client, _assemblyVersion, Environment.OSVersion);
+#endif
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The Version constructor can throw exceptions of many different types. Failure is indicated by returning false.")]
+        private static bool TryParseVersion(string versionString, out Version version)
+        {
+#if WINDOWS_PHONE || NET35
+            try
+            {
+                version = new Version(versionString);
+                return true;
+            }
+            catch
+            {
+                version = null;
+                return false;
+            }
+#else
+            return Version.TryParse(versionString, out version);
+#endif
+        }
+
+        private static string CreateQueryString(IDictionary<string, string> queryString)
+        {
+            return String.Join("&", queryString.Select(kvp => kvp.Key + "=" + kvp.Value).ToArray());
+        }
+
+        // TODO: Refactor into a helper class
+        private static IDisposable SetTimeout(TimeSpan delay, Action operation)
+        {
+            var cancellableInvoker = new ThreadSafeInvoker();
+
+            TaskAsyncHelper.Delay(delay).Then(() => cancellableInvoker.Invoke(operation));
+
+            // Disposing this return value will cancel the operation if it has not already been invoked.
+            return new DisposableAction(() => cancellableInvoker.Invoke());
+        }
+
+        /// <summary>
+        /// Default text writer
+        /// </summary>
+        private class DebugTextWriter : TextWriter
+        {
+            public DebugTextWriter()
+                : base(CultureInfo.InvariantCulture)
+            {
+            }
+
+            public override void WriteLine(string value)
+            {
+                Debug.WriteLine(value);
+            }
+
+#if NETFX_CORE
+            public override void Write(char value)
+            {
+                // This is wrong we don't call it
+                Debug.WriteLine(value);
+            }
+#endif
+
+            public override Encoding Encoding
+            {
+                get { return Encoding.UTF8; }
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionExtensions.cs
new file mode 100644
index 0000000..472da6a
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionExtensions.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.IO;
+using System.Text;
+using Newtonsoft.Json;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public static class ConnectionExtensions
+    {
+        public static T GetValue<T>(this IConnection connection, string key)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            if (String.IsNullOrEmpty(key))
+            {
+                throw new ArgumentNullException("key");
+            }
+
+            lock (connection.Items)
+            {
+                object value;
+                if (connection.Items.TryGetValue(key, out value))
+                {
+                    return (T)value;
+                }
+            }
+
+            return default(T);
+        }
+
+        [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "jsonWriter will not dispose the stringWriter")]
+        public static string JsonSerializeObject(this IConnection connection, object value)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            var sb = new StringBuilder(0x100);
+            using (var stringWriter = new StringWriter(sb, CultureInfo.InvariantCulture))
+            {
+                using (var jsonWriter = new JsonTextWriter(stringWriter) { CloseOutput = false })
+                {
+                    jsonWriter.Formatting = connection.JsonSerializer.Formatting;
+                    connection.JsonSerializer.Serialize(jsonWriter, value);
+                }
+
+                return stringWriter.ToString();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "jsonTextReader will not dispose the stringReader")]
+        public static T JsonDeserializeObject<T>(this IConnection connection, string jsonValue)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            using (var stringReader = new StringReader(jsonValue))
+            {
+                using (var jsonTextReader = new JsonTextReader(stringReader) { CloseInput = false })
+                {
+                    return (T)connection.JsonSerializer.Deserialize(jsonTextReader, typeof(T));
+                }
+            }
+        }
+
+        public static bool EnsureReconnecting(this IConnection connection)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            if (connection.ChangeState(ConnectionState.Connected, ConnectionState.Reconnecting))
+            {
+                connection.OnReconnecting();
+            }
+
+            return connection.State == ConnectionState.Reconnecting;
+        }
+
+#if !WINDOWS_PHONE && !SILVERLIGHT && !NET35
+        public static IObservable<string> AsObservable(this Connection connection)
+        {
+            return connection.AsObservable(value => value);
+        }
+
+        public static IObservable<T> AsObservable<T>(this Connection connection)
+        {
+            return connection.AsObservable(value => connection.JsonDeserializeObject<T>(value));
+        }
+
+        public static IObservable<T> AsObservable<T>(this Connection connection, Func<string, T> selector)
+        {
+            return new ObservableConnection<T>(connection, selector);
+        }
+#endif
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionState.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionState.cs
new file mode 100644
index 0000000..8c68f1c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ConnectionState.cs
@@ -0,0 +1,12 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public enum ConnectionState
+    {
+        Connecting,
+        Connected,
+        Reconnecting,
+        Disconnected
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeaderDictionary.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeaderDictionary.cs
new file mode 100644
index 0000000..0760f18
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeaderDictionary.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public class HeaderDictionary : IDictionary<string, string>
+    {
+        private IDictionary<string, string> _dictionary = new Dictionary<string, string>();
+        private readonly IConnection _connection;
+
+        public HeaderDictionary(IConnection connection)
+        {
+            _connection = connection;
+        }
+
+        public void Add(string key, string value)
+        {
+            EnsureConnnectionDisconnected();
+            _dictionary.Add(key, value);
+        }
+
+        public bool ContainsKey(string key)
+        {
+            return _dictionary.ContainsKey(key);
+        }
+
+        public ICollection<string> Keys
+        {
+            get { return _dictionary.Keys; }
+        }
+
+        public bool Remove(string key)
+        {
+            EnsureConnnectionDisconnected();
+            return _dictionary.Remove(key);
+        }
+
+        public bool TryGetValue(string key, out string value)
+        {
+            return _dictionary.TryGetValue(key, out value);
+        }
+
+        public ICollection<string> Values
+        {
+            get { return _dictionary.Values; }
+        }
+
+        public string this[string key]
+        {
+            get
+            {
+                return _dictionary[key];
+            }
+            set
+            {
+                EnsureConnnectionDisconnected();
+                _dictionary[key] = value;
+            }
+        }
+
+        public void Add(KeyValuePair<string, string> item)
+        {
+            EnsureConnnectionDisconnected();
+            _dictionary.Add(item);
+        }
+
+        public void Clear()
+        {
+            EnsureConnnectionDisconnected();
+            _dictionary.Clear();
+        }
+
+        public bool Contains(KeyValuePair<string, string> item)
+        {
+            return _dictionary.Contains(item);
+        }
+
+        public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
+        {
+            _dictionary.CopyTo(array, arrayIndex);
+        }
+
+        public int Count
+        {
+            get { return _dictionary.Count; }
+        }
+
+        public bool IsReadOnly
+        {
+            get { return _connection.State != ConnectionState.Disconnected || _dictionary.IsReadOnly; }
+        }
+
+        public bool Remove(KeyValuePair<string, string> item)
+        {
+            EnsureConnnectionDisconnected();
+            return _dictionary.Remove(item);
+        }
+
+        public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
+        {
+            return _dictionary.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return _dictionary.GetEnumerator();
+        }
+
+        private void EnsureConnnectionDisconnected()
+        {
+            if (_connection.State != ConnectionState.Disconnected)
+            {
+                throw new InvalidOperationException(Resources.Error_HeadersCanOnlyBeSetWhenDisconnected);
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeartBeatMonitor.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeartBeatMonitor.cs
new file mode 100644
index 0000000..08093a1
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/HeartBeatMonitor.cs
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading;
+
+#if NETFX_CORE
+using Windows.System.Threading;
+#endif
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public class HeartbeatMonitor : IDisposable
+    {
+#if !NETFX_CORE
+        // Timer to determine when to notify the user and reconnect if required
+        private Timer _timer;
+#else
+        private ThreadPoolTimer _timer;
+#endif
+        // Used to ensure that the Beat only executes when the connection is in the Connected state
+        private readonly object _connectionStateLock;
+
+        // Connection variable
+        private readonly IConnection _connection;
+
+        // To keep track of whether the user has been notified
+        public bool HasBeenWarned { get; private set; }
+
+        // To keep track of whether the client is already reconnecting
+        public bool TimedOut { get; private set; }
+
+        /// <summary>
+        /// Initializes a new instance of the HeartBeatMonitor Class 
+        /// </summary>
+        /// <param name="connection"></param>
+        /// <param name="connectionStateLock"></param>
+        public HeartbeatMonitor(IConnection connection, object connectionStateLock)
+        {
+            _connection = connection;
+            _connectionStateLock = connectionStateLock;
+        }
+
+        /// <summary>
+        /// Updates LastKeepAlive and starts the timer
+        /// </summary>
+        public void Start()
+        {
+            _connection.UpdateLastKeepAlive();
+            HasBeenWarned = false;
+            TimedOut = false;
+#if !NETFX_CORE
+            _timer = new Timer(_ => Beat(), state: null, dueTime: _connection.KeepAliveData.CheckInterval, period: _connection.KeepAliveData.CheckInterval);
+#else
+            _timer = ThreadPoolTimer.CreatePeriodicTimer((timer) => Beat(), period: _connection.KeepAliveData.CheckInterval);
+#endif
+        }
+
+        /// <summary>
+        /// Callback function for the timer which determines if we need to notify the user or attempt to reconnect
+        /// </summary>
+#if NETFX_CORE
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Timer is not implemented on WinRT")]
+#endif
+        private void Beat()
+        {
+            TimeSpan timeElapsed = DateTime.UtcNow - _connection.KeepAliveData.LastKeepAlive;
+            Beat(timeElapsed);
+        }
+
+        /// <summary>
+        /// Logic to determine if we need to notify the user or attempt to reconnect
+        /// </summary>
+        /// <param name="timeElapsed"></param>
+        public void Beat(TimeSpan timeElapsed)
+        {
+            lock (_connectionStateLock)
+            {
+                if (_connection.State == ConnectionState.Connected)
+                {
+                    if (timeElapsed >= _connection.KeepAliveData.Timeout)
+                    {
+                        if (!TimedOut)
+                        {
+                            // Connection has been lost
+                            _connection.Trace(TraceLevels.Events, "Connection Timed-out : Transport Lost Connection");
+                            TimedOut = true;
+                            _connection.Transport.LostConnection(_connection);
+                        }
+                    }
+                    else if (timeElapsed >= _connection.KeepAliveData.TimeoutWarning)
+                    {
+                        if (!HasBeenWarned)
+                        {
+                            // Inform user and set HasBeenWarned to true
+                            _connection.Trace(TraceLevels.Events, "Connection Timeout Warning : Notifying user");
+                            HasBeenWarned = true;
+                            _connection.OnConnectionSlow();
+                        }
+                    }
+                    else
+                    {
+                        HasBeenWarned = false;
+                        TimedOut = false;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Dispose off the timer
+        /// </summary>
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        /// <summary>
+        /// Dispose off the timer
+        /// </summary>
+        /// <param name="disposing"></param>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                if (_timer != null)
+                {
+#if !NETFX_CORE
+                
+                    _timer.Dispose();
+                    _timer = null;
+#else
+                    _timer.Cancel();
+                    _timer = null;
+#endif
+                }
+
+            }
+        }
+    }
+}
+
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/DefaultHttpClient.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/DefaultHttpClient.cs
new file mode 100644
index 0000000..656d1a9
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/DefaultHttpClient.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    /// <summary>
+    /// The default <see cref="IHttpClient"/> implementation.
+    /// </summary>
+    public class DefaultHttpClient : IHttpClient
+    {
+        /// <summary>
+        /// Makes an asynchronous http GET request to the specified url.
+        /// </summary>
+        /// <param name="url">The url to send the request to.</param>
+        /// <param name="prepareRequest">A callback that initializes the request with default values.</param>
+        /// <returns>A <see cref="T:Task{IResponse}"/>.</returns>
+        public Task<IResponse> Get(string url, Action<IRequest> prepareRequest)
+        {
+            IRequest req = null;
+            return HttpHelper.GetAsync(url, request =>
+            {
+                req = new HttpWebRequestWrapper(request);
+                prepareRequest(req);
+            }
+            ).Then(response => (IResponse)new HttpWebResponseWrapper(response));
+        }
+
+        /// <summary>
+        /// Makes an asynchronous http POST request to the specified url.
+        /// </summary>
+        /// <param name="url">The url to send the request to.</param>
+        /// <param name="prepareRequest">A callback that initializes the request with default values.</param>
+        /// <param name="postData">form url encoded data.</param>
+        /// <returns>A <see cref="T:Task{IResponse}"/>.</returns>
+        public Task<IResponse> Post(string url, Action<IRequest> prepareRequest, IDictionary<string, string> postData)
+        {
+            IRequest req = null;
+            return HttpHelper.PostAsync(url, request =>
+            {
+                req = new HttpWebRequestWrapper(request);
+                prepareRequest(req);
+            },
+            postData).Then(response => (IResponse)new HttpWebResponseWrapper(response));
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpHelper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpHelper.cs
new file mode 100644
index 0000000..b5cb8ca
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpHelper.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    internal static class HttpHelper
+    {
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<HttpWebResponse> GetHttpResponseAsync(this HttpWebRequest request)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<HttpWebResponse>(request.BeginGetResponse, ar => (HttpWebResponse)request.EndGetResponse(ar), null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<HttpWebResponse>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<Stream> GetHttpRequestStreamAsync(this HttpWebRequest request)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<Stream>(request.BeginGetRequestStream, request.EndGetRequestStream, null);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<Stream>(ex);
+            }
+        }
+
+        public static Task<HttpWebResponse> GetAsync(string url, Action<HttpWebRequest> requestPreparer)
+        {
+            HttpWebRequest request = CreateWebRequest(url);
+            if (requestPreparer != null)
+            {
+                requestPreparer(request);
+            }
+            return request.GetHttpResponseAsync();
+        }
+
+        public static Task<HttpWebResponse> PostAsync(string url, Action<HttpWebRequest> requestPreparer, IDictionary<string, string> postData)
+        {
+            return PostInternal(url, requestPreparer, postData);
+        }
+
+        private static Task<HttpWebResponse> PostInternal(string url, Action<HttpWebRequest> requestPreparer, IDictionary<string, string> postData)
+        {
+            HttpWebRequest request = CreateWebRequest(url);
+
+            if (requestPreparer != null)
+            {
+                requestPreparer(request);
+            }
+
+            byte[] buffer = ProcessPostData(postData);
+
+            request.Method = "POST";
+            request.ContentType = "application/x-www-form-urlencoded";
+#if !WINDOWS_PHONE && !SILVERLIGHT
+            // Set the content length if the buffer is non-null
+            request.ContentLength = buffer != null ? buffer.LongLength : 0;
+#endif
+
+            if (buffer == null)
+            {
+                // If there's nothing to be written to the request then just get the response
+                return request.GetHttpResponseAsync();
+            }
+
+            // Write the post data to the request stream
+            return request.GetHttpRequestStreamAsync()
+                .Then(stream => stream.WriteAsync(buffer).Then(() => stream.Dispose()))
+                .Then(() => request.GetHttpResponseAsync());
+        }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Text.StringBuilder.AppendFormat(System.String,System.Object[])", Justification = "This will never be localized.")]
+        private static byte[] ProcessPostData(IDictionary<string, string> postData)
+        {
+            if (postData == null || postData.Count == 0)
+            {
+                return null;
+            }
+
+            var sb = new StringBuilder();
+            foreach (var pair in postData)
+            {
+                if (sb.Length > 0)
+                {
+                    sb.Append("&");
+                }
+
+                if (String.IsNullOrEmpty(pair.Value))
+                {
+                    continue;
+                }
+
+                sb.AppendFormat("{0}={1}", pair.Key, UrlEncoder.UrlEncode(pair.Value));
+            }
+
+            return Encoding.UTF8.GetBytes(sb.ToString());
+        }
+
+        private static HttpWebRequest CreateWebRequest(string url)
+        {
+            HttpWebRequest request = null;
+#if WINDOWS_PHONE
+            request = (HttpWebRequest)WebRequest.Create(url);
+            request.AllowReadStreamBuffering = false;
+#elif SILVERLIGHT
+            request = (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
+            request.AllowReadStreamBuffering = false;
+#else
+            request = (HttpWebRequest)WebRequest.Create(url);
+#endif
+            return request;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebRequestWrapper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebRequestWrapper.cs
new file mode 100644
index 0000000..7446981
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebRequestWrapper.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Net;
+#if (NET4 || NET45)
+using System.Security.Cryptography.X509Certificates;
+#endif
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    public class HttpWebRequestWrapper : IRequest
+    {
+        private readonly HttpWebRequest _request;
+
+        private IDictionary<string, Action<HttpWebRequest, string>> _restrictedHeadersSet = new Dictionary<string, Action<HttpWebRequest, string>>() {
+                                                                        { HttpRequestHeader.Accept.ToString(), (request, value) => { request.Accept = value; } },                                                                       
+                                                                        { HttpRequestHeader.ContentType.ToString(), (request, value) => { request.ContentType = value; } },
+                                                                        { HttpRequestHeader.ContentLength.ToString(), (request, value) => { request.ContentLength = Int32.Parse(value, CultureInfo.CurrentCulture); } }, 
+                                                                        { HttpRequestHeader.UserAgent.ToString(), (request, value) => { request.UserAgent = value; } },
+#if (!WINDOWS_PHONE && !SILVERLIGHT)                                                                                                                                               
+                                                                        { HttpRequestHeader.Connection.ToString(), (request, value) => { request.Connection = value; } },
+#if !MONO
+                                                                        { HttpRequestHeader.Date.ToString(), (request, value) => {request.Date = DateTime.Parse(value, CultureInfo.CurrentCulture); } },
+#endif
+                                                                        { HttpRequestHeader.Expect.ToString(), (request, value) => {request.Expect = value;} },
+                                                                        { HttpRequestHeader.Host.ToString(), (request, value) => {request.Host = value; }  },                                                                     
+                                                                        { HttpRequestHeader.IfModifiedSince.ToString(), (request, value) => {request.IfModifiedSince = DateTime.Parse(value, CultureInfo.CurrentCulture);} },
+                                                                        { HttpRequestHeader.Referer.ToString(), (request, value) => { request.Referer = value; } },                                                                         
+                                                                        { HttpRequestHeader.TransferEncoding.ToString(), (request, value) => { request.TransferEncoding = value; } },
+#endif
+                                                                    };
+
+        public HttpWebRequestWrapper(HttpWebRequest request)
+        {
+            _request = request;
+        }
+
+        public string UserAgent
+        {
+            get
+            {
+                return _request.UserAgent;
+            }
+            set
+            {
+                _request.UserAgent = value;
+            }
+        }
+
+        public ICredentials Credentials
+        {
+            get
+            {
+                return _request.Credentials;
+            }
+            set
+            {
+                _request.Credentials = value;
+            }
+        }
+
+        public CookieContainer CookieContainer
+        {
+            get
+            {
+                return _request.CookieContainer;
+            }
+            set
+            {
+                _request.CookieContainer = value;
+            }
+        }
+
+        public string Accept
+        {
+            get
+            {
+                return _request.Accept;
+            }
+            set
+            {
+                _request.Accept = value;
+            }
+        }
+
+#if !SILVERLIGHT
+        public IWebProxy Proxy
+        {
+            get
+            {
+                return _request.Proxy;
+            }
+            set
+            {
+                _request.Proxy = value;
+            }
+        }
+#endif
+
+        public void Abort()
+        {
+            _request.Abort();
+        }
+
+        public void SetRequestHeaders(IDictionary<string, string> headers)
+        {
+            if (headers == null)
+            {
+                throw new ArgumentNullException("headers");
+            }
+
+            foreach (KeyValuePair<string, string> headerEntry in headers)
+            {
+                if (!_restrictedHeadersSet.Keys.Contains(headerEntry.Key))
+                {
+#if (!WINDOWS_PHONE && !SILVERLIGHT)
+                    _request.Headers.Add(headerEntry.Key, headerEntry.Value);
+#endif
+                }
+                else
+                {
+                    Action<HttpWebRequest, string> setHeaderAction;
+
+                    if (_restrictedHeadersSet.TryGetValue(headerEntry.Key, out setHeaderAction))
+                    {
+                        setHeaderAction.Invoke(_request, headerEntry.Value);
+                    }
+                }
+            }
+        }
+
+#if (NET4 || NET45) && !MONO
+        public void AddClientCerts(X509CertificateCollection certificates)
+        {
+            if (certificates == null)
+            {
+                throw new ArgumentNullException("certificates");
+            }
+
+            _request.ClientCertificates = certificates;
+        }
+#endif
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebResponseWrapper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebResponseWrapper.cs
new file mode 100644
index 0000000..585877b
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/HttpWebResponseWrapper.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.IO;
+using System.Net;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    public class HttpWebResponseWrapper : IResponse
+    {
+        private readonly HttpWebResponse _response;
+
+        public HttpWebResponseWrapper(HttpWebResponse response)
+        {
+            _response = response;
+        }
+
+        public Stream GetStream()
+        {
+            return _response.GetResponseStream();
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                ((IDisposable)_response).Dispose();
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClient.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClient.cs
new file mode 100644
index 0000000..a1804a9
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClient.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    /// <summary>
+    /// A client that can make http request.
+    /// </summary>
+    public interface IHttpClient
+    {
+        /// <summary>
+        /// Makes an asynchronous http GET request to the specified url.
+        /// </summary>
+        /// <param name="url">The url to send the request to.</param>
+        /// <param name="prepareRequest">A callback that initializes the request with default values.</param>
+        /// <returns>A <see cref="T:Task{IResponse}"/>.</returns>
+        [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Performs a GET request")]
+        Task<IResponse> Get(string url, Action<IRequest> prepareRequest);
+
+        /// <summary>
+        /// Makes an asynchronous http POST request to the specified url.
+        /// </summary>
+        /// <param name="url">The url to send the request to.</param>
+        /// <param name="prepareRequest">A callback that initializes the request with default values.</param>
+        /// <param name="postData">form url encoded data.</param>
+        /// <returns>A <see cref="T:Task{IResponse}"/>.</returns>
+        Task<IResponse> Post(string url, Action<IRequest> prepareRequest, IDictionary<string, string> postData);
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClientExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClientExtensions.cs
new file mode 100644
index 0000000..f3b886c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IHttpClientExtensions.cs
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    public static class IHttpClientExtensions
+    {
+        public static Task<IResponse> Post(this IHttpClient client, string url, Action<IRequest> prepareRequest)
+        {
+            if (client == null)
+            {
+                throw new ArgumentNullException("client");
+            }
+
+            if (url == null)
+            {
+                throw new ArgumentNullException("url");
+            }
+
+            if (prepareRequest == null)
+            {
+                throw new ArgumentNullException("prepareRequest");
+            }
+
+            return client.Post(url, prepareRequest, postData: null);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IRequest.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IRequest.cs
new file mode 100644
index 0000000..f9afcf0
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IRequest.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Net;
+#if (NET4 || NET45)
+using System.Security.Cryptography.X509Certificates;
+#endif
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    /// <summary>
+    /// The http request
+    /// </summary>
+    public interface IRequest
+    {
+        /// <summary>
+        /// The user agent for this request.
+        /// </summary>
+        string UserAgent { get; set; }
+
+        /// <summary>
+        /// The credentials for this request.
+        /// </summary>
+        ICredentials Credentials { get; set; }
+
+        /// <summary>
+        /// The cookies for this request.
+        /// </summary>
+        CookieContainer CookieContainer { get; set; }
+
+#if !SILVERLIGHT
+        /// <summary>
+        /// The proxy information for this request.
+        /// </summary>
+        IWebProxy Proxy { get; set; }
+#endif
+
+        /// <summary>
+        /// The accept header for this request.
+        /// </summary>
+        string Accept { get; set; }
+
+        /// <summary>
+        /// Aborts the request.
+        /// </summary>
+        void Abort();
+
+        /// <summary>
+        /// Set Request Headers
+        /// </summary>
+        /// <param name="headers">request headers</param>
+        void SetRequestHeaders(IDictionary<string, string> headers);
+
+#if (NET4 || NET45) && !MONO
+        /// <summary>
+        /// Sets client certificates
+        /// </summary>
+        /// <param name="certificates">client certificates</param>
+        void AddClientCerts(X509CertificateCollection certificates);
+#endif
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponse.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponse.cs
new file mode 100644
index 0000000..bfd8260
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponse.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    /// <summary>
+    /// The http response.
+    /// </summary>
+    public interface IResponse : IDisposable
+    {
+        /// <summary>
+        /// Gets the steam that represents the response body.
+        /// </summary>
+        /// <returns></returns>
+        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This could be expensive.")]
+        Stream GetStream();
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponseExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponseExtensions.cs
new file mode 100644
index 0000000..1ad036c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Http/IResponseExtensions.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Transports;
+
+namespace Microsoft.AspNet.SignalR.Client.Http
+{
+    public static class IResponseExtensions
+    {
+        public static Task<string> ReadAsString(this IResponse response)
+        {
+            if (response == null)
+            {
+                throw new ArgumentNullException("response");
+            }
+
+            var stream = response.GetStream();
+            var reader = new AsyncStreamReader(stream);
+            var result = new StringBuilder();
+            var resultTcs = new TaskCompletionSource<string>();
+
+            reader.Data = buffer =>
+            {
+                result.Append(Encoding.UTF8.GetString(buffer.Array, buffer.Offset, buffer.Count));
+            };
+
+            reader.Closed = exception =>
+            {
+                response.Dispose();
+                resultTcs.SetResult(result.ToString());
+            };
+
+            reader.Start();
+
+            return resultTcs.Task;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubConnection.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubConnection.cs
new file mode 100644
index 0000000..dec9cdf
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubConnection.cs
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Linq;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    /// A <see cref="Connection"/> for interacting with Hubs.
+    /// </summary>
+    public class HubConnection : Connection, IHubConnection
+    {
+        private readonly Dictionary<string, HubProxy> _hubs = new Dictionary<string, HubProxy>(StringComparer.OrdinalIgnoreCase);
+        private readonly Dictionary<string, Action<HubResult>> _callbacks = new Dictionary<string, Action<HubResult>>();
+        private int _callbackId;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        public HubConnection(string url)
+            : this(url, useDefaultUrl: true)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="useDefaultUrl">Determines if the default "/signalr" path should be appended to the specified url.</param>
+        public HubConnection(string url, bool useDefaultUrl)
+            : base(GetUrl(url, useDefaultUrl))
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        public HubConnection(string url, string queryString)
+            : this(url, queryString, useDefaultUrl: true)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        /// <param name="useDefaultUrl">Determines if the default "/signalr" path should be appended to the specified url.</param>
+        public HubConnection(string url, string queryString, bool useDefaultUrl)
+            : base(GetUrl(url, useDefaultUrl), queryString)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        public HubConnection(string url, IDictionary<string, string> queryString)
+            : this(url, queryString, useDefaultUrl: true)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="HubConnection"/> class.
+        /// </summary>
+        /// <param name="url">The url to connect to.</param>
+        /// <param name="queryString">The query string data to pass to the server.</param>
+        /// <param name="useDefaultUrl">Determines if the default "/signalr" path should be appended to the specified url.</param>
+        public HubConnection(string url, IDictionary<string, string> queryString, bool useDefaultUrl)
+            : base(GetUrl(url, useDefaultUrl), queryString)
+        {
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "")]
+        protected override void OnMessageReceived(JToken message)
+        {
+            if (message["I"] != null)
+            {
+                var result = message.ToObject<HubResult>(JsonSerializer);
+                Action<HubResult> callback;
+
+                lock (_callbacks)
+                {
+                    if (_callbacks.TryGetValue(result.Id, out callback))
+                    {
+                        _callbacks.Remove(result.Id);
+                    }
+                    else
+                    {
+                        Debug.Assert(false, "Callback with id " + result.Id + " not found!");
+                    }
+                }
+
+                if (callback != null)
+                {
+                    callback(result);
+                }
+            }
+            else
+            {
+                var invocation = message.ToObject<HubInvocation>(JsonSerializer);
+                HubProxy hubProxy;
+                if (_hubs.TryGetValue(invocation.Hub, out hubProxy))
+                {
+                    if (invocation.State != null)
+                    {
+                        foreach (var state in invocation.State)
+                        {
+                            hubProxy[state.Key] = state.Value;
+                        }
+                    }
+
+                    hubProxy.InvokeEvent(invocation.Method, invocation.Args);
+                }
+
+                base.OnMessageReceived(message);
+            }
+        }
+
+        protected override string OnSending()
+        {
+            var data = _hubs.Select(p => new HubRegistrationData
+            {
+                Name = p.Key
+            });
+
+            return this.JsonSerializeObject(data);
+        }
+
+        /// <summary>
+        /// Creates an <see cref="IHubProxy"/> for the hub with the specified name.
+        /// </summary>
+        /// <param name="hubName">The name of the hub.</param>
+        /// <returns>A <see cref="IHubProxy"/></returns>
+        public IHubProxy CreateHubProxy(string hubName)
+        {
+            if (State != ConnectionState.Disconnected)
+            {
+                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_ProxiesCannotBeAddedConnectionStarted));
+            }
+
+            HubProxy hubProxy;
+            if (!_hubs.TryGetValue(hubName, out hubProxy))
+            {
+                hubProxy = new HubProxy(this, hubName);
+                _hubs[hubName] = hubProxy;
+            }
+            return hubProxy;
+        }
+
+        public string RegisterCallback(Action<HubResult> callback)
+        {
+            lock (_callbacks)
+            {
+                string id = _callbackId.ToString(CultureInfo.InvariantCulture);
+                _callbacks[id] = callback;
+                _callbackId++;
+                return id;
+            }
+        }
+
+        private static string GetUrl(string url, bool useDefaultUrl)
+        {
+            if (!url.EndsWith("/", StringComparison.Ordinal))
+            {
+                url += "/";
+            }
+
+            if (useDefaultUrl)
+            {
+                return url + "signalr";
+            }
+
+            return url;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubInvocation.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubInvocation.cs
new file mode 100644
index 0000000..89012bf
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubInvocation.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    public class HubInvocation
+    {
+        [JsonProperty("I")]
+        public string CallbackId { get; set; }
+
+        [JsonProperty("H")]
+        public string Hub { get; set; }
+
+        [JsonProperty("M")]
+        public string Method { get; set; }
+
+        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "This type is used for serialization")]
+        [JsonProperty("A")]
+        public JToken[] Args { get; set; }
+
+        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This type is used for serialization")]
+        [JsonProperty("S", NullValueHandling = NullValueHandling.Ignore)]
+        public Dictionary<string, JToken> State { get; set; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxy.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxy.cs
new file mode 100644
index 0000000..9c5ba2e
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxy.cs
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    public class HubProxy : IHubProxy
+    {
+        private readonly string _hubName;
+        private readonly IHubConnection _connection;
+        private readonly Dictionary<string, JToken> _state = new Dictionary<string, JToken>(StringComparer.OrdinalIgnoreCase);
+        private readonly Dictionary<string, Subscription> _subscriptions = new Dictionary<string, Subscription>(StringComparer.OrdinalIgnoreCase);
+
+        public HubProxy(IHubConnection connection, string hubName)
+        {
+            _connection = connection;
+            _hubName = hubName;
+        }
+
+        public JToken this[string name]
+        {
+            get
+            {
+                lock (_state)
+                {
+                    JToken value;
+                    _state.TryGetValue(name, out value);
+                    return value;
+                }
+            }
+            set
+            {
+                lock (_state)
+                {
+                    _state[name] = value;
+                }
+            }
+        }
+
+        public JsonSerializer JsonSerializer
+        {
+            get { return _connection.JsonSerializer; }
+        }
+
+        public Subscription Subscribe(string eventName)
+        {
+            if (eventName == null)
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            Subscription subscription;
+            if (!_subscriptions.TryGetValue(eventName, out subscription))
+            {
+                subscription = new Subscription();
+                _subscriptions.Add(eventName, subscription);
+            }
+
+            return subscription;
+        }
+
+        public Task Invoke(string method, params object[] args)
+        {
+            return Invoke<object>(method, args);
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flown to the caller")]
+        public Task<T> Invoke<T>(string method, params object[] args)
+        {
+            if (method == null)
+            {
+                throw new ArgumentNullException("method");
+            }
+
+            if (args == null)
+            {
+                throw new ArgumentNullException("args");
+            }
+
+            var tokenifiedArguments = new JToken[args.Length];
+            for (int i = 0; i < tokenifiedArguments.Length; i++)
+            {
+                tokenifiedArguments[i] = JToken.FromObject(args[i], JsonSerializer);
+            }
+
+            var tcs = new TaskCompletionSource<T>();
+            var callbackId = _connection.RegisterCallback(result =>
+            {
+                if (result != null)
+                {
+                    if (result.Error != null)
+                    {
+                        tcs.TrySetUnwrappedException(new InvalidOperationException(result.Error));
+                    }
+                    else
+                    {
+                        try
+                        {
+                            if (result.State != null)
+                            {
+                                foreach (var pair in result.State)
+                                {
+                                    this[pair.Key] = pair.Value;
+                                }
+                            }
+
+                            if (result.Result != null)
+                            {
+                                tcs.TrySetResult(result.Result.ToObject<T>(JsonSerializer));
+                            }
+                            else
+                            {
+                                tcs.TrySetResult(default(T));
+                            }
+                        }
+                        catch (Exception ex)
+                        {
+                            // If we failed to set the result for some reason or to update
+                            // state then just fail the tcs.
+                            tcs.TrySetUnwrappedException(ex);
+                        }
+                    }
+                }
+                else
+                {
+                    tcs.TrySetCanceled();
+                }
+            });
+
+            var hubData = new HubInvocation
+            {
+                Hub = _hubName,
+                Method = method,
+                Args = tokenifiedArguments,
+                CallbackId = callbackId
+            };
+
+            if (_state.Count != 0)
+            {
+                hubData.State = _state;
+            }
+
+            var value = _connection.JsonSerializeObject(hubData);
+
+            _connection.Send(value).ContinueWith(task =>
+            {
+                if (task.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+                else if (task.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(task.Exception);
+                }
+            },
+            TaskContinuationOptions.NotOnRanToCompletion);
+
+            return tcs.Task;
+        }
+
+        public void InvokeEvent(string eventName, IList<JToken> args)
+        {
+            Subscription subscription;
+            if (_subscriptions.TryGetValue(eventName, out subscription))
+            {
+                subscription.OnReceived(args);
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxyExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxyExtensions.cs
new file mode 100644
index 0000000..52cdcbc
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubProxyExtensions.cs
@@ -0,0 +1,393 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Infrastructure;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    /// Extensions to the <see cref="IHubProxy"/>.
+    /// </summary>
+    public static class HubProxyExtensions
+    {
+        /// <summary>
+        /// Gets the value of a state variable.
+        /// </summary>
+        /// <typeparam name="T">The type of the state variable</typeparam>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="name">The name of the state variable.</param>
+        /// <returns>The value of the state variable.</returns>
+        public static T GetValue<T>(this IHubProxy proxy, string name)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(name))
+            {
+                throw new ArgumentNullException("name");
+            }
+
+            return Convert<T>(proxy[name], proxy.JsonSerializer);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On(this IHubProxy proxy, string eventName, Action onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData();
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T>(this IHubProxy proxy, string eventName, Action<T> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T>(args[0], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2>(this IHubProxy proxy, string eventName, Action<T1, T2> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2, T3>(this IHubProxy proxy, string eventName, Action<T1, T2, T3> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer),
+                       Convert<T3>(args[2], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2, T3, T4>(this IHubProxy proxy, string eventName, Action<T1, T2, T3, T4> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer),
+                       Convert<T3>(args[2], proxy.JsonSerializer),
+                       Convert<T4>(args[3], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+#if !WINDOWS_PHONE && !SILVERLIGHT && !NET35
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On(this IHubProxy proxy, string eventName, Action<dynamic> onData)
+        {
+            return On<dynamic>(proxy, eventName, onData);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2, T3, T4, T5>(this IHubProxy proxy, string eventName, Action<T1, T2, T3, T4, T5> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer),
+                       Convert<T3>(args[2], proxy.JsonSerializer),
+                       Convert<T4>(args[3], proxy.JsonSerializer),
+                       Convert<T5>(args[4], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2, T3, T4, T5, T6>(this IHubProxy proxy, string eventName, Action<T1, T2, T3, T4, T5, T6> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer),
+                       Convert<T3>(args[2], proxy.JsonSerializer),
+                       Convert<T4>(args[3], proxy.JsonSerializer),
+                       Convert<T5>(args[4], proxy.JsonSerializer),
+                       Convert<T6>(args[5], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers for an event with the specified name and callback
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/>.</param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <param name="onData">The callback</param>
+        /// <returns>An <see cref="IDisposable"/> that represents this subscription.</returns>
+        public static IDisposable On<T1, T2, T3, T4, T5, T6, T7>(this IHubProxy proxy, string eventName, Action<T1, T2, T3, T4, T5, T6, T7> onData)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            if (onData == null)
+            {
+                throw new ArgumentNullException("onData");
+            }
+
+            Subscription subscription = proxy.Subscribe(eventName);
+
+            Action<IList<JToken>> handler = args =>
+            {
+                onData(Convert<T1>(args[0], proxy.JsonSerializer),
+                       Convert<T2>(args[1], proxy.JsonSerializer),
+                       Convert<T3>(args[2], proxy.JsonSerializer),
+                       Convert<T4>(args[3], proxy.JsonSerializer),
+                       Convert<T5>(args[4], proxy.JsonSerializer),
+                       Convert<T6>(args[5], proxy.JsonSerializer),
+                       Convert<T7>(args[6], proxy.JsonSerializer));
+            };
+
+            subscription.Received += handler;
+
+            return new DisposableAction(() => subscription.Received -= handler);
+        }
+
+        /// <summary>
+        /// Registers a <see cref="IHubProxy"/> event has an <see cref="T:IObservable{T}"/>.
+        /// </summary>
+        /// <param name="proxy">The <see cref="IHubProxy"/></param>
+        /// <param name="eventName">The name of the event.</param>
+        /// <returns>An <see cref="T:IObservable{object[]}"/>.</returns>
+        public static IObservable<IList<JToken>> Observe(this IHubProxy proxy, string eventName)
+        {
+            if (proxy == null)
+            {
+                throw new ArgumentNullException("proxy");
+            }
+
+            if (String.IsNullOrEmpty(eventName))
+            {
+                throw new ArgumentNullException("eventName");
+            }
+
+            return new Hubservable(proxy, eventName);
+        }
+#endif
+
+        private static T Convert<T>(JToken obj, JsonSerializer serializer)
+        {
+            if (obj == null)
+            {
+                return default(T);
+            }
+
+            return obj.ToObject<T>(serializer);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubRegistrationData.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubRegistrationData.cs
new file mode 100644
index 0000000..36fc153
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubRegistrationData.cs
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    public class HubRegistrationData
+    {
+        public string Name { get; set; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubResult.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubResult.cs
new file mode 100644
index 0000000..62562be
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/HubResult.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    /// Represents the result of a hub invocation.
+    /// </summary>
+    public class HubResult
+    {
+        /// <summary>
+        /// The callback identifier
+        /// </summary>
+        [JsonProperty("I")]
+        public string Id { get; set; }
+
+        /// <summary>
+        /// The return value of the hub
+        /// </summary>
+        [JsonProperty("R")]
+        public JToken Result { get; set; }
+        
+        /// <summary>
+        /// The error message returned from the hub invocation.
+        /// </summary>
+        [JsonProperty("E")]
+        public string Error { get; set; }
+
+        /// <summary>
+        /// The caller state from this hub.
+        /// </summary>
+        [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Type is used for serialization.")]
+        [JsonProperty("S")]
+        public IDictionary<string, JToken> State { get; set; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Hubservable.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Hubservable.cs
new file mode 100644
index 0000000..e973e0c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Hubservable.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using Newtonsoft.Json.Linq;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Infrastructure;
+using System.Collections.Generic;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    /// <see cref="T:System.IObservable{object[]}"/> implementation of a hub event.
+    /// </summary>
+    public class Hubservable : IObservable<IList<JToken>>
+    {
+        private readonly string _eventName;
+        private readonly IHubProxy _proxy;
+
+        public Hubservable(IHubProxy proxy, string eventName)
+        {
+            _proxy = proxy;
+            _eventName = eventName;
+        }
+
+        public IDisposable Subscribe(IObserver<IList<JToken>> observer)
+        {
+            var subscription = _proxy.Subscribe(_eventName);
+            subscription.Received += observer.OnNext;
+
+            return new DisposableAction(() =>
+            {
+                subscription.Received -= observer.OnNext;
+            });
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubConnection.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubConnection.cs
new file mode 100644
index 0000000..e90ec86
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubConnection.cs
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    public interface IHubConnection : IConnection
+    {
+        string RegisterCallback(Action<HubResult> callback);
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubProxy.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubProxy.cs
new file mode 100644
index 0000000..e656f57
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/IHubProxy.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Threading.Tasks;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    ///  A client side proxy for a server side hub.
+    /// </summary>
+    public interface IHubProxy
+    {
+        /// <summary>
+        /// Gets or sets state on the hub.
+        /// </summary>
+        /// <param name="name">The name of the field.</param>
+        /// <returns>The value of the field</returns>
+        JToken this[string name] { get; set; }
+
+        /// <summary>
+        /// Executes a method on the server side hub asynchronously.
+        /// </summary>
+        /// <param name="method">The name of the method.</param>
+        /// <param name="args">The arguments</param>
+        /// <returns>A task that represents when invocation returned.</returns>
+        Task Invoke(string method, params object[] args);
+
+        /// <summary>
+        /// Executes a method on the server side hub asynchronously.
+        /// </summary>
+        /// <typeparam name="T">The type of result returned from the hub</typeparam>
+        /// <param name="method">The name of the method.</param>
+        /// <param name="args">The arguments</param>
+        /// <returns>A task that represents when invocation returned.</returns>
+        Task<T> Invoke<T>(string method, params object[] args);
+
+        /// <summary>
+        /// Registers an event for the hub.
+        /// </summary>
+        /// <param name="eventName">The name of the event</param>
+        /// <returns>A <see cref="Subscription"/>.</returns>
+        Subscription Subscribe(string eventName);
+
+        /// <summary>
+        /// Gets the serializer used by the connection.
+        /// </summary>
+        JsonSerializer JsonSerializer { get; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Subscription.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Subscription.cs
new file mode 100644
index 0000000..0675f95
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Hubs/Subscription.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Hubs
+{
+    /// <summary>
+    /// Represents a subscription to a hub method.
+    /// </summary>
+    public class Subscription
+    {
+        public event Action<IList<JToken>> Received;
+
+        internal void OnReceived(IList<JToken> data)
+        {
+            if (Received != null)
+            {
+                Received(data);
+            }
+        } 
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/IConnection.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/IConnection.cs
new file mode 100644
index 0000000..8c39f42
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/IConnection.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Net;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Client.Transports;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+#if (NET4 || NET45)
+using System.Security.Cryptography.X509Certificates;
+#endif
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public interface IConnection
+    {
+        KeepAliveData KeepAliveData { get; set; }
+        string MessageId { get; set; }
+        string GroupsToken { get; set; }
+        IDictionary<string, object> Items { get; }
+        string ConnectionId { get; }
+        string ConnectionToken { get; }
+        string Url { get; }
+        string QueryString { get; }
+        ConnectionState State { get; }
+        IClientTransport Transport { get; }
+
+        bool ChangeState(ConnectionState oldState, ConnectionState newState);
+
+        IDictionary<string, string> Headers { get; }
+        ICredentials Credentials { get; set; }
+        CookieContainer CookieContainer { get; set; }
+        JsonSerializer JsonSerializer { get; }
+
+        [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Stop", Justification = "Works in VB.NET.")]
+        void Stop();
+        void Disconnect();
+        Task Send(string data);
+
+        void OnReceived(JToken data);
+        void OnError(Exception ex);
+        void OnReconnecting();
+        void OnReconnected();
+        void OnConnectionSlow();
+        void PrepareRequest(IRequest request);
+        void UpdateLastKeepAlive();
+#if (NET4 || NET45)
+        void AddClientCertificate(X509Certificate certificate);
+#endif
+        void Trace(TraceLevels level, string format, params object[] args);
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ErrorExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ErrorExtensions.cs
new file mode 100644
index 0000000..124ce69
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ErrorExtensions.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Net;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public static class ErrorExtensions
+    {
+        /// <summary>
+        /// Simplifies error recognition by unwrapping complex exceptions.
+        /// </summary>
+        /// <param name="ex">The thrown exception.</param>
+        /// <returns>An unwrapped exception in the form of a SignalRError.</returns>
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The IDisposable object is the return value.")]
+        public static SignalRError GetError(this Exception ex)
+        {
+            ex = ex.Unwrap();
+            var wex = ex as WebException;
+
+            var error = new SignalRError(ex);
+
+            if (wex != null && wex.Response != null)
+            {
+                var response = wex.Response as HttpWebResponse;
+                if (response != null)
+                {
+                    error.SetResponse(response);
+                    error.StatusCode = response.StatusCode;
+                    Stream originStream = response.GetResponseStream();
+
+                    if (originStream.CanRead)
+                    {
+                        // We need to copy the stream over and not consume it all on "ReadToEnd".  If we consumed the entire stream GetError
+                        // would only be able to be called once per Exception, otherwise you get inconsistent ResponseBody results.
+                        Stream stream = Clone(originStream);
+
+                        // Consume our copied stream
+                        using (var sr = new StreamReader(stream))
+                        {
+                            error.ResponseBody = sr.ReadToEnd();
+                        }
+                    }
+                }
+            }
+
+            return error;
+        }
+
+        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The return value of this private method is disposed in GetError.")]
+        private static Stream Clone(Stream source)
+        {
+            var cloned = new MemoryStream();
+#if NET35
+            // Copy up to 2048 bytes at a time
+            byte[] buffer = new byte[2048];
+
+            // Maintains how many bytes were read
+            int copiedBytes;
+
+            // Read bytes and copy them into a buffer making sure not to trigger the dispose
+            while ((copiedBytes = source.Read(buffer, 0, buffer.Length)) > 0)
+            {
+                // Write the copied bytes from the buffer into the cloned stream
+                cloned.Write(buffer, 0, copiedBytes);
+            }
+
+#else
+            source.CopyTo(cloned);
+#endif
+            // Move the stream pointers back to the original start locations
+            if (source.CanSeek)
+            {
+                source.Seek(0, 0);
+            }
+
+            cloned.Seek(0, 0);
+
+            return cloned;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ExceptionHelper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ExceptionHelper.cs
new file mode 100644
index 0000000..f705d3d
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ExceptionHelper.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Net;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Infrastructure
+{
+    internal static class ExceptionHelper
+    {
+        internal static bool IsRequestAborted(Exception exception)
+        {
+            exception = exception.Unwrap();
+
+            // Support an alternative way to propagate aborted requests
+            if (exception is OperationCanceledException)
+            {
+                return true;
+            }
+
+            // There is a race in StreamExtensions where if the endMethod in ReadAsync is called before
+            // the Stream is disposed, but executes after, Stream.EndRead will be called on a disposed object.
+            // Since we call HttpWebRequest.Abort in several places while potentially reading the stream,
+            // and we don't want to lock around HttpWebRequest.Abort and Stream.EndRead, we just swallow the 
+            // exception.
+            // If the Stream is closed before the call to the endMethod, we expect an OperationCanceledException,
+            // so this is a fairly rare race condition.
+            if (exception is ObjectDisposedException)
+            {
+                return true;
+            }
+
+            var webException = exception as WebException;
+            return (webException != null && webException.Status == WebExceptionStatus.RequestCanceled);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/SignalRError.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/SignalRError.cs
new file mode 100644
index 0000000..e76f75e
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/SignalRError.cs
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Net;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    /// <summary>
+    /// Represents errors that are thrown by the SignalR client
+    /// </summary>
+    public class SignalRError : IDisposable
+    {
+        private HttpWebResponse _response;
+
+        /// <summary>
+        /// Create custom SignalR based error.
+        /// </summary>
+        /// <param name="exception">The exception to unwrap</param>
+        public SignalRError(Exception exception)
+        {
+            Exception = exception;
+        }
+
+        internal void SetResponse(HttpWebResponse response)
+        {
+            _response = response;
+        }
+
+        /// <summary>
+        /// The status code of the error (if it was a WebException)
+        /// </summary>
+        public HttpStatusCode StatusCode { get; set; }
+
+        /// <summary>
+        /// The response body of the error, if it was a WebException and the response is readable
+        /// </summary>
+        public string ResponseBody { get; set; }
+
+        /// <summary>
+        /// The unwrapped underlying exception
+        /// </summary>
+        public Exception Exception { get; private set; }
+
+        /// <summary>
+        /// Allow a SignalRError to be directly written to an output stream
+        /// </summary>
+        /// <returns>Exception error</returns>
+        public override string ToString()
+        {
+            return Exception.ToString();
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                if (_response != null)
+                {
+                    _response.Close();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Dispose of the response
+        /// </summary>
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/StreamExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/StreamExtensions.cs
new file mode 100644
index 0000000..a5263c5
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/StreamExtensions.cs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    internal static class StreamExtensions
+    {
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        public static Task<int> ReadAsync(this Stream stream, byte[] buffer)
+        {
+#if NETFX_CORE || NET45
+            return stream.ReadAsync(buffer, 0, buffer.Length);
+#else
+            return FromAsync(cb => stream.BeginRead(buffer, 0, buffer.Length, cb, null), ar => stream.EndRead(ar));
+#endif
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared class.")]
+        public static Task WriteAsync(this Stream stream, byte[] buffer)
+        {
+#if NETFX_CORE || NET45
+            return stream.WriteAsync(buffer, 0, buffer.Length);
+#else
+            return FromAsync(cb => stream.BeginWrite(buffer, 0, buffer.Length, cb, null), WrapEndWrite(stream));
+#endif
+        }
+
+#if !(NETFX_CORE || NET45)
+        private static Func<IAsyncResult, object> WrapEndWrite(Stream stream)
+        {
+            return ar =>
+            {
+                stream.EndWrite(ar);
+                return null;
+            };
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        private static Task<T> FromAsync<T>(Func<AsyncCallback, IAsyncResult> begin, Func<IAsyncResult, T> end)
+        {
+            var tcs = new TaskCompletionSource<T>();
+            try
+            {
+                var result = begin(ar =>
+                {
+                    if (!ar.CompletedSynchronously)
+                    {
+                        CompleteAsync(tcs, ar, end);
+                    }
+                });
+
+                if (result.CompletedSynchronously)
+                {
+                    CompleteAsync(tcs, result, end);
+                }
+            }
+            catch (Exception ex)
+            {
+                tcs.TrySetException(ex);
+            }
+
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to the caller.")]
+        private static void CompleteAsync<T>(TaskCompletionSource<T> tcs, IAsyncResult ar, Func<IAsyncResult, T> end)
+        {
+            try
+            {
+                tcs.TrySetResult(end(ar));
+            }
+            catch (OperationCanceledException)
+            {
+                tcs.TrySetCanceled();
+            }
+            catch (Exception ex)
+            {
+                tcs.TrySetException(ex);
+            }
+        }
+#endif
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ThreadSafeInvoker.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ThreadSafeInvoker.cs
new file mode 100644
index 0000000..32b0ceb
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/ThreadSafeInvoker.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Threading;
+
+namespace Microsoft.AspNet.SignalR.Client.Infrastructure
+{
+    /// <summary>
+    /// Allows for thread safe invocation of a delegate.
+    /// </summary>
+    internal class ThreadSafeInvoker
+    {
+        private int _invoked;
+
+        public bool Invoke(Action action)
+        {
+            if (Interlocked.Exchange(ref _invoked, 1) == 0)
+            {
+                action();
+                return true;
+            }
+
+            return false;
+        }
+
+        public bool Invoke<T>(Action<T> action, T arg)
+        {
+            if (Interlocked.Exchange(ref _invoked, 1) == 0)
+            {
+                action(arg);
+                return true;
+            }
+
+            return false;
+        }
+
+        public bool Invoke<T1, T2>(Action<T1, T2> action, T1 arg1, T2 arg2)
+        {
+            if (Interlocked.Exchange(ref _invoked, 1) == 0)
+            {
+                action(arg1, arg2);
+                return true;
+            }
+
+            return false;
+        }
+
+        public bool Invoke()
+        {
+            return Invoke(() => { });
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/UrlEncoder.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/UrlEncoder.cs
new file mode 100644
index 0000000..4f0d19e
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Infrastructure/UrlEncoder.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Text;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    // Taken from System.Net.Http.Formatting.Internal.UrlEncoder.cs (http://aspnetwebstack.codeplex.com/)
+
+    /// <summary>
+    /// Helpers for encoding URI query components.
+    /// </summary>
+    internal static class UrlEncoder
+    {
+        // The implementation below is ported from WebUtility for use in .Net 4
+
+        public static string UrlEncode(string str)
+        {
+            if (str == null)
+                return null;
+
+            byte[] bytes = Encoding.UTF8.GetBytes(str);
+            byte[] encodedBytes = UrlEncode(bytes, 0, bytes.Length, alwaysCreateNewReturnValue: false);
+            return Encoding.UTF8.GetString(encodedBytes, 0, encodedBytes.Length);
+        }
+
+        #region UrlEncode implementation
+
+        private static byte[] UrlEncode(byte[] bytes, int offset, int count, bool alwaysCreateNewReturnValue)
+        {
+            byte[] encoded = UrlEncode(bytes, offset, count);
+
+            return (alwaysCreateNewReturnValue && (encoded != null) && (encoded == bytes))
+                ? (byte[])encoded.Clone()
+                : encoded;
+        }
+
+        private static byte[] UrlEncode(byte[] bytes, int offset, int count)
+        {
+            if (!ValidateUrlEncodingParameters(bytes, offset, count))
+            {
+                return null;
+            }
+
+            int cSpaces = 0;
+            int cUnsafe = 0;
+
+            // count them first
+            for (int i = 0; i < count; i++)
+            {
+                char ch = (char)bytes[offset + i];
+
+                if (ch == ' ')
+                    cSpaces++;
+                else if (!IsUrlSafeChar(ch))
+                    cUnsafe++;
+            }
+
+            // nothing to expand?
+            if (cSpaces == 0 && cUnsafe == 0)
+                return bytes;
+
+            // expand not 'safe' characters into %XX, spaces to +s
+            byte[] expandedBytes = new byte[count + cUnsafe * 2];
+            int pos = 0;
+
+            for (int i = 0; i < count; i++)
+            {
+                byte b = bytes[offset + i];
+                char ch = (char)b;
+
+                if (IsUrlSafeChar(ch))
+                {
+                    expandedBytes[pos++] = b;
+                }
+                else if (ch == ' ')
+                {
+                    expandedBytes[pos++] = (byte)'+';
+                }
+                else
+                {
+                    expandedBytes[pos++] = (byte)'%';
+                    expandedBytes[pos++] = (byte)IntToHex((b >> 4) & 0xf);
+                    expandedBytes[pos++] = (byte)IntToHex(b & 0x0f);
+                }
+            }
+
+            return expandedBytes;
+        }
+
+        #endregion
+
+        #region Helper methods
+
+        private static char IntToHex(int n)
+        {
+            if (n <= 9)
+                return (char)(n + (int)'0');
+            else
+                return (char)(n - 10 + (int)'a');
+        }
+
+        // Set of safe chars, from RFC 1738.4 minus '+'
+        private static bool IsUrlSafeChar(char ch)
+        {
+            if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')
+                return true;
+
+            switch (ch)
+            {
+                case '-':
+                case '_':
+                case '.':
+                case '!':
+                case '*':
+                case '(':
+                case ')':
+                    return true;
+            }
+
+            return false;
+        }
+        
+        private static bool ValidateUrlEncodingParameters(byte[] bytes, int offset, int count)
+        {
+            if (bytes == null && count == 0)
+                return false;
+            if (bytes == null)
+            {
+                throw new ArgumentNullException("bytes");
+            }
+            if (offset < 0 || offset > bytes.Length)
+            {
+                throw new ArgumentOutOfRangeException("offset");
+            }
+            if (count < 0 || offset + count > bytes.Length)
+            {
+                throw new ArgumentOutOfRangeException("count");
+            }
+
+            return true;
+        }
+
+        #endregion
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/KeepAliveData.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/KeepAliveData.cs
new file mode 100644
index 0000000..5a5bf21
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/KeepAliveData.cs
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    /// <summary>
+    /// Class to store all the Keep Alive properties
+    /// </summary>
+    public class KeepAliveData
+    {
+        // Determines when we warn the developer that the connection may be lost
+        private const double _keepAliveWarnAt = 2.0 / 3.0;
+
+        public DateTime LastKeepAlive { get; set; }
+
+        // Timeout to designate when to force the connection into reconnecting
+        public TimeSpan Timeout { get; private set; }
+
+        // Timeout to designate when to warn the developer that the connection may be dead or is hanging.
+        public TimeSpan TimeoutWarning { get; private set; }
+
+        // Frequency with which we check the keep alive.  It must be short in order to not miss/pick up any changes
+        public TimeSpan CheckInterval { get; private set; }
+
+        public KeepAliveData(TimeSpan timeout)
+        {
+            Timeout = timeout;
+            TimeoutWarning = TimeSpan.FromTicks((long)(Timeout.Ticks * _keepAliveWarnAt));
+            CheckInterval = TimeSpan.FromTicks((Timeout.Ticks - TimeoutWarning.Ticks) / 3);
+        }
+
+        public KeepAliveData(DateTime lastKeepAlive, TimeSpan timeout, TimeSpan timeoutWarning, TimeSpan checkInterval)
+        {
+            LastKeepAlive = lastKeepAlive;
+            Timeout = timeout;
+            TimeoutWarning = timeoutWarning;
+            CheckInterval = checkInterval;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Microsoft.AspNet.SignalR.Client.csproj b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Microsoft.AspNet.SignalR.Client.csproj
new file mode 100644
index 0000000..0417a9f
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Microsoft.AspNet.SignalR.Client.csproj
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{EB46B9C6-EE37-48F9-835E-E49580E40E0A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Microsoft.AspNet.SignalR.Client</RootNamespace>
+    <AssemblyName>Microsoft.AspNet.SignalR.Client</AssemblyName>
+    <FileAlignment>512</FileAlignment>
+    <RestorePackages>true</RestorePackages>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;CLIENT_NET4;NET4;MONO</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Debug\Microsoft.AspNet.SignalR.Client.XML</DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;STABLE_VERSION</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Release\Microsoft.AspNet.SignalR.Client.XML</DocumentationFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="Microsoft.CSharp" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\Common\CommonAssemblyInfo.cs">
+      <Link>Properties\CommonAssemblyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Common\CommonVersionInfo.cs">
+      <Link>Properties\CommonVersionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Microsoft.AspNet.SignalR.Core\Infrastructure\CancellationTokenExtensions.cs">
+      <Link>Infrastructure\CancellationTokenExtensions.cs</Link>
+    </Compile>
+    <Compile Include="..\Microsoft.AspNet.SignalR.Core\Infrastructure\DisposableAction.cs">
+      <Link>Infrastructure\DisposableAction.cs</Link>
+    </Compile>
+    <Compile Include="..\Microsoft.AspNet.SignalR.Core\Infrastructure\Disposer.cs">
+      <Link>Infrastructure\Disposer.cs</Link>
+    </Compile>
+    <Compile Include="..\Microsoft.AspNet.SignalR.Core\Infrastructure\ExceptionsExtensions.cs">
+      <Link>Infrastructure\ExceptionsExtensions.cs</Link>
+    </Compile>
+    <Compile Include="..\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs">
+      <Link>Infrastructure\TaskAsyncHelper.cs</Link>
+    </Compile>
+    <Compile Include="Connection.cs" />
+    <Compile Include="ConnectionExtensions.cs" />
+    <Compile Include="HeaderDictionary.cs" />
+    <Compile Include="HeartBeatMonitor.cs" />
+    <Compile Include="Http\IResponseExtensions.cs" />
+    <Compile Include="Hubs\HubInvocation.cs" />
+    <Compile Include="ConnectionState.cs" />
+    <Compile Include="Hubs\HubConnection.cs" />
+    <Compile Include="Hubs\HubProxy.cs" />
+    <Compile Include="Hubs\HubRegistrationData.cs" />
+    <Compile Include="Hubs\HubResult.cs" />
+    <Compile Include="Hubs\Hubservable.cs" />
+    <Compile Include="Hubs\IHubConnection.cs" />
+    <Compile Include="Hubs\IHubProxy.cs" />
+    <Compile Include="Hubs\Subscription.cs" />
+    <Compile Include="IConnection.cs" />
+    <Compile Include="Infrastructure\ErrorExtensions.cs" />
+    <Compile Include="KeepAliveData.cs" />
+    <Compile Include="Infrastructure\SignalRError.cs" />
+    <Compile Include="Infrastructure\ExceptionHelper.cs" />
+    <Compile Include="Infrastructure\ThreadSafeInvoker.cs" />
+    <Compile Include="Infrastructure\UrlEncoder.cs" />
+    <Compile Include="TraceLevels.cs" />
+    <Compile Include="Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Transports\AsyncStreamReader.cs" />
+    <Compile Include="Transports\LongPolling\NegotiateInitializer.cs" />
+    <Compile Include="Transports\LongPolling\PollingRequestHandler.cs" />
+    <Compile Include="Transports\ServerSentEvents\ChunkBuffer.cs" />
+    <Compile Include="Http\DefaultHttpClient.cs" />
+    <Compile Include="Http\HttpHelper.cs" />
+    <Compile Include="Http\HttpWebRequestWrapper.cs" />
+    <Compile Include="Http\HttpWebResponseWrapper.cs" />
+    <Compile Include="Http\IHttpClient.cs" />
+    <Compile Include="Http\IHttpClientExtensions.cs" />
+    <Compile Include="Http\IRequest.cs" />
+    <Compile Include="Http\IResponse.cs" />
+    <Compile Include="Transports\ServerSentEvents\EventSourceStreamReader.cs" />
+    <Compile Include="Infrastructure\StreamExtensions.cs" />
+    <Compile Include="NegotiationResponse.cs" />
+    <Compile Include="ObservableConnection.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Hubs\HubProxyExtensions.cs" />
+    <Compile Include="StateChange.cs" />
+    <Compile Include="Transports\AutoTransport.cs" />
+    <Compile Include="Transports\HttpBasedTransport.cs" />
+    <Compile Include="Transports\IClientTransport.cs" />
+    <Compile Include="Transports\LongPollingTransport.cs" />
+    <Compile Include="Transports\ServerSentEventsTransport.cs" />
+    <Compile Include="Transports\ServerSentEvents\EventType.cs" />
+    <Compile Include="Transports\ServerSentEvents\SseEvent.cs" />
+    <Compile Include="Transports\TransportHelper.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <Import Project="..\Common\Microsoft.AspNet.SignalR.targets" />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\Newtonsoft.Json\Src\Newtonsoft.Json\Newtonsoft.Json.csproj">
+      <Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
+      <Name>Newtonsoft.Json</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/NegotiationResponse.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/NegotiationResponse.cs
new file mode 100644
index 0000000..17c8984
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/NegotiationResponse.cs
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Diagnostics;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    [DebuggerDisplay("{ConnectionId} {Url} -> {ProtocolVersion}")]
+    public class NegotiationResponse
+    {
+        public string ConnectionId { get; set; }
+        public string ConnectionToken { get; set; }
+        public string Url { get; set; }
+        public string ProtocolVersion { get; set; }
+        public double DisconnectTimeout { get; set; }
+        public bool TryWebSockets { get; set; }
+        public double? KeepAliveTimeout { get; set; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ObservableConnection.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ObservableConnection.cs
new file mode 100644
index 0000000..a198c84
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/ObservableConnection.cs
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Globalization;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    public class ObservableConnection<T> : IObservable<T>
+    {
+        private readonly Connection _connection;
+        private readonly Func<string, T> _convert;
+
+        public ObservableConnection(Connection connection, Func<string, T> convert)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            if (convert == null)
+            {
+                throw new ArgumentNullException("convert");
+            }
+
+            _convert = convert;
+            _connection = connection;
+        }
+
+        public IDisposable Subscribe(IObserver<T> observer)
+        {
+            Action<string> received = data =>
+            {
+                observer.OnNext(_convert(data));
+            };
+
+            Action closed = () =>
+            {
+                observer.OnCompleted();
+            };
+
+            Action<Exception> error = ex =>
+            {
+                observer.OnError(ex);
+            };
+
+            _connection.Received += received;
+            _connection.Closed += closed;
+            _connection.Error += error;
+
+            return new DisposableAction(() =>
+            {
+                _connection.Received -= received;
+                _connection.Closed -= closed;
+                _connection.Error -= error;
+            });
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Properties/AssemblyInfo.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6c43c51
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Properties/AssemblyInfo.cs
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System.Reflection;
+
+[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Client")]
+[assembly: AssemblyDescription(".NET client for SignalR")]
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.Designer.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.Designer.cs
new file mode 100644
index 0000000..7cb0295
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.Designer.cs
@@ -0,0 +1,149 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18033
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Microsoft.AspNet.SignalR.Client {
+    using System;
+    using System.Reflection;
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+#if NETFX_CORE
+                    var assembly = typeof(Resources).GetTypeInfo().Assembly;
+#else
+                    var assembly = typeof(Resources).Assembly;
+#endif
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNet.SignalR.Client.Resources", assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Client Certificates cannot be added after the connection has started..
+        /// </summary>
+        internal static string Error_CertsCanOnlyBeAddedWhenDisconnected {
+            get {
+                return ResourceManager.GetString("Error_CertsCanOnlyBeAddedWhenDisconnected", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The connection was stopped before it could be started..
+        /// </summary>
+        internal static string Error_ConnectionCancelled {
+            get {
+                return ResourceManager.GetString("Error_ConnectionCancelled", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The connection has not been established..
+        /// </summary>
+        internal static string Error_ConnectionHasNotBeenEstablished {
+            get {
+                return ResourceManager.GetString("Error_ConnectionHasNotBeenEstablished", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Request headers cannot be set after the connection has started..
+        /// </summary>
+        internal static string Error_HeadersCanOnlyBeSetWhenDisconnected {
+            get {
+                return ResourceManager.GetString("Error_HeadersCanOnlyBeSetWhenDisconnected", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}..
+        /// </summary>
+        internal static string Error_IncompatibleProtocolVersion {
+            get {
+                return ResourceManager.GetString("Error_IncompatibleProtocolVersion", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to A HubProxy cannot be added after the connection has been started..
+        /// </summary>
+        internal static string Error_ProxiesCannotBeAddedConnectionStarted {
+            get {
+                return ResourceManager.GetString("Error_ProxiesCannotBeAddedConnectionStarted", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Server negotiation failed..
+        /// </summary>
+        internal static string Error_ServerNegotiationFailed {
+            get {
+                return ResourceManager.GetString("Error_ServerNegotiationFailed", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to The Start method must be called before data can be sent..
+        /// </summary>
+        internal static string Error_StartMustBeCalledBeforeDataCanBeSent {
+            get {
+                return ResourceManager.GetString("Error_StartMustBeCalledBeforeDataCanBeSent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Url cannot contain query string directly. Pass query string values in using available overload..
+        /// </summary>
+        internal static string Error_UrlCantContainQueryStringDirectly {
+            get {
+                return ResourceManager.GetString("Error_UrlCantContainQueryStringDirectly", resourceCulture);
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.resx b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.resx
new file mode 100644
index 0000000..fe2bbd6
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Resources.resx
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Error_ConnectionCancelled" xml:space="preserve">
+    <value>The connection was stopped before it could be started.</value>
+  </data>
+  <data name="Error_ConnectionHasNotBeenEstablished" xml:space="preserve">
+    <value>The connection has not been established.</value>
+  </data>
+  <data name="Error_HeadersCanOnlyBeSetWhenDisconnected" xml:space="preserve">
+    <value>Request headers cannot be set after the connection has started.</value>
+  </data>
+  <data name="Error_IncompatibleProtocolVersion" xml:space="preserve">
+    <value>You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.</value>
+  </data>
+  <data name="Error_ProxiesCannotBeAddedConnectionStarted" xml:space="preserve">
+    <value>A HubProxy cannot be added after the connection has been started.</value>
+  </data>
+  <data name="Error_ServerNegotiationFailed" xml:space="preserve">
+    <value>Server negotiation failed.</value>
+  </data>
+  <data name="Error_StartMustBeCalledBeforeDataCanBeSent" xml:space="preserve">
+    <value>The Start method must be called before data can be sent.</value>
+  </data>
+  <data name="Error_UrlCantContainQueryStringDirectly" xml:space="preserve">
+    <value>Url cannot contain query string directly. Pass query string values in using available overload.</value>
+  </data>
+</root>
\ No newline at end of file
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/StateChange.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/StateChange.cs
new file mode 100644
index 0000000..f0642a2
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/StateChange.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    /// <summary>
+    /// Represents a change in the connection state.
+    /// </summary>
+    public class StateChange
+    {
+        /// <summary>
+        /// Creates a new stance of <see cref="StateChange"/>.
+        /// </summary>
+        /// <param name="oldState">The old state of the connection.</param>
+        /// <param name="newState">The new state of the connection.</param>
+        public StateChange(ConnectionState oldState, ConnectionState newState)
+        {
+            OldState = oldState;
+            NewState = newState;
+        }
+
+        /// <summary>
+        /// Gets the old state of the connection.
+        /// </summary>
+        public ConnectionState OldState { get; private set; }
+
+        /// <summary>
+        /// Gets the new state of the connection.
+        /// </summary>
+        public ConnectionState NewState { get; private set; }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/TraceLevels.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/TraceLevels.cs
new file mode 100644
index 0000000..793b4a5
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/TraceLevels.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace Microsoft.AspNet.SignalR.Client
+{
+    [Flags]
+    public enum TraceLevels
+    {
+        None = 0,
+        Messages = 1,
+        Events = 2,
+        StateChanges = 4,
+        All = Messages | Events | StateChanges
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AsyncStreamReader.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AsyncStreamReader.cs
new file mode 100644
index 0000000..949624c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AsyncStreamReader.cs
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public class AsyncStreamReader
+    {
+        private readonly object _bufferLock = new object();
+        private readonly Stream _stream;
+        private byte[] _readBuffer;
+        private int _reading;
+        private Action _setOpened;
+
+        protected object BufferLock
+        {
+            get
+            {
+                return _bufferLock;
+            }
+        }
+
+        /// <summary>
+        /// Invoked when the stream is open.
+        /// </summary>
+        public Action Opened { get; set; }
+
+        /// <summary>
+        /// Invoked when the reader is closed while in the Processing state.
+        /// </summary>
+        public Action<Exception> Closed { get; set; }
+
+        /// <summary>
+        /// Invoked when there's a message if received in the stream.
+        /// </summary>
+        public Action<ArraySegment<byte>> Data { get; set; }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="AsyncStreamReader"/> class.
+        /// </summary>
+        /// <param name="stream">The stream to read asynchronously payloads from.</param>
+        public AsyncStreamReader(Stream stream)
+        {
+            _stream = stream;
+        }
+
+        private bool Processing
+        {
+            get
+            {
+                return _reading == State.Processing;
+            }
+        }
+
+        /// <summary>
+        /// Starts the reader.
+        /// </summary>
+        public void Start()
+        {
+            if (Interlocked.CompareExchange(ref _reading, State.Processing, State.Initial) == State.Initial)
+            {
+                _setOpened = () =>
+                {
+                    OnOpened();
+                };
+
+                // FIX: Potential memory leak if Close is called between the CompareExchange and here.
+                _readBuffer = new byte[4096];
+
+                // Start the process loop
+                Process();
+            }
+        }
+
+        /// <summary>
+        /// Closes the connection and the underlying stream.
+        /// </summary>
+        private void Close()
+        {
+            Close(exception: null);
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The client receives the exception in the Close callback.")]
+        private void Process()
+        {
+        Read:
+            Task<int> readTask;
+            lock (_bufferLock)
+            {
+                if (Processing && _readBuffer != null)
+                {
+                    readTask = _stream.ReadAsync(_readBuffer);
+                }
+                else
+                {
+                    return;
+                }
+            }
+
+            if (readTask.IsCompleted)
+            {
+                try
+                {
+                    // Observe all exceptions
+                    readTask.Wait();
+
+                    int read = readTask.Result;
+
+                    if (TryProcessRead(read))
+                    {
+                        goto Read;
+                    }
+                }
+                catch (Exception ex)
+                {
+                    Close(ex);
+                }
+            }
+            else
+            {
+                ReadAsync(readTask);
+            }
+        }
+
+        private void ReadAsync(Task<int> readTask)
+        {
+            readTask.ContinueWith(task =>
+            {
+                if (task.IsFaulted)
+                {
+                    Close(task.Exception);
+                }
+                else if (task.IsCanceled)
+                {
+                    Close(new OperationCanceledException());
+                }
+                else
+                {
+                    if (TryProcessRead(task.Result))
+                    {
+                        Process();
+                    }
+                }
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        private bool TryProcessRead(int read)
+        {
+            Interlocked.Exchange(ref _setOpened, () => { }).Invoke();
+
+            if (read > 0)
+            {
+                // Put chunks in the buffer
+                OnData(new ArraySegment<byte>(_readBuffer, 0, read));
+
+                return true;
+            }
+            else if (read == 0)
+            {
+                Close();
+            }
+
+            return false;
+        }
+
+        private void Close(Exception exception)
+        {
+            var previousState = Interlocked.Exchange(ref _reading, State.Stopped);
+
+            if (previousState != State.Stopped)
+            {
+                if (Closed != null)
+                {
+                    if (exception != null)
+                    {
+                        exception = exception.Unwrap();
+                    }
+
+                    Closed(exception);
+                }
+
+                lock (_bufferLock)
+                {
+                    // Release the buffer
+                    _readBuffer = null;
+                }
+            }
+        }
+
+        private void OnOpened()
+        {
+            if (Opened != null)
+            {
+                Opened();
+            }
+        }
+
+        private void OnData(ArraySegment<byte> buffer)
+        {
+            if (Data != null)
+            {
+                Data(buffer);
+            }
+        }
+
+        private static class State
+        {
+            public const int Initial = 0;
+            public const int Processing = 1;
+            public const int Stopped = 2;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AutoTransport.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AutoTransport.cs
new file mode 100644
index 0000000..ace357b
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/AutoTransport.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public class AutoTransport : IClientTransport
+    {
+        // Transport that's in use
+        private IClientTransport _transport;
+
+        private readonly IHttpClient _httpClient;
+
+        private int _startIndex = 0;
+
+        // List of transports in fallback order
+        private readonly IList<IClientTransport> _transports;
+
+        public AutoTransport(IHttpClient httpClient)
+        {
+            _httpClient = httpClient;
+            _transports = new IClientTransport[] { 
+#if NET45
+                new WebSocketTransport(httpClient),
+#endif
+                new ServerSentEventsTransport(httpClient), 
+                new LongPollingTransport(httpClient) 
+            };
+        }
+
+        public AutoTransport(IHttpClient httpClient, IList<IClientTransport> transports)
+        {
+            _httpClient = httpClient;
+            _transports = transports;
+        }
+
+        /// <summary>
+        /// Indicates whether or not the active transport supports keep alive
+        /// </summary>
+        public bool SupportsKeepAlive
+        {
+            get
+            {
+                return _transport != null ? _transport.SupportsKeepAlive : false;
+            }
+        }
+
+        public string Name
+        {
+            get
+            {
+                if (_transport == null)
+                {
+                    return null;
+                }
+
+                return _transport.Name;
+            }
+        }
+
+        public Task<NegotiationResponse> Negotiate(IConnection connection)
+        {
+            var task = _httpClient.GetNegotiationResponse(connection);
+#if NET45
+            return task.Then(response =>
+            {
+                if (!response.TryWebSockets)
+                {
+                    _startIndex = 1;
+                }
+
+                return response;
+            });
+#else
+            return task;
+#endif
+        }
+
+        public Task Start(IConnection connection, string data, CancellationToken disconnectToken)
+        {
+            var tcs = new TaskCompletionSource<object>();
+
+            // Resolve the transport
+            ResolveTransport(connection, data, disconnectToken, tcs, _startIndex);
+
+            return tcs.Task;
+        }
+
+        private void ResolveTransport(IConnection connection, string data, CancellationToken disconnectToken, TaskCompletionSource<object> tcs, int index)
+        {
+            // Pick the current transport
+            IClientTransport transport = _transports[index];
+
+            transport.Start(connection, data, disconnectToken).ContinueWith(task =>
+            {
+                if (task.IsFaulted)
+                {
+                    // Make sure we observe the exception
+                    var ex = task.Exception.GetBaseException();
+
+                    connection.Trace(TraceLevels.Events, "Auto: Failed to connect to using transport {0}. {1}", transport.Name, ex);
+
+                    // If that transport fails to initialize then fallback
+                    var next = index + 1;
+                    if (next < _transports.Count)
+                    {
+                        // Try the next transport
+                        ResolveTransport(connection, data, disconnectToken, tcs, next);
+                    }
+                    else
+                    {
+                        // If there's nothing else to try then just fail
+                        tcs.SetException(task.Exception);
+                    }
+                }
+                else
+                {
+                    // Set the active transport
+                    _transport = transport;
+
+                    // Complete the process
+                    tcs.SetResult(null);
+                }
+
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        public Task Send(IConnection connection, string data)
+        {
+            return _transport.Send(connection, data);
+        }
+
+        public void Abort(IConnection connection, TimeSpan timeout)
+        {
+            if (_transport != null)
+            {
+                _transport.Abort(connection, timeout);
+            }
+        }
+
+        public void LostConnection(IConnection connection)
+        {
+            _transport.LostConnection(connection);
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                if (_transport != null)
+                {
+                    _transport.Dispose();
+                }
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/HttpBasedTransport.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/HttpBasedTransport.cs
new file mode 100644
index 0000000..818b4aa
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/HttpBasedTransport.cs
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Infrastructure;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public abstract class HttpBasedTransport : IClientTransport
+    {
+        // The send query string
+        private const string _sendQueryString = "?transport={0}&connectionToken={1}{2}";
+
+        // The transport name
+        private readonly string _transport;
+
+        // Used to complete the synchronous call to Abort()
+        private ManualResetEvent _abortResetEvent = new ManualResetEvent(initialState: false);
+
+        // Used to indicate whether Abort() has been called
+        private bool _startedAbort;
+        // Used to ensure that Abort() runs effectively only once
+        // The _abortLock subsumes the _disposeLock and can be held upwards of 30 seconds
+        private readonly object _abortLock = new object();
+
+        // Used to ensure the _abortResetEvent.Set() isn't called after disposal
+        private bool _disposed;
+        // Used to make checking _disposed and calling _abortResetEvent.Set() thread safe
+        private readonly object _disposeLock = new object();
+
+        private readonly IHttpClient _httpClient;
+
+        protected HttpBasedTransport(IHttpClient httpClient, string transport)
+        {
+            _httpClient = httpClient;
+            _transport = transport;
+        }
+
+        public string Name
+        {
+            get
+            {
+                return _transport;
+            }
+        }
+
+        /// <summary>
+        /// Indicates whether or not the transport supports keep alive
+        /// </summary>
+        public abstract bool SupportsKeepAlive { get; }
+
+        protected IHttpClient HttpClient
+        {
+            get { return _httpClient; }
+        }
+
+        public Task<NegotiationResponse> Negotiate(IConnection connection)
+        {
+            return _httpClient.GetNegotiationResponse(connection);
+        }
+
+        public Task Start(IConnection connection, string data, CancellationToken disconnectToken)
+        {
+            var tcs = new TaskCompletionSource<object>();
+
+            OnStart(connection, data, disconnectToken, () => tcs.TrySetResult(null), exception => tcs.TrySetException(exception));
+
+            return tcs.Task;
+        }
+
+        protected abstract void OnStart(IConnection connection,
+                                        string data,
+                                        CancellationToken disconnectToken,
+                                        Action initializeCallback,
+                                        Action<Exception> errorCallback);
+
+        public Task Send(IConnection connection, string data)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            string url = connection.Url + "send";
+            string customQueryString = String.IsNullOrEmpty(connection.QueryString) ? String.Empty : "&" + connection.QueryString;
+
+            url += String.Format(CultureInfo.InvariantCulture,
+                                _sendQueryString,
+                                _transport,
+                                Uri.EscapeDataString(connection.ConnectionToken),
+                                customQueryString);
+
+            var postData = new Dictionary<string, string> {
+                { "data", data }
+            };
+
+            return _httpClient.Post(url, connection.PrepareRequest, postData)
+                              .Then(response => response.ReadAsString())
+                              .Then(raw =>
+                              {
+                                  connection.Trace(TraceLevels.Messages, "OnMessage({0})", raw);
+
+                                  if (!String.IsNullOrEmpty(raw))
+                                  {
+                                      connection.OnReceived(JObject.Parse(raw));
+                                  }
+                              })
+                              .Catch(connection.OnError);
+        }
+
+        public void Abort(IConnection connection, TimeSpan timeout)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            // Abort should never complete before any of its previous calls
+            lock (_abortLock)
+            {
+                if (_disposed)
+                {
+                    throw new ObjectDisposedException(GetType().Name);
+                }
+
+                // Ensure that an abort request is only made once
+                if (!_startedAbort)
+                {
+                    _startedAbort = true;
+
+                    string url = connection.Url + "abort" + String.Format(CultureInfo.InvariantCulture,
+                                                                          _sendQueryString,
+                                                                          _transport,
+                                                                          Uri.EscapeDataString(connection.ConnectionToken),
+                                                                          null);
+
+                    url += TransportHelper.AppendCustomQueryString(connection, url);
+
+                    _httpClient.Post(url, connection.PrepareRequest).Catch((ex, state) =>
+                    {
+                        // If there's an error making an http request set the reset event
+                        ((HttpBasedTransport)state).CompleteAbort();
+                    },
+                    this);
+
+                    if (!_abortResetEvent.WaitOne(timeout))
+                    {
+                        connection.Trace(TraceLevels.Events, "Abort never fired");
+                    }
+                }
+            }
+        }
+
+        protected void CompleteAbort()
+        {
+            lock (_disposeLock)
+            {
+                if (!_disposed)
+                {
+                    // Make any future calls to Abort() no-op
+                    // Abort might still run, but any ongoing aborts will immediately complete
+                    _startedAbort = true;
+                    // Ensure any ongoing calls to Abort() complete
+                    _abortResetEvent.Set();
+                }
+            }
+        }
+
+        protected bool TryCompleteAbort()
+        {
+            // Make sure we don't Set a disposed ManualResetEvent
+            lock (_disposeLock)
+            {
+                if (_disposed)
+                {
+                    // Don't try to continue receiving messages if the transport is disposed
+                    return true;
+                }
+                else if (_startedAbort)
+                {
+                    _abortResetEvent.Set();
+                    return true;
+                }
+                else
+                {
+                    return false;
+                }
+            }
+        }
+
+        protected string GetReceiveQueryString(IConnection connection, string data)
+        {
+            return TransportHelper.GetReceiveQueryString(connection, data, _transport);
+        }
+
+        public abstract void LostConnection(IConnection connection);
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                // Wait for any ongoing aborts to complete
+                // In practice, any aborts should have finished by the time Dispose is called
+                lock (_abortLock)
+                lock (_disposeLock)
+                {
+                    if (!_disposed)
+                    {
+                        _abortResetEvent.Dispose();
+                        _disposed = true;
+                    }
+                }
+           }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/IClientTransport.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/IClientTransport.cs
new file mode 100644
index 0000000..0233c2e
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/IClientTransport.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public interface IClientTransport : IDisposable
+    {
+        string Name { get; }
+        bool SupportsKeepAlive { get; }
+
+        Task<NegotiationResponse> Negotiate(IConnection connection);
+        Task Start(IConnection connection, string data, CancellationToken disconnectToken);
+        Task Send(IConnection connection, string data);
+        void Abort(IConnection connection, TimeSpan timeout);
+
+        void LostConnection(IConnection connection);
+    }
+}
+
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/NegotiateInitializer.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/NegotiateInitializer.cs
new file mode 100644
index 0000000..555deb1
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/NegotiateInitializer.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Threading;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    internal class NegotiateInitializer
+    {
+        private readonly ThreadSafeInvoker _callbackInvoker;
+        private readonly Action _initializeCallback;
+        private readonly Action<Exception> _errorCallback;
+        private readonly TimeSpan _assumeSuccessAfter;
+
+        public NegotiateInitializer(Action initializeCallback, Action<Exception> errorCallback, TimeSpan assumeSuccessAfter)
+        {
+            _initializeCallback = initializeCallback;
+            _errorCallback = errorCallback;
+            _assumeSuccessAfter = assumeSuccessAfter;
+            _callbackInvoker = new ThreadSafeInvoker();
+
+            // Set default initialized function
+            Initialized += () => { };
+        }
+
+        public event Action Initialized;
+
+        public void Initialize()
+        {
+            TaskAsyncHelper.Delay(_assumeSuccessAfter).Then(() =>
+            {
+                _callbackInvoker.Invoke(() =>
+                {
+                    Initialized();
+                    _initializeCallback();
+                });
+            });
+        }
+
+        public void Complete()
+        {
+            _callbackInvoker.Invoke(() =>
+            {
+                Initialized();
+                _initializeCallback();
+            });
+        }
+
+        public void Complete(Exception exception)
+        {
+            _callbackInvoker.Invoke((cb, ex) =>
+            {
+                Initialized();
+                cb(ex);
+            }, _errorCallback, exception);
+        }
+
+        public void Abort(CancellationToken disconnectToken)
+        {
+            _callbackInvoker.Invoke((cb, token) =>
+            {
+                Initialized();
+#if NET35 || WINDOWS_PHONE
+                cb(new OperationCanceledException(Resources.Error_ConnectionCancelled));
+#else
+                cb(new OperationCanceledException(Resources.Error_ConnectionCancelled, token));
+#endif
+            }, _errorCallback, disconnectToken);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/PollingRequestHandler.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/PollingRequestHandler.cs
new file mode 100644
index 0000000..a782f5c
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPolling/PollingRequestHandler.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public class PollingRequestHandler
+    {
+        private IHttpClient _httpClient;
+        private IRequest _currentRequest;
+        private int _running;
+        private object _stopLock;
+
+        public PollingRequestHandler(IHttpClient httpClient)
+        {
+            _httpClient = httpClient;
+            _running = 0;
+            _stopLock = new object();
+
+            // Set default events
+            ResolveUrl = () => "";
+            PrepareRequest = _ => { };
+            OnMessage = _ => { };
+            OnError = _ => { };
+            OnPolling = () => { };
+            OnAfterPoll = _ => TaskAsyncHelper.Empty;
+            OnAbort = _ => { };
+        }
+
+        /// <summary>
+        /// Used to generate the Url that is posted to for the poll.
+        /// </summary>
+        public Func<string> ResolveUrl { get; set; }
+
+        /// <summary>
+        /// Allows modification of the IRequest parameter before using it in a poll.
+        /// </summary>
+        public event Action<IRequest> PrepareRequest;
+
+        /// <summary>
+        /// Sends the string based message to the callback.
+        /// </summary>
+        public event Action<string> OnMessage;
+
+        /// <summary>
+        /// If the poll errors OnError gets triggered and passes the exception.
+        /// </summary>
+        public event Action<Exception> OnError;
+
+        /// <summary>
+        /// Triggers when the polling request is in flight
+        /// </summary>
+        public event Action OnPolling;
+
+        /// <summary>
+        /// Triggers before a new polling request is attempted.  
+        /// Passes in an exception if the Poll errored, null otherwise.
+        /// Expects the return as a task in order to allow modification of timing for subsequent polls.
+        /// </summary>
+        public Func<Exception, Task> OnAfterPoll { get; set; }
+
+        /// <summary>
+        /// Fired when the current poll request was aborted, passing in the soon to be aborted request.
+        /// </summary>
+        public event Action<IRequest> OnAbort;
+
+        /// <summary>
+        /// Starts the Polling Request Handler.
+        /// </summary>
+        public void Start()
+        {
+            if (Interlocked.Exchange(ref _running, 1) == 0)
+            {
+                Poll();
+            }
+        }
+
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed back to user.")]
+        private void Poll()
+        {
+            // This is to ensure that we do not accidently fire off another poll after being told to stop
+            lock (_stopLock)
+            {
+                // Only poll if we're running
+                if (_running == 0)
+                {
+                    return;
+                }                
+
+                // A url is required
+                string url = ResolveUrl();
+
+                _httpClient.Post(url, request =>
+                {
+                    PrepareRequest(request);
+                    _currentRequest = request;
+
+                    // This is called just prior to posting the request to ensure that any in-flight polling request
+                    // is always executed before an OnAfterPoll
+                    OnPolling();
+                })
+                .ContinueWith(task =>
+                {
+                    var next = TaskAsyncHelper.Empty;
+                    Exception exception = null;
+
+                    if (task.IsFaulted)
+                    {
+                        exception = task.Exception.Unwrap();
+
+                        OnError(exception);
+                    }
+                    else
+                    {
+                        try
+                        {
+                            next = task.Result.ReadAsString().Then(raw => OnMessage(raw));
+                        }
+                        catch (Exception ex)
+                        {
+                            exception = ex;
+
+                            OnError(exception);
+                        }
+                    }
+
+                    next.Finally(state =>
+                    {
+                        OnAfterPoll((Exception)state).Then(() => Poll());
+                    },
+                    exception);
+                });
+            }            
+        }
+
+        /// <summary>
+        /// Fully stops the Polling Request Handlers.
+        /// </summary>
+        public void Stop()
+        {
+            lock (_stopLock)
+            {
+                if (Interlocked.Exchange(ref _running, 0) == 1)
+                {
+                    Abort();
+                }
+            }
+        }
+
+        /// <summary>
+        /// Aborts the currently active polling request, does not stop the Polling Request Handler.
+        /// </summary>
+        public void Abort()
+        {
+            OnAbort(_currentRequest);
+
+            if (_currentRequest != null)
+            {
+                // This will no-op if the request is already finished
+                _currentRequest.Abort();
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPollingTransport.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPollingTransport.cs
new file mode 100644
index 0000000..cb19926
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/LongPollingTransport.cs
@@ -0,0 +1,256 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Threading;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public class LongPollingTransport : HttpBasedTransport
+    {
+        /// <summary>
+        /// The time to wait after a connection drops to try reconnecting.
+        /// </summary>
+        public TimeSpan ReconnectDelay { get; set; }
+
+        /// <summary>
+        /// The time to wait after an error happens to continue polling.
+        /// </summary>
+        public TimeSpan ErrorDelay { get; set; }
+
+        /// <summary>
+        /// The time to wait after the initial connect http request before it is considered
+        /// open.
+        /// </summary>
+        public TimeSpan ConnectDelay { get; set; }
+
+        public LongPollingTransport()
+            : this(new DefaultHttpClient())
+        {
+        }
+
+        public LongPollingTransport(IHttpClient httpClient)
+            : base(httpClient, "longPolling")
+        {
+            ReconnectDelay = TimeSpan.FromSeconds(5);
+            ErrorDelay = TimeSpan.FromSeconds(2);
+            ConnectDelay = TimeSpan.FromSeconds(2);
+        }
+
+        /// <summary>
+        /// Indicates whether or not the transport supports keep alive
+        /// </summary>
+        public override bool SupportsKeepAlive
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        protected override void OnStart(IConnection connection,
+                                        string data,
+                                        CancellationToken disconnectToken,
+                                        Action initializeCallback,
+                                        Action<Exception> errorCallback)
+        {
+            var requestHandler = new PollingRequestHandler(HttpClient);
+            var negotiateInitializer = new NegotiateInitializer(initializeCallback, errorCallback, ConnectDelay);
+
+            // Save the success and abort cases so we can remove them after transport is initialized
+            Action<string> initializeSuccess = message => { negotiateInitializer.Complete(); };
+            Action<IRequest> initializeAbort = request => { negotiateInitializer.Abort(disconnectToken); };
+
+            requestHandler.OnMessage += initializeSuccess;
+            requestHandler.OnError += negotiateInitializer.Complete;
+            requestHandler.OnAbort += initializeAbort;
+
+            // Once we've initialized the connection we need to tear down the initializer functions
+            negotiateInitializer.Initialized += () =>
+            {
+                requestHandler.OnMessage -= initializeSuccess;
+                requestHandler.OnError -= negotiateInitializer.Complete;
+                requestHandler.OnAbort -= initializeAbort;
+            };
+
+            // Add additional actions to each of the PollingRequestHandler events
+            PollingSetup(connection, data, disconnectToken, requestHandler);
+
+            requestHandler.Start();
+            // Start initialization, essentially if we have an assume sucess clause in our negotiateInitializer
+            // then we will start the countdown from the point which we start initialization.
+            negotiateInitializer.Initialize();
+        }
+
+        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "We will refactor later.")]
+        private void PollingSetup(IConnection connection,
+                                  string data,
+                                  CancellationToken disconnectToken,
+                                  PollingRequestHandler requestHandler)
+        {
+            // These are created new on each poll
+            var reconnectInvoker = new ThreadSafeInvoker();
+            var requestDisposer = new Disposer();
+
+            requestHandler.ResolveUrl = () =>
+            {
+                var url = connection.Url;
+
+                if (connection.MessageId == null)
+                {
+                    url += "connect";
+                }
+                else if (IsReconnecting(connection))
+                {
+                    url += "reconnect";
+                }
+                else
+                {
+                    url += "poll";
+                }
+
+                url += GetReceiveQueryString(connection, data);
+
+                return url;
+            };
+
+            requestHandler.PrepareRequest += req =>
+            {
+                connection.PrepareRequest(req);
+            };
+
+            requestHandler.OnMessage += message =>
+            {
+                var shouldReconnect = false;
+                var disconnectedReceived = false;                
+
+                connection.Trace(TraceLevels.Messages, "LP: OnMessage({0})", message);
+
+                TransportHelper.ProcessResponse(connection,
+                                                message,
+                                                out shouldReconnect,
+                                                out disconnectedReceived);
+
+                if (IsReconnecting(connection))
+                {
+                    // If the timeout for the reconnect hasn't fired as yet just fire the 
+                    // event here before any incoming messages are processed
+                    TryReconnect(connection, reconnectInvoker);
+                }
+
+                if (shouldReconnect)
+                {
+                    // Transition into reconnecting state
+                    connection.EnsureReconnecting();
+                }
+
+                if (disconnectedReceived)
+                {
+                    connection.Disconnect();
+                }
+            };
+
+            requestHandler.OnError += exception =>
+            {
+                reconnectInvoker.Invoke();
+
+                // Transition into reconnecting state
+                connection.EnsureReconnecting();
+
+                // Sometimes a connection might have been closed by the server before we get to write anything
+                // so just try again and raise OnError.
+                if (!ExceptionHelper.IsRequestAborted(exception) && !(exception is IOException))
+                {
+                    connection.OnError(exception);
+                }
+                else
+                {
+                    requestHandler.Stop();
+                }
+            };
+
+            requestHandler.OnPolling += () =>
+            {
+                // Capture the cleanup within a closure so it can persist through multiple requests
+                TryDelayedReconnect(connection, reconnectInvoker);
+
+                requestDisposer.Set(disconnectToken.SafeRegister(state =>
+                {
+                    reconnectInvoker.Invoke();
+                    requestHandler.Stop();
+                }, null));
+            };
+
+            requestHandler.OnAfterPoll = exception =>
+            {
+                requestDisposer.Dispose();
+
+                if (TryCompleteAbort())
+                {
+                    // Abort() was called, so don't reconnect
+                    requestHandler.Stop();
+                }
+                else
+                {
+                    requestDisposer = new Disposer();
+                    reconnectInvoker = new ThreadSafeInvoker();
+
+                    if (exception != null)
+                    {
+                        // Delay polling by the error delay
+                        return TaskAsyncHelper.Delay(ErrorDelay);
+                    }
+                }
+
+                return TaskAsyncHelper.Empty;
+            };
+
+            requestHandler.OnAbort += _ =>
+            {
+                // Complete any ongoing calls to Abort()
+                // If someone calls Abort() later, have it no-op
+                CompleteAbort();
+            };
+        }
+
+        private void TryDelayedReconnect(IConnection connection, ThreadSafeInvoker reconnectInvoker)
+        {
+            if (IsReconnecting(connection))
+            {
+                TaskAsyncHelper.Delay(ReconnectDelay).Then(() =>
+                {
+                    TryReconnect(connection, reconnectInvoker);
+                });
+            }
+        }
+
+        private static void TryReconnect(IConnection connection, ThreadSafeInvoker reconnectInvoker)
+        {
+            // Fire the reconnect event after the delay.
+            reconnectInvoker.Invoke((conn) => FireReconnected(conn), connection);
+        }
+
+        private static void FireReconnected(IConnection connection)
+        {
+            // Mark the connection as connected
+            if (connection.ChangeState(ConnectionState.Reconnecting, ConnectionState.Connected))
+            {
+                connection.OnReconnected();
+            }
+        }
+
+        private static bool IsReconnecting(IConnection connection)
+        {
+            return connection.State == ConnectionState.Reconnecting;
+        }
+
+        public override void LostConnection(IConnection connection)
+        {
+
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/ChunkBuffer.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/ChunkBuffer.cs
new file mode 100644
index 0000000..a35cfc0
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/ChunkBuffer.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Text;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports.ServerSentEvents
+{
+    public class ChunkBuffer
+    {
+        private int _offset;
+        private readonly StringBuilder _buffer;
+        private readonly StringBuilder _lineBuilder;
+
+        public ChunkBuffer()
+        {
+            _buffer = new StringBuilder();
+            _lineBuilder = new StringBuilder();
+        }
+
+        public bool HasChunks
+        {
+            get
+            {
+                return _offset < _buffer.Length;
+            }
+        }
+
+        public void Add(byte[] buffer, int length)
+        {
+            _buffer.Append(Encoding.UTF8.GetString(buffer, 0, length));
+        }
+
+        public void Add(ArraySegment<byte> buffer)
+        {
+            _buffer.Append(Encoding.UTF8.GetString(buffer.Array, buffer.Offset, buffer.Count));
+        }
+
+        public string ReadLine()
+        {
+            // Lock while reading so that we can make safe assuptions about the buffer indicies
+            for (int i = _offset; i < _buffer.Length; i++, _offset++)
+            {
+                if (_buffer[i] == '\n')
+                {
+                    _buffer.Remove(0, _offset + 1);
+
+                    string line = _lineBuilder.ToString().Trim();
+#if WINDOWS_PHONE || NET35
+                    _lineBuilder.Length = 0;
+#else
+                    _lineBuilder.Clear();
+#endif
+                    _offset = 0;
+                    return line;
+                }
+
+                _lineBuilder.Append(_buffer[i]);
+            }
+
+            return null;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventSourceStreamReader.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventSourceStreamReader.cs
new file mode 100644
index 0000000..09710c4
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventSourceStreamReader.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.IO;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports.ServerSentEvents
+{
+    /// <summary>
+    /// Event source implementation for .NET. This isn't to the spec but it's enough to support SignalR's
+    /// server.
+    /// </summary>
+    public class EventSourceStreamReader : AsyncStreamReader
+    {
+        private readonly ChunkBuffer _buffer;
+        private readonly IConnection _connection;
+
+        /// <summary>
+        /// Invoked when there's a message if received in the stream.
+        /// </summary>
+        public Action<SseEvent> Message { get; set; }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="EventSourceStreamReader"/> class.
+        /// </summary>
+        /// <param name="connection">The connection associated with this event source</param>
+        /// <param name="stream">The stream to read event source payloads from.</param>
+        public EventSourceStreamReader(IConnection connection, Stream stream)
+            : base(stream)
+        {
+            _connection = connection;
+            _buffer = new ChunkBuffer();
+
+            Data = ProcessBuffer;
+        }
+
+        private void ProcessBuffer(ArraySegment<byte> readBuffer)
+        {
+            lock (BufferLock)
+            {
+                _buffer.Add(readBuffer);
+
+                while (_buffer.HasChunks)
+                {
+                    string line = _buffer.ReadLine();
+
+                    // No new lines in the buffer so stop processing
+                    if (line == null)
+                    {
+                        break;
+                    }
+
+                    SseEvent sseEvent;
+                    if (!SseEvent.TryParse(line, out sseEvent))
+                    {
+                        continue;
+                    }
+
+                    _connection.Trace(TraceLevels.Messages, "SSE: OnMessage({0})", sseEvent);
+
+                    OnMessage(sseEvent);
+                }
+            }
+        }
+
+        private void OnMessage(SseEvent sseEvent)
+        {
+            if (Message != null)
+            {
+                Message(sseEvent);
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventType.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventType.cs
new file mode 100644
index 0000000..e4d144d
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/EventType.cs
@@ -0,0 +1,10 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+namespace Microsoft.AspNet.SignalR.Client.Transports.ServerSentEvents
+{
+    public enum EventType
+    {
+        Id,
+        Data
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/SseEvent.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/SseEvent.cs
new file mode 100644
index 0000000..4a33025
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEvents/SseEvent.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports.ServerSentEvents
+{
+    public class SseEvent
+    {
+        public SseEvent(EventType type, string data)
+        {
+            EventType = type;
+            Data = data;
+        }
+
+        public EventType EventType { get; private set; }
+        public string Data { get; private set; }
+
+        public override string ToString()
+        {
+            return EventType + ": " + Data;
+        }
+
+        public static bool TryParse(string line, out SseEvent sseEvent)
+        {
+            sseEvent = null;
+
+            if (line == null)
+            {
+                throw new ArgumentNullException("line");
+            }
+
+            if (line.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
+            {
+                string data = line.Substring("data:".Length).Trim();
+                sseEvent = new SseEvent(EventType.Data, data);
+                return true;
+            }
+            else if (line.StartsWith("id:", StringComparison.OrdinalIgnoreCase))
+            {
+                string data = line.Substring("id:".Length).Trim();
+                sseEvent = new SseEvent(EventType.Id, data);
+                return true;
+            }
+
+            return false;
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEventsTransport.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEventsTransport.cs
new file mode 100644
index 0000000..ea31181
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/ServerSentEventsTransport.cs
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
+using System.Threading;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Microsoft.AspNet.SignalR.Client.Infrastructure;
+using Microsoft.AspNet.SignalR.Client.Transports.ServerSentEvents;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public class ServerSentEventsTransport : HttpBasedTransport
+    {
+        private IRequest _request;
+
+        public ServerSentEventsTransport()
+            : this(new DefaultHttpClient())
+        {
+        }
+
+        public ServerSentEventsTransport(IHttpClient httpClient)
+            : base(httpClient, "serverSentEvents")
+        {
+            ReconnectDelay = TimeSpan.FromSeconds(2);
+            ConnectionTimeout = TimeSpan.FromSeconds(5);
+        }
+
+        /// <summary>
+        /// Indicates whether or not the transport supports keep alive
+        /// </summary>
+        public override bool SupportsKeepAlive
+        {
+            get
+            {
+                return true;
+            }
+        }
+
+        /// <summary>
+        /// Time allowed before failing the connect request.
+        /// </summary>
+        public TimeSpan ConnectionTimeout { get; set; }
+
+        /// <summary>
+        /// The time to wait after a connection drops to try reconnecting.
+        /// </summary>
+        public TimeSpan ReconnectDelay { get; set; }
+
+        protected override void OnStart(IConnection connection,
+                                        string data,
+                                        CancellationToken disconnectToken,
+                                        Action initializeCallback,
+                                        Action<Exception> errorCallback)
+        {
+            OpenConnection(connection, data, disconnectToken, initializeCallback, errorCallback);
+        }
+
+        private void Reconnect(IConnection connection, string data, CancellationToken disconnectToken)
+        {
+            // Wait for a bit before reconnecting
+            TaskAsyncHelper.Delay(ReconnectDelay).Then(() =>
+            {
+                // FIX: Race if Connection is stopped and completely restarted between checking the token and calling
+                //      connection.EnsureReconnecting()
+                if (!disconnectToken.IsCancellationRequested && connection.EnsureReconnecting())
+                {
+                    // Now attempt a reconnect
+                    OpenConnection(connection, data, disconnectToken, initializeCallback: null, errorCallback: null);
+                }
+            });
+        }
+
+        [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "We will refactor later.")]
+        [SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "We will refactor later.")]
+        private void OpenConnection(IConnection connection,
+                                    string data,
+                                    CancellationToken disconnectToken,
+                                    Action initializeCallback,
+                                    Action<Exception> errorCallback)
+        {
+            // If we're reconnecting add /connect to the url
+            bool reconnecting = initializeCallback == null;
+            var callbackInvoker = new ThreadSafeInvoker();
+            var requestDisposer = new Disposer();
+
+            var url = connection.Url + (reconnecting ? "reconnect" : "connect") + GetReceiveQueryString(connection, data);
+
+            connection.Trace(TraceLevels.Events, "SSE: GET {0}", url);
+
+            HttpClient.Get(url, req =>
+            {
+                _request = req;
+                connection.PrepareRequest(_request);
+
+                _request.Accept = "text/event-stream";
+            }).ContinueWith(task =>
+            {
+                if (task.IsFaulted)
+                {
+                    Exception exception = task.Exception.Unwrap();
+                    if (!ExceptionHelper.IsRequestAborted(exception))
+                    {
+                        if (errorCallback != null)
+                        {
+                            callbackInvoker.Invoke((cb, ex) => cb(ex), errorCallback, exception);
+                        }
+                        else if (reconnecting)
+                        {
+                            // Only raise the error event if we failed to reconnect
+                            connection.OnError(exception);
+
+                            Reconnect(connection, data, disconnectToken);
+                        }
+                    }
+                    requestDisposer.Dispose();
+                }
+                else
+                {
+                    var response = task.Result;
+                    Stream stream = response.GetStream();
+
+                    var eventSource = new EventSourceStreamReader(connection, stream);
+
+                    bool stop = false;
+
+                    var esCancellationRegistration = disconnectToken.SafeRegister(state =>
+                    {
+                        stop = true;
+
+                        ((IRequest)state).Abort();
+                    },
+                    _request);
+
+                    eventSource.Opened = () =>
+                    {
+                        // If we're not reconnecting, then we're starting the transport for the first time. Trigger callback only on first start.
+                        if (!reconnecting)
+                        {
+                            callbackInvoker.Invoke(initializeCallback);
+                        }
+                        else if (connection.ChangeState(ConnectionState.Reconnecting, ConnectionState.Connected))
+                        {
+                            // Raise the reconnect event if the connection comes back up
+                            connection.OnReconnected();
+                        }
+                    };
+
+                    eventSource.Message = sseEvent =>
+                    {
+                        if (sseEvent.EventType == EventType.Data)
+                        {
+                            if (sseEvent.Data.Equals("initialized", StringComparison.OrdinalIgnoreCase))
+                            {
+                                return;
+                            }
+
+                            bool timedOut;
+                            bool disconnected;
+                            TransportHelper.ProcessResponse(connection, sseEvent.Data, out timedOut, out disconnected);
+
+                            if (disconnected)
+                            {
+                                stop = true;
+                                connection.Disconnect();
+                            }
+                        }
+                    };
+
+                    eventSource.Closed = exception =>
+                    {
+                        if (exception != null)
+                        {
+                            // Check if the request is aborted
+                            bool isRequestAborted = ExceptionHelper.IsRequestAborted(exception);
+
+                            if (!isRequestAborted)
+                            {
+                                // Don't raise exceptions if the request was aborted (connection was stopped).
+                                connection.OnError(exception);
+                            }
+                        }
+                        requestDisposer.Dispose();
+                        esCancellationRegistration.Dispose();
+                        response.Dispose();
+
+                        if (stop)
+                        {
+                            CompleteAbort();
+                        }
+                        else if (TryCompleteAbort())
+                        {
+                            // Abort() was called, so don't reconnect
+                        }
+                        else
+                        {
+                            Reconnect(connection, data, disconnectToken);
+                        }
+                    };
+
+                    eventSource.Start();
+                }
+            });
+
+            var requestCancellationRegistration = disconnectToken.SafeRegister(state =>
+            {
+                if (state != null)
+                {
+                    // This will no-op if the request is already finished.
+                    ((IRequest)state).Abort();
+                }
+
+                if (errorCallback != null)
+                {
+                    callbackInvoker.Invoke((cb, token) =>
+                    {
+#if NET35 || WINDOWS_PHONE
+                        cb(new OperationCanceledException(Resources.Error_ConnectionCancelled));
+#else
+                        cb(new OperationCanceledException(Resources.Error_ConnectionCancelled, token));
+#endif
+                    }, errorCallback, disconnectToken);
+                }
+            }, _request);
+
+            requestDisposer.Set(requestCancellationRegistration);
+
+            if (errorCallback != null)
+            {
+                TaskAsyncHelper.Delay(ConnectionTimeout).Then(() =>
+                {
+                    callbackInvoker.Invoke((conn, cb) =>
+                    {
+                        // Abort the request before cancelling
+                        _request.Abort();
+
+                        // Connection timeout occurred
+                        cb(new TimeoutException());
+                    },
+                    connection,
+                    errorCallback);
+                });
+            }
+        }
+
+        public override void LostConnection(IConnection connection)
+        {
+            if (_request != null)
+            {
+                _request.Abort();
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/TransportHelper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/TransportHelper.cs
new file mode 100644
index 0000000..6a34d55
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Client/Transports/TransportHelper.cs
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.AspNet.SignalR.Client.Transports
+{
+    public static class TransportHelper
+    {
+        public static Task<NegotiationResponse> GetNegotiationResponse(this IHttpClient httpClient, IConnection connection)
+        {
+            if (httpClient == null)
+            {
+                throw new ArgumentNullException("httpClient");
+            }
+
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+#if SILVERLIGHT || WINDOWS_PHONE
+            string negotiateUrl = connection.Url + "negotiate?" + GetNoCacheUrlParam();
+#else
+            string negotiateUrl = connection.Url + "negotiate";
+#endif
+            negotiateUrl += AppendCustomQueryString(connection, negotiateUrl);
+
+            return httpClient.Get(negotiateUrl, connection.PrepareRequest)
+                            .Then(response => response.ReadAsString())
+                            .Then(raw =>
+                            {
+                                if (String.IsNullOrEmpty(raw))
+                                {
+                                    throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_ServerNegotiationFailed));
+                                }
+
+                                return JsonConvert.DeserializeObject<NegotiationResponse>(raw);
+                            });
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "This is called by internally")]
+        public static string GetReceiveQueryString(IConnection connection, string data, string transport)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            // ?transport={0}&connectionToken={1}&messageId={2}&groups={3}&connectionData={4}{5}
+            var qsBuilder = new StringBuilder();
+            qsBuilder.Append("?transport=" + transport)
+                     .Append("&connectionToken=" + Uri.EscapeDataString(connection.ConnectionToken));
+
+            if (connection.MessageId != null)
+            {
+                qsBuilder.Append("&messageId=" + Uri.EscapeDataString(connection.MessageId));
+            }
+
+            if (connection.GroupsToken != null)
+            {
+                qsBuilder.Append("&groupsToken=" + Uri.EscapeDataString(connection.GroupsToken));
+            }
+
+            if (data != null)
+            {
+                qsBuilder.Append("&connectionData=" + data);
+            }
+
+            string customQuery = connection.QueryString;
+
+            if (!String.IsNullOrEmpty(customQuery))
+            {
+                qsBuilder.Append("&").Append(customQuery);
+            }
+
+#if SILVERLIGHT || WINDOWS_PHONE
+            qsBuilder.Append("&").Append(GetNoCacheUrlParam());
+#endif
+            return qsBuilder.ToString();
+        }
+
+        public static string AppendCustomQueryString(IConnection connection, string baseUrl)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            if (baseUrl == null)
+            {
+                baseUrl = "";
+            }
+
+            string appender = "",
+                   customQuery = connection.QueryString,
+                   qs = "";
+
+            if (!String.IsNullOrEmpty(customQuery))
+            {
+                char firstChar = customQuery[0];
+
+                // If the custom query string already starts with an ampersand or question mark
+                // then we dont have to use any appender, it can be empty.
+                if (firstChar != '?' && firstChar != '&')
+                {
+                    appender = "?";
+
+                    if (baseUrl.Contains(appender))
+                    {
+                        appender = "&";
+                    }
+                }
+
+                qs += appender + customQuery;
+            }
+
+            return qs;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "This is called internally.")]
+        [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", Justification = "This is called internally.")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The client receives the exception in the OnError callback.")]
+        public static void ProcessResponse(IConnection connection, string response, out bool timedOut, out bool disconnected)
+        {
+            if (connection == null)
+            {
+                throw new ArgumentNullException("connection");
+            }
+
+            connection.UpdateLastKeepAlive();
+
+            timedOut = false;
+            disconnected = false;
+
+            if (String.IsNullOrEmpty(response))
+            {
+                return;
+            }
+
+            try
+            {
+                var result = JValue.Parse(response);
+
+                if (!result.HasValues)
+                {
+                    return;
+                }
+
+                if (result["I"] != null)
+                {
+                    connection.OnReceived(result);
+                    return;
+                }
+
+                timedOut = result.Value<int>("T") == 1;
+                disconnected = result.Value<int>("D") == 1;
+
+                if (disconnected)
+                {
+                    return;
+                }
+
+                UpdateGroups(connection, groupsToken: result["G"]);
+
+                var messages = result["M"] as JArray;
+                if (messages != null)
+                {
+                    foreach (JToken message in messages)
+                    {
+                        try
+                        {
+                            connection.OnReceived(message);
+                        }
+                        catch (Exception ex)
+                        {
+                            connection.OnError(ex);
+                        }
+                    }
+
+                    connection.MessageId = result["C"].Value<string>();
+                }
+            }
+            catch (Exception ex)
+            {
+                connection.OnError(ex);
+            }
+        }
+
+
+        private static void UpdateGroups(IConnection connection, JToken groupsToken)
+        {
+            if (groupsToken != null)
+            {
+                connection.GroupsToken = groupsToken.Value<string>();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is used on Silverlight and Windows Phone")]
+        private static string GetNoCacheUrlParam()
+        {
+            return "noCache=" + Guid.NewGuid().ToString();
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs
new file mode 100644
index 0000000..71736b3
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Threading;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    internal static class CancellationTokenExtensions
+    {
+        public static IDisposable SafeRegister(this CancellationToken cancellationToken, Action<object> callback, object state)
+        {
+            var callbackWrapper = new CancellationCallbackWrapper(callback, state);
+
+            // Ensure delegate continues to use the C# Compiler static delegate caching optimization.
+            CancellationTokenRegistration registration = cancellationToken.Register(s => Cancel(s),
+                                                                                    callbackWrapper,
+                                                                                    useSynchronizationContext: false);
+
+            var disposeCancellationState = new DiposeCancellationState(callbackWrapper, registration);
+
+            // Ensure delegate continues to use the C# Compiler static delegate caching optimization.
+            return new DisposableAction(s => Dispose(s), disposeCancellationState);
+        }
+
+        private static void Cancel(object state)
+        {
+            ((CancellationCallbackWrapper)state).TryInvoke();
+        }
+
+        private static void Dispose(object state)
+        {
+            ((DiposeCancellationState)state).TryDispose();
+        }
+
+        private class DiposeCancellationState
+        {
+            private readonly CancellationCallbackWrapper _callbackWrapper;
+            private readonly CancellationTokenRegistration _registration;
+
+            public DiposeCancellationState(CancellationCallbackWrapper callbackWrapper, CancellationTokenRegistration registration)
+            {
+                _callbackWrapper = callbackWrapper;
+                _registration = registration;
+            }
+
+            public void TryDispose()
+            {
+                // This normally waits until the callback is finished invoked but we don't care
+                if (_callbackWrapper.TrySetInvoked())
+                {
+                    // Bug #1549, .NET 4.0 has a bug where this throws if the CTS
+                    _registration.Dispose();
+                }
+            }
+        }
+
+        private class CancellationCallbackWrapper
+        {
+            private readonly Action<object> _callback;
+            private readonly object _state;
+            private int _callbackInvoked;
+
+            public CancellationCallbackWrapper(Action<object> callback, object state)
+            {
+                _callback = callback;
+                _state = state;
+            }
+
+            public bool TrySetInvoked()
+            {
+                return Interlocked.Exchange(ref _callbackInvoked, 1) == 0;
+            }
+
+            public void TryInvoke()
+            {
+                if (TrySetInvoked())
+                {
+                    _callback(_state);
+                }
+            }
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs
new file mode 100644
index 0000000..ab336d6
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Threading;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    internal class DisposableAction : IDisposable
+    {
+        [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "The client projects use this.")]
+        public static readonly DisposableAction Empty = new DisposableAction(() => { });
+
+        private Action<object> _action;
+        private readonly object _state;
+
+        public DisposableAction(Action action)
+            : this(state => ((Action)state).Invoke(), state: action)
+        {
+
+        }
+
+        public DisposableAction(Action<object> action, object state)
+        {
+            _action = action;
+            _state = state;
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                Interlocked.Exchange(ref _action, (state) => { }).Invoke(_state);
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+    }
+
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs
new file mode 100644
index 0000000..1327394
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    /// <summary>
+    /// Helper class to manage disposing a resource at an arbirtary time
+    /// </summary>
+    internal class Disposer : IDisposable
+    {
+        private static readonly object _disposedSentinel = new object();
+
+        private object _disposable;
+
+        public void Set(IDisposable disposable)
+        {
+            if (disposable == null)
+            {
+                throw new ArgumentNullException("disposable");
+            }
+
+            object originalFieldValue = Interlocked.CompareExchange(ref _disposable, disposable, null);
+            if (originalFieldValue == null)
+            {
+                // this is the first call to Set() and Dispose() hasn't yet been called; do nothing
+            }
+            else if (originalFieldValue == _disposedSentinel)
+            {
+                // Dispose() has already been called, so we need to dispose of the object that was just added
+                disposable.Dispose();
+            }
+            else
+            {
+#if !NET35 && !SILVERLIGHT && !NETFX_CORE
+                // Set has been called multiple times, fail
+                Debug.Fail("Multiple calls to Disposer.Set(IDisposable) without calling Disposer.Dispose()");
+#endif
+            }
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                var disposable = Interlocked.Exchange(ref _disposable, _disposedSentinel) as IDisposable;
+                if (disposable != null)
+                {
+                    disposable.Dispose();
+                }
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+    }
+}
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs
new file mode 100644
index 0000000..5545f2f
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+
+namespace Microsoft.AspNet.SignalR.Infrastructure
+{
+    internal static class ExceptionsExtensions
+    {
+        internal static Exception Unwrap(this Exception ex)
+        {
+            if (ex == null)
+            {
+                return null;
+            }
+
+            var next = ex.GetBaseException();
+            while (next.InnerException != null)
+            {
+                // On mono GetBaseException() doesn't seem to do anything
+                // so just walk the inner exception chain.
+                next = next.InnerException;
+            }
+
+            return next;
+        }
+    }
+}
+
diff --git a/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs
new file mode 100644
index 0000000..56e25d1
--- /dev/null
+++ b/lib/SignalR/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs
@@ -0,0 +1,1119 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNet.SignalR.Infrastructure;
+
+namespace Microsoft.AspNet.SignalR
+{
+    internal static class TaskAsyncHelper
+    {
+        private static readonly Task _emptyTask = MakeTask<object>(null);
+        private static readonly Task<bool> _trueTask = MakeTask<bool>(true);
+        private static readonly Task<bool> _falseTask = MakeTask<bool>(false);
+
+        private static Task<T> MakeTask<T>(T value)
+        {
+            return FromResult<T>(value);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Empty
+        {
+            get
+            {
+                return _emptyTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<bool> True
+        {
+            get
+            {
+                return _trueTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<bool> False
+        {
+            get
+            {
+                return _falseTask;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task OrEmpty(this Task task)
+        {
+            return task ?? Empty;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> OrEmpty<T>(this Task<T> task)
+        {
+            return task ?? TaskCache<T>.Empty;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromAsync(Func<AsyncCallback, object, IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, object state)
+        {
+            try
+            {
+                return Task.Factory.FromAsync(beginMethod, endMethod, state);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<T> FromAsync<T>(Func<AsyncCallback, object, IAsyncResult> beginMethod, Func<IAsyncResult, T> endMethod, object state)
+        {
+            try
+            {
+                return Task.Factory.FromAsync<T>(beginMethod, endMethod, state);
+            }
+            catch (Exception ex)
+            {
+                return TaskAsyncHelper.FromError<T>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Series(Func<object, Task>[] tasks, object[] state)
+        {
+            Task prev = TaskAsyncHelper.Empty;
+            Task finalTask = TaskAsyncHelper.Empty;
+
+            for (int i = 0; i < tasks.Length; i++)
+            {
+                prev = finalTask;
+                finalTask = prev.Then(tasks[i], state[i]);
+            }
+
+            return finalTask;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task) where TTask : Task
+        {
+            return Catch(task, ex => { });
+        }
+
+#if PERFCOUNTERS
+        public static TTask Catch<TTask>(this TTask task, params IPerformanceCounter[] counters) where TTask : Task
+        {
+            return Catch(task, _ =>
+                {
+                    if (counters == null)
+                    {
+                        return;
+                    }
+                    for (var i = 0; i < counters.Length; i++)
+                    {
+                        counters[i].Increment();
+                    }
+                });
+        }
+#endif
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task, Action<AggregateException, object> handler, object state) where TTask : Task
+        {
+            if (task != null && task.Status != TaskStatus.RanToCompletion)
+            {
+                if (task.Status == TaskStatus.Faulted)
+                {
+                    ExecuteOnFaulted(handler, state, task.Exception);
+                }
+                else
+                {
+                    AttachFaultedContinuation<TTask>(task, handler, state);
+                }
+            }
+
+            return task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static void AttachFaultedContinuation<TTask>(TTask task, Action<AggregateException, object> handler, object state) where TTask : Task
+        {
+            task.ContinueWith(innerTask =>
+            {
+                ExecuteOnFaulted(handler, state, innerTask.Exception);
+            },
+            TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static void ExecuteOnFaulted(Action<AggregateException, object> handler, object state, AggregateException exception)
+        {
+            // observe Exception
+#if !WINDOWS_PHONE && !SILVERLIGHT && !NETFX_CORE
+            Trace.TraceError("SignalR exception thrown by Task: {0}", exception);
+#endif
+            handler(exception, state);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static TTask Catch<TTask>(this TTask task, Action<AggregateException> handler) where TTask : Task
+        {
+            return task.Catch((ex, state) => ((Action<AggregateException>)state).Invoke(ex),
+                              handler);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task ContinueWithNotComplete(this Task task, Action action)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    try
+                    {
+                        action();
+                        return task;
+                    }
+                    catch (Exception e)
+                    {
+                        return FromError(e);
+                    }
+                case TaskStatus.RanToCompletion:
+                    return task;
+                default:
+                    var tcs = new TaskCompletionSource<object>();
+
+                    task.ContinueWith(t =>
+                    {
+                        if (t.IsFaulted || t.IsCanceled)
+                        {
+                            try
+                            {
+                                action();
+
+                                if (t.IsFaulted)
+                                {
+                                    tcs.TrySetUnwrappedException(t.Exception);
+                                }
+                                else
+                                {
+                                    tcs.TrySetCanceled();
+                                }
+                            }
+                            catch (Exception e)
+                            {
+                                tcs.TrySetException(e);
+                            }
+                        }
+                        else
+                        {
+                            tcs.TrySetResult(null);
+                        }
+                    },
+                    TaskContinuationOptions.ExecuteSynchronously);
+
+                    return tcs.Task;
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWithNotComplete(this Task task, TaskCompletionSource<object> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.SetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.SetCanceled();
+                }
+            },
+            TaskContinuationOptions.NotOnRanToCompletion);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWith(this Task task, TaskCompletionSource<object> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+                else
+                {
+                    tcs.TrySetResult(null);
+                }
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static void ContinueWith<T>(this Task<T> task, TaskCompletionSource<T> tcs)
+        {
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.TrySetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.TrySetCanceled();
+                }
+                else
+                {
+                    tcs.TrySetResult(t.Result);
+                }
+            });
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Return(this Task[] tasks)
+        {
+            return Then(tasks, () => { });
+        }
+
+        // Then extesions
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task task, Action successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult>(this Task task, Func<TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, TResult>.RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task[] tasks, Action successor)
+        {
+            if (tasks.Length == 0)
+            {
+                return FromMethod(successor);
+            }
+
+            var tcs = new TaskCompletionSource<object>();
+            Task.Factory.ContinueWhenAll(tasks, completedTasks =>
+            {
+                var faulted = completedTasks.FirstOrDefault(t => t.IsFaulted);
+                if (faulted != null)
+                {
+                    tcs.SetUnwrappedException(faulted.Exception);
+                    return;
+                }
+                var cancelled = completedTasks.FirstOrDefault(t => t.IsCanceled);
+                if (cancelled != null)
+                {
+                    tcs.SetCanceled();
+                    return;
+                }
+
+                successor();
+                tcs.SetResult(null);
+            });
+
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1>(this Task task, Action<T1> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1);
+
+                default:
+                    return GenericDelegates<object, object, T1, object>.ThenWithArgs(task, successor, arg1);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1, T2>(this Task task, Action<T1, T2> successor, T1 arg1, T2 arg2)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1, arg2);
+
+                default:
+                    return GenericDelegates<object, object, T1, T2>.ThenWithArgs(task, successor, arg1, arg2);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1>(this Task task, Func<T1, Task> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1);
+
+                default:
+                    return GenericDelegates<object, Task, T1, object>.ThenWithArgs(task, successor, arg1)
+                                                                     .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<T1, T2>(this Task task, Func<T1, T2, Task> successor, T1 arg1, T2 arg2)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, arg1, arg2);
+
+                default:
+                    return GenericDelegates<object, Task, T1, T2>.ThenWithArgs(task, successor, arg1, arg2)
+                                                                 .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, TResult>(this Task<T> task, Func<T, Task<TResult>> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<T, Task<TResult>>.RunTask(task, t => successor(t.Result))
+                                                        .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, TResult>(this Task<T> task, Func<T, TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<T, TResult>.RunTask(task, t => successor(t.Result));
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<T, T1, TResult>(this Task<T> task, Func<T, T1, TResult> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result, arg1);
+
+                default:
+                    return GenericDelegates<T, TResult, T1, object>.ThenWithArgs(task, successor, arg1);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then(this Task task, Func<Task> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, Task>.RunTask(task, successor)
+                                                    .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult>(this Task task, Func<Task<TResult>> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                    return FromError<TResult>(task.Exception);
+
+                case TaskStatus.Canceled:
+                    return Canceled<TResult>();
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return TaskRunners<object, Task<TResult>>.RunTask(task, successor)
+                                                             .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<TResult>(this Task<TResult> task, Action<TResult> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<TResult, object>.RunTask(task, successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Then<TResult>(this Task<TResult> task, Func<TResult, Task> successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task.Result);
+
+                default:
+                    return TaskRunners<TResult, Task>.RunTask(task, t => successor(t.Result))
+                                                     .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<TResult> Then<TResult, T1>(this Task<TResult> task, Func<Task<TResult>, T1, Task<TResult>> successor, T1 arg1)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor, task, arg1);
+
+                default:
+                    return GenericDelegates<TResult, Task<TResult>, T1, object>.ThenWithArgs(task, successor, arg1)
+                                                                               .FastUnwrap();
+            }
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed to the caller")]
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Finally(this Task task, Action<object> next, object state)
+        {
+            try
+            {
+                switch (task.Status)
+                {
+                    case TaskStatus.Faulted:
+                    case TaskStatus.Canceled:
+                        next(state);
+                        return task;
+                    case TaskStatus.RanToCompletion:
+                        return FromMethod(next, state);
+
+                    default:
+                        return RunTaskSynchronously(task, next, state, onlyOnSuccess: false);
+                }
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task RunSynchronously(this Task task, Action successor)
+        {
+            switch (task.Status)
+            {
+                case TaskStatus.Faulted:
+                case TaskStatus.Canceled:
+                    return task;
+
+                case TaskStatus.RanToCompletion:
+                    return FromMethod(successor);
+
+                default:
+                    return RunTaskSynchronously(task, state => ((Action)state).Invoke(), successor);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task FastUnwrap(this Task<Task> task)
+        {
+            var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null;
+            return innerTask ?? task.Unwrap();
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> FastUnwrap<T>(this Task<Task<T>> task)
+        {
+            var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null;
+            return innerTask ?? task.Unwrap();
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task Delay(TimeSpan timeOut)
+        {
+#if NETFX_CORE
+            return Task.Delay(timeOut);
+#else
+            var tcs = new TaskCompletionSource<object>();
+
+            var timer = new Timer(tcs.SetResult,
+            null,
+            timeOut,
+            TimeSpan.FromMilliseconds(-1));
+
+            return tcs.Task.ContinueWith(_ =>
+            {
+                timer.Dispose();
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+#endif
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod(Action func)
+        {
+            try
+            {
+                func();
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1>(Action<T1> func, T1 arg)
+        {
+            try
+            {
+                func(arg);
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1, T2>(Action<T1, T2> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                func(arg1, arg2);
+                return Empty;
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod(Func<Task> func)
+        {
+            try
+            {
+                return func();
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<TResult>(Func<Task<TResult>> func)
+        {
+            try
+            {
+                return func();
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<TResult>(Func<TResult> func)
+        {
+            try
+            {
+                return FromResult<TResult>(func());
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1>(Func<T1, Task> func, T1 arg)
+        {
+            try
+            {
+                return func(arg);
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task FromMethod<T1, T2>(Func<T1, T2, Task> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return func(arg1, arg2);
+            }
+            catch (Exception ex)
+            {
+                return FromError(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, TResult>(Func<T1, Task<TResult>> func, T1 arg)
+        {
+            try
+            {
+                return func(arg);
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, TResult>(Func<T1, TResult> func, T1 arg)
+        {
+            try
+            {
+                return FromResult<TResult>(func(arg));
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, T2, TResult>(Func<T1, T2, Task<TResult>> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return func(arg1, arg2);
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        public static Task<TResult> FromMethod<T1, T2, TResult>(Func<T1, T2, TResult> func, T1 arg1, T2 arg2)
+        {
+            try
+            {
+                return FromResult<TResult>(func(arg1, arg2));
+            }
+            catch (Exception ex)
+            {
+                return FromError<TResult>(ex);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        public static Task<T> FromResult<T>(T value)
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetResult(value);
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static Task FromError(Exception e)
+        {
+            return FromError<object>(e);
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static Task<T> FromError<T>(Exception e)
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetUnwrappedException<T>(e);
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static void SetUnwrappedException<T>(this TaskCompletionSource<T> tcs, Exception e)
+        {
+            var aggregateException = e as AggregateException;
+            if (aggregateException != null)
+            {
+                tcs.SetException(aggregateException.InnerExceptions);
+            }
+            else
+            {
+                tcs.SetException(e);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        internal static bool TrySetUnwrappedException<T>(this TaskCompletionSource<T> tcs, Exception e)
+        {
+            var aggregateException = e as AggregateException;
+            if (aggregateException != null)
+            {
+                return tcs.TrySetException(aggregateException.InnerExceptions);
+            }
+            else
+            {
+                return tcs.TrySetException(e);
+            }
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task Canceled()
+        {
+            var tcs = new TaskCompletionSource<object>();
+            tcs.SetCanceled();
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task<T> Canceled<T>()
+        {
+            var tcs = new TaskCompletionSource<T>();
+            tcs.SetCanceled();
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        private static Task RunTask(Task task, Action successor)
+        {
+            var tcs = new TaskCompletionSource<object>();
+            task.ContinueWith(t =>
+            {
+                if (t.IsFaulted)
+                {
+                    tcs.SetUnwrappedException(t.Exception);
+                }
+                else if (t.IsCanceled)
+                {
+                    tcs.SetCanceled();
+                }
+                else
+                {
+                    try
+                    {
+                        successor();
+                        tcs.SetResult(null);
+                    }
+                    catch (Exception ex)
+                    {
+                        tcs.SetUnwrappedException(ex);
+                    }
+                }
+            });
+
+            return tcs.Task;
+        }
+
+        [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")]
+        private static Task RunTaskSynchronously(Task task, Action<object> next, object state, bool onlyOnSuccess = true)
+        {
+            var tcs = new TaskCompletionSource<object>();
+            task.ContinueWith(t =>
+            {
+                try
+                {
+                    if (t.IsFaulted)
+                    {
+                        if (!onlyOnSuccess)
+                        {
+                            next(state);
+                        }
+
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        if (!onlyOnSuccess)
+                        {
+                            next(state);
+                        }
+
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        next(state);
+                        tcs.SetResult(null);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    tcs.SetUnwrappedException(ex);
+                }
+            },
+            TaskContinuationOptions.ExecuteSynchronously);
+
+            return tcs.Task;
+        }
+
+        private static class TaskRunners<T, TResult>
+        {
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task RunTask(Task<T> task, Action<T> successor)
+            {
+                var tcs = new TaskCompletionSource<object>();
+                task.ContinueWith(t =>
+                {
+                    if (t.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            successor(t.Result);
+                            tcs.SetResult(null);
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task<TResult> RunTask(Task task, Func<TResult> successor)
+            {
+                var tcs = new TaskCompletionSource<TResult>();
+                task.ContinueWith(t =>
+                {
+                    if (t.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            tcs.SetResult(successor());
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+
+            [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")]
+            internal static Task<TResult> RunTask(Task<T> task, Func<Task<T>, TResult> successor)
+            {
+                var tcs = new TaskCompletionSource<TResult>();
+                task.ContinueWith(t =>
+                {
+                    if (task.IsFaulted)
+                    {
+                        tcs.SetUnwrappedException(t.Exception);
+                    }
+                    else if (task.IsCanceled)
+                    {
+                        tcs.SetCanceled();
+                    }
+                    else
+                    {
+                        try
+                        {
+                            tcs.SetResult(successor(t));
+                        }
+                        catch (Exception ex)
+                        {
+                            tcs.SetUnwrappedException(ex);
+                        }
+                    }
+                });
+
+                return tcs.Task;
+            }
+        }
+
+        private static class GenericDelegates<T, TResult, T1, T2>
+        {
+            internal static Task ThenWithArgs(Task task, Action<T1> successor, T1 arg1)
+            {
+                return RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task ThenWithArgs(Task task, Action<T1, T2> successor, T1 arg1, T2 arg2)
+            {
+                return RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task task, Func<T1, TResult> successor, T1 arg1)
+            {
+                return TaskRunners<object, TResult>.RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task task, Func<T1, T2, TResult> successor, T1 arg1, T2 arg2)
+            {
+                return TaskRunners<object, TResult>.RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<TResult> ThenWithArgs(Task<T> task, Func<T, T1, TResult> successor, T1 arg1)
+            {
+                return TaskRunners<T, TResult>.RunTask(task, t => successor(t.Result, arg1));
+            }
+
+            internal static Task<Task> ThenWithArgs(Task task, Func<T1, Task> successor, T1 arg1)
+            {
+                return TaskRunners<object, Task>.RunTask(task, () => successor(arg1));
+            }
+
+            internal static Task<Task> ThenWithArgs(Task task, Func<T1, T2, Task> successor, T1 arg1, T2 arg2)
+            {
+                return TaskRunners<object, Task>.RunTask(task, () => successor(arg1, arg2));
+            }
+
+            internal static Task<Task<TResult>> ThenWithArgs(Task<T> task, Func<T, T1, Task<TResult>> successor, T1 arg1)
+            {
+                return TaskRunners<T, Task<TResult>>.RunTask(task, t => successor(t.Result, arg1));
+            }
+
+            internal static Task<Task<T>> ThenWithArgs(Task<T> task, Func<Task<T>, T1, Task<T>> successor, T1 arg1)
+            {
+                return TaskRunners<T, Task<T>>.RunTask(task, t => successor(t, arg1));
+            }
+        }
+
+        private static class TaskCache<T>
+        {
+            public static Task<T> Empty = MakeTask<T>(default(T));
+        }
+    }
+}
diff --git a/lib/SmartIrc4net/API_CHANGE b/lib/SmartIrc4net/API_CHANGE
deleted file mode 100644
index 06bd3f1..0000000
--- a/lib/SmartIrc4net/API_CHANGE
+++ /dev/null
@@ -1,70 +0,0 @@
-API Change (0.2.0 -> 0.3.0) Documentation 
------------------------------------------
-This file is only relevent for you if you wrote an IRC application that is
-SmartIrc4net 0.2.0 based! If you didn't use SmartIrc4net yet, you can safely
-ignore this file and just continue on hacking a great IRC application ;)
-
-The API naming between SmartIrc4net 0.2.0 and 0.3.0 changed a lot, mostly
-because of .NET library standards.
-
-Here are the changes:
-- All RFC commands in IrcCommands are now prefixed with "Rfc"
-
-  If you used the Join() method, then you need to change your calls to
-  RfcJoin(). The reason is for this change is that the most commands are plain
-  RFC wrapper methods. This way you can easily distinguish between API
-  commands/feature and plain RFC commands. Another reason was conflicts or
-  confusing names like Admin(), Version() or Ison().
-
-  Message() got renamed to SendMessage() which makes more clear what that
-  method actually does.
-
-- All delegates now uses .NET standards conform signatures
-
-  If you used JoinEventHandler which was:
-  JoinEventHandler(string channel, string who, Data ircdata)
-
-  it's now:
-  JoinEventHandler(object sender, JoinEventArgs e);
-
-  This way the .NET library standards suggest, because those JoinEventArgs
-  which extends IrcEventArgs which extends EventArgs can be easily changed at
-  any time later for additional data.
-  The "sender" argument is type IrcClient, the irc client object that triggered
-  the event (very useful for multiple irc connections).
-  IrcEventArgs always contain the property "Data"
-  (type IrcMessageData, formerly known as type Data)
-
-  This means you have to change all your event method signatures, e.g.:
-
-  If you had an event method for OnJoin it was like this:
-  MyOnJoinMethod(string channel, string who, Data ircdata) {
-    System.Console.WriteLine(who+" joined on "+channel+"!");
-  }
-
-  you need to change that to:
-  MyOnJoinMethod(object sender, JoinEventArgs e) {
-    System.Console.WriteLine(e.Who+" joined on "+e.Channel+"!");
-  }
-
-  you still have the whole parsed IRC message in e.Data!
-
-- Connect() Disconnect() Reconnect() don't return bool anymore
-
-  They use now proper exception handling, so catch them!
-  There is ConnectionException which work for all 3 methods, and also more
-  specific exception types like:
-  CouldNotConnectException
-  AlreadyConnectedException
-  NotConnectionException
-  
-  There is also a very general exception type which will catch ANY exception
-  that SmartIrc4net will throw! It's called:
-  SmartIrc4netException
-
-- ChannelSync property is renamed to ActiveChannelSync
-  (read more about in the CHANGELOG)
-
-- Any method that will send a message can throw an exception!
-  If the IRC library is not connected and you try to send any message, then
-  a NotConnectedException will be thrown!
diff --git a/lib/SmartIrc4net/CHANGELOG b/lib/SmartIrc4net/CHANGELOG
deleted file mode 100644
index 6503671..0000000
--- a/lib/SmartIrc4net/CHANGELOG
+++ /dev/null
@@ -1,181 +0,0 @@
-v0.4.0 (SVN r266)
-------
-fixes:
-- fixed null reference exception when CTCP PING contains no data
-  (thanks to Nick 'Zaf' Clifford, closes sf.net patch #1199630)
-- fixed NonRfcSupport, it didn't check for NonRfcSupport in _Event_RPL_NAMREPLY
-  (thanks to the anonymous poster on the sf.net forum for reporting this)
-- added sanity checks to the mode change parser in IrcClient._InterpretChannelMode(),
-  otherwise some nasty IRCd servers might break us.
-- catch ObjectDisposedExceptions in connection handling code.
-
-new:
-- IrcConnection now uses an active pinger to better detect network problems,
-  by default every 60 seconds a ping will be send to the server, if it
-  doesn't respond the class will disconnect or reconnect depending on
-  the IrcConnection.AutoReconnect property.
-- added IrcConnection.OnAutoConnectError event, raised when there is a problem
-  with the connection, it passes in AutoConnectErrorEventArgs which server and port
-  was used and which exception was thrown, this way application can display and
-  handle connection errors.
-- reconnect handling will now store/use keys if ActiveChannelSyncing and
-  AutoRejoin is activated.
-- UTF-8 support
-  now you can set IrcConnection.Encoding = Encoding.UTF8 and all messages send
-  and receives will be encoded/decoded to/from UTF-8
-- added lots of documentation stabs
-- added IrcClient.IsAway property.
-- added IrcClient.OnAway, IrcClient.OnAway, IrcClient.OnUnAway and IrcClient.OnNowAway events.
-- added IrcClient.OnPong event.
-- added IrcClient.AutoJoinOnInvite property, if enabled and the class receives an
-  invite it will join that channel automatic (don't worry it will not join "0").
-- added IrcClient.AutoRejoinOnKick property, if enabled and the class was in a
-  channel and got kicked, it will try to rejoin that channel.
-- added IrcClient.AutoNickHandling property, now you can deactivate the
-  automatic nick change when a nick collision happens, so you can handle
-  it on your application instead.
-- added IrcCLient.NicknameList property, set in Login() call, will try the
-  different nicks when the nick was already used, in order.
-- added IrcClient.Login() overload for passing a nickname list.
-- added some documentation.
-- added IrcConnection.Lag property, indicates how much lag is between the
-  IRCd server and the IRC client.
-- added VisualStudio 2005 project files.
-
-changes:
-- IrcConnection.Encoding now uses the system encoding as default!
-  So you might have to set it to Encoding.GetEncoding("ISO-8859-1") manually.
-- IrcClient.Reconnect() now stores channel keys too for rejoining them.
-- IrcClient.OnCtcpRequest and IrcClient.OnCtcpReply events now passes parsed
-  CTCP data as CtcpEventArgs.
-- Removed log4net initialization, as this can conflict with applications using log4net.
-  If you need debug output, use the debug build and add this code to your application:
-  log4net.Config.BasicConfigurator.Configure();
-  or if you want the old config style with a config file:
-  FileInfo fi = new FileInfo("SmartIrc4net_log.config");
-  log4net.Config.DOMConfigurator.ConfigureAndWatch(fi);
-- When IrcClient.CtcpVersion is set, the library will no longer advertise
-  itself in CTCP VERSION replies.
-
-v0.3.5 (SVN r184)
-------
-fixes:
-- fixed bug in channel sync that caused duplicate exception
-  (Closes sf.net bug #1064190)
-- fixed tracking of ops and voices list on join
-  (thanks to Cl�ment Bourgeois, closes sf.net bug #1075942)
-- fixed bug that the initial channel mode is not synced (on join). 
-- fixed a crash bug in the channel sync code
-  when a user was voiced/opped/banned 2 times, an ArgumentException was thrown
-  (thanks to Cl�ment Bourgeois for spotting this)
-- fixed handling of a stalled connection
-  IOException was not catched in the write thread, and in the read thread
-  the IsConnectionError was not set
-- fixed InviteEventArgs, mixed who with channel name
-- fixed OnConnected event
-  now it's raised when the connection is ready for sending data.
-- fixed Reconnect() handling in the Listen() loop, moved to ReadLine().
-- fixed InviteEventArgs.Channel property,
-  initialized with the right value now.
-- fixed nullref exception in _Event_QUIT()
-  added sanity checks, FreshIRC network does very ugly things with the IRC
-  protocol.
-
-changes:
-- improved handling of rejoining channels after reconnect.
-- using keep-alive socket now.
-- removed underscores in parameter names (violates .NET library standards)
-- renamed parameters with "text" to different names
-  (violates .NET library standards)
-- using new case-insensitive hashtables (FxCop spotted this)
-- improved the example/test program
-- main bin/ directory is now used for the example programs
-- changed overrides to new (method hiding is sufficient here).
-- updated all MS VS.NET project files.
-
-new:
-- added Halfop support (with OnHalfop and OnDehalfop events)
-  if you want to use it do:
-  irc.NonRfcSupport = true;
-  NonRfcChannel nchan = GetChannel("#channel");
-  nchan.Halfops....
-  or
-  NonRfcChannelUser nuser = GetChannelUser("#channel", "nick");
-  nuser.Halfop.....
-- added Halfop() and Dehalfop() command to IrcCommands
-- added OnErrorMessage event as general hook for all ERR_ messages
-- added SendReply(), easy way of replying to a message
-  (regardless if its a channel, query or notice message)
-- added OnMotd event (with MotdEventArgs)
-- added IrcClient.Motd property
-- added OnChannelPassiveSynced event
-- added channel sync timings to channels (Channel.ActiveSyncTime).
-- added IrcClient.AutoRelogin setting.
-- added IrcConnection.AutoRetryDelay property.
-- added IrcConnection.OnConnectionError event.
-- added Rfc2812.IsValidNickname() method.
-- added IrcConnection.SocketSendTimeout and IrcConnection.SocketReceiveTimeout
-- added little benchmark program (examples/benchmark).
-- added stresstest program (examples/stresstest).
-- added sign target to the makefile
-
-v0.3.0 (SVN r123)
--------
-fixes:
-- fine tuned the "#ifdef LOG4NET" statements (thanks to prencher for noticing this
-  log4net is fully optional! (only required for debugging the library)
-- fixed bug, the class changed the Op and Voice list of a copy *boing*
-  (FxCop pointed me to it)
-- added check for "~" userflag on nameslist (thanks to Giacomo Di Ciocco)
-  this broke the library on IRC networks using that userflag on channels
-- fixed channel sync bug, when the connection is re-established
-  (Closes sf.net bug #1043536)
-- fixed rejoining channels when using Reconnect()
-- added sanity checks in _Event_WHOREPLY()
-  this will prevent exceptions when the IRC server voilates the RFC    
-  (like some psybnc version do)
-- fixed string handling in _Event_PRIVMSG() for CTCP messages
-  (Closes sf.net bug #1039286)
-
-changes:
-- making SmartIrc4net CLS and .NET standards conform
-  changed all delegates to use EventArgs
-- made a few constructors "internal"
-- directory struture changed
-  the structure now represents the API layers
-  (IrcConnection, IrcCommands and IrcClient)
-- regex optimizations (thanks to prencher for the hints)
-- renamed all ReplyCodes to conform to .NET standards
-  (e.g. ReyplCode.RPL_Welcome -> ReplyCode.Welcome)
-- renamed IrcConnection.Version to IrcConnection.VersionNumber
-- renamed ChannelSync to ActiveChannelSync
-  later I will introduce PassiveChannelSync, this means only the received
-  data is used for channel sync no extra commands are send to the IRC server.
-
-new:
-- parts of SmartIrc4net have now XML documentation tags
-- added *EventArgs for the events
-- added exception handling for Connect() Reconnect() Disconnect()
-- added VisualStudio project files (thanks to prencher for creating them)
-- added constructors to the exception classes (.NET standards)
-- added log calls for queue, when data could not be sent and is requeued
-- added missing overloads for RFC commands (Closes sf.net bug #1061503)
-  (Join, Part, Kick, List, Names) 
-- added more RFC commands, now all RFC 2812 commands are implemented!
-  (Oper, Motd, Luser, Version, Stats, Service, Squit, Links, Time, Connect,
-   Trace, Admin, Info, Servlist, Squery, Whois, Whowas, Kill, Ping, Pong,
-   Away, Rehash, Die, Restart, Summon, Users, Wallops, Userhost, Ison)
-- WriteLine() will throw an NotConnectedException now when it's used without
-  having a connection to an IRC server
-- added timeout values for the tcp socket (6 minutes), and activated nodelay flag
-- prefixed all IrcCommands that are actually plain RFC commands with "Rfc"
-  e.g. Join() is now called RfcJoin()
-
-v0.2.0 (SVN r83)
--------
-fixes:
-
-changes:
-
-new:
- - first public release
diff --git a/lib/SmartIrc4net/CREDITS b/lib/SmartIrc4net/CREDITS
deleted file mode 100644
index 1f7559f..0000000
--- a/lib/SmartIrc4net/CREDITS
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * $Id$
- * $URL$
- * $Rev$
- * $Author$
- * $Date$
- */
-
-This is the creditslist for SmartIrc4net
-
-The fields are:
-(N) name
-(E) email
-(W) web-address
-(P) PGP key ID and fingerprint
-(D) description
-(S) snail-mail address
----------------------------
-
-N: Mirco Bauer
-E: meebey at meebey.net
-E: meebey at php.net
-W: www.meebey.net
-P: EEF946C8 / ABE1 95E1 50A8 DBE7 809D  3F42 7127 E5AB EEF9 46C8
-D: Project Leader
-S: Kroonhorst 42
-S: 22549 Hamburg
-S: Germany
-
-N: Benjamin Hall
-E: Benjamin.Hall at orcon.net.nz
-D: Several patches: AutoRejoinOnKick, AutoJoinOnInvite, NicknameList,
-   IdleWorkerThread, OnAutoConnectError, Lag, documentation
-S: Auckland
-S: New Zealand
-
-N: Thomas Bruderer (apophis)
-E: apophis at apophis.ch
-D: Several patches: DCC implementation, OnNames fix
-S: Zurich
-S: Switzerland
diff --git a/lib/SmartIrc4net/FEATURES b/lib/SmartIrc4net/FEATURES
deleted file mode 100644
index ac7ecb2..0000000
--- a/lib/SmartIrc4net/FEATURES
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * $Id$
- * $URL$
- * $Rev$
- * $Author$
- * $Date$
- */
-
-Full featurelist of SmartIrc4net
--------------------------------------
-
-- 3 layered API
-  - IrcConnection (low-level API)
-    contains socket handling and message buffer
-  - IrcCommands (extends IrcConnection, middle-level API)
-    contains RFC IRC commands plus easy to use IRC methods (like Op/Deop/Ban/Unban...)
-  - IrcClient (extends IrcCommands, high-level API)
-    full featured IRC class, with channel syncing, fully event driven
-- send/receive floodprotection
-- detects and changes nickname on nickname collisions
-- autoreconnect, if connection is lost
-- autoretry for connecting to IRC servers
-- debugging/logging system with log levels (using log4net)
-- compatible with Mono and Micrsoft .NET Framework
-- sendbuffer with a queue that has 3 priority levels (high, medium, low) plus a bypass level (critical)
-- channel syncing (tracking of users/modes/topic etc in objects)
-- user syncing (tracking the user in channels, nick/ident/host/realname/server/hopcount in objects)
-- when channel syncing is acticated the following methods are available:
-  - IsJoined
-  - IsOpped
-  - IsVoiced
-  - IsBanned
-- on reconnect all joined channels will be rejoined, also when keys are used
-- own CTCP version reply can be set
diff --git a/lib/SmartIrc4net/LICENSE b/lib/SmartIrc4net/LICENSE
deleted file mode 100644
index 9884a9c..0000000
--- a/lib/SmartIrc4net/LICENSE
+++ /dev/null
@@ -1,509 +0,0 @@
-/**
- * $Id$
- * $URL$
- * $Rev$
- * $Author$
- * $Date$
- */
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/lib/SmartIrc4net/Makefile.am b/lib/SmartIrc4net/Makefile.am
deleted file mode 100644
index c07b726..0000000
--- a/lib/SmartIrc4net/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-SUBDIRS = \
-	src
-
-EXTRA_DIST = \
-	$(PACKAGE_NAME).snk \
-	SmartIrc4net.csproj \
-	API_CHANGE \
-	CHANGELOG \
-	CREDITS \
-	FEATURES \
-	LICENSE \
-	README \
-	TODO
diff --git a/lib/SmartIrc4net/Makefile.in b/lib/SmartIrc4net/Makefile.in
deleted file mode 100644
index 7f6d996..0000000
--- a/lib/SmartIrc4net/Makefile.in
+++ /dev/null
@@ -1,720 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/../../install-sh \
-	$(srcdir)/../../missing $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/smartirc4net.pc.in \
-	$(top_srcdir)/configure TODO
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
-	$(top_srcdir)/mono.m4 $(top_srcdir)/programs.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno config.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = smartirc4net.pc
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir dist dist-all distcheck
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
-  if test -d "$(distdir)"; then \
-    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-      && rm -rf "$(distdir)" \
-      || { sleep 5 && rm -rf "$(distdir)"; }; \
-  else :; fi
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
-distcleancheck_listfiles = find . -type f -print
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-ASSEMBLY_DESCRIPTION = @ASSEMBLY_DESCRIPTION@
-ASSEMBLY_NAME = @ASSEMBLY_NAME@
-ASSEMBLY_TITLE = @ASSEMBLY_TITLE@
-ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CLR = @CLR@
-CSC = @CSC@
-CSC_FLAGS = @CSC_FLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-GACUTIL = @GACUTIL@
-GACUTIL_FLAGS = @GACUTIL_FLAGS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MCS = @MCS@
-MKDIR_P = @MKDIR_P@
-MONO = @MONO@
-MONO_MODULE_CFLAGS = @MONO_MODULE_CFLAGS@
-MONO_MODULE_LIBS = @MONO_MODULE_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-expanded_libdir = @expanded_libdir@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-SUBDIRS = \
-	src
-
-EXTRA_DIST = \
-	$(PACKAGE_NAME).snk \
-	SmartIrc4net.csproj \
-	API_CHANGE \
-	CHANGELOG \
-	CREDITS \
-	FEATURES \
-	LICENSE \
-	README \
-	TODO
-
-all: all-recursive
-
-.SUFFIXES:
-am--refresh: Makefile
-	@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
-	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
-		&& exit 0; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    echo ' $(SHELL) ./config.status'; \
-	    $(SHELL) ./config.status;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	$(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	$(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-$(am__aclocal_m4_deps):
-smartirc4net.pc: $(top_builddir)/config.status $(srcdir)/smartirc4net.pc.in
-	cd $(top_builddir) && $(SHELL) ./config.status $@
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	shift; \
-	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  if test $$# -gt 0; then \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      "$$@" $$unique; \
-	  else \
-	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	      $$unique; \
-	  fi; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && $(am__cd) $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	$(am__remove_distdir)
-	test -d "$(distdir)" || mkdir "$(distdir)"
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    $(am__make_dryrun) \
-	      || test -d "$(distdir)/$$subdir" \
-	      || $(MKDIR_P) "$(distdir)/$$subdir" \
-	      || exit 1; \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-	-test -n "$(am__skip_mode_fix)" \
-	|| find "$(distdir)" -type d ! -perm -755 \
-		-exec chmod u+rwx,go+rx {} \; -o \
-	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r "$(distdir)"
-dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
-
-dist-lzip: distdir
-	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-	$(am__remove_distdir)
-
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__remove_distdir)
-
-dist-xz: distdir
-	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-	$(am__remove_distdir)
-
-dist-tarZ: distdir
-	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-	$(am__remove_distdir)
-
-dist-shar: distdir
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
-
-dist-zip: distdir
-	-rm -f $(distdir).zip
-	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
-
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration.  Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
-	case '$(DIST_ARCHIVES)' in \
-	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
-	*.tar.bz2*) \
-	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
-	*.tar.lz*) \
-	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
-	*.tar.xz*) \
-	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-	*.tar.Z*) \
-	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
-	*.zip*) \
-	  unzip $(distdir).zip ;;\
-	esac
-	chmod -R a-w $(distdir); chmod u+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
-	chmod a-w $(distdir)
-	test -d $(distdir)/_build || exit 0; \
-	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
-	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
-	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) \
-	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
-	  && $(MAKE) $(AM_MAKEFLAGS) check \
-	  && $(MAKE) $(AM_MAKEFLAGS) install \
-	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-	        distuninstallcheck \
-	  && chmod -R a-w "$$dc_install_base" \
-	  && ({ \
-	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
-	  && rm -rf "$$dc_destdir" \
-	  && $(MAKE) $(AM_MAKEFLAGS) dist \
-	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
-	  && cd "$$am__cwd" \
-	  || exit 1
-	$(am__remove_distdir)
-	@(echo "$(distdir) archives ready for distribution: "; \
-	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
-distuninstallcheck:
-	@test -n '$(distuninstallcheck_dir)' || { \
-	  echo 'ERROR: trying to run $@ with an empty' \
-	       '$$(distuninstallcheck_dir)' >&2; \
-	  exit 1; \
-	}; \
-	$(am__cd) '$(distuninstallcheck_dir)' || { \
-	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
-	  exit 1; \
-	}; \
-	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
-	   || { echo "ERROR: files left after uninstall:" ; \
-	        if test -n "$(DESTDIR)"; then \
-	          echo "  (check DESTDIR support)"; \
-	        fi ; \
-	        $(distuninstallcheck_listfiles) ; \
-	        exit 1; } >&2
-distcleancheck: distclean
-	@if test '$(srcdir)' = . ; then \
-	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
-	  exit 1 ; \
-	fi
-	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-	  || { echo "ERROR: files left in build directory after distclean:" ; \
-	       $(distcleancheck_listfiles) ; \
-	       exit 1; } >&2
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-html-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-recursive
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-recursive
-
-install-html-am:
-
-install-info: install-info-recursive
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-recursive
-
-install-pdf-am:
-
-install-ps: install-ps-recursive
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-am clean clean-generic \
-	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-	distcheck distclean distclean-generic distclean-tags \
-	distcleancheck distdir distuninstallcheck dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/SmartIrc4net/README b/lib/SmartIrc4net/README
deleted file mode 100644
index 822973c..0000000
--- a/lib/SmartIrc4net/README
+++ /dev/null
@@ -1,47 +0,0 @@
-SmartIrc4net
-----------------
-What is this?
-SmartIrc4net is a C# class for communication with IRC networks, which
-conforms to the RFC 2812 (IRC Protocol).
-It's orignally a port of SmartIRC (written in PHP),
-but it's much more now (I will backport it to PHP5 some day).
-SmartIrc4net an API that handles all IRC protocol messages and is designed for
-creating IRC bots or even GUI clients.
-
-Please report bugs to:
-http://sourceforge.net/tracker/?group_id=114302&atid=667874
-
-Project Homepage:
-http://smartirc4net.sf.net
-
-files included in SmartIrc4net
---------------------------
-FEATURES
-A full list of features that SmartIrc4net includes
-
-CHANGELOG
-Listing of changes between all versions.
-
-README
-This file
-
-LICENSE
-The license of SmartIrc4net.
-
-CREDITS
-Creditlist with people that work/help on SmartIrc4net.
-
-src/*.cs
-The SmartIrc4net sourcecode
-
-examples/
-Some examples how SmartIrc4net can be used.
-
-docs/
-Documentation of SmartIrc4net.
-
-CSharpBuilder/
-Project files for Borlands C# Builder.
-
-MonoDevelop/
-Project files for MonoDevelop.
diff --git a/lib/SmartIrc4net/SmartIrc4net.csproj b/lib/SmartIrc4net/SmartIrc4net.csproj
index 1cf706f..9fa8bfb 100644
--- a/lib/SmartIrc4net/SmartIrc4net.csproj
+++ b/lib/SmartIrc4net/SmartIrc4net.csproj
@@ -69,23 +69,22 @@
     <Compile Include="src\IrcFeatures\EventArgs.cs" />
     <Compile Include="src\IrcFeatures\IrcConstants.cs" />
     <Compile Include="src\IrcFeatures\IrcFeatures.cs" />
-    <Compile Include="src\StarkSoftProxy\HttpProxyClient.cs" />
-    <Compile Include="src\StarkSoftProxy\IProxyClient.cs" />
-    <Compile Include="src\StarkSoftProxy\ProxyClientFactory.cs" />
-    <Compile Include="src\StarkSoftProxy\Socks4ProxyClient.cs" />
-    <Compile Include="src\StarkSoftProxy\Socks4aProxyClient.cs" />
-    <Compile Include="src\StarkSoftProxy\Socks5ProxyClient.cs" />
-    <Compile Include="src\StarkSoftProxy\Utils.cs" />
-    <Compile Include="src\StarkSoftProxy\EventArgs\CreateConnectionAsyncCompletedEventArgs.cs" />
-    <Compile Include="src\StarkSoftProxy\Exceptions\ProxyException.cs" />
     <Compile Include="src\IrcConnection\ProxyType.cs" />
+    <Compile Include="src\IrcConnection\PrimaryOrFallbackEncoding.cs" />
+    <Compile Include="src\IrcClient\ServerProperties.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
-    <Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b">
+    <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b">
       <Package>log4net</Package>
     </Reference>
     <Reference Include="System.Core" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\StarkSoftProxy\StarkSoftProxy.csproj">
+      <Project>{3F8CF2C1-EA37-444F-8693-A3A00B1131D2}</Project>
+      <Name>StarkSoftProxy</Name>
+    </ProjectReference>
+  </ItemGroup>
 </Project>
diff --git a/lib/SmartIrc4net/TODO b/lib/SmartIrc4net/TODO
deleted file mode 100644
index 160520a..0000000
--- a/lib/SmartIrc4net/TODO
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * $Id$
- * $URL$
- * $Rev$
- * $Author$
- * $Date$
- */
-
-08:09:48 <AirHead> btw, I forgot to mention, but the channel modes +q and +a are for Owner (~) and Admin (&) respectively.
-- IrcClient.AutoAwaySync, query every minute WHO of joined channels to keep away synced
-- Reconnect() / StoreRejoinChannels() should remember channel keys too!
-- add IrcNetwork property, which is guessed by default or passed with Connect()
-- Documentation
-- passive channel sync
-- AutoNickChange
-- clean message parser, channel is not always right set (need to check for replycode!)
-- DCC chat, file send/receive
-- ipv6 support?
-- add IrcConnection.HostAddress (which IP is used for the client)
-- add OnSocketTimeout event
-- add server properties to IrcConnection (required for smart mode changes etc)
-- Exception Error Handling (argument checking)
-- Use async sockets?
-- Create Debian Package
diff --git a/lib/SmartIrc4net/aclocal.m4 b/lib/SmartIrc4net/aclocal.m4
deleted file mode 100644
index 0ebcde2..0000000
--- a/lib/SmartIrc4net/aclocal.m4
+++ /dev/null
@@ -1,856 +0,0 @@
-# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
-You have another version of autoconf.  It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes ],
-		     [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	m4_default([$4], [AC_MSG_ERROR(
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
-	m4_default([$4], [AC_MSG_FAILURE(
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
-        ])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	$3
-fi[]dnl
-])# PKG_CHECK_MODULES
-
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.6], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.6])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 16
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-			     [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-		  [_AM_DEPENDENCIES(CXX)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-		  [_AM_DEPENDENCIES(OBJC)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well.  Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
-       [enable], [m4_define([am_maintainer_other], [disable])],
-       [disable], [m4_define([am_maintainer_other], [enable])],
-       [m4_define([am_maintainer_other], [enable])
-        m4_warn([syntax], [unexpected argument to AM@&t at _MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
-  AC_ARG_ENABLE([maintainer-mode],
-[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer],
-      [USE_MAINTAINER_MODE=$enableval],
-      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
-  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
-  MAINT=$MAINTAINER_MODE_TRUE
-  AC_SUBST([MAINT])dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# --------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# --------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
-
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
-
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-  rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([expansions.m4])
-m4_include([mono.m4])
-m4_include([programs.m4])
diff --git a/lib/SmartIrc4net/configure b/lib/SmartIrc4net/configure
deleted file mode 100755
index 00f1a33..0000000
--- a/lib/SmartIrc4net/configure
+++ /dev/null
@@ -1,3952 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for smartirc4net 0.4.5.1.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  export CONFIG_SHELL
-             # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf at gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='smartirc4net'
-PACKAGE_TARNAME='smartirc4net'
-PACKAGE_VERSION='0.4.5.1'
-PACKAGE_STRING='smartirc4net 0.4.5.1'
-PACKAGE_BUGREPORT=''
-PACKAGE_URL=''
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-INSTALL_PKG_GAC_FALSE
-INSTALL_PKG_GAC_TRUE
-INSTALL_PKG_LIB_FALSE
-INSTALL_PKG_LIB_TRUE
-INSTALL_PKG_CONFIG_FALSE
-INSTALL_PKG_CONFIG_TRUE
-GACUTIL_FLAGS
-GACUTIL
-CSC_FLAGS
-CSC
-MCS
-CLR
-MONO
-MONO_MODULE_LIBS
-MONO_MODULE_CFLAGS
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
-PKG_CONFIG
-expanded_libdir
-ASSEMBLY_NAME
-ASSEMBLY_VERSION
-ASSEMBLY_DESCRIPTION
-ASSEMBLY_TITLE
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_maintainer_mode
-enable_pkg_config
-enable_pkg_lib
-enable_pkg_gac
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-MONO_MODULE_CFLAGS
-MONO_MODULE_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures smartirc4net 0.4.5.1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/smartirc4net]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of smartirc4net 0.4.5.1:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-maintainer-mode  enable make rules and dependencies not useful
-			  (and sometimes confusing) to the casual installer
-  --disable-pkg-config    Disable pkg-config install [default=NO]
-  --disable-pkg-lib       Disable library install [default=NO]
-  --disable-pkg-gac       Disable GAC install [default=NO]
-
-Some influential environment variables:
-  PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  MONO_MODULE_CFLAGS
-              C compiler flags for MONO_MODULE, overriding pkg-config
-  MONO_MODULE_LIBS
-              linker flags for MONO_MODULE, overriding pkg-config
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to the package provider.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-smartirc4net configure 0.4.5.1
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by smartirc4net $as_me 0.4.5.1, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-am__api_version='1.11'
-
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-  done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t "$srcdir/configure" conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
-
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
-else
-  am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\	*)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if ${ac_cv_path_mkdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in mkdir gmkdir; do
-	 for ac_exec_ext in '' $ac_executable_extensions; do
-	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-	     'mkdir (GNU coreutils) '* | \
-	     'mkdir (coreutils) '* | \
-	     'mkdir (fileutils) '4.1*)
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-	       break 3;;
-	   esac
-	 done
-       done
-  done
-IFS=$as_save_IFS
-
-fi
-
-  test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='smartirc4net'
- VERSION='0.4.5.1'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AMTAR='$${TAR-tar}'
-
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
-    # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then :
-  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
-  USE_MAINTAINER_MODE=no
-fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
-   if test $USE_MAINTAINER_MODE = yes; then
-  MAINTAINER_MODE_TRUE=
-  MAINTAINER_MODE_FALSE='#'
-else
-  MAINTAINER_MODE_TRUE='#'
-  MAINTAINER_MODE_FALSE=
-fi
-
-  MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-
-
-ASSEMBLY_TITLE="SmartIrc4net"
-ASSEMBLY_DESCRIPTION="IRC library for CLI"
-ASSEMBLY_NAME="Meebey.SmartIrc4net"
-ASSEMBLY_VERSION="0.4.5.0"
-
-
-
-
-
-
-	expanded_libdir=`(
-		case $prefix in
-			NONE) prefix=$ac_default_prefix ;;
-			*) ;;
-		esac
-		case $exec_prefix in
-			NONE) exec_prefix=$prefix ;;
-			*) ;;
-		esac
-		eval echo $libdir
-	)`
-
-
-
-
-
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-fi
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MONO_MODULE" >&5
-$as_echo_n "checking for MONO_MODULE... " >&6; }
-
-if test -n "$MONO_MODULE_CFLAGS"; then
-    pkg_cv_MONO_MODULE_CFLAGS="$MONO_MODULE_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mono >= 1.2.6\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "mono >= 1.2.6") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_MONO_MODULE_CFLAGS=`$PKG_CONFIG --cflags "mono >= 1.2.6" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$MONO_MODULE_LIBS"; then
-    pkg_cv_MONO_MODULE_LIBS="$MONO_MODULE_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mono >= 1.2.6\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "mono >= 1.2.6") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_MONO_MODULE_LIBS=`$PKG_CONFIG --libs "mono >= 1.2.6" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        MONO_MODULE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mono >= 1.2.6" 2>&1`
-        else
-	        MONO_MODULE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mono >= 1.2.6" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$MONO_MODULE_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements (mono >= 1.2.6) were not met:
-
-$MONO_MODULE_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables MONO_MODULE_CFLAGS
-and MONO_MODULE_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables MONO_MODULE_CFLAGS
-and MONO_MODULE_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	MONO_MODULE_CFLAGS=$pkg_cv_MONO_MODULE_CFLAGS
-	MONO_MODULE_LIBS=$pkg_cv_MONO_MODULE_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-
-
-	# Extract the first word of "mono", so it can be a program name with args.
-set dummy mono; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MONO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MONO in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MONO="$MONO" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_MONO="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_MONO" && ac_cv_path_MONO="no"
-  ;;
-esac
-fi
-MONO=$ac_cv_path_MONO
-if test -n "$MONO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MONO" >&5
-$as_echo "$MONO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-	if test "xMONO" = "xno"; then
-		as_fn_error $? "You need to install 'mono'" "$LINENO" 5
-	fi
-
-
-CLR=$MONO
-
-
-
-
-	# Extract the first word of "gmcs", so it can be a program name with args.
-set dummy gmcs; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MCS+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MCS in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_MCS" && ac_cv_path_MCS="no"
-  ;;
-esac
-fi
-MCS=$ac_cv_path_MCS
-if test -n "$MCS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
-$as_echo "$MCS" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-	if test "xMCS" = "xno"; then
-		as_fn_error $? "You need to install 'gmcs'" "$LINENO" 5
-	fi
-
-
-CSC=$MCS
-
-CSC_FLAGS="-debug -define:TRACE,DEBUG -nowarn:1591"
-
-
-
-	for asm in $(echo "2.0,System
-" | cut -d, -f2- | sed 's/\,/ /g')
-	do
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mono 2.0 GAC for $asm.dll" >&5
-$as_echo_n "checking for Mono 2.0 GAC for $asm.dll... " >&6; }
-		if test \
-			-e "$($PKG_CONFIG --variable=libdir mono)/mono/2.0/$asm.dll" -o \
-			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/2.0/$asm.dll"; \
-			then \
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-			as_fn_error $? "missing reqired Mono 2.0 assembly: $asm.dll" "$LINENO" 5
-		fi
-	done
-
-
-
-# Extract the first word of "gacutil", so it can be a program name with args.
-set dummy gacutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_GACUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $GACUTIL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_GACUTIL="$GACUTIL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_GACUTIL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-GACUTIL=$ac_cv_path_GACUTIL
-if test -n "$GACUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GACUTIL" >&5
-$as_echo "$GACUTIL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x$GACUTIL = x; then
-	as_fn_error $? "You need gacutil" "$LINENO" 5
-fi
-
-#PKG_CHECK_MODULES([LOG4NET], [log4net])
-
-GACUTIL_FLAGS='-root $(DESTDIR)$(libdir)'
-
-
-# Check whether --enable-pkg-config was given.
-if test "${enable_pkg_config+set}" = set; then :
-  enableval=$enable_pkg_config; disable_pkg_config=yes
-else
-  disable_pkg_config=no
-
-fi
-
- if test x$disable_pkg_config = xno; then
-  INSTALL_PKG_CONFIG_TRUE=
-  INSTALL_PKG_CONFIG_FALSE='#'
-else
-  INSTALL_PKG_CONFIG_TRUE='#'
-  INSTALL_PKG_CONFIG_FALSE=
-fi
-
-
-# Check whether --enable-pkg-lib was given.
-if test "${enable_pkg_lib+set}" = set; then :
-  enableval=$enable_pkg_lib; disable_pkg_lib=yes
-else
-  disable_pkg_lib=no
-
-fi
-
- if test x$disable_pkg_lib = xno; then
-  INSTALL_PKG_LIB_TRUE=
-  INSTALL_PKG_LIB_FALSE='#'
-else
-  INSTALL_PKG_LIB_TRUE='#'
-  INSTALL_PKG_LIB_FALSE=
-fi
-
-
-# Check whether --enable-pkg-gac was given.
-if test "${enable_pkg_gac+set}" = set; then :
-  enableval=$enable_pkg_gac; disable_pkg_gac=yes
-else
-  disable_pkg_gac=no
-
-fi
-
- if test x$disable_pkg_gac = xno; then
-  INSTALL_PKG_GAC_TRUE=
-  INSTALL_PKG_GAC_FALSE='#'
-else
-  INSTALL_PKG_GAC_TRUE='#'
-  INSTALL_PKG_GAC_FALSE=
-fi
-
-
-ac_config_files="$ac_config_files Makefile smartirc4net.pc src/Makefile src/AssemblyInfo.cs"
-
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-	cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-	  mv -f confcache "$cache_file"$$ &&
-	  mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-	  mv -f confcache "$cache_file" ;;
-	esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
-	g
-	s/^\n//
-	s/\n/ /g
-	p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${INSTALL_PKG_CONFIG_TRUE}" && test -z "${INSTALL_PKG_CONFIG_FALSE}"; then
-  as_fn_error $? "conditional \"INSTALL_PKG_CONFIG\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${INSTALL_PKG_LIB_TRUE}" && test -z "${INSTALL_PKG_LIB_FALSE}"; then
-  as_fn_error $? "conditional \"INSTALL_PKG_LIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${INSTALL_PKG_GAC_TRUE}" && test -z "${INSTALL_PKG_GAC_FALSE}"; then
-  as_fn_error $? "conditional \"INSTALL_PKG_GAC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by smartirc4net $as_me 0.4.5.1, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to the package provider."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-smartirc4net config.status 0.4.5.1
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h |  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "smartirc4net.pc") CONFIG_FILES="$CONFIG_FILES smartirc4net.pc" ;;
-    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-    "src/AssemblyInfo.cs") CONFIG_FILES="$CONFIG_FILES src/AssemblyInfo.cs" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
-h
-s///
-s/^/:/
-s/[	 ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[	 ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X "  :F $CONFIG_FILES      "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
-	Configuration summary for $PACKAGE_NAME ($VERSION)
-
-	* Installation prefix: $prefix
-" >&5
-$as_echo "
-	Configuration summary for $PACKAGE_NAME ($VERSION)
-
-	* Installation prefix: $prefix
-" >&6; }
diff --git a/lib/SmartIrc4net/configure.ac b/lib/SmartIrc4net/configure.ac
deleted file mode 100644
index 9cc8ec1..0000000
--- a/lib/SmartIrc4net/configure.ac
+++ /dev/null
@@ -1,73 +0,0 @@
-AC_PREREQ([2.54])
-AC_INIT([smartirc4net], [0.4.5.1])
-AM_INIT_AUTOMAKE([foreign])
-AM_MAINTAINER_MODE
-
-AC_PROG_INSTALL
-
-ASSEMBLY_TITLE="SmartIrc4net"
-ASSEMBLY_DESCRIPTION="IRC library for CLI"
-ASSEMBLY_NAME="Meebey.SmartIrc4net"
-ASSEMBLY_VERSION="0.4.5.0"
-AC_SUBST(ASSEMBLY_TITLE)
-AC_SUBST(ASSEMBLY_DESCRIPTION)
-AC_SUBST(ASSEMBLY_VERSION)
-AC_SUBST(ASSEMBLY_NAME)
-
-SHAMROCK_EXPAND_LIBDIR
-SHAMROCK_CHECK_MONO_MODULE(1.2.6)
-SHAMROCK_FIND_MONO_RUNTIME
-AC_SUBST(CLR, $MONO)
-SHAMROCK_FIND_MONO_2_0_COMPILER
-AC_SUBST(CSC, $MCS)
-CSC_FLAGS="-debug -define:TRACE,DEBUG -nowarn:1591"
-AC_SUBST(CSC_FLAGS)
-SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
-	System
-])
-
-AC_PATH_PROG(GACUTIL, gacutil)
-if test x$GACUTIL = x; then
-	AC_MSG_ERROR(You need gacutil)
-fi
-
-#PKG_CHECK_MODULES([LOG4NET], [log4net])
-                        
-GACUTIL_FLAGS='-root $(DESTDIR)$(libdir)'
-AC_SUBST(GACUTIL_FLAGS)
-
-AC_ARG_ENABLE(pkg-config,
-	AC_HELP_STRING([--disable-pkg-config],
-		[Disable pkg-config install [default=NO]]),
-	disable_pkg_config=yes, disable_pkg_config=no
-)
-AM_CONDITIONAL([INSTALL_PKG_CONFIG], test x$disable_pkg_config = xno)
-
-AC_ARG_ENABLE(pkg-lib,
-	AC_HELP_STRING([--disable-pkg-lib],
-		[Disable library install [default=NO]]),
-	disable_pkg_lib=yes, disable_pkg_lib=no
-)
-AM_CONDITIONAL([INSTALL_PKG_LIB], test x$disable_pkg_lib = xno)
-
-AC_ARG_ENABLE(pkg-gac,
-	AC_HELP_STRING([--disable-pkg-gac],
-		[Disable GAC install [default=NO]]),
-	disable_pkg_gac=yes, disable_pkg_gac=no
-)
-AM_CONDITIONAL([INSTALL_PKG_GAC], test x$disable_pkg_gac = xno)
-
-AC_CONFIG_FILES([
-	Makefile
-	smartirc4net.pc
-	src/Makefile
-	src/AssemblyInfo.cs
-])
-
-AC_OUTPUT
-
-AC_MSG_RESULT([
-	Configuration summary for $PACKAGE_NAME ($VERSION)
-        
-	* Installation prefix: $prefix
-])
diff --git a/lib/SmartIrc4net/examples/benchmark/AssemblyInfo.cs b/lib/SmartIrc4net/examples/benchmark/AssemblyInfo.cs
new file mode 100644
index 0000000..7c9594b
--- /dev/null
+++ b/lib/SmartIrc4net/examples/benchmark/AssemblyInfo.cs
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("SmartIrc4net examples/benchmark Bot")]
+[assembly: AssemblyDescription("IRC Bot for developing/testing SmartIrc4net")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("0.1.*")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
diff --git a/lib/SmartIrc4net/examples/benchmark/benchmark.cs b/lib/SmartIrc4net/examples/benchmark/benchmark.cs
new file mode 100644
index 0000000..38e8d3d
--- /dev/null
+++ b/lib/SmartIrc4net/examples/benchmark/benchmark.cs
@@ -0,0 +1,136 @@
+/**
+ * $Id$
+ * $Revision$
+ * $Author$
+ * $Date$
+ *
+ * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
+ * This is a benchmark test client for the library.
+ *
+ * Copyright (c) 2003-2004 Mirco Bauer <meebey at meebey.net> <http://www.meebey.net>
+ * 
+ * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+ 
+using System;
+using System.IO;
+using System.Threading;
+using System.Net.Sockets;
+using Meebey.SmartIrc4net;
+
+public class Benchmark
+{
+    const string SERVER   = "irc.freenode.net";
+    //const string SERVER   = "irc.freenet.de";
+    //const string SERVER   = "10.1.0.101";
+    const int    PORT     = 6667;
+    const string NICK     = "SmartIrcB";
+    const string REALNAME = "SmartIrc4net Benchmark Bot";
+    const string CHANNEL  = "#C#";
+    
+    public static void Main(string[] args)
+    {
+        Thread.Sleep(5000);
+
+        DateTime start, end;
+
+        start = DateTime.UtcNow;
+        TcpClientList();
+        end = DateTime.UtcNow;
+        Console.WriteLine("TcpClientList() took "+end.Subtract(start).TotalSeconds+" sec");
+        Thread.Sleep(5000);
+        
+        start = DateTime.UtcNow;
+        IrcConnectionList();
+        end = DateTime.UtcNow;
+        Console.WriteLine("IrcConnectionList() took "+end.Subtract(start).TotalSeconds+" sec");
+        Thread.Sleep(5000);
+        
+        start = DateTime.UtcNow;
+        IrcClientList();
+        end = DateTime.UtcNow;
+        Console.WriteLine("IrcClientList() took "+end.Subtract(start).TotalSeconds+" sec");
+    }
+    
+    public static void TcpClientList()
+    {
+        TcpClient tc = new TcpClient(SERVER, PORT);
+        StreamReader sr = new StreamReader(tc.GetStream());
+        StreamWriter sw = new StreamWriter(tc.GetStream());
+        sw.Write(Rfc2812.Nick(NICK)+"\r\n");
+        sw.Write(Rfc2812.User(NICK, 0, REALNAME)+"\r\n");
+        sw.Flush();
+        
+        string   line;
+        string[] linear;
+        while (true) {
+            line = sr.ReadLine();
+            if (line != null) {
+                linear = line.Split(new char[] {' '});
+                if (linear.Length >= 2 && linear[1] == "001") {
+                    sw.Write(Rfc2812.List(CHANNEL)+"\r\n");
+                    sw.Flush();
+                }
+                if (linear.Length >= 5 && linear[1] == "322") {
+                    Console.WriteLine("On the IRC channel "+CHANNEL+" are "+linear[4]+" users");
+                    sr.Close();
+                    sw.Close();
+                    tc.Close();
+                    break;
+                }
+            }
+        }
+    }
+    
+    public static void IrcClientList()
+    {
+        IrcClient irc = new IrcClient();
+        irc.OnRawMessage += new IrcEventHandler(IrcClientListCallback);
+        irc.Connect(SERVER, PORT);
+        irc.Login(NICK, REALNAME);
+        irc.RfcList(CHANNEL);
+        irc.Listen();
+    }
+    
+    public static void IrcClientListCallback(object sender, IrcEventArgs e)
+    {
+        if (e.Data.ReplyCode == ReplyCode.List) {
+            Console.WriteLine("On the IRC channel "+CHANNEL+" are "+e.Data.RawMessageArray[4]+" users");
+            e.Data.Irc.Disconnect();
+        }
+    }
+    
+    public static void IrcConnectionList()
+    {
+        IrcConnection irc = new IrcConnection();
+        irc.OnReadLine += new ReadLineEventHandler(IrcConnectionListCallback);
+        irc.Connect(SERVER, PORT);
+        irc.WriteLine(Rfc2812.Nick(NICK), Priority.Critical);
+        irc.WriteLine(Rfc2812.User(NICK, 0, REALNAME), Priority.Critical);
+        irc.WriteLine(Rfc2812.List(CHANNEL));
+        irc.Listen();
+    }
+    
+    public static void IrcConnectionListCallback(object sender, ReadLineEventArgs e)
+    {
+        string[] linear = e.Line.Split(new char[] {' '});
+        if (linear.Length >= 5 && linear[1] == "322") {
+            Console.WriteLine("On the IRC channel "+CHANNEL+" are "+linear[4]+" users");
+            ((IrcConnection)sender).Disconnect();
+        }
+    }
+}
diff --git a/lib/SmartIrc4net/examples/stresstest/AssemblyInfo.cs b/lib/SmartIrc4net/examples/stresstest/AssemblyInfo.cs
new file mode 100644
index 0000000..8deb5e9
--- /dev/null
+++ b/lib/SmartIrc4net/examples/stresstest/AssemblyInfo.cs
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("SmartIrc4net examples/stresstest Bot")]
+[assembly: AssemblyDescription("IRC Bot for developing/testing SmartIrc4net")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("0.1.*")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
diff --git a/lib/SmartIrc4net/examples/stresstest/stresstest.cs b/lib/SmartIrc4net/examples/stresstest/stresstest.cs
new file mode 100644
index 0000000..1df29ee
--- /dev/null
+++ b/lib/SmartIrc4net/examples/stresstest/stresstest.cs
@@ -0,0 +1,155 @@
+/**
+ * $Id$
+ * $Revision$
+ * $Author$
+ * $Date$
+ *
+ * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
+ * This is a simple test client for the library.
+ *
+ * Copyright (c) 2003-2004 Mirco Bauer <meebey at meebey.net> <http://www.meebey.net>
+ * 
+ * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+using System;
+using System.Collections;
+using System.Threading;
+using Meebey.SmartIrc4net;
+
+public class StressTest
+{
+    // make an instance of the high-level API
+    public static IrcClient irc = new IrcClient();
+
+    // this method we will use to analyse queries (also known as private messages)
+    public static void OnQueryMessage(object sender, IrcEventArgs e)
+    {
+        switch (e.Data.MessageArray[0]) {
+            // debug stuff
+            case "dump_channel":
+                string requested_channel = e.Data.MessageArray[1];
+                // getting the channel (via channel sync feature)
+                Channel channel = irc.GetChannel(requested_channel);
+                
+                // here we send messages
+                irc.SendMessage(SendType.Message, e.Data.Nick, "<channel '"+requested_channel+"'>");
+                
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Name: '"+channel.Name+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Topic: '"+channel.Topic+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Mode: '"+channel.Mode+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Key: '"+channel.Key+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "UserLimit: '"+channel.UserLimit+"'");
+                
+                // here we go through all users of the channel and show their
+                // hashtable key and nickname 
+                string nickname_list = "";
+                nickname_list += "Users: ";
+                IDictionaryEnumerator it = channel.Users.GetEnumerator();
+                while(it.MoveNext()) {
+                    string      key         = (string)it.Key;
+                    ChannelUser channeluser = (ChannelUser)it.Value;
+                    nickname_list += "(";
+                    if (channeluser.IsOp) {
+                        nickname_list += "@";
+                    }
+                    if (channeluser.IsVoice) {
+                        nickname_list += "+";
+                    }
+                    nickname_list += ")"+key+" => "+channeluser.Nick+", ";
+                }
+                irc.SendMessage(SendType.Message, e.Data.Nick, nickname_list);
+
+                irc.SendMessage(SendType.Message, e.Data.Nick, "</channel>");
+            break;
+            case "gc":
+                GC.Collect();
+            break;
+            // typical commands
+            case "join":
+                irc.RfcJoin(e.Data.MessageArray[1]);
+            break;
+            case "part":
+                irc.RfcPart(e.Data.MessageArray[1]);
+            break;
+            case "die":
+                Exit();
+            break;
+        }
+    }
+
+    public static void OnError(object sender, ErrorEventArgs e)
+    {
+        System.Console.WriteLine("Error: "+e.ErrorMessage);
+        Exit();
+    }
+    
+    public static void OnRawMessage(object sender, IrcEventArgs e)
+    {
+        System.Console.WriteLine("Received: "+e.Data.RawMessage);
+    }
+    
+    public static void Main(string[] args)
+    {
+        Thread.CurrentThread.Name = "Main";
+        irc.SendDelay = 400;
+        irc.ActiveChannelSyncing = true;
+        
+        irc.OnQueryMessage += new IrcEventHandler(OnQueryMessage);
+        irc.OnError += new ErrorEventHandler(OnError);
+        irc.OnRawMessage += new IrcEventHandler(OnRawMessage);
+
+        string[] serverlist;
+        // the server we want to connect to, could be also a simple string
+        serverlist = new string[] {"irc.freshirc.com"};
+        int port = 6667;
+	string channel = "#OCS";
+        try {
+            irc.Connect(serverlist, port);
+        } catch (ConnectionException e) {
+            System.Console.WriteLine("couldn't connect! Reason: "+e.Message);
+            Exit();
+        }
+        
+        try {
+            irc.Login("SmartIRC", "SmartIrc4net Test Bot");
+            irc.RfcJoin(channel);
+            new Thread(new ThreadStart(ReadCommands)).Start();
+            irc.Listen();
+            irc.Disconnect();
+        } catch (ConnectionException) {
+            Exit();
+        } catch (Exception e) {
+            System.Console.WriteLine("Error occurred! Message: "+e.Message);
+            System.Console.WriteLine("Exception: "+e.StackTrace);
+            Exit();
+        }
+    }
+    
+    public static void ReadCommands()
+    {
+        while (true) {
+            irc.WriteLine(System.Console.ReadLine());
+        }
+    }
+    
+    public static void Exit()
+    {
+        System.Console.WriteLine("Exiting...");
+        System.Environment.Exit(0);
+    }
+}
diff --git a/lib/SmartIrc4net/examples/test/AssemblyInfo.cs b/lib/SmartIrc4net/examples/test/AssemblyInfo.cs
new file mode 100644
index 0000000..ec1d697
--- /dev/null
+++ b/lib/SmartIrc4net/examples/test/AssemblyInfo.cs
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("SmartIrc4net examples/test Bot")]
+[assembly: AssemblyDescription("IRC Bot for developing/testing SmartIrc4net")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("0.1.*")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
diff --git a/lib/SmartIrc4net/examples/test/Test.cs b/lib/SmartIrc4net/examples/test/Test.cs
new file mode 100644
index 0000000..eee0849
--- /dev/null
+++ b/lib/SmartIrc4net/examples/test/Test.cs
@@ -0,0 +1,222 @@
+/**
+ * $Id$
+ * $Revision$
+ * $Author$
+ * $Date$
+ *
+ * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
+ * This is a simple test client for the library.
+ *
+ * Copyright (c) 2003-2004 Mirco Bauer <meebey at meebey.net> <http://www.meebey.net>
+ * 
+ * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+using System;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+using Meebey.SmartIrc4net;
+
+// This is an VERY basic example how your IRC application could be written
+// its mainly for showing how to use the API, this program just connects sends
+// a few message to a channel and waits for commands on the console
+// (raw RFC commands though! it's later explained).
+// There are also a few commands the IRC bot/client allows via private message.
+public class Test
+{
+    // make an instance of the high-level API
+    public static IrcClient irc = new IrcClient();
+
+    // this method we will use to analyse queries (also known as private messages)
+    public static void OnQueryMessage(object sender, IrcEventArgs e)
+    {
+        switch (e.Data.MessageArray[0]) {
+            // debug stuff
+            case "dump_channel":
+                string requested_channel = e.Data.MessageArray[1];
+                // getting the channel (via channel sync feature)
+                Channel channel = irc.GetChannel(requested_channel);
+                
+                // here we send messages
+                irc.SendMessage(SendType.Message, e.Data.Nick, "<channel '"+requested_channel+"'>");
+                
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Name: '"+channel.Name+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Topic: '"+channel.Topic+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Mode: '"+channel.Mode+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Key: '"+channel.Key+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "UserLimit: '"+channel.UserLimit+"'");
+                
+                // here we go through all users of the channel and show their
+                // hashtable key and nickname 
+                string nickname_list = "";
+                nickname_list += "Users: ";
+                foreach (DictionaryEntry de in channel.Users) {
+                    string      key         = (string)de.Key;
+                    ChannelUser channeluser = (ChannelUser)de.Value;
+                    nickname_list += "(";
+                    if (channeluser.IsOp) {
+                        nickname_list += "@";
+                    }
+                    if (channeluser.IsVoice) {
+                        nickname_list += "+";
+                    }
+                    nickname_list += ")"+key+" => "+channeluser.Nick+", ";
+                }
+                irc.SendMessage(SendType.Message, e.Data.Nick, nickname_list);
+
+                irc.SendMessage(SendType.Message, e.Data.Nick, "</channel>");
+            break;
+            case "gc":
+                GC.Collect();
+            break;
+            // typical commands
+            case "join":
+                irc.RfcJoin(e.Data.MessageArray[1]);
+            break;
+            case "part":
+                irc.RfcPart(e.Data.MessageArray[1]);
+            break;
+            case "die":
+                Exit();
+            break;
+        }
+    }
+
+    // this method handles when we receive "ERROR" from the IRC server
+    public static void OnError(object sender, ErrorEventArgs e)
+    {
+        System.Console.WriteLine("Error: "+e.ErrorMessage);
+        Exit();
+    }
+    
+    // this method will get all IRC messages
+    public static void OnRawMessage(object sender, IrcEventArgs e)
+    {
+        System.Console.WriteLine("Received: "+e.Data.RawMessage);
+    }
+    
+    public static void Main(string[] args)
+    {
+        Thread.CurrentThread.Name = "Main";
+        
+        // UTF-8 test
+        irc.Encoding = System.Text.Encoding.UTF8;
+        
+        // wait time between messages, we can set this lower on own irc servers
+        irc.SendDelay = 200;
+        
+        // we use channel sync, means we can use irc.GetChannel() and so on
+        irc.ActiveChannelSyncing = true;
+        
+        // here we connect the events of the API to our written methods
+        // most have own event handler types, because they ship different data
+        irc.OnQueryMessage += new IrcEventHandler(OnQueryMessage);
+        irc.OnError += new ErrorEventHandler(OnError);
+        irc.OnRawMessage += new IrcEventHandler(OnRawMessage);
+
+        string[] serverlist;
+        // the server we want to connect to, could be also a simple string
+        serverlist = new string[] {"irc.freenode.org"};
+        int port = 6667;
+        string channel = "#smartirc-test";
+        try {
+            // here we try to connect to the server and exceptions get handled
+            irc.Connect(serverlist, port);
+        } catch (ConnectionException e) {
+            // something went wrong, the reason will be shown
+            System.Console.WriteLine("couldn't connect! Reason: "+e.Message);
+            Exit();
+        }
+        
+        try {
+            // here we logon and register our nickname and so on 
+            irc.Login("SmartIRC", "SmartIrc4net Test Bot");
+            // join the channel
+            irc.RfcJoin(channel);
+            
+            for (int i = 0; i < 3; i++) {
+                // here we send just 3 different types of messages, 3 times for
+                // testing the delay and flood protection (messagebuffer work)
+                irc.SendMessage(SendType.Message, channel, "test message ("+i.ToString()+")");
+                irc.SendMessage(SendType.Action, channel, "thinks this is cool ("+i.ToString()+")");
+                irc.SendMessage(SendType.Notice, channel, "SmartIrc4net rocks ("+i.ToString()+")");
+            }
+            
+            // spawn a new thread to read the stdin of the console, this we use
+            // for reading IRC commands from the keyboard while the IRC connection
+            // stays in its own thread
+            new Thread(new ThreadStart(ReadCommands)).Start();
+            
+            // here we tell the IRC API to go into a receive mode, all events
+            // will be triggered by _this_ thread (main thread in this case)
+            // Listen() blocks by default, you can also use ListenOnce() if you
+            // need that does one IRC operation and then returns, so you need then 
+            // an own loop 
+            irc.Listen();
+            
+            // when Listen() returns our IRC session is over, to be sure we call
+            // disconnect manually
+            irc.Disconnect();
+        } catch (ConnectionException) {
+            // this exception is handled because Disconnect() can throw a not
+            // connected exception
+            Exit();
+        } catch (Exception e) {
+            // this should not happen by just in case we handle it nicely
+            System.Console.WriteLine("Error occurred! Message: "+e.Message);
+            System.Console.WriteLine("Exception: "+e.StackTrace);
+            Exit();
+        }
+    }
+    
+    public static void ReadCommands()
+    {
+        // here we read the commands from the stdin and send it to the IRC API
+        // WARNING, it uses WriteLine() means you need to enter RFC commands
+        // like "JOIN #test" and then "PRIVMSG #test :hello to you"
+        while (true) {
+            string cmd = System.Console.ReadLine();
+            if (cmd.StartsWith("/list")) {
+                int pos = cmd.IndexOf(" ");
+                string channel = null;
+                if (pos != -1) {
+                    channel = cmd.Substring(pos + 1);
+                }
+                
+                IList<ChannelInfo> channelInfos = irc.GetChannelList(channel);
+                Console.WriteLine("channel count: {0}", channelInfos.Count);
+                foreach (ChannelInfo channelInfo in channelInfos) {
+                    Console.WriteLine("channel: {0} user count: {1} topic: {2}",
+                                      channelInfo.Channel,
+                                      channelInfo.UserCount,
+                                      channelInfo.Topic);
+                }
+            } else {
+                irc.WriteLine(cmd);
+            }
+        }
+    }
+    
+    public static void Exit()
+    {
+        // we are done, lets exit...
+        System.Console.WriteLine("Exiting...");
+        System.Environment.Exit(0);
+    }
+}
diff --git a/lib/SmartIrc4net/expansions.m4 b/lib/SmartIrc4net/expansions.m4
deleted file mode 100644
index ba62356..0000000
--- a/lib/SmartIrc4net/expansions.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-AC_DEFUN([SHAMROCK_EXPAND_LIBDIR],
-[	
-	expanded_libdir=`(
-		case $prefix in 
-			NONE) prefix=$ac_default_prefix ;; 
-			*) ;; 
-		esac
-		case $exec_prefix in 
-			NONE) exec_prefix=$prefix ;; 
-			*) ;; 
-		esac
-		eval echo $libdir
-	)`
-	AC_SUBST(expanded_libdir)
-])
-
-AC_DEFUN([SHAMROCK_EXPAND_BINDIR],
-[
-	expanded_bindir=`(
-		case $prefix in 
-			NONE) prefix=$ac_default_prefix ;; 
-			*) ;; 
-		esac
-		case $exec_prefix in 
-			NONE) exec_prefix=$prefix ;; 
-			*) ;; 
-		esac
-		eval echo $bindir
-	)`
-	AC_SUBST(expanded_bindir)
-])
-
-AC_DEFUN([SHAMROCK_EXPAND_DATADIR],
-[
-	case $prefix in
-		NONE) prefix=$ac_default_prefix ;;
-		*) ;;
-	esac
-
-	case $exec_prefix in
-		NONE) exec_prefix=$prefix ;;
-		*) ;;
-	esac
-
-	expanded_datadir=`(eval echo $datadir)`
-	expanded_datadir=`(eval echo $expanded_datadir)`
-
-	AC_SUBST(expanded_datadir)
-])
-
diff --git a/lib/SmartIrc4net/mono.m4 b/lib/SmartIrc4net/mono.m4
deleted file mode 100644
index 641eee2..0000000
--- a/lib/SmartIrc4net/mono.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-AC_DEFUN([SHAMROCK_FIND_MONO_1_0_COMPILER],
-[
-	SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, mcs)
-])
-
-AC_DEFUN([SHAMROCK_FIND_MONO_2_0_COMPILER],
-[
-	SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, gmcs)
-])
-
-AC_DEFUN([SHAMROCK_FIND_MONO_RUNTIME],
-[
-	SHAMROCK_FIND_PROGRAM_OR_BAIL(MONO, mono)
-])
-
-AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE],
-[
-	PKG_CHECK_MODULES(MONO_MODULE, mono >= $1)
-])
-
-AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE_NOBAIL],
-[
-	PKG_CHECK_MODULES(MONO_MODULE, mono >= $1, 
-		HAVE_MONO_MODULE=yes, HAVE_MONO_MODULE=no)
-	AC_SUBST(HAVE_MONO_MODULE)
-])
-
-AC_DEFUN([_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES],
-[
-	for asm in $(echo "$*" | cut -d, -f2- | sed 's/\,/ /g')
-	do
-		AC_MSG_CHECKING([for Mono $1 GAC for $asm.dll])
-		if test \
-			-e "$($PKG_CONFIG --variable=libdir mono)/mono/$1/$asm.dll" -o \
-			-e "$($PKG_CONFIG --variable=prefix mono)/lib/mono/$1/$asm.dll"; \
-			then \
-			AC_MSG_RESULT([found])
-		else
-			AC_MSG_RESULT([not found])
-			AC_MSG_ERROR([missing reqired Mono $1 assembly: $asm.dll])
-		fi
-	done
-])
-
-AC_DEFUN([SHAMROCK_CHECK_MONO_1_0_GAC_ASSEMBLIES],
-[
-	_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(1.0, $*)
-])
-
-AC_DEFUN([SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES],
-[
-	_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(2.0, $*)
-])
-
-
diff --git a/lib/SmartIrc4net/programs.m4 b/lib/SmartIrc4net/programs.m4
deleted file mode 100644
index 8273868..0000000
--- a/lib/SmartIrc4net/programs.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-AC_DEFUN([SHAMROCK_FIND_PROGRAM],
-[
-	AC_PATH_PROG($1, $2, $3)
-	AC_SUBST($1)
-])
-
-AC_DEFUN([SHAMROCK_FIND_PROGRAM_OR_BAIL],
-[
-	SHAMROCK_FIND_PROGRAM($1, $2, no)
-	if test "x$1" = "xno"; then
-		AC_MSG_ERROR([You need to install '$2'])
-	fi
-])
-
-
diff --git a/lib/SmartIrc4net/smartirc4net.pc.in b/lib/SmartIrc4net/smartirc4net.pc.in
deleted file mode 100644
index fdcd4f7..0000000
--- a/lib/SmartIrc4net/smartirc4net.pc.in
+++ /dev/null
@@ -1,8 +0,0 @@
-prefix=@prefix@
-exec_prefix=${prefix}
-libdir=@libdir@
-
-Name: @ASSEMBLY_TITLE@
-Description: @ASSEMBLY_DESCRIPTION@
-Version: @ASSEMBLY_VERSION@
-Libs: -r:${libdir}/@PACKAGE_NAME@/@ASSEMBLY_NAME at .dll
diff --git a/lib/SmartIrc4net/smartirc4net.snk b/lib/SmartIrc4net/smartirc4net.snk
deleted file mode 100644
index f9aef3f..0000000
Binary files a/lib/SmartIrc4net/smartirc4net.snk and /dev/null differ
diff --git a/lib/SmartIrc4net/src/AssemblyInfo.cs.in b/lib/SmartIrc4net/src/AssemblyInfo.cs.in
deleted file mode 100644
index 7207b03..0000000
--- a/lib/SmartIrc4net/src/AssemblyInfo.cs.in
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $Id$
- * $URL$
- * $Rev$
- * $Author$
- * $Date$
- *
- * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
- *
- * Copyright (c) 2003-2005 Mirco Bauer <meebey at meebey.net> <http://www.meebey.net>
- * 
- * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: CLSCompliant(true)]
-[assembly: ComVisible(false)]
-
-[assembly: AssemblyTitle("@ASSEMBLY_TITLE@")]
-[assembly: AssemblyDescription("@ASSEMBLY_DESCRIPTION@")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("qNETp")]
-[assembly: AssemblyProduct("SmartIrc4net")]
-[assembly: AssemblyCopyright("2003-2008 (C) Mirco Bauer <meebey at meebey.net>")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-#if DELAY_SIGN
-[assembly: AssemblyDelaySign(true)]
-[assembly: AssemblyKeyFile("../SmartIrc4net-pub.snk")]
-#else
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-#endif
diff --git a/lib/SmartIrc4net/src/IrcClient/Channel.cs b/lib/SmartIrc4net/src/IrcClient/Channel.cs
index 5c27b2d..0ad08c1 100644
--- a/lib/SmartIrc4net/src/IrcClient/Channel.cs
+++ b/lib/SmartIrc4net/src/IrcClient/Channel.cs
@@ -28,6 +28,7 @@
 
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Collections.Specialized;
 
 namespace Meebey.SmartIrc4net
@@ -44,6 +45,8 @@ namespace Meebey.SmartIrc4net
         private Hashtable        _Ops       = Hashtable.Synchronized(new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer()));
         private Hashtable        _Voices    = Hashtable.Synchronized(new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer()));
         private StringCollection _Bans      = new StringCollection();
+        private List<string>     _BanExcepts = new List<string>();
+        private List<string>     _InviteExcepts = new List<string>();
         private string           _Topic     = String.Empty;
         private int              _UserLimit;
         private string           _Mode      = String.Empty;
@@ -162,6 +165,18 @@ namespace Meebey.SmartIrc4net
             }
         }
 
+        public List<string> BanExceptions {
+            get {
+                return _BanExcepts;
+            }
+        }
+
+        public List<string> InviteExceptions {
+            get {
+                return _InviteExcepts;
+            }
+        }
+
         /// <summary>
         /// 
         /// </summary>
diff --git a/lib/SmartIrc4net/src/IrcClient/Delegates.cs b/lib/SmartIrc4net/src/IrcClient/Delegates.cs
index 995a311..576de09 100644
--- a/lib/SmartIrc4net/src/IrcClient/Delegates.cs
+++ b/lib/SmartIrc4net/src/IrcClient/Delegates.cs
@@ -59,4 +59,5 @@ namespace Meebey.SmartIrc4net
     public delegate void WhoEventHandler(object sender, WhoEventArgs e);
     public delegate void MotdEventHandler(object sender, MotdEventArgs e);
     public delegate void PongEventHandler(object sender, PongEventArgs e);
+    public delegate void BounceEventHandler(object sender, BounceEventArgs e);
 }
diff --git a/lib/SmartIrc4net/src/IrcClient/EventArgs.cs b/lib/SmartIrc4net/src/IrcClient/EventArgs.cs
index da7f9e8..15fe853 100644
--- a/lib/SmartIrc4net/src/IrcClient/EventArgs.cs
+++ b/lib/SmartIrc4net/src/IrcClient/EventArgs.cs
@@ -759,4 +759,24 @@ namespace Meebey.SmartIrc4net
         }
     }
 
+    public class BounceEventArgs : IrcEventArgs
+    {
+        /// <summary>
+        /// Hostname/address of the server to which the user is being redirected.
+        /// May be null if not successfully parsed from the message.
+        /// </summary>
+        public string Server { get; private set; }
+
+        /// <summary>
+        /// Port of the server to which the user is being redirected.
+        /// May be -1 if not successfully parsed from the message.
+        /// </summary>
+        public int Port { get; private set; }
+
+        internal BounceEventArgs(IrcMessageData data, string server, int port) : base(data)
+        {
+            Server = server;
+            Port = Port;
+        }
+    }
 }
diff --git a/lib/SmartIrc4net/src/IrcClient/IrcClient.cs b/lib/SmartIrc4net/src/IrcClient/IrcClient.cs
index 6562ee6..7787ba4 100644
--- a/lib/SmartIrc4net/src/IrcClient/IrcClient.cs
+++ b/lib/SmartIrc4net/src/IrcClient/IrcClient.cs
@@ -78,6 +78,13 @@ namespace Meebey.SmartIrc4net
         private List<BanInfo>    _BanList;
         private Object           _BanListSyncRoot = new Object();
         private AutoResetEvent   _BanListReceivedEvent;
+        private List<BanInfo>    _BanExceptList;
+        private Object           _BanExceptListSyncRoot = new Object();
+        private AutoResetEvent   _BanExceptListReceivedEvent;
+        private List<BanInfo>    _InviteExceptList;
+        private Object           _InviteExceptListSyncRoot = new Object();
+        private AutoResetEvent   _InviteExceptListReceivedEvent;
+        private ServerProperties _ServerProperties = new ServerProperties();
         private static Regex     _ReplyCodeRegex          = new Regex("^:[^ ]+? ([0-9]{3}) .+$", RegexOptions.Compiled);
         private static Regex     _PingRegex               = new Regex("^PING :.*", RegexOptions.Compiled);
         private static Regex     _ErrorRegex              = new Regex("^ERROR :.*", RegexOptions.Compiled);
@@ -94,6 +101,7 @@ namespace Meebey.SmartIrc4net
         private static Regex     _PartRegex               = new Regex("^:.*? PART .*$", RegexOptions.Compiled);
         private static Regex     _ModeRegex               = new Regex("^:.*? MODE (.*) .*$", RegexOptions.Compiled);
         private static Regex     _QuitRegex               = new Regex("^:.*? QUIT :.*$", RegexOptions.Compiled);
+        private static Regex     _BounceMessageRegex      = new Regex("^Try server (.+), port ([0-9]+)$", RegexOptions.Compiled);
 
         public event EventHandler               OnRegistered;
         public event PingEventHandler           OnPing;
@@ -113,6 +121,10 @@ namespace Meebey.SmartIrc4net
         public event InviteEventHandler         OnInvite;
         public event BanEventHandler            OnBan;
         public event UnbanEventHandler          OnUnban;
+        public event BanEventHandler            OnBanException;
+        public event UnbanEventHandler          OnUnBanException;
+        public event BanEventHandler            OnInviteException;
+        public event UnbanEventHandler          OnUnInviteException;
         public event OwnerEventHandler          OnOwner;
         public event DeownerEventHandler        OnDeowner;
         public event ChannelAdminEventHandler   OnChannelAdmin;
@@ -141,6 +153,7 @@ namespace Meebey.SmartIrc4net
         public event IrcEventHandler            OnQueryNotice;
         public event CtcpEventHandler           OnCtcpRequest;
         public event CtcpEventHandler           OnCtcpReply;
+        public event BounceEventHandler         OnBounce;
 
         /// <summary>
         /// Enables/disables the active channel sync feature.
@@ -417,6 +430,15 @@ namespace Meebey.SmartIrc4net
                 return _BanListSyncRoot;
             }
         }
+
+        /// <summary>
+        /// Gets the special functionality supported by this server.
+        /// </summary>
+        public ServerProperties ServerProperties {
+            get {
+                return _ServerProperties;
+            }
+        }
         
         /// <summary>
         /// This class manages the connection server and provides access to all the objects needed to send and receive messages.
@@ -796,6 +818,52 @@ namespace Meebey.SmartIrc4net
             
             return list;
         }
+
+        /// <summary>
+        /// Fetches a fresh ban-exceptions list from the specified channel.
+        /// </summary>
+        public IList<BanInfo> GetBanExceptionList(string channel)
+        {
+            List<BanInfo> list = new List<BanInfo>();
+            if (!_ServerProperties.BanExceptionCharacter.HasValue) {
+                return list;
+            }
+            lock (_BanExceptListSyncRoot) {
+                _BanExceptList = list;
+                _BanExceptListReceivedEvent = new AutoResetEvent(false);
+
+                BanException(channel);
+                _BanExceptListReceivedEvent.WaitOne();
+
+                _BanExceptListReceivedEvent = null;
+                _BanExceptList = null;
+            }
+
+            return list;
+        }
+
+        /// <summary>
+        /// Fetches a fresh invite-exceptions list from the specified channel.
+        /// </summary>
+        public IList<BanInfo> GetInviteExceptionList(string channel)
+        {
+            List<BanInfo> list = new List<BanInfo>();
+            if (!_ServerProperties.InviteExceptionCharacter.HasValue) {
+                return list;
+            }
+            lock (_InviteExceptListSyncRoot) {
+                _InviteExceptList = list;
+                _InviteExceptListReceivedEvent = new AutoResetEvent(false);
+
+                InviteException(channel);
+                _InviteExceptListReceivedEvent.WaitOne();
+
+                _InviteExceptListReceivedEvent = null;
+                _InviteExceptList = null;
+            }
+
+            return list;
+        }
         
         public IrcMessageData MessageParser(string rawline)
         {
@@ -922,6 +990,148 @@ namespace Meebey.SmartIrc4net
 #endif
             return data;
         }
+
+	// ISUPPORT-honoring versions of some IrcCommands methods
+
+        public override void BanException(string channel)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ListChannelMasks("+" + bexchar.Value, channel);
+            } else {
+                base.BanException(channel);
+            }
+        }
+
+        public override void BanException(string channel, string hostmask, Priority priority)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("+" + bexchar.Value, channel, hostmask, priority);
+            } else {
+                base.BanException(channel, hostmask, priority);
+            }
+        }
+
+        public override void BanException(string channel, string hostmask)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("+" + bexchar.Value, channel, hostmask);
+            } else {
+                base.BanException(channel, hostmask);
+            }
+        }
+
+        public override void BanException(string channel, string[] hostmasks)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("+" + bexchar.Value, channel, hostmasks);
+            } else {
+                base.BanException(channel, hostmasks);
+            }
+        }
+
+        public override void UnBanException(string channel, string hostmask, Priority priority)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("-" + bexchar.Value, channel, hostmask, priority);
+            } else {
+                base.UnBanException(channel, hostmask, priority);
+            }
+        }
+
+        public override void UnBanException(string channel, string hostmask)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("-" + bexchar.Value, channel, hostmask);
+            } else {
+                base.UnBanException(channel, hostmask);
+            }
+        }
+
+        public override void UnBanException(string channel, string[] hostmasks)
+        {
+            var bexchar = _ServerProperties.BanExceptionCharacter;
+            if (bexchar.HasValue) {
+                ModifyChannelMasks("-" + bexchar.Value, channel, hostmasks);
+            } else {
+                base.UnBanException(channel, hostmasks);
+            }
+        }
+
+        public override void InviteException(string channel)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ListChannelMasks("+" + iexchar.Value, channel);
+            } else {
+                base.InviteException(channel);
+            }
+        }
+
+        public override void InviteException(string channel, string hostmask, Priority priority)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("+" + iexchar.Value, channel, hostmask, priority);
+            } else {
+                base.InviteException(channel, hostmask, priority);
+            }
+        }
+
+        public override void InviteException(string channel, string hostmask)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("+" + iexchar.Value, channel, hostmask);
+            } else {
+                base.InviteException(channel, hostmask);
+            }
+        }
+
+        public override void InviteException(string channel, string[] hostmasks)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("+" + iexchar.Value, channel, hostmasks);
+            } else {
+                base.InviteException(channel, hostmasks);
+            }
+        }
+
+        public override void UnInviteException(string channel, string hostmask, Priority priority)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("-" + iexchar.Value, channel, hostmask, priority);
+            } else {
+                base.UnInviteException(channel, hostmask, priority);
+            }
+        }
+
+        public override void UnInviteException(string channel, string hostmask)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("-" + iexchar.Value, channel, hostmask);
+            } else {
+                base.UnInviteException(channel, hostmask);
+            }
+        }
+
+        public override void UnInviteException(string channel, string[] hostmasks)
+        {
+            var iexchar = _ServerProperties.InviteExceptionCharacter;
+            if (iexchar.HasValue) {
+                ModifyChannelMasks("-" + iexchar.Value, channel, hostmasks);
+            } else {
+                base.UnInviteException(channel, hostmasks);
+            }
+        }
         
         protected virtual IrcUser CreateIrcUser(string nickname)
         {
@@ -1341,6 +1551,21 @@ namespace Meebey.SmartIrc4net
                     case ReplyCode.ErrorNicknameInUse:
                         _Event_ERR_NICKNAMEINUSE(ircdata);
                         break;
+                    case ReplyCode.InviteList:
+                        _Event_RPL_INVITELIST(ircdata);
+                        break;
+                    case ReplyCode.EndOfInviteList:
+                        _Event_RPL_ENDOFINVITELIST(ircdata);
+                        break;
+                    case ReplyCode.ExceptionList:
+                        _Event_RPL_EXCEPTLIST(ircdata);
+                        break;
+                    case ReplyCode.EndOfExceptionList:
+                        _Event_RPL_ENDOFEXCEPTLIST(ircdata);
+                        break;
+                    case ReplyCode.Bounce:
+                        _Event_RPL_BOUNCE(ircdata);
+                        break;
                 }
             }
             
@@ -1771,6 +1996,70 @@ namespace Meebey.SmartIrc4net
                             }
                         }
                     break;
+                    case 'e':
+                        temp = (string)parametersEnumerator.Current;
+                        parametersEnumerator.MoveNext();
+                        if (add) {
+                            if (ActiveChannelSyncing && channel != null) {
+                                try {
+                                    channel.BanExceptions.Add(temp);
+#if LOG4NET
+                                    Logger.ChannelSyncing.Debug("added ban exception: "+temp+" to: "+ircdata.Channel);
+#endif
+                                } catch (ArgumentException) {
+#if LOG4NET
+                                    Logger.ChannelSyncing.Debug("duplicate ban exception: "+temp+" in: "+ircdata.Channel+" not added");
+#endif
+                                }
+                            }
+                            if (OnBanException != null) {
+                               OnBanException(this, new BanEventArgs(ircdata, ircdata.Channel, ircdata.Nick, temp));
+                            }
+                        }
+                        if (remove) {
+                            if (ActiveChannelSyncing && channel != null) {
+                                channel.BanExceptions.Remove(temp);
+#if LOG4NET
+                                Logger.ChannelSyncing.Debug("removed ban exception: "+temp+" from: "+ircdata.Channel);
+#endif
+                            }
+                            if (OnUnBanException != null) {
+                                OnUnBanException(this, new UnbanEventArgs(ircdata, ircdata.Channel, ircdata.Nick, temp));
+                            }
+                        }
+                    break;
+                    case 'I':
+                        temp = (string)parametersEnumerator.Current;
+                        parametersEnumerator.MoveNext();
+                        if (add) {
+                            if (ActiveChannelSyncing && channel != null) {
+                                try {
+                                    channel.InviteExceptions.Add(temp);
+#if LOG4NET
+                                    Logger.ChannelSyncing.Debug("added invite exception: "+temp+" to: "+ircdata.Channel);
+#endif
+                                } catch (ArgumentException) {
+#if LOG4NET
+                                    Logger.ChannelSyncing.Debug("duplicate invite exception: "+temp+" in: "+ircdata.Channel+" not added");
+#endif
+                                }
+                            }
+                            if (OnInviteException != null) {
+                               OnInviteException(this, new BanEventArgs(ircdata, ircdata.Channel, ircdata.Nick, temp));
+                            }
+                        }
+                        if (remove) {
+                            if (ActiveChannelSyncing && channel != null) {
+                                channel.InviteExceptions.Remove(temp);
+#if LOG4NET
+                                Logger.ChannelSyncing.Debug("removed invite exception: "+temp+" from: "+ircdata.Channel);
+#endif
+                            }
+                            if (OnUnInviteException != null) {
+                                OnUnInviteException(this, new UnbanEventArgs(ircdata, ircdata.Channel, ircdata.Nick, temp));
+                            }
+                        }
+                    break;
                     case 'l':
                         temp = (string)parametersEnumerator.Current;
                         parametersEnumerator.MoveNext();
@@ -1912,6 +2201,14 @@ namespace Meebey.SmartIrc4net
                     RfcMode(channelname);
                     // request wholist
                     RfcWho(channelname);
+                    // request ban exception list
+                    if (_ServerProperties.BanExceptionCharacter.HasValue) {
+                        BanException(channelname);
+                    }
+                    // request invite exception list
+                    if (_ServerProperties.InviteExceptionCharacter.HasValue) {
+                        InviteException(channelname);
+                    }
                     // request banlist
                     Ban(channelname);
                 } else {
@@ -2773,6 +3070,64 @@ namespace Meebey.SmartIrc4net
             }
         }
         
+        private void _Event_RPL_EXCEPTLIST(IrcMessageData ircdata)
+        {
+            string channelname = ircdata.Channel;
+
+            BanInfo info = BanInfo.Parse(ircdata);
+            if (_BanExceptList != null) {
+                _BanExceptList.Add(info);
+            }
+
+            if (ActiveChannelSyncing &&
+                IsJoined(channelname)) {
+                Channel channel = GetChannel(channelname);
+                if (channel.IsSycned) {
+                    return;
+                }
+
+                channel.BanExceptions.Add(info.Mask);
+            }
+        }
+
+        private void _Event_RPL_ENDOFEXCEPTLIST(IrcMessageData ircdata)
+        {
+            string channelname = ircdata.Channel;
+
+            if (_BanExceptListReceivedEvent != null) {
+                _BanExceptListReceivedEvent.Set();
+            }
+        }
+
+        private void _Event_RPL_INVITELIST(IrcMessageData ircdata)
+        {
+            string channelname = ircdata.Channel;
+
+            BanInfo info = BanInfo.Parse(ircdata);
+            if (_InviteExceptList != null) {
+                _InviteExceptList.Add(info);
+            }
+
+            if (ActiveChannelSyncing &&
+                IsJoined(channelname)) {
+                Channel channel = GetChannel(channelname);
+                if (channel.IsSycned) {
+                    return;
+                }
+
+                channel.InviteExceptions.Add(info.Mask);
+            }
+        }
+
+        private void _Event_RPL_ENDOFINVITELIST(IrcMessageData ircdata)
+        {
+            string channelname = ircdata.Channel;
+
+            if (_InviteExceptListReceivedEvent != null) {
+                _InviteExceptListReceivedEvent.Set();
+            }
+        }
+
         // MODE +b might return ERR_NOCHANMODES for mode-less channels (like +chan) 
         private void _Event_ERR_NOCHANMODES(IrcMessageData ircdata)
         {
@@ -2831,6 +3186,50 @@ namespace Meebey.SmartIrc4net
             // change the nickname
             RfcNick(nickname, Priority.Critical);
         }
+
+        private void _Event_RPL_BOUNCE(IrcMessageData ircdata)
+        {
+            // HACK: might be BOUNCE or ISUPPORT; try to detect
+            if (ircdata.Message.StartsWith("Try server ")) {
+                // BOUNCE
+                string host = null;
+                int port = -1;
+                // try to parse out host and port
+                var match = _BounceMessageRegex.Match(ircdata.Message);
+                if (match.Success) {
+                    host = match.Groups [1].Value;
+                    port = int.Parse(match.Groups [2].Value);
+                }
+
+                if (OnBounce != null) {
+                    OnBounce(this, new BounceEventArgs(ircdata, host, port));
+                }
+                return;
+            }
+
+            // ISUPPORT
+            // split the message (0 = server, 1 = code, 2 = my nick)
+            for (int i = 3; i < ircdata.RawMessageArray.Length; ++i) {
+                var msg = ircdata.RawMessageArray [i];
+                if (msg.StartsWith(":")) {
+                    // addendum; we're done
+                    break;
+                }
+
+                var keyval = msg.Split('=');
+                if (keyval.Length == 1) {
+                    // keyword only
+                    _ServerProperties.RawProperties [keyval [0]] = null;
+                } else if (keyval.Length == 2) {
+                    // key and value
+                    _ServerProperties.RawProperties [keyval [0]] = keyval [1];
+                } else {
+#if LOG4NET
+                    Logger.Connection.Warn("confusing ISUPPORT message, ignoring: " + msg);
+#endif
+                }
+            }
+        }
 #endregion
     }
 }
diff --git a/lib/SmartIrc4net/src/IrcClient/ServerProperties.cs b/lib/SmartIrc4net/src/IrcClient/ServerProperties.cs
new file mode 100644
index 0000000..3d181fa
--- /dev/null
+++ b/lib/SmartIrc4net/src/IrcClient/ServerProperties.cs
@@ -0,0 +1,681 @@
+/*
+ * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
+ *
+ * Copyright (c) 2013 Ondřej Hošek <ondra.hosek at gmail.com>
+ *
+ * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+using System;
+using System.Collections.Generic;
+
+namespace Meebey.SmartIrc4net
+{
+    /// <summary>
+    /// This class stores information about the capabilities and idiosyncrasies
+    /// of an IRC server.
+    /// See http://tools.ietf.org/html/draft-hardy-irc-isupport-00 for more
+    /// information.
+    /// </summary>
+    public class ServerProperties
+    {
+        /// <summary>
+        /// Contains the properties as returned by the server. If a property has
+        /// been specified without a value, it is mapped to null.
+        /// </summary>
+        public Dictionary<string, string> RawProperties { get; internal set; }
+
+        /// <summary>
+        /// Stores how the server maps between uppercase and lowercase letters.
+        /// (raw property <c>CASEMAPPING</c>)
+        /// </summary>
+        public CaseMappingType CaseMapping {
+            get {
+                if (!HaveNonNullKey("CASEMAPPING")) {
+                    // default is rfc1459
+                    return CaseMappingType.Rfc1459;
+                }
+
+                switch (RawProperties ["CASEMAPPING"]) {
+                    case "ascii":
+                        return CaseMappingType.Ascii;
+                    case "rfc1459":
+                        return CaseMappingType.Rfc1459;
+                    case "strict-rfc1459":
+                        return CaseMappingType.StrictRfc1459;
+                    default:
+                        return CaseMappingType.Unknown;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Stores how many channels of a given type a user can join.
+        /// A return value of null means none were supplied or the
+        /// value was invalid. The key is a string of channel types
+        /// which count towards the same total; a value of -1 means
+        /// an infinite amount.
+        /// (raw property <c>CHANLIMIT</c>)
+        /// </summary>
+        public IDictionary<string, int> ChannelJoinLimits {
+            get {
+                return ParseStringNumberPairs("CHANLIMIT", null, null, -1);
+            }
+        }
+
+        /// <summary>
+        /// Stores the channel modes which store lists. When a
+        /// change is sent by the server, it will always contain a
+        /// parameter; when sent by a client without a parameter,
+        /// the server will reply with the current list. A return
+        /// value of null means none or invalid ones were supplied.
+        /// (raw property <c>CHANMODES</c>, first value)
+        /// </summary>
+        public string ListChannelModes {
+            get {
+                var splitmodes = SplitChannelModes;
+                if (splitmodes == null) {
+                    return null;
+                }
+                return splitmodes [0];
+            }
+        }
+
+        /// <summary>
+        /// Stores the channel modes which store a parameter. This
+        /// parameter must be provided both when adding and when
+        /// removing the mode.
+        /// (raw property <c>CHANMODES</c>, second value)
+        /// </summary>
+        public string ParametricChannelModes {
+            get {
+                var splitmodes = SplitChannelModes;
+                if (splitmodes == null) {
+                    return null;
+                }
+                return splitmodes [1];
+            }
+        }
+
+        /// <summary>
+        /// Stores the channel modes which store a parameter. This
+        /// parameter must only be provided when adding the value.
+        /// (raw property <c>CHANMODES</c>, third value)
+        /// </summary>
+        public string SetParametricChannelModes {
+            get {
+                var splitmodes = SplitChannelModes;
+                if (splitmodes == null) {
+                    return null;
+                }
+                return splitmodes [2];
+            }
+        }
+
+        /// <summary>
+        /// Stores the channel modes which don't store a parameter.
+        /// (raw property <c>CHANMODES</c>, fourth value)
+        /// </summary>
+        public string ParameterlessChannelModes {
+            get {
+                var splitmodes = SplitChannelModes;
+                if (splitmodes == null) {
+                    return null;
+                }
+                return splitmodes [3];
+            }
+        }
+
+        /// <summary>
+        /// Stores the maximum length of a channel name. -1 means no limit.
+        /// (raw property <c>CHANNELLEN</c>)
+        /// </summary>
+        public int ChannelNameLength {
+            get {
+                // defaults as specified by RFC1459
+                int? len = ParseNumber("CHANNELLEN", 200, 200);
+                return len ?? -1;
+            }
+        }
+
+        /// <summary>
+        /// Stores the types of channels supported by the server.
+        /// An empty string means no channels are supported (!).
+        /// (raw property <c>CHANTYPES</c>)
+        /// </summary>
+        public char[] ChannelTypes {
+            get {
+                if (!HaveNonNullKey("CHANTYPES")) {
+                    // sane default
+                    return "#&".ToCharArray();
+                }
+
+                return RawProperties ["CHANTYPES"].ToCharArray();
+            }
+        }
+
+        /// <summary>
+        /// Stores whether the server supports the CNOTICE command,
+        /// which allows users with a specific channel privilege to
+        /// send a notice to another participant in that channel
+        /// without some of the restrictions that the sever may have
+        /// placed on NOTICE.
+        /// (raw property <c>CNOTICE</c>)
+        /// </summary>
+        public bool SupportsChannelParticipantNotices {
+            get {
+                return RawProperties.ContainsKey("CNOTICE");
+            }
+        }
+
+        /// <summary>
+        /// Stores whether the server supports the CPRIVMSG command,
+        /// which allows users with a specific channel privilege to
+        /// send a message to another participant in that channel
+        /// without some of the restrictions that the sever may have
+        /// placed on PRIVMSG.
+        /// (raw property <c>CPRIVMSG</c>)
+        /// </summary>
+        public bool SupportsChannelParticipantPrivMsgs {
+            get {
+                return RawProperties.ContainsKey("CPRIVMSG");
+            }
+        }
+
+        /// <summary>
+        /// Stores available extensions to the LIST command.
+        /// (raw property <c>ELIST</c>)
+        /// </summary>
+        public ListExtensions ListExtensions {
+            get {
+                if (!HaveNonNullKey("ELIST")) {
+                    return ListExtensions.None;
+                }
+
+                var eliststr = RawProperties ["ELIST"];
+                var exts = ListExtensions.None;
+                foreach (char e in eliststr.ToUpperInvariant()) {
+                    switch (e) {
+                        case 'C':
+                            exts |= ListExtensions.CreationTime;
+                            break;
+                        case 'M':
+                            exts |= ListExtensions.ContainsParticipantWithMask;
+                            break;
+                        case 'N':
+                            exts |= ListExtensions.DoesNotContainParticipantWithMask;
+                            break;
+                        case 'T':
+                            exts |= ListExtensions.TopicAge;
+                            break;
+                        case 'U':
+                            exts |= ListExtensions.ParticipantCount;
+                            break;
+                    }
+                }
+
+                return exts;
+            }
+        }
+
+        /// <summary>
+        /// Returns what channel mode character is used by the
+        /// server to signify ban exceptions. null means the server
+        /// does not support ban exceptions.
+        /// (raw property <c>EXCEPTS</c>)
+        /// </summary>
+        public char? BanExceptionCharacter {
+            get {
+                if (!RawProperties.ContainsKey("EXCEPTS")) {
+                    return null;
+                }
+
+                var exstr = RawProperties ["EXCEPTS"];
+                if (exstr == null) {
+                    // default: +e
+                    return 'e';
+                } else if (exstr.Length != 1) {
+                    // invalid; assume lack of support
+                    return null;
+                }
+                return exstr [0];
+            }
+        }
+
+        /// <summary>
+        /// Returns what channel mode character is used by the
+        /// server to signify invite exceptions. null means the server
+        /// does not support ban exceptions.
+        /// (raw property <c>INVEX</c>)
+        /// </summary>
+        public char? InviteExceptionCharacter {
+            get {
+                if (!RawProperties.ContainsKey("INVEX")) {
+                    return null;
+                }
+
+                var exstr = RawProperties ["INVEX"];
+                if (exstr == null) {
+                    // default: +I
+                    return 'I';
+                } else if (exstr.Length != 1) {
+                    // invalid; assume lack of support
+                    return null;
+                }
+                return exstr [0];
+            }
+        }
+
+        /// <summary>
+        /// Returns how long a kick message supplied by the client
+        /// may be.
+        /// (raw property <c>KICKLEN</c>)
+        /// </summary>
+        public int? KickMessageLength {
+            get {
+                return ParseNumber("KICKLEN", null, null);
+            }
+        }
+
+        /// <summary>
+        /// Stores how many list channel modes (see ListChannelModes)
+        /// of a given type a user can set on a channel. (Note that
+        /// the server may always return more.) A return value of null
+        /// means none were supplied or the value was invalid. The key
+        /// is a string of list mode characters which count towards the
+        /// same total; a value of -1 means an infinite amount.
+        /// (raw property <c>MAXLIST</c>)
+        /// </summary>
+        public IDictionary<string, int> ListModeLimits {
+            get {
+                return ParseStringNumberPairs("MAXLIST", null, null, -1);
+            }
+        }
+
+        /// <summary>
+        /// Stores how many non-parameterless (list, parametric or
+        /// set-parametric) modes can be set using a single MODE call.
+        /// A return value of null means an invalid value has been
+        /// supplied; a return value of -1 means a theoretically
+        /// unlimited number of simultaneous mode sets.
+        /// (raw property <c>MODES</c>)
+        /// </summary>
+        public int? MaxParametricModeSets {
+            get {
+                // 3 if not set, infinity if value-less
+                return ParseNumber("MODES", 3, -1);
+            }
+        }
+
+        /// <summary>
+        /// Stores the display name of the network the IRC
+        /// server is participating in. A return value of null
+        /// means the server is not participating in an IRC network.
+        /// (raw property <c>NETWORK</c>)
+        /// </summary>
+        public string NetworkName {
+            get {
+                if (!HaveNonNullKey("NETWORK")) {
+                    return null;
+                }
+                return RawProperties ["NETWORK"];
+            }
+        }
+
+        /// <summary>
+        /// Stores the maximum length of the nickname the client
+        /// may set. (This has no bearing on the nicknames of
+        /// other clients.) A return value of null means no or an
+        /// invalid value was specified.
+        /// (raw property <c>NICKLEN</c>)
+        /// </summary>
+        public int? MaxNicknameLength {
+            get {
+                // RFC1459 default if unset
+                return ParseNumber("NICKLEN", 9, null);
+            }
+        }
+
+        /// <summary>
+        /// Stores the channel privilege modes (e.g. o for op, v for
+        /// voice) and their corresponding prefixes (e.g. @, +),
+        /// ordered from most to least powerful. A return value of
+        /// null means no or an invalid value was specified.
+        /// (raw property <c>PREFIX</c>)
+        /// </summary>
+        public IList<KeyValuePair<char, char>> ChannelPrivilegeModesPrefixes {
+            get {
+                var modesList = new List<KeyValuePair<char, char>>();
+
+                if (!RawProperties.ContainsKey("PREFIX")) {
+                    // assume voice and ops
+                    modesList.Add(new KeyValuePair<char, char>('o', '@'));
+                    modesList.Add(new KeyValuePair<char, char>('v', '+'));
+                    return modesList;
+                }
+                var prefixstr = RawProperties ["PREFIX"];
+                if (prefixstr == null) {
+                    // supports no modes (!)
+                    return modesList;
+                }
+
+                // format: (modes)prefixes
+                if (prefixstr [0] != '(') {
+                    return null;
+                }
+
+                var modesPrefixes = prefixstr.Substring(1).Split(')');
+                if (modesPrefixes.Length != 2) {
+                    // assuming the pathological case of a ')' mode
+                    // character is impossible, this is invalid
+                    return null;
+                }
+                var modes = modesPrefixes[0];
+                var prefixes = modesPrefixes[1];
+                if (modes.Length != prefixes.Length) {
+                    return null;
+                }
+                for (int i = 0; i < modes.Length; ++i) {
+                    modesList.Add(new KeyValuePair<char, char>(modes [i], prefixes [i]));
+                }
+
+                return modesList;
+            }
+        }
+
+        /// <summary>
+        /// Stores whether using the LIST command is safe, i.e. whether
+        /// the user won't be disconnected because of the large amount
+        /// of traffic generated by LIST.
+        /// (raw property <c>SAFELIST</c>)
+        /// </summary>
+        public bool ListIsSafe {
+            get {
+                return RawProperties.ContainsKey("SAFELIST");
+            }
+        }
+
+        /// <summary>
+        /// Stores the maximum number of entries on a user's silence
+        /// list. A value of 0 means silence lists are not supported
+        /// on this server.
+        /// (raw property <c>SILENCE</c>)
+        /// </summary>
+        public int MaxSilenceListEntries {
+            get {
+                // SILENCE requires a value, but assume 0 if unspecified
+                return ParseNumber("SILENCE", 0, 0) ?? 0;
+            }
+        }
+
+        /// <summary>
+        /// If this property is not set to an empty string, users may
+        /// send NOTICEs to channel participants of a given status;
+        /// e.g. <c>NOTICE @#help :I found a bug.</c> would send the
+        /// message to the operators of #help. The property stores the
+        /// modes that may be the recipients of such messages, e.g.
+        /// "~&@" for "owners, admins and operators only".
+        /// (raw property <c>STATUSMSG</c>)
+        /// </summary>
+        public string StatusNoticeParticipants {
+            get {
+                if (!HaveNonNullKey("STATUSMSG")) {
+                    // STATUSMSG requires a value, but assume none
+                    // if unspecified
+                    return "";
+                }
+                return RawProperties ["STATUSMSG"];
+            }
+        }
+
+        /// <summary>
+        /// Maps the commands which support multiple targets to the
+        /// maximum number of targets each of them supports. A return
+        /// value of null means the server specified an invalid value.
+        /// An entry value of -1 means infinity.
+        /// (raw property <c>TARGMAX</c>)
+        /// </summary>
+        public IDictionary<string, int> MaxCommandTargets {
+            get {
+                var emptydict = new Dictionary<string, int>();
+                return ParseStringNumberPairs("TARGMAX", emptydict, null, -1);
+            }
+        }
+
+        /// <summary>
+        /// Stores the maximum topic length that the client may set
+        /// on a channel on the server. A length of -1 means an
+        /// infinite length.
+        /// (raw property <c>TOPICLEN</c>)
+        /// </summary>
+        public int MaxTopicLength {
+            get {
+                // SILENCE requires a value, but assume infinity
+                // if unspecified or invalid
+                return ParseNumber("TOPICLEN", -1, -1) ?? -1;
+            }
+        }
+
+        /// <summary>
+        /// Stores the maximum number of entries on a user's watch
+        /// list. A value of 0 means watch lists are not supported
+        /// on this server.
+        /// (raw property <c>WATCH</c>)
+        /// </summary>
+        public int MaxWatchListEntries {
+            get {
+                // SILENCE requires a value, but assume 0 if unspecified
+                return ParseNumber("WATCH", 0, 0) ?? 0;
+            }
+        }
+
+        /// <summary>
+        /// Constructs an empty server properties object.
+        /// </summary>
+        internal ServerProperties()
+        {
+            RawProperties = new Dictionary<string, string>();
+        }
+
+        /// <summary>
+        /// Returns whether the property dictionary contains the given key and
+        /// it is not null.
+        /// </summary>
+        /// <param name="key">The key to check.</param>
+        /// <returns>Whether the given key maps to a non-null value in the
+        /// dictionary.</returns>
+        bool HaveNonNullKey(string key)
+        {
+            if (!RawProperties.ContainsKey(key)) {
+                return false;
+            }
+            return RawProperties [key] != null;
+        }
+
+        /// <summary>
+        /// Returns a dictionary from parsing a value in the format
+        /// string:number[,string:number,...]. If the value is unset (i.e. not
+        /// contained in the dictionary), returns unsetDefault. If the value is
+        /// empty (i.e. maps to null), returns emptyDefault.
+        /// defaultValue is used if no number is specified after a colon; if
+        /// defaultValue is null, this method returns null.
+        /// </summary>
+        IDictionary<string, int> ParseStringNumberPairs(string key, IDictionary<string, int> unsetDefault, IDictionary<string, int> emptyDefault, int? defaultValue)
+        {
+            if (!RawProperties.ContainsKey(key)) {
+                return unsetDefault;
+            }
+
+            var valstr = RawProperties [key];
+            if (valstr == null) {
+                return emptyDefault;
+            }
+
+            var valmap = new Dictionary<string, int>();
+            // comma splits the specs
+            foreach (string limit in valstr.Split(',')) {
+                // colon splits keys and value
+                var split = limit.Split(':');
+                if (split.Length != 2) {
+                    // invalid spec; don't trust the whole thing
+                    return null;
+                }
+                var chantypes = split [0];
+                var valuestr = split [1];
+                int value;
+                if (valuestr == string.Empty) {
+                    if (defaultValue.HasValue) {
+                        value = defaultValue.Value;
+                    }
+                    return null;
+                } else if (!int.TryParse(valuestr, out value)) {
+                    // invalid integer; don't trust the whole thing
+                    return null;
+                }
+
+                valmap [chantypes] = value;
+            }
+
+            return valmap;
+        }
+
+        /// <summary>
+        /// Returns a numeric value. If the value is unset (i.e. not contained
+        /// in the dictionary), returns unsetDefault. If the value is empty
+        /// (i.e. maps to null), returns emptyDefault. On parse failure, returns
+        /// null. Otherwise, returns the parsed value.
+        /// </summary>
+        int? ParseNumber(string key, int? unsetDefault, int? emptyDefault)
+        {
+            if (!RawProperties.ContainsKey(key)) {
+                return unsetDefault;
+            }
+            var numstr = RawProperties [key];
+            if (numstr == null) {
+                return emptyDefault;
+            }
+            int num;
+            if (!int.TryParse(numstr, out num)) {
+                return null;
+            }
+            return num;
+        }
+
+        /// <summary>
+        /// Returns the array value of the CHANMODES property, or null if
+        /// it was invalid.
+        /// </summary>
+        string[] SplitChannelModes {
+            get {
+                if (!HaveNonNullKey("CHANMODES")) {
+                    return null;
+                }
+                var splits = RawProperties ["CHANMODES"].Split(',');
+                if (splits.Length != 4) {
+                    return null;
+                }
+                return splits;
+            }
+        }
+    }
+
+    /// <summary>
+    /// Represents how lowercase and uppercase are mapped by the server. This
+    /// information is mostly supplied in the CASEMAPPING server property.
+    /// </summary>
+    public enum CaseMappingType
+    {
+        /// <summary>
+        /// The server provided no or an unknown value.
+        /// </summary>
+        Unknown,
+
+        /// <summary>
+        /// The ASCII characters 0x61 to 0x7a (<c>a</c> to <c>z</c>) are defined
+        /// as the lowercase variants of 0x41 to 0x5a (<c>A</c> to <c>Z</c>).
+        /// The server provided the string <c>ascii</c>.
+        /// </summary>
+        Ascii,
+
+        /// <summary>
+        /// The ASCII characters 0x61 to 0x7e (<c>a</c> to <c>~</c>) are defined
+        /// as the lowercase variants of 0x41 to 0x5e (<c>A</c> to <c>^</c>).
+        /// The server provided the string <c>rfc1459</c>.
+        /// </summary>
+        Rfc1459,
+
+        /// <summary>
+        /// The ASCII characters 0x61 to 0x7d (<c>a</c> to <c>}</c>) are defined
+        /// as the lowercase variants of 0x41 to 0x5d (<c>A</c> to <c>]</c>).
+        /// The server provided the string <c>strict-rfc1459</c>.
+        /// </summary>
+        StrictRfc1459,
+    }
+
+    /// <summary>
+    /// Represents additional functionality available in the LIST command.
+    /// </summary>
+    [Flags]
+    public enum ListExtensions
+    {
+        /// <summary>
+        /// No additional functionality is supported by LIST.
+        /// </summary>
+        None = 0,
+
+        /// <summary>
+        /// Channel lists may be requested by creation time, using the syntax
+        /// <c>C>time</c> to search for channels created after the given time
+        /// and <c>C<time</c> to search for channels created before the given
+        /// time.
+        /// (letter: <c>C</c>)
+        /// </summary>
+        CreationTime = (1 << 0),
+
+        /// <summary>
+        /// Channel lists may be requested by a mask, matching channels in which
+        /// a user matching the given mask is participating.
+        /// (letter: <c>M</c>)
+        /// </summary>
+        ContainsParticipantWithMask = (1 << 1),
+
+        /// <summary>
+        /// Channel lists may be requested by a mask, matching channels in which
+        /// a user matching the given mask is not participating.
+        /// (letter: <c>N</c>)
+        /// </summary>
+        DoesNotContainParticipantWithMask = (1 << 2),
+
+        /// <summary>
+        /// Channel lists may be requested by topic age, using the syntax
+        /// <c>T>time</c> to search for channels with topics last changed after
+        /// the given time and <c>T<time</c> to search for channels with topics
+        /// last changed before the given time.
+        /// (letter: <c>T</c>)
+        /// </summary>
+        TopicAge = (1 << 3),
+
+        /// <summary>
+        /// Channel lists may be requested by number of participants, using the
+        /// syntax <c>U>count</c> to search for channels with more than the given
+        /// number of participants and <c>C<time</c> to search for channels with
+        /// fewer than the given number of participants.
+        /// (letter: <c>U</c>)
+        /// </summary>
+        ParticipantCount = (1 << 4)
+    }
+}
diff --git a/lib/SmartIrc4net/src/IrcCommands/IrcCommands.cs b/lib/SmartIrc4net/src/IrcCommands/IrcCommands.cs
index 3de1a90..076d76f 100644
--- a/lib/SmartIrc4net/src/IrcCommands/IrcCommands.cs
+++ b/lib/SmartIrc4net/src/IrcCommands/IrcCommands.cs
@@ -238,51 +238,56 @@ namespace Meebey.SmartIrc4net
         }
 
         /// <summary>
-        /// 
+        /// Fetch a list of entries of a mask-format channel mode.
         /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="priority"></param>
-        public void Ban(string channel, Priority priority)
+        /// <param name="modetype">The type of the mask-format mode (e.g. +b) to fetch.</param>
+        /// <param name="channel">The channel whose mode to fetch.</param>
+        public void ListChannelMasks(string modetype, string channel)
         {
-            WriteLine(Rfc2812.Mode(channel, "+b"), priority);
+            WriteLine(Rfc2812.Mode(channel, modetype));
         }
 
         /// <summary>
-        /// 
+        /// Fetch a list of entries of a mask-format channel mode.
         /// </summary>
-        /// <param name="channel"></param>
-        public void Ban(string channel)
+        /// <param name="modetype">The type of the mask-format mode (e.g. +b) to fetch.</param>
+        /// <param name="channel">The channel whose mode to fetch.</param>
+        /// <param name="priority">The priority with which the mode-setting message should be sent.</param>
+        public void ListChannelMasks(string modetype, string channel, Priority priority)
         {
-            WriteLine(Rfc2812.Mode(channel, "+b"));
+            WriteLine(Rfc2812.Mode(channel, modetype), priority);
         }
 
         /// <summary>
-        /// 
+        /// Add or remove an entry to/from a mask-format channel mode.
         /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmask"></param>
-        /// <param name="priority"></param>
-        public void Ban(string channel, string hostmask, Priority priority)
+        /// <param name="modetype">The type of the mask-format mode (e.g. +b) whose entries to modify.</param>
+        /// <param name="channel">The channel whose mode to edit.</param>
+        /// <param name="hostmask">The hostmask of the entry to add/remove.</param>
+        /// <param name="priority">The priority with which the mode-setting message should be sent.</param>
+        public void ModifyChannelMasks(string modetype, string channel, string hostmask, Priority priority)
         {
-            WriteLine(Rfc2812.Mode(channel, "+b "+hostmask), priority);
+            WriteLine(Rfc2812.Mode(channel, modetype + " " + hostmask), priority);
         }
 
         /// <summary>
-        /// 
+        /// Add or remove an entry to/from a mask-format channel mode.
         /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmask"></param>
-        public void Ban(string channel, string hostmask)
+        /// <param name="modetype">The type of the mask-format mode (e.g. +b) whose entries to modify.</param>
+        /// <param name="channel">The channel whose mode to edit.</param>
+        /// <param name="hostmask">The hostmask of the entry to add/remove.</param>
+        public void ModifyChannelMasks(string modetype, string channel, string hostmask)
         {
-            WriteLine(Rfc2812.Mode(channel, "+b "+hostmask));
+            WriteLine(Rfc2812.Mode(channel, modetype + " " + hostmask));
         }
 
         /// <summary>
-        ///
+        /// Add or remove multiple entries to/from a mask-format channel mode.
         /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmasks"></param>
-        public void Ban(string channel, string[] hostmasks)
+        /// <param name="modetype">The type of the mask-format mode (e.g. +b) whose entries to modify.</param>
+        /// <param name="channel">The channel whose mode to edit.</param>
+        /// <param name="hostmasks">The hostmasks of the entries to add/remove.</param>
+        public void ModifyChannelMasks(string modetype, string channel, string[] hostmasks)
         {
             if (hostmasks == null) {
                 throw new ArgumentNullException("hostmasks");
@@ -290,48 +295,114 @@ namespace Meebey.SmartIrc4net
 
             string[] modes = new string[hostmasks.Length];
             for (int i = 0; i < hostmasks.Length; i++) {
-                modes[i] = "+b";
+                modes[i] = modetype;
             }
             Mode(channel, modes, hostmasks);
         }
 
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmask"></param>
-        /// <param name="priority"></param>
+        public void Ban(string channel)
+        {
+            ListChannelMasks("+b", channel);
+        }
+
+        public void Ban(string channel, string hostmask, Priority priority)
+        {
+            ModifyChannelMasks("+b", channel, hostmask, priority);
+        }
+
+        public void Ban(string channel, string hostmask)
+        {
+            ModifyChannelMasks("+b", channel, hostmask);
+        }
+
+        public void Ban(string channel, string[] hostmasks)
+        {
+            ModifyChannelMasks("+b", channel, hostmasks);
+        }
+
         public void Unban(string channel, string hostmask, Priority priority)
         {
-            WriteLine(Rfc2812.Mode(channel, "-b "+hostmask), priority);
+            ModifyChannelMasks("-b", channel, hostmask, priority);
         }
 
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmask"></param>
         public void Unban(string channel, string hostmask)
         {
-            WriteLine(Rfc2812.Mode(channel, "-b "+hostmask));
+            ModifyChannelMasks("-b", channel, hostmask);
         }
-        
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="channel"></param>
-        /// <param name="hostmasks"></param>
+
         public void Unban(string channel, string[] hostmasks)
         {
-            if (hostmasks == null) {
-                throw new ArgumentNullException("hostmasks");
-            }
+            ModifyChannelMasks("-b", channel, hostmasks);
+        }
 
-            string[] modes = new string[hostmasks.Length];
-            for (int i = 0; i < hostmasks.Length; i++) {
-                modes[i] = "-b";
-            }
-            Mode(channel, modes, hostmasks);
+        public virtual void BanException(string channel)
+        {
+            ListChannelMasks("+e", channel);
+        }
+
+        public virtual void BanException(string channel, string hostmask, Priority priority)
+        {
+            ModifyChannelMasks("+e", channel, hostmask, priority);
+        }
+
+        public virtual void BanException(string channel, string hostmask)
+        {
+            ModifyChannelMasks("+e", channel, hostmask);
+        }
+
+        public virtual void BanException(string channel, string[] hostmasks)
+        {
+            ModifyChannelMasks("+e", channel, hostmasks);
+        }
+
+        public virtual void UnBanException(string channel, string hostmask, Priority priority)
+        {
+            ModifyChannelMasks("-e", channel, hostmask, priority);
+        }
+
+        public virtual void UnBanException(string channel, string hostmask)
+        {
+            ModifyChannelMasks("-e", channel, hostmask);
+        }
+
+        public virtual void UnBanException(string channel, string[] hostmasks)
+        {
+            ModifyChannelMasks("-e", channel, hostmasks);
+        }
+
+        public virtual void InviteException(string channel)
+        {
+            ListChannelMasks("+I", channel);
+        }
+
+        public virtual void InviteException(string channel, string hostmask, Priority priority)
+        {
+            ModifyChannelMasks("+I", channel, hostmask, priority);
+        }
+
+        public virtual void InviteException(string channel, string hostmask)
+        {
+            ModifyChannelMasks("+I", channel, hostmask);
+        }
+
+        public virtual void InviteException(string channel, string[] hostmasks)
+        {
+            ModifyChannelMasks("+I", channel, hostmasks);
+        }
+
+        public virtual void UnInviteException(string channel, string hostmask, Priority priority)
+        {
+            ModifyChannelMasks("-I", channel, hostmask, priority);
+        }
+
+        public virtual void UnInviteException(string channel, string hostmask)
+        {
+            ModifyChannelMasks("-I", channel, hostmask);
+        }
+
+        public virtual void UnInviteException(string channel, string[] hostmasks)
+        {
+            ModifyChannelMasks("-I", channel, hostmasks);
         }
 
         // non-RFC commands
diff --git a/lib/SmartIrc4net/src/IrcConnection/IrcConnection.cs b/lib/SmartIrc4net/src/IrcConnection/IrcConnection.cs
index 28def5f..fb40601 100644
--- a/lib/SmartIrc4net/src/IrcConnection/IrcConnection.cs
+++ b/lib/SmartIrc4net/src/IrcConnection/IrcConnection.cs
@@ -74,6 +74,7 @@ namespace Meebey.SmartIrc4net
         private int              _AutoRetryLimit = 3;
         private bool             _AutoReconnect;
         private Encoding         _Encoding = Encoding.Default;
+        public bool EnableUTF8Recode { get; set; }
         private int              _SocketReceiveTimeout  = 600;
         private int              _SocketSendTimeout = 600;
         private int              _IdleWorkerInterval = 60;
@@ -317,7 +318,12 @@ namespace Meebey.SmartIrc4net
         }
 
         /// <summary>
-        /// Encoding which is used for reading and writing to the socket
+        /// The encoding to use to write to and read from the socket.
+        ///
+        /// If EnableUTF8Recode is true, reading and writing will always happen
+        /// using UTF-8; this encoding is only used to decode incoming messages
+        /// that cannot be successfully decoded using UTF-8.
+        ///
         /// Default: encoding of the system
         /// </summary>
         public Encoding Encoding {
@@ -659,17 +665,22 @@ namespace Meebey.SmartIrc4net
                     }
                     stream = sslStream;
                 }
-                _Reader = new StreamReader(stream, _Encoding);
-                _Writer = new StreamWriter(stream, _Encoding);
-                
-                if (_Encoding.GetPreamble().Length > 0) {
-                    // HACK: we have an encoding that has some kind of preamble
-                    // like UTF-8 has a BOM, this will confuse the IRCd!
-                    // Thus we send a \r\n so the IRCd can safely ignore that
-                    // garbage.
-                    _Writer.WriteLine();
-                    // make sure we flush the BOM+CRLF correctly
-                    _Writer.Flush();
+                if (EnableUTF8Recode) {
+                    _Reader = new StreamReader(stream, new PrimaryOrFallbackEncoding(new UTF8Encoding(false, true), _Encoding));
+                    _Writer = new StreamWriter(stream, new UTF8Encoding(false, false));
+                } else {
+                    _Reader = new StreamReader(stream, _Encoding);
+                    _Writer = new StreamWriter(stream, _Encoding);
+
+                    if (_Encoding.GetPreamble().Length > 0) {
+                        // HACK: we have an encoding that has some kind of preamble
+                        // like UTF-8 has a BOM, this will confuse the IRCd!
+                        // Thus we send a \r\n so the IRCd can safely ignore that
+                        // garbage.
+                        _Writer.WriteLine();
+                        // make sure we flush the BOM+CRLF correctly
+                        _Writer.Flush();
+                    }
                 }
 
                 // Connection was succeful, reseting the connect counter
@@ -1100,6 +1111,10 @@ namespace Meebey.SmartIrc4net
                     _Connection._Reader.Close();
                 } catch (ObjectDisposedException) {
                 }
+
+                // clean up our receive queue else we continue processing old
+                // messages when the read thread is restarted!
+                _Queue.Clear();
             }
 
             private void _Worker()
diff --git a/lib/SmartIrc4net/src/IrcConnection/PrimaryOrFallbackEncoding.cs b/lib/SmartIrc4net/src/IrcConnection/PrimaryOrFallbackEncoding.cs
new file mode 100644
index 0000000..93558df
--- /dev/null
+++ b/lib/SmartIrc4net/src/IrcConnection/PrimaryOrFallbackEncoding.cs
@@ -0,0 +1,114 @@
+/*
+ * SmartIrc4net - the IRC library for .NET/C# <http://smartirc4net.sf.net>
+ *
+ * Copyright (c) 2013 Ondřej Hošek <ondra.hosek at gmail.com>
+ *
+ * Full LGPL License: <http://www.gnu.org/licenses/lgpl.txt>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+using System;
+using System.Text;
+
+namespace Meebey.SmartIrc4net
+{
+    internal class PrimaryOrFallbackEncoding : Encoding
+    {
+        public Encoding PrimaryEncoding { get; private set; }
+        public Encoding FallbackEncoding { get; private set; }
+
+        public PrimaryOrFallbackEncoding(Encoding primary, Encoding fallback)
+        {
+            try {
+                PrimaryEncoding = Encoding.GetEncoding(primary.WebName, new EncoderExceptionFallback(), new DecoderExceptionFallback());
+            } catch (ArgumentException) {
+                // probably not a standard encoding; check if it's throw-exception
+                if (!(primary.EncoderFallback is EncoderExceptionFallback)) {
+                    throw new System.ArgumentException("a custom primary encoding's encoder fallback must be an EncoderExceptionFallback");
+                }
+                if (!(primary.DecoderFallback is DecoderExceptionFallback)) {
+                    throw new System.ArgumentException("a custom primary encoding's decoder fallback must be a DecoderExceptionFallback");
+                }
+            }
+
+            FallbackEncoding = fallback;
+        }
+
+        public override int GetByteCount(char[] chars, int index, int count)
+        {
+            try {
+                return PrimaryEncoding.GetByteCount(chars, index, count);
+            } catch (EncoderFallbackException) {
+                return FallbackEncoding.GetByteCount(chars, index, count);
+            }
+        }
+
+        public override int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex)
+        {
+            try {
+                return PrimaryEncoding.GetBytes(chars, charIndex, charCount, bytes, byteIndex);
+            } catch (EncoderFallbackException) {
+                return FallbackEncoding.GetBytes(chars, charIndex, charCount, bytes, byteIndex);
+            }
+        }
+
+        public override int GetCharCount(byte[] bytes, int index, int count)
+        {
+            try {
+                return PrimaryEncoding.GetCharCount(bytes, index, count);
+            } catch (DecoderFallbackException) {
+                return FallbackEncoding.GetCharCount(bytes, index, count);
+            }
+        }
+
+        public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex)
+        {
+            try {
+                return PrimaryEncoding.GetChars(bytes, byteIndex, byteCount, chars, charIndex);
+            } catch (DecoderFallbackException) {
+                return FallbackEncoding.GetChars(bytes, byteIndex, byteCount, chars, charIndex);
+            }
+        }
+
+        public override int GetMaxByteCount(int charCount)
+        {
+            try {
+                int pri = PrimaryEncoding.GetMaxByteCount(charCount);
+                int fab = FallbackEncoding.GetMaxByteCount(charCount);
+                return Math.Max(pri, fab);
+            } catch (EncoderFallbackException) {
+                return FallbackEncoding.GetMaxByteCount(charCount);
+            }
+        }
+
+        public override int GetMaxCharCount(int byteCount)
+        {
+            try {
+                int pri = PrimaryEncoding.GetMaxCharCount(byteCount);
+                int fab = FallbackEncoding.GetMaxCharCount(byteCount);
+                return Math.Max(pri, fab);
+            } catch (DecoderFallbackException) {
+                return FallbackEncoding.GetMaxCharCount(byteCount);
+            }
+        }
+
+        public override byte[] GetPreamble()
+        {
+            return PrimaryEncoding.GetPreamble();
+        }
+    }
+}
+
diff --git a/lib/SmartIrc4net/src/Makefile.am b/lib/SmartIrc4net/src/Makefile.am
deleted file mode 100644
index dd8959e..0000000
--- a/lib/SmartIrc4net/src/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-TARGET_DIR = $(top_builddir)/bin
-KEYFILE = $(top_srcdir)/$(PACKAGE_NAME).snk
-ASSEMBLY = $(ASSEMBLY_NAME).dll
-ASSEMBLY_TARGET = $(TARGET_DIR)/$(ASSEMBLY)
-ASSEMBLY_XML = $(ASSEMBLY_NAME).xml
-ASSEMBLY_XML_TARGET = $(TARGET_DIR)/$(ASSEMBLY_XML)
-ASSEMBLY_PC = $(top_srcdir)/$(PACKAGE_NAME).pc
-NDOC = ndoc-console
-NDOC_TARGET_DIR = docs/html
-SOURCE_PATTERNS = *.cs */*.cs */*/*.cs
-SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(srcdir)/$(pattern)))
-GACUTIL_INSTALL = $(GACUTIL) -i $(ASSEMBLY_TARGET) -f $(GACUTIL_FLAGS)
-GACUTIL_UNINSTALL = $(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)
-
-# automake magic variables
-EXTRA_DIST = $(SOURCE_FILES)
-CLEANFILES = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb $(ASSEMBLY_XML_TARGET)
-
-if INSTALL_PKG_LIB
-pkgappdir = $(pkglibdir)
-pkgapp_DATA = $(ASSEMBLY_TARGET)
-endif
-
-if INSTALL_PKG_CONFIG
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(ASSEMBLY_PC)
-endif
-# end of magic
-
-all: $(ASSEMBLY_TARGET)
-
-$(ASSEMBLY_TARGET): $(SOURCE_FILES)
-	$(INSTALL) -d $(TARGET_DIR)
-	$(CSC) $(CSC_FLAGS) -keyfile:$(KEYFILE) -doc:$(ASSEMBLY_XML_TARGET) -target:library -out:$@ $^
-
-docs: $(ASSEMBLY_TARGET)
-	$(NDOC) $(ASSEMBLY) \
-	  -documenter=MSDN -OutputTarget=Web -OutputDirectory=$(NDOC_TARGET_DIR) \
-	  -Title="SmartIrc4net API documentation" -SdkLinksOnWeb=true \
-	  -AssemblyVersionInfo=AssemblyVersion
-
-if INSTALL_PKG_GAC
-install-data-local:
-	echo "$(GACUTIL_INSTALL)";  \
-	  $(GACUTIL_INSTALL)  || exit 1;
-
-uninstall-local:
-	echo "$(GACUTIL_UNINSTALL)";  \
-	  $(GACUTIL_UNINSTALL)  || exit 1;
-endif
-
-# HACK: autofoo stubbornly creates the $pkglibdir/$package directory
-if !INSTALL_PKG_LIB
-installdirs:
-install-pkglibDATA:
-endif
diff --git a/lib/SmartIrc4net/src/Makefile.in b/lib/SmartIrc4net/src/Makefile.in
deleted file mode 100644
index 5f23c78..0000000
--- a/lib/SmartIrc4net/src/Makefile.in
+++ /dev/null
@@ -1,477 +0,0 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
-    test $$am__dry = yes; \
-  }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-subdir = src
-DIST_COMMON = $(srcdir)/AssemblyInfo.cs.in $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
-	$(top_srcdir)/mono.m4 $(top_srcdir)/programs.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = AssemblyInfo.cs
-CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__installdirs = "$(DESTDIR)$(pkgappdir)" "$(DESTDIR)$(pkgconfigdir)"
-DATA = $(pkgapp_DATA) $(pkgconfig_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-ASSEMBLY_DESCRIPTION = @ASSEMBLY_DESCRIPTION@
-ASSEMBLY_NAME = @ASSEMBLY_NAME@
-ASSEMBLY_TITLE = @ASSEMBLY_TITLE@
-ASSEMBLY_VERSION = @ASSEMBLY_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CLR = @CLR@
-CSC = @CSC@
-CSC_FLAGS = @CSC_FLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-GACUTIL = @GACUTIL@
-GACUTIL_FLAGS = @GACUTIL_FLAGS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MCS = @MCS@
-MKDIR_P = @MKDIR_P@
-MONO = @MONO@
-MONO_MODULE_CFLAGS = @MONO_MODULE_CFLAGS@
-MONO_MODULE_LIBS = @MONO_MODULE_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build_alias = @build_alias@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-expanded_libdir = @expanded_libdir@
-host_alias = @host_alias@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-TARGET_DIR = $(top_builddir)/bin
-KEYFILE = $(top_srcdir)/$(PACKAGE_NAME).snk
-ASSEMBLY = $(ASSEMBLY_NAME).dll
-ASSEMBLY_TARGET = $(TARGET_DIR)/$(ASSEMBLY)
-ASSEMBLY_XML = $(ASSEMBLY_NAME).xml
-ASSEMBLY_XML_TARGET = $(TARGET_DIR)/$(ASSEMBLY_XML)
-ASSEMBLY_PC = $(top_srcdir)/$(PACKAGE_NAME).pc
-NDOC = ndoc-console
-NDOC_TARGET_DIR = docs/html
-SOURCE_PATTERNS = *.cs */*.cs */*/*.cs
-SOURCE_FILES = $(foreach pattern, $(SOURCE_PATTERNS), $(wildcard $(srcdir)/$(pattern)))
-GACUTIL_INSTALL = $(GACUTIL) -i $(ASSEMBLY_TARGET) -f $(GACUTIL_FLAGS)
-GACUTIL_UNINSTALL = $(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)
-
-# automake magic variables
-EXTRA_DIST = $(SOURCE_FILES)
-CLEANFILES = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb $(ASSEMBLY_XML_TARGET)
- at INSTALL_PKG_LIB_TRUE@pkgappdir = $(pkglibdir)
- at INSTALL_PKG_LIB_TRUE@pkgapp_DATA = $(ASSEMBLY_TARGET)
- at INSTALL_PKG_CONFIG_TRUE@pkgconfigdir = $(libdir)/pkgconfig
- at INSTALL_PKG_CONFIG_TRUE@pkgconfig_DATA = $(ASSEMBLY_PC)
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign src/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-AssemblyInfo.cs: $(top_builddir)/config.status $(srcdir)/AssemblyInfo.cs.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-pkgappDATA: $(pkgapp_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(pkgapp_DATA)'; test -n "$(pkgappdir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgappdir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(pkgappdir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgappdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgappdir)" || exit $$?; \
-	done
-
-uninstall-pkgappDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(pkgapp_DATA)'; test -n "$(pkgappdir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(pkgappdir)'; $(am__uninstall_files_from_dir)
-install-pkgconfigDATA: $(pkgconfig_DATA)
-	@$(NORMAL_INSTALL)
-	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
-	done
-
-uninstall-pkgconfigDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile $(DATA)
- at INSTALL_PKG_LIB_TRUE@installdirs:
- at INSTALL_PKG_LIB_TRUE@	for dir in "$(DESTDIR)$(pkgappdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
- at INSTALL_PKG_LIB_TRUE@	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- at INSTALL_PKG_LIB_TRUE@	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
- at INSTALL_PKG_GAC_FALSE@uninstall-local:
- at INSTALL_PKG_GAC_FALSE@install-data-local:
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-data-local install-pkgappDATA \
-	install-pkgconfigDATA
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-local uninstall-pkgappDATA \
-	uninstall-pkgconfigDATA
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
-	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am \
-	install-data-local install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-pkgappDATA install-pkgconfigDATA install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
-	uninstall-am uninstall-local uninstall-pkgappDATA \
-	uninstall-pkgconfigDATA
-
-# end of magic
-
-all: $(ASSEMBLY_TARGET)
-
-$(ASSEMBLY_TARGET): $(SOURCE_FILES)
-	$(INSTALL) -d $(TARGET_DIR)
-	$(CSC) $(CSC_FLAGS) -keyfile:$(KEYFILE) -doc:$(ASSEMBLY_XML_TARGET) -target:library -out:$@ $^
-
-docs: $(ASSEMBLY_TARGET)
-	$(NDOC) $(ASSEMBLY) \
-	  -documenter=MSDN -OutputTarget=Web -OutputDirectory=$(NDOC_TARGET_DIR) \
-	  -Title="SmartIrc4net API documentation" -SdkLinksOnWeb=true \
-	  -AssemblyVersionInfo=AssemblyVersion
-
- at INSTALL_PKG_GAC_TRUE@install-data-local:
- at INSTALL_PKG_GAC_TRUE@	echo "$(GACUTIL_INSTALL)";  \
- at INSTALL_PKG_GAC_TRUE@	  $(GACUTIL_INSTALL)  || exit 1;
-
- at INSTALL_PKG_GAC_TRUE@uninstall-local:
- at INSTALL_PKG_GAC_TRUE@	echo "$(GACUTIL_UNINSTALL)";  \
- at INSTALL_PKG_GAC_TRUE@	  $(GACUTIL_UNINSTALL)  || exit 1;
-
-# HACK: autofoo stubbornly creates the $pkglibdir/$package directory
- at INSTALL_PKG_LIB_FALSE@installdirs:
- at INSTALL_PKG_LIB_FALSE@install-pkglibDATA:
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs b/lib/SmartIrc4net/src/starksoftproxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
copy to lib/SmartIrc4net/src/starksoftproxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs b/lib/SmartIrc4net/src/starksoftproxy/Exceptions/ProxyException.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs
copy to lib/SmartIrc4net/src/starksoftproxy/Exceptions/ProxyException.cs
diff --git a/lib/SmartIrc4net/src/starksoftproxy/HttpProxyClient.cs b/lib/SmartIrc4net/src/starksoftproxy/HttpProxyClient.cs
new file mode 100644
index 0000000..bbeaa76
--- /dev/null
+++ b/lib/SmartIrc4net/src/starksoftproxy/HttpProxyClient.cs
@@ -0,0 +1,461 @@
+/*
+ *  Authors:  Benton Stark
+ * 
+ *  Copyright (c) 2007-2009 Starksoft, LLC (http://www.starksoft.com) 
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ * 
+ */
+
+using System;
+using System.Text;
+using System.Net.Sockets;
+using System.Threading;
+using System.Globalization;
+using System.ComponentModel;
+
+namespace Starksoft.Net.Proxy
+{
+    /// <summary>
+    /// HTTP connection proxy class.  This class implements the HTTP standard proxy protocol.
+    /// <para>
+    /// You can use this class to set up a connection to an HTTP proxy server.  Calling the 
+    /// CreateConnection() method initiates the proxy connection and returns a standard
+    /// System.Net.Socks.TcpClient object that can be used as normal.  The proxy plumbing
+    /// is all handled for you.
+    /// </para>
+    /// <code>
+    /// 
+    /// </code>
+    /// </summary>
+    public class HttpProxyClient : IProxyClient
+    {
+        private string _proxyHost;
+        private int _proxyPort;
+        private HttpResponseCodes _respCode;
+        private string _respText;
+        private TcpClient _tcpClient;
+
+        private const int HTTP_PROXY_DEFAULT_PORT = 8080;
+        private const string HTTP_PROXY_CONNECT_CMD = "CONNECT {0}:{1} HTTP/1.0\r\nHost: {0}:{1}\r\n\r\n";
+        private const int WAIT_FOR_DATA_INTERVAL = 50; // 50 ms
+        private const int WAIT_FOR_DATA_TIMEOUT = 15000; // 15 seconds
+        private const string PROXY_NAME = "HTTP";
+
+        private enum HttpResponseCodes
+        {
+            None = 0,
+            Continue = 100,
+            SwitchingProtocols = 101,
+            OK = 200,
+            Created = 201,
+            Accepted = 202,
+            NonAuthoritiveInformation = 203,
+            NoContent = 204,
+            ResetContent = 205,
+            PartialContent = 206,
+            MultipleChoices = 300,
+            MovedPermanetly = 301,
+            Found = 302,
+            SeeOther = 303,
+            NotModified = 304,
+            UserProxy = 305,
+            TemporaryRedirect = 307,
+            BadRequest = 400,
+            Unauthorized = 401,
+            PaymentRequired = 402,
+            Forbidden = 403,
+            NotFound = 404,
+            MethodNotAllowed = 405,
+            NotAcceptable = 406,
+            ProxyAuthenticantionRequired = 407,
+            RequestTimeout = 408,
+            Conflict = 409,
+            Gone = 410,
+            PreconditionFailed = 411,
+            RequestEntityTooLarge = 413,
+            RequestURITooLong = 414,
+            UnsupportedMediaType = 415,
+            RequestedRangeNotSatisfied = 416,
+            ExpectationFailed = 417,
+            InternalServerError = 500,
+            NotImplemented = 501,
+            BadGateway = 502,
+            ServiceUnavailable = 503,
+            GatewayTimeout = 504,
+            HTTPVersionNotSupported = 505
+        }
+
+        /// <summary>
+        /// Constructor.
+        /// </summary>
+        public HttpProxyClient() { }
+
+        /// <summary>
+        /// Creates a HTTP proxy client object using the supplied TcpClient object connection.
+        /// </summary>
+        /// <param name="tcpClient">A TcpClient connection object.</param>
+        public HttpProxyClient(TcpClient tcpClient)
+        {
+            if (tcpClient == null)
+                throw new ArgumentNullException("tcpClient");
+
+            _tcpClient = tcpClient;
+        }
+
+
+        /// <summary>
+        /// Constructor.  The default HTTP proxy port 8080 is used.
+        /// </summary>
+        /// <param name="proxyHost">Host name or IP address of the proxy.</param>
+        public HttpProxyClient(string proxyHost)
+        {
+            if (String.IsNullOrEmpty(proxyHost))
+                throw new ArgumentNullException("proxyHost");
+
+            _proxyHost = proxyHost;
+            _proxyPort = HTTP_PROXY_DEFAULT_PORT;
+        }
+
+        /// <summary>
+        /// Constructor.  
+        /// </summary>
+        /// <param name="proxyHost">Host name or IP address of the proxy server.</param>
+        /// <param name="proxyPort">Port number for the proxy server.</param>
+        public HttpProxyClient(string proxyHost, int proxyPort)
+        {
+            if (String.IsNullOrEmpty(proxyHost))
+                throw new ArgumentNullException("proxyHost");
+
+            if (proxyPort <= 0 || proxyPort > 65535)
+                throw new ArgumentOutOfRangeException("proxyPort", "port must be greater than zero and less than 65535");
+
+            _proxyHost = proxyHost;
+            _proxyPort = proxyPort;
+        }
+
+        /// <summary>
+        /// Gets or sets host name or IP address of the proxy server.
+        /// </summary>
+        public string ProxyHost
+        {
+            get { return _proxyHost; }
+            set { _proxyHost = value; }
+        }
+
+        /// <summary>
+        /// Gets or sets port number for the proxy server.
+        /// </summary>
+        public int ProxyPort
+        {
+            get { return _proxyPort; }
+            set { _proxyPort = value; }
+        }
+
+        /// <summary>
+        /// Gets String representing the name of the proxy. 
+        /// </summary>
+        /// <remarks>This property will always return the value 'HTTP'</remarks>
+        public string ProxyName
+        {
+            get { return PROXY_NAME; }
+        }
+
+        /// <summary>
+        /// Gets or sets the TcpClient object. 
+        /// This property can be set prior to executing CreateConnection to use an existing TcpClient connection.
+        /// </summary>
+        public TcpClient TcpClient
+        {
+            get { return _tcpClient; }
+            set { _tcpClient = value; }
+        }
+
+
+        /// <summary>
+        /// Creates a remote TCP connection through a proxy server to the destination host on the destination port.
+        /// </summary>
+        /// <param name="destinationHost">Destination host name or IP address.</param>
+        /// <param name="destinationPort">Port number to connect to on the destination host.</param>
+        /// <returns>
+        /// Returns an open TcpClient object that can be used normally to communicate
+        /// with the destination server
+        /// </returns>
+        /// <remarks>
+        /// This method creates a connection to the proxy server and instructs the proxy server
+        /// to make a pass through connection to the specified destination host on the specified
+        /// port.  
+        /// </remarks>
+        public TcpClient CreateConnection(string destinationHost, int destinationPort)
+        {
+            try
+            {
+                // if we have no connection, create one
+                if (_tcpClient == null)
+                {
+                    if (String.IsNullOrEmpty(_proxyHost))
+                        throw new ProxyException("ProxyHost property must contain a value.");
+
+                    if (_proxyPort <= 0 || _proxyPort > 65535)
+                        throw new ProxyException("ProxyPort value must be greater than zero and less than 65535");
+
+                    //  create new tcp client object to the proxy server
+                    _tcpClient = new TcpClient();
+
+                    // attempt to open the connection
+                    _tcpClient.Connect(_proxyHost, _proxyPort);
+                }
+
+                //  send connection command to proxy host for the specified destination host and port
+                SendConnectionCommand(destinationHost, destinationPort);
+
+                // return the open proxied tcp client object to the caller for normal use
+                return _tcpClient;
+            }
+            catch (SocketException ex)
+            {
+                throw new ProxyException(String.Format(CultureInfo.InvariantCulture, "Connection to proxy host {0} on port {1} failed.", Utils.GetHost(_tcpClient), Utils.GetPort(_tcpClient)), ex);
+            }
+        }
+
+
+        private void SendConnectionCommand(string host, int port)
+        {
+            NetworkStream stream = _tcpClient.GetStream(); 
+
+            // PROXY SERVER REQUEST
+            // =======================================================================
+            //CONNECT starksoft.com:443 HTTP/1.0 <CR><LF>
+            //HOST starksoft.com:443<CR><LF>
+            //[... other HTTP header lines ending with <CR><LF> if required]>
+            //<CR><LF>    // Last Empty Line
+
+            string connectCmd = String.Format(CultureInfo.InvariantCulture, HTTP_PROXY_CONNECT_CMD, host, port.ToString(CultureInfo.InvariantCulture));
+            byte[] request = ASCIIEncoding.ASCII.GetBytes(connectCmd);
+
+            // send the connect request
+            stream.Write(request, 0, request.Length);
+
+            // wait for the proxy server to respond
+            WaitForData(stream);
+
+            // PROXY SERVER RESPONSE
+            // =======================================================================
+            //HTTP/1.0 200 Connection Established<CR><LF>
+            //[.... other HTTP header lines ending with <CR><LF>..
+            //ignore all of them]
+            //<CR><LF>    // Last Empty Line
+
+            // create an byte response array  
+            byte[] response = new byte[_tcpClient.ReceiveBufferSize];
+            StringBuilder sbuilder = new StringBuilder();
+            int bytes = 0;
+            long total = 0;
+
+            do
+            {
+                bytes = stream.Read(response, 0, _tcpClient.ReceiveBufferSize);
+                total += bytes;
+                sbuilder.Append(System.Text.ASCIIEncoding.UTF8.GetString(response, 0, bytes));
+            } while (stream.DataAvailable);
+
+            ParseResponse(sbuilder.ToString());
+            
+            //  evaluate the reply code for an error condition
+            if (_respCode != HttpResponseCodes.OK)
+                HandleProxyCommandError(host, port);
+        }
+        
+        private void HandleProxyCommandError(string host, int port)
+        {
+            string msg;
+
+            switch (_respCode)
+            {
+                case HttpResponseCodes.None:
+                    msg = String.Format(CultureInfo.InvariantCulture, "Proxy destination {0} on port {1} failed to return a recognized HTTP response code.  Server response: {2}", Utils.GetHost(_tcpClient), Utils.GetPort(_tcpClient), _respText);
+                    break;                   
+
+                case HttpResponseCodes.BadGateway:
+                    //HTTP/1.1 502 Proxy Error (The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.)
+                    msg = String.Format(CultureInfo.InvariantCulture, "Proxy destination {0} on port {1} responded with a 502 code - Bad Gateway.  If you are connecting to a Microsoft ISA destination please refer to knowledge based article Q283284 for more information.  Server response: {2}", Utils.GetHost(_tcpClient), Utils.GetPort(_tcpClient), _respText);
+                    break;
+
+                default:
+                    msg = String.Format(CultureInfo.InvariantCulture, "Proxy destination {0} on port {1} responded with a {2} code - {3}", Utils.GetHost(_tcpClient), Utils.GetPort(_tcpClient), ((int)_respCode).ToString(CultureInfo.InvariantCulture), _respText);
+                    break;
+            }
+
+            //  throw a new application exception 
+            throw new ProxyException(msg);
+        }
+
+        private void WaitForData(NetworkStream stream)
+        {
+            int sleepTime = 0;
+            while (!stream.DataAvailable)
+            {
+                Thread.Sleep(WAIT_FOR_DATA_INTERVAL);
+                sleepTime += WAIT_FOR_DATA_INTERVAL;
+                if (sleepTime > WAIT_FOR_DATA_TIMEOUT)
+                    throw new ProxyException(String.Format("A timeout while waiting for the proxy server at {0} on port {1} to respond.", Utils.GetHost(_tcpClient), Utils.GetPort(_tcpClient) ));
+            }
+        }
+
+        private void ParseResponse(string response)
+        {
+            string[] data = null;
+
+            //  get rid of the LF character if it exists and then split the string on all CR
+            data = response.Replace('\n', ' ').Split('\r');
+            
+            ParseCodeAndText(data[0]);
+        }
+
+        private void ParseCodeAndText(string line)
+        {
+            int begin = 0;
+            int end = 0;
+            string val = null;
+
+            if (line.IndexOf("HTTP") == -1)
+                throw new ProxyException(String.Format("No HTTP response received from proxy destination.  Server response: {0}.", line));
+
+            begin = line.IndexOf(" ") + 1;
+            end = line.IndexOf(" ", begin);
+
+            val = line.Substring(begin, end - begin);
+            Int32 code = 0;
+
+            if (!Int32.TryParse(val, out code))
+                throw new ProxyException(String.Format("An invalid response code was received from proxy destination.  Server response: {0}.", line));
+
+            _respCode = (HttpResponseCodes)code;
+            _respText = line.Substring(end + 1).Trim();
+        }
+
+
+
+#region "Async Methods"
+
+        private BackgroundWorker _asyncWorker;
+        private Exception _asyncException;
+        bool _asyncCancelled;
+
+        /// <summary>
+        /// Gets a value indicating whether an asynchronous operation is running.
+        /// </summary>
+        /// <remarks>Returns true if an asynchronous operation is running; otherwise, false.
+        /// </remarks>
+        public bool IsBusy
+        {
+            get { return _asyncWorker == null ? false : _asyncWorker.IsBusy; }
+        }
+
+        /// <summary>
+        /// Gets a value indicating whether an asynchronous operation is cancelled.
+        /// </summary>
+        /// <remarks>Returns true if an asynchronous operation is cancelled; otherwise, false.
+        /// </remarks>
+        public bool IsAsyncCancelled
+        {
+            get { return _asyncCancelled; }
+        }
+
+        /// <summary>
+        /// Cancels any asychronous operation that is currently active.
+        /// </summary>
+        public void CancelAsync()
+        {
+            if (_asyncWorker != null && !_asyncWorker.CancellationPending && _asyncWorker.IsBusy)
+            {
+                _asyncCancelled = true;
+                _asyncWorker.CancelAsync();
+            }
+        }
+
+        private void CreateAsyncWorker()
+        {
+            if (_asyncWorker != null)
+                _asyncWorker.Dispose();
+            _asyncException = null;
+            _asyncWorker = null;
+            _asyncCancelled = false;
+            _asyncWorker = new BackgroundWorker();
+        }
+
+        /// <summary>
+        /// Event handler for CreateConnectionAsync method completed.
+        /// </summary>
+        public event EventHandler<CreateConnectionAsyncCompletedEventArgs> CreateConnectionAsyncCompleted;
+
+        /// <summary>
+        /// Asynchronously creates a remote TCP connection through a proxy server to the destination host on the destination port.
+        /// </summary>
+        /// <param name="destinationHost">Destination host name or IP address.</param>
+        /// <param name="destinationPort">Port number to connect to on the destination host.</param>
+        /// <returns>
+        /// Returns an open TcpClient object that can be used normally to communicate
+        /// with the destination server
+        /// </returns>
+        /// <remarks>
+        /// This method creates a connection to the proxy server and instructs the proxy server
+        /// to make a pass through connection to the specified destination host on the specified
+        /// port.  
+        /// </remarks>
+        public void CreateConnectionAsync(string destinationHost, int destinationPort)
+        {
+            if (_asyncWorker != null && _asyncWorker.IsBusy)
+                throw new InvalidOperationException("The HttpProxy object is already busy executing another asynchronous operation.  You can only execute one asychronous method at a time.");
+
+            CreateAsyncWorker();
+            _asyncWorker.WorkerSupportsCancellation = true;
+            _asyncWorker.DoWork += new DoWorkEventHandler(CreateConnectionAsync_DoWork);
+            _asyncWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CreateConnectionAsync_RunWorkerCompleted);
+            Object[] args = new Object[2];
+            args[0] = destinationHost;
+            args[1] = destinationPort;
+            _asyncWorker.RunWorkerAsync(args);
+        }
+
+        private void CreateConnectionAsync_DoWork(object sender, DoWorkEventArgs e)
+        {
+            try
+            {
+                Object[] args = (Object[])e.Argument;
+                e.Result = CreateConnection((string)args[0], (int)args[1]);
+            }
+            catch (Exception ex)
+            {
+                _asyncException = ex;
+            }
+        }
+
+        private void CreateConnectionAsync_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+        {
+            if (CreateConnectionAsyncCompleted != null)
+                CreateConnectionAsyncCompleted(this, new CreateConnectionAsyncCompletedEventArgs(_asyncException, _asyncCancelled, (TcpClient)e.Result));
+        }
+
+
+
+#endregion
+
+    }
+}
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs b/lib/SmartIrc4net/src/starksoftproxy/IProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs
copy to lib/SmartIrc4net/src/starksoftproxy/IProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs b/lib/SmartIrc4net/src/starksoftproxy/ProxyClientFactory.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs
copy to lib/SmartIrc4net/src/starksoftproxy/ProxyClientFactory.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs b/lib/SmartIrc4net/src/starksoftproxy/Socks4ProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs
copy to lib/SmartIrc4net/src/starksoftproxy/Socks4ProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs b/lib/SmartIrc4net/src/starksoftproxy/Socks4aProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs
copy to lib/SmartIrc4net/src/starksoftproxy/Socks4aProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs b/lib/SmartIrc4net/src/starksoftproxy/Socks5ProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs
copy to lib/SmartIrc4net/src/starksoftproxy/Socks5ProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs b/lib/SmartIrc4net/src/starksoftproxy/Utils.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs
copy to lib/SmartIrc4net/src/starksoftproxy/Utils.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs b/lib/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
copy to lib/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs b/lib/StarkSoftProxy/Exceptions/ProxyException.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs
copy to lib/StarkSoftProxy/Exceptions/ProxyException.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/HttpProxyClient.cs b/lib/StarkSoftProxy/HttpProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/HttpProxyClient.cs
copy to lib/StarkSoftProxy/HttpProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs b/lib/StarkSoftProxy/IProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs
copy to lib/StarkSoftProxy/IProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs b/lib/StarkSoftProxy/ProxyClientFactory.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs
copy to lib/StarkSoftProxy/ProxyClientFactory.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs b/lib/StarkSoftProxy/Socks4ProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs
copy to lib/StarkSoftProxy/Socks4ProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs b/lib/StarkSoftProxy/Socks4aProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs
copy to lib/StarkSoftProxy/Socks4aProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs b/lib/StarkSoftProxy/Socks5ProxyClient.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs
copy to lib/StarkSoftProxy/Socks5ProxyClient.cs
diff --git a/lib/StarkSoftProxy/StarkSoftProxy.csproj b/lib/StarkSoftProxy/StarkSoftProxy.csproj
new file mode 100644
index 0000000..e172ec6
--- /dev/null
+++ b/lib/StarkSoftProxy/StarkSoftProxy.csproj
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3F8CF2C1-EA37-444F-8693-A3A00B1131D2}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>StarkSoftProxy</RootNamespace>
+    <AssemblyName>StarkSoftProxy</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Compile Include="HttpProxyClient.cs" />
+    <Compile Include="IProxyClient.cs" />
+    <Compile Include="ProxyClientFactory.cs" />
+    <Compile Include="Socks4aProxyClient.cs" />
+    <Compile Include="Socks4ProxyClient.cs" />
+    <Compile Include="Socks5ProxyClient.cs" />
+    <Compile Include="Utils.cs" />
+    <Compile Include="EventArgs\CreateConnectionAsyncCompletedEventArgs.cs" />
+    <Compile Include="Exceptions\ProxyException.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="EventArgs\" />
+    <Folder Include="Exceptions\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs b/lib/StarkSoftProxy/Utils.cs
similarity index 100%
copy from lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs
copy to lib/StarkSoftProxy/Utils.cs
diff --git a/lib/Twitterizer/Twitterizer2/Core/OptionalProperties.cs b/lib/Twitterizer/Twitterizer2/Core/OptionalProperties.cs
index 52c153a..21770d5 100644
--- a/lib/Twitterizer/Twitterizer2/Core/OptionalProperties.cs
+++ b/lib/Twitterizer/Twitterizer2/Core/OptionalProperties.cs
@@ -51,7 +51,7 @@ namespace Twitterizer
         {
             // Set the default values for the properties
             this.UseSSL = false;
-            this.APIBaseAddress = "http://api.twitter.com/1/";
+            this.APIBaseAddress = "http://api.twitter.com/1.1/";
         }
 
         /// <include file='OptionalProperties.xml' path='OptionalProperties/Property[@name="UseSSL"]/*'/>
diff --git a/lib/Twitterizer/Twitterizer2/Methods/Timeline/MentionsCommand.cs b/lib/Twitterizer/Twitterizer2/Methods/Timeline/MentionsCommand.cs
index 6c7b08c..8267987 100644
--- a/lib/Twitterizer/Twitterizer2/Methods/Timeline/MentionsCommand.cs
+++ b/lib/Twitterizer/Twitterizer2/Methods/Timeline/MentionsCommand.cs
@@ -52,7 +52,7 @@ namespace Twitterizer.Commands
         /// <param name="tokens">The request tokens.</param>
         /// <param name="options">The options.</param>
         public MentionsCommand(OAuthTokens tokens, TimelineOptions options)
-            : base(HTTPVerb.GET, "statuses/mentions.json", tokens, options)
+            : base(HTTPVerb.GET, "statuses/mentions_timeline.json", tokens, options)
         {
             if (tokens == null)
             {
diff --git a/lib/Twitterizer/Twitterizer2/OAuth/OAuthUtility.cs b/lib/Twitterizer/Twitterizer2/OAuth/OAuthUtility.cs
index 3a1025e..c6594a9 100644
--- a/lib/Twitterizer/Twitterizer2/OAuth/OAuthUtility.cs
+++ b/lib/Twitterizer/Twitterizer2/OAuth/OAuthUtility.cs
@@ -354,14 +354,14 @@ namespace Twitterizer
         public static void AddOAuthEchoHeader(WebRequest request, OAuthTokens tokens)
         {
             WebRequestBuilder builder = new WebRequestBuilder(
-                new Uri("https://api.twitter.com/1/account/verify_credentials.json"), 
+                new Uri("https://api.twitter.com/1.1/account/verify_credentials.json"),
                 HTTPVerb.POST,
 				tokens);
 
             builder.PrepareRequest();
 
             request.Headers.Add("X-Verify-Credentials-Authorization", builder.GenerateAuthorizationHeader());
-            request.Headers.Add("X-Auth-Service-Provider", "https://api.twitter.com/1/account/verify_credentials.json");
+            request.Headers.Add("X-Auth-Service-Provider", "https://api.twitter.com/1.1/account/verify_credentials.json");
         }
 #endif
     }
diff --git a/lib/agsxmpp/agsxmpp/Collections/BareJidComparer.cs b/lib/agsxmpp/agsxmpp/Collections/BareJidComparer.cs
new file mode 100644
index 0000000..336b526
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Collections/BareJidComparer.cs
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+namespace agsXMPP.Collections
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class BareJidComparer : IComparer
+	{	
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="x"></param>
+		/// <param name="y"></param>
+		/// <returns></returns>
+		public int Compare(object x, object y)
+		{
+            if (x is Jid && y is Jid)
+            {
+                Jid jidX = (Jid)x;
+                Jid jidY = (Jid)y;
+
+                if (jidX.Bare == jidY.Bare)
+                    return 0;
+                else
+                    return String.Compare(jidX.Bare, jidY.Bare);
+            }
+            throw new ArgumentException("the objects to compare must be Jids");
+		}	
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Collections/FullJidComparer.cs b/lib/agsxmpp/agsxmpp/Collections/FullJidComparer.cs
new file mode 100644
index 0000000..b035998
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Collections/FullJidComparer.cs
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+namespace agsXMPP.Collections
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class FullJidComparer : IComparer
+	{	
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="x"></param>
+		/// <param name="y"></param>
+		/// <returns></returns>
+		public int Compare(object x, object y)
+		{
+            if (x is Jid && y is Jid)
+            {
+                Jid jidX = (Jid)x;
+                Jid jidY = (Jid)y;
+
+                if (jidX.ToString() == jidY.ToString())
+                    return 0;
+                else
+                    return String.Compare(jidX.ToString(), jidY.ToString());
+            }
+            throw new ArgumentException("the objects to compare must be Jids");
+		}	
+	}  
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Exceptions/JidException.cs b/lib/agsxmpp/agsxmpp/Exceptions/JidException.cs
new file mode 100644
index 0000000..61eaa70
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Exceptions/JidException.cs
@@ -0,0 +1,44 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Exceptions
+{
+    public class JidException : Exception
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public JidException()
+        {
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="msg"></param>
+        public JidException(string msg) : base(msg)
+        {
+
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Exceptions/RegisterException.cs b/lib/agsxmpp/agsxmpp/Exceptions/RegisterException.cs
new file mode 100644
index 0000000..7de5dfe
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Exceptions/RegisterException.cs
@@ -0,0 +1,37 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Exceptions
+{
+    public class RegisterException : Exception
+    {
+        public RegisterException()
+        {
+        }
+
+        public RegisterException(string msg) : base(msg)
+        {
+
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Exceptions/XmlRpcException.cs b/lib/agsxmpp/agsxmpp/Exceptions/XmlRpcException.cs
new file mode 100644
index 0000000..c4367fd
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Exceptions/XmlRpcException.cs
@@ -0,0 +1,50 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Exceptions
+{
+    public class XmlRpcException : Exception
+    {
+        public XmlRpcException() : base()
+        {
+        }
+
+        public XmlRpcException(string msg) : base(msg)
+        {
+        }
+
+        public XmlRpcException(int code, string msg) : base(msg)
+        {
+            this.m_Code = code;
+        }
+
+        private int m_Code;
+
+        public int Code
+        {
+            get { return m_Code; }
+            set { m_Code = value; }
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/Factory/ElementFactory.cs b/lib/agsxmpp/agsxmpp/Factory/ElementFactory.cs
new file mode 100644
index 0000000..eea0b89
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Factory/ElementFactory.cs
@@ -0,0 +1,365 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.Factory
+{
+	/// <summary>
+	/// Factory class that implements the factory pattern for builing our Elements.
+	/// </summary>
+	public class ElementFactory
+	{		
+		/// <summary>
+		/// This Hashtable stores Mapping of protocol (tag/namespace) to the agsXMPP objects
+		/// </summary>
+		private static Hashtable m_table = new Hashtable();
+
+		static ElementFactory()
+		{
+			AddElementType("iq",				Uri.CLIENT,					typeof(agsXMPP.protocol.client.IQ));
+			AddElementType("message",			Uri.CLIENT,					typeof(agsXMPP.protocol.client.Message));
+			AddElementType("presence",			Uri.CLIENT,					typeof(agsXMPP.protocol.client.Presence));
+			AddElementType("error",				Uri.CLIENT,					typeof(agsXMPP.protocol.client.Error));
+						
+			AddElementType("agent",				Uri.IQ_AGENTS,				typeof(agsXMPP.protocol.iq.agent.Agent));
+			
+			AddElementType("item",				Uri.IQ_ROSTER,				typeof(agsXMPP.protocol.iq.roster.RosterItem));
+			AddElementType("group",				Uri.IQ_ROSTER,				typeof(agsXMPP.protocol.Base.Group));
+			AddElementType("group",				Uri.X_ROSTERX,				typeof(agsXMPP.protocol.Base.Group));
+
+			AddElementType("item",				Uri.IQ_SEARCH,				typeof(agsXMPP.protocol.iq.search.SearchItem));			
+			
+            // Stream stuff
+			AddElementType("stream",			Uri.STREAM,					typeof(agsXMPP.protocol.Stream));			
+            AddElementType("error",				Uri.STREAM,					typeof(agsXMPP.protocol.Error));
+			
+			AddElementType("query",				Uri.IQ_AUTH,				typeof(agsXMPP.protocol.iq.auth.Auth));
+			AddElementType("query",				Uri.IQ_AGENTS,				typeof(agsXMPP.protocol.iq.agent.Agents));
+			AddElementType("query",				Uri.IQ_ROSTER,				typeof(agsXMPP.protocol.iq.roster.Roster));
+			AddElementType("query",				Uri.IQ_LAST,				typeof(agsXMPP.protocol.iq.last.Last));
+            AddElementType("query",				Uri.IQ_VERSION,				typeof(agsXMPP.protocol.iq.version.Version));
+			AddElementType("query",				Uri.IQ_TIME,				typeof(agsXMPP.protocol.iq.time.Time));
+			AddElementType("query",				Uri.IQ_OOB,					typeof(agsXMPP.protocol.iq.oob.Oob));
+			AddElementType("query",				Uri.IQ_SEARCH,				typeof(agsXMPP.protocol.iq.search.Search));
+			AddElementType("query",				Uri.IQ_BROWSE,				typeof(agsXMPP.protocol.iq.browse.Browse));
+			AddElementType("query",				Uri.IQ_AVATAR,				typeof(agsXMPP.protocol.iq.avatar.Avatar));
+			AddElementType("query",				Uri.IQ_REGISTER,			typeof(agsXMPP.protocol.iq.register.Register));
+			AddElementType("query",				Uri.IQ_PRIVATE,				typeof(agsXMPP.protocol.iq. at private.Private));
+            
+            // Privacy Lists
+            AddElementType("query",             Uri.IQ_PRIVACY,             typeof(agsXMPP.protocol.iq.privacy.Privacy));
+            AddElementType("item",              Uri.IQ_PRIVACY,             typeof(agsXMPP.protocol.iq.privacy.Item));
+            AddElementType("list",              Uri.IQ_PRIVACY,             typeof(agsXMPP.protocol.iq.privacy.List));
+            AddElementType("active",            Uri.IQ_PRIVACY,             typeof(agsXMPP.protocol.iq.privacy.Active));
+            AddElementType("default",           Uri.IQ_PRIVACY,             typeof(agsXMPP.protocol.iq.privacy.Default));
+                        
+			// Browse
+			AddElementType("service",			Uri.IQ_BROWSE,				typeof(agsXMPP.protocol.iq.browse.Service));
+			AddElementType("item",				Uri.IQ_BROWSE,				typeof(agsXMPP.protocol.iq.browse.BrowseItem));
+
+			// Service Discovery			
+			AddElementType("query",				Uri.DISCO_ITEMS,			typeof(agsXMPP.protocol.iq.disco.DiscoItems));			
+			AddElementType("query",				Uri.DISCO_INFO,				typeof(agsXMPP.protocol.iq.disco.DiscoInfo));
+			AddElementType("feature",			Uri.DISCO_INFO,			    typeof(agsXMPP.protocol.iq.disco.DiscoFeature));
+			AddElementType("identity",			Uri.DISCO_INFO,			    typeof(agsXMPP.protocol.iq.disco.DiscoIdentity));			
+			AddElementType("item",				Uri.DISCO_ITEMS,			typeof(agsXMPP.protocol.iq.disco.DiscoItem));
+
+			AddElementType("x",					Uri.X_DELAY,				typeof(agsXMPP.protocol.x.Delay));
+			AddElementType("x",					Uri.X_AVATAR,				typeof(agsXMPP.protocol.x.Avatar));
+			AddElementType("x",					Uri.X_CONFERENCE,			typeof(agsXMPP.protocol.x.Conference));
+            AddElementType("x",                 Uri.X_EVENT,                typeof(agsXMPP.protocol.x.Event));
+			
+			//AddElementType("x",					Uri.STORAGE_AVATAR,	typeof(agsXMPP.protocol.storage.Avatar));
+			AddElementType("query",				Uri.STORAGE_AVATAR,			typeof(agsXMPP.protocol.storage.Avatar));
+
+			// XData Stuff
+			AddElementType("x",					Uri.X_DATA,					typeof(agsXMPP.protocol.x.data.Data));
+			AddElementType("field",				Uri.X_DATA,					typeof(agsXMPP.protocol.x.data.Field));
+			AddElementType("option",			Uri.X_DATA,					typeof(agsXMPP.protocol.x.data.Option));
+			AddElementType("value",				Uri.X_DATA,					typeof(agsXMPP.protocol.x.data.Value));
+            AddElementType("reported",          Uri.X_DATA,                 typeof(agsXMPP.protocol.x.data.Reported));
+            AddElementType("item",              Uri.X_DATA,                 typeof(agsXMPP.protocol.x.data.Item));
+			
+			AddElementType("features",			Uri.STREAM,					typeof(agsXMPP.protocol.stream.Features));
+
+			AddElementType("register",			Uri.FEATURE_IQ_REGISTER,	typeof(agsXMPP.protocol.stream.feature.Register));
+            AddElementType("compression",       Uri.FEATURE_COMPRESS,       typeof(agsXMPP.protocol.stream.feature.compression.Compression));
+            AddElementType("method",            Uri.FEATURE_COMPRESS,       typeof(agsXMPP.protocol.stream.feature.compression.Method));
+
+			AddElementType("bind",				Uri.BIND,					typeof(agsXMPP.protocol.iq.bind.Bind));
+			AddElementType("session",			Uri.SESSION,				typeof(agsXMPP.protocol.iq.session.Session));
+			
+			// TLS stuff
+			AddElementType("failure",			Uri.TLS,					typeof(agsXMPP.protocol.tls.Failure));
+			AddElementType("proceed",			Uri.TLS,					typeof(agsXMPP.protocol.tls.Proceed));
+			AddElementType("starttls",			Uri.TLS,					typeof(agsXMPP.protocol.tls.StartTls));
+
+			// SASL stuff
+			AddElementType("mechanisms",		Uri.SASL,					typeof(agsXMPP.protocol.sasl.Mechanisms));
+			AddElementType("mechanism",			Uri.SASL,					typeof(agsXMPP.protocol.sasl.Mechanism));			
+			AddElementType("auth",				Uri.SASL,					typeof(agsXMPP.protocol.sasl.Auth));
+			AddElementType("response",			Uri.SASL,					typeof(agsXMPP.protocol.sasl.Response));
+			AddElementType("challenge",			Uri.SASL,					typeof(agsXMPP.protocol.sasl.Challenge));
+            
+            // TODO, this is a dirty hacks for the buggy BOSH Proxy
+            // BEGIN
+            AddElementType("challenge",         Uri.CLIENT,                 typeof(agsXMPP.protocol.sasl.Challenge));
+            AddElementType("success",           Uri.CLIENT,                 typeof(agsXMPP.protocol.sasl.Success));
+            // END
+
+			AddElementType("failure",			Uri.SASL,					typeof(agsXMPP.protocol.sasl.Failure));
+			AddElementType("abort",				Uri.SASL,					typeof(agsXMPP.protocol.sasl.Abort));
+			AddElementType("success",			Uri.SASL,					typeof(agsXMPP.protocol.sasl.Success));
+            
+			// Vcard stuff
+			AddElementType("vCard",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Vcard));
+            AddElementType("TEL",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Telephone));
+			AddElementType("ORG",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Organization));
+			AddElementType("N",					Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Name));
+			AddElementType("EMAIL",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Email));			
+			AddElementType("ADR",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Address));
+#if !CF
+			AddElementType("PHOTO",				Uri.VCARD,					typeof(agsXMPP.protocol.iq.vcard.Photo));
+#endif
+            // Server stuff
+            //AddElementType("stream",            Uri.SERVER,                 typeof(agsXMPP.protocol.server.Stream));
+            //AddElementType("message",           Uri.SERVER,                 typeof(agsXMPP.protocol.server.Message));
+
+			// Component stuff
+			AddElementType("handshake",			Uri.ACCEPT,					typeof(agsXMPP.protocol.component.Handshake));
+			AddElementType("log",				Uri.ACCEPT,					typeof(agsXMPP.protocol.component.Log));
+			AddElementType("route",				Uri.ACCEPT,					typeof(agsXMPP.protocol.component.Route));
+			AddElementType("iq",				Uri.ACCEPT,					typeof(agsXMPP.protocol.component.IQ));
+            AddElementType("message",           Uri.ACCEPT,                 typeof(agsXMPP.protocol.component.Message));
+            AddElementType("presence",          Uri.ACCEPT,                 typeof(agsXMPP.protocol.component.Presence));
+            AddElementType("error",             Uri.ACCEPT,                 typeof(agsXMPP.protocol.component.Error));
+
+			//Extensions (JEPS)
+			AddElementType("header",			Uri.SHIM,					typeof(agsXMPP.protocol.extensions.shim.Header));
+			AddElementType("headers",			Uri.SHIM,					typeof(agsXMPP.protocol.extensions.shim.Headers));
+			AddElementType("roster",			Uri.ROSTER_DELIMITER,		typeof(agsXMPP.protocol.iq.roster.Delimiter));
+			AddElementType("p",					Uri.PRIMARY,				typeof(agsXMPP.protocol.extensions.primary.Primary));
+            AddElementType("nick",              Uri.NICK,                   typeof(agsXMPP.protocol.extensions.nickname.Nickname));
+
+			AddElementType("item",				Uri.X_ROSTERX,				typeof(agsXMPP.protocol.x.rosterx.RosterItem));
+			AddElementType("x",					Uri.X_ROSTERX,				typeof(agsXMPP.protocol.x.rosterx.RosterX));
+
+            // Filetransfer stuff
+			AddElementType("file",				Uri.SI_FILE_TRANSFER,		typeof(agsXMPP.protocol.extensions.filetransfer.File));
+			AddElementType("range",				Uri.SI_FILE_TRANSFER,		typeof(agsXMPP.protocol.extensions.filetransfer.Range));
+
+            // FeatureNeg
+            AddElementType("feature",           Uri.FEATURE_NEG,            typeof(agsXMPP.protocol.extensions.featureneg.FeatureNeg));
+
+            // Bytestreams
+            AddElementType("query",             Uri.BYTESTREAMS,            typeof(agsXMPP.protocol.extensions.bytestreams.ByteStream));
+            AddElementType("streamhost",        Uri.BYTESTREAMS,            typeof(agsXMPP.protocol.extensions.bytestreams.StreamHost));
+            AddElementType("streamhost-used",   Uri.BYTESTREAMS,            typeof(agsXMPP.protocol.extensions.bytestreams.StreamHostUsed));
+            AddElementType("activate",          Uri.BYTESTREAMS,            typeof(agsXMPP.protocol.extensions.bytestreams.Activate));
+            AddElementType("udpsuccess",        Uri.BYTESTREAMS,            typeof(agsXMPP.protocol.extensions.bytestreams.UdpSuccess));
+            
+
+			AddElementType("si",				Uri.SI,						typeof(agsXMPP.protocol.extensions.si.SI));
+            
+            AddElementType("html",              Uri.XHTML_IM,               typeof(agsXMPP.protocol.extensions.html.Html));
+            AddElementType("body",              Uri.XHTML,                  typeof(agsXMPP.protocol.extensions.html.Body));
+            
+            AddElementType("compressed",        Uri.COMPRESS,               typeof(agsXMPP.protocol.extensions.compression.Compressed));
+            AddElementType("compress",          Uri.COMPRESS,               typeof(agsXMPP.protocol.extensions.compression.Compress));
+            AddElementType("failure",           Uri.COMPRESS,               typeof(agsXMPP.protocol.extensions.compression.Failure));
+                    
+            // MUC (JEP-0045 Multi User Chat)
+            AddElementType("x",                 Uri.MUC,                    typeof(agsXMPP.protocol.x.muc.Muc));
+            AddElementType("x",                 Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.User));
+            AddElementType("item",              Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.Item));
+            AddElementType("status",            Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.Status));
+            AddElementType("invite",            Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.Invite));
+            AddElementType("decline",           Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.Decline));
+            AddElementType("actor",             Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.Actor));
+            AddElementType("history",           Uri.MUC,                    typeof(agsXMPP.protocol.x.muc.History));
+            AddElementType("query",             Uri.MUC_ADMIN,              typeof(agsXMPP.protocol.x.muc.iq.admin.Admin));
+            AddElementType("item",              Uri.MUC_ADMIN,              typeof(agsXMPP.protocol.x.muc.iq.admin.Item));
+            AddElementType("query",             Uri.MUC_OWNER,              typeof(agsXMPP.protocol.x.muc.iq.owner.Owner));
+            AddElementType("destroy",           Uri.MUC_OWNER,              typeof(agsXMPP.protocol.x.muc.owner.Destroy));
+            AddElementType("destroy",           Uri.MUC_USER,               typeof(agsXMPP.protocol.x.muc.user.Destroy));
+            
+
+            //Jabber RPC JEP 0009            
+            AddElementType("query",             Uri.IQ_RPC,                 typeof(agsXMPP.protocol.iq.rpc.Rpc));
+            AddElementType("methodCall",        Uri.IQ_RPC,                 typeof(agsXMPP.protocol.iq.rpc.MethodCall));
+            AddElementType("methodResponse",    Uri.IQ_RPC,                 typeof(agsXMPP.protocol.iq.rpc.MethodResponse));
+
+            // Chatstates Jep-0085
+            AddElementType("active",            Uri.CHATSTATES,             typeof(agsXMPP.protocol.extensions.chatstates.Active));
+            AddElementType("inactive",          Uri.CHATSTATES,             typeof(agsXMPP.protocol.extensions.chatstates.Inactive));
+            AddElementType("composing",         Uri.CHATSTATES,             typeof(agsXMPP.protocol.extensions.chatstates.Composing));
+            AddElementType("paused",            Uri.CHATSTATES,             typeof(agsXMPP.protocol.extensions.chatstates.Paused));
+            AddElementType("gone",              Uri.CHATSTATES,             typeof(agsXMPP.protocol.extensions.chatstates.Gone));
+
+            // Jivesoftware Extenstions
+            AddElementType("phone-event",       Uri.JIVESOFTWARE_PHONE,     typeof(agsXMPP.protocol.extensions.jivesoftware.phone.PhoneEvent));
+            AddElementType("phone-action",      Uri.JIVESOFTWARE_PHONE,     typeof(agsXMPP.protocol.extensions.jivesoftware.phone.PhoneAction));
+            AddElementType("phone-status",      Uri.JIVESOFTWARE_PHONE,     typeof(agsXMPP.protocol.extensions.jivesoftware.phone.PhoneStatus));
+
+            // Jingle stuff is in heavy development, we commit this once the most changes on the Jeps are done            
+            //AddElementType("jingle",            Uri.JINGLE,                 typeof(agsXMPP.protocol.extensions.jingle.Jingle));
+            //AddElementType("candidate",         Uri.JINGLE,                 typeof(agsXMPP.protocol.extensions.jingle.Candidate));
+
+            AddElementType("c",                 Uri.CAPS,                   typeof(agsXMPP.protocol.extensions.caps.Capabilities));
+
+            AddElementType("geoloc",            Uri.GEOLOC,                 typeof(agsXMPP.protocol.extensions.geoloc.GeoLoc));
+
+            // Xmpp Ping
+            AddElementType("ping",              Uri.PING,                   typeof(agsXMPP.protocol.extensions.ping.Ping));
+
+            //Ad-Hock Commands
+            AddElementType("command",           Uri.COMMANDS,               typeof(agsXMPP.protocol.extensions.commands.Command));
+            AddElementType("actions",           Uri.COMMANDS,               typeof(agsXMPP.protocol.extensions.commands.Actions));
+            AddElementType("note",              Uri.COMMANDS,               typeof(agsXMPP.protocol.extensions.commands.Note));
+
+            // **********
+            // * PubSub *
+            // **********
+            // Owner namespace
+            AddElementType("affiliate",         Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Affiliate));
+            AddElementType("affiliates",        Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Affiliates));
+            AddElementType("configure",         Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Configure));
+            AddElementType("delete",            Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Delete));
+            AddElementType("pending",           Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Pending));
+            AddElementType("pubsub",            Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.PubSub));
+            AddElementType("purge",             Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Purge));
+            AddElementType("subscriber",        Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Subscriber));
+            AddElementType("subscribers",       Uri.PUBSUB_OWNER,           typeof(agsXMPP.protocol.extensions.pubsub.owner.Subscribers));
+
+            // Event namespace
+            AddElementType("delete",            Uri.PUBSUB_EVENT,           typeof(agsXMPP.protocol.extensions.pubsub. at event.Delete));
+            AddElementType("event",             Uri.PUBSUB_EVENT,           typeof(agsXMPP.protocol.extensions.pubsub. at event.Event));
+            AddElementType("item",              Uri.PUBSUB_EVENT,           typeof(agsXMPP.protocol.extensions.pubsub. at event.Item));
+            AddElementType("items",             Uri.PUBSUB_EVENT,           typeof(agsXMPP.protocol.extensions.pubsub. at event.Items));
+            AddElementType("purge",             Uri.PUBSUB_EVENT,           typeof(agsXMPP.protocol.extensions.pubsub. at event.Purge));
+
+            // Main Pubsub namespace
+            AddElementType("affiliation",       Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Affiliation));
+            AddElementType("affiliations",      Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Affiliations));
+            AddElementType("configure",         Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Configure));
+            AddElementType("create",            Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Create));
+            AddElementType("configure",         Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Configure));
+            AddElementType("item",              Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Item));
+            AddElementType("items",             Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Items));
+            AddElementType("options",           Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Options));
+            AddElementType("publish",           Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Publish));
+            AddElementType("pubsub",            Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.PubSub));
+            AddElementType("retract",           Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Retract));
+            AddElementType("subscribe",         Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Subscribe));
+            AddElementType("subscribe-options", Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.SubscribeOptions));
+            AddElementType("subscription",      Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Subscription));
+            AddElementType("subscriptions",     Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Subscriptions));
+            AddElementType("unsubscribe",       Uri.PUBSUB,                 typeof(agsXMPP.protocol.extensions.pubsub.Unsubscribe));           
+
+            // HTTP Binding XEP-0124
+            AddElementType("body",              Uri.HTTP_BIND,              typeof(agsXMPP.protocol.extensions.bosh.Body));
+
+            // Message receipts XEP-0184
+            AddElementType("received",          Uri.MSG_RECEIPT,            typeof(agsXMPP.protocol.extensions.msgreceipts.Received));
+            AddElementType("request",           Uri.MSG_RECEIPT,            typeof(agsXMPP.protocol.extensions.msgreceipts.Request));
+
+            // Bookmark storage XEP-0048         
+            AddElementType("storage",           Uri.STORAGE_BOOKMARKS,      typeof(agsXMPP.protocol.extensions.bookmarks.Storage));
+            AddElementType("url",               Uri.STORAGE_BOOKMARKS,      typeof(agsXMPP.protocol.extensions.bookmarks.Url));
+            AddElementType("conference",        Uri.STORAGE_BOOKMARKS,      typeof(agsXMPP.protocol.extensions.bookmarks.Conference));
+            
+            // XEP-0047: In-Band Bytestreams (IBB)
+            AddElementType("open",              Uri.IBB,                    typeof(agsXMPP.protocol.extensions.ibb.Open));
+            AddElementType("data",              Uri.IBB,                    typeof(agsXMPP.protocol.extensions.ibb.Data));
+            AddElementType("close",             Uri.IBB,                    typeof(agsXMPP.protocol.extensions.ibb.Close));
+                    
+            // XEP-0153: vCard-Based Avatars
+            AddElementType("x",                 Uri.VCARD_UPDATE,           typeof(agsXMPP.protocol.x.vcard_update.VcardUpdate));
+
+            // AMP
+            AddElementType("amp",               Uri.AMP,                    typeof(agsXMPP.protocol.extensions.amp.Amp));
+            AddElementType("rule",              Uri.AMP,                    typeof(agsXMPP.protocol.extensions.amp.Rule));
+
+            // Urn Time
+            AddElementType("time",              Uri.URN_TIME,               typeof(agsXMPP.protocol.time.Time));
+
+            // XEP-0145 Annotations
+            AddElementType("storage",           Uri.STORAGE_ROSTERNOTES,    typeof(agsXMPP.protocol.extensions.bookmarks.RosterNotes));
+            AddElementType("note",              Uri.STORAGE_ROSTERNOTES,    typeof(agsXMPP.protocol.extensions.bookmarks.RosterNote));
+		}		
+		
+		/// <summary>
+		/// Adds new Element Types to the Hashtable
+		/// Use this function also to register your own created Elements.
+        /// If a element is already registered it gets overwritten. This behaviour is also useful if you you want to overwrite
+        /// classes and add your own derived classes to the factory.
+		/// </summary>
+		/// <param name="tag">FQN</param>
+		/// <param name="ns"></param>
+		/// <param name="t"></param>
+		public static void AddElementType(string tag, string ns, System.Type t)
+		{
+            ElementType et = new ElementType(tag, ns);
+            string key = et.ToString();
+            // added thread safety on a user request
+            lock (m_table)
+            {
+                if (m_table.ContainsKey(key))
+                    m_table[key] = t;
+                else
+                    m_table.Add(et.ToString(), t);
+            }
+		}
+        
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="prefix"></param>
+		/// <param name="tag"></param>
+		/// <param name="ns"></param>
+		/// <returns></returns>
+		public static Element GetElement(string prefix, string tag, string ns)
+		{
+			if (ns == null)
+				ns = "";
+
+			ElementType et = new ElementType(tag, ns);			
+			System.Type t = (System.Type) m_table[et.ToString()];
+
+			Element ret;			
+			if (t != null)
+				ret = (Element) System.Activator.CreateInstance(t);				
+			else
+			    ret = new Element(tag);				
+			
+			ret.Prefix = prefix;
+
+			if (ns!="")
+				ret.Namespace = ns;
+			
+			return ret;
+		}		
+	}  
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Factory/ElementType.cs b/lib/agsxmpp/agsxmpp/Factory/ElementType.cs
new file mode 100644
index 0000000..f69ee8e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Factory/ElementType.cs
@@ -0,0 +1,55 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Factory
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class ElementType
+    {
+        private string m_TagName;
+        private string m_Namespace;
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="TagName"></param>
+        /// <param name="Namespace"></param>
+        public ElementType(string TagName, string Namespace)
+        {
+            this.m_TagName      = TagName;
+            this.m_Namespace    = Namespace;
+        }
+
+        public override string ToString()
+        {
+            if ((m_Namespace != null) && (m_Namespace != string.Empty))
+            {
+                return (m_Namespace + ":" + m_TagName);
+            }
+            return m_TagName;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/Factory/SaslFactory.cs b/lib/agsxmpp/agsxmpp/Factory/SaslFactory.cs
new file mode 100644
index 0000000..52f8829
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Factory/SaslFactory.cs
@@ -0,0 +1,86 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+using agsXMPP.Sasl;
+using agsXMPP.Sasl.Facebook;
+using agsXMPP.Sasl.Plain;
+using agsXMPP.Sasl.DigestMD5;
+using agsXMPP.Sasl.Anonymous;
+using agsXMPP.Sasl.XGoogleToken;
+#if !(CF || CF_2)
+using agsXMPP.Sasl.Scram;
+#endif
+#if !(CF || CF_2 || MONO)
+using agsXMPP.Sasl.Gssapi;
+#endif
+
+namespace agsXMPP.Factory
+{
+	/// <summary>
+	/// SASL factory
+	/// </summary>
+	public class SaslFactory
+	{
+		/// <summary>
+		/// This Hashtable stores Mapping of mechanism <--> SASL class in agsXMPP
+		/// </summary>
+		private static readonly Hashtable m_table = new Hashtable();
+
+		static SaslFactory()
+		{
+			AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.PLAIN),		        typeof(PlainMechanism));
+			AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.DIGEST_MD5),	        typeof(DigestMD5Mechanism));
+            AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.ANONYMOUS),           typeof(AnonymousMechanism));
+            AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.X_GOOGLE_TOKEN),      typeof(XGoogleTokenMechanism));
+            AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.X_FACEBOOK_PLATFORM), typeof(FacebookMechanism));
+#if !(CF || CF_2)
+            AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.SCRAM_SHA_1),         typeof(ScramSha1Mechanism));
+#endif
+#if !(CF || CF_2 || MONO)
+            AddMechanism(protocol.sasl.Mechanism.GetMechanismName(protocol.sasl.MechanismType.GSSAPI),              typeof(GssapiMechanism));
+#endif
+		}
+
+
+		public static Mechanism GetMechanism(string mechanism)
+		{
+			var t = (Type) m_table[mechanism];
+			if (t != null)
+				return (Mechanism) Activator.CreateInstance(t);
+			else
+				return null;			
+		}
+		
+		/// <summary>
+		/// Adds new Element Types to the Hashtable
+		/// Use this function to register new SASL mechanisms
+		/// </summary>
+		/// <param name="mechanism"></param>
+		/// <param name="t"></param>
+		public static void AddMechanism(string mechanism, System.Type t)
+		{
+			m_table.Add( mechanism, t);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/Adler32.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/Adler32.cs
new file mode 100644
index 0000000..26f3c8f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/Adler32.cs
@@ -0,0 +1,200 @@
+// Adler32.cs - Computes Adler32 data checksum of a data stream
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression.Checksums 
+{
+	
+	/// <summary>
+	/// Computes Adler32 checksum for a stream of data. An Adler32
+	/// checksum is not as reliable as a CRC32 checksum, but a lot faster to
+	/// compute.
+	/// 
+	/// The specification for Adler32 may be found in RFC 1950.
+	/// ZLIB Compressed Data Format Specification version 3.3)
+	/// 
+	/// 
+	/// From that document:
+	/// 
+	///      "ADLER32 (Adler-32 checksum)
+	///       This contains a checksum value of the uncompressed data
+	///       (excluding any dictionary data) computed according to Adler-32
+	///       algorithm. This algorithm is a 32-bit extension and improvement
+	///       of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
+	///       standard.
+	/// 
+	///       Adler-32 is composed of two sums accumulated per byte: s1 is
+	///       the sum of all bytes, s2 is the sum of all s1 values. Both sums
+	///       are done modulo 65521. s1 is initialized to 1, s2 to zero.  The
+	///       Adler-32 checksum is stored as s2*65536 + s1 in most-
+	///       significant-byte first (network) order."
+	/// 
+	///  "8.2. The Adler-32 algorithm
+	/// 
+	///    The Adler-32 algorithm is much faster than the CRC32 algorithm yet
+	///    still provides an extremely low probability of undetected errors.
+	/// 
+	///    The modulo on unsigned long accumulators can be delayed for 5552
+	///    bytes, so the modulo operation time is negligible.  If the bytes
+	///    are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
+	///    and order sensitive, unlike the first sum, which is just a
+	///    checksum.  That 65521 is prime is important to avoid a possible
+	///    large class of two-byte errors that leave the check unchanged.
+	///    (The Fletcher checksum uses 255, which is not prime and which also
+	///    makes the Fletcher check insensitive to single byte changes 0 -
+	///    255.)
+	/// 
+	///    The sum s1 is initialized to 1 instead of zero to make the length
+	///    of the sequence part of s2, so that the length does not have to be
+	///    checked separately. (Any sequence of zeroes has a Fletcher
+	///    checksum of zero.)"
+	/// </summary>
+	/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream"/>
+	/// <see cref="ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream"/>
+	public sealed class Adler32 : IChecksum
+	{
+		/// <summary>
+		/// largest prime smaller than 65536
+		/// </summary>
+		readonly static uint BASE = 65521;
+		
+		uint checksum;
+		
+		/// <summary>
+		/// Returns the Adler32 data checksum computed so far.
+		/// </summary>
+		public long Value {
+			get {
+				return checksum;
+			}
+		}
+		
+		/// <summary>
+		/// Creates a new instance of the Adler32 class.
+		/// The checksum starts off with a value of 1.
+		/// </summary>
+		public Adler32()
+		{
+			Reset();
+		}
+		
+		/// <summary>
+		/// Resets the Adler32 checksum to the initial value.
+		/// </summary>
+		public void Reset()
+		{
+			checksum = 1;
+		}
+		
+		/// <summary>
+		/// Updates the checksum with the byte b.
+		/// </summary>
+		/// <param name="bval">
+		/// The data value to add. The high byte of the int is ignored.
+		/// </param>
+		public void Update(int bval)
+		{
+			// We could make a length 1 byte array and call update again, but I
+			// would rather not have that overhead
+			uint s1 = checksum & 0xFFFF;
+			uint s2 = checksum >> 16;
+			
+			s1 = (s1 + ((uint)bval & 0xFF)) % BASE;
+			s2 = (s1 + s2) % BASE;
+			
+			checksum = (s2 << 16) + s1;
+		}
+		
+		/// <summary>
+		/// Updates the checksum with an array of bytes.
+		/// </summary>
+		/// <param name="buffer">
+		/// The source of the data to update with.
+		/// </param>
+		public void Update(byte[] buffer)
+		{
+			Update(buffer, 0, buffer.Length);
+		}
+		
+		/// <summary>
+		/// Updates the checksum with the bytes taken from the array.
+		/// </summary>
+		/// <param name="buf">
+		/// an array of bytes
+		/// </param>
+		/// <param name="off">
+		/// the start of the data used for this update
+		/// </param>
+		/// <param name="len">
+		/// the number of bytes to use for this update
+		/// </param>
+		public void Update(byte[] buf, int off, int len)
+		{
+			if (buf == null) {
+				throw new ArgumentNullException("buf");
+			}
+			
+			if (off < 0 || len < 0 || off + len > buf.Length) {
+				throw new ArgumentOutOfRangeException();
+			}
+			
+			//(By Per Bothner)
+			uint s1 = checksum & 0xFFFF;
+			uint s2 = checksum >> 16;
+			
+			while (len > 0) {
+				// We can defer the modulo operation:
+				// s1 maximally grows from 65521 to 65521 + 255 * 3800
+				// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
+				int n = 3800;
+				if (n > len) {
+					n = len;
+				}
+				len -= n;
+				while (--n >= 0) {
+					s1 = s1 + (uint)(buf[off++] & 0xFF);
+					s2 = s2 + s1;
+				}
+				s1 %= BASE;
+				s2 %= BASE;
+			}
+			
+			checksum = (s2 << 16) | s1;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/IChecksum.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/IChecksum.cs
new file mode 100644
index 0000000..29bd3de
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Checksums/IChecksum.cs
@@ -0,0 +1,93 @@
+// IChecksum.cs - Interface to compute a data checksum
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+namespace agsXMPP.IO.Compression.Checksums 
+{
+	
+	/// <summary>
+	/// Interface to compute a data checksum used by checked input/output streams.
+	/// A data checksum can be updated by one byte or with a byte array. After each
+	/// update the value of the current checksum can be returned by calling
+	/// <code>getValue</code>. The complete checksum object can also be reset
+	/// so it can be used again with new data.
+	/// </summary>
+	public interface IChecksum
+	{
+		/// <summary>
+		/// Returns the data checksum computed so far.
+		/// </summary>
+		long Value 
+		{
+			get;
+		}
+		
+		/// <summary>
+		/// Resets the data checksum as if no update was ever called.
+		/// </summary>
+		void Reset();
+		
+		/// <summary>
+		/// Adds one byte to the data checksum.
+		/// </summary>
+		/// <param name = "bval">
+		/// the data value to add. The high byte of the int is ignored.
+		/// </param>
+		void Update(int bval);
+		
+		/// <summary>
+		/// Updates the data checksum with the bytes taken from the array.
+		/// </summary>
+		/// <param name="buffer">
+		/// buffer an array of bytes
+		/// </param>
+		void Update(byte[] buffer);
+		
+		/// <summary>
+		/// Adds the byte array to the data checksum.
+		/// </summary>
+		/// <param name = "buf">
+		/// the buffer which contains the data
+		/// </param>
+		/// <param name = "off">
+		/// the offset in the buffer where the data starts
+		/// </param>
+		/// <param name = "len">
+		/// the length of the data
+		/// </param>
+		void Update(byte[] buf, int off, int len);
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Deflater.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Deflater.cs
new file mode 100644
index 0000000..b1ab659
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Deflater.cs
@@ -0,0 +1,552 @@
+// Deflater.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// This is the Deflater class.  The deflater class compresses input
+	/// with the deflate algorithm described in RFC 1951.  It has several
+	/// compression levels and three different strategies described below.
+	///
+	/// This class is <i>not</i> thread safe.  This is inherent in the API, due
+	/// to the split of deflate and setInput.
+	/// 
+	/// author of the original java version : Jochen Hoenicke
+	/// </summary>
+	public class Deflater
+	{
+		/// <summary>
+		/// The best and slowest compression level.  This tries to find very
+		/// long and distant string repetitions.
+		/// </summary>
+		public static  int BEST_COMPRESSION = 9;
+		
+		/// <summary>
+		/// The worst but fastest compression level.
+		/// </summary>
+		public static  int BEST_SPEED = 1;
+		
+		/// <summary>
+		/// The default compression level.
+		/// </summary>
+		public static  int DEFAULT_COMPRESSION = -1;
+		
+		/// <summary>
+		/// This level won't compress at all but output uncompressed blocks.
+		/// </summary>
+		public static  int NO_COMPRESSION = 0;
+				
+		/// <summary>
+		/// The compression method.  This is the only method supported so far.
+		/// There is no need to use this constant at all.
+		/// </summary>
+		public static  int DEFLATED = 8;
+		
+		/*
+		* The Deflater can do the following state transitions:
+			*
+			* (1) -> INIT_STATE   ----> INIT_FINISHING_STATE ---.
+			*        /  | (2)      (5)                         |
+			*       /   v          (5)                         |
+			*   (3)| SETDICT_STATE ---> SETDICT_FINISHING_STATE |(3)
+			*       \   | (3)                 |        ,-------'
+			*        |  |                     | (3)   /
+			*        v  v          (5)        v      v
+			* (1) -> BUSY_STATE   ----> FINISHING_STATE
+			*                                | (6)
+			*                                v
+			*                           FINISHED_STATE
+			*    \_____________________________________/
+			*          | (7)
+			*          v
+			*        CLOSED_STATE
+			*
+			* (1) If we should produce a header we start in INIT_STATE, otherwise
+			*     we start in BUSY_STATE.
+			* (2) A dictionary may be set only when we are in INIT_STATE, then
+			*     we change the state as indicated.
+			* (3) Whether a dictionary is set or not, on the first call of deflate
+			*     we change to BUSY_STATE.
+			* (4) -- intentionally left blank -- :)
+			* (5) FINISHING_STATE is entered, when flush() is called to indicate that
+			*     there is no more INPUT.  There are also states indicating, that
+			*     the header wasn't written yet.
+			* (6) FINISHED_STATE is entered, when everything has been flushed to the
+			*     internal pending output buffer.
+			* (7) At any time (7)
+			*
+			*/
+			
+		private static  int IS_SETDICT              = 0x01;
+		private static  int IS_FLUSHING             = 0x04;
+		private static  int IS_FINISHING            = 0x08;
+		
+		private static  int INIT_STATE              = 0x00;
+		private static  int SETDICT_STATE           = 0x01;
+		//		private static  int INIT_FINISHING_STATE    = 0x08;
+		//		private static  int SETDICT_FINISHING_STATE = 0x09;
+		private static  int BUSY_STATE              = 0x10;
+		private static  int FLUSHING_STATE          = 0x14;
+		private static  int FINISHING_STATE         = 0x1c;
+		private static  int FINISHED_STATE          = 0x1e;
+		private static  int CLOSED_STATE            = 0x7f;
+		
+		/// <summary>
+		/// Compression level.
+		/// </summary>
+		private int level;
+		
+		/// <summary>
+		/// If true no Zlib/RFC1950 headers or footers are generated
+		/// </summary>
+		private bool noZlibHeaderOrFooter;
+		
+		/// <summary>
+		/// The current state.
+		/// </summary>
+		private int state;
+		
+		/// <summary>
+		/// The total bytes of output written.
+		/// </summary>
+		private long totalOut;
+		
+		/// <summary>
+		/// The pending output.
+		/// </summary>
+		private DeflaterPending pending;
+		
+		/// <summary>
+		/// The deflater engine.
+		/// </summary>
+		private DeflaterEngine engine;
+		
+		/// <summary>
+		/// Creates a new deflater with default compression level.
+		/// </summary>
+		public Deflater() : this(DEFAULT_COMPRESSION, false)
+		{
+			
+		}
+		
+		/// <summary>
+		/// Creates a new deflater with given compression level.
+		/// </summary>
+		/// <param name="lvl">
+		/// the compression level, a value between NO_COMPRESSION
+		/// and BEST_COMPRESSION, or DEFAULT_COMPRESSION.
+		/// </param>
+		/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
+		public Deflater(int lvl) : this(lvl, false)
+		{
+			
+		}
+		
+		/// <summary>
+		/// Creates a new deflater with given compression level.
+		/// </summary>
+		/// <param name="level">
+		/// the compression level, a value between NO_COMPRESSION
+		/// and BEST_COMPRESSION.
+		/// </param>
+		/// <param name="noZlibHeaderOrFooter">
+		/// true, if we should suppress the Zlib/RFC1950 header at the
+		/// beginning and the adler checksum at the end of the output.  This is
+		/// useful for the GZIP/PKZIP formats.
+		/// </param>
+		/// <exception cref="System.ArgumentOutOfRangeException">if lvl is out of range.</exception>
+		public Deflater(int level, bool noZlibHeaderOrFooter)
+		{
+			if (level == DEFAULT_COMPRESSION) {
+				level = 6;
+			} else if (level < NO_COMPRESSION || level > BEST_COMPRESSION) {
+				throw new ArgumentOutOfRangeException("level");
+			}
+			
+			pending = new DeflaterPending();
+			engine = new DeflaterEngine(pending);
+			this.noZlibHeaderOrFooter = noZlibHeaderOrFooter;
+			SetStrategy(DeflateStrategy.Default);
+			SetLevel(level);
+			Reset();
+		}
+		
+		
+		/// <summary>
+		/// Resets the deflater.  The deflater acts afterwards as if it was
+		/// just created with the same compression level and strategy as it
+		/// had before.
+		/// </summary>
+		public void Reset()
+		{
+			state = (noZlibHeaderOrFooter ? BUSY_STATE : INIT_STATE);
+			totalOut = 0;
+			pending.Reset();
+			engine.Reset();
+		}
+		
+		/// <summary>
+		/// Gets the current adler checksum of the data that was processed so far.
+		/// </summary>
+		public int Adler {
+			get {
+				return engine.Adler;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the number of input bytes processed so far.
+		/// </summary>
+		public int TotalIn {
+			get {
+				return engine.TotalIn;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the number of output bytes so far.
+		/// </summary>
+		public long TotalOut {
+			get {
+				return totalOut;
+			}
+		}
+		
+		/// <summary>
+		/// Flushes the current input block.  Further calls to deflate() will
+		/// produce enough output to inflate everything in the current input
+		/// block.  This is not part of Sun's JDK so I have made it package
+		/// private.  It is used by DeflaterOutputStream to implement
+		/// flush().
+		/// </summary>
+		public void Flush() 
+		{
+			state |= IS_FLUSHING;
+		}
+		
+		/// <summary>
+		/// Finishes the deflater with the current input block.  It is an error
+		/// to give more input after this method was called.  This method must
+		/// be called to force all bytes to be flushed.
+		/// </summary>
+		public void Finish() 
+		{
+			state |= IS_FLUSHING | IS_FINISHING;
+		}
+		
+		/// <summary>
+		/// Returns true if the stream was finished and no more output bytes
+		/// are available.
+		/// </summary>
+		public bool IsFinished {
+			get {
+				return state == FINISHED_STATE && pending.IsFlushed;
+			}
+		}
+		
+		/// <summary>
+		/// Returns true, if the input buffer is empty.
+		/// You should then call setInput(). 
+		/// NOTE: This method can also return true when the stream
+		/// was finished.
+		/// </summary>
+		public bool IsNeedingInput {
+			get {
+				return engine.NeedsInput();
+			}
+		}
+		
+		/// <summary>
+		/// Sets the data which should be compressed next.  This should be only
+		/// called when needsInput indicates that more input is needed.
+		/// If you call setInput when needsInput() returns false, the
+		/// previous input that is still pending will be thrown away.
+		/// The given byte array should not be changed, before needsInput() returns
+		/// true again.
+		/// This call is equivalent to <code>setInput(input, 0, input.length)</code>.
+		/// </summary>
+		/// <param name="input">
+		/// the buffer containing the input data.
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// if the buffer was finished() or ended().
+		/// </exception>
+		public void SetInput(byte[] input)
+		{
+			SetInput(input, 0, input.Length);
+		}
+		
+		/// <summary>
+		/// Sets the data which should be compressed next.  This should be
+		/// only called when needsInput indicates that more input is needed.
+		/// The given byte array should not be changed, before needsInput() returns
+		/// true again.
+		/// </summary>
+		/// <param name="input">
+		/// the buffer containing the input data.
+		/// </param>
+		/// <param name="off">
+		/// the start of the data.
+		/// </param>
+		/// <param name="len">
+		/// the length of the data.
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// if the buffer was finished() or ended() or if previous input is still pending.
+		/// </exception>
+		public void SetInput(byte[] input, int off, int len)
+		{
+			if ((state & IS_FINISHING) != 0) {
+				throw new InvalidOperationException("finish()/end() already called");
+			}
+			engine.SetInput(input, off, len);
+		}
+		
+		/// <summary>
+		/// Sets the compression level.  There is no guarantee of the exact
+		/// position of the change, but if you call this when needsInput is
+		/// true the change of compression level will occur somewhere near
+		/// before the end of the so far given input.
+		/// </summary>
+		/// <param name="lvl">
+		/// the new compression level.
+		/// </param>
+		public void SetLevel(int lvl)
+		{
+			if (lvl == DEFAULT_COMPRESSION) {
+				lvl = 6;
+			} else if (lvl < NO_COMPRESSION || lvl > BEST_COMPRESSION) {
+				throw new ArgumentOutOfRangeException("lvl");
+			}
+			
+			if (level != lvl) {
+				level = lvl;
+				engine.SetLevel(lvl);
+			}
+		}
+		
+		/// <summary>
+		/// Get current compression level
+		/// </summary>
+		/// <returns>Returns the current compression level</returns>
+		public int GetLevel() {
+			return level;
+		}
+		
+		/// <summary>
+		/// Sets the compression strategy. Strategy is one of
+		/// DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED.  For the exact
+		/// position where the strategy is changed, the same as for
+		/// setLevel() applies.
+		/// </summary>
+		/// <param name="strategy">
+		/// The new compression strategy.
+		/// </param>
+		public void SetStrategy(DeflateStrategy strategy)
+		{
+			engine.Strategy = strategy;
+		}
+		
+		/// <summary>
+		/// Deflates the current input block with to the given array.
+		/// </summary>
+		/// <param name="output">
+		/// The buffer where compressed data is stored
+		/// </param>
+		/// <returns>
+		/// The number of compressed bytes added to the output, or 0 if either
+		/// needsInput() or finished() returns true or length is zero.
+		/// </returns>
+		public int Deflate(byte[] output)
+		{
+			return Deflate(output, 0, output.Length);
+		}
+		
+		/// <summary>
+		/// Deflates the current input block to the given array.
+		/// </summary>
+		/// <param name="output">
+		/// Buffer to store the compressed data.
+		/// </param>
+		/// <param name="offset">
+		/// Offset into the output array.
+		/// </param>
+		/// <param name="length">
+		/// The maximum number of bytes that may be stored.
+		/// </param>
+		/// <returns>
+		/// The number of compressed bytes added to the output, or 0 if either
+		/// needsInput() or finished() returns true or length is zero.
+		/// </returns>
+		/// <exception cref="System.InvalidOperationException">
+		/// If end() was previously called.
+		/// </exception>
+		/// <exception cref="System.ArgumentOutOfRangeException">
+		/// If offset and/or length don't match the array length.
+		/// </exception>
+		public int Deflate(byte[] output, int offset, int length)
+		{
+			int origLength = length;
+			
+			if (state == CLOSED_STATE) {
+				throw new InvalidOperationException("Deflater closed");
+			}
+			
+			if (state < BUSY_STATE) {
+				/* output header */
+				int header = (DEFLATED +
+					((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8;
+				int level_flags = (level - 1) >> 1;
+				if (level_flags < 0 || level_flags > 3) {
+					level_flags = 3;
+				}
+				header |= level_flags << 6;
+				if ((state & IS_SETDICT) != 0) {
+					/* Dictionary was set */
+					header |= DeflaterConstants.PRESET_DICT;
+				}
+				header += 31 - (header % 31);
+				
+				
+				pending.WriteShortMSB(header);
+				if ((state & IS_SETDICT) != 0) {
+					int chksum = engine.Adler;
+					engine.ResetAdler();
+					pending.WriteShortMSB(chksum >> 16);
+					pending.WriteShortMSB(chksum & 0xffff);
+				}
+				
+				state = BUSY_STATE | (state & (IS_FLUSHING | IS_FINISHING));
+			}
+			
+			for (;;) {
+				int count = pending.Flush(output, offset, length);
+				offset   += count;
+				totalOut += count;
+				length   -= count;
+				
+				if (length == 0 || state == FINISHED_STATE) {
+					break;
+				}
+				
+				if (!engine.Deflate((state & IS_FLUSHING) != 0, (state & IS_FINISHING) != 0)) {
+					if (state == BUSY_STATE) {
+						/* We need more input now */
+						return origLength - length;
+					} else if (state == FLUSHING_STATE) {
+						if (level != NO_COMPRESSION) {
+							/* We have to supply some lookahead.  8 bit lookahead
+							 * is needed by the zlib inflater, and we must fill
+							 * the next byte, so that all bits are flushed.
+							 */
+							int neededbits = 8 + ((-pending.BitCount) & 7);
+							while (neededbits > 0) {
+								/* write a static tree block consisting solely of
+								 * an EOF:
+								 */
+								pending.WriteBits(2, 10);
+								neededbits -= 10;
+							}
+						}
+						state = BUSY_STATE;
+					} else if (state == FINISHING_STATE) {
+						pending.AlignToByte();
+
+						// Compressed data is complete.  Write footer information if required.
+						if (!noZlibHeaderOrFooter) {
+							int adler = engine.Adler;
+							pending.WriteShortMSB(adler >> 16);
+							pending.WriteShortMSB(adler & 0xffff);
+						}
+						state = FINISHED_STATE;
+					}
+				}
+			}
+			return origLength - length;
+		}
+		
+		/// <summary>
+		/// Sets the dictionary which should be used in the deflate process.
+		/// This call is equivalent to <code>setDictionary(dict, 0, dict.Length)</code>.
+		/// </summary>
+		/// <param name="dict">
+		/// the dictionary.
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// if setInput () or deflate () were already called or another dictionary was already set.
+		/// </exception>
+		public void SetDictionary(byte[] dict)
+		{
+			SetDictionary(dict, 0, dict.Length);
+		}
+		
+		/// <summary>
+		/// Sets the dictionary which should be used in the deflate process.
+		/// The dictionary is a byte array containing strings that are
+		/// likely to occur in the data which should be compressed.  The
+		/// dictionary is not stored in the compressed output, only a
+		/// checksum.  To decompress the output you need to supply the same
+		/// dictionary again.
+		/// </summary>
+		/// <param name="dict">
+		/// The dictionary data
+		/// </param>
+		/// <param name="offset">
+		/// An offset into the dictionary.
+		/// </param>
+		/// <param name="length">
+		/// The length of the dictionary data to use
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// If setInput () or deflate () were already called or another dictionary was already set.
+		/// </exception>
+		public void SetDictionary(byte[] dict, int offset, int length)
+		{
+			if (state != INIT_STATE) {
+				throw new InvalidOperationException();
+			}
+			
+			state = SETDICT_STATE;
+			engine.SetDictionary(dict, offset, length);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterConstants.cs b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterConstants.cs
new file mode 100644
index 0000000..6658833
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterConstants.cs
@@ -0,0 +1,186 @@
+// DeflaterConstants.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// This class contains constants used for deflation.
+	/// </summary>
+	public class DeflaterConstants 
+	{
+		/// <summary>
+		/// Set to true to enable debugging
+		/// </summary>
+		public const bool DEBUGGING = false;
+		
+		/// <summary>
+		/// Written to Zip file to identify a stored block
+		/// </summary>
+		public const int STORED_BLOCK = 0;
+		
+		/// <summary>
+		/// Identifies static tree in Zip file
+		/// </summary>
+		public const int STATIC_TREES = 1;
+		
+		/// <summary>
+		/// Identifies dynamic tree in Zip file
+		/// </summary>
+		public const int DYN_TREES    = 2;
+		
+		/// <summary>
+		/// Header flag indicating a preset dictionary for deflation
+		/// </summary>
+		public const int PRESET_DICT  = 0x20;
+		
+		/// <summary>
+		/// Sets internal buffer sizes for Huffman encoding
+		/// </summary>
+		public const int DEFAULT_MEM_LEVEL = 8;
+
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int MAX_MATCH = 258;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int MIN_MATCH = 3;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int MAX_WBITS = 15;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int WSIZE = 1 << MAX_WBITS;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int WMASK = WSIZE - 1;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int HASH_BITS = DEFAULT_MEM_LEVEL + 7;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int HASH_SIZE = 1 << HASH_BITS;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int HASH_MASK = HASH_SIZE - 1;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int HASH_SHIFT = (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int MAX_DIST = WSIZE - MIN_LOOKAHEAD;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int PENDING_BUF_SIZE = 1 << (DEFAULT_MEM_LEVEL + 8);
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int MAX_BLOCK_SIZE = Math.Min(65535, PENDING_BUF_SIZE - 5);
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int DEFLATE_STORED = 0;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int DEFLATE_FAST   = 1;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public const int DEFLATE_SLOW   = 2;
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int[] GOOD_LENGTH = { 0, 4,  4,  4,  4,  8,   8,   8,   32,   32 };
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int[] MAX_LAZY    = { 0, 4,  5,  6,  4, 16,  16,  32,  128,  258 };
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int[] NICE_LENGTH = { 0, 8, 16, 32, 16, 32, 128, 128,  258,  258 };
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int[] MAX_CHAIN   = { 0, 4,  8, 32, 16, 32, 128, 256, 1024, 4096 };
+		
+		/// <summary>
+		/// Internal compression engine constant
+		/// </summary>		
+		public static int[] COMPR_FUNC  = { 0, 1,  1,  1,  1,  2,   2,   2,    2,    2 };
+		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterEngine.cs b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterEngine.cs
new file mode 100644
index 0000000..97e9fed
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterEngine.cs
@@ -0,0 +1,791 @@
+// DeflaterEngine.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+using agsXMPP.IO.Compression.Checksums;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// Strategies for deflater
+	/// </summary>
+	public enum DeflateStrategy 
+	{
+		/// <summary>
+		/// The default strategy
+		/// </summary>
+		Default  = 0,
+		
+		/// <summary>
+		/// This strategy will only allow longer string repetitions.  It is
+		/// useful for random data with a small character set.
+		/// </summary>
+		Filtered = 1,
+
+			
+		/// <summary>
+		/// This strategy will not look for string repetitions at all.  It
+		/// only encodes with Huffman trees (which means, that more common
+		/// characters get a smaller encoding.
+		/// </summary>
+		HuffmanOnly = 2
+	}
+
+	// DEFLATE ALGORITHM:
+	// 
+	// The uncompressed stream is inserted into the window array.  When
+	// the window array is full the first half is thrown away and the
+	// second half is copied to the beginning.
+	//
+	// The head array is a hash table.  Three characters build a hash value
+	// and they the value points to the corresponding index in window of 
+	// the last string with this hash.  The prev array implements a
+	// linked list of matches with the same hash: prev[index & WMASK] points
+	// to the previous index with the same hash.
+	// 
+
+	
+	/// <summary>
+	/// Low level compression engine for deflate algorithm which uses a 32K sliding window
+	/// with secondary compression from Huffman/Shannon-Fano codes.
+	/// </summary>
+	public class DeflaterEngine : DeflaterConstants 
+	{
+		static int TOO_FAR = 4096;
+		
+		int ins_h;
+
+		/// <summary>
+		/// Hashtable, hashing three characters to an index for window, so
+		/// that window[index]..window[index+2] have this hash code.  
+		/// Note that the array should really be unsigned short, so you need
+		/// to and the values with 0xffff.
+		/// </summary>
+		short[] head;
+
+		/// <summary>
+		/// <code>prev[index & WMASK]</code> points to the previous index that has the
+		/// same hash code as the string starting at index.  This way 
+		/// entries with the same hash code are in a linked list.
+		/// Note that the array should really be unsigned short, so you need
+		/// to and the values with 0xffff.
+		/// </summary>
+		short[] prev;
+		
+		int    matchStart;
+		int    matchLen;
+		bool   prevAvailable;
+		int    blockStart;
+
+		/// <summary>
+		/// Points to the current character in the window.
+		/// </summary>
+		int    strstart;
+
+		/// <summary>
+		/// lookahead is the number of characters starting at strstart in
+		/// window that are valid.
+		/// So window[strstart] until window[strstart+lookahead-1] are valid
+		/// characters.
+		/// </summary>
+		int    lookahead;
+
+		/// <summary>
+		/// This array contains the part of the uncompressed stream that 
+		/// is of relevance.  The current character is indexed by strstart.
+		/// </summary>
+		byte[] window;
+		
+		DeflateStrategy strategy;
+		int max_chain, max_lazy, niceLength, goodLength;
+		
+		/// <summary>
+		/// The current compression function.
+		/// </summary>
+		int comprFunc;
+		
+		/// <summary>
+		/// The input data for compression.
+		/// </summary>
+		byte[] inputBuf;
+		
+		/// <summary>
+		/// The total bytes of input read.
+		/// </summary>
+		int totalIn;
+		
+		/// <summary>
+		/// The offset into inputBuf, where input data starts.
+		/// </summary>
+		int inputOff;
+		
+		/// <summary>
+		/// The end offset of the input data.
+		/// </summary>
+		int inputEnd;
+		
+		DeflaterPending pending;
+		DeflaterHuffman huffman;
+		
+		/// <summary>
+		/// The adler checksum
+		/// </summary>
+		Adler32 adler;
+		
+		/// <summary>
+		/// Construct instance with pending buffer
+		/// </summary>
+		/// <param name="pending">
+		/// Pending buffer to use
+		/// </param>>
+		public DeflaterEngine(DeflaterPending pending) 
+		{
+			this.pending = pending;
+			huffman = new DeflaterHuffman(pending);
+			adler = new Adler32();
+			
+			window = new byte[2 * WSIZE];
+			head   = new short[HASH_SIZE];
+			prev   = new short[WSIZE];
+			
+			// We start at index 1, to avoid an implementation deficiency, that
+		   // we cannot build a repeat pattern at index 0.
+			blockStart = strstart = 1;
+		}
+
+		/// <summary>
+		/// Reset internal state
+		/// </summary>		
+		public void Reset()
+		{
+			huffman.Reset();
+			adler.Reset();
+			blockStart = strstart = 1;
+			lookahead = 0;
+			totalIn   = 0;
+			prevAvailable = false;
+			matchLen = MIN_MATCH - 1;
+			
+			for (int i = 0; i < HASH_SIZE; i++) {
+				head[i] = 0;
+			}
+			
+			for (int i = 0; i < WSIZE; i++) {
+				prev[i] = 0;
+			}
+		}
+
+		/// <summary>
+		/// Reset Adler checksum
+		/// </summary>		
+		public void ResetAdler()
+		{
+			adler.Reset();
+		}
+
+		/// <summary>
+		/// Get current value of Adler checksum
+		/// </summary>		
+		public int Adler {
+			get {
+				return (int)adler.Value;
+			}
+		}
+
+		/// <summary>
+		/// Total data processed
+		/// </summary>		
+		public int TotalIn {
+			get {
+				return totalIn;
+			}
+		}
+
+		/// <summary>
+		/// Get/set the <see cref="DeflateStrategy">deflate strategy</see>
+		/// </summary>		
+		public DeflateStrategy Strategy {
+			get {
+				return strategy;
+			}
+			set {
+				strategy = value;
+			}
+		}
+		
+		/// <summary>
+		/// Set the deflate level (0-9)
+		/// </summary>
+		public void SetLevel(int lvl)
+		{
+			goodLength = DeflaterConstants.GOOD_LENGTH[lvl];
+			max_lazy   = DeflaterConstants.MAX_LAZY[lvl];
+			niceLength = DeflaterConstants.NICE_LENGTH[lvl];
+			max_chain  = DeflaterConstants.MAX_CHAIN[lvl];
+			
+			if (DeflaterConstants.COMPR_FUNC[lvl] != comprFunc) {
+/*
+				if (DeflaterConstants.DEBUGGING) {
+				   Console.WriteLine("Change from " + comprFunc + " to "
+									      + DeflaterConstants.COMPR_FUNC[lvl]);
+				}
+*/
+				switch (comprFunc) {
+					case DEFLATE_STORED:
+						if (strstart > blockStart) {
+							huffman.FlushStoredBlock(window, blockStart,
+								strstart - blockStart, false);
+							blockStart = strstart;
+						}
+						UpdateHash();
+						break;
+					case DEFLATE_FAST:
+						if (strstart > blockStart) {
+							huffman.FlushBlock(window, blockStart, strstart - blockStart,
+								false);
+							blockStart = strstart;
+						}
+						break;
+					case DEFLATE_SLOW:
+						if (prevAvailable) {
+							huffman.TallyLit(window[strstart-1] & 0xff);
+						}
+						if (strstart > blockStart) {
+							huffman.FlushBlock(window, blockStart, strstart - blockStart, false);
+							blockStart = strstart;
+						}
+						prevAvailable = false;
+						matchLen = MIN_MATCH - 1;
+						break;
+				}
+				comprFunc = COMPR_FUNC[lvl];
+			}
+		}
+		
+		void UpdateHash() 
+		{
+/*
+			if (DEBUGGING) {
+				Console.WriteLine("updateHash: "+strstart);
+			}
+*/
+			ins_h = (window[strstart] << HASH_SHIFT) ^ window[strstart + 1];
+		}
+		
+		/// <summary>
+		/// Inserts the current string in the head hash and returns the previous
+		/// value for this hash.
+		/// </summary>
+		/// <returns>The previous hash value</returns>
+		int InsertString() 
+		{
+			short match;
+			int hash = ((ins_h << HASH_SHIFT) ^ window[strstart + (MIN_MATCH -1)]) & HASH_MASK;
+/*
+			if (DeflaterConstants.DEBUGGING) {
+				if (hash != (((window[strstart] << (2*HASH_SHIFT)) ^ 
+							      (window[strstart + 1] << HASH_SHIFT) ^ 
+							      (window[strstart + 2])) & HASH_MASK)) {
+						throw new SharpZipBaseException("hash inconsistent: " + hash + "/"
+									            +window[strstart] + ","
+									            +window[strstart+1] + ","
+									            +window[strstart+2] + "," + HASH_SHIFT);
+					}
+			}
+*/
+			prev[strstart & WMASK] = match = head[hash];
+			head[hash] = (short)strstart;
+			ins_h = hash;
+			return match & 0xffff;
+		}
+		
+		void SlideWindow()
+		{
+			Array.Copy(window, WSIZE, window, 0, WSIZE);
+			matchStart -= WSIZE;
+			strstart   -= WSIZE;
+			blockStart -= WSIZE;
+			
+			/* Slide the hash table (could be avoided with 32 bit values
+			 * at the expense of memory usage).
+			 */
+			for (int i = 0; i < HASH_SIZE; ++i) {
+				int m = head[i] & 0xffff;
+				head[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
+			}
+			
+			/* Slide the prev table. */
+			for (int i = 0; i < WSIZE; i++) {
+				int m = prev[i] & 0xffff;
+				prev[i] = (short)(m >= WSIZE ? (m - WSIZE) : 0);
+			}
+		}
+		
+		/// <summary>
+		/// Fill the window
+		/// </summary>
+		public void FillWindow()
+		{
+			/* If the window is almost full and there is insufficient lookahead,
+			 * move the upper half to the lower one to make room in the upper half.
+			 */
+			if (strstart >= WSIZE + MAX_DIST) {
+				SlideWindow();
+			}
+			
+			/* If there is not enough lookahead, but still some input left,
+			 * read in the input
+			 */
+			while (lookahead < DeflaterConstants.MIN_LOOKAHEAD && inputOff < inputEnd) {
+				int more = 2 * WSIZE - lookahead - strstart;
+				
+				if (more > inputEnd - inputOff) {
+					more = inputEnd - inputOff;
+				}
+				
+				System.Array.Copy(inputBuf, inputOff, window, strstart + lookahead, more);
+				adler.Update(inputBuf, inputOff, more);
+				
+				inputOff += more;
+				totalIn  += more;
+				lookahead += more;
+			}
+			
+			if (lookahead >= MIN_MATCH) {
+				UpdateHash();
+			}
+		}
+		
+		/// <summary>
+		/// Find the best (longest) string in the window matching the 
+		/// string starting at strstart.
+		///
+		/// Preconditions:
+		/// <code>
+		/// strstart + MAX_MATCH <= window.length.</code>
+		/// </summary>
+		/// <param name="curMatch"></param>
+		/// <returns>True if a match greater than the minimum length is found</returns>
+		bool FindLongestMatch(int curMatch) 
+		{
+			int chainLength = this.max_chain;
+			int niceLength  = this.niceLength;
+			short[] prev    = this.prev;
+			int scan        = this.strstart;
+			int match;
+			int best_end = this.strstart + matchLen;
+			int best_len = Math.Max(matchLen, MIN_MATCH - 1);
+			
+			int limit = Math.Max(strstart - MAX_DIST, 0);
+			
+			int strend = strstart + MAX_MATCH - 1;
+			byte scan_end1 = window[best_end - 1];
+			byte scan_end  = window[best_end];
+			
+			/* Do not waste too much time if we already have a good match: */
+			if (best_len >= this.goodLength) {
+				chainLength >>= 2;
+			}
+			
+			/* Do not look for matches beyond the end of the input. This is necessary
+			* to make deflate deterministic.
+			*/
+			if (niceLength > lookahead) {
+				niceLength = lookahead;
+			}
+			
+/*
+			if (DeflaterConstants.DEBUGGING && strstart > 2 * WSIZE - MIN_LOOKAHEAD) {
+				throw new InvalidOperationException("need lookahead");
+			}
+*/			
+			do {
+/*
+				if (DeflaterConstants.DEBUGGING && curMatch >= strstart) {
+					throw new InvalidOperationException("future match");
+				}
+*/            
+				if (window[curMatch + best_len] != scan_end      || 
+					window[curMatch + best_len - 1] != scan_end1 || 
+					window[curMatch] != window[scan]             || 
+					window[curMatch + 1] != window[scan + 1]) {
+					continue;
+				}
+				
+				match = curMatch + 2;
+				scan += 2;
+				
+				/* We check for insufficient lookahead only every 8th comparison;
+				* the 256th check will be made at strstart + 258.
+				*/
+			while (window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && 
+				window[++scan] == window[++match] && scan < strend) ;
+				
+				if (scan > best_end) {
+/*
+					if (DeflaterConstants.DEBUGGING && ins_h == 0)
+						System.err.println("Found match: "+curMatch+"-"+(scan-strstart));
+*/
+					matchStart = curMatch;
+					best_end = scan;
+					best_len = scan - strstart;
+					
+					if (best_len >= niceLength) {
+						break;
+					}
+					
+					scan_end1  = window[best_end - 1];
+					scan_end   = window[best_end];
+				}
+				scan = strstart;
+			} while ((curMatch = (prev[curMatch & WMASK] & 0xffff)) > limit && --chainLength != 0);
+			
+			matchLen = Math.Min(best_len, lookahead);
+			return matchLen >= MIN_MATCH;
+		}
+		
+		/// <summary>
+		/// Set compression dictionary
+		/// </summary>
+		public void SetDictionary(byte[] buffer, int offset, int length) 
+		{
+/*
+			if (DeflaterConstants.DEBUGGING && strstart != 1) {
+				throw new InvalidOperationException("strstart not 1");
+			}
+*/
+			adler.Update(buffer, offset, length);
+			if (length < MIN_MATCH) {
+				return;
+			}
+			if (length > MAX_DIST) {
+				offset += length - MAX_DIST;
+				length = MAX_DIST;
+			}
+			
+			System.Array.Copy(buffer, offset, window, strstart, length);
+			
+			UpdateHash();
+			--length;
+			while (--length > 0) {
+				InsertString();
+				strstart++;
+			}
+			strstart += 2;
+			blockStart = strstart;
+		}
+		
+		bool DeflateStored(bool flush, bool finish)
+		{
+			if (!flush && lookahead == 0) {
+				return false;
+			}
+			
+			strstart += lookahead;
+			lookahead = 0;
+			
+			int storedLen = strstart - blockStart;
+			
+			if ((storedLen >= DeflaterConstants.MAX_BLOCK_SIZE) || /* Block is full */
+				(blockStart < WSIZE && storedLen >= MAX_DIST) ||   /* Block may move out of window */
+				flush) {
+				bool lastBlock = finish;
+				if (storedLen > DeflaterConstants.MAX_BLOCK_SIZE) {
+					storedLen = DeflaterConstants.MAX_BLOCK_SIZE;
+					lastBlock = false;
+				}
+				
+/*
+				if (DeflaterConstants.DEBUGGING) {
+				   Console.WriteLine("storedBlock["+storedLen+","+lastBlock+"]");
+				}
+*/
+	
+				huffman.FlushStoredBlock(window, blockStart, storedLen, lastBlock);
+				blockStart += storedLen;
+				return !lastBlock;
+			}
+			return true;
+		}
+		
+		private bool DeflateFast(bool flush, bool finish)
+		{
+			if (lookahead < MIN_LOOKAHEAD && !flush) {
+				return false;
+			}
+			
+			while (lookahead >= MIN_LOOKAHEAD || flush) {
+				if (lookahead == 0) {
+					/* We are flushing everything */
+					huffman.FlushBlock(window, blockStart, strstart - blockStart, finish);
+					blockStart = strstart;
+					return false;
+				}
+				
+				if (strstart > 2 * WSIZE - MIN_LOOKAHEAD) {
+					/* slide window, as findLongestMatch needs this.
+					 * This should only happen when flushing and the window
+					 * is almost full.
+					 */
+					SlideWindow();
+				}
+				
+				int hashHead;
+				if (lookahead >= MIN_MATCH && 
+					(hashHead = InsertString()) != 0 && 
+					strategy != DeflateStrategy.HuffmanOnly &&
+					strstart - hashHead <= MAX_DIST && 
+					FindLongestMatch(hashHead)) {
+					/* longestMatch sets matchStart and matchLen */
+/*
+					if (DeflaterConstants.DEBUGGING) {
+						for (int i = 0 ; i < matchLen; i++) {
+							if (window[strstart+i] != window[matchStart + i]) {
+								throw new SharpZipBaseException("Match failure");
+							}
+						}
+					}
+*/					
+					// -jr- Hak hak hak this stops problems with fast/low compression and index out of range
+					if (huffman.TallyDist(strstart - matchStart, matchLen)) {
+						bool lastBlock = finish && lookahead == 0;
+						huffman.FlushBlock(window, blockStart, strstart - blockStart, lastBlock);
+						blockStart = strstart;
+					}
+					
+					lookahead -= matchLen;
+					if (matchLen <= max_lazy && lookahead >= MIN_MATCH) {
+						while (--matchLen > 0) {
+							++strstart;
+							InsertString();
+						}
+						++strstart;
+					} else {
+						strstart += matchLen;
+						if (lookahead >= MIN_MATCH - 1) {
+							UpdateHash();
+						}
+					}
+					matchLen = MIN_MATCH - 1;
+					continue;
+				} else {
+					/* No match found */
+					huffman.TallyLit(window[strstart] & 0xff);
+					++strstart;
+					--lookahead;
+				}
+				
+				if (huffman.IsFull()) {
+					bool lastBlock = finish && lookahead == 0;
+					huffman.FlushBlock(window, blockStart, strstart - blockStart, lastBlock);
+					blockStart = strstart;
+					return !lastBlock;
+				}
+			}
+			return true;
+		}
+		
+		bool DeflateSlow(bool flush, bool finish)
+		{
+			if (lookahead < MIN_LOOKAHEAD && !flush) {
+				return false;
+			}
+			
+			while (lookahead >= MIN_LOOKAHEAD || flush) {
+				if (lookahead == 0) {
+					if (prevAvailable) {
+						huffman.TallyLit(window[strstart-1] & 0xff);
+					}
+					prevAvailable = false;
+					
+					// We are flushing everything
+/*
+					if (DeflaterConstants.DEBUGGING && !flush) {
+						throw new SharpZipBaseException("Not flushing, but no lookahead");
+					}
+*/               
+					huffman.FlushBlock(window, blockStart, strstart - blockStart,
+						finish);
+					blockStart = strstart;
+					return false;
+				}
+				
+				if (strstart >= 2 * WSIZE - MIN_LOOKAHEAD) {
+					/* slide window, as findLongestMatch need this.
+					 * This should only happen when flushing and the window
+					 * is almost full.
+					 */
+					SlideWindow();
+				}
+				
+				int prevMatch = matchStart;
+				int prevLen = matchLen;
+				if (lookahead >= MIN_MATCH) {
+					int hashHead = InsertString();
+					if (strategy != DeflateStrategy.HuffmanOnly && hashHead != 0 && strstart - hashHead <= MAX_DIST && FindLongestMatch(hashHead)) {
+						/* longestMatch sets matchStart and matchLen */
+							
+						/* Discard match if too small and too far away */
+						if (matchLen <= 5 && (strategy == DeflateStrategy.Filtered || (matchLen == MIN_MATCH && strstart - matchStart > TOO_FAR))) {
+							matchLen = MIN_MATCH - 1;
+						}
+					}
+				}
+				
+				/* previous match was better */
+				if (prevLen >= MIN_MATCH && matchLen <= prevLen) {
+/*
+					if (DeflaterConstants.DEBUGGING) {
+					   for (int i = 0 ; i < matchLen; i++) {
+					      if (window[strstart-1+i] != window[prevMatch + i])
+					         throw new SharpZipBaseException();
+						}
+					}
+*/               
+					huffman.TallyDist(strstart - 1 - prevMatch, prevLen);
+					prevLen -= 2;
+					do {
+						strstart++;
+						lookahead--;
+						if (lookahead >= MIN_MATCH) {
+							InsertString();
+						}
+					} while (--prevLen > 0);
+					strstart ++;
+					lookahead--;
+					prevAvailable = false;
+					matchLen = MIN_MATCH - 1;
+				} else {
+					if (prevAvailable) {
+						huffman.TallyLit(window[strstart-1] & 0xff);
+					}
+					prevAvailable = true;
+					strstart++;
+					lookahead--;
+				}
+				
+				if (huffman.IsFull()) {
+					int len = strstart - blockStart;
+					if (prevAvailable) {
+						len--;
+					}
+					bool lastBlock = (finish && lookahead == 0 && !prevAvailable);
+					huffman.FlushBlock(window, blockStart, len, lastBlock);
+					blockStart += len;
+					return !lastBlock;
+				}
+			}
+			return true;
+		}
+		
+		/// <summary>
+		/// Deflate drives actual compression of data
+		/// </summary>
+		public bool Deflate(bool flush, bool finish)
+		{
+			bool progress;
+			do {
+				FillWindow();
+				bool canFlush = flush && inputOff == inputEnd;
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					//Console.WriteLine("window: ["+blockStart+","+strstart+","
+				//					                  +lookahead+"], "+comprFunc+","+canFlush);
+				//				}
+				switch (comprFunc) {
+					case DEFLATE_STORED:
+						progress = DeflateStored(canFlush, finish);
+						break;
+					case DEFLATE_FAST:
+						progress = DeflateFast(canFlush, finish);
+						break;
+					case DEFLATE_SLOW:
+						progress = DeflateSlow(canFlush, finish);
+						break;
+					default:
+						throw new InvalidOperationException("unknown comprFunc");
+				}
+			} while (pending.IsFlushed && progress); /* repeat while we have no pending output and progress was made */
+			return progress;
+		}
+
+
+		/// <summary>
+		/// Sets input data to be deflated.  Should only be called when <code>NeedsInput()</code>
+		/// returns true
+		/// </summary>
+		/// <param name="buf">The buffer containing input data.</param>
+		/// <param name="off">The index of the first byte of data.</param>
+		/// <param name="len">The number of bytes of data to use as input.</param>
+		public void SetInput(byte[] buf, int off, int len)
+		{
+			if (inputOff < inputEnd) {
+				throw new InvalidOperationException("Old input was not completely processed");
+			}
+			
+			int end = off + len;
+			
+			/* We want to throw an ArrayIndexOutOfBoundsException early.  The
+			* check is very tricky: it also handles integer wrap around.
+			*/
+			if (0 > off || off > end || end > buf.Length) {
+				throw new ArgumentOutOfRangeException();
+			}
+			
+			inputBuf = buf;
+			inputOff = off;
+			inputEnd = end;
+		}
+
+		/// <summary>
+		/// Return true if input is needed via <see cref="SetInput"> SetInput</see>
+		/// </summary>		
+		public bool NeedsInput()
+		{
+			return inputEnd == inputOff;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterHuffman.cs b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterHuffman.cs
new file mode 100644
index 0000000..bd9405f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterHuffman.cs
@@ -0,0 +1,886 @@
+// DeflaterHuffman.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// This is the DeflaterHuffman class.
+	/// 
+	/// This class is <i>not</i> thread safe.  This is inherent in the API, due
+	/// to the split of deflate and setInput.
+	/// 
+	/// author of the original java version : Jochen Hoenicke
+	/// </summary>
+	public class DeflaterHuffman
+	{
+		static  int BUFSIZE = 1 << (DeflaterConstants.DEFAULT_MEM_LEVEL + 6);
+		static  int LITERAL_NUM = 286;
+		static  int DIST_NUM = 30;
+		static  int BITLEN_NUM = 19;
+		static  int REP_3_6    = 16;
+		static  int REP_3_10   = 17;
+		static  int REP_11_138 = 18;
+		static  int EOF_SYMBOL = 256;
+		static  int[] BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+		
+		static byte[] bit4Reverse = {
+			0,
+			8,
+			4,
+			12,
+			2,
+			10,
+			6,
+			14,
+			1,
+			9,
+			5,
+			13,
+			3,
+			11,
+			7,
+			15
+		};
+		
+		/// <summary>
+		/// Not documented
+		/// </summary>
+		public class Tree 
+		{
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public short[] freqs;
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public byte[]  length;
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public int     minNumCodes;
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public int     numCodes;
+			
+			short[] codes;
+			int[]   bl_counts;
+			int     maxLength;
+			DeflaterHuffman dh;
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public Tree(DeflaterHuffman dh, int elems, int minCodes, int maxLength) 
+			{
+				this.dh =  dh;
+				this.minNumCodes = minCodes;
+				this.maxLength  = maxLength;
+				freqs  = new short[elems];
+				bl_counts = new int[maxLength];
+			}
+			
+			/// <summary>
+			/// Resets the internal state of the tree
+			/// </summary>
+			public void Reset() 
+			{
+				for (int i = 0; i < freqs.Length; i++) {
+					freqs[i] = 0;
+				}
+				codes = null;
+				length = null;
+			}
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public void WriteSymbol(int code)
+			{
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					freqs[code]--;
+				//					//  	  Console.Write("writeSymbol("+freqs.length+","+code+"): ");
+				//				}
+				dh.pending.WriteBits(codes[code] & 0xffff, length[code]);
+			}
+			
+			/// <summary>
+			/// Check that at least one frequency is non-zero
+			/// </summary>
+			/// <exception cref="SharpZipBaseException">
+			/// No frequencies are non-zero
+			/// </exception>
+			public void CheckEmpty()
+			{
+				bool empty = true;
+				for (int i = 0; i < freqs.Length; i++) {
+					if (freqs[i] != 0) {
+						//Console.WriteLine("freqs[" + i + "] == " + freqs[i]);
+						empty = false;
+					}
+				}
+				
+				if (!empty) {
+					throw new SharpZipBaseException("!Empty");
+				}
+				//Console.WriteLine("checkEmpty suceeded!");
+			}
+
+			/// <summary>
+			/// Set static codes and length
+			/// </summary>
+			/// <param name="stCodes">new codes</param>
+			/// <param name="stLength">length for new codes</param>
+			public void SetStaticCodes(short[] stCodes, byte[] stLength)
+			{
+				codes = stCodes;
+				length = stLength;
+			}
+			
+			/// <summary>
+			/// Build dynamic codes and lengths
+			/// </summary>
+			public void BuildCodes() 
+			{
+				int numSymbols = freqs.Length;
+				int[] nextCode = new int[maxLength];
+				int code = 0;
+				codes = new short[freqs.Length];
+				
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					//Console.WriteLine("buildCodes: "+freqs.Length);
+				//				}
+				
+				for (int bits = 0; bits < maxLength; bits++) {
+					nextCode[bits] = code;
+					code += bl_counts[bits] << (15 - bits);
+					//					if (DeflaterConstants.DEBUGGING) {
+					//						//Console.WriteLine("bits: " + ( bits + 1) + " count: " + bl_counts[bits]
+					//						                  +" nextCode: "+code);
+					//					}
+				}
+				if (DeflaterConstants.DEBUGGING && code != 65536) {
+					throw new SharpZipBaseException("Inconsistent bl_counts!");
+				}
+				
+				for (int i=0; i < numCodes; i++) {
+					int bits = length[i];
+					if (bits > 0) {
+						//						if (DeflaterConstants.DEBUGGING) {
+						//								//Console.WriteLine("codes["+i+"] = rev(" + nextCode[bits-1]+"),
+						//								                  +bits);
+						//						}
+						codes[i] = BitReverse(nextCode[bits-1]);
+						nextCode[bits-1] += 1 << (16 - bits);
+					}
+				}
+			}
+			
+			void BuildLength(int[] childs)
+			{
+				this.length = new byte [freqs.Length];
+				int numNodes = childs.Length / 2;
+				int numLeafs = (numNodes + 1) / 2;
+				int overflow = 0;
+				
+				for (int i = 0; i < maxLength; i++) {
+					bl_counts[i] = 0;
+				}
+				
+				/* First calculate optimal bit lengths */
+				int[] lengths = new int[numNodes];
+				lengths[numNodes-1] = 0;
+				
+				for (int i = numNodes - 1; i >= 0; i--) {
+					if (childs[2*i+1] != -1) {
+						int bitLength = lengths[i] + 1;
+						if (bitLength > maxLength) {
+							bitLength = maxLength;
+							overflow++;
+						}
+						lengths[childs[2*i]] = lengths[childs[2*i+1]] = bitLength;
+					} else {
+						/* A leaf node */
+						int bitLength = lengths[i];
+						bl_counts[bitLength - 1]++;
+						this.length[childs[2*i]] = (byte) lengths[i];
+					}
+				}
+				
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					//Console.WriteLine("Tree "+freqs.Length+" lengths:");
+				//					for (int i=0; i < numLeafs; i++) {
+				//						//Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
+				//						                  + " len: "+length[childs[2*i]]);
+				//					}
+				//				}
+				
+				if (overflow == 0) {
+					return;
+				}
+				
+				int incrBitLen = maxLength - 1;
+				do {
+					/* Find the first bit length which could increase: */
+					while (bl_counts[--incrBitLen] == 0)
+						;
+					
+					/* Move this node one down and remove a corresponding
+					* amount of overflow nodes.
+					*/
+					do {
+						bl_counts[incrBitLen]--;
+						bl_counts[++incrBitLen]++;
+						overflow -= 1 << (maxLength - 1 - incrBitLen);
+					} while (overflow > 0 && incrBitLen < maxLength - 1);
+				} while (overflow > 0);
+				
+				/* We may have overshot above.  Move some nodes from maxLength to
+				* maxLength-1 in that case.
+				*/
+				bl_counts[maxLength-1] += overflow;
+				bl_counts[maxLength-2] -= overflow;
+				
+				/* Now recompute all bit lengths, scanning in increasing
+				* frequency.  It is simpler to reconstruct all lengths instead of
+				* fixing only the wrong ones. This idea is taken from 'ar'
+				* written by Haruhiko Okumura.
+				*
+				* The nodes were inserted with decreasing frequency into the childs
+				* array.
+				*/
+				int nodePtr = 2 * numLeafs;
+				for (int bits = maxLength; bits != 0; bits--) {
+					int n = bl_counts[bits-1];
+					while (n > 0) {
+						int childPtr = 2*childs[nodePtr++];
+						if (childs[childPtr + 1] == -1) {
+							/* We found another leaf */
+							length[childs[childPtr]] = (byte) bits;
+							n--;
+						}
+					}
+				}
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					//Console.WriteLine("*** After overflow elimination. ***");
+				//					for (int i=0; i < numLeafs; i++) {
+				//						//Console.WriteLine("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]]
+				//						                  + " len: "+length[childs[2*i]]);
+				//					}
+				//				}
+			}
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public void BuildTree()
+			{
+				int numSymbols = freqs.Length;
+				
+				/* heap is a priority queue, sorted by frequency, least frequent
+				* nodes first.  The heap is a binary tree, with the property, that
+				* the parent node is smaller than both child nodes.  This assures
+				* that the smallest node is the first parent.
+				*
+				* The binary tree is encoded in an array:  0 is root node and
+				* the nodes 2*n+1, 2*n+2 are the child nodes of node n.
+				*/
+				int[] heap = new int[numSymbols];
+				int heapLen = 0;
+				int maxCode = 0;
+				for (int n = 0; n < numSymbols; n++) {
+					int freq = freqs[n];
+					if (freq != 0) {
+						/* Insert n into heap */
+						int pos = heapLen++;
+						int ppos;
+						while (pos > 0 && freqs[heap[ppos = (pos - 1) / 2]] > freq) {
+							heap[pos] = heap[ppos];
+							pos = ppos;
+						}
+						heap[pos] = n;
+						
+						maxCode = n;
+					}
+				}
+				
+				/* We could encode a single literal with 0 bits but then we
+				* don't see the literals.  Therefore we force at least two
+				* literals to avoid this case.  We don't care about order in
+				* this case, both literals get a 1 bit code.
+				*/
+				while (heapLen < 2) {
+					int node = maxCode < 2 ? ++maxCode : 0;
+					heap[heapLen++] = node;
+				}
+				
+				numCodes = Math.Max(maxCode + 1, minNumCodes);
+				
+				int numLeafs = heapLen;
+				int[] childs = new int[4*heapLen - 2];
+				int[] values = new int[2*heapLen - 1];
+				int numNodes = numLeafs;
+				for (int i = 0; i < heapLen; i++) {
+					int node = heap[i];
+					childs[2*i]   = node;
+					childs[2*i+1] = -1;
+					values[i] = freqs[node] << 8;
+					heap[i] = i;
+				}
+				
+				/* Construct the Huffman tree by repeatedly combining the least two
+				* frequent nodes.
+				*/
+				do {
+					int first = heap[0];
+					int last  = heap[--heapLen];
+					
+					/* Propagate the hole to the leafs of the heap */
+					int ppos = 0;
+					int path = 1;
+					
+					while (path < heapLen) {
+						if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
+							path++;
+						}
+							
+						heap[ppos] = heap[path];
+						ppos = path;
+						path = path * 2 + 1;
+					}
+						
+					/* Now propagate the last element down along path.  Normally
+					* it shouldn't go too deep.
+					*/
+					int lastVal = values[last];
+					while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
+						heap[path] = heap[ppos];
+					}
+					heap[path] = last;
+					
+					
+					int second = heap[0];
+					
+					/* Create a new node father of first and second */
+					last = numNodes++;
+					childs[2*last] = first;
+					childs[2*last+1] = second;
+					int mindepth = Math.Min(values[first] & 0xff, values[second] & 0xff);
+					values[last] = lastVal = values[first] + values[second] - mindepth + 1;
+					
+					/* Again, propagate the hole to the leafs */
+					ppos = 0;
+					path = 1;
+					
+					while (path < heapLen) {
+						if (path + 1 < heapLen && values[heap[path]] > values[heap[path+1]]) {
+							path++;
+						}
+							
+						heap[ppos] = heap[path];
+						ppos = path;
+						path = ppos * 2 + 1;
+					}
+						
+					/* Now propagate the new element down along path */
+					while ((path = ppos) > 0 && values[heap[ppos = (path - 1)/2]] > lastVal) {
+						heap[path] = heap[ppos];
+					}
+					heap[path] = last;
+				} while (heapLen > 1);
+				
+				if (heap[0] != childs.Length / 2 - 1) {
+					throw new SharpZipBaseException("Heap invariant violated");
+				}
+				
+				BuildLength(childs);
+			}
+			
+			/// <summary>
+			/// Get encoded length
+			/// </summary>
+			/// <returns>Encoded length, the sum of frequencies * lengths</returns>
+			public int GetEncodedLength()
+			{
+				int len = 0;
+				for (int i = 0; i < freqs.Length; i++) {
+					len += freqs[i] * length[i];
+				}
+				return len;
+			}
+			
+			/// <summary>
+			/// Not documented
+			/// </summary>
+			public void CalcBLFreq(Tree blTree) 
+			{
+				int max_count;               /* max repeat count */
+				int min_count;               /* min repeat count */
+				int count;                   /* repeat count of the current code */
+				int curlen = -1;             /* length of current code */
+				
+				int i = 0;
+				while (i < numCodes) {
+					count = 1;
+					int nextlen = length[i];
+					if (nextlen == 0) {
+						max_count = 138;
+						min_count = 3;
+					} else {
+						max_count = 6;
+						min_count = 3;
+						if (curlen != nextlen) {
+							blTree.freqs[nextlen]++;
+							count = 0;
+						}
+					}
+					curlen = nextlen;
+					i++;
+					
+					while (i < numCodes && curlen == length[i]) {
+						i++;
+						if (++count >= max_count) {
+							break;
+						}
+					}
+					
+					if (count < min_count) {
+						blTree.freqs[curlen] += (short)count;
+					} else if (curlen != 0) {
+						blTree.freqs[REP_3_6]++;
+					} else if (count <= 10) {
+						blTree.freqs[REP_3_10]++;
+					} else {
+						blTree.freqs[REP_11_138]++;
+					}
+				}
+			}
+		
+			/// <summary>
+			/// Write tree values
+			/// </summary>
+			/// <param name="blTree">Tree to write</param>
+			public void WriteTree(Tree blTree)
+			{
+				int max_count;               /* max repeat count */
+				int min_count;               /* min repeat count */
+				int count;                   /* repeat count of the current code */
+				int curlen = -1;             /* length of current code */
+				
+				int i = 0;
+				while (i < numCodes) {
+					count = 1;
+					int nextlen = length[i];
+					if (nextlen == 0) {
+						max_count = 138;
+						min_count = 3;
+					} else {
+						max_count = 6;
+						min_count = 3;
+						if (curlen != nextlen) {
+							blTree.WriteSymbol(nextlen);
+							count = 0;
+						}
+					}
+					curlen = nextlen;
+					i++;
+					
+					while (i < numCodes && curlen == length[i]) {
+						i++;
+						if (++count >= max_count) {
+							break;
+						}
+					}
+					
+					if (count < min_count) {
+						while (count-- > 0) {
+							blTree.WriteSymbol(curlen);
+						}
+					} else if (curlen != 0) {
+						blTree.WriteSymbol(REP_3_6);
+						dh.pending.WriteBits(count - 3, 2);
+					} else if (count <= 10) {
+						blTree.WriteSymbol(REP_3_10);
+						dh.pending.WriteBits(count - 3, 3);
+					} else {
+						blTree.WriteSymbol(REP_11_138);
+						dh.pending.WriteBits(count - 11, 7);
+					}
+				}
+			}
+		}
+		
+		/// <summary>
+		/// Pending buffer to use
+		/// </summary>
+		public DeflaterPending pending;
+		
+		Tree literalTree, distTree, blTree;
+		
+		short[] d_buf;
+		byte[]  l_buf;
+		int last_lit;
+		int extra_bits;
+		
+		static short[] staticLCodes;
+		static byte[]  staticLLength;
+		static short[] staticDCodes;
+		static byte[]  staticDLength;
+		
+		/// <summary>
+		/// Reverse the bits of a 16 bit value.
+		/// </summary>
+		/// <param name="toReverse">Value to reverse bits</param>
+		/// <returns>Value with bits reversed</returns>
+		public static short BitReverse(int toReverse) 
+		{
+			return (short) (bit4Reverse[toReverse & 0xF] << 12 | 
+			                bit4Reverse[(toReverse >> 4) & 0xF] << 8 | 
+			                bit4Reverse[(toReverse >> 8) & 0xF] << 4 |
+			                bit4Reverse[toReverse >> 12]);
+		}
+		
+		
+		static DeflaterHuffman() 
+		{
+			/* See RFC 1951 3.2.6 */
+			/* Literal codes */
+			staticLCodes = new short[LITERAL_NUM];
+			staticLLength = new byte[LITERAL_NUM];
+			int i = 0;
+			while (i < 144) {
+				staticLCodes[i] = BitReverse((0x030 + i) << 8);
+				staticLLength[i++] = 8;
+			}
+			while (i < 256) {
+				staticLCodes[i] = BitReverse((0x190 - 144 + i) << 7);
+				staticLLength[i++] = 9;
+			}
+			while (i < 280) {
+				staticLCodes[i] = BitReverse((0x000 - 256 + i) << 9);
+				staticLLength[i++] = 7;
+			}
+			while (i < LITERAL_NUM) {
+				staticLCodes[i] = BitReverse((0x0c0 - 280 + i)  << 8);
+				staticLLength[i++] = 8;
+			}
+			
+			/* Distant codes */
+			staticDCodes = new short[DIST_NUM];
+			staticDLength = new byte[DIST_NUM];
+			for (i = 0; i < DIST_NUM; i++) {
+				staticDCodes[i] = BitReverse(i << 11);
+				staticDLength[i] = 5;
+			}
+		}
+		
+		/// <summary>
+		/// Construct instance with pending buffer
+		/// </summary>
+		/// <param name="pending">Pending buffer to use</param>
+		public DeflaterHuffman(DeflaterPending pending)
+		{
+			this.pending = pending;
+			
+			literalTree = new Tree(this, LITERAL_NUM, 257, 15);
+			distTree    = new Tree(this, DIST_NUM, 1, 15);
+			blTree      = new Tree(this, BITLEN_NUM, 4, 7);
+			
+			d_buf = new short[BUFSIZE];
+			l_buf = new byte [BUFSIZE];
+		}
+
+		/// <summary>
+		/// Reset internal state
+		/// </summary>		
+		public void Reset() 
+		{
+			last_lit = 0;
+			extra_bits = 0;
+			literalTree.Reset();
+			distTree.Reset();
+			blTree.Reset();
+		}
+		
+		int Lcode(int len) 
+		{
+			if (len == 255) {
+				return 285;
+			}
+			
+			int code = 257;
+			while (len >= 8) {
+				code += 4;
+				len >>= 1;
+			}
+			return code + len;
+		}
+		
+		int Dcode(int distance) 
+		{
+			int code = 0;
+			while (distance >= 4) {
+				code += 2;
+				distance >>= 1;
+			}
+			return code + distance;
+		}
+
+		/// <summary>
+		/// Write all trees to pending buffer
+		/// </summary>		
+		public void SendAllTrees(int blTreeCodes)
+		{
+			blTree.BuildCodes();
+			literalTree.BuildCodes();
+			distTree.BuildCodes();
+			pending.WriteBits(literalTree.numCodes - 257, 5);
+			pending.WriteBits(distTree.numCodes - 1, 5);
+			pending.WriteBits(blTreeCodes - 4, 4);
+			for (int rank = 0; rank < blTreeCodes; rank++) {
+				pending.WriteBits(blTree.length[BL_ORDER[rank]], 3);
+			}
+			literalTree.WriteTree(blTree);
+			distTree.WriteTree(blTree);
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				blTree.CheckEmpty();
+			//			}
+		}
+
+		/// <summary>
+		/// Compress current buffer writing data to pending buffer
+		/// </summary>
+		public void CompressBlock()
+		{
+			for (int i = 0; i < last_lit; i++) {
+				int litlen = l_buf[i] & 0xff;
+				int dist = d_buf[i];
+				if (dist-- != 0) {
+					//					if (DeflaterConstants.DEBUGGING) {
+					//						Console.Write("["+(dist+1)+","+(litlen+3)+"]: ");
+					//					}
+					
+					int lc = Lcode(litlen);
+					literalTree.WriteSymbol(lc);
+					
+					int bits = (lc - 261) / 4;
+					if (bits > 0 && bits <= 5) {
+						pending.WriteBits(litlen & ((1 << bits) - 1), bits);
+					}
+					
+					int dc = Dcode(dist);
+					distTree.WriteSymbol(dc);
+					
+					bits = dc / 2 - 1;
+					if (bits > 0) {
+						pending.WriteBits(dist & ((1 << bits) - 1), bits);
+					}
+				} else {
+					//					if (DeflaterConstants.DEBUGGING) {
+					//						if (litlen > 32 && litlen < 127) {
+					//							Console.Write("("+(char)litlen+"): ");
+					//						} else {
+					//							Console.Write("{"+litlen+"}: ");
+					//						}
+					//					}
+					literalTree.WriteSymbol(litlen);
+				}
+			}
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				Console.Write("EOF: ");
+			//			}
+			literalTree.WriteSymbol(EOF_SYMBOL);
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				literalTree.CheckEmpty();
+			//				distTree.CheckEmpty();
+			//			}
+		}
+		
+		/// <summary>
+		/// Flush block to output with no compression
+		/// </summary>
+		/// <param name="stored">Data to write</param>
+		/// <param name="storedOffset">Index of first byte to write</param>
+		/// <param name="storedLength">Count of bytes to write</param>
+		/// <param name="lastBlock">True if this is the last block</param>
+		public void FlushStoredBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
+		{
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				//Console.WriteLine("Flushing stored block "+ storedLength);
+			//			}
+			pending.WriteBits((DeflaterConstants.STORED_BLOCK << 1) + (lastBlock ? 1 : 0), 3);
+			pending.AlignToByte();
+			pending.WriteShort(storedLength);
+			pending.WriteShort(~storedLength);
+			pending.WriteBlock(stored, storedOffset, storedLength);
+			Reset();
+		}
+
+		/// <summary>
+		/// Flush block to output with compression
+		/// </summary>		
+		/// <param name="stored">Data to flush</param>
+		/// <param name="storedOffset">Index of first byte to flush</param>
+		/// <param name="storedLength">Count of bytes to flush</param>
+		/// <param name="lastBlock">True if this is the last block</param>
+		public void FlushBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
+		{
+			literalTree.freqs[EOF_SYMBOL]++;
+			
+			/* Build trees */
+			literalTree.BuildTree();
+			distTree.BuildTree();
+			
+			/* Calculate bitlen frequency */
+			literalTree.CalcBLFreq(blTree);
+			distTree.CalcBLFreq(blTree);
+			
+			/* Build bitlen tree */
+			blTree.BuildTree();
+			
+			int blTreeCodes = 4;
+			for (int i = 18; i > blTreeCodes; i--) {
+				if (blTree.length[BL_ORDER[i]] > 0) {
+					blTreeCodes = i+1;
+				}
+			}
+			int opt_len = 14 + blTreeCodes * 3 + blTree.GetEncodedLength() + 
+				literalTree.GetEncodedLength() + distTree.GetEncodedLength() + 
+				extra_bits;
+			
+			int static_len = extra_bits;
+			for (int i = 0; i < LITERAL_NUM; i++) {
+				static_len += literalTree.freqs[i] * staticLLength[i];
+			}
+			for (int i = 0; i < DIST_NUM; i++) {
+				static_len += distTree.freqs[i] * staticDLength[i];
+			}
+			if (opt_len >= static_len) {
+				/* Force static trees */
+				opt_len = static_len;
+			}
+            if (storedOffset >= 0 && (storedLength + 4 < (opt_len >> 3))) {			
+				/* Store Block */
+				//				if (DeflaterConstants.DEBUGGING) {
+				//					//Console.WriteLine("Storing, since " + storedLength + " < " + opt_len
+				//					                  + " <= " + static_len);
+				//				}
+				FlushStoredBlock(stored, storedOffset, storedLength, lastBlock);
+			} else if (opt_len == static_len) {
+				/* Encode with static tree */
+				pending.WriteBits((DeflaterConstants.STATIC_TREES << 1) + (lastBlock ? 1 : 0), 3);
+				literalTree.SetStaticCodes(staticLCodes, staticLLength);
+				distTree.SetStaticCodes(staticDCodes, staticDLength);
+				CompressBlock();
+				Reset();
+			} else {
+				/* Encode with dynamic tree */
+				pending.WriteBits((DeflaterConstants.DYN_TREES << 1) + (lastBlock ? 1 : 0), 3);
+				SendAllTrees(blTreeCodes);
+				CompressBlock();
+				Reset();
+			}
+		}
+		
+		/// <summary>
+		/// Get value indicating if internal buffer is full
+		/// </summary>
+		/// <returns>true if buffer is full</returns>
+		public bool IsFull()
+		{
+			return last_lit >= BUFSIZE;
+		}
+		
+		/// <summary>
+		/// Add literal to buffer
+		/// </summary>
+		/// <param name="lit"></param>
+		/// <returns>Value indicating internal buffer is full</returns>
+		public bool TallyLit(int lit)
+		{
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				if (lit > 32 && lit < 127) {
+			//					//Console.WriteLine("("+(char)lit+")");
+			//				} else {
+			//					//Console.WriteLine("{"+lit+"}");
+			//				}
+			//			}
+			d_buf[last_lit] = 0;
+			l_buf[last_lit++] = (byte)lit;
+			literalTree.freqs[lit]++;
+			return IsFull();
+		}
+		
+		/// <summary>
+		/// Add distance code and length to literal and distance trees
+		/// </summary>
+		/// <param name="dist">Distance code</param>
+		/// <param name="len">Length</param>
+		/// <returns>Value indicating if internal buffer is full</returns>
+		public bool TallyDist(int dist, int len)
+		{
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				//Console.WriteLine("["+dist+","+len+"]");
+			//			}
+			
+			d_buf[last_lit]   = (short)dist;
+			l_buf[last_lit++] = (byte)(len - 3);
+			
+			int lc = Lcode(len - 3);
+			literalTree.freqs[lc]++;
+			if (lc >= 265 && lc < 285) {
+				extra_bits += (lc - 261) / 4;
+			}
+			
+			int dc = Dcode(dist - 1);
+			distTree.freqs[dc]++;
+			if (dc >= 4) {
+				extra_bits += dc / 2 - 1;
+			}
+			return IsFull();
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterPending.cs b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterPending.cs
new file mode 100644
index 0000000..6024ed8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/DeflaterPending.cs
@@ -0,0 +1,57 @@
+// DeflaterPending.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// This class stores the pending output of the Deflater.
+	/// 
+	/// author of the original java version : Jochen Hoenicke
+	/// </summary>
+	public class DeflaterPending : PendingBuffer
+	{
+		/// <summary>
+		/// Construct instance with default buffer size
+		/// </summary>
+		public DeflaterPending() : base(DeflaterConstants.PENDING_BUF_SIZE)
+		{
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Inflater.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Inflater.cs
new file mode 100644
index 0000000..557e21d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Inflater.cs
@@ -0,0 +1,817 @@
+// Inflater.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+using agsXMPP.IO.Compression.Checksums;
+using agsXMPP.IO.Compression.Streams;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// Inflater is used to decompress data that has been compressed according
+	/// to the "deflate" standard described in rfc1951.
+	/// 
+	/// By default Zlib (rfc1950) headers and footers are expected in the input.
+	/// You can use constructor <code> public Inflater(bool noHeader)</code> passing true
+	/// if there is no Zlib header information
+	///
+	/// The usage is as following.  First you have to set some input with
+	/// <code>setInput()</code>, then inflate() it.  If inflate doesn't
+	/// inflate any bytes there may be three reasons:
+	/// <ul>
+	/// <li>needsInput() returns true because the input buffer is empty.
+	/// You have to provide more input with <code>setInput()</code>.
+	/// NOTE: needsInput() also returns true when, the stream is finished.
+	/// </li>
+	/// <li>needsDictionary() returns true, you have to provide a preset
+	///    dictionary with <code>setDictionary()</code>.</li>
+	/// <li>finished() returns true, the inflater has finished.</li>
+	/// </ul>
+	/// Once the first output byte is produced, a dictionary will not be
+	/// needed at a later stage.
+	///
+	/// author of the original java version : John Leuner, Jochen Hoenicke
+	/// </summary>
+	public class Inflater
+	{
+		/// <summary>
+		/// Copy lengths for literal codes 257..285
+		/// </summary>
+		static int[] CPLENS = {
+								 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+								 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258
+							  };
+		
+		/// <summary>
+		/// Extra bits for literal codes 257..285
+		/// </summary>
+		static int[] CPLEXT = {
+								 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
+								 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0
+							  };
+		
+		/// <summary>
+		/// Copy offsets for distance codes 0..29
+		/// </summary>
+		static int[] CPDIST = {
+								1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+								257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+								8193, 12289, 16385, 24577
+							  };
+		
+		/// <summary>
+		/// Extra bits for distance codes
+		/// </summary>
+		static int[] CPDEXT = {
+								0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+								7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
+								12, 12, 13, 13
+							  };
+		
+		/// <summary>
+		/// These are the possible states for an inflater
+		/// </summary>
+		const int DECODE_HEADER           = 0;
+		const int DECODE_DICT             = 1;
+		const int DECODE_BLOCKS           = 2;
+		const int DECODE_STORED_LEN1      = 3;
+		const int DECODE_STORED_LEN2      = 4;
+		const int DECODE_STORED           = 5;
+		const int DECODE_DYN_HEADER       = 6;
+		const int DECODE_HUFFMAN          = 7;
+		const int DECODE_HUFFMAN_LENBITS  = 8;
+		const int DECODE_HUFFMAN_DIST     = 9;
+		const int DECODE_HUFFMAN_DISTBITS = 10;
+		const int DECODE_CHKSUM           = 11;
+		const int FINISHED                = 12;
+		
+		/// <summary>
+		/// This variable contains the current state.
+		/// </summary>
+		int mode;
+		
+		/// <summary>
+		/// The adler checksum of the dictionary or of the decompressed
+		/// stream, as it is written in the header resp. footer of the
+		/// compressed stream. 
+		/// Only valid if mode is DECODE_DICT or DECODE_CHKSUM.
+		/// </summary>
+		int readAdler;
+		
+		/// <summary>
+		/// The number of bits needed to complete the current state.  This
+		/// is valid, if mode is DECODE_DICT, DECODE_CHKSUM,
+		/// DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS.
+		/// </summary>
+		int neededBits;
+		int repLength;
+		int repDist;
+		int uncomprLen;
+		
+		/// <summary>
+		/// True, if the last block flag was set in the last block of the
+		/// inflated stream.  This means that the stream ends after the
+		/// current block.
+		/// </summary>
+		bool isLastBlock;
+		
+		/// <summary>
+		/// The total number of inflated bytes.
+		/// </summary>
+		int totalOut;
+		
+		/// <summary>
+		/// The total number of bytes set with setInput().  This is not the
+		/// value returned by the TotalIn property, since this also includes the
+		/// unprocessed input.
+		/// </summary>
+		int totalIn;
+		
+		/// <summary>
+		/// This variable stores the noHeader flag that was given to the constructor.
+		/// True means, that the inflated stream doesn't contain a Zlib header or 
+		/// footer.
+		/// </summary>
+		bool noHeader;
+		
+		StreamManipulator input;
+		OutputWindow outputWindow;
+		InflaterDynHeader dynHeader;
+		InflaterHuffmanTree litlenTree, distTree;
+		Adler32 adler;
+		
+		/// <summary>
+		/// Creates a new inflater or RFC1951 decompressor
+		/// RFC1950/Zlib headers and footers will be expected in the input data
+		/// </summary>
+		public Inflater() : this(false)
+		{
+		}
+		
+		/// <summary>
+		/// Creates a new inflater.
+		/// </summary>
+		/// <param name="noHeader">
+		/// True if no RFC1950/Zlib header and footer fields are expected in the input data
+		/// 
+		/// This is used for GZIPed/Zipped input.
+		/// 
+		/// For compatibility with
+		/// Sun JDK you should provide one byte of input more than needed in
+		/// this case.
+		/// </param>
+		public Inflater(bool noHeader)
+		{
+			this.noHeader = noHeader;
+			this.adler = new Adler32();
+			input = new StreamManipulator();
+			outputWindow = new OutputWindow();
+			mode = noHeader ? DECODE_BLOCKS : DECODE_HEADER;
+		}
+		
+		/// <summary>
+		/// Resets the inflater so that a new stream can be decompressed.  All
+		/// pending input and output will be discarded.
+		/// </summary>
+		public void Reset()
+		{
+			mode = noHeader ? DECODE_BLOCKS : DECODE_HEADER;
+			totalIn = totalOut = 0;
+			input.Reset();
+			outputWindow.Reset();
+			dynHeader = null;
+			litlenTree = null;
+			distTree = null;
+			isLastBlock = false;
+			adler.Reset();
+		}
+		
+		/// <summary>
+		/// Decodes a zlib/RFC1950 header.
+		/// </summary>
+		/// <returns>
+		/// False if more input is needed.
+		/// </returns>
+		/// <exception cref="SharpZipBaseException">
+		/// The header is invalid.
+		/// </exception>
+		private bool DecodeHeader()
+		{
+			int header = input.PeekBits(16);
+			if (header < 0) {
+				return false;
+			}
+			input.DropBits(16);
+			
+			/* The header is written in "wrong" byte order */
+			header = ((header << 8) | (header >> 8)) & 0xffff;
+			if (header % 31 != 0) {
+				throw new SharpZipBaseException("Header checksum illegal");
+			}
+			
+			if ((header & 0x0f00) != (Deflater.DEFLATED << 8)) {
+				throw new SharpZipBaseException("Compression Method unknown");
+			}
+			
+			/* Maximum size of the backwards window in bits.
+			* We currently ignore this, but we could use it to make the
+			* inflater window more space efficient. On the other hand the
+			* full window (15 bits) is needed most times, anyway.
+			int max_wbits = ((header & 0x7000) >> 12) + 8;
+			*/
+			
+			if ((header & 0x0020) == 0) { // Dictionary flag?
+				mode = DECODE_BLOCKS;
+			} else {
+				mode = DECODE_DICT;
+				neededBits = 32;
+			}
+			return true;
+		}
+		
+		/// <summary>
+		/// Decodes the dictionary checksum after the deflate header.
+		/// </summary>
+		/// <returns>
+		/// False if more input is needed.
+		/// </returns>
+		private bool DecodeDict()
+		{
+			while (neededBits > 0) {
+				int dictByte = input.PeekBits(8);
+				if (dictByte < 0) {
+					return false;
+				}
+				input.DropBits(8);
+				readAdler = (readAdler << 8) | dictByte;
+				neededBits -= 8;
+			}
+			return false;
+		}
+		
+		/// <summary>
+		/// Decodes the huffman encoded symbols in the input stream.
+		/// </summary>
+		/// <returns>
+		/// false if more input is needed, true if output window is
+		/// full or the current block ends.
+		/// </returns>
+		/// <exception cref="SharpZipBaseException">
+		/// if deflated stream is invalid.
+		/// </exception>
+		private bool DecodeHuffman()
+		{
+			int free = outputWindow.GetFreeSpace();
+			while (free >= 258) {
+				int symbol;
+				switch (mode) {
+					case DECODE_HUFFMAN:
+						/* This is the inner loop so it is optimized a bit */
+						while (((symbol = litlenTree.GetSymbol(input)) & ~0xff) == 0) {
+							outputWindow.Write(symbol);
+							if (--free < 258) {
+								return true;
+							}
+						}
+						
+						if (symbol < 257) {
+							if (symbol < 0) {
+								return false;
+							} else {
+								/* symbol == 256: end of block */
+								distTree = null;
+								litlenTree = null;
+								mode = DECODE_BLOCKS;
+								return true;
+							}
+						}
+						
+						try {
+							repLength = CPLENS[symbol - 257];
+							neededBits = CPLEXT[symbol - 257];
+						} catch (Exception) {
+							throw new SharpZipBaseException("Illegal rep length code");
+						}
+						goto case DECODE_HUFFMAN_LENBITS; /* fall through */
+						
+					case DECODE_HUFFMAN_LENBITS:
+						if (neededBits > 0) {
+							mode = DECODE_HUFFMAN_LENBITS;
+							int i = input.PeekBits(neededBits);
+							if (i < 0) {
+								return false;
+							}
+							input.DropBits(neededBits);
+							repLength += i;
+						}
+						mode = DECODE_HUFFMAN_DIST;
+						goto case DECODE_HUFFMAN_DIST;/* fall through */
+						
+					case DECODE_HUFFMAN_DIST:
+						symbol = distTree.GetSymbol(input);
+						if (symbol < 0) {
+							return false;
+						}
+						
+						try {
+							repDist = CPDIST[symbol];
+							neededBits = CPDEXT[symbol];
+						} catch (Exception) {
+							throw new SharpZipBaseException("Illegal rep dist code");
+						}
+						
+						goto case DECODE_HUFFMAN_DISTBITS;/* fall through */
+						
+					case DECODE_HUFFMAN_DISTBITS:
+						if (neededBits > 0) {
+							mode = DECODE_HUFFMAN_DISTBITS;
+							int i = input.PeekBits(neededBits);
+							if (i < 0) {
+								return false;
+							}
+							input.DropBits(neededBits);
+							repDist += i;
+						}
+						
+						outputWindow.Repeat(repLength, repDist);
+						free -= repLength;
+						mode = DECODE_HUFFMAN;
+						break;
+					
+					default:
+						throw new SharpZipBaseException("Inflater unknown mode");
+				}
+			}
+			return true;
+		}
+		
+		/// <summary>
+		/// Decodes the adler checksum after the deflate stream.
+		/// </summary>
+		/// <returns>
+		/// false if more input is needed.
+		/// </returns>
+		/// <exception cref="SharpZipBaseException">
+		/// If checksum doesn't match.
+		/// </exception>
+		private bool DecodeChksum()
+		{
+			while (neededBits > 0) {
+				int chkByte = input.PeekBits(8);
+				if (chkByte < 0) {
+					return false;
+				}
+				input.DropBits(8);
+				readAdler = (readAdler << 8) | chkByte;
+				neededBits -= 8;
+			}
+			if ((int) adler.Value != readAdler) {
+				throw new SharpZipBaseException("Adler chksum doesn't match: " + (int)adler.Value + " vs. " + readAdler);
+			}
+			mode = FINISHED;
+			return false;
+		}
+		
+		/// <summary>
+		/// Decodes the deflated stream.
+		/// </summary>
+		/// <returns>
+		/// false if more input is needed, or if finished.
+		/// </returns>
+		/// <exception cref="SharpZipBaseException">
+		/// if deflated stream is invalid.
+		/// </exception>
+		private bool Decode()
+		{
+			switch (mode) {
+				case DECODE_HEADER:
+					return DecodeHeader();
+				case DECODE_DICT:
+					return DecodeDict();
+				case DECODE_CHKSUM:
+					return DecodeChksum();
+				
+				case DECODE_BLOCKS:
+					if (isLastBlock) {
+						if (noHeader) {
+							mode = FINISHED;
+							return false;
+						} else {
+							input.SkipToByteBoundary();
+							neededBits = 32;
+							mode = DECODE_CHKSUM;
+							return true;
+						}
+					}
+					
+					int type = input.PeekBits(3);
+					if (type < 0) {
+						return false;
+					}
+					input.DropBits(3);
+					
+					if ((type & 1) != 0) {
+						isLastBlock = true;
+					}
+					switch (type >> 1){
+						case DeflaterConstants.STORED_BLOCK:
+							input.SkipToByteBoundary();
+							mode = DECODE_STORED_LEN1;
+							break;
+						case DeflaterConstants.STATIC_TREES:
+							litlenTree = InflaterHuffmanTree.defLitLenTree;
+							distTree = InflaterHuffmanTree.defDistTree;
+							mode = DECODE_HUFFMAN;
+							break;
+						case DeflaterConstants.DYN_TREES:
+							dynHeader = new InflaterDynHeader();
+							mode = DECODE_DYN_HEADER;
+							break;
+						default:
+							throw new SharpZipBaseException("Unknown block type " + type);
+					}
+					return true;
+				
+				case DECODE_STORED_LEN1: 
+				{
+					if ((uncomprLen = input.PeekBits(16)) < 0) {
+						return false;
+					}
+					input.DropBits(16);
+					mode = DECODE_STORED_LEN2;
+				}
+					goto case DECODE_STORED_LEN2; /* fall through */
+					
+				case DECODE_STORED_LEN2: 
+				{
+					int nlen = input.PeekBits(16);
+					if (nlen < 0) {
+						return false;
+					}
+					input.DropBits(16);
+					if (nlen != (uncomprLen ^ 0xffff)) {
+						throw new SharpZipBaseException("broken uncompressed block");
+					}
+					mode = DECODE_STORED;
+				}
+					goto case DECODE_STORED;/* fall through */
+					
+				case DECODE_STORED: 
+				{
+					int more = outputWindow.CopyStored(input, uncomprLen);
+					uncomprLen -= more;
+					if (uncomprLen == 0) {
+						mode = DECODE_BLOCKS;
+						return true;
+					}
+					return !input.IsNeedingInput;
+				}
+				
+				case DECODE_DYN_HEADER:
+					if (!dynHeader.Decode(input)) {
+						return false;
+					}
+					
+					litlenTree = dynHeader.BuildLitLenTree();
+					distTree = dynHeader.BuildDistTree();
+					mode = DECODE_HUFFMAN;
+					goto case DECODE_HUFFMAN; /* fall through */
+					
+				case DECODE_HUFFMAN:
+				case DECODE_HUFFMAN_LENBITS:
+				case DECODE_HUFFMAN_DIST:
+				case DECODE_HUFFMAN_DISTBITS:
+					return DecodeHuffman();
+				
+				case FINISHED:
+					return false;
+				
+				default:
+					throw new SharpZipBaseException("Inflater.Decode unknown mode");
+			}
+		}
+			
+		/// <summary>
+		/// Sets the preset dictionary.  This should only be called, if
+		/// needsDictionary() returns true and it should set the same
+		/// dictionary, that was used for deflating.  The getAdler()
+		/// function returns the checksum of the dictionary needed.
+		/// </summary>
+		/// <param name="buffer">
+		/// The dictionary.
+		/// </param>
+		public void SetDictionary(byte[] buffer)
+		{
+			SetDictionary(buffer, 0, buffer.Length);
+		}
+		
+		/// <summary>
+		/// Sets the preset dictionary.  This should only be called, if
+		/// needsDictionary() returns true and it should set the same
+		/// dictionary, that was used for deflating.  The getAdler()
+		/// function returns the checksum of the dictionary needed.
+		/// </summary>
+		/// <param name="buffer">
+		/// The dictionary.
+		/// </param>
+		/// <param name="offset">
+		/// The offset into buffer where the dictionary starts.
+		/// </param>
+		/// <param name="len">
+		/// The length of the dictionary.
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// No dictionary is needed.
+		/// </exception>
+		/// <exception cref="SharpZipBaseException">
+		/// The adler checksum for the buffer is invalid
+		/// </exception>
+		public void SetDictionary(byte[] buffer, int offset, int len)
+		{
+			if (!IsNeedingDictionary) {
+				throw new InvalidOperationException();
+			}
+			
+			adler.Update(buffer, offset, len);
+			if ((int)adler.Value != readAdler) {
+				throw new SharpZipBaseException("Wrong adler checksum");
+			}
+			adler.Reset();
+			outputWindow.CopyDict(buffer, offset, len);
+			mode = DECODE_BLOCKS;
+		}
+		
+		/// <summary>
+		/// Sets the input.  This should only be called, if needsInput()
+		/// returns true.
+		/// </summary>
+		/// <param name="buf">
+		/// the input.
+		/// </param>
+		public void SetInput(byte[] buf)
+		{
+			SetInput(buf, 0, buf.Length);
+		}
+		
+		/// <summary>
+		/// Sets the input.  This should only be called, if needsInput()
+		/// returns true.
+		/// </summary>
+		/// <param name="buffer">
+		/// The source of input data
+		/// </param>
+		/// <param name="offset">
+		/// The offset into buffer where the input starts.
+		/// </param>
+		/// <param name="length">
+		/// The number of bytes of input to use.
+		/// </param>
+		/// <exception cref="System.InvalidOperationException">
+		/// No input is needed.
+		/// </exception>
+		/// <exception cref="System.ArgumentOutOfRangeException">
+		/// The off and/or len are wrong.
+		/// </exception>
+		public void SetInput(byte[] buffer, int offset, int length)
+		{
+			input.SetInput(buffer, offset, length);
+			totalIn += length;
+		}
+		
+		/// <summary>
+		/// Inflates the compressed stream to the output buffer.  If this
+		/// returns 0, you should check, whether needsDictionary(),
+		/// needsInput() or finished() returns true, to determine why no
+		/// further output is produced.
+		/// </summary>
+		/// <param name = "buf">
+		/// the output buffer.
+		/// </param>
+		/// <returns>
+		/// the number of bytes written to the buffer, 0 if no further
+		/// output can be produced.
+		/// </returns>
+		/// <exception cref="System.ArgumentOutOfRangeException">
+		/// if buf has length 0.
+		/// </exception>
+		/// <exception cref="System.FormatException">
+		/// if deflated stream is invalid.
+		/// </exception>
+		public int Inflate(byte[] buf)
+		{
+			return Inflate(buf, 0, buf.Length);
+		}
+		
+		/// <summary>
+		/// Inflates the compressed stream to the output buffer.  If this
+		/// returns 0, you should check, whether needsDictionary(),
+		/// needsInput() or finished() returns true, to determine why no
+		/// further output is produced.
+		/// </summary>
+		/// <param name = "buf">
+		/// the output buffer.
+		/// </param>
+		/// <param name = "offset">
+		/// the offset into buffer where the output should start.
+		/// </param>
+		/// <param name = "len">
+		/// the maximum length of the output.
+		/// </param>
+		/// <returns>
+		/// the number of bytes written to the buffer, 0 if no further output can be produced.
+		/// </returns>
+		/// <exception cref="System.ArgumentOutOfRangeException">
+		/// if len is <= 0.
+		/// </exception>
+		/// <exception cref="System.ArgumentOutOfRangeException">
+		/// if the offset and/or len are wrong.
+		/// </exception>
+		/// <exception cref="System.FormatException">
+		/// if deflated stream is invalid.
+		/// </exception>
+		public int Inflate(byte[] buf, int offset, int len)
+		{
+			if (len < 0) {
+				throw new ArgumentOutOfRangeException("len < 0");
+			}
+			
+			// Special case: len may be zero
+			if (len == 0) {
+				if (IsFinished == false) { // -jr- 08-Nov-2003 INFLATE_BUG fix..
+					Decode();
+				}
+				return 0;
+			}
+/*
+			// Check for correct buff, off, len triple
+			if (off < 0 || off + len >= buf.Length) {
+				throw new ArgumentException("off/len outside buf bounds");
+			}
+*/
+			int count = 0;
+			int more;
+			do {
+				if (mode != DECODE_CHKSUM) {
+					/* Don't give away any output, if we are waiting for the
+					* checksum in the input stream.
+					*
+					* With this trick we have always:
+					*   needsInput() and not finished()
+					*   implies more output can be produced.
+					*/
+					more = outputWindow.CopyOutput(buf, offset, len);
+					adler.Update(buf, offset, more);
+					offset += more;
+					count += more;
+					totalOut += more;
+					len -= more;
+					if (len == 0) {
+						return count;
+					}
+				}
+			} while (Decode() || (outputWindow.GetAvailable() > 0 && mode != DECODE_CHKSUM));
+			return count;
+		}
+		
+		/// <summary>
+		/// Returns true, if the input buffer is empty.
+		/// You should then call setInput(). 
+		/// NOTE: This method also returns true when the stream is finished.
+		/// </summary>
+		public bool IsNeedingInput {
+			get {
+				return input.IsNeedingInput;
+			}
+		}
+		
+		/// <summary>
+		/// Returns true, if a preset dictionary is needed to inflate the input.
+		/// </summary>
+		public bool IsNeedingDictionary {
+			get {
+				return mode == DECODE_DICT && neededBits == 0;
+			}
+		}
+		
+		/// <summary>
+		/// Returns true, if the inflater has finished.  This means, that no
+		/// input is needed and no output can be produced.
+		/// </summary>
+		public bool IsFinished {
+			get {
+				return mode == FINISHED && outputWindow.GetAvailable() == 0;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the adler checksum.  This is either the checksum of all
+		/// uncompressed bytes returned by inflate(), or if needsDictionary()
+		/// returns true (and thus no output was yet produced) this is the
+		/// adler checksum of the expected dictionary.
+		/// </summary>
+		/// <returns>
+		/// the adler checksum.
+		/// </returns>
+		public int Adler {
+			get {
+				return IsNeedingDictionary ? readAdler : (int) adler.Value;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the total number of output bytes returned by inflate().
+		/// </summary>
+		/// <returns>
+		/// the total number of output bytes.
+		/// </returns>
+		public int TotalOut {
+			get {
+				return totalOut;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the total number of processed compressed input bytes.
+		/// </summary>
+		/// <returns>
+		/// The total number of bytes of processed input bytes.
+		/// </returns>
+		public int TotalIn {
+			get {
+				return totalIn - RemainingInput;
+			}
+		}
+		
+#if TEST_HAK		
+		/// <summary>
+		/// -jr test hak trying to figure out a bug
+		///</summary>
+		public int UnseenInput {
+			get {
+				return totalIn - ((input.AvailableBits + 7) >> 3);
+			}
+		}
+		
+		/// <summary>
+		/// -jr test hak trying to figure out a bug
+		///</summary>
+		public int PlainTotalIn {
+			get {
+				return totalIn;
+			}
+		}
+#endif
+		
+		/// <summary>
+		/// Gets the number of unprocessed input bytes.  Useful, if the end of the
+		/// stream is reached and you want to further process the bytes after
+		/// the deflate stream.
+		/// </summary>
+		/// <returns>
+		/// The number of bytes of the input which have not been processed.
+		/// </returns>
+		public int RemainingInput {
+			get {
+				return input.AvailableBytes;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/InflaterDynHeader.cs b/lib/agsxmpp/agsxmpp/IO/Compression/InflaterDynHeader.cs
new file mode 100644
index 0000000..ac7c9e4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/InflaterDynHeader.cs
@@ -0,0 +1,207 @@
+// InflaterDynHeader.cs
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+//
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+using agsXMPP.IO.Compression.Streams;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	class InflaterDynHeader
+	{
+		const int LNUM   = 0;
+		const int DNUM   = 1;
+		const int BLNUM  = 2;
+		const int BLLENS = 3;
+		const int LENS   = 4;
+		const int REPS   = 5;
+		
+		static readonly int[] repMin  = { 3, 3, 11 };
+		static readonly int[] repBits = { 2, 3,  7 };
+		
+		byte[] blLens;
+		byte[] litdistLens;
+		
+		InflaterHuffmanTree blTree;
+		
+		int mode;
+		int lnum, dnum, blnum, num;
+		int repSymbol;
+		byte lastLen;
+		int ptr;
+		
+		static readonly int[] BL_ORDER = 
+		{ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+		
+		public InflaterDynHeader()
+		{
+		}
+		
+		public bool Decode(StreamManipulator input)
+		{
+			decode_loop:
+				for (;;) {
+					switch (mode) {
+						case LNUM:
+							lnum = input.PeekBits(5);
+							if (lnum < 0) {
+								return false;
+							}
+							lnum += 257;
+							input.DropBits(5);
+							//  	    System.err.println("LNUM: "+lnum);
+							mode = DNUM;
+							goto case DNUM; // fall through
+						case DNUM:
+							dnum = input.PeekBits(5);
+							if (dnum < 0) {
+								return false;
+							}
+							dnum++;
+							input.DropBits(5);
+							//  	    System.err.println("DNUM: "+dnum);
+							num = lnum+dnum;
+							litdistLens = new byte[num];
+							mode = BLNUM;
+							goto case BLNUM; // fall through
+						case BLNUM:
+							blnum = input.PeekBits(4);
+							if (blnum < 0) {
+								return false;
+							}
+							blnum += 4;
+							input.DropBits(4);
+							blLens = new byte[19];
+							ptr = 0;
+							//  	    System.err.println("BLNUM: "+blnum);
+							mode = BLLENS;
+							goto case BLLENS; // fall through
+						case BLLENS:
+							while (ptr < blnum) {
+								int len = input.PeekBits(3);
+								if (len < 0) {
+									return false;
+								}
+								input.DropBits(3);
+								//  		System.err.println("blLens["+BL_ORDER[ptr]+"]: "+len);
+								blLens[BL_ORDER[ptr]] = (byte) len;
+								ptr++;
+							}
+							blTree = new InflaterHuffmanTree(blLens);
+							blLens = null;
+							ptr = 0;
+							mode = LENS;
+							goto case LENS; // fall through
+						case LENS: 
+						{
+							int symbol;
+							while (((symbol = blTree.GetSymbol(input)) & ~15) == 0) {
+								/* Normal case: symbol in [0..15] */
+							
+								//  		  System.err.println("litdistLens["+ptr+"]: "+symbol);
+								litdistLens[ptr++] = lastLen = (byte)symbol;
+							
+								if (ptr == num) {
+									/* Finished */
+									return true;
+								}
+							}
+						
+							/* need more input ? */
+							if (symbol < 0) {
+								return false;
+							}
+						
+							/* otherwise repeat code */
+							if (symbol >= 17) {
+								/* repeat zero */
+								//  		  System.err.println("repeating zero");
+								lastLen = 0;
+							} else {
+								if (ptr == 0) {
+									throw new SharpZipBaseException();
+								}
+							}
+							repSymbol = symbol-16;
+						}
+							mode = REPS;
+							goto case REPS; // fall through
+						case REPS:
+						{
+							int bits = repBits[repSymbol];
+							int count = input.PeekBits(bits);
+							if (count < 0) {
+								return false;
+							}
+							input.DropBits(bits);
+							count += repMin[repSymbol];
+							//  	      System.err.println("litdistLens repeated: "+count);
+							
+							if (ptr + count > num) {
+								throw new SharpZipBaseException();
+							}
+							while (count-- > 0) {
+								litdistLens[ptr++] = lastLen;
+							}
+							
+							if (ptr == num) {
+								/* Finished */
+								return true;
+							}
+						}
+							mode = LENS;
+							goto decode_loop;
+					}
+				}
+		}
+		
+		public InflaterHuffmanTree BuildLitLenTree()
+		{
+			byte[] litlenLens = new byte[lnum];
+			Array.Copy(litdistLens, 0, litlenLens, 0, lnum);
+			return new InflaterHuffmanTree(litlenLens);
+		}
+		
+		public InflaterHuffmanTree BuildDistTree()
+		{
+			byte[] distLens = new byte[dnum];
+			Array.Copy(litdistLens, lnum, distLens, 0, dnum);
+			return new InflaterHuffmanTree(distLens);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/InflaterHuffmanTree.cs b/lib/agsxmpp/agsxmpp/IO/Compression/InflaterHuffmanTree.cs
new file mode 100644
index 0000000..ab6fcb7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/InflaterHuffmanTree.cs
@@ -0,0 +1,225 @@
+// InflaterHuffmanTree.cs
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+using agsXMPP.IO.Compression.Streams;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// Huffman tree used for inflation
+	/// </summary>
+	public class InflaterHuffmanTree 
+	{
+		static int MAX_BITLEN = 15;
+		short[] tree;
+		
+		/// <summary>
+		/// Literal length tree
+		/// </summary>
+		public static InflaterHuffmanTree defLitLenTree;
+		
+		/// <summary>
+		/// Distance tree
+		/// </summary>
+		public static InflaterHuffmanTree defDistTree;
+		
+		static InflaterHuffmanTree()
+		{
+			try {
+				byte[] codeLengths = new byte[288];
+				int i = 0;
+				while (i < 144) {
+					codeLengths[i++] = 8;
+				}
+				while (i < 256) {
+					codeLengths[i++] = 9;
+				}
+				while (i < 280) {
+					codeLengths[i++] = 7;
+				}
+				while (i < 288) {
+					codeLengths[i++] = 8;
+				}
+				defLitLenTree = new InflaterHuffmanTree(codeLengths);
+				
+				codeLengths = new byte[32];
+				i = 0;
+				while (i < 32) {
+					codeLengths[i++] = 5;
+				}
+				defDistTree = new InflaterHuffmanTree(codeLengths);
+			} catch (Exception) {
+				throw new SharpZipBaseException("InflaterHuffmanTree: static tree length illegal");
+			}
+		}
+		
+		/// <summary>
+		/// Constructs a Huffman tree from the array of code lengths.
+		/// </summary>
+		/// <param name = "codeLengths">
+		/// the array of code lengths
+		/// </param>
+		public InflaterHuffmanTree(byte[] codeLengths)
+		{
+			BuildTree(codeLengths);
+		}
+		
+		void BuildTree(byte[] codeLengths)
+		{
+			int[] blCount  = new int[MAX_BITLEN + 1];
+			int[] nextCode = new int[MAX_BITLEN + 1];
+			
+			for (int i = 0; i < codeLengths.Length; i++) {
+				int bits = codeLengths[i];
+				if (bits > 0) {
+					blCount[bits]++;
+				}
+			}
+			
+			int code = 0;
+			int treeSize = 512;
+			for (int bits = 1; bits <= MAX_BITLEN; bits++) {
+				nextCode[bits] = code;
+				code += blCount[bits] << (16 - bits);
+				if (bits >= 10) {
+					/* We need an extra table for bit lengths >= 10. */
+					int start = nextCode[bits] & 0x1ff80;
+					int end   = code & 0x1ff80;
+					treeSize += (end - start) >> (16 - bits);
+				}
+			}
+			
+/* -jr comment this out! doesnt work for dynamic trees and pkzip 2.04g
+			if (code != 65536) 
+			{
+				throw new SharpZipBaseException("Code lengths don't add up properly.");
+			}
+*/
+			/* Now create and fill the extra tables from longest to shortest
+			* bit len.  This way the sub trees will be aligned.
+			*/
+			tree = new short[treeSize];
+			int treePtr = 512;
+			for (int bits = MAX_BITLEN; bits >= 10; bits--) {
+				int end   = code & 0x1ff80;
+				code -= blCount[bits] << (16 - bits);
+				int start = code & 0x1ff80;
+				for (int i = start; i < end; i += 1 << 7) {
+					tree[DeflaterHuffman.BitReverse(i)] = (short) ((-treePtr << 4) | bits);
+					treePtr += 1 << (bits-9);
+				}
+			}
+			
+			for (int i = 0; i < codeLengths.Length; i++) {
+				int bits = codeLengths[i];
+				if (bits == 0) {
+					continue;
+				}
+				code = nextCode[bits];
+				int revcode = DeflaterHuffman.BitReverse(code);
+				if (bits <= 9) {
+					do {
+						tree[revcode] = (short) ((i << 4) | bits);
+						revcode += 1 << bits;
+					} while (revcode < 512);
+				} else {
+					int subTree = tree[revcode & 511];
+					int treeLen = 1 << (subTree & 15);
+					subTree = -(subTree >> 4);
+					do {
+						tree[subTree | (revcode >> 9)] = (short) ((i << 4) | bits);
+						revcode += 1 << bits;
+					} while (revcode < treeLen);
+				}
+				nextCode[bits] = code + (1 << (16 - bits));
+			}
+			
+		}
+		
+		/// <summary>
+		/// Reads the next symbol from input.  The symbol is encoded using the
+		/// huffman tree.
+		/// </summary>
+		/// <param name="input">
+		/// input the input source.
+		/// </param>
+		/// <returns>
+		/// the next symbol, or -1 if not enough input is available.
+		/// </returns>
+		public int GetSymbol(StreamManipulator input)
+		{
+			int lookahead, symbol;
+			if ((lookahead = input.PeekBits(9)) >= 0) {
+				if ((symbol = tree[lookahead]) >= 0) {
+					input.DropBits(symbol & 15);
+					return symbol >> 4;
+				}
+				int subtree = -(symbol >> 4);
+				int bitlen = symbol & 15;
+				if ((lookahead = input.PeekBits(bitlen)) >= 0) {
+					symbol = tree[subtree | (lookahead >> 9)];
+					input.DropBits(symbol & 15);
+					return symbol >> 4;
+				} else {
+					int bits = input.AvailableBits;
+					lookahead = input.PeekBits(bits);
+					symbol = tree[subtree | (lookahead >> 9)];
+					if ((symbol & 15) <= bits) {
+						input.DropBits(symbol & 15);
+						return symbol >> 4;
+					} else {
+						return -1;
+					}
+				}
+			} else {
+				int bits = input.AvailableBits;
+				lookahead = input.PeekBits(bits);
+				symbol = tree[lookahead];
+				if (symbol >= 0 && (symbol & 15) <= bits) {
+					input.DropBits(symbol & 15);
+					return symbol >> 4;
+				} else {
+					return -1;
+				}
+			}
+		}
+	}
+}
+
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/PendingBuffer.cs b/lib/agsxmpp/agsxmpp/IO/Compression/PendingBuffer.cs
new file mode 100644
index 0000000..fde9edb
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/PendingBuffer.cs
@@ -0,0 +1,274 @@
+// PendingBuffer.cs
+//
+// Copyright (C) 2001 Mike Krueger
+// Copyright (C) 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression
+{
+	
+	/// <summary>
+	/// This class is general purpose class for writing data to a buffer.
+	/// 
+	/// It allows you to write bits as well as bytes
+	/// Based on DeflaterPending.java
+	/// 
+	/// author of the original java version : Jochen Hoenicke
+	/// </summary>
+	public class PendingBuffer
+	{
+		/// <summary>Internal work buffer
+		/// </summary>
+		protected byte[] buf;
+		
+		int    start;
+		int    end;
+		
+		uint    bits;
+		int    bitCount;
+
+		/// <summary>
+		/// construct instance using default buffer size of 4096
+		/// </summary>
+		public PendingBuffer() : this( 4096 )
+		{
+			
+		}
+		
+		/// <summary>
+		/// construct instance using specified buffer size
+		/// </summary>
+		/// <param name="bufsize">
+		/// size to use for internal buffer
+		/// </param>
+		public PendingBuffer(int bufsize)
+		{
+			buf = new byte[bufsize];
+		}
+
+		/// <summary>
+		/// Clear internal state/buffers
+		/// </summary>
+		public void Reset() 
+		{
+			start = end = bitCount = 0;
+		}
+
+		/// <summary>
+		/// write a byte to buffer
+		/// </summary>
+		/// <param name="b">
+		/// value to write
+		/// </param>
+		public void WriteByte(int b)
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			buf[end++] = (byte) b;
+		}
+
+		/// <summary>
+		/// Write a short value to buffer LSB first
+		/// </summary>
+		/// <param name="s">
+		/// value to write
+		/// </param>
+		public void WriteShort(int s)
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			buf[end++] = (byte) s;
+			buf[end++] = (byte) (s >> 8);
+		}
+
+		/// <summary>
+		/// write an integer LSB first
+		/// </summary>
+		/// <param name="s">value to write</param>
+		public void WriteInt(int s)
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			buf[end++] = (byte) s;
+			buf[end++] = (byte) (s >> 8);
+			buf[end++] = (byte) (s >> 16);
+			buf[end++] = (byte) (s >> 24);
+		}
+		
+		/// <summary>
+		/// Write a block of data to buffer
+		/// </summary>
+		/// <param name="block">data to write</param>
+		/// <param name="offset">offset of first byte to write</param>
+		/// <param name="len">number of bytes to write</param>
+		public void WriteBlock(byte[] block, int offset, int len)
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			System.Array.Copy(block, offset, buf, end, len);
+			end += len;
+		}
+
+		/// <summary>
+		/// The number of bits written to the buffer
+		/// </summary>
+		public int BitCount {
+			get {
+				return bitCount;
+			}
+		}
+		
+		/// <summary>
+		/// Align internal buffer on a byte boundary
+		/// </summary>
+		public void AlignToByte() 
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			if (bitCount > 0) {
+				buf[end++] = (byte) bits;
+				if (bitCount > 8) {
+					buf[end++] = (byte) (bits >> 8);
+				}
+			}
+			bits = 0;
+			bitCount = 0;
+		}
+
+		/// <summary>
+		/// Write bits to internal buffer
+		/// </summary>
+		/// <param name="b">source of bits</param>
+		/// <param name="count">number of bits to write</param>
+		public void WriteBits(int b, int count)
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			//			if (DeflaterConstants.DEBUGGING) {
+			//				//Console.WriteLine("writeBits("+b+","+count+")");
+			//			}
+			bits |= (uint)(b << bitCount);
+			bitCount += count;
+			if (bitCount >= 16) {
+				buf[end++] = (byte) bits;
+				buf[end++] = (byte) (bits >> 8);
+				bits >>= 16;
+				bitCount -= 16;
+			}
+		}
+
+		/// <summary>
+		/// Write a short value to internal buffer most significant byte first
+		/// </summary>
+		/// <param name="s">value to write</param>
+		public void WriteShortMSB(int s) 
+		{
+			if (DeflaterConstants.DEBUGGING && start != 0) {
+				throw new SharpZipBaseException();
+			}
+			buf[end++] = (byte) (s >> 8);
+			buf[end++] = (byte) s;
+		}
+		
+		/// <summary>
+		/// Indicates if buffer has been flushed
+		/// </summary>
+		public bool IsFlushed {
+			get {
+				return end == 0;
+			}
+		}
+		
+		/// <summary>
+		/// Flushes the pending buffer into the given output array.  If the
+		/// output array is to small, only a partial flush is done.
+		/// </summary>
+		/// <param name="output">
+		/// the output array;
+		/// </param>
+		/// <param name="offset">
+		/// the offset into output array;
+		/// </param>
+		/// <param name="length">		
+		/// length the maximum number of bytes to store;
+		/// </param>
+		/// <exception name="ArgumentOutOfRangeException">
+		/// IndexOutOfBoundsException if offset or length are invalid.
+		/// </exception>
+		public int Flush(byte[] output, int offset, int length) 
+		{
+			if (bitCount >= 8) {
+				buf[end++] = (byte) bits;
+				bits >>= 8;
+				bitCount -= 8;
+			}
+			if (length > end - start) {
+				length = end - start;
+				System.Array.Copy(buf, start, output, offset, length);
+				start = 0;
+				end = 0;
+			} else {
+				System.Array.Copy(buf, start, output, offset, length);
+				start += length;
+			}
+			return length;
+		}
+
+		/// <summary>
+		/// Convert internal buffer to byte array.
+		/// Buffer is empty on completion
+		/// </summary>
+		/// <returns>
+		/// converted buffer contents contents
+		/// </returns>
+		public byte[] ToByteArray()
+		{
+			byte[] ret = new byte[end - start];
+			System.Array.Copy(buf, start, ret, 0, ret.Length);
+			start = 0;
+			end = 0;
+			return ret;
+		}
+	}
+}	
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/SharpZipBaseException.cs b/lib/agsxmpp/agsxmpp/IO/Compression/SharpZipBaseException.cs
new file mode 100644
index 0000000..d79c280
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/SharpZipBaseException.cs
@@ -0,0 +1,73 @@
+// SharpZipBaseException.cs
+//
+// Copyright 2004 John Reilly
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression
+{
+	/// <summary>
+	/// SharpZipBaseException is the base exception class for the SharpZipLibrary.
+	/// All library exceptions are derived from this.
+	/// </summary>
+	public class SharpZipBaseException : ApplicationException
+	{
+		/// <summary>
+		/// Initializes a new instance of the SharpZipLibraryException class.
+		/// </summary>
+		public SharpZipBaseException()
+		{
+		}
+		
+		/// <summary>
+		/// Initializes a new instance of the SharpZipLibraryException class with a specified error message.
+		/// </summary>
+		public SharpZipBaseException(string msg) : base(msg)
+		{
+		}
+
+		/// <summary>
+		/// Initializes a new instance of the SharpZipLibraryException class with a specified
+		/// error message and a reference to the inner exception that is the cause of this exception.
+		/// </summary>
+		/// <param name="message">Error message string</param>
+		/// <param name="innerException">The inner exception</param>
+		public SharpZipBaseException(string message, Exception innerException)	: base(message, innerException)
+		{
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Streams/OutputWindow.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Streams/OutputWindow.cs
new file mode 100644
index 0000000..0294187
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Streams/OutputWindow.cs
@@ -0,0 +1,226 @@
+// OutputWindow.cs
+//
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression.Streams 
+{
+	
+	/// <summary>
+	/// Contains the output from the Inflation process.
+	/// We need to have a window so that we can refer backwards into the output stream
+	/// to repeat stuff.<br/>
+	/// Author of the original java version : John Leuner
+	/// </summary>
+	public class OutputWindow
+	{
+		private static int WINDOW_SIZE = 1 << 15;
+		private static int WINDOW_MASK = WINDOW_SIZE - 1;
+		
+		private byte[] window = new byte[WINDOW_SIZE]; //The window is 2^15 bytes
+		private int windowEnd  = 0;
+		private int windowFilled = 0;
+		
+		/// <summary>
+		/// Write a byte to this output window
+		/// </summary>
+		/// <param name="abyte">value to write</param>
+		/// <exception cref="InvalidOperationException">
+		/// if window is full
+		/// </exception>
+		public void Write(int abyte)
+		{
+			if (windowFilled++ == WINDOW_SIZE) {
+				throw new InvalidOperationException("Window full");
+			}
+			window[windowEnd++] = (byte) abyte;
+			windowEnd &= WINDOW_MASK;
+		}
+		
+		
+		private void SlowRepeat(int repStart, int len, int dist)
+		{
+			while (len-- > 0) {
+				window[windowEnd++] = window[repStart++];
+				windowEnd &= WINDOW_MASK;
+				repStart &= WINDOW_MASK;
+			}
+		}
+		
+		/// <summary>
+		/// Append a byte pattern already in the window itself
+		/// </summary>
+		/// <param name="len">length of pattern to copy</param>
+		/// <param name="dist">distance from end of window pattern occurs</param>
+		/// <exception cref="InvalidOperationException">
+		/// If the repeated data overflows the window
+		/// </exception>
+		public void Repeat(int len, int dist)
+		{
+			if ((windowFilled += len) > WINDOW_SIZE) {
+				throw new InvalidOperationException("Window full");
+			}
+			
+			int rep_start = (windowEnd - dist) & WINDOW_MASK;
+			int border = WINDOW_SIZE - len;
+			if (rep_start <= border && windowEnd < border) {
+				if (len <= dist) {
+					System.Array.Copy(window, rep_start, window, windowEnd, len);
+					windowEnd += len;
+				} else {
+					/* We have to copy manually, since the repeat pattern overlaps. */
+					while (len-- > 0) {
+						window[windowEnd++] = window[rep_start++];
+					}
+				}
+			} else {
+				SlowRepeat(rep_start, len, dist);
+			}
+		}
+		
+		/// <summary>
+		/// Copy from input manipulator to internal window
+		/// </summary>
+		/// <param name="input">source of data</param>
+		/// <param name="len">length of data to copy</param>
+		/// <returns>the number of bytes copied</returns>
+		public int CopyStored(StreamManipulator input, int len)
+		{
+			len = Math.Min(Math.Min(len, WINDOW_SIZE - windowFilled), input.AvailableBytes);
+			int copied;
+			
+			int tailLen = WINDOW_SIZE - windowEnd;
+			if (len > tailLen) {
+				copied = input.CopyBytes(window, windowEnd, tailLen);
+				if (copied == tailLen) {
+					copied += input.CopyBytes(window, 0, len - tailLen);
+				}
+			} else {
+				copied = input.CopyBytes(window, windowEnd, len);
+			}
+			
+			windowEnd = (windowEnd + copied) & WINDOW_MASK;
+			windowFilled += copied;
+			return copied;
+		}
+		
+		/// <summary>
+		/// Copy dictionary to window
+		/// </summary>
+		/// <param name="dict">source dictionary</param>
+		/// <param name="offset">offset of start in source dictionary</param>
+		/// <param name="len">length of dictionary</param>
+		/// <exception cref="InvalidOperationException">
+		/// If window isnt empty
+		/// </exception>
+		public void CopyDict(byte[] dict, int offset, int len)
+		{
+			if (windowFilled > 0) {
+				throw new InvalidOperationException();
+			}
+			
+			if (len > WINDOW_SIZE) {
+				offset += len - WINDOW_SIZE;
+				len = WINDOW_SIZE;
+			}
+			System.Array.Copy(dict, offset, window, 0, len);
+			windowEnd = len & WINDOW_MASK;
+		}
+
+		/// <summary>
+		/// Get remaining unfilled space in window
+		/// </summary>
+		/// <returns>Number of bytes left in window</returns>
+		public int GetFreeSpace()
+		{
+			return WINDOW_SIZE - windowFilled;
+		}
+		
+		/// <summary>
+		/// Get bytes available for output in window
+		/// </summary>
+		/// <returns>Number of bytes filled</returns>
+		public int GetAvailable()
+		{
+			return windowFilled;
+		}
+
+		/// <summary>
+		/// Copy contents of window to output
+		/// </summary>
+		/// <param name="output">buffer to copy to</param>
+		/// <param name="offset">offset to start at</param>
+		/// <param name="len">number of bytes to count</param>
+		/// <returns>The number of bytes copied</returns>
+		/// <exception cref="InvalidOperationException">
+		/// If a window underflow occurs
+		/// </exception>
+		public int CopyOutput(byte[] output, int offset, int len)
+		{
+			int copy_end = windowEnd;
+			if (len > windowFilled) {
+				len = windowFilled;
+			} else {
+				copy_end = (windowEnd - windowFilled + len) & WINDOW_MASK;
+			}
+			
+			int copied = len;
+			int tailLen = len - copy_end;
+			
+			if (tailLen > 0) {
+				System.Array.Copy(window, WINDOW_SIZE - tailLen, output, offset, tailLen);
+				offset += tailLen;
+				len = copy_end;
+			}
+			System.Array.Copy(window, copy_end - len, output, offset, len);
+			windowFilled -= copied;
+			if (windowFilled < 0) {
+				throw new InvalidOperationException();
+			}
+			return copied;
+		}
+
+		/// <summary>
+		/// Reset by clearing window so <see cref="GetAvailable">GetAvailable</see> returns 0
+		/// </summary>
+		public void Reset()
+		{
+			windowFilled = windowEnd = 0;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/Compression/Streams/StreamManipulator.cs b/lib/agsxmpp/agsxmpp/IO/Compression/Streams/StreamManipulator.cs
new file mode 100644
index 0000000..9adc2e4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/Compression/Streams/StreamManipulator.cs
@@ -0,0 +1,270 @@
+// StreamManipulator.cs
+//
+// Copyright (C) 2001 Mike Krueger
+//
+// This file was translated from java, it was part of the GNU Classpath
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+//
+// Linking this library statically or dynamically with other modules is
+// making a combined work based on this library.  Thus, the terms and
+// conditions of the GNU General Public License cover the whole
+// combination.
+// 
+// As a special exception, the copyright holders of this library give you
+// permission to link this library with independent modules to produce an
+// executable, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting executable under
+// terms of your choice, provided that you also meet, for each linked
+// independent module, the terms and conditions of the license of that
+// module.  An independent module is a module which is not derived from
+// or based on this library.  If you modify this library, you may extend
+// this exception to your version of the library, but you are not
+// obligated to do so.  If you do not wish to do so, delete this
+// exception statement from your version.
+
+using System;
+
+namespace agsXMPP.IO.Compression.Streams 
+{
+	
+	/// <summary>
+	/// This class allows us to retrieve a specified number of bits from
+	/// the input buffer, as well as copy big byte blocks.
+	///
+	/// It uses an int buffer to store up to 31 bits for direct
+	/// manipulation.  This guarantees that we can get at least 16 bits,
+	/// but we only need at most 15, so this is all safe.
+	///
+	/// There are some optimizations in this class, for example, you must
+	/// never peek more than 8 bits more than needed, and you must first
+	/// peek bits before you may drop them.  This is not a general purpose
+	/// class but optimized for the behaviour of the Inflater.
+	///
+	/// authors of the original java version : John Leuner, Jochen Hoenicke
+	/// </summary>
+	public class StreamManipulator
+	{
+		private byte[] window;
+		private int window_start = 0;
+		private int window_end = 0;
+		
+		private uint buffer = 0;
+		private int bits_in_buffer = 0;
+		
+		/// <summary>
+		/// Get the next n bits but don't increase input pointer.  n must be
+		/// less or equal 16 and if this call succeeds, you must drop
+		/// at least n - 8 bits in the next call.
+		/// </summary>
+		/// <returns>
+		/// the value of the bits, or -1 if not enough bits available.  */
+		/// </returns>
+		public int PeekBits(int n)
+		{
+			if (bits_in_buffer < n) {
+				if (window_start == window_end) {
+					return -1; // ok
+				}
+				buffer |= (uint)((window[window_start++] & 0xff |
+				                 (window[window_start++] & 0xff) << 8) << bits_in_buffer);
+				bits_in_buffer += 16;
+			}
+			return (int)(buffer & ((1 << n) - 1));
+		}
+		
+		/// <summary>
+		/// Drops the next n bits from the input.  You should have called PeekBits
+		/// with a bigger or equal n before, to make sure that enough bits are in
+		/// the bit buffer.
+		/// </summary>
+		public void DropBits(int n)
+		{
+			buffer >>= n;
+			bits_in_buffer -= n;
+		}
+		
+		/// <summary>
+		/// Gets the next n bits and increases input pointer.  This is equivalent
+		/// to PeekBits followed by dropBits, except for correct error handling.
+		/// </summary>
+		/// <returns>
+		/// the value of the bits, or -1 if not enough bits available.
+		/// </returns>
+		public int GetBits(int n)
+		{
+			int bits = PeekBits(n);
+			if (bits >= 0) {
+				DropBits(n);
+			}
+			return bits;
+		}
+		
+		/// <summary>
+		/// Gets the number of bits available in the bit buffer.  This must be
+		/// only called when a previous PeekBits() returned -1.
+		/// </summary>
+		/// <returns>
+		/// the number of bits available.
+		/// </returns>
+		public int AvailableBits {
+			get {
+				return bits_in_buffer;
+			}
+		}
+		
+		/// <summary>
+		/// Gets the number of bytes available.
+		/// </summary>
+		/// <returns>
+		/// The number of bytes available.
+		/// </returns>
+		public int AvailableBytes {
+			get {
+				return window_end - window_start + (bits_in_buffer >> 3);
+			}
+		}
+		
+		/// <summary>
+		/// Skips to the next byte boundary.
+		/// </summary>
+		public void SkipToByteBoundary()
+		{
+			buffer >>= (bits_in_buffer & 7);
+			bits_in_buffer &= ~7;
+		}
+
+		/// <summary>
+		/// Returns true when SetInput can be called
+		/// </summary>
+		public bool IsNeedingInput {
+			get {
+				return window_start == window_end;
+			}
+		}
+		
+		/// <summary>
+		/// Copies length bytes from input buffer to output buffer starting
+		/// at output[offset].  You have to make sure, that the buffer is
+		/// byte aligned.  If not enough bytes are available, copies fewer
+		/// bytes.
+		/// </summary>
+		/// <param name="output">
+		/// The buffer to copy bytes to.
+		/// </param>
+		/// <param name="offset">
+		/// The offset in the buffer at which copying starts
+		/// </param>
+		/// <param name="length">
+		/// The length to copy, 0 is allowed.
+		/// </param>
+		/// <returns>
+		/// The number of bytes copied, 0 if no bytes were available.
+		/// </returns>
+		/// <exception cref="ArgumentOutOfRangeException">
+		/// Length is less than zero
+		/// </exception>
+		/// <exception cref="InvalidOperationException">
+		/// Bit buffer isnt byte aligned
+		/// </exception>
+		public int CopyBytes(byte[] output, int offset, int length)
+		{
+			if (length < 0) {
+				throw new ArgumentOutOfRangeException("length");
+			}
+			if ((bits_in_buffer & 7) != 0) {
+				/* bits_in_buffer may only be 0 or a multiple of 8 */
+				throw new InvalidOperationException("Bit buffer is not byte aligned!");
+			}
+			
+			int count = 0;
+			while (bits_in_buffer > 0 && length > 0) {
+				output[offset++] = (byte) buffer;
+				buffer >>= 8;
+				bits_in_buffer -= 8;
+				length--;
+				count++;
+			}
+			
+			if (length == 0) {
+				return count;
+			}
+			
+			int avail = window_end - window_start;
+			if (length > avail) {
+				length = avail;
+			}
+			System.Array.Copy(window, window_start, output, offset, length);
+			window_start += length;
+			
+			if (((window_start - window_end) & 1) != 0) {
+				/* We always want an even number of bytes in input, see peekBits */
+				buffer = (uint)(window[window_start++] & 0xff);
+				bits_in_buffer = 8;
+			}
+			return count + length;
+		}
+		
+		/// <summary>
+		/// Constructs a default StreamManipulator with all buffers empty
+		/// </summary>
+		public StreamManipulator()
+		{
+		}
+
+		
+		/// <summary>
+		/// resets state and empties internal buffers
+		/// </summary>
+		public void Reset()
+		{
+			buffer = (uint)(window_start = window_end = bits_in_buffer = 0);
+		}
+
+		/// <summary>
+		/// Add more input for consumption.
+		/// Only call when IsNeedingInput returns true
+		/// </summary>
+		/// <param name="buf">data to be input</param>
+		/// <param name="off">offset of first byte of input</param>
+		/// <param name="len">length of input</param>
+		public void SetInput(byte[] buf, int off, int len)
+		{
+			if (window_start < window_end) {
+				throw new InvalidOperationException("Old input was not completely processed");
+			}
+			
+			int end = off + len;
+			
+			/* We want to throw an ArrayIndexOutOfBoundsException early.  The
+			* check is very tricky: it also handles integer wrap around.
+			*/
+			if (0 > off || off > end || end > buf.Length) {
+				throw new ArgumentOutOfRangeException();
+			}
+			
+			if ((len & 1) != 0) {
+				/* We always want an even number of bytes in input, see peekBits */
+				buffer |= (uint)((buf[off++] & 0xff) << bits_in_buffer);
+				bits_in_buffer += 8;
+			}
+			
+			window = buf;
+			window_start = off;
+			window_end = end;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/IO/StringWriterWithEncoding.cs b/lib/agsxmpp/agsxmpp/IO/StringWriterWithEncoding.cs
new file mode 100644
index 0000000..d210522
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IO/StringWriterWithEncoding.cs
@@ -0,0 +1,51 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Text;
+
+namespace agsXMPP.IO
+{
+	/// <summary>
+	/// This class is inherited from the StringWriter Class
+	/// The standard StringWriter class supports no encoding
+	/// With this Class we can set the Encoding of a StringWriter in the Constructor
+	/// </summary>
+	public class StringWriterWithEncoding : StringWriter
+	{
+		Encoding m_Encoding;
+
+		public StringWriterWithEncoding (Encoding encoding)
+		{
+			this.m_Encoding = encoding;
+			
+		}
+
+		public override Encoding Encoding
+		{
+			get
+			{
+				return m_Encoding; 
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Id.cs b/lib/agsxmpp/agsxmpp/Id.cs
new file mode 100644
index 0000000..8566318
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Id.cs
@@ -0,0 +1,110 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP
+{
+    public enum IdType
+    {
+        /// <summary>
+        /// Numeric Id's are generated by increasing a long value
+        /// </summary>
+        Numeric,
+
+        /// <summary>
+        /// Guid Id's are unique, Guid packet Id's should be used for server and component applications,
+        /// or apps which very long sessions (multiple days, weeks or years)
+        /// </summary>
+        Guid
+    }
+
+	/// <summary>
+	/// This class takes care anout out unique Message Ids
+	/// </summary>
+	public class Id
+	{		
+        public Id()
+		{			
+		}
+
+        private static long     m_id        = 0;
+		private static string	m_Prefix	= "agsXMPP_";
+        private static IdType   m_Type      = IdType.Numeric;
+
+        public static IdType Type
+        {
+            get { return m_Type; }
+#if !CF
+            // readyonly on CF1
+            set { m_Type = value; }
+#endif
+        }
+
+#if !CF
+		public static string GetNextId()		
+        {
+            if (m_Type == IdType.Numeric)
+            {
+                m_id++;
+                return m_Prefix + m_id.ToString();
+            }
+            else
+            {
+                return m_Prefix + Guid.NewGuid().ToString();
+            }
+		}
+#else
+        
+        // On CF 1.0 we have no GUID class, so only increasing numberical id's are supported
+        // We could create GUID's on CF 1.0 with the Crypto API if we want to.
+        public static string GetNextId()
+        {            
+            m_id++;
+            return m_Prefix + m_id.ToString();
+        }
+#endif
+
+        /// <summary>
+		/// Reset the id counter to agsXmpp_1 again
+		/// </summary>
+		public static void Reset()
+		{
+			m_id = 0;
+		}
+
+		/// <summary>
+		/// to Save Bandwidth on Mobile devices you can change the prefix
+		/// null is also possible to optimize Bandwidth usage
+		/// </summary>
+		public static string Prefix
+		{
+			get { return m_Prefix; }
+			set 
+			{ 
+				if (value == null)
+					m_Prefix = "";
+				else
+					m_Prefix = value; 
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/CombiningClass.cs b/lib/agsxmpp/agsxmpp/Idn/CombiningClass.cs
new file mode 100644
index 0000000..2657982
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/CombiningClass.cs
@@ -0,0 +1,560 @@
+// Do not edit !!!
+// this file is generated automatically
+
+namespace agsXMPP.Idn
+{
+    public class CombiningClass
+    {
+        public static readonly int[,] c = new int[,] {
+    { /* Page 3 */
+      230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216, 220, 220, 220, 220, 
+      220, 202, 202, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1, 1, 1, 1, 1, 220, 220, 220, 220, 230, 230, 230, 
+      230, 230, 230, 230, 230, 240, 230, 220, 220, 220, 230, 230, 230, 220, 220, 0, 230, 230, 230, 220, 220, 220, 220, 230, 232, 220, 220, 230, 233, 234, 234, 233, 
+      234, 234, 233, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 4 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 5 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 230, 230, 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230, 230, 
+      230, 230, 220, 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222, 228, 230, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 0, 23, 
+      0, 24, 25, 0, 230, 220, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 6 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 230, 30, 31, 32, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 230, 230, 220, 220, 230, 230, 230, 230, 230, 220, 230, 230, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 0, 0, 230, 
+      230, 230, 230, 220, 230, 0, 0, 230, 230, 0, 220, 230, 230, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 7 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230, 220, 230, 
+      230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 230, 230, 230, 230, 230, 220, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 9 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 230, 220, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 10 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 11 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 12 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 84, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 13 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 14 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 103, 9, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 118, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 122, 122, 122, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 15 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 220, 0, 216, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, 0, 132, 0, 0, 0, 0, 0, 130, 130, 130, 130, 0, 0, 
+      130, 0, 230, 230, 9, 0, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 16 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 9, 9, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 19 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 23 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 24 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 25 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 230, 220, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 26 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 27 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 28 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 29 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      230, 230, 220, 230, 230, 230, 230, 230, 230, 230, 220, 230, 230, 234, 214, 220, 202, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 
+      230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 220, 
+    },
+    { /* Page 32 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 1, 1, 230, 230, 230, 230, 1, 1, 1, 230, 230, 0, 0, 0, 
+      0, 230, 0, 0, 0, 1, 1, 230, 220, 230, 1, 1, 220, 220, 220, 220, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 45 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 
+    },
+    { /* Page 48 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 228, 232, 222, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 166 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 230, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 168 */
+      0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 169 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, 220, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 251 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+    { /* Page 254 */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      230, 230, 230, 230, 230, 230, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+    },
+  };
+
+        public static readonly int[] i = new int[] {
+    -1,
+    -1,
+    -1,
+    0,
+    1,
+    2,
+    3,
+    4,
+    -1,
+    5,
+    6,
+    7,
+    8,
+    9,
+    10,
+    11,
+    12,
+    -1,
+    -1,
+    13,
+    -1,
+    -1,
+    -1,
+    14,
+    15,
+    16,
+    17,
+    18,
+    19,
+    20,
+    -1,
+    -1,
+    21,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    22,
+    -1,
+    -1,
+    23,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    24,
+    -1,
+    25,
+    26,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    27,
+    -1,
+    -1,
+    28,
+    -1,
+  };
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/Composition.cs b/lib/agsxmpp/agsxmpp/Idn/Composition.cs
new file mode 100644
index 0000000..481feb3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/Composition.cs
@@ -0,0 +1,756 @@
+// Do not edit !!!
+// this file is generated automatically
+
+namespace agsXMPP.Idn
+{
+    public class Composition
+    {
+        /* jagged Array */
+        public static readonly char[][] multiFirst = new char[][] {
+	new char[] { '\u00C0', '\u00C1', '\u00C2', '\u00C3', '\u0100', '\u0102', '\u0226', '\u00C4', '\u1EA2', '\u00C5', '\u01CD', '\u0200', '\u0202', '\u1EA0', '\u1E00', '\u0104', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E02', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E04', '\u0000', '\u0000', '\u1E06', },
+	new char[] { '\u0000', '\u0106', '\u0108', '\u0000', '\u0000', '\u0000', '\u010A', '\u0000', '\u0000', '\u0000', '\u010C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u00C7', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E0A', '\u0000', '\u0000', '\u0000', '\u010E', '\u0000', '\u0000', '\u1E0C', '\u0000', '\u0000', '\u1E0E', '\u1E10', '\u1E12', },
+	new char[] { '\u00C8', '\u00C9', '\u00CA', '\u1EBC', '\u0112', '\u0114', '\u0116', '\u00CB', '\u1EBA', '\u0000', '\u011A', '\u0204', '\u0206', '\u1EB8', '\u0000', '\u0118', '\u0000', '\u0228', '\u1E18', '\u1E1A', },
+	new char[] { '\u0000', '\u01F4', '\u011C', '\u0000', '\u1E20', '\u011E', '\u0120', '\u0000', '\u0000', '\u0000', '\u01E6', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0122', },
+	new char[] { '\u0000', '\u0000', '\u0124', '\u0000', '\u0000', '\u0000', '\u1E22', '\u1E26', '\u0000', '\u0000', '\u021E', '\u0000', '\u0000', '\u1E24', '\u0000', '\u0000', '\u0000', '\u1E28', '\u0000', '\u0000', '\u1E2A', },
+	new char[] { '\u00CC', '\u00CD', '\u00CE', '\u0128', '\u012A', '\u012C', '\u0130', '\u00CF', '\u1EC8', '\u0000', '\u01CF', '\u0208', '\u020A', '\u1ECA', '\u0000', '\u012E', '\u0000', '\u0000', '\u0000', '\u1E2C', },
+	new char[] { '\u0000', '\u1E30', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u01E8', '\u0000', '\u0000', '\u1E32', '\u0000', '\u0000', '\u1E34', '\u0136', },
+	new char[] { '\u0000', '\u0139', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u013D', '\u0000', '\u0000', '\u1E36', '\u0000', '\u0000', '\u1E3A', '\u013B', '\u1E3C', },
+	new char[] { '\u0000', '\u1E3E', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E40', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E42', },
+	new char[] { '\u01F8', '\u0143', '\u0000', '\u00D1', '\u0000', '\u0000', '\u1E44', '\u0000', '\u0000', '\u0000', '\u0147', '\u0000', '\u0000', '\u1E46', '\u0000', '\u0000', '\u1E48', '\u0145', '\u1E4A', },
+	new char[] { '\u00D2', '\u00D3', '\u00D4', '\u00D5', '\u014C', '\u014E', '\u022E', '\u00D6', '\u1ECE', '\u0000', '\u01D1', '\u020C', '\u020E', '\u1ECC', '\u0000', '\u01EA', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0150', '\u01A0', },
+	new char[] { '\u0000', '\u1E54', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E56', },
+	new char[] { '\u0000', '\u0154', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E58', '\u0000', '\u0000', '\u0000', '\u0158', '\u0210', '\u0212', '\u1E5A', '\u0000', '\u0000', '\u1E5E', '\u0156', },
+	new char[] { '\u0000', '\u015A', '\u015C', '\u0000', '\u0000', '\u0000', '\u1E60', '\u0000', '\u0000', '\u0000', '\u0160', '\u0000', '\u0000', '\u1E62', '\u0000', '\u0000', '\u0000', '\u015E', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0218', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E6A', '\u0000', '\u0000', '\u0000', '\u0164', '\u0000', '\u0000', '\u1E6C', '\u0000', '\u0000', '\u1E6E', '\u0162', '\u1E70', '\u0000', '\u0000', '\u0000', '\u0000', '\u021A', },
+	new char[] { '\u00D9', '\u00DA', '\u00DB', '\u0168', '\u016A', '\u016C', '\u0000', '\u00DC', '\u1EE6', '\u016E', '\u01D3', '\u0214', '\u0216', '\u1EE4', '\u0000', '\u0172', '\u0000', '\u0000', '\u1E76', '\u1E74', '\u0000', '\u0170', '\u01AF', '\u0000', '\u1E72', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u1E7C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E7E', },
+	new char[] { '\u1E80', '\u1E82', '\u0174', '\u0000', '\u0000', '\u0000', '\u1E86', '\u1E84', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E88', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E8A', '\u1E8C', },
+	new char[] { '\u1EF2', '\u00DD', '\u0176', '\u1EF8', '\u0232', '\u0000', '\u1E8E', '\u0178', '\u1EF6', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EF4', },
+	new char[] { '\u0000', '\u0179', '\u1E90', '\u0000', '\u0000', '\u0000', '\u017B', '\u0000', '\u0000', '\u0000', '\u017D', '\u0000', '\u0000', '\u1E92', '\u0000', '\u0000', '\u1E94', },
+	new char[] { '\u00E0', '\u00E1', '\u00E2', '\u00E3', '\u0101', '\u0103', '\u0227', '\u00E4', '\u1EA3', '\u00E5', '\u01CE', '\u0201', '\u0203', '\u1EA1', '\u1E01', '\u0105', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E03', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E05', '\u0000', '\u0000', '\u1E07', },
+	new char[] { '\u0000', '\u0107', '\u0109', '\u0000', '\u0000', '\u0000', '\u010B', '\u0000', '\u0000', '\u0000', '\u010D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u00E7', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E0B', '\u0000', '\u0000', '\u0000', '\u010F', '\u0000', '\u0000', '\u1E0D', '\u0000', '\u0000', '\u1E0F', '\u1E11', '\u1E13', },
+	new char[] { '\u00E8', '\u00E9', '\u00EA', '\u1EBD', '\u0113', '\u0115', '\u0117', '\u00EB', '\u1EBB', '\u0000', '\u011B', '\u0205', '\u0207', '\u1EB9', '\u0000', '\u0119', '\u0000', '\u0229', '\u1E19', '\u1E1B', },
+	new char[] { '\u0000', '\u01F5', '\u011D', '\u0000', '\u1E21', '\u011F', '\u0121', '\u0000', '\u0000', '\u0000', '\u01E7', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0123', },
+	new char[] { '\u0000', '\u0000', '\u0125', '\u0000', '\u0000', '\u0000', '\u1E23', '\u1E27', '\u0000', '\u0000', '\u021F', '\u0000', '\u0000', '\u1E25', '\u0000', '\u0000', '\u1E96', '\u1E29', '\u0000', '\u0000', '\u1E2B', },
+	new char[] { '\u00EC', '\u00ED', '\u00EE', '\u0129', '\u012B', '\u012D', '\u0000', '\u00EF', '\u1EC9', '\u0000', '\u01D0', '\u0209', '\u020B', '\u1ECB', '\u0000', '\u012F', '\u0000', '\u0000', '\u0000', '\u1E2D', },
+	new char[] { '\u0000', '\u0000', '\u0135', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u01F0', },
+	new char[] { '\u0000', '\u1E31', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u01E9', '\u0000', '\u0000', '\u1E33', '\u0000', '\u0000', '\u1E35', '\u0137', },
+	new char[] { '\u0000', '\u013A', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u013E', '\u0000', '\u0000', '\u1E37', '\u0000', '\u0000', '\u1E3B', '\u013C', '\u1E3D', },
+	new char[] { '\u0000', '\u1E3F', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E41', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E43', },
+	new char[] { '\u01F9', '\u0144', '\u0000', '\u00F1', '\u0000', '\u0000', '\u1E45', '\u0000', '\u0000', '\u0000', '\u0148', '\u0000', '\u0000', '\u1E47', '\u0000', '\u0000', '\u1E49', '\u0146', '\u1E4B', },
+	new char[] { '\u00F2', '\u00F3', '\u00F4', '\u00F5', '\u014D', '\u014F', '\u022F', '\u00F6', '\u1ECF', '\u0000', '\u01D2', '\u020D', '\u020F', '\u1ECD', '\u0000', '\u01EB', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0151', '\u01A1', },
+	new char[] { '\u0000', '\u1E55', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E57', },
+	new char[] { '\u0000', '\u0155', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E59', '\u0000', '\u0000', '\u0000', '\u0159', '\u0211', '\u0213', '\u1E5B', '\u0000', '\u0000', '\u1E5F', '\u0157', },
+	new char[] { '\u0000', '\u015B', '\u015D', '\u0000', '\u0000', '\u0000', '\u1E61', '\u0000', '\u0000', '\u0000', '\u0161', '\u0000', '\u0000', '\u1E63', '\u0000', '\u0000', '\u0000', '\u015F', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0219', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E6B', '\u1E97', '\u0000', '\u0000', '\u0165', '\u0000', '\u0000', '\u1E6D', '\u0000', '\u0000', '\u1E6F', '\u0163', '\u1E71', '\u0000', '\u0000', '\u0000', '\u0000', '\u021B', },
+	new char[] { '\u00F9', '\u00FA', '\u00FB', '\u0169', '\u016B', '\u016D', '\u0000', '\u00FC', '\u1EE7', '\u016F', '\u01D4', '\u0215', '\u0217', '\u1EE5', '\u0000', '\u0173', '\u0000', '\u0000', '\u1E77', '\u1E75', '\u0000', '\u0171', '\u01B0', '\u0000', '\u1E73', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u1E7D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E7F', },
+	new char[] { '\u1E81', '\u1E83', '\u0175', '\u0000', '\u0000', '\u0000', '\u1E87', '\u1E85', '\u0000', '\u1E98', '\u0000', '\u0000', '\u0000', '\u1E89', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1E8B', '\u1E8D', },
+	new char[] { '\u1EF3', '\u00FD', '\u0177', '\u1EF9', '\u0233', '\u0000', '\u1E8F', '\u00FF', '\u1EF7', '\u1E99', '\u0000', '\u0000', '\u0000', '\u1EF5', },
+	new char[] { '\u0000', '\u017A', '\u1E91', '\u0000', '\u0000', '\u0000', '\u017C', '\u0000', '\u0000', '\u0000', '\u017E', '\u0000', '\u0000', '\u1E93', '\u0000', '\u0000', '\u1E95', },
+	new char[] { '\u1FED', '\u0385', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FC1', },
+	new char[] { '\u1EA6', '\u1EA4', '\u0000', '\u1EAA', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EA8', },
+	new char[] { '\u0000', '\u01FC', '\u0000', '\u0000', '\u01E2', },
+	new char[] { '\u1EC0', '\u1EBE', '\u0000', '\u1EC4', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EC2', },
+	new char[] { '\u1ED2', '\u1ED0', '\u0000', '\u1ED6', '\u0000', '\u0000', '\u0000', '\u0000', '\u1ED4', },
+	new char[] { '\u0000', '\u1E4C', '\u0000', '\u0000', '\u022C', '\u0000', '\u0000', '\u1E4E', },
+	new char[] { '\u01DB', '\u01D7', '\u0000', '\u0000', '\u01D5', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u01D9', },
+	new char[] { '\u1EA7', '\u1EA5', '\u0000', '\u1EAB', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EA9', },
+	new char[] { '\u0000', '\u01FD', '\u0000', '\u0000', '\u01E3', },
+	new char[] { '\u1EC1', '\u1EBF', '\u0000', '\u1EC5', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EC3', },
+	new char[] { '\u1ED3', '\u1ED1', '\u0000', '\u1ED7', '\u0000', '\u0000', '\u0000', '\u0000', '\u1ED5', },
+	new char[] { '\u0000', '\u1E4D', '\u0000', '\u0000', '\u022D', '\u0000', '\u0000', '\u1E4F', },
+	new char[] { '\u01DC', '\u01D8', '\u0000', '\u0000', '\u01D6', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u01DA', },
+	new char[] { '\u1EB0', '\u1EAE', '\u0000', '\u1EB4', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EB2', },
+	new char[] { '\u1EB1', '\u1EAF', '\u0000', '\u1EB5', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EB3', },
+	new char[] { '\u1E14', '\u1E16', },
+	new char[] { '\u1E15', '\u1E17', },
+	new char[] { '\u1E50', '\u1E52', },
+	new char[] { '\u1E51', '\u1E53', },
+	new char[] { '\u1EDC', '\u1EDA', '\u0000', '\u1EE0', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EDE', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EE2', },
+	new char[] { '\u1EDD', '\u1EDB', '\u0000', '\u1EE1', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EDF', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EE3', },
+	new char[] { '\u1EEA', '\u1EE8', '\u0000', '\u1EEE', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EEC', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EF0', },
+	new char[] { '\u1EEB', '\u1EE9', '\u0000', '\u1EEF', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EED', '\u0000', '\u0000', '\u0000', '\u0000', '\u1EF1', },
+	new char[] { '\u1FBA', '\u0386', '\u0000', '\u0000', '\u1FB9', '\u1FB8', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F08', '\u1F09', '\u1FBC', },
+	new char[] { '\u1FC8', '\u0388', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F18', '\u1F19', },
+	new char[] { '\u1FCA', '\u0389', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F28', '\u1F29', '\u1FCC', },
+	new char[] { '\u1FDA', '\u038A', '\u0000', '\u0000', '\u1FD9', '\u1FD8', '\u0000', '\u03AA', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F38', '\u1F39', },
+	new char[] { '\u1FF8', '\u038C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F48', '\u1F49', },
+	new char[] { '\u1FEA', '\u038E', '\u0000', '\u0000', '\u1FE9', '\u1FE8', '\u0000', '\u03AB', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F59', },
+	new char[] { '\u1FFA', '\u038F', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F68', '\u1F69', '\u1FFC', },
+	new char[] { '\u1F70', '\u03AC', '\u0000', '\u0000', '\u1FB1', '\u1FB0', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FB6', '\u1F00', '\u1F01', '\u1FB3', },
+	new char[] { '\u1F72', '\u03AD', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F10', '\u1F11', },
+	new char[] { '\u1F74', '\u03AE', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FC6', '\u1F20', '\u1F21', '\u1FC3', },
+	new char[] { '\u1F76', '\u03AF', '\u0000', '\u0000', '\u1FD1', '\u1FD0', '\u0000', '\u03CA', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FD6', '\u1F30', '\u1F31', },
+	new char[] { '\u1F78', '\u03CC', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F40', '\u1F41', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FE4', '\u1FE5', },
+	new char[] { '\u1F7A', '\u03CD', '\u0000', '\u0000', '\u1FE1', '\u1FE0', '\u0000', '\u03CB', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FE6', '\u1F50', '\u1F51', },
+	new char[] { '\u1F7C', '\u03CE', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FF6', '\u1F60', '\u1F61', '\u1FF3', },
+	new char[] { '\u1FD2', '\u0390', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FD7', },
+	new char[] { '\u1FE2', '\u03B0', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FE7', },
+	new char[] { '\u0000', '\u03D3', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u03D4', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04D0', '\u0000', '\u04D2', },
+	new char[] { '\u0400', '\u0000', '\u0000', '\u0000', '\u0000', '\u04D6', '\u0000', '\u0401', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04C1', '\u0000', '\u04DC', },
+	new char[] { '\u040D', '\u0000', '\u0000', '\u0000', '\u04E2', '\u0419', '\u0000', '\u04E4', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u04EE', '\u040E', '\u0000', '\u04F0', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04F2', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04D1', '\u0000', '\u04D3', },
+	new char[] { '\u0450', '\u0000', '\u0000', '\u0000', '\u0000', '\u04D7', '\u0000', '\u0451', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04C2', '\u0000', '\u04DD', },
+	new char[] { '\u045D', '\u0000', '\u0000', '\u0000', '\u04E3', '\u0439', '\u0000', '\u04E5', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u04EF', '\u045E', '\u0000', '\u04F1', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u04F3', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0623', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0BCA', '\u0BCC', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0CC7', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0D4A', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0DDA', },
+	new char[] { '\u0000', '\u0000', '\u1EAC', '\u0000', '\u0000', '\u1EB6', },
+	new char[] { '\u0000', '\u0000', '\u1EAD', '\u0000', '\u0000', '\u1EB7', },
+	new char[] { '\u1F02', '\u1F04', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F06', '\u0000', '\u0000', '\u1F80', },
+	new char[] { '\u1F03', '\u1F05', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F07', '\u0000', '\u0000', '\u1F81', },
+	new char[] { '\u1F0A', '\u1F0C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F0E', '\u0000', '\u0000', '\u1F88', },
+	new char[] { '\u1F0B', '\u1F0D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F0F', '\u0000', '\u0000', '\u1F89', },
+	new char[] { '\u1F12', '\u1F14', },
+	new char[] { '\u1F13', '\u1F15', },
+	new char[] { '\u1F1A', '\u1F1C', },
+	new char[] { '\u1F1B', '\u1F1D', },
+	new char[] { '\u1F22', '\u1F24', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F26', '\u0000', '\u0000', '\u1F90', },
+	new char[] { '\u1F23', '\u1F25', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F27', '\u0000', '\u0000', '\u1F91', },
+	new char[] { '\u1F2A', '\u1F2C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F2E', '\u0000', '\u0000', '\u1F98', },
+	new char[] { '\u1F2B', '\u1F2D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F2F', '\u0000', '\u0000', '\u1F99', },
+	new char[] { '\u1F32', '\u1F34', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F36', },
+	new char[] { '\u1F33', '\u1F35', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F37', },
+	new char[] { '\u1F3A', '\u1F3C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F3E', },
+	new char[] { '\u1F3B', '\u1F3D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F3F', },
+	new char[] { '\u1F42', '\u1F44', },
+	new char[] { '\u1F43', '\u1F45', },
+	new char[] { '\u1F4A', '\u1F4C', },
+	new char[] { '\u1F4B', '\u1F4D', },
+	new char[] { '\u1F52', '\u1F54', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F56', },
+	new char[] { '\u1F53', '\u1F55', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F57', },
+	new char[] { '\u1F5B', '\u1F5D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F5F', },
+	new char[] { '\u1F62', '\u1F64', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F66', '\u0000', '\u0000', '\u1FA0', },
+	new char[] { '\u1F63', '\u1F65', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F67', '\u0000', '\u0000', '\u1FA1', },
+	new char[] { '\u1F6A', '\u1F6C', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F6E', '\u0000', '\u0000', '\u1FA8', },
+	new char[] { '\u1F6B', '\u1F6D', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1F6F', '\u0000', '\u0000', '\u1FA9', },
+	new char[] { '\u1FCD', '\u1FCE', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FCF', },
+	new char[] { '\u1FDD', '\u1FDE', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u1FDF', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u3070', '\u3071', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u3073', '\u3074', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u3076', '\u3077', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u3079', '\u307A', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u307C', '\u307D', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u30D0', '\u30D1', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u30D3', '\u30D4', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u30D6', '\u30D7', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u30D9', '\u30DA', },
+	new char[] { '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u0000', '\u30DC', '\u30DD', },
+  };
+        public static readonly char[,] singleFirst = new char[,] {
+    { '\u0338', '\u226E' },
+    { '\u0338', '\u2260' },
+    { '\u0338', '\u226F' },
+    { '\u0307', '\u1E1E' },
+    { '\u0302', '\u0134' },
+    { '\u0307', '\u1E1F' },
+    { '\u0304', '\u01DE' },
+    { '\u0301', '\u01FA' },
+    { '\u0301', '\u1E08' },
+    { '\u0301', '\u1E2E' },
+    { '\u0304', '\u022A' },
+    { '\u0301', '\u01FE' },
+    { '\u0304', '\u01DF' },
+    { '\u0301', '\u01FB' },
+    { '\u0301', '\u1E09' },
+    { '\u0301', '\u1E2F' },
+    { '\u0304', '\u022B' },
+    { '\u0301', '\u01FF' },
+    { '\u0307', '\u1E64' },
+    { '\u0307', '\u1E65' },
+    { '\u0307', '\u1E66' },
+    { '\u0307', '\u1E67' },
+    { '\u0301', '\u1E78' },
+    { '\u0301', '\u1E79' },
+    { '\u0308', '\u1E7A' },
+    { '\u0308', '\u1E7B' },
+    { '\u0307', '\u1E9B' },
+    { '\u030C', '\u01EE' },
+    { '\u0304', '\u01EC' },
+    { '\u0304', '\u01ED' },
+    { '\u0304', '\u01E0' },
+    { '\u0304', '\u01E1' },
+    { '\u0306', '\u1E1C' },
+    { '\u0306', '\u1E1D' },
+    { '\u0304', '\u0230' },
+    { '\u0304', '\u0231' },
+    { '\u030C', '\u01EF' },
+    { '\u0314', '\u1FEC' },
+    { '\u0345', '\u1FB4' },
+    { '\u0345', '\u1FC4' },
+    { '\u0345', '\u1FF4' },
+    { '\u0308', '\u0407' },
+    { '\u0301', '\u0403' },
+    { '\u0308', '\u04DE' },
+    { '\u0301', '\u040C' },
+    { '\u0308', '\u04E6' },
+    { '\u0308', '\u04F4' },
+    { '\u0308', '\u04F8' },
+    { '\u0308', '\u04EC' },
+    { '\u0301', '\u0453' },
+    { '\u0308', '\u04DF' },
+    { '\u0301', '\u045C' },
+    { '\u0308', '\u04E7' },
+    { '\u0308', '\u04F5' },
+    { '\u0308', '\u04F9' },
+    { '\u0308', '\u04ED' },
+    { '\u0308', '\u0457' },
+    { '\u030F', '\u0476' },
+    { '\u030F', '\u0477' },
+    { '\u0308', '\u04DA' },
+    { '\u0308', '\u04DB' },
+    { '\u0308', '\u04EA' },
+    { '\u0308', '\u04EB' },
+    { '\u0654', '\u0624' },
+    { '\u0654', '\u0626' },
+    { '\u0654', '\u06C2' },
+    { '\u0654', '\u06D3' },
+    { '\u0654', '\u06C0' },
+    { '\u093C', '\u0929' },
+    { '\u093C', '\u0931' },
+    { '\u093C', '\u0934' },
+    { '\u0BD7', '\u0B94' },
+    { '\u0BBE', '\u0BCB' },
+    { '\u0C56', '\u0C48' },
+    { '\u0CD5', '\u0CC0' },
+    { '\u0CD5', '\u0CCB' },
+    { '\u0D3E', '\u0D4B' },
+    { '\u0DCA', '\u0DDD' },
+    { '\u102E', '\u1026' },
+    { '\u1B35', '\u1B06' },
+    { '\u1B35', '\u1B08' },
+    { '\u1B35', '\u1B0A' },
+    { '\u1B35', '\u1B0C' },
+    { '\u1B35', '\u1B0E' },
+    { '\u1B35', '\u1B12' },
+    { '\u1B35', '\u1B3B' },
+    { '\u1B35', '\u1B3D' },
+    { '\u1B35', '\u1B40' },
+    { '\u1B35', '\u1B41' },
+    { '\u1B35', '\u1B43' },
+    { '\u0304', '\u1E38' },
+    { '\u0304', '\u1E39' },
+    { '\u0304', '\u1E5C' },
+    { '\u0304', '\u1E5D' },
+    { '\u0307', '\u1E68' },
+    { '\u0307', '\u1E69' },
+    { '\u0302', '\u1EC6' },
+    { '\u0302', '\u1EC7' },
+    { '\u0302', '\u1ED8' },
+    { '\u0302', '\u1ED9' },
+    { '\u0345', '\u1F82' },
+    { '\u0345', '\u1F83' },
+    { '\u0345', '\u1F84' },
+    { '\u0345', '\u1F85' },
+    { '\u0345', '\u1F86' },
+    { '\u0345', '\u1F87' },
+    { '\u0345', '\u1F8A' },
+    { '\u0345', '\u1F8B' },
+    { '\u0345', '\u1F8C' },
+    { '\u0345', '\u1F8D' },
+    { '\u0345', '\u1F8E' },
+    { '\u0345', '\u1F8F' },
+    { '\u0345', '\u1F92' },
+    { '\u0345', '\u1F93' },
+    { '\u0345', '\u1F94' },
+    { '\u0345', '\u1F95' },
+    { '\u0345', '\u1F96' },
+    { '\u0345', '\u1F97' },
+    { '\u0345', '\u1F9A' },
+    { '\u0345', '\u1F9B' },
+    { '\u0345', '\u1F9C' },
+    { '\u0345', '\u1F9D' },
+    { '\u0345', '\u1F9E' },
+    { '\u0345', '\u1F9F' },
+    { '\u0345', '\u1FA2' },
+    { '\u0345', '\u1FA3' },
+    { '\u0345', '\u1FA4' },
+    { '\u0345', '\u1FA5' },
+    { '\u0345', '\u1FA6' },
+    { '\u0345', '\u1FA7' },
+    { '\u0345', '\u1FAA' },
+    { '\u0345', '\u1FAB' },
+    { '\u0345', '\u1FAC' },
+    { '\u0345', '\u1FAD' },
+    { '\u0345', '\u1FAE' },
+    { '\u0345', '\u1FAF' },
+    { '\u0345', '\u1FB2' },
+    { '\u0345', '\u1FC2' },
+    { '\u0345', '\u1FF2' },
+    { '\u0345', '\u1FB7' },
+    { '\u0345', '\u1FC7' },
+    { '\u0345', '\u1FF7' },
+    { '\u0338', '\u219A' },
+    { '\u0338', '\u219B' },
+    { '\u0338', '\u21AE' },
+    { '\u0338', '\u21CD' },
+    { '\u0338', '\u21CF' },
+    { '\u0338', '\u21CE' },
+    { '\u0338', '\u2204' },
+    { '\u0338', '\u2209' },
+    { '\u0338', '\u220C' },
+    { '\u0338', '\u2224' },
+    { '\u0338', '\u2226' },
+    { '\u0338', '\u2241' },
+    { '\u0338', '\u2244' },
+    { '\u0338', '\u2247' },
+    { '\u0338', '\u2249' },
+    { '\u0338', '\u226D' },
+    { '\u0338', '\u2262' },
+    { '\u0338', '\u2270' },
+    { '\u0338', '\u2271' },
+    { '\u0338', '\u2274' },
+    { '\u0338', '\u2275' },
+    { '\u0338', '\u2278' },
+    { '\u0338', '\u2279' },
+    { '\u0338', '\u2280' },
+    { '\u0338', '\u2281' },
+    { '\u0338', '\u22E0' },
+    { '\u0338', '\u22E1' },
+    { '\u0338', '\u2284' },
+    { '\u0338', '\u2285' },
+    { '\u0338', '\u2288' },
+    { '\u0338', '\u2289' },
+    { '\u0338', '\u22E2' },
+    { '\u0338', '\u22E3' },
+    { '\u0338', '\u22AC' },
+    { '\u0338', '\u22AD' },
+    { '\u0338', '\u22AE' },
+    { '\u0338', '\u22AF' },
+    { '\u0338', '\u22EA' },
+    { '\u0338', '\u22EB' },
+    { '\u0338', '\u22EC' },
+    { '\u0338', '\u22ED' },
+    { '\u3099', '\u3094' },
+    { '\u3099', '\u304C' },
+    { '\u3099', '\u304E' },
+    { '\u3099', '\u3050' },
+    { '\u3099', '\u3052' },
+    { '\u3099', '\u3054' },
+    { '\u3099', '\u3056' },
+    { '\u3099', '\u3058' },
+    { '\u3099', '\u305A' },
+    { '\u3099', '\u305C' },
+    { '\u3099', '\u305E' },
+    { '\u3099', '\u3060' },
+    { '\u3099', '\u3062' },
+    { '\u3099', '\u3065' },
+    { '\u3099', '\u3067' },
+    { '\u3099', '\u3069' },
+    { '\u3099', '\u309E' },
+    { '\u3099', '\u30F4' },
+    { '\u3099', '\u30AC' },
+    { '\u3099', '\u30AE' },
+    { '\u3099', '\u30B0' },
+    { '\u3099', '\u30B2' },
+    { '\u3099', '\u30B4' },
+    { '\u3099', '\u30B6' },
+    { '\u3099', '\u30B8' },
+    { '\u3099', '\u30BA' },
+    { '\u3099', '\u30BC' },
+    { '\u3099', '\u30BE' },
+    { '\u3099', '\u30C0' },
+    { '\u3099', '\u30C2' },
+    { '\u3099', '\u30C5' },
+    { '\u3099', '\u30C7' },
+    { '\u3099', '\u30C9' },
+    { '\u3099', '\u30F7' },
+    { '\u3099', '\u30F8' },
+    { '\u3099', '\u30F9' },
+    { '\u3099', '\u30FA' },
+    { '\u3099', '\u30FE' },
+  };
+        public static readonly char[,] singleSecond = new char[,] {
+    { '\u0627', '\u0622' },
+    { '\u0627', '\u0625' },
+    { '\u09C7', '\u09CB' },
+    { '\u09C7', '\u09CC' },
+    { '\u0B47', '\u0B4B' },
+    { '\u0B47', '\u0B48' },
+    { '\u0B47', '\u0B4C' },
+    { '\u0CC6', '\u0CCA' },
+    { '\u0CC6', '\u0CC8' },
+    { '\u0D46', '\u0D4C' },
+    { '\u0DD9', '\u0DDC' },
+    { '\u0DD9', '\u0DDE' },
+  };
+        public static readonly int multiSecondStart = 144;
+        public static readonly int singleFirstStart = 181;
+        public static readonly int singleSecondStart = 402;
+        public static readonly int[] composePage = new int[] {
+    0,
+    1,
+    2,
+    3,
+    4,
+    -1,
+    5,
+    -1,
+    -1,
+    6,
+    -1,
+    7,
+    8,
+    9,
+    -1,
+    -1,
+    10,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    11,
+    -1,
+    -1,
+    12,
+    13,
+    -1,
+    14,
+    15,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    -1,
+    16,
+    -1,
+  };
+        public static readonly int[,] composeData = new int[,] {
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 181, 182, 183, -1, 
+      -1, 0, 1, 2, 3, 4, 184, 5, 6, 7, 185, 8, 9, 10, 11, 12, 
+      13, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, 
+      -1, 23, 24, 25, 26, 27, 186, 28, 29, 30, 31, 32, 33, 34, 35, 36, 
+      37, -1, 38, 39, 40, 41, 42, 43, 44, 45, 46, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 48, -1, 187, 188, 49, 189, -1, -1, 50, -1, -1, -1, -1, 190, 
+      -1, -1, -1, -1, 51, 52, 191, -1, 192, -1, -1, -1, 53, -1, -1, -1, 
+      -1, -1, 54, -1, 193, 194, 55, 195, -1, -1, 56, -1, -1, -1, -1, 196, 
+      -1, -1, -1, -1, 57, 58, 197, -1, 198, -1, -1, -1, 59, -1, -1, -1, 
+    },
+	{
+      -1, -1, 60, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 62, 63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, 65, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 199, 200, -1, -1, -1, -1, 
+      201, 202, -1, -1, -1, -1, -1, -1, 203, 204, 205, 206, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 207, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      66, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 
+      69, -1, -1, -1, -1, -1, -1, 208, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 211, 212, 213, 214, -1, -1, -1, -1, 215, 216, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 217, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      144, 145, 146, 147, 148, -1, 149, 150, 151, 152, 153, 165, 154, -1, -1, 155, 
+      -1, 156, -1, 170, 171, -1, -1, -1, -1, -1, -1, 166, -1, -1, -1, -1, 
+      -1, -1, -1, 157, 168, 158, 167, 161, 159, -1, -1, -1, -1, 162, 164, -1, 
+      163, 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 169, -1, -1, 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, 70, -1, -1, -1, 71, -1, 72, -1, 73, -1, -1, -1, -1, -1, 74, 
+      -1, 218, -1, -1, -1, 75, -1, -1, -1, 76, -1, -1, 219, -1, 220, -1, 
+      -1, 77, -1, -1, -1, 78, -1, 79, -1, 80, -1, -1, -1, -1, -1, 81, 
+      -1, 82, -1, -1, -1, 83, -1, -1, -1, 84, 85, 86, -1, -1, 221, -1, 
+      -1, -1, 87, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, 222, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      88, -1, -1, 223, -1, 89, 90, 224, 91, -1, 225, -1, -1, -1, 226, -1, 
+      -1, -1, -1, 92, -1, -1, -1, 227, -1, -1, -1, 228, -1, 229, -1, -1, 
+      93, -1, -1, 230, -1, 94, 95, 231, 96, -1, 232, -1, -1, -1, 233, -1, 
+      -1, -1, -1, 97, -1, -1, -1, 234, -1, -1, -1, 235, -1, 236, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 237, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, 238, 239, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 240, 241, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 242, 243, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, 98, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 244, -1, 245, -1, -1, -1, -1, -1, 
+      -1, -1, -1, 402, 173, 403, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, 246, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 247, -1, -1, 248, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 249, -1, -1, -1, -1, -1, -1, -1, 
+      250, -1, -1, 251, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 404, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, 405, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 406, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 407, 408, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 252, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 174, -1, 
+      -1, -1, -1, -1, -1, -1, 99, 253, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, 175, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 254, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 255, 
+      -1, -1, 409, -1, -1, -1, 100, -1, -1, -1, 256, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, 176, 410, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 177, -1, 
+      -1, -1, -1, -1, -1, -1, 101, 257, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, 411, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 178, -1, -1, -1, -1, 412, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, 258, -1, -1, 413, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, 259, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, 260, -1, 261, -1, 262, -1, 263, -1, 264, -1, -1, 
+      -1, 265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 266, -1, 267, -1, 268, 269, 
+      -1, -1, 270, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 271, 272, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 273, 274, -1, -1, -1, -1, 
+      -1, -1, 275, 276, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, 277, 278, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 279, 280, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      105, 106, 281, 282, 283, 284, 285, 286, 107, 108, 287, 288, 289, 290, 291, 292, 
+      109, 110, -1, -1, -1, -1, -1, -1, 111, 112, -1, -1, -1, -1, -1, -1, 
+      113, 114, 293, 294, 295, 296, 297, 298, 115, 116, 299, 300, 301, 302, 303, 304, 
+      117, 118, -1, -1, -1, -1, -1, -1, 119, 120, -1, -1, -1, -1, -1, -1, 
+      121, 122, -1, -1, -1, -1, -1, -1, 123, 124, -1, -1, -1, -1, -1, -1, 
+      125, 126, -1, -1, -1, -1, -1, -1, -1, 127, -1, -1, -1, -1, -1, -1, 
+      128, 129, 305, 306, 307, 308, 309, 310, 130, 131, 311, 312, 313, 314, 315, 316, 
+      317, -1, -1, -1, 318, -1, -1, -1, -1, -1, -1, -1, 319, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 320, -1, -1, -1, -1, -1, -1, -1, -1, 132, 
+      -1, -1, -1, -1, -1, -1, 321, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 322, -1, -1, -1, -1, -1, -1, -1, 133, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      323, -1, 324, -1, 325, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      326, -1, 327, -1, 328, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, 329, -1, -1, -1, -1, 330, -1, -1, 331, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, 332, -1, 333, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 334, -1, -1, -1, 
+      -1, -1, -1, 335, -1, 336, -1, -1, 337, -1, -1, -1, -1, 338, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, 339, -1, -1, 340, 341, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 342, 343, -1, -1, 344, 345, -1, -1, 346, 347, 348, 349, -1, -1, 
+      -1, -1, 350, 351, -1, -1, 352, 353, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, 354, 355, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, 356, -1, -1, -1, -1, -1, 357, 358, -1, 359, -1, -1, -1, -1, 
+      -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+    },
+	{
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 364, -1, -1, -1, -1, 365, -1, 366, -1, 367, 
+      -1, 368, -1, 369, -1, 370, -1, 371, -1, 372, -1, 373, -1, 374, -1, 375, 
+      -1, 376, -1, -1, 377, -1, 378, -1, 379, -1, -1, -1, -1, -1, -1, 134, 
+      -1, -1, 135, -1, -1, 136, -1, -1, 137, -1, -1, 138, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, 179, 180, -1, -1, 380, -1, -1, 
+      -1, -1, -1, -1, -1, -1, 381, -1, -1, -1, -1, 382, -1, 383, -1, 384, 
+      -1, 385, -1, 386, -1, 387, -1, 388, -1, 389, -1, 390, -1, 391, -1, 392, 
+      -1, 393, -1, -1, 394, -1, 395, -1, 396, -1, -1, -1, -1, -1, -1, 139, 
+      -1, -1, 140, -1, -1, 141, -1, -1, 142, -1, -1, 143, -1, -1, -1, -1, 
+      -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 397, 
+      398, 399, 400, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 401, -1, -1, 
+    },
+  };
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/DecompositionKeys.cs b/lib/agsxmpp/agsxmpp/Idn/DecompositionKeys.cs
new file mode 100644
index 0000000..15770de
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/DecompositionKeys.cs
@@ -0,0 +1,3865 @@
+// Do not edit !!!
+// this file is generated automatically
+
+namespace agsXMPP.Idn
+{
+    public class DecompositionKeys
+    {
+        public static readonly int[] k = new int[] {
+    '\u00A0', 0,
+    '\u00A8', 1,
+    '\u00AA', 2,
+    '\u00AF', 3,
+    '\u00B2', 4,
+    '\u00B3', 5,
+    '\u00B4', 6,
+    '\u00B5', 7,
+    '\u00B8', 8,
+    '\u00B9', 9,
+    '\u00BA', 10,
+    '\u00BC', 11,
+    '\u00BD', 12,
+    '\u00BE', 13,
+    '\u00C0', 14,
+    '\u00C1', 15,
+    '\u00C2', 16,
+    '\u00C3', 17,
+    '\u00C4', 18,
+    '\u00C5', 19,
+    '\u00C7', 20,
+    '\u00C8', 21,
+    '\u00C9', 22,
+    '\u00CA', 23,
+    '\u00CB', 24,
+    '\u00CC', 25,
+    '\u00CD', 26,
+    '\u00CE', 27,
+    '\u00CF', 28,
+    '\u00D1', 29,
+    '\u00D2', 30,
+    '\u00D3', 31,
+    '\u00D4', 32,
+    '\u00D5', 33,
+    '\u00D6', 34,
+    '\u00D9', 35,
+    '\u00DA', 36,
+    '\u00DB', 37,
+    '\u00DC', 38,
+    '\u00DD', 39,
+    '\u00E0', 40,
+    '\u00E1', 41,
+    '\u00E2', 42,
+    '\u00E3', 43,
+    '\u00E4', 44,
+    '\u00E5', 45,
+    '\u00E7', 46,
+    '\u00E8', 47,
+    '\u00E9', 48,
+    '\u00EA', 49,
+    '\u00EB', 50,
+    '\u00EC', 51,
+    '\u00ED', 52,
+    '\u00EE', 53,
+    '\u00EF', 54,
+    '\u00F1', 55,
+    '\u00F2', 56,
+    '\u00F3', 57,
+    '\u00F4', 58,
+    '\u00F5', 59,
+    '\u00F6', 60,
+    '\u00F9', 61,
+    '\u00FA', 62,
+    '\u00FB', 63,
+    '\u00FC', 64,
+    '\u00FD', 65,
+    '\u00FF', 66,
+    '\u0100', 67,
+    '\u0101', 68,
+    '\u0102', 69,
+    '\u0103', 70,
+    '\u0104', 71,
+    '\u0105', 72,
+    '\u0106', 73,
+    '\u0107', 74,
+    '\u0108', 75,
+    '\u0109', 76,
+    '\u010A', 77,
+    '\u010B', 78,
+    '\u010C', 79,
+    '\u010D', 80,
+    '\u010E', 81,
+    '\u010F', 82,
+    '\u0112', 83,
+    '\u0113', 84,
+    '\u0114', 85,
+    '\u0115', 86,
+    '\u0116', 87,
+    '\u0117', 88,
+    '\u0118', 89,
+    '\u0119', 90,
+    '\u011A', 91,
+    '\u011B', 92,
+    '\u011C', 93,
+    '\u011D', 94,
+    '\u011E', 95,
+    '\u011F', 96,
+    '\u0120', 97,
+    '\u0121', 98,
+    '\u0122', 99,
+    '\u0123', 100,
+    '\u0124', 101,
+    '\u0125', 102,
+    '\u0128', 103,
+    '\u0129', 104,
+    '\u012A', 105,
+    '\u012B', 106,
+    '\u012C', 107,
+    '\u012D', 108,
+    '\u012E', 109,
+    '\u012F', 110,
+    '\u0130', 111,
+    '\u0132', 112,
+    '\u0133', 113,
+    '\u0134', 114,
+    '\u0135', 115,
+    '\u0136', 116,
+    '\u0137', 117,
+    '\u0139', 118,
+    '\u013A', 119,
+    '\u013B', 120,
+    '\u013C', 121,
+    '\u013D', 122,
+    '\u013E', 123,
+    '\u013F', 124,
+    '\u0140', 125,
+    '\u0143', 126,
+    '\u0144', 127,
+    '\u0145', 128,
+    '\u0146', 129,
+    '\u0147', 130,
+    '\u0148', 131,
+    '\u0149', 132,
+    '\u014C', 133,
+    '\u014D', 134,
+    '\u014E', 135,
+    '\u014F', 136,
+    '\u0150', 137,
+    '\u0151', 138,
+    '\u0154', 139,
+    '\u0155', 140,
+    '\u0156', 141,
+    '\u0157', 142,
+    '\u0158', 143,
+    '\u0159', 144,
+    '\u015A', 145,
+    '\u015B', 146,
+    '\u015C', 147,
+    '\u015D', 148,
+    '\u015E', 149,
+    '\u015F', 150,
+    '\u0160', 151,
+    '\u0161', 152,
+    '\u0162', 153,
+    '\u0163', 154,
+    '\u0164', 155,
+    '\u0165', 156,
+    '\u0168', 157,
+    '\u0169', 158,
+    '\u016A', 159,
+    '\u016B', 160,
+    '\u016C', 161,
+    '\u016D', 162,
+    '\u016E', 163,
+    '\u016F', 164,
+    '\u0170', 165,
+    '\u0171', 166,
+    '\u0172', 167,
+    '\u0173', 168,
+    '\u0174', 169,
+    '\u0175', 170,
+    '\u0176', 171,
+    '\u0177', 172,
+    '\u0178', 173,
+    '\u0179', 174,
+    '\u017A', 175,
+    '\u017B', 176,
+    '\u017C', 177,
+    '\u017D', 178,
+    '\u017E', 179,
+    '\u017F', 180,
+    '\u01A0', 181,
+    '\u01A1', 182,
+    '\u01AF', 183,
+    '\u01B0', 184,
+    '\u01C4', 185,
+    '\u01C5', 186,
+    '\u01C6', 187,
+    '\u01C7', 188,
+    '\u01C8', 189,
+    '\u01C9', 190,
+    '\u01CA', 191,
+    '\u01CB', 192,
+    '\u01CC', 193,
+    '\u01CD', 194,
+    '\u01CE', 195,
+    '\u01CF', 196,
+    '\u01D0', 197,
+    '\u01D1', 198,
+    '\u01D2', 199,
+    '\u01D3', 200,
+    '\u01D4', 201,
+    '\u01D5', 202,
+    '\u01D6', 203,
+    '\u01D7', 204,
+    '\u01D8', 205,
+    '\u01D9', 206,
+    '\u01DA', 207,
+    '\u01DB', 208,
+    '\u01DC', 209,
+    '\u01DE', 210,
+    '\u01DF', 211,
+    '\u01E0', 212,
+    '\u01E1', 213,
+    '\u01E2', 214,
+    '\u01E3', 215,
+    '\u01E6', 216,
+    '\u01E7', 217,
+    '\u01E8', 218,
+    '\u01E9', 219,
+    '\u01EA', 220,
+    '\u01EB', 221,
+    '\u01EC', 222,
+    '\u01ED', 223,
+    '\u01EE', 224,
+    '\u01EF', 225,
+    '\u01F0', 226,
+    '\u01F1', 227,
+    '\u01F2', 228,
+    '\u01F3', 229,
+    '\u01F4', 230,
+    '\u01F5', 231,
+    '\u01F8', 232,
+    '\u01F9', 233,
+    '\u01FA', 234,
+    '\u01FB', 235,
+    '\u01FC', 236,
+    '\u01FD', 237,
+    '\u01FE', 238,
+    '\u01FF', 239,
+    '\u0200', 240,
+    '\u0201', 241,
+    '\u0202', 242,
+    '\u0203', 243,
+    '\u0204', 244,
+    '\u0205', 245,
+    '\u0206', 246,
+    '\u0207', 247,
+    '\u0208', 248,
+    '\u0209', 249,
+    '\u020A', 250,
+    '\u020B', 251,
+    '\u020C', 252,
+    '\u020D', 253,
+    '\u020E', 254,
+    '\u020F', 255,
+    '\u0210', 256,
+    '\u0211', 257,
+    '\u0212', 258,
+    '\u0213', 259,
+    '\u0214', 260,
+    '\u0215', 261,
+    '\u0216', 262,
+    '\u0217', 263,
+    '\u0218', 264,
+    '\u0219', 265,
+    '\u021A', 266,
+    '\u021B', 267,
+    '\u021E', 268,
+    '\u021F', 269,
+    '\u0226', 270,
+    '\u0227', 271,
+    '\u0228', 272,
+    '\u0229', 273,
+    '\u022A', 274,
+    '\u022B', 275,
+    '\u022C', 276,
+    '\u022D', 277,
+    '\u022E', 278,
+    '\u022F', 279,
+    '\u0230', 280,
+    '\u0231', 281,
+    '\u0232', 282,
+    '\u0233', 283,
+    '\u02B0', 284,
+    '\u02B1', 285,
+    '\u02B2', 286,
+    '\u02B3', 287,
+    '\u02B4', 288,
+    '\u02B5', 289,
+    '\u02B6', 290,
+    '\u02B7', 291,
+    '\u02B8', 292,
+    '\u02D8', 293,
+    '\u02D9', 294,
+    '\u02DA', 295,
+    '\u02DB', 296,
+    '\u02DC', 297,
+    '\u02DD', 298,
+    '\u02E0', 299,
+    '\u02E1', 300,
+    '\u02E2', 180,
+    '\u02E3', 301,
+    '\u02E4', 302,
+    '\u0340', 303,
+    '\u0341', 304,
+    '\u0343', 305,
+    '\u0344', 306,
+    '\u0374', 307,
+    '\u037A', 308,
+    '\u037E', 309,
+    '\u0384', 6,
+    '\u0385', 310,
+    '\u0386', 311,
+    '\u0387', 312,
+    '\u0388', 313,
+    '\u0389', 314,
+    '\u038A', 315,
+    '\u038C', 316,
+    '\u038E', 317,
+    '\u038F', 318,
+    '\u0390', 319,
+    '\u03AA', 320,
+    '\u03AB', 321,
+    '\u03AC', 322,
+    '\u03AD', 323,
+    '\u03AE', 324,
+    '\u03AF', 325,
+    '\u03B0', 326,
+    '\u03CA', 327,
+    '\u03CB', 328,
+    '\u03CC', 329,
+    '\u03CD', 330,
+    '\u03CE', 331,
+    '\u03D0', 332,
+    '\u03D1', 333,
+    '\u03D2', 334,
+    '\u03D3', 317,
+    '\u03D4', 321,
+    '\u03D5', 335,
+    '\u03D6', 336,
+    '\u03F0', 337,
+    '\u03F1', 338,
+    '\u03F2', 339,
+    '\u03F4', 340,
+    '\u03F5', 341,
+    '\u03F9', 342,
+    '\u0400', 343,
+    '\u0401', 344,
+    '\u0403', 345,
+    '\u0407', 346,
+    '\u040C', 347,
+    '\u040D', 348,
+    '\u040E', 349,
+    '\u0419', 350,
+    '\u0439', 351,
+    '\u0450', 352,
+    '\u0451', 353,
+    '\u0453', 354,
+    '\u0457', 355,
+    '\u045C', 356,
+    '\u045D', 357,
+    '\u045E', 358,
+    '\u0476', 359,
+    '\u0477', 360,
+    '\u04C1', 361,
+    '\u04C2', 362,
+    '\u04D0', 363,
+    '\u04D1', 364,
+    '\u04D2', 365,
+    '\u04D3', 366,
+    '\u04D6', 367,
+    '\u04D7', 368,
+    '\u04DA', 369,
+    '\u04DB', 370,
+    '\u04DC', 371,
+    '\u04DD', 372,
+    '\u04DE', 373,
+    '\u04DF', 374,
+    '\u04E2', 375,
+    '\u04E3', 376,
+    '\u04E4', 377,
+    '\u04E5', 378,
+    '\u04E6', 379,
+    '\u04E7', 380,
+    '\u04EA', 381,
+    '\u04EB', 382,
+    '\u04EC', 383,
+    '\u04ED', 384,
+    '\u04EE', 385,
+    '\u04EF', 386,
+    '\u04F0', 387,
+    '\u04F1', 388,
+    '\u04F2', 389,
+    '\u04F3', 390,
+    '\u04F4', 391,
+    '\u04F5', 392,
+    '\u04F8', 393,
+    '\u04F9', 394,
+    '\u0587', 395,
+    '\u0622', 396,
+    '\u0623', 397,
+    '\u0624', 398,
+    '\u0625', 399,
+    '\u0626', 400,
+    '\u0675', 401,
+    '\u0676', 402,
+    '\u0677', 403,
+    '\u0678', 404,
+    '\u06C0', 405,
+    '\u06C2', 406,
+    '\u06D3', 407,
+    '\u0929', 408,
+    '\u0931', 409,
+    '\u0934', 410,
+    '\u0958', 411,
+    '\u0959', 412,
+    '\u095A', 413,
+    '\u095B', 414,
+    '\u095C', 415,
+    '\u095D', 416,
+    '\u095E', 417,
+    '\u095F', 418,
+    '\u09CB', 419,
+    '\u09CC', 420,
+    '\u09DC', 421,
+    '\u09DD', 422,
+    '\u09DF', 423,
+    '\u0A33', 424,
+    '\u0A36', 425,
+    '\u0A59', 426,
+    '\u0A5A', 427,
+    '\u0A5B', 428,
+    '\u0A5E', 429,
+    '\u0B48', 430,
+    '\u0B4B', 431,
+    '\u0B4C', 432,
+    '\u0B5C', 433,
+    '\u0B5D', 434,
+    '\u0B94', 435,
+    '\u0BCA', 436,
+    '\u0BCB', 437,
+    '\u0BCC', 438,
+    '\u0C48', 439,
+    '\u0CC0', 440,
+    '\u0CC7', 441,
+    '\u0CC8', 442,
+    '\u0CCA', 443,
+    '\u0CCB', 444,
+    '\u0D4A', 445,
+    '\u0D4B', 446,
+    '\u0D4C', 447,
+    '\u0DDA', 448,
+    '\u0DDC', 449,
+    '\u0DDD', 450,
+    '\u0DDE', 451,
+    '\u0E33', 452,
+    '\u0EB3', 453,
+    '\u0EDC', 454,
+    '\u0EDD', 455,
+    '\u0F0C', 456,
+    '\u0F43', 457,
+    '\u0F4D', 458,
+    '\u0F52', 459,
+    '\u0F57', 460,
+    '\u0F5C', 461,
+    '\u0F69', 462,
+    '\u0F73', 463,
+    '\u0F75', 464,
+    '\u0F76', 465,
+    '\u0F77', 466,
+    '\u0F78', 467,
+    '\u0F79', 468,
+    '\u0F81', 469,
+    '\u0F93', 470,
+    '\u0F9D', 471,
+    '\u0FA2', 472,
+    '\u0FA7', 473,
+    '\u0FAC', 474,
+    '\u0FB9', 475,
+    '\u1026', 476,
+    '\u10FC', 477,
+    '\u1B06', 478,
+    '\u1B08', 479,
+    '\u1B0A', 480,
+    '\u1B0C', 481,
+    '\u1B0E', 482,
+    '\u1B12', 483,
+    '\u1B3B', 484,
+    '\u1B3D', 485,
+    '\u1B40', 486,
+    '\u1B41', 487,
+    '\u1B43', 488,
+    '\u1D2C', 489,
+    '\u1D2D', 490,
+    '\u1D2E', 491,
+    '\u1D30', 492,
+    '\u1D31', 493,
+    '\u1D32', 494,
+    '\u1D33', 495,
+    '\u1D34', 496,
+    '\u1D35', 497,
+    '\u1D36', 498,
+    '\u1D37', 499,
+    '\u1D38', 500,
+    '\u1D39', 501,
+    '\u1D3A', 502,
+    '\u1D3C', 503,
+    '\u1D3D', 504,
+    '\u1D3E', 505,
+    '\u1D3F', 506,
+    '\u1D40', 507,
+    '\u1D41', 508,
+    '\u1D42', 509,
+    '\u1D43', 2,
+    '\u1D44', 510,
+    '\u1D45', 511,
+    '\u1D46', 512,
+    '\u1D47', 513,
+    '\u1D48', 514,
+    '\u1D49', 515,
+    '\u1D4A', 516,
+    '\u1D4B', 517,
+    '\u1D4C', 518,
+    '\u1D4D', 519,
+    '\u1D4F', 520,
+    '\u1D50', 521,
+    '\u1D51', 522,
+    '\u1D52', 10,
+    '\u1D53', 523,
+    '\u1D54', 524,
+    '\u1D55', 525,
+    '\u1D56', 526,
+    '\u1D57', 527,
+    '\u1D58', 528,
+    '\u1D59', 529,
+    '\u1D5A', 530,
+    '\u1D5B', 531,
+    '\u1D5C', 532,
+    '\u1D5D', 332,
+    '\u1D5E', 533,
+    '\u1D5F', 534,
+    '\u1D60', 335,
+    '\u1D61', 535,
+    '\u1D62', 536,
+    '\u1D63', 287,
+    '\u1D64', 528,
+    '\u1D65', 531,
+    '\u1D66', 332,
+    '\u1D67', 533,
+    '\u1D68', 338,
+    '\u1D69', 335,
+    '\u1D6A', 535,
+    '\u1D78', 537,
+    '\u1D9B', 538,
+    '\u1D9C', 539,
+    '\u1D9D', 540,
+    '\u1D9E', 541,
+    '\u1D9F', 518,
+    '\u1DA0', 542,
+    '\u1DA1', 543,
+    '\u1DA2', 544,
+    '\u1DA3', 545,
+    '\u1DA4', 546,
+    '\u1DA5', 547,
+    '\u1DA6', 548,
+    '\u1DA7', 549,
+    '\u1DA8', 550,
+    '\u1DA9', 551,
+    '\u1DAA', 552,
+    '\u1DAB', 553,
+    '\u1DAC', 554,
+    '\u1DAD', 555,
+    '\u1DAE', 556,
+    '\u1DAF', 557,
+    '\u1DB0', 558,
+    '\u1DB1', 559,
+    '\u1DB2', 560,
+    '\u1DB3', 561,
+    '\u1DB4', 562,
+    '\u1DB5', 563,
+    '\u1DB6', 564,
+    '\u1DB7', 565,
+    '\u1DB8', 566,
+    '\u1DB9', 567,
+    '\u1DBA', 568,
+    '\u1DBB', 569,
+    '\u1DBC', 570,
+    '\u1DBD', 571,
+    '\u1DBE', 572,
+    '\u1DBF', 333,
+    '\u1E00', 573,
+    '\u1E01', 574,
+    '\u1E02', 575,
+    '\u1E03', 576,
+    '\u1E04', 577,
+    '\u1E05', 578,
+    '\u1E06', 579,
+    '\u1E07', 580,
+    '\u1E08', 581,
+    '\u1E09', 582,
+    '\u1E0A', 583,
+    '\u1E0B', 584,
+    '\u1E0C', 585,
+    '\u1E0D', 586,
+    '\u1E0E', 587,
+    '\u1E0F', 588,
+    '\u1E10', 589,
+    '\u1E11', 590,
+    '\u1E12', 591,
+    '\u1E13', 592,
+    '\u1E14', 593,
+    '\u1E15', 594,
+    '\u1E16', 595,
+    '\u1E17', 596,
+    '\u1E18', 597,
+    '\u1E19', 598,
+    '\u1E1A', 599,
+    '\u1E1B', 600,
+    '\u1E1C', 601,
+    '\u1E1D', 602,
+    '\u1E1E', 603,
+    '\u1E1F', 604,
+    '\u1E20', 605,
+    '\u1E21', 606,
+    '\u1E22', 607,
+    '\u1E23', 608,
+    '\u1E24', 609,
+    '\u1E25', 610,
+    '\u1E26', 611,
+    '\u1E27', 612,
+    '\u1E28', 613,
+    '\u1E29', 614,
+    '\u1E2A', 615,
+    '\u1E2B', 616,
+    '\u1E2C', 617,
+    '\u1E2D', 618,
+    '\u1E2E', 619,
+    '\u1E2F', 620,
+    '\u1E30', 621,
+    '\u1E31', 622,
+    '\u1E32', 623,
+    '\u1E33', 624,
+    '\u1E34', 625,
+    '\u1E35', 626,
+    '\u1E36', 627,
+    '\u1E37', 628,
+    '\u1E38', 629,
+    '\u1E39', 630,
+    '\u1E3A', 631,
+    '\u1E3B', 632,
+    '\u1E3C', 633,
+    '\u1E3D', 634,
+    '\u1E3E', 635,
+    '\u1E3F', 636,
+    '\u1E40', 637,
+    '\u1E41', 638,
+    '\u1E42', 639,
+    '\u1E43', 640,
+    '\u1E44', 641,
+    '\u1E45', 642,
+    '\u1E46', 643,
+    '\u1E47', 644,
+    '\u1E48', 645,
+    '\u1E49', 646,
+    '\u1E4A', 647,
+    '\u1E4B', 648,
+    '\u1E4C', 649,
+    '\u1E4D', 650,
+    '\u1E4E', 651,
+    '\u1E4F', 652,
+    '\u1E50', 653,
+    '\u1E51', 654,
+    '\u1E52', 655,
+    '\u1E53', 656,
+    '\u1E54', 657,
+    '\u1E55', 658,
+    '\u1E56', 659,
+    '\u1E57', 660,
+    '\u1E58', 661,
+    '\u1E59', 662,
+    '\u1E5A', 663,
+    '\u1E5B', 664,
+    '\u1E5C', 665,
+    '\u1E5D', 666,
+    '\u1E5E', 667,
+    '\u1E5F', 668,
+    '\u1E60', 669,
+    '\u1E61', 670,
+    '\u1E62', 671,
+    '\u1E63', 672,
+    '\u1E64', 673,
+    '\u1E65', 674,
+    '\u1E66', 675,
+    '\u1E67', 676,
+    '\u1E68', 677,
+    '\u1E69', 678,
+    '\u1E6A', 679,
+    '\u1E6B', 680,
+    '\u1E6C', 681,
+    '\u1E6D', 682,
+    '\u1E6E', 683,
+    '\u1E6F', 684,
+    '\u1E70', 685,
+    '\u1E71', 686,
+    '\u1E72', 687,
+    '\u1E73', 688,
+    '\u1E74', 689,
+    '\u1E75', 690,
+    '\u1E76', 691,
+    '\u1E77', 692,
+    '\u1E78', 693,
+    '\u1E79', 694,
+    '\u1E7A', 695,
+    '\u1E7B', 696,
+    '\u1E7C', 697,
+    '\u1E7D', 698,
+    '\u1E7E', 699,
+    '\u1E7F', 700,
+    '\u1E80', 701,
+    '\u1E81', 702,
+    '\u1E82', 703,
+    '\u1E83', 704,
+    '\u1E84', 705,
+    '\u1E85', 706,
+    '\u1E86', 707,
+    '\u1E87', 708,
+    '\u1E88', 709,
+    '\u1E89', 710,
+    '\u1E8A', 711,
+    '\u1E8B', 712,
+    '\u1E8C', 713,
+    '\u1E8D', 714,
+    '\u1E8E', 715,
+    '\u1E8F', 716,
+    '\u1E90', 717,
+    '\u1E91', 718,
+    '\u1E92', 719,
+    '\u1E93', 720,
+    '\u1E94', 721,
+    '\u1E95', 722,
+    '\u1E96', 723,
+    '\u1E97', 724,
+    '\u1E98', 725,
+    '\u1E99', 726,
+    '\u1E9A', 727,
+    '\u1E9B', 670,
+    '\u1EA0', 728,
+    '\u1EA1', 729,
+    '\u1EA2', 730,
+    '\u1EA3', 731,
+    '\u1EA4', 732,
+    '\u1EA5', 733,
+    '\u1EA6', 734,
+    '\u1EA7', 735,
+    '\u1EA8', 736,
+    '\u1EA9', 737,
+    '\u1EAA', 738,
+    '\u1EAB', 739,
+    '\u1EAC', 740,
+    '\u1EAD', 741,
+    '\u1EAE', 742,
+    '\u1EAF', 743,
+    '\u1EB0', 744,
+    '\u1EB1', 745,
+    '\u1EB2', 746,
+    '\u1EB3', 747,
+    '\u1EB4', 748,
+    '\u1EB5', 749,
+    '\u1EB6', 750,
+    '\u1EB7', 751,
+    '\u1EB8', 752,
+    '\u1EB9', 753,
+    '\u1EBA', 754,
+    '\u1EBB', 755,
+    '\u1EBC', 756,
+    '\u1EBD', 757,
+    '\u1EBE', 758,
+    '\u1EBF', 759,
+    '\u1EC0', 760,
+    '\u1EC1', 761,
+    '\u1EC2', 762,
+    '\u1EC3', 763,
+    '\u1EC4', 764,
+    '\u1EC5', 765,
+    '\u1EC6', 766,
+    '\u1EC7', 767,
+    '\u1EC8', 768,
+    '\u1EC9', 769,
+    '\u1ECA', 770,
+    '\u1ECB', 771,
+    '\u1ECC', 772,
+    '\u1ECD', 773,
+    '\u1ECE', 774,
+    '\u1ECF', 775,
+    '\u1ED0', 776,
+    '\u1ED1', 777,
+    '\u1ED2', 778,
+    '\u1ED3', 779,
+    '\u1ED4', 780,
+    '\u1ED5', 781,
+    '\u1ED6', 782,
+    '\u1ED7', 783,
+    '\u1ED8', 784,
+    '\u1ED9', 785,
+    '\u1EDA', 786,
+    '\u1EDB', 787,
+    '\u1EDC', 788,
+    '\u1EDD', 789,
+    '\u1EDE', 790,
+    '\u1EDF', 791,
+    '\u1EE0', 792,
+    '\u1EE1', 793,
+    '\u1EE2', 794,
+    '\u1EE3', 795,
+    '\u1EE4', 796,
+    '\u1EE5', 797,
+    '\u1EE6', 798,
+    '\u1EE7', 799,
+    '\u1EE8', 800,
+    '\u1EE9', 801,
+    '\u1EEA', 802,
+    '\u1EEB', 803,
+    '\u1EEC', 804,
+    '\u1EED', 805,
+    '\u1EEE', 806,
+    '\u1EEF', 807,
+    '\u1EF0', 808,
+    '\u1EF1', 809,
+    '\u1EF2', 810,
+    '\u1EF3', 811,
+    '\u1EF4', 812,
+    '\u1EF5', 813,
+    '\u1EF6', 814,
+    '\u1EF7', 815,
+    '\u1EF8', 816,
+    '\u1EF9', 817,
+    '\u1F00', 818,
+    '\u1F01', 819,
+    '\u1F02', 820,
+    '\u1F03', 821,
+    '\u1F04', 822,
+    '\u1F05', 823,
+    '\u1F06', 824,
+    '\u1F07', 825,
+    '\u1F08', 826,
+    '\u1F09', 827,
+    '\u1F0A', 828,
+    '\u1F0B', 829,
+    '\u1F0C', 830,
+    '\u1F0D', 831,
+    '\u1F0E', 832,
+    '\u1F0F', 833,
+    '\u1F10', 834,
+    '\u1F11', 835,
+    '\u1F12', 836,
+    '\u1F13', 837,
+    '\u1F14', 838,
+    '\u1F15', 839,
+    '\u1F18', 840,
+    '\u1F19', 841,
+    '\u1F1A', 842,
+    '\u1F1B', 843,
+    '\u1F1C', 844,
+    '\u1F1D', 845,
+    '\u1F20', 846,
+    '\u1F21', 847,
+    '\u1F22', 848,
+    '\u1F23', 849,
+    '\u1F24', 850,
+    '\u1F25', 851,
+    '\u1F26', 852,
+    '\u1F27', 853,
+    '\u1F28', 854,
+    '\u1F29', 855,
+    '\u1F2A', 856,
+    '\u1F2B', 857,
+    '\u1F2C', 858,
+    '\u1F2D', 859,
+    '\u1F2E', 860,
+    '\u1F2F', 861,
+    '\u1F30', 862,
+    '\u1F31', 863,
+    '\u1F32', 864,
+    '\u1F33', 865,
+    '\u1F34', 866,
+    '\u1F35', 867,
+    '\u1F36', 868,
+    '\u1F37', 869,
+    '\u1F38', 870,
+    '\u1F39', 871,
+    '\u1F3A', 872,
+    '\u1F3B', 873,
+    '\u1F3C', 874,
+    '\u1F3D', 875,
+    '\u1F3E', 876,
+    '\u1F3F', 877,
+    '\u1F40', 878,
+    '\u1F41', 879,
+    '\u1F42', 880,
+    '\u1F43', 881,
+    '\u1F44', 882,
+    '\u1F45', 883,
+    '\u1F48', 884,
+    '\u1F49', 885,
+    '\u1F4A', 886,
+    '\u1F4B', 887,
+    '\u1F4C', 888,
+    '\u1F4D', 889,
+    '\u1F50', 890,
+    '\u1F51', 891,
+    '\u1F52', 892,
+    '\u1F53', 893,
+    '\u1F54', 894,
+    '\u1F55', 895,
+    '\u1F56', 896,
+    '\u1F57', 897,
+    '\u1F59', 898,
+    '\u1F5B', 899,
+    '\u1F5D', 900,
+    '\u1F5F', 901,
+    '\u1F60', 902,
+    '\u1F61', 903,
+    '\u1F62', 904,
+    '\u1F63', 905,
+    '\u1F64', 906,
+    '\u1F65', 907,
+    '\u1F66', 908,
+    '\u1F67', 909,
+    '\u1F68', 910,
+    '\u1F69', 911,
+    '\u1F6A', 912,
+    '\u1F6B', 913,
+    '\u1F6C', 914,
+    '\u1F6D', 915,
+    '\u1F6E', 916,
+    '\u1F6F', 917,
+    '\u1F70', 918,
+    '\u1F71', 322,
+    '\u1F72', 919,
+    '\u1F73', 323,
+    '\u1F74', 920,
+    '\u1F75', 324,
+    '\u1F76', 921,
+    '\u1F77', 325,
+    '\u1F78', 922,
+    '\u1F79', 329,
+    '\u1F7A', 923,
+    '\u1F7B', 330,
+    '\u1F7C', 924,
+    '\u1F7D', 331,
+    '\u1F80', 925,
+    '\u1F81', 926,
+    '\u1F82', 927,
+    '\u1F83', 928,
+    '\u1F84', 929,
+    '\u1F85', 930,
+    '\u1F86', 931,
+    '\u1F87', 932,
+    '\u1F88', 933,
+    '\u1F89', 934,
+    '\u1F8A', 935,
+    '\u1F8B', 936,
+    '\u1F8C', 937,
+    '\u1F8D', 938,
+    '\u1F8E', 939,
+    '\u1F8F', 940,
+    '\u1F90', 941,
+    '\u1F91', 942,
+    '\u1F92', 943,
+    '\u1F93', 944,
+    '\u1F94', 945,
+    '\u1F95', 946,
+    '\u1F96', 947,
+    '\u1F97', 948,
+    '\u1F98', 949,
+    '\u1F99', 950,
+    '\u1F9A', 951,
+    '\u1F9B', 952,
+    '\u1F9C', 953,
+    '\u1F9D', 954,
+    '\u1F9E', 955,
+    '\u1F9F', 956,
+    '\u1FA0', 957,
+    '\u1FA1', 958,
+    '\u1FA2', 959,
+    '\u1FA3', 960,
+    '\u1FA4', 961,
+    '\u1FA5', 962,
+    '\u1FA6', 963,
+    '\u1FA7', 964,
+    '\u1FA8', 965,
+    '\u1FA9', 966,
+    '\u1FAA', 967,
+    '\u1FAB', 968,
+    '\u1FAC', 969,
+    '\u1FAD', 970,
+    '\u1FAE', 971,
+    '\u1FAF', 972,
+    '\u1FB0', 973,
+    '\u1FB1', 974,
+    '\u1FB2', 975,
+    '\u1FB3', 976,
+    '\u1FB4', 977,
+    '\u1FB6', 978,
+    '\u1FB7', 979,
+    '\u1FB8', 980,
+    '\u1FB9', 981,
+    '\u1FBA', 982,
+    '\u1FBB', 311,
+    '\u1FBC', 983,
+    '\u1FBD', 984,
+    '\u1FBE', 985,
+    '\u1FBF', 984,
+    '\u1FC0', 986,
+    '\u1FC1', 987,
+    '\u1FC2', 988,
+    '\u1FC3', 989,
+    '\u1FC4', 990,
+    '\u1FC6', 991,
+    '\u1FC7', 992,
+    '\u1FC8', 993,
+    '\u1FC9', 313,
+    '\u1FCA', 994,
+    '\u1FCB', 314,
+    '\u1FCC', 995,
+    '\u1FCD', 996,
+    '\u1FCE', 997,
+    '\u1FCF', 998,
+    '\u1FD0', 999,
+    '\u1FD1', 1000,
+    '\u1FD2', 1001,
+    '\u1FD3', 319,
+    '\u1FD6', 1002,
+    '\u1FD7', 1003,
+    '\u1FD8', 1004,
+    '\u1FD9', 1005,
+    '\u1FDA', 1006,
+    '\u1FDB', 315,
+    '\u1FDD', 1007,
+    '\u1FDE', 1008,
+    '\u1FDF', 1009,
+    '\u1FE0', 1010,
+    '\u1FE1', 1011,
+    '\u1FE2', 1012,
+    '\u1FE3', 326,
+    '\u1FE4', 1013,
+    '\u1FE5', 1014,
+    '\u1FE6', 1015,
+    '\u1FE7', 1016,
+    '\u1FE8', 1017,
+    '\u1FE9', 1018,
+    '\u1FEA', 1019,
+    '\u1FEB', 317,
+    '\u1FEC', 1020,
+    '\u1FED', 1021,
+    '\u1FEE', 310,
+    '\u1FEF', 1022,
+    '\u1FF2', 1023,
+    '\u1FF3', 1024,
+    '\u1FF4', 1025,
+    '\u1FF6', 1026,
+    '\u1FF7', 1027,
+    '\u1FF8', 1028,
+    '\u1FF9', 316,
+    '\u1FFA', 1029,
+    '\u1FFB', 318,
+    '\u1FFC', 1030,
+    '\u1FFD', 6,
+    '\u1FFE', 1031,
+    '\u2000', 0,
+    '\u2001', 0,
+    '\u2002', 0,
+    '\u2003', 0,
+    '\u2004', 0,
+    '\u2005', 0,
+    '\u2006', 0,
+    '\u2007', 0,
+    '\u2008', 0,
+    '\u2009', 0,
+    '\u200A', 0,
+    '\u2011', 1032,
+    '\u2017', 1033,
+    '\u2024', 1034,
+    '\u2025', 1035,
+    '\u2026', 1036,
+    '\u202F', 0,
+    '\u2033', 1037,
+    '\u2034', 1038,
+    '\u2036', 1039,
+    '\u2037', 1040,
+    '\u203C', 1041,
+    '\u203E', 1042,
+    '\u2047', 1043,
+    '\u2048', 1044,
+    '\u2049', 1045,
+    '\u2057', 1046,
+    '\u205F', 0,
+    '\u2070', 1047,
+    '\u2071', 536,
+    '\u2074', 1048,
+    '\u2075', 1049,
+    '\u2076', 1050,
+    '\u2077', 1051,
+    '\u2078', 1052,
+    '\u2079', 1053,
+    '\u207A', 1054,
+    '\u207B', 1055,
+    '\u207C', 1056,
+    '\u207D', 1057,
+    '\u207E', 1058,
+    '\u207F', 1059,
+    '\u2080', 1047,
+    '\u2081', 9,
+    '\u2082', 4,
+    '\u2083', 5,
+    '\u2084', 1048,
+    '\u2085', 1049,
+    '\u2086', 1050,
+    '\u2087', 1051,
+    '\u2088', 1052,
+    '\u2089', 1053,
+    '\u208A', 1054,
+    '\u208B', 1055,
+    '\u208C', 1056,
+    '\u208D', 1057,
+    '\u208E', 1058,
+    '\u2090', 2,
+    '\u2091', 515,
+    '\u2092', 10,
+    '\u2093', 301,
+    '\u2094', 516,
+    '\u20A8', 1060,
+    '\u2100', 1061,
+    '\u2101', 1062,
+    '\u2102', 1063,
+    '\u2103', 1064,
+    '\u2105', 1065,
+    '\u2106', 1066,
+    '\u2107', 1067,
+    '\u2109', 1068,
+    '\u210A', 519,
+    '\u210B', 496,
+    '\u210C', 496,
+    '\u210D', 496,
+    '\u210E', 284,
+    '\u210F', 1069,
+    '\u2110', 497,
+    '\u2111', 497,
+    '\u2112', 500,
+    '\u2113', 300,
+    '\u2115', 502,
+    '\u2116', 1070,
+    '\u2119', 505,
+    '\u211A', 1071,
+    '\u211B', 506,
+    '\u211C', 506,
+    '\u211D', 506,
+    '\u2120', 1072,
+    '\u2121', 1073,
+    '\u2122', 1074,
+    '\u2124', 1075,
+    '\u2126', 1076,
+    '\u2128', 1075,
+    '\u212A', 499,
+    '\u212B', 19,
+    '\u212C', 491,
+    '\u212D', 1063,
+    '\u212F', 515,
+    '\u2130', 493,
+    '\u2131', 1077,
+    '\u2133', 501,
+    '\u2134', 10,
+    '\u2135', 1078,
+    '\u2136', 1079,
+    '\u2137', 1080,
+    '\u2138', 1081,
+    '\u2139', 536,
+    '\u213B', 1082,
+    '\u213C', 336,
+    '\u213D', 533,
+    '\u213E', 1083,
+    '\u213F', 1084,
+    '\u2140', 1085,
+    '\u2145', 492,
+    '\u2146', 514,
+    '\u2147', 515,
+    '\u2148', 536,
+    '\u2149', 286,
+    '\u2153', 1086,
+    '\u2154', 1087,
+    '\u2155', 1088,
+    '\u2156', 1089,
+    '\u2157', 1090,
+    '\u2158', 1091,
+    '\u2159', 1092,
+    '\u215A', 1093,
+    '\u215B', 1094,
+    '\u215C', 1095,
+    '\u215D', 1096,
+    '\u215E', 1097,
+    '\u215F', 1098,
+    '\u2160', 497,
+    '\u2161', 1099,
+    '\u2162', 1100,
+    '\u2163', 1101,
+    '\u2164', 1102,
+    '\u2165', 1103,
+    '\u2166', 1104,
+    '\u2167', 1105,
+    '\u2168', 1106,
+    '\u2169', 1107,
+    '\u216A', 1108,
+    '\u216B', 1109,
+    '\u216C', 500,
+    '\u216D', 1063,
+    '\u216E', 492,
+    '\u216F', 501,
+    '\u2170', 536,
+    '\u2171', 1110,
+    '\u2172', 1111,
+    '\u2173', 1112,
+    '\u2174', 531,
+    '\u2175', 1113,
+    '\u2176', 1114,
+    '\u2177', 1115,
+    '\u2178', 1116,
+    '\u2179', 301,
+    '\u217A', 1117,
+    '\u217B', 1118,
+    '\u217C', 300,
+    '\u217D', 539,
+    '\u217E', 514,
+    '\u217F', 521,
+    '\u219A', 1119,
+    '\u219B', 1120,
+    '\u21AE', 1121,
+    '\u21CD', 1122,
+    '\u21CE', 1123,
+    '\u21CF', 1124,
+    '\u2204', 1125,
+    '\u2209', 1126,
+    '\u220C', 1127,
+    '\u2224', 1128,
+    '\u2226', 1129,
+    '\u222C', 1130,
+    '\u222D', 1131,
+    '\u222F', 1132,
+    '\u2230', 1133,
+    '\u2241', 1134,
+    '\u2244', 1135,
+    '\u2247', 1136,
+    '\u2249', 1137,
+    '\u2260', 1138,
+    '\u2262', 1139,
+    '\u226D', 1140,
+    '\u226E', 1141,
+    '\u226F', 1142,
+    '\u2270', 1143,
+    '\u2271', 1144,
+    '\u2274', 1145,
+    '\u2275', 1146,
+    '\u2278', 1147,
+    '\u2279', 1148,
+    '\u2280', 1149,
+    '\u2281', 1150,
+    '\u2284', 1151,
+    '\u2285', 1152,
+    '\u2288', 1153,
+    '\u2289', 1154,
+    '\u22AC', 1155,
+    '\u22AD', 1156,
+    '\u22AE', 1157,
+    '\u22AF', 1158,
+    '\u22E0', 1159,
+    '\u22E1', 1160,
+    '\u22E2', 1161,
+    '\u22E3', 1162,
+    '\u22EA', 1163,
+    '\u22EB', 1164,
+    '\u22EC', 1165,
+    '\u22ED', 1166,
+    '\u2329', 1167,
+    '\u232A', 1168,
+    '\u2460', 9,
+    '\u2461', 4,
+    '\u2462', 5,
+    '\u2463', 1048,
+    '\u2464', 1049,
+    '\u2465', 1050,
+    '\u2466', 1051,
+    '\u2467', 1052,
+    '\u2468', 1053,
+    '\u2469', 1169,
+    '\u246A', 1170,
+    '\u246B', 1171,
+    '\u246C', 1172,
+    '\u246D', 1173,
+    '\u246E', 1174,
+    '\u246F', 1175,
+    '\u2470', 1176,
+    '\u2471', 1177,
+    '\u2472', 1178,
+    '\u2473', 1179,
+    '\u2474', 1180,
+    '\u2475', 1181,
+    '\u2476', 1182,
+    '\u2477', 1183,
+    '\u2478', 1184,
+    '\u2479', 1185,
+    '\u247A', 1186,
+    '\u247B', 1187,
+    '\u247C', 1188,
+    '\u247D', 1189,
+    '\u247E', 1190,
+    '\u247F', 1191,
+    '\u2480', 1192,
+    '\u2481', 1193,
+    '\u2482', 1194,
+    '\u2483', 1195,
+    '\u2484', 1196,
+    '\u2485', 1197,
+    '\u2486', 1198,
+    '\u2487', 1199,
+    '\u2488', 1200,
+    '\u2489', 1201,
+    '\u248A', 1202,
+    '\u248B', 1203,
+    '\u248C', 1204,
+    '\u248D', 1205,
+    '\u248E', 1206,
+    '\u248F', 1207,
+    '\u2490', 1208,
+    '\u2491', 1209,
+    '\u2492', 1210,
+    '\u2493', 1211,
+    '\u2494', 1212,
+    '\u2495', 1213,
+    '\u2496', 1214,
+    '\u2497', 1215,
+    '\u2498', 1216,
+    '\u2499', 1217,
+    '\u249A', 1218,
+    '\u249B', 1219,
+    '\u249C', 1220,
+    '\u249D', 1221,
+    '\u249E', 1222,
+    '\u249F', 1223,
+    '\u24A0', 1224,
+    '\u24A1', 1225,
+    '\u24A2', 1226,
+    '\u24A3', 1227,
+    '\u24A4', 1228,
+    '\u24A5', 1229,
+    '\u24A6', 1230,
+    '\u24A7', 1231,
+    '\u24A8', 1232,
+    '\u24A9', 1233,
+    '\u24AA', 1234,
+    '\u24AB', 1235,
+    '\u24AC', 1236,
+    '\u24AD', 1237,
+    '\u24AE', 1238,
+    '\u24AF', 1239,
+    '\u24B0', 1240,
+    '\u24B1', 1241,
+    '\u24B2', 1242,
+    '\u24B3', 1243,
+    '\u24B4', 1244,
+    '\u24B5', 1245,
+    '\u24B6', 489,
+    '\u24B7', 491,
+    '\u24B8', 1063,
+    '\u24B9', 492,
+    '\u24BA', 493,
+    '\u24BB', 1077,
+    '\u24BC', 495,
+    '\u24BD', 496,
+    '\u24BE', 497,
+    '\u24BF', 498,
+    '\u24C0', 499,
+    '\u24C1', 500,
+    '\u24C2', 501,
+    '\u24C3', 502,
+    '\u24C4', 503,
+    '\u24C5', 505,
+    '\u24C6', 1071,
+    '\u24C7', 506,
+    '\u24C8', 1246,
+    '\u24C9', 507,
+    '\u24CA', 508,
+    '\u24CB', 1102,
+    '\u24CC', 509,
+    '\u24CD', 1107,
+    '\u24CE', 1247,
+    '\u24CF', 1075,
+    '\u24D0', 2,
+    '\u24D1', 513,
+    '\u24D2', 539,
+    '\u24D3', 514,
+    '\u24D4', 515,
+    '\u24D5', 542,
+    '\u24D6', 519,
+    '\u24D7', 284,
+    '\u24D8', 536,
+    '\u24D9', 286,
+    '\u24DA', 520,
+    '\u24DB', 300,
+    '\u24DC', 521,
+    '\u24DD', 1059,
+    '\u24DE', 10,
+    '\u24DF', 526,
+    '\u24E0', 1248,
+    '\u24E1', 287,
+    '\u24E2', 180,
+    '\u24E3', 527,
+    '\u24E4', 528,
+    '\u24E5', 531,
+    '\u24E6', 291,
+    '\u24E7', 301,
+    '\u24E8', 292,
+    '\u24E9', 569,
+    '\u24EA', 1047,
+    '\u2A0C', 1249,
+    '\u2A74', 1250,
+    '\u2A75', 1251,
+    '\u2A76', 1252,
+    '\u2ADC', 1253,
+    '\u2C7C', 286,
+    '\u2C7D', 1102,
+    '\u2D6F', 1254,
+    '\u2E9F', 1255,
+    '\u2EF3', 1256,
+    '\u2F00', 1257,
+    '\u2F01', 1258,
+    '\u2F02', 1259,
+    '\u2F03', 1260,
+    '\u2F04', 1261,
+    '\u2F05', 1262,
+    '\u2F06', 1263,
+    '\u2F07', 1264,
+    '\u2F08', 1265,
+    '\u2F09', 1266,
+    '\u2F0A', 1267,
+    '\u2F0B', 1268,
+    '\u2F0C', 1269,
+    '\u2F0D', 1270,
+    '\u2F0E', 1271,
+    '\u2F0F', 1272,
+    '\u2F10', 1273,
+    '\u2F11', 1274,
+    '\u2F12', 1275,
+    '\u2F13', 1276,
+    '\u2F14', 1277,
+    '\u2F15', 1278,
+    '\u2F16', 1279,
+    '\u2F17', 1280,
+    '\u2F18', 1281,
+    '\u2F19', 1282,
+    '\u2F1A', 1283,
+    '\u2F1B', 1284,
+    '\u2F1C', 1285,
+    '\u2F1D', 1286,
+    '\u2F1E', 1287,
+    '\u2F1F', 1288,
+    '\u2F20', 1289,
+    '\u2F21', 1290,
+    '\u2F22', 1291,
+    '\u2F23', 1292,
+    '\u2F24', 1293,
+    '\u2F25', 1294,
+    '\u2F26', 1295,
+    '\u2F27', 1296,
+    '\u2F28', 1297,
+    '\u2F29', 1298,
+    '\u2F2A', 1299,
+    '\u2F2B', 1300,
+    '\u2F2C', 1301,
+    '\u2F2D', 1302,
+    '\u2F2E', 1303,
+    '\u2F2F', 1304,
+    '\u2F30', 1305,
+    '\u2F31', 1306,
+    '\u2F32', 1307,
+    '\u2F33', 1308,
+    '\u2F34', 1309,
+    '\u2F35', 1310,
+    '\u2F36', 1311,
+    '\u2F37', 1312,
+    '\u2F38', 1313,
+    '\u2F39', 1314,
+    '\u2F3A', 1315,
+    '\u2F3B', 1316,
+    '\u2F3C', 1317,
+    '\u2F3D', 1318,
+    '\u2F3E', 1319,
+    '\u2F3F', 1320,
+    '\u2F40', 1321,
+    '\u2F41', 1322,
+    '\u2F42', 1323,
+    '\u2F43', 1324,
+    '\u2F44', 1325,
+    '\u2F45', 1326,
+    '\u2F46', 1327,
+    '\u2F47', 1328,
+    '\u2F48', 1329,
+    '\u2F49', 1330,
+    '\u2F4A', 1331,
+    '\u2F4B', 1332,
+    '\u2F4C', 1333,
+    '\u2F4D', 1334,
+    '\u2F4E', 1335,
+    '\u2F4F', 1336,
+    '\u2F50', 1337,
+    '\u2F51', 1338,
+    '\u2F52', 1339,
+    '\u2F53', 1340,
+    '\u2F54', 1341,
+    '\u2F55', 1342,
+    '\u2F56', 1343,
+    '\u2F57', 1344,
+    '\u2F58', 1345,
+    '\u2F59', 1346,
+    '\u2F5A', 1347,
+    '\u2F5B', 1348,
+    '\u2F5C', 1349,
+    '\u2F5D', 1350,
+    '\u2F5E', 1351,
+    '\u2F5F', 1352,
+    '\u2F60', 1353,
+    '\u2F61', 1354,
+    '\u2F62', 1355,
+    '\u2F63', 1356,
+    '\u2F64', 1357,
+    '\u2F65', 1358,
+    '\u2F66', 1359,
+    '\u2F67', 1360,
+    '\u2F68', 1361,
+    '\u2F69', 1362,
+    '\u2F6A', 1363,
+    '\u2F6B', 1364,
+    '\u2F6C', 1365,
+    '\u2F6D', 1366,
+    '\u2F6E', 1367,
+    '\u2F6F', 1368,
+    '\u2F70', 1369,
+    '\u2F71', 1370,
+    '\u2F72', 1371,
+    '\u2F73', 1372,
+    '\u2F74', 1373,
+    '\u2F75', 1374,
+    '\u2F76', 1375,
+    '\u2F77', 1376,
+    '\u2F78', 1377,
+    '\u2F79', 1378,
+    '\u2F7A', 1379,
+    '\u2F7B', 1380,
+    '\u2F7C', 1381,
+    '\u2F7D', 1382,
+    '\u2F7E', 1383,
+    '\u2F7F', 1384,
+    '\u2F80', 1385,
+    '\u2F81', 1386,
+    '\u2F82', 1387,
+    '\u2F83', 1388,
+    '\u2F84', 1389,
+    '\u2F85', 1390,
+    '\u2F86', 1391,
+    '\u2F87', 1392,
+    '\u2F88', 1393,
+    '\u2F89', 1394,
+    '\u2F8A', 1395,
+    '\u2F8B', 1396,
+    '\u2F8C', 1397,
+    '\u2F8D', 1398,
+    '\u2F8E', 1399,
+    '\u2F8F', 1400,
+    '\u2F90', 1401,
+    '\u2F91', 1402,
+    '\u2F92', 1403,
+    '\u2F93', 1404,
+    '\u2F94', 1405,
+    '\u2F95', 1406,
+    '\u2F96', 1407,
+    '\u2F97', 1408,
+    '\u2F98', 1409,
+    '\u2F99', 1410,
+    '\u2F9A', 1411,
+    '\u2F9B', 1412,
+    '\u2F9C', 1413,
+    '\u2F9D', 1414,
+    '\u2F9E', 1415,
+    '\u2F9F', 1416,
+    '\u2FA0', 1417,
+    '\u2FA1', 1418,
+    '\u2FA2', 1419,
+    '\u2FA3', 1420,
+    '\u2FA4', 1421,
+    '\u2FA5', 1422,
+    '\u2FA6', 1423,
+    '\u2FA7', 1424,
+    '\u2FA8', 1425,
+    '\u2FA9', 1426,
+    '\u2FAA', 1427,
+    '\u2FAB', 1428,
+    '\u2FAC', 1429,
+    '\u2FAD', 1430,
+    '\u2FAE', 1431,
+    '\u2FAF', 1432,
+    '\u2FB0', 1433,
+    '\u2FB1', 1434,
+    '\u2FB2', 1435,
+    '\u2FB3', 1436,
+    '\u2FB4', 1437,
+    '\u2FB5', 1438,
+    '\u2FB6', 1439,
+    '\u2FB7', 1440,
+    '\u2FB8', 1441,
+    '\u2FB9', 1442,
+    '\u2FBA', 1443,
+    '\u2FBB', 1444,
+    '\u2FBC', 1445,
+    '\u2FBD', 1446,
+    '\u2FBE', 1447,
+    '\u2FBF', 1448,
+    '\u2FC0', 1449,
+    '\u2FC1', 1450,
+    '\u2FC2', 1451,
+    '\u2FC3', 1452,
+    '\u2FC4', 1453,
+    '\u2FC5', 1454,
+    '\u2FC6', 1455,
+    '\u2FC7', 1456,
+    '\u2FC8', 1457,
+    '\u2FC9', 1458,
+    '\u2FCA', 1459,
+    '\u2FCB', 1460,
+    '\u2FCC', 1461,
+    '\u2FCD', 1462,
+    '\u2FCE', 1463,
+    '\u2FCF', 1464,
+    '\u2FD0', 1465,
+    '\u2FD1', 1466,
+    '\u2FD2', 1467,
+    '\u2FD3', 1468,
+    '\u2FD4', 1469,
+    '\u2FD5', 1470,
+    '\u3000', 0,
+    '\u3036', 1471,
+    '\u3038', 1280,
+    '\u3039', 1472,
+    '\u303A', 1473,
+    '\u304C', 1474,
+    '\u304E', 1475,
+    '\u3050', 1476,
+    '\u3052', 1477,
+    '\u3054', 1478,
+    '\u3056', 1479,
+    '\u3058', 1480,
+    '\u305A', 1481,
+    '\u305C', 1482,
+    '\u305E', 1483,
+    '\u3060', 1484,
+    '\u3062', 1485,
+    '\u3065', 1486,
+    '\u3067', 1487,
+    '\u3069', 1488,
+    '\u3070', 1489,
+    '\u3071', 1490,
+    '\u3073', 1491,
+    '\u3074', 1492,
+    '\u3076', 1493,
+    '\u3077', 1494,
+    '\u3079', 1495,
+    '\u307A', 1496,
+    '\u307C', 1497,
+    '\u307D', 1498,
+    '\u3094', 1499,
+    '\u309B', 1500,
+    '\u309C', 1501,
+    '\u309E', 1502,
+    '\u309F', 1503,
+    '\u30AC', 1504,
+    '\u30AE', 1505,
+    '\u30B0', 1506,
+    '\u30B2', 1507,
+    '\u30B4', 1508,
+    '\u30B6', 1509,
+    '\u30B8', 1510,
+    '\u30BA', 1511,
+    '\u30BC', 1512,
+    '\u30BE', 1513,
+    '\u30C0', 1514,
+    '\u30C2', 1515,
+    '\u30C5', 1516,
+    '\u30C7', 1517,
+    '\u30C9', 1518,
+    '\u30D0', 1519,
+    '\u30D1', 1520,
+    '\u30D3', 1521,
+    '\u30D4', 1522,
+    '\u30D6', 1523,
+    '\u30D7', 1524,
+    '\u30D9', 1525,
+    '\u30DA', 1526,
+    '\u30DC', 1527,
+    '\u30DD', 1528,
+    '\u30F4', 1529,
+    '\u30F7', 1530,
+    '\u30F8', 1531,
+    '\u30F9', 1532,
+    '\u30FA', 1533,
+    '\u30FE', 1534,
+    '\u30FF', 1535,
+    '\u3131', 1536,
+    '\u3132', 1537,
+    '\u3133', 1538,
+    '\u3134', 1539,
+    '\u3135', 1540,
+    '\u3136', 1541,
+    '\u3137', 1542,
+    '\u3138', 1543,
+    '\u3139', 1544,
+    '\u313A', 1545,
+    '\u313B', 1546,
+    '\u313C', 1547,
+    '\u313D', 1548,
+    '\u313E', 1549,
+    '\u313F', 1550,
+    '\u3140', 1551,
+    '\u3141', 1552,
+    '\u3142', 1553,
+    '\u3143', 1554,
+    '\u3144', 1555,
+    '\u3145', 1556,
+    '\u3146', 1557,
+    '\u3147', 1558,
+    '\u3148', 1559,
+    '\u3149', 1560,
+    '\u314A', 1561,
+    '\u314B', 1562,
+    '\u314C', 1563,
+    '\u314D', 1564,
+    '\u314E', 1565,
+    '\u314F', 1566,
+    '\u3150', 1567,
+    '\u3151', 1568,
+    '\u3152', 1569,
+    '\u3153', 1570,
+    '\u3154', 1571,
+    '\u3155', 1572,
+    '\u3156', 1573,
+    '\u3157', 1574,
+    '\u3158', 1575,
+    '\u3159', 1576,
+    '\u315A', 1577,
+    '\u315B', 1578,
+    '\u315C', 1579,
+    '\u315D', 1580,
+    '\u315E', 1581,
+    '\u315F', 1582,
+    '\u3160', 1583,
+    '\u3161', 1584,
+    '\u3162', 1585,
+    '\u3163', 1586,
+    '\u3164', 1587,
+    '\u3165', 1588,
+    '\u3166', 1589,
+    '\u3167', 1590,
+    '\u3168', 1591,
+    '\u3169', 1592,
+    '\u316A', 1593,
+    '\u316B', 1594,
+    '\u316C', 1595,
+    '\u316D', 1596,
+    '\u316E', 1597,
+    '\u316F', 1598,
+    '\u3170', 1599,
+    '\u3171', 1600,
+    '\u3172', 1601,
+    '\u3173', 1602,
+    '\u3174', 1603,
+    '\u3175', 1604,
+    '\u3176', 1605,
+    '\u3177', 1606,
+    '\u3178', 1607,
+    '\u3179', 1608,
+    '\u317A', 1609,
+    '\u317B', 1610,
+    '\u317C', 1611,
+    '\u317D', 1612,
+    '\u317E', 1613,
+    '\u317F', 1614,
+    '\u3180', 1615,
+    '\u3181', 1616,
+    '\u3182', 1617,
+    '\u3183', 1618,
+    '\u3184', 1619,
+    '\u3185', 1620,
+    '\u3186', 1621,
+    '\u3187', 1622,
+    '\u3188', 1623,
+    '\u3189', 1624,
+    '\u318A', 1625,
+    '\u318B', 1626,
+    '\u318C', 1627,
+    '\u318D', 1628,
+    '\u318E', 1629,
+    '\u3192', 1257,
+    '\u3193', 1263,
+    '\u3194', 1630,
+    '\u3195', 1631,
+    '\u3196', 1632,
+    '\u3197', 1633,
+    '\u3198', 1634,
+    '\u3199', 1635,
+    '\u319A', 1261,
+    '\u319B', 1636,
+    '\u319C', 1637,
+    '\u319D', 1638,
+    '\u319E', 1639,
+    '\u319F', 1265,
+    '\u3200', 1640,
+    '\u3201', 1641,
+    '\u3202', 1642,
+    '\u3203', 1643,
+    '\u3204', 1644,
+    '\u3205', 1645,
+    '\u3206', 1646,
+    '\u3207', 1647,
+    '\u3208', 1648,
+    '\u3209', 1649,
+    '\u320A', 1650,
+    '\u320B', 1651,
+    '\u320C', 1652,
+    '\u320D', 1653,
+    '\u320E', 1654,
+    '\u320F', 1655,
+    '\u3210', 1656,
+    '\u3211', 1657,
+    '\u3212', 1658,
+    '\u3213', 1659,
+    '\u3214', 1660,
+    '\u3215', 1661,
+    '\u3216', 1662,
+    '\u3217', 1663,
+    '\u3218', 1664,
+    '\u3219', 1665,
+    '\u321A', 1666,
+    '\u321B', 1667,
+    '\u321C', 1668,
+    '\u321D', 1669,
+    '\u321E', 1670,
+    '\u3220', 1671,
+    '\u3221', 1672,
+    '\u3222', 1673,
+    '\u3223', 1674,
+    '\u3224', 1675,
+    '\u3225', 1676,
+    '\u3226', 1677,
+    '\u3227', 1678,
+    '\u3228', 1679,
+    '\u3229', 1680,
+    '\u322A', 1681,
+    '\u322B', 1682,
+    '\u322C', 1683,
+    '\u322D', 1684,
+    '\u322E', 1685,
+    '\u322F', 1686,
+    '\u3230', 1687,
+    '\u3231', 1688,
+    '\u3232', 1689,
+    '\u3233', 1690,
+    '\u3234', 1691,
+    '\u3235', 1692,
+    '\u3236', 1693,
+    '\u3237', 1694,
+    '\u3238', 1695,
+    '\u3239', 1696,
+    '\u323A', 1697,
+    '\u323B', 1698,
+    '\u323C', 1699,
+    '\u323D', 1700,
+    '\u323E', 1701,
+    '\u323F', 1702,
+    '\u3240', 1703,
+    '\u3241', 1704,
+    '\u3242', 1705,
+    '\u3243', 1706,
+    '\u3250', 1707,
+    '\u3251', 1708,
+    '\u3252', 1709,
+    '\u3253', 1710,
+    '\u3254', 1711,
+    '\u3255', 1712,
+    '\u3256', 1713,
+    '\u3257', 1714,
+    '\u3258', 1715,
+    '\u3259', 1716,
+    '\u325A', 1717,
+    '\u325B', 1718,
+    '\u325C', 1719,
+    '\u325D', 1720,
+    '\u325E', 1721,
+    '\u325F', 1722,
+    '\u3260', 1536,
+    '\u3261', 1539,
+    '\u3262', 1542,
+    '\u3263', 1544,
+    '\u3264', 1552,
+    '\u3265', 1553,
+    '\u3266', 1556,
+    '\u3267', 1558,
+    '\u3268', 1559,
+    '\u3269', 1561,
+    '\u326A', 1562,
+    '\u326B', 1563,
+    '\u326C', 1564,
+    '\u326D', 1565,
+    '\u326E', 1723,
+    '\u326F', 1724,
+    '\u3270', 1725,
+    '\u3271', 1726,
+    '\u3272', 1727,
+    '\u3273', 1728,
+    '\u3274', 1729,
+    '\u3275', 1730,
+    '\u3276', 1731,
+    '\u3277', 1732,
+    '\u3278', 1733,
+    '\u3279', 1734,
+    '\u327A', 1735,
+    '\u327B', 1736,
+    '\u327C', 1737,
+    '\u327D', 1738,
+    '\u327E', 1739,
+    '\u3280', 1257,
+    '\u3281', 1263,
+    '\u3282', 1630,
+    '\u3283', 1631,
+    '\u3284', 1740,
+    '\u3285', 1741,
+    '\u3286', 1742,
+    '\u3287', 1268,
+    '\u3288', 1743,
+    '\u3289', 1280,
+    '\u328A', 1330,
+    '\u328B', 1342,
+    '\u328C', 1341,
+    '\u328D', 1331,
+    '\u328E', 1423,
+    '\u328F', 1288,
+    '\u3290', 1328,
+    '\u3291', 1744,
+    '\u3292', 1745,
+    '\u3293', 1746,
+    '\u3294', 1747,
+    '\u3295', 1748,
+    '\u3296', 1749,
+    '\u3297', 1750,
+    '\u3298', 1751,
+    '\u3299', 1752,
+    '\u329A', 1753,
+    '\u329B', 1294,
+    '\u329C', 1754,
+    '\u329D', 1755,
+    '\u329E', 1756,
+    '\u329F', 1757,
+    '\u32A0', 1758,
+    '\u32A1', 1759,
+    '\u32A2', 1760,
+    '\u32A3', 1761,
+    '\u32A4', 1632,
+    '\u32A5', 1633,
+    '\u32A6', 1634,
+    '\u32A7', 1762,
+    '\u32A8', 1763,
+    '\u32A9', 1764,
+    '\u32AA', 1765,
+    '\u32AB', 1766,
+    '\u32AC', 1767,
+    '\u32AD', 1768,
+    '\u32AE', 1769,
+    '\u32AF', 1770,
+    '\u32B0', 1771,
+    '\u32B1', 1772,
+    '\u32B2', 1773,
+    '\u32B3', 1774,
+    '\u32B4', 1775,
+    '\u32B5', 1776,
+    '\u32B6', 1777,
+    '\u32B7', 1778,
+    '\u32B8', 1779,
+    '\u32B9', 1780,
+    '\u32BA', 1781,
+    '\u32BB', 1782,
+    '\u32BC', 1783,
+    '\u32BD', 1784,
+    '\u32BE', 1785,
+    '\u32BF', 1786,
+    '\u32C0', 1787,
+    '\u32C1', 1788,
+    '\u32C2', 1789,
+    '\u32C3', 1790,
+    '\u32C4', 1791,
+    '\u32C5', 1792,
+    '\u32C6', 1793,
+    '\u32C7', 1794,
+    '\u32C8', 1795,
+    '\u32C9', 1796,
+    '\u32CA', 1797,
+    '\u32CB', 1798,
+    '\u32CC', 1799,
+    '\u32CD', 1800,
+    '\u32CE', 1801,
+    '\u32CF', 1802,
+    '\u32D0', 1803,
+    '\u32D1', 1804,
+    '\u32D2', 1805,
+    '\u32D3', 1806,
+    '\u32D4', 1807,
+    '\u32D5', 1808,
+    '\u32D6', 1809,
+    '\u32D7', 1810,
+    '\u32D8', 1811,
+    '\u32D9', 1812,
+    '\u32DA', 1813,
+    '\u32DB', 1814,
+    '\u32DC', 1815,
+    '\u32DD', 1816,
+    '\u32DE', 1817,
+    '\u32DF', 1818,
+    '\u32E0', 1819,
+    '\u32E1', 1820,
+    '\u32E2', 1821,
+    '\u32E3', 1822,
+    '\u32E4', 1823,
+    '\u32E5', 1824,
+    '\u32E6', 1825,
+    '\u32E7', 1826,
+    '\u32E8', 1827,
+    '\u32E9', 1828,
+    '\u32EA', 1829,
+    '\u32EB', 1830,
+    '\u32EC', 1831,
+    '\u32ED', 1832,
+    '\u32EE', 1833,
+    '\u32EF', 1834,
+    '\u32F0', 1835,
+    '\u32F1', 1836,
+    '\u32F2', 1837,
+    '\u32F3', 1838,
+    '\u32F4', 1839,
+    '\u32F5', 1840,
+    '\u32F6', 1841,
+    '\u32F7', 1842,
+    '\u32F8', 1843,
+    '\u32F9', 1844,
+    '\u32FA', 1845,
+    '\u32FB', 1846,
+    '\u32FC', 1847,
+    '\u32FD', 1848,
+    '\u32FE', 1849,
+    '\u3300', 1850,
+    '\u3301', 1851,
+    '\u3302', 1852,
+    '\u3303', 1853,
+    '\u3304', 1854,
+    '\u3305', 1855,
+    '\u3306', 1856,
+    '\u3307', 1857,
+    '\u3308', 1858,
+    '\u3309', 1859,
+    '\u330A', 1860,
+    '\u330B', 1861,
+    '\u330C', 1862,
+    '\u330D', 1863,
+    '\u330E', 1864,
+    '\u330F', 1865,
+    '\u3310', 1866,
+    '\u3311', 1867,
+    '\u3312', 1868,
+    '\u3313', 1869,
+    '\u3314', 1870,
+    '\u3315', 1871,
+    '\u3316', 1872,
+    '\u3317', 1873,
+    '\u3318', 1874,
+    '\u3319', 1875,
+    '\u331A', 1876,
+    '\u331B', 1877,
+    '\u331C', 1878,
+    '\u331D', 1879,
+    '\u331E', 1880,
+    '\u331F', 1881,
+    '\u3320', 1882,
+    '\u3321', 1883,
+    '\u3322', 1884,
+    '\u3323', 1885,
+    '\u3324', 1886,
+    '\u3325', 1887,
+    '\u3326', 1888,
+    '\u3327', 1889,
+    '\u3328', 1890,
+    '\u3329', 1891,
+    '\u332A', 1892,
+    '\u332B', 1893,
+    '\u332C', 1894,
+    '\u332D', 1895,
+    '\u332E', 1896,
+    '\u332F', 1897,
+    '\u3330', 1898,
+    '\u3331', 1899,
+    '\u3332', 1900,
+    '\u3333', 1901,
+    '\u3334', 1902,
+    '\u3335', 1903,
+    '\u3336', 1904,
+    '\u3337', 1905,
+    '\u3338', 1906,
+    '\u3339', 1907,
+    '\u333A', 1908,
+    '\u333B', 1909,
+    '\u333C', 1910,
+    '\u333D', 1911,
+    '\u333E', 1912,
+    '\u333F', 1913,
+    '\u3340', 1914,
+    '\u3341', 1915,
+    '\u3342', 1916,
+    '\u3343', 1917,
+    '\u3344', 1918,
+    '\u3345', 1919,
+    '\u3346', 1920,
+    '\u3347', 1921,
+    '\u3348', 1922,
+    '\u3349', 1923,
+    '\u334A', 1924,
+    '\u334B', 1925,
+    '\u334C', 1926,
+    '\u334D', 1927,
+    '\u334E', 1928,
+    '\u334F', 1929,
+    '\u3350', 1930,
+    '\u3351', 1931,
+    '\u3352', 1932,
+    '\u3353', 1933,
+    '\u3354', 1934,
+    '\u3355', 1935,
+    '\u3356', 1936,
+    '\u3357', 1937,
+    '\u3358', 1938,
+    '\u3359', 1939,
+    '\u335A', 1940,
+    '\u335B', 1941,
+    '\u335C', 1942,
+    '\u335D', 1943,
+    '\u335E', 1944,
+    '\u335F', 1945,
+    '\u3360', 1946,
+    '\u3361', 1947,
+    '\u3362', 1948,
+    '\u3363', 1949,
+    '\u3364', 1950,
+    '\u3365', 1951,
+    '\u3366', 1952,
+    '\u3367', 1953,
+    '\u3368', 1954,
+    '\u3369', 1955,
+    '\u336A', 1956,
+    '\u336B', 1957,
+    '\u336C', 1958,
+    '\u336D', 1959,
+    '\u336E', 1960,
+    '\u336F', 1961,
+    '\u3370', 1962,
+    '\u3371', 1963,
+    '\u3372', 1964,
+    '\u3373', 1965,
+    '\u3374', 1966,
+    '\u3375', 1967,
+    '\u3376', 1968,
+    '\u3377', 1969,
+    '\u3378', 1970,
+    '\u3379', 1971,
+    '\u337A', 1972,
+    '\u337B', 1973,
+    '\u337C', 1974,
+    '\u337D', 1975,
+    '\u337E', 1976,
+    '\u337F', 1977,
+    '\u3380', 1978,
+    '\u3381', 1979,
+    '\u3382', 1980,
+    '\u3383', 1981,
+    '\u3384', 1982,
+    '\u3385', 1983,
+    '\u3386', 1984,
+    '\u3387', 1985,
+    '\u3388', 1986,
+    '\u3389', 1987,
+    '\u338A', 1988,
+    '\u338B', 1989,
+    '\u338C', 1990,
+    '\u338D', 1991,
+    '\u338E', 1992,
+    '\u338F', 1993,
+    '\u3390', 1994,
+    '\u3391', 1995,
+    '\u3392', 1996,
+    '\u3393', 1997,
+    '\u3394', 1998,
+    '\u3395', 1999,
+    '\u3396', 2000,
+    '\u3397', 2001,
+    '\u3398', 2002,
+    '\u3399', 2003,
+    '\u339A', 2004,
+    '\u339B', 2005,
+    '\u339C', 2006,
+    '\u339D', 2007,
+    '\u339E', 2008,
+    '\u339F', 2009,
+    '\u33A0', 2010,
+    '\u33A1', 2011,
+    '\u33A2', 2012,
+    '\u33A3', 2013,
+    '\u33A4', 2014,
+    '\u33A5', 2015,
+    '\u33A6', 2016,
+    '\u33A7', 2017,
+    '\u33A8', 2018,
+    '\u33A9', 2019,
+    '\u33AA', 2020,
+    '\u33AB', 2021,
+    '\u33AC', 2022,
+    '\u33AD', 2023,
+    '\u33AE', 2024,
+    '\u33AF', 2025,
+    '\u33B0', 2026,
+    '\u33B1', 2027,
+    '\u33B2', 2028,
+    '\u33B3', 2029,
+    '\u33B4', 2030,
+    '\u33B5', 2031,
+    '\u33B6', 2032,
+    '\u33B7', 2033,
+    '\u33B8', 2034,
+    '\u33B9', 2035,
+    '\u33BA', 2036,
+    '\u33BB', 2037,
+    '\u33BC', 2038,
+    '\u33BD', 2039,
+    '\u33BE', 2040,
+    '\u33BF', 2041,
+    '\u33C0', 2042,
+    '\u33C1', 2043,
+    '\u33C2', 2044,
+    '\u33C3', 2045,
+    '\u33C4', 2046,
+    '\u33C5', 2047,
+    '\u33C6', 2048,
+    '\u33C7', 2049,
+    '\u33C8', 2050,
+    '\u33C9', 2051,
+    '\u33CA', 2052,
+    '\u33CB', 2053,
+    '\u33CC', 2054,
+    '\u33CD', 2055,
+    '\u33CE', 2056,
+    '\u33CF', 2057,
+    '\u33D0', 2058,
+    '\u33D1', 2059,
+    '\u33D2', 2060,
+    '\u33D3', 2061,
+    '\u33D4', 2062,
+    '\u33D5', 2063,
+    '\u33D6', 2064,
+    '\u33D7', 2065,
+    '\u33D8', 2066,
+    '\u33D9', 2067,
+    '\u33DA', 2068,
+    '\u33DB', 2069,
+    '\u33DC', 2070,
+    '\u33DD', 2071,
+    '\u33DE', 2072,
+    '\u33DF', 2073,
+    '\u33E0', 2074,
+    '\u33E1', 2075,
+    '\u33E2', 2076,
+    '\u33E3', 2077,
+    '\u33E4', 2078,
+    '\u33E5', 2079,
+    '\u33E6', 2080,
+    '\u33E7', 2081,
+    '\u33E8', 2082,
+    '\u33E9', 2083,
+    '\u33EA', 2084,
+    '\u33EB', 2085,
+    '\u33EC', 2086,
+    '\u33ED', 2087,
+    '\u33EE', 2088,
+    '\u33EF', 2089,
+    '\u33F0', 2090,
+    '\u33F1', 2091,
+    '\u33F2', 2092,
+    '\u33F3', 2093,
+    '\u33F4', 2094,
+    '\u33F5', 2095,
+    '\u33F6', 2096,
+    '\u33F7', 2097,
+    '\u33F8', 2098,
+    '\u33F9', 2099,
+    '\u33FA', 2100,
+    '\u33FB', 2101,
+    '\u33FC', 2102,
+    '\u33FD', 2103,
+    '\u33FE', 2104,
+    '\u33FF', 2105,
+    '\uA770', 2106,
+    '\uF900', 2107,
+    '\uF901', 2108,
+    '\uF902', 1415,
+    '\uF903', 2109,
+    '\uF904', 2110,
+    '\uF905', 2111,
+    '\uF906', 2112,
+    '\uF907', 1469,
+    '\uF908', 1469,
+    '\uF909', 2113,
+    '\uF90A', 1423,
+    '\uF90B', 2114,
+    '\uF90C', 2115,
+    '\uF90D', 2116,
+    '\uF90E', 2117,
+    '\uF90F', 2118,
+    '\uF910', 2119,
+    '\uF911', 2120,
+    '\uF912', 2121,
+    '\uF913', 2122,
+    '\uF914', 2123,
+    '\uF915', 2124,
+    '\uF916', 2125,
+    '\uF917', 2126,
+    '\uF918', 2127,
+    '\uF919', 2128,
+    '\uF91A', 2129,
+    '\uF91B', 2130,
+    '\uF91C', 2131,
+    '\uF91D', 2132,
+    '\uF91E', 2133,
+    '\uF91F', 2134,
+    '\uF920', 2135,
+    '\uF921', 2136,
+    '\uF922', 2137,
+    '\uF923', 2138,
+    '\uF924', 2139,
+    '\uF925', 2140,
+    '\uF926', 2141,
+    '\uF927', 2142,
+    '\uF928', 2143,
+    '\uF929', 2144,
+    '\uF92A', 2145,
+    '\uF92B', 2146,
+    '\uF92C', 2147,
+    '\uF92D', 2148,
+    '\uF92E', 2149,
+    '\uF92F', 2150,
+    '\uF930', 2151,
+    '\uF931', 2152,
+    '\uF932', 2153,
+    '\uF933', 2154,
+    '\uF934', 1381,
+    '\uF935', 2155,
+    '\uF936', 2156,
+    '\uF937', 2157,
+    '\uF938', 2158,
+    '\uF939', 2159,
+    '\uF93A', 2160,
+    '\uF93B', 2161,
+    '\uF93C', 2162,
+    '\uF93D', 2163,
+    '\uF93E', 2164,
+    '\uF93F', 2165,
+    '\uF940', 1454,
+    '\uF941', 2166,
+    '\uF942', 2167,
+    '\uF943', 2168,
+    '\uF944', 2169,
+    '\uF945', 2170,
+    '\uF946', 2171,
+    '\uF947', 2172,
+    '\uF948', 2173,
+    '\uF949', 2174,
+    '\uF94A', 2175,
+    '\uF94B', 2176,
+    '\uF94C', 2177,
+    '\uF94D', 2178,
+    '\uF94E', 2179,
+    '\uF94F', 2180,
+    '\uF950', 2181,
+    '\uF951', 2182,
+    '\uF952', 2183,
+    '\uF953', 2184,
+    '\uF954', 2185,
+    '\uF955', 2186,
+    '\uF956', 2187,
+    '\uF957', 2188,
+    '\uF958', 2189,
+    '\uF959', 2190,
+    '\uF95A', 2191,
+    '\uF95B', 2192,
+    '\uF95C', 2123,
+    '\uF95D', 2193,
+    '\uF95E', 2194,
+    '\uF95F', 2195,
+    '\uF960', 2196,
+    '\uF961', 2197,
+    '\uF962', 2198,
+    '\uF963', 2199,
+    '\uF964', 2200,
+    '\uF965', 2201,
+    '\uF966', 2202,
+    '\uF967', 2203,
+    '\uF968', 2204,
+    '\uF969', 2205,
+    '\uF96A', 2206,
+    '\uF96B', 2207,
+    '\uF96C', 2208,
+    '\uF96D', 2209,
+    '\uF96E', 2210,
+    '\uF96F', 2211,
+    '\uF970', 2212,
+    '\uF971', 1417,
+    '\uF972', 2213,
+    '\uF973', 2214,
+    '\uF974', 2215,
+    '\uF975', 2216,
+    '\uF976', 2217,
+    '\uF977', 2218,
+    '\uF978', 2219,
+    '\uF979', 2220,
+    '\uF97A', 2221,
+    '\uF97B', 2222,
+    '\uF97C', 2223,
+    '\uF97D', 2224,
+    '\uF97E', 2225,
+    '\uF97F', 2226,
+    '\uF980', 2227,
+    '\uF981', 1294,
+    '\uF982', 2228,
+    '\uF983', 2229,
+    '\uF984', 2230,
+    '\uF985', 2231,
+    '\uF986', 2232,
+    '\uF987', 2233,
+    '\uF988', 2234,
+    '\uF989', 2235,
+    '\uF98A', 1275,
+    '\uF98B', 2236,
+    '\uF98C', 2237,
+    '\uF98D', 2238,
+    '\uF98E', 2239,
+    '\uF98F', 2240,
+    '\uF990', 2241,
+    '\uF991', 2242,
+    '\uF992', 2243,
+    '\uF993', 2244,
+    '\uF994', 2245,
+    '\uF995', 2246,
+    '\uF996', 2247,
+    '\uF997', 2248,
+    '\uF998', 2249,
+    '\uF999', 2250,
+    '\uF99A', 2251,
+    '\uF99B', 2252,
+    '\uF99C', 2253,
+    '\uF99D', 2254,
+    '\uF99E', 2255,
+    '\uF99F', 2256,
+    '\uF9A0', 2257,
+    '\uF9A1', 2211,
+    '\uF9A2', 2258,
+    '\uF9A3', 2259,
+    '\uF9A4', 2260,
+    '\uF9A5', 2261,
+    '\uF9A6', 2262,
+    '\uF9A7', 2263,
+    '\uF9A8', 2264,
+    '\uF9A9', 2265,
+    '\uF9AA', 2195,
+    '\uF9AB', 2266,
+    '\uF9AC', 2267,
+    '\uF9AD', 2268,
+    '\uF9AE', 2269,
+    '\uF9AF', 2270,
+    '\uF9B0', 2271,
+    '\uF9B1', 2272,
+    '\uF9B2', 2273,
+    '\uF9B3', 2274,
+    '\uF9B4', 2275,
+    '\uF9B5', 2276,
+    '\uF9B6', 2277,
+    '\uF9B7', 2278,
+    '\uF9B8', 2279,
+    '\uF9B9', 2280,
+    '\uF9BA', 2281,
+    '\uF9BB', 2282,
+    '\uF9BC', 2283,
+    '\uF9BD', 2284,
+    '\uF9BE', 2285,
+    '\uF9BF', 2123,
+    '\uF9C0', 2286,
+    '\uF9C1', 2287,
+    '\uF9C2', 2288,
+    '\uF9C3', 2289,
+    '\uF9C4', 1468,
+    '\uF9C5', 2290,
+    '\uF9C6', 2291,
+    '\uF9C7', 2292,
+    '\uF9C8', 2293,
+    '\uF9C9', 2294,
+    '\uF9CA', 2295,
+    '\uF9CB', 2296,
+    '\uF9CC', 2297,
+    '\uF9CD', 2298,
+    '\uF9CE', 2299,
+    '\uF9CF', 2300,
+    '\uF9D0', 2301,
+    '\uF9D1', 1741,
+    '\uF9D2', 2302,
+    '\uF9D3', 2303,
+    '\uF9D4', 2304,
+    '\uF9D5', 2305,
+    '\uF9D6', 2306,
+    '\uF9D7', 2307,
+    '\uF9D8', 2308,
+    '\uF9D9', 2309,
+    '\uF9DA', 2310,
+    '\uF9DB', 2197,
+    '\uF9DC', 2311,
+    '\uF9DD', 2312,
+    '\uF9DE', 2313,
+    '\uF9DF', 2314,
+    '\uF9E0', 2315,
+    '\uF9E1', 2316,
+    '\uF9E2', 2317,
+    '\uF9E3', 2318,
+    '\uF9E4', 2319,
+    '\uF9E5', 2320,
+    '\uF9E6', 2321,
+    '\uF9E7', 2322,
+    '\uF9E8', 2323,
+    '\uF9E9', 1422,
+    '\uF9EA', 2324,
+    '\uF9EB', 2325,
+    '\uF9EC', 2326,
+    '\uF9ED', 2327,
+    '\uF9EE', 2328,
+    '\uF9EF', 2329,
+    '\uF9F0', 2330,
+    '\uF9F1', 2331,
+    '\uF9F2', 2332,
+    '\uF9F3', 2333,
+    '\uF9F4', 2334,
+    '\uF9F5', 2335,
+    '\uF9F6', 2336,
+    '\uF9F7', 1373,
+    '\uF9F8', 2337,
+    '\uF9F9', 2338,
+    '\uF9FA', 2339,
+    '\uF9FB', 2340,
+    '\uF9FC', 2341,
+    '\uF9FD', 2342,
+    '\uF9FE', 2343,
+    '\uF9FF', 2344,
+    '\uFA00', 2345,
+    '\uFA01', 2346,
+    '\uFA02', 2347,
+    '\uFA03', 2348,
+    '\uFA04', 2349,
+    '\uFA05', 2350,
+    '\uFA06', 2351,
+    '\uFA07', 2352,
+    '\uFA08', 1400,
+    '\uFA09', 2353,
+    '\uFA0A', 1403,
+    '\uFA0B', 2354,
+    '\uFA0C', 2355,
+    '\uFA0D', 2356,
+    '\uFA10', 2357,
+    '\uFA12', 2358,
+    '\uFA15', 2359,
+    '\uFA16', 2360,
+    '\uFA17', 2361,
+    '\uFA18', 2362,
+    '\uFA19', 2363,
+    '\uFA1A', 2364,
+    '\uFA1B', 2365,
+    '\uFA1C', 2366,
+    '\uFA1D', 2367,
+    '\uFA1E', 1380,
+    '\uFA20', 2368,
+    '\uFA22', 2369,
+    '\uFA25', 2370,
+    '\uFA26', 2371,
+    '\uFA2A', 2372,
+    '\uFA2B', 2373,
+    '\uFA2C', 2374,
+    '\uFA2D', 2375,
+    '\uFA30', 2376,
+    '\uFA31', 2377,
+    '\uFA32', 2378,
+    '\uFA33', 2379,
+    '\uFA34', 2380,
+    '\uFA35', 2381,
+    '\uFA36', 2382,
+    '\uFA37', 2383,
+    '\uFA38', 2384,
+    '\uFA39', 2385,
+    '\uFA3A', 2386,
+    '\uFA3B', 2387,
+    '\uFA3C', 1301,
+    '\uFA3D', 2388,
+    '\uFA3E', 2389,
+    '\uFA3F', 2390,
+    '\uFA40', 2391,
+    '\uFA41', 2392,
+    '\uFA42', 2393,
+    '\uFA43', 2394,
+    '\uFA44', 2395,
+    '\uFA45', 2396,
+    '\uFA46', 2397,
+    '\uFA47', 2398,
+    '\uFA48', 2399,
+    '\uFA49', 2400,
+    '\uFA4A', 2401,
+    '\uFA4B', 2402,
+    '\uFA4C', 1746,
+    '\uFA4D', 2403,
+    '\uFA4E', 2404,
+    '\uFA4F', 2405,
+    '\uFA50', 2406,
+    '\uFA51', 1750,
+    '\uFA52', 2407,
+    '\uFA53', 2408,
+    '\uFA54', 2409,
+    '\uFA55', 2410,
+    '\uFA56', 2411,
+    '\uFA57', 2247,
+    '\uFA58', 2412,
+    '\uFA59', 2413,
+    '\uFA5A', 2414,
+    '\uFA5B', 2415,
+    '\uFA5C', 2416,
+    '\uFA5D', 2417,
+    '\uFA5E', 2417,
+    '\uFA5F', 2418,
+    '\uFA60', 2419,
+    '\uFA61', 2420,
+    '\uFA62', 2421,
+    '\uFA63', 2422,
+    '\uFA64', 2423,
+    '\uFA65', 2424,
+    '\uFA66', 2425,
+    '\uFA67', 2370,
+    '\uFA68', 2426,
+    '\uFA69', 2427,
+    '\uFA6A', 2428,
+    '\uFA70', 2429,
+    '\uFA71', 2430,
+    '\uFA72', 2431,
+    '\uFA73', 2432,
+    '\uFA74', 2433,
+    '\uFA75', 2434,
+    '\uFA76', 2435,
+    '\uFA77', 2436,
+    '\uFA78', 2382,
+    '\uFA79', 2437,
+    '\uFA7A', 2438,
+    '\uFA7B', 2439,
+    '\uFA7C', 2357,
+    '\uFA7D', 2440,
+    '\uFA7E', 2441,
+    '\uFA7F', 2442,
+    '\uFA80', 2443,
+    '\uFA81', 2444,
+    '\uFA82', 2445,
+    '\uFA83', 2446,
+    '\uFA84', 2447,
+    '\uFA85', 2448,
+    '\uFA86', 2449,
+    '\uFA87', 2450,
+    '\uFA88', 2451,
+    '\uFA89', 2390,
+    '\uFA8A', 2452,
+    '\uFA8B', 2391,
+    '\uFA8C', 2453,
+    '\uFA8D', 2454,
+    '\uFA8E', 2455,
+    '\uFA8F', 2456,
+    '\uFA90', 2457,
+    '\uFA91', 2358,
+    '\uFA92', 2144,
+    '\uFA93', 2458,
+    '\uFA94', 2459,
+    '\uFA95', 1334,
+    '\uFA96', 2212,
+    '\uFA97', 2295,
+    '\uFA98', 2460,
+    '\uFA99', 2461,
+    '\uFA9A', 2398,
+    '\uFA9B', 2462,
+    '\uFA9C', 2399,
+    '\uFA9D', 2463,
+    '\uFA9E', 2464,
+    '\uFA9F', 2465,
+    '\uFAA0', 2360,
+    '\uFAA1', 2466,
+    '\uFAA2', 2467,
+    '\uFAA3', 2468,
+    '\uFAA4', 2469,
+    '\uFAA5', 2470,
+    '\uFAA6', 2361,
+    '\uFAA7', 2471,
+    '\uFAA8', 2472,
+    '\uFAA9', 2473,
+    '\uFAAA', 2474,
+    '\uFAAB', 2475,
+    '\uFAAC', 2476,
+    '\uFAAD', 2411,
+    '\uFAAE', 2477,
+    '\uFAAF', 2478,
+    '\uFAB0', 2247,
+    '\uFAB1', 2479,
+    '\uFAB2', 2415,
+    '\uFAB3', 2480,
+    '\uFAB4', 2481,
+    '\uFAB5', 2482,
+    '\uFAB6', 2483,
+    '\uFAB7', 2484,
+    '\uFAB8', 2420,
+    '\uFAB9', 2485,
+    '\uFABA', 2369,
+    '\uFABB', 2486,
+    '\uFABC', 2421,
+    '\uFABD', 2193,
+    '\uFABE', 2487,
+    '\uFABF', 2422,
+    '\uFAC0', 2488,
+    '\uFAC1', 2424,
+    '\uFAC2', 2489,
+    '\uFAC3', 2490,
+    '\uFAC4', 2491,
+    '\uFAC5', 2492,
+    '\uFAC6', 2493,
+    '\uFAC7', 2426,
+    '\uFAC8', 2366,
+    '\uFAC9', 2494,
+    '\uFACA', 2427,
+    '\uFACB', 2495,
+    '\uFACC', 2428,
+    '\uFACD', 2496,
+    '\uFACE', 1469,
+    '\uFACF', 2497,
+    '\uFAD0', 2498,
+    '\uFAD1', 2499,
+    '\uFAD2', 2500,
+    '\uFAD3', 2501,
+    '\uFAD4', 2502,
+    '\uFAD5', 2503,
+    '\uFAD6', 2504,
+    '\uFAD7', 2505,
+    '\uFAD8', 2506,
+    '\uFAD9', 2507,
+    '\uFB00', 2508,
+    '\uFB01', 2509,
+    '\uFB02', 2510,
+    '\uFB03', 2511,
+    '\uFB04', 2512,
+    '\uFB05', 2513,
+    '\uFB06', 2513,
+    '\uFB13', 2514,
+    '\uFB14', 2515,
+    '\uFB15', 2516,
+    '\uFB16', 2517,
+    '\uFB17', 2518,
+    '\uFB1D', 2519,
+    '\uFB1F', 2520,
+    '\uFB20', 2521,
+    '\uFB21', 1078,
+    '\uFB22', 1081,
+    '\uFB23', 2522,
+    '\uFB24', 2523,
+    '\uFB25', 2524,
+    '\uFB26', 2525,
+    '\uFB27', 2526,
+    '\uFB28', 2527,
+    '\uFB29', 1054,
+    '\uFB2A', 2528,
+    '\uFB2B', 2529,
+    '\uFB2C', 2530,
+    '\uFB2D', 2531,
+    '\uFB2E', 2532,
+    '\uFB2F', 2533,
+    '\uFB30', 2534,
+    '\uFB31', 2535,
+    '\uFB32', 2536,
+    '\uFB33', 2537,
+    '\uFB34', 2538,
+    '\uFB35', 2539,
+    '\uFB36', 2540,
+    '\uFB38', 2541,
+    '\uFB39', 2542,
+    '\uFB3A', 2543,
+    '\uFB3B', 2544,
+    '\uFB3C', 2545,
+    '\uFB3E', 2546,
+    '\uFB40', 2547,
+    '\uFB41', 2548,
+    '\uFB43', 2549,
+    '\uFB44', 2550,
+    '\uFB46', 2551,
+    '\uFB47', 2552,
+    '\uFB48', 2553,
+    '\uFB49', 2554,
+    '\uFB4A', 2555,
+    '\uFB4B', 2556,
+    '\uFB4C', 2557,
+    '\uFB4D', 2558,
+    '\uFB4E', 2559,
+    '\uFB4F', 2560,
+    '\uFB50', 2561,
+    '\uFB51', 2561,
+    '\uFB52', 2562,
+    '\uFB53', 2562,
+    '\uFB54', 2562,
+    '\uFB55', 2562,
+    '\uFB56', 2563,
+    '\uFB57', 2563,
+    '\uFB58', 2563,
+    '\uFB59', 2563,
+    '\uFB5A', 2564,
+    '\uFB5B', 2564,
+    '\uFB5C', 2564,
+    '\uFB5D', 2564,
+    '\uFB5E', 2565,
+    '\uFB5F', 2565,
+    '\uFB60', 2565,
+    '\uFB61', 2565,
+    '\uFB62', 2566,
+    '\uFB63', 2566,
+    '\uFB64', 2566,
+    '\uFB65', 2566,
+    '\uFB66', 2567,
+    '\uFB67', 2567,
+    '\uFB68', 2567,
+    '\uFB69', 2567,
+    '\uFB6A', 2568,
+    '\uFB6B', 2568,
+    '\uFB6C', 2568,
+    '\uFB6D', 2568,
+    '\uFB6E', 2569,
+    '\uFB6F', 2569,
+    '\uFB70', 2569,
+    '\uFB71', 2569,
+    '\uFB72', 2570,
+    '\uFB73', 2570,
+    '\uFB74', 2570,
+    '\uFB75', 2570,
+    '\uFB76', 2571,
+    '\uFB77', 2571,
+    '\uFB78', 2571,
+    '\uFB79', 2571,
+    '\uFB7A', 2572,
+    '\uFB7B', 2572,
+    '\uFB7C', 2572,
+    '\uFB7D', 2572,
+    '\uFB7E', 2573,
+    '\uFB7F', 2573,
+    '\uFB80', 2573,
+    '\uFB81', 2573,
+    '\uFB82', 2574,
+    '\uFB83', 2574,
+    '\uFB84', 2575,
+    '\uFB85', 2575,
+    '\uFB86', 2576,
+    '\uFB87', 2576,
+    '\uFB88', 2577,
+    '\uFB89', 2577,
+    '\uFB8A', 2578,
+    '\uFB8B', 2578,
+    '\uFB8C', 2579,
+    '\uFB8D', 2579,
+    '\uFB8E', 2580,
+    '\uFB8F', 2580,
+    '\uFB90', 2580,
+    '\uFB91', 2580,
+    '\uFB92', 2581,
+    '\uFB93', 2581,
+    '\uFB94', 2581,
+    '\uFB95', 2581,
+    '\uFB96', 2582,
+    '\uFB97', 2582,
+    '\uFB98', 2582,
+    '\uFB99', 2582,
+    '\uFB9A', 2583,
+    '\uFB9B', 2583,
+    '\uFB9C', 2583,
+    '\uFB9D', 2583,
+    '\uFB9E', 2584,
+    '\uFB9F', 2584,
+    '\uFBA0', 2585,
+    '\uFBA1', 2585,
+    '\uFBA2', 2585,
+    '\uFBA3', 2585,
+    '\uFBA4', 405,
+    '\uFBA5', 405,
+    '\uFBA6', 2586,
+    '\uFBA7', 2586,
+    '\uFBA8', 2586,
+    '\uFBA9', 2586,
+    '\uFBAA', 2587,
+    '\uFBAB', 2587,
+    '\uFBAC', 2587,
+    '\uFBAD', 2587,
+    '\uFBAE', 2588,
+    '\uFBAF', 2588,
+    '\uFBB0', 407,
+    '\uFBB1', 407,
+    '\uFBD3', 2589,
+    '\uFBD4', 2589,
+    '\uFBD5', 2589,
+    '\uFBD6', 2589,
+    '\uFBD7', 2590,
+    '\uFBD8', 2590,
+    '\uFBD9', 2591,
+    '\uFBDA', 2591,
+    '\uFBDB', 2592,
+    '\uFBDC', 2592,
+    '\uFBDD', 403,
+    '\uFBDE', 2593,
+    '\uFBDF', 2593,
+    '\uFBE0', 2594,
+    '\uFBE1', 2594,
+    '\uFBE2', 2595,
+    '\uFBE3', 2595,
+    '\uFBE4', 2596,
+    '\uFBE5', 2596,
+    '\uFBE6', 2596,
+    '\uFBE7', 2596,
+    '\uFBE8', 2597,
+    '\uFBE9', 2597,
+    '\uFBEA', 2598,
+    '\uFBEB', 2598,
+    '\uFBEC', 2599,
+    '\uFBED', 2599,
+    '\uFBEE', 2600,
+    '\uFBEF', 2600,
+    '\uFBF0', 2601,
+    '\uFBF1', 2601,
+    '\uFBF2', 2602,
+    '\uFBF3', 2602,
+    '\uFBF4', 2603,
+    '\uFBF5', 2603,
+    '\uFBF6', 2604,
+    '\uFBF7', 2604,
+    '\uFBF8', 2604,
+    '\uFBF9', 2605,
+    '\uFBFA', 2605,
+    '\uFBFB', 2605,
+    '\uFBFC', 2606,
+    '\uFBFD', 2606,
+    '\uFBFE', 2606,
+    '\uFBFF', 2606,
+    '\uFC00', 2607,
+    '\uFC01', 2608,
+    '\uFC02', 2609,
+    '\uFC03', 2605,
+    '\uFC04', 2610,
+    '\uFC05', 2611,
+    '\uFC06', 2612,
+    '\uFC07', 2613,
+    '\uFC08', 2614,
+    '\uFC09', 2615,
+    '\uFC0A', 2616,
+    '\uFC0B', 2617,
+    '\uFC0C', 2618,
+    '\uFC0D', 2619,
+    '\uFC0E', 2620,
+    '\uFC0F', 2621,
+    '\uFC10', 2622,
+    '\uFC11', 2623,
+    '\uFC12', 2624,
+    '\uFC13', 2625,
+    '\uFC14', 2626,
+    '\uFC15', 2627,
+    '\uFC16', 2628,
+    '\uFC17', 2629,
+    '\uFC18', 2630,
+    '\uFC19', 2631,
+    '\uFC1A', 2632,
+    '\uFC1B', 2633,
+    '\uFC1C', 2634,
+    '\uFC1D', 2635,
+    '\uFC1E', 2636,
+    '\uFC1F', 2637,
+    '\uFC20', 2638,
+    '\uFC21', 2639,
+    '\uFC22', 2640,
+    '\uFC23', 2641,
+    '\uFC24', 2642,
+    '\uFC25', 2643,
+    '\uFC26', 2644,
+    '\uFC27', 2645,
+    '\uFC28', 2646,
+    '\uFC29', 2647,
+    '\uFC2A', 2648,
+    '\uFC2B', 2649,
+    '\uFC2C', 2650,
+    '\uFC2D', 2651,
+    '\uFC2E', 2652,
+    '\uFC2F', 2653,
+    '\uFC30', 2654,
+    '\uFC31', 2655,
+    '\uFC32', 2656,
+    '\uFC33', 2657,
+    '\uFC34', 2658,
+    '\uFC35', 2659,
+    '\uFC36', 2660,
+    '\uFC37', 2661,
+    '\uFC38', 2662,
+    '\uFC39', 2663,
+    '\uFC3A', 2664,
+    '\uFC3B', 2665,
+    '\uFC3C', 2666,
+    '\uFC3D', 2667,
+    '\uFC3E', 2668,
+    '\uFC3F', 2669,
+    '\uFC40', 2670,
+    '\uFC41', 2671,
+    '\uFC42', 2672,
+    '\uFC43', 2673,
+    '\uFC44', 2674,
+    '\uFC45', 2675,
+    '\uFC46', 2676,
+    '\uFC47', 2677,
+    '\uFC48', 2678,
+    '\uFC49', 2679,
+    '\uFC4A', 2680,
+    '\uFC4B', 2681,
+    '\uFC4C', 2682,
+    '\uFC4D', 2683,
+    '\uFC4E', 2684,
+    '\uFC4F', 2685,
+    '\uFC50', 2686,
+    '\uFC51', 2687,
+    '\uFC52', 2688,
+    '\uFC53', 2689,
+    '\uFC54', 2690,
+    '\uFC55', 2691,
+    '\uFC56', 2692,
+    '\uFC57', 2693,
+    '\uFC58', 2694,
+    '\uFC59', 2695,
+    '\uFC5A', 2696,
+    '\uFC5B', 2697,
+    '\uFC5C', 2698,
+    '\uFC5D', 2699,
+    '\uFC5E', 2700,
+    '\uFC5F', 2701,
+    '\uFC60', 2702,
+    '\uFC61', 2703,
+    '\uFC62', 2704,
+    '\uFC63', 2705,
+    '\uFC64', 2706,
+    '\uFC65', 2707,
+    '\uFC66', 2609,
+    '\uFC67', 2708,
+    '\uFC68', 2605,
+    '\uFC69', 2610,
+    '\uFC6A', 2709,
+    '\uFC6B', 2710,
+    '\uFC6C', 2614,
+    '\uFC6D', 2711,
+    '\uFC6E', 2615,
+    '\uFC6F', 2616,
+    '\uFC70', 2712,
+    '\uFC71', 2713,
+    '\uFC72', 2620,
+    '\uFC73', 2714,
+    '\uFC74', 2621,
+    '\uFC75', 2622,
+    '\uFC76', 2715,
+    '\uFC77', 2716,
+    '\uFC78', 2624,
+    '\uFC79', 2717,
+    '\uFC7A', 2625,
+    '\uFC7B', 2626,
+    '\uFC7C', 2655,
+    '\uFC7D', 2656,
+    '\uFC7E', 2659,
+    '\uFC7F', 2660,
+    '\uFC80', 2661,
+    '\uFC81', 2665,
+    '\uFC82', 2666,
+    '\uFC83', 2667,
+    '\uFC84', 2668,
+    '\uFC85', 2672,
+    '\uFC86', 2673,
+    '\uFC87', 2674,
+    '\uFC88', 2718,
+    '\uFC89', 2678,
+    '\uFC8A', 2719,
+    '\uFC8B', 2720,
+    '\uFC8C', 2684,
+    '\uFC8D', 2721,
+    '\uFC8E', 2685,
+    '\uFC8F', 2686,
+    '\uFC90', 2699,
+    '\uFC91', 2722,
+    '\uFC92', 2723,
+    '\uFC93', 2694,
+    '\uFC94', 2724,
+    '\uFC95', 2695,
+    '\uFC96', 2696,
+    '\uFC97', 2607,
+    '\uFC98', 2608,
+    '\uFC99', 2725,
+    '\uFC9A', 2609,
+    '\uFC9B', 2726,
+    '\uFC9C', 2611,
+    '\uFC9D', 2612,
+    '\uFC9E', 2613,
+    '\uFC9F', 2614,
+    '\uFCA0', 2727,
+    '\uFCA1', 2617,
+    '\uFCA2', 2618,
+    '\uFCA3', 2619,
+    '\uFCA4', 2620,
+    '\uFCA5', 2728,
+    '\uFCA6', 2624,
+    '\uFCA7', 2627,
+    '\uFCA8', 2628,
+    '\uFCA9', 2629,
+    '\uFCAA', 2630,
+    '\uFCAB', 2631,
+    '\uFCAC', 2633,
+    '\uFCAD', 2634,
+    '\uFCAE', 2635,
+    '\uFCAF', 2636,
+    '\uFCB0', 2637,
+    '\uFCB1', 2638,
+    '\uFCB2', 2729,
+    '\uFCB3', 2639,
+    '\uFCB4', 2640,
+    '\uFCB5', 2641,
+    '\uFCB6', 2642,
+    '\uFCB7', 2643,
+    '\uFCB8', 2644,
+    '\uFCB9', 2646,
+    '\uFCBA', 2647,
+    '\uFCBB', 2648,
+    '\uFCBC', 2649,
+    '\uFCBD', 2650,
+    '\uFCBE', 2651,
+    '\uFCBF', 2652,
+    '\uFCC0', 2653,
+    '\uFCC1', 2654,
+    '\uFCC2', 2657,
+    '\uFCC3', 2658,
+    '\uFCC4', 2662,
+    '\uFCC5', 2663,
+    '\uFCC6', 2664,
+    '\uFCC7', 2665,
+    '\uFCC8', 2666,
+    '\uFCC9', 2669,
+    '\uFCCA', 2670,
+    '\uFCCB', 2671,
+    '\uFCCC', 2672,
+    '\uFCCD', 2730,
+    '\uFCCE', 2675,
+    '\uFCCF', 2676,
+    '\uFCD0', 2677,
+    '\uFCD1', 2678,
+    '\uFCD2', 2681,
+    '\uFCD3', 2682,
+    '\uFCD4', 2683,
+    '\uFCD5', 2684,
+    '\uFCD6', 2731,
+    '\uFCD7', 2687,
+    '\uFCD8', 2688,
+    '\uFCD9', 2732,
+    '\uFCDA', 2691,
+    '\uFCDB', 2692,
+    '\uFCDC', 2693,
+    '\uFCDD', 2694,
+    '\uFCDE', 2733,
+    '\uFCDF', 2609,
+    '\uFCE0', 2726,
+    '\uFCE1', 2614,
+    '\uFCE2', 2727,
+    '\uFCE3', 2620,
+    '\uFCE4', 2728,
+    '\uFCE5', 2624,
+    '\uFCE6', 2734,
+    '\uFCE7', 2637,
+    '\uFCE8', 2735,
+    '\uFCE9', 2736,
+    '\uFCEA', 2737,
+    '\uFCEB', 2665,
+    '\uFCEC', 2666,
+    '\uFCED', 2672,
+    '\uFCEE', 2684,
+    '\uFCEF', 2731,
+    '\uFCF0', 2694,
+    '\uFCF1', 2733,
+    '\uFCF2', 2738,
+    '\uFCF3', 2739,
+    '\uFCF4', 2740,
+    '\uFCF5', 2741,
+    '\uFCF6', 2742,
+    '\uFCF7', 2743,
+    '\uFCF8', 2744,
+    '\uFCF9', 2745,
+    '\uFCFA', 2746,
+    '\uFCFB', 2747,
+    '\uFCFC', 2748,
+    '\uFCFD', 2749,
+    '\uFCFE', 2750,
+    '\uFCFF', 2751,
+    '\uFD00', 2752,
+    '\uFD01', 2753,
+    '\uFD02', 2754,
+    '\uFD03', 2755,
+    '\uFD04', 2756,
+    '\uFD05', 2757,
+    '\uFD06', 2758,
+    '\uFD07', 2759,
+    '\uFD08', 2760,
+    '\uFD09', 2761,
+    '\uFD0A', 2762,
+    '\uFD0B', 2763,
+    '\uFD0C', 2736,
+    '\uFD0D', 2764,
+    '\uFD0E', 2765,
+    '\uFD0F', 2766,
+    '\uFD10', 2767,
+    '\uFD11', 2741,
+    '\uFD12', 2742,
+    '\uFD13', 2743,
+    '\uFD14', 2744,
+    '\uFD15', 2745,
+    '\uFD16', 2746,
+    '\uFD17', 2747,
+    '\uFD18', 2748,
+    '\uFD19', 2749,
+    '\uFD1A', 2750,
+    '\uFD1B', 2751,
+    '\uFD1C', 2752,
+    '\uFD1D', 2753,
+    '\uFD1E', 2754,
+    '\uFD1F', 2755,
+    '\uFD20', 2756,
+    '\uFD21', 2757,
+    '\uFD22', 2758,
+    '\uFD23', 2759,
+    '\uFD24', 2760,
+    '\uFD25', 2761,
+    '\uFD26', 2762,
+    '\uFD27', 2763,
+    '\uFD28', 2736,
+    '\uFD29', 2764,
+    '\uFD2A', 2765,
+    '\uFD2B', 2766,
+    '\uFD2C', 2767,
+    '\uFD2D', 2761,
+    '\uFD2E', 2762,
+    '\uFD2F', 2763,
+    '\uFD30', 2736,
+    '\uFD31', 2735,
+    '\uFD32', 2737,
+    '\uFD33', 2645,
+    '\uFD34', 2634,
+    '\uFD35', 2635,
+    '\uFD36', 2636,
+    '\uFD37', 2761,
+    '\uFD38', 2762,
+    '\uFD39', 2763,
+    '\uFD3A', 2645,
+    '\uFD3B', 2646,
+    '\uFD3C', 2768,
+    '\uFD3D', 2768,
+    '\uFD50', 2769,
+    '\uFD51', 2770,
+    '\uFD52', 2770,
+    '\uFD53', 2771,
+    '\uFD54', 2772,
+    '\uFD55', 2773,
+    '\uFD56', 2774,
+    '\uFD57', 2775,
+    '\uFD58', 2776,
+    '\uFD59', 2776,
+    '\uFD5A', 2777,
+    '\uFD5B', 2778,
+    '\uFD5C', 2779,
+    '\uFD5D', 2780,
+    '\uFD5E', 2781,
+    '\uFD5F', 2782,
+    '\uFD60', 2782,
+    '\uFD61', 2783,
+    '\uFD62', 2784,
+    '\uFD63', 2784,
+    '\uFD64', 2785,
+    '\uFD65', 2785,
+    '\uFD66', 2786,
+    '\uFD67', 2787,
+    '\uFD68', 2787,
+    '\uFD69', 2788,
+    '\uFD6A', 2789,
+    '\uFD6B', 2789,
+    '\uFD6C', 2790,
+    '\uFD6D', 2790,
+    '\uFD6E', 2791,
+    '\uFD6F', 2792,
+    '\uFD70', 2792,
+    '\uFD71', 2793,
+    '\uFD72', 2793,
+    '\uFD73', 2794,
+    '\uFD74', 2795,
+    '\uFD75', 2796,
+    '\uFD76', 2797,
+    '\uFD77', 2797,
+    '\uFD78', 2798,
+    '\uFD79', 2799,
+    '\uFD7A', 2800,
+    '\uFD7B', 2801,
+    '\uFD7C', 2802,
+    '\uFD7D', 2802,
+    '\uFD7E', 2803,
+    '\uFD7F', 2804,
+    '\uFD80', 2805,
+    '\uFD81', 2806,
+    '\uFD82', 2807,
+    '\uFD83', 2808,
+    '\uFD84', 2808,
+    '\uFD85', 2809,
+    '\uFD86', 2809,
+    '\uFD87', 2810,
+    '\uFD88', 2810,
+    '\uFD89', 2811,
+    '\uFD8A', 2812,
+    '\uFD8B', 2813,
+    '\uFD8C', 2814,
+    '\uFD8D', 2815,
+    '\uFD8E', 2816,
+    '\uFD8F', 2817,
+    '\uFD92', 2818,
+    '\uFD93', 2819,
+    '\uFD94', 2820,
+    '\uFD95', 2821,
+    '\uFD96', 2822,
+    '\uFD97', 2823,
+    '\uFD98', 2823,
+    '\uFD99', 2824,
+    '\uFD9A', 2825,
+    '\uFD9B', 2826,
+    '\uFD9C', 2827,
+    '\uFD9D', 2827,
+    '\uFD9E', 2828,
+    '\uFD9F', 2829,
+    '\uFDA0', 2830,
+    '\uFDA1', 2831,
+    '\uFDA2', 2832,
+    '\uFDA3', 2833,
+    '\uFDA4', 2834,
+    '\uFDA5', 2835,
+    '\uFDA6', 2836,
+    '\uFDA7', 2837,
+    '\uFDA8', 2838,
+    '\uFDA9', 2839,
+    '\uFDAA', 2840,
+    '\uFDAB', 2841,
+    '\uFDAC', 2842,
+    '\uFDAD', 2843,
+    '\uFDAE', 2844,
+    '\uFDAF', 2845,
+    '\uFDB0', 2846,
+    '\uFDB1', 2847,
+    '\uFDB2', 2848,
+    '\uFDB3', 2849,
+    '\uFDB4', 2803,
+    '\uFDB5', 2805,
+    '\uFDB6', 2850,
+    '\uFDB7', 2851,
+    '\uFDB8', 2852,
+    '\uFDB9', 2853,
+    '\uFDBA', 2854,
+    '\uFDBB', 2855,
+    '\uFDBC', 2854,
+    '\uFDBD', 2852,
+    '\uFDBE', 2856,
+    '\uFDBF', 2857,
+    '\uFDC0', 2858,
+    '\uFDC1', 2859,
+    '\uFDC2', 2860,
+    '\uFDC3', 2855,
+    '\uFDC4', 2796,
+    '\uFDC5', 2786,
+    '\uFDC6', 2861,
+    '\uFDC7', 2862,
+    '\uFDF0', 2863,
+    '\uFDF1', 2864,
+    '\uFDF2', 2865,
+    '\uFDF3', 2866,
+    '\uFDF4', 2867,
+    '\uFDF5', 2868,
+    '\uFDF6', 2869,
+    '\uFDF7', 2870,
+    '\uFDF8', 2871,
+    '\uFDF9', 2872,
+    '\uFDFA', 2873,
+    '\uFDFB', 2874,
+    '\uFDFC', 2875,
+    '\uFE10', 2876,
+    '\uFE11', 2877,
+    '\uFE12', 2878,
+    '\uFE13', 2879,
+    '\uFE14', 309,
+    '\uFE15', 2880,
+    '\uFE16', 2881,
+    '\uFE17', 2882,
+    '\uFE18', 2883,
+    '\uFE19', 1036,
+    '\uFE30', 1035,
+    '\uFE31', 2884,
+    '\uFE32', 2885,
+    '\uFE33', 2886,
+    '\uFE34', 2886,
+    '\uFE35', 1057,
+    '\uFE36', 1058,
+    '\uFE37', 2887,
+    '\uFE38', 2888,
+    '\uFE39', 2889,
+    '\uFE3A', 2890,
+    '\uFE3B', 2891,
+    '\uFE3C', 2892,
+    '\uFE3D', 2893,
+    '\uFE3E', 2894,
+    '\uFE3F', 1167,
+    '\uFE40', 1168,
+    '\uFE41', 2895,
+    '\uFE42', 2896,
+    '\uFE43', 2897,
+    '\uFE44', 2898,
+    '\uFE47', 2899,
+    '\uFE48', 2900,
+    '\uFE49', 1042,
+    '\uFE4A', 1042,
+    '\uFE4B', 1042,
+    '\uFE4C', 1042,
+    '\uFE4D', 2886,
+    '\uFE4E', 2886,
+    '\uFE4F', 2886,
+    '\uFE50', 2876,
+    '\uFE51', 2877,
+    '\uFE52', 1034,
+    '\uFE54', 309,
+    '\uFE55', 2879,
+    '\uFE56', 2881,
+    '\uFE57', 2880,
+    '\uFE58', 2884,
+    '\uFE59', 1057,
+    '\uFE5A', 1058,
+    '\uFE5B', 2887,
+    '\uFE5C', 2888,
+    '\uFE5D', 2889,
+    '\uFE5E', 2890,
+    '\uFE5F', 2901,
+    '\uFE60', 2902,
+    '\uFE61', 2903,
+    '\uFE62', 1054,
+    '\uFE63', 2904,
+    '\uFE64', 2905,
+    '\uFE65', 2906,
+    '\uFE66', 1056,
+    '\uFE68', 2907,
+    '\uFE69', 2908,
+    '\uFE6A', 2909,
+    '\uFE6B', 2910,
+    '\uFE70', 2911,
+    '\uFE71', 2912,
+    '\uFE72', 2913,
+    '\uFE74', 2914,
+    '\uFE76', 2915,
+    '\uFE77', 2916,
+    '\uFE78', 2917,
+    '\uFE79', 2918,
+    '\uFE7A', 2919,
+    '\uFE7B', 2920,
+    '\uFE7C', 2921,
+    '\uFE7D', 2922,
+    '\uFE7E', 2923,
+    '\uFE7F', 2924,
+    '\uFE80', 2925,
+    '\uFE81', 396,
+    '\uFE82', 396,
+    '\uFE83', 397,
+    '\uFE84', 397,
+    '\uFE85', 398,
+    '\uFE86', 398,
+    '\uFE87', 399,
+    '\uFE88', 399,
+    '\uFE89', 400,
+    '\uFE8A', 400,
+    '\uFE8B', 400,
+    '\uFE8C', 400,
+    '\uFE8D', 2926,
+    '\uFE8E', 2926,
+    '\uFE8F', 2927,
+    '\uFE90', 2927,
+    '\uFE91', 2927,
+    '\uFE92', 2927,
+    '\uFE93', 2928,
+    '\uFE94', 2928,
+    '\uFE95', 2929,
+    '\uFE96', 2929,
+    '\uFE97', 2929,
+    '\uFE98', 2929,
+    '\uFE99', 2930,
+    '\uFE9A', 2930,
+    '\uFE9B', 2930,
+    '\uFE9C', 2930,
+    '\uFE9D', 2931,
+    '\uFE9E', 2931,
+    '\uFE9F', 2931,
+    '\uFEA0', 2931,
+    '\uFEA1', 2932,
+    '\uFEA2', 2932,
+    '\uFEA3', 2932,
+    '\uFEA4', 2932,
+    '\uFEA5', 2933,
+    '\uFEA6', 2933,
+    '\uFEA7', 2933,
+    '\uFEA8', 2933,
+    '\uFEA9', 2934,
+    '\uFEAA', 2934,
+    '\uFEAB', 2935,
+    '\uFEAC', 2935,
+    '\uFEAD', 2936,
+    '\uFEAE', 2936,
+    '\uFEAF', 2937,
+    '\uFEB0', 2937,
+    '\uFEB1', 2938,
+    '\uFEB2', 2938,
+    '\uFEB3', 2938,
+    '\uFEB4', 2938,
+    '\uFEB5', 2939,
+    '\uFEB6', 2939,
+    '\uFEB7', 2939,
+    '\uFEB8', 2939,
+    '\uFEB9', 2940,
+    '\uFEBA', 2940,
+    '\uFEBB', 2940,
+    '\uFEBC', 2940,
+    '\uFEBD', 2941,
+    '\uFEBE', 2941,
+    '\uFEBF', 2941,
+    '\uFEC0', 2941,
+    '\uFEC1', 2942,
+    '\uFEC2', 2942,
+    '\uFEC3', 2942,
+    '\uFEC4', 2942,
+    '\uFEC5', 2943,
+    '\uFEC6', 2943,
+    '\uFEC7', 2943,
+    '\uFEC8', 2943,
+    '\uFEC9', 2944,
+    '\uFECA', 2944,
+    '\uFECB', 2944,
+    '\uFECC', 2944,
+    '\uFECD', 2945,
+    '\uFECE', 2945,
+    '\uFECF', 2945,
+    '\uFED0', 2945,
+    '\uFED1', 2946,
+    '\uFED2', 2946,
+    '\uFED3', 2946,
+    '\uFED4', 2946,
+    '\uFED5', 2947,
+    '\uFED6', 2947,
+    '\uFED7', 2947,
+    '\uFED8', 2947,
+    '\uFED9', 2948,
+    '\uFEDA', 2948,
+    '\uFEDB', 2948,
+    '\uFEDC', 2948,
+    '\uFEDD', 2949,
+    '\uFEDE', 2949,
+    '\uFEDF', 2949,
+    '\uFEE0', 2949,
+    '\uFEE1', 2950,
+    '\uFEE2', 2950,
+    '\uFEE3', 2950,
+    '\uFEE4', 2950,
+    '\uFEE5', 2951,
+    '\uFEE6', 2951,
+    '\uFEE7', 2951,
+    '\uFEE8', 2951,
+    '\uFEE9', 2952,
+    '\uFEEA', 2952,
+    '\uFEEB', 2952,
+    '\uFEEC', 2952,
+    '\uFEED', 2953,
+    '\uFEEE', 2953,
+    '\uFEEF', 2597,
+    '\uFEF0', 2597,
+    '\uFEF1', 2954,
+    '\uFEF2', 2954,
+    '\uFEF3', 2954,
+    '\uFEF4', 2954,
+    '\uFEF5', 2955,
+    '\uFEF6', 2955,
+    '\uFEF7', 2956,
+    '\uFEF8', 2956,
+    '\uFEF9', 2957,
+    '\uFEFA', 2957,
+    '\uFEFB', 2958,
+    '\uFEFC', 2958,
+    '\uFF01', 2880,
+    '\uFF02', 2959,
+    '\uFF03', 2901,
+    '\uFF04', 2908,
+    '\uFF05', 2909,
+    '\uFF06', 2902,
+    '\uFF07', 2960,
+    '\uFF08', 1057,
+    '\uFF09', 1058,
+    '\uFF0A', 2903,
+    '\uFF0B', 1054,
+    '\uFF0C', 2876,
+    '\uFF0D', 2904,
+    '\uFF0E', 1034,
+    '\uFF0F', 2961,
+    '\uFF10', 1047,
+    '\uFF11', 9,
+    '\uFF12', 4,
+    '\uFF13', 5,
+    '\uFF14', 1048,
+    '\uFF15', 1049,
+    '\uFF16', 1050,
+    '\uFF17', 1051,
+    '\uFF18', 1052,
+    '\uFF19', 1053,
+    '\uFF1A', 2879,
+    '\uFF1B', 309,
+    '\uFF1C', 2905,
+    '\uFF1D', 1056,
+    '\uFF1E', 2906,
+    '\uFF1F', 2881,
+    '\uFF20', 2910,
+    '\uFF21', 489,
+    '\uFF22', 491,
+    '\uFF23', 1063,
+    '\uFF24', 492,
+    '\uFF25', 493,
+    '\uFF26', 1077,
+    '\uFF27', 495,
+    '\uFF28', 496,
+    '\uFF29', 497,
+    '\uFF2A', 498,
+    '\uFF2B', 499,
+    '\uFF2C', 500,
+    '\uFF2D', 501,
+    '\uFF2E', 502,
+    '\uFF2F', 503,
+    '\uFF30', 505,
+    '\uFF31', 1071,
+    '\uFF32', 506,
+    '\uFF33', 1246,
+    '\uFF34', 507,
+    '\uFF35', 508,
+    '\uFF36', 1102,
+    '\uFF37', 509,
+    '\uFF38', 1107,
+    '\uFF39', 1247,
+    '\uFF3A', 1075,
+    '\uFF3B', 2899,
+    '\uFF3C', 2907,
+    '\uFF3D', 2900,
+    '\uFF3E', 2962,
+    '\uFF3F', 2886,
+    '\uFF40', 1022,
+    '\uFF41', 2,
+    '\uFF42', 513,
+    '\uFF43', 539,
+    '\uFF44', 514,
+    '\uFF45', 515,
+    '\uFF46', 542,
+    '\uFF47', 519,
+    '\uFF48', 284,
+    '\uFF49', 536,
+    '\uFF4A', 286,
+    '\uFF4B', 520,
+    '\uFF4C', 300,
+    '\uFF4D', 521,
+    '\uFF4E', 1059,
+    '\uFF4F', 10,
+    '\uFF50', 526,
+    '\uFF51', 1248,
+    '\uFF52', 287,
+    '\uFF53', 180,
+    '\uFF54', 527,
+    '\uFF55', 528,
+    '\uFF56', 531,
+    '\uFF57', 291,
+    '\uFF58', 301,
+    '\uFF59', 292,
+    '\uFF5A', 569,
+    '\uFF5B', 2887,
+    '\uFF5C', 2963,
+    '\uFF5D', 2888,
+    '\uFF5E', 2964,
+    '\uFF5F', 2965,
+    '\uFF60', 2966,
+    '\uFF61', 2878,
+    '\uFF62', 2895,
+    '\uFF63', 2896,
+    '\uFF64', 2877,
+    '\uFF65', 2967,
+    '\uFF66', 1849,
+    '\uFF67', 2968,
+    '\uFF68', 2969,
+    '\uFF69', 2970,
+    '\uFF6A', 2971,
+    '\uFF6B', 2972,
+    '\uFF6C', 2973,
+    '\uFF6D', 2974,
+    '\uFF6E', 2975,
+    '\uFF6F', 2976,
+    '\uFF70', 2977,
+    '\uFF71', 1803,
+    '\uFF72', 1804,
+    '\uFF73', 1805,
+    '\uFF74', 1806,
+    '\uFF75', 1807,
+    '\uFF76', 1808,
+    '\uFF77', 1809,
+    '\uFF78', 1810,
+    '\uFF79', 1811,
+    '\uFF7A', 1812,
+    '\uFF7B', 1813,
+    '\uFF7C', 1814,
+    '\uFF7D', 1815,
+    '\uFF7E', 1816,
+    '\uFF7F', 1817,
+    '\uFF80', 1818,
+    '\uFF81', 1819,
+    '\uFF82', 1820,
+    '\uFF83', 1821,
+    '\uFF84', 1822,
+    '\uFF85', 1823,
+    '\uFF86', 1824,
+    '\uFF87', 1825,
+    '\uFF88', 1826,
+    '\uFF89', 1827,
+    '\uFF8A', 1828,
+    '\uFF8B', 1829,
+    '\uFF8C', 1830,
+    '\uFF8D', 1831,
+    '\uFF8E', 1832,
+    '\uFF8F', 1833,
+    '\uFF90', 1834,
+    '\uFF91', 1835,
+    '\uFF92', 1836,
+    '\uFF93', 1837,
+    '\uFF94', 1838,
+    '\uFF95', 1839,
+    '\uFF96', 1840,
+    '\uFF97', 1841,
+    '\uFF98', 1842,
+    '\uFF99', 1843,
+    '\uFF9A', 1844,
+    '\uFF9B', 1845,
+    '\uFF9C', 1846,
+    '\uFF9D', 2978,
+    '\uFF9E', 2979,
+    '\uFF9F', 2980,
+    '\uFFA0', 1587,
+    '\uFFA1', 1536,
+    '\uFFA2', 1537,
+    '\uFFA3', 1538,
+    '\uFFA4', 1539,
+    '\uFFA5', 1540,
+    '\uFFA6', 1541,
+    '\uFFA7', 1542,
+    '\uFFA8', 1543,
+    '\uFFA9', 1544,
+    '\uFFAA', 1545,
+    '\uFFAB', 1546,
+    '\uFFAC', 1547,
+    '\uFFAD', 1548,
+    '\uFFAE', 1549,
+    '\uFFAF', 1550,
+    '\uFFB0', 1551,
+    '\uFFB1', 1552,
+    '\uFFB2', 1553,
+    '\uFFB3', 1554,
+    '\uFFB4', 1555,
+    '\uFFB5', 1556,
+    '\uFFB6', 1557,
+    '\uFFB7', 1558,
+    '\uFFB8', 1559,
+    '\uFFB9', 1560,
+    '\uFFBA', 1561,
+    '\uFFBB', 1562,
+    '\uFFBC', 1563,
+    '\uFFBD', 1564,
+    '\uFFBE', 1565,
+    '\uFFC2', 1566,
+    '\uFFC3', 1567,
+    '\uFFC4', 1568,
+    '\uFFC5', 1569,
+    '\uFFC6', 1570,
+    '\uFFC7', 1571,
+    '\uFFCA', 1572,
+    '\uFFCB', 1573,
+    '\uFFCC', 1574,
+    '\uFFCD', 1575,
+    '\uFFCE', 1576,
+    '\uFFCF', 1577,
+    '\uFFD2', 1578,
+    '\uFFD3', 1579,
+    '\uFFD4', 1580,
+    '\uFFD5', 1581,
+    '\uFFD6', 1582,
+    '\uFFD7', 1583,
+    '\uFFDA', 1584,
+    '\uFFDB', 1585,
+    '\uFFDC', 1586,
+    '\uFFE0', 2981,
+    '\uFFE1', 2982,
+    '\uFFE2', 2983,
+    '\uFFE3', 3,
+    '\uFFE4', 2984,
+    '\uFFE5', 2985,
+    '\uFFE6', 2986,
+    '\uFFE8', 2987,
+    '\uFFE9', 2988,
+    '\uFFEA', 2989,
+    '\uFFEB', 2990,
+    '\uFFEC', 2991,
+    '\uFFED', 2992,
+    '\uFFEE', 2993,
+  };
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/DecompositionMappings.cs b/lib/agsxmpp/agsxmpp/Idn/DecompositionMappings.cs
new file mode 100644
index 0000000..3136938
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/DecompositionMappings.cs
@@ -0,0 +1,3004 @@
+// Do not edit !!!
+// this file is generated automatically
+namespace agsXMPP.Idn
+{
+    public class DecompositionMappings
+    {
+        public static readonly string[] m = new string[] {
+    "\u0020",
+    "\u0020\u0308",
+    "\u0061",
+    "\u0020\u0304",
+    "\u0032",
+    "\u0033",
+    "\u0020\u0301",
+    "\u03BC",
+    "\u0020\u0327",
+    "\u0031",
+    "\u006F",
+    "\u0031\u2044\u0034",
+    "\u0031\u2044\u0032",
+    "\u0033\u2044\u0034",
+    "\u0041\u0300",
+    "\u0041\u0301",
+    "\u0041\u0302",
+    "\u0041\u0303",
+    "\u0041\u0308",
+    "\u0041\u030A",
+    "\u0043\u0327",
+    "\u0045\u0300",
+    "\u0045\u0301",
+    "\u0045\u0302",
+    "\u0045\u0308",
+    "\u0049\u0300",
+    "\u0049\u0301",
+    "\u0049\u0302",
+    "\u0049\u0308",
+    "\u004E\u0303",
+    "\u004F\u0300",
+    "\u004F\u0301",
+    "\u004F\u0302",
+    "\u004F\u0303",
+    "\u004F\u0308",
+    "\u0055\u0300",
+    "\u0055\u0301",
+    "\u0055\u0302",
+    "\u0055\u0308",
+    "\u0059\u0301",
+    "\u0061\u0300",
+    "\u0061\u0301",
+    "\u0061\u0302",
+    "\u0061\u0303",
+    "\u0061\u0308",
+    "\u0061\u030A",
+    "\u0063\u0327",
+    "\u0065\u0300",
+    "\u0065\u0301",
+    "\u0065\u0302",
+    "\u0065\u0308",
+    "\u0069\u0300",
+    "\u0069\u0301",
+    "\u0069\u0302",
+    "\u0069\u0308",
+    "\u006E\u0303",
+    "\u006F\u0300",
+    "\u006F\u0301",
+    "\u006F\u0302",
+    "\u006F\u0303",
+    "\u006F\u0308",
+    "\u0075\u0300",
+    "\u0075\u0301",
+    "\u0075\u0302",
+    "\u0075\u0308",
+    "\u0079\u0301",
+    "\u0079\u0308",
+    "\u0041\u0304",
+    "\u0061\u0304",
+    "\u0041\u0306",
+    "\u0061\u0306",
+    "\u0041\u0328",
+    "\u0061\u0328",
+    "\u0043\u0301",
+    "\u0063\u0301",
+    "\u0043\u0302",
+    "\u0063\u0302",
+    "\u0043\u0307",
+    "\u0063\u0307",
+    "\u0043\u030C",
+    "\u0063\u030C",
+    "\u0044\u030C",
+    "\u0064\u030C",
+    "\u0045\u0304",
+    "\u0065\u0304",
+    "\u0045\u0306",
+    "\u0065\u0306",
+    "\u0045\u0307",
+    "\u0065\u0307",
+    "\u0045\u0328",
+    "\u0065\u0328",
+    "\u0045\u030C",
+    "\u0065\u030C",
+    "\u0047\u0302",
+    "\u0067\u0302",
+    "\u0047\u0306",
+    "\u0067\u0306",
+    "\u0047\u0307",
+    "\u0067\u0307",
+    "\u0047\u0327",
+    "\u0067\u0327",
+    "\u0048\u0302",
+    "\u0068\u0302",
+    "\u0049\u0303",
+    "\u0069\u0303",
+    "\u0049\u0304",
+    "\u0069\u0304",
+    "\u0049\u0306",
+    "\u0069\u0306",
+    "\u0049\u0328",
+    "\u0069\u0328",
+    "\u0049\u0307",
+    "\u0049\u004A",
+    "\u0069\u006A",
+    "\u004A\u0302",
+    "\u006A\u0302",
+    "\u004B\u0327",
+    "\u006B\u0327",
+    "\u004C\u0301",
+    "\u006C\u0301",
+    "\u004C\u0327",
+    "\u006C\u0327",
+    "\u004C\u030C",
+    "\u006C\u030C",
+    "\u004C\u00B7",
+    "\u006C\u00B7",
+    "\u004E\u0301",
+    "\u006E\u0301",
+    "\u004E\u0327",
+    "\u006E\u0327",
+    "\u004E\u030C",
+    "\u006E\u030C",
+    "\u02BC\u006E",
+    "\u004F\u0304",
+    "\u006F\u0304",
+    "\u004F\u0306",
+    "\u006F\u0306",
+    "\u004F\u030B",
+    "\u006F\u030B",
+    "\u0052\u0301",
+    "\u0072\u0301",
+    "\u0052\u0327",
+    "\u0072\u0327",
+    "\u0052\u030C",
+    "\u0072\u030C",
+    "\u0053\u0301",
+    "\u0073\u0301",
+    "\u0053\u0302",
+    "\u0073\u0302",
+    "\u0053\u0327",
+    "\u0073\u0327",
+    "\u0053\u030C",
+    "\u0073\u030C",
+    "\u0054\u0327",
+    "\u0074\u0327",
+    "\u0054\u030C",
+    "\u0074\u030C",
+    "\u0055\u0303",
+    "\u0075\u0303",
+    "\u0055\u0304",
+    "\u0075\u0304",
+    "\u0055\u0306",
+    "\u0075\u0306",
+    "\u0055\u030A",
+    "\u0075\u030A",
+    "\u0055\u030B",
+    "\u0075\u030B",
+    "\u0055\u0328",
+    "\u0075\u0328",
+    "\u0057\u0302",
+    "\u0077\u0302",
+    "\u0059\u0302",
+    "\u0079\u0302",
+    "\u0059\u0308",
+    "\u005A\u0301",
+    "\u007A\u0301",
+    "\u005A\u0307",
+    "\u007A\u0307",
+    "\u005A\u030C",
+    "\u007A\u030C",
+    "\u0073",
+    "\u004F\u031B",
+    "\u006F\u031B",
+    "\u0055\u031B",
+    "\u0075\u031B",
+    "\u0044\u005A\u030C",
+    "\u0044\u007A\u030C",
+    "\u0064\u007A\u030C",
+    "\u004C\u004A",
+    "\u004C\u006A",
+    "\u006C\u006A",
+    "\u004E\u004A",
+    "\u004E\u006A",
+    "\u006E\u006A",
+    "\u0041\u030C",
+    "\u0061\u030C",
+    "\u0049\u030C",
+    "\u0069\u030C",
+    "\u004F\u030C",
+    "\u006F\u030C",
+    "\u0055\u030C",
+    "\u0075\u030C",
+    "\u0055\u0308\u0304",
+    "\u0075\u0308\u0304",
+    "\u0055\u0308\u0301",
+    "\u0075\u0308\u0301",
+    "\u0055\u0308\u030C",
+    "\u0075\u0308\u030C",
+    "\u0055\u0308\u0300",
+    "\u0075\u0308\u0300",
+    "\u0041\u0308\u0304",
+    "\u0061\u0308\u0304",
+    "\u0041\u0307\u0304",
+    "\u0061\u0307\u0304",
+    "\u00C6\u0304",
+    "\u00E6\u0304",
+    "\u0047\u030C",
+    "\u0067\u030C",
+    "\u004B\u030C",
+    "\u006B\u030C",
+    "\u004F\u0328",
+    "\u006F\u0328",
+    "\u004F\u0328\u0304",
+    "\u006F\u0328\u0304",
+    "\u01B7\u030C",
+    "\u0292\u030C",
+    "\u006A\u030C",
+    "\u0044\u005A",
+    "\u0044\u007A",
+    "\u0064\u007A",
+    "\u0047\u0301",
+    "\u0067\u0301",
+    "\u004E\u0300",
+    "\u006E\u0300",
+    "\u0041\u030A\u0301",
+    "\u0061\u030A\u0301",
+    "\u00C6\u0301",
+    "\u00E6\u0301",
+    "\u00D8\u0301",
+    "\u00F8\u0301",
+    "\u0041\u030F",
+    "\u0061\u030F",
+    "\u0041\u0311",
+    "\u0061\u0311",
+    "\u0045\u030F",
+    "\u0065\u030F",
+    "\u0045\u0311",
+    "\u0065\u0311",
+    "\u0049\u030F",
+    "\u0069\u030F",
+    "\u0049\u0311",
+    "\u0069\u0311",
+    "\u004F\u030F",
+    "\u006F\u030F",
+    "\u004F\u0311",
+    "\u006F\u0311",
+    "\u0052\u030F",
+    "\u0072\u030F",
+    "\u0052\u0311",
+    "\u0072\u0311",
+    "\u0055\u030F",
+    "\u0075\u030F",
+    "\u0055\u0311",
+    "\u0075\u0311",
+    "\u0053\u0326",
+    "\u0073\u0326",
+    "\u0054\u0326",
+    "\u0074\u0326",
+    "\u0048\u030C",
+    "\u0068\u030C",
+    "\u0041\u0307",
+    "\u0061\u0307",
+    "\u0045\u0327",
+    "\u0065\u0327",
+    "\u004F\u0308\u0304",
+    "\u006F\u0308\u0304",
+    "\u004F\u0303\u0304",
+    "\u006F\u0303\u0304",
+    "\u004F\u0307",
+    "\u006F\u0307",
+    "\u004F\u0307\u0304",
+    "\u006F\u0307\u0304",
+    "\u0059\u0304",
+    "\u0079\u0304",
+    "\u0068",
+    "\u0266",
+    "\u006A",
+    "\u0072",
+    "\u0279",
+    "\u027B",
+    "\u0281",
+    "\u0077",
+    "\u0079",
+    "\u0020\u0306",
+    "\u0020\u0307",
+    "\u0020\u030A",
+    "\u0020\u0328",
+    "\u0020\u0303",
+    "\u0020\u030B",
+    "\u0263",
+    "\u006C",
+    "\u0078",
+    "\u0295",
+    "\u0300",
+    "\u0301",
+    "\u0313",
+    "\u0308\u0301",
+    "\u02B9",
+    "\u0020\u0345",
+    "\u003B",
+    "\u0020\u0308\u0301",
+    "\u0391\u0301",
+    "\u00B7",
+    "\u0395\u0301",
+    "\u0397\u0301",
+    "\u0399\u0301",
+    "\u039F\u0301",
+    "\u03A5\u0301",
+    "\u03A9\u0301",
+    "\u03B9\u0308\u0301",
+    "\u0399\u0308",
+    "\u03A5\u0308",
+    "\u03B1\u0301",
+    "\u03B5\u0301",
+    "\u03B7\u0301",
+    "\u03B9\u0301",
+    "\u03C5\u0308\u0301",
+    "\u03B9\u0308",
+    "\u03C5\u0308",
+    "\u03BF\u0301",
+    "\u03C5\u0301",
+    "\u03C9\u0301",
+    "\u03B2",
+    "\u03B8",
+    "\u03A5",
+    "\u03C6",
+    "\u03C0",
+    "\u03BA",
+    "\u03C1",
+    "\u03C2",
+    "\u0398",
+    "\u03B5",
+    "\u03A3",
+    "\u0415\u0300",
+    "\u0415\u0308",
+    "\u0413\u0301",
+    "\u0406\u0308",
+    "\u041A\u0301",
+    "\u0418\u0300",
+    "\u0423\u0306",
+    "\u0418\u0306",
+    "\u0438\u0306",
+    "\u0435\u0300",
+    "\u0435\u0308",
+    "\u0433\u0301",
+    "\u0456\u0308",
+    "\u043A\u0301",
+    "\u0438\u0300",
+    "\u0443\u0306",
+    "\u0474\u030F",
+    "\u0475\u030F",
+    "\u0416\u0306",
+    "\u0436\u0306",
+    "\u0410\u0306",
+    "\u0430\u0306",
+    "\u0410\u0308",
+    "\u0430\u0308",
+    "\u0415\u0306",
+    "\u0435\u0306",
+    "\u04D8\u0308",
+    "\u04D9\u0308",
+    "\u0416\u0308",
+    "\u0436\u0308",
+    "\u0417\u0308",
+    "\u0437\u0308",
+    "\u0418\u0304",
+    "\u0438\u0304",
+    "\u0418\u0308",
+    "\u0438\u0308",
+    "\u041E\u0308",
+    "\u043E\u0308",
+    "\u04E8\u0308",
+    "\u04E9\u0308",
+    "\u042D\u0308",
+    "\u044D\u0308",
+    "\u0423\u0304",
+    "\u0443\u0304",
+    "\u0423\u0308",
+    "\u0443\u0308",
+    "\u0423\u030B",
+    "\u0443\u030B",
+    "\u0427\u0308",
+    "\u0447\u0308",
+    "\u042B\u0308",
+    "\u044B\u0308",
+    "\u0565\u0582",
+    "\u0627\u0653",
+    "\u0627\u0654",
+    "\u0648\u0654",
+    "\u0627\u0655",
+    "\u064A\u0654",
+    "\u0627\u0674",
+    "\u0648\u0674",
+    "\u06C7\u0674",
+    "\u064A\u0674",
+    "\u06D5\u0654",
+    "\u06C1\u0654",
+    "\u06D2\u0654",
+    "\u0928\u093C",
+    "\u0930\u093C",
+    "\u0933\u093C",
+    "\u0915\u093C",
+    "\u0916\u093C",
+    "\u0917\u093C",
+    "\u091C\u093C",
+    "\u0921\u093C",
+    "\u0922\u093C",
+    "\u092B\u093C",
+    "\u092F\u093C",
+    "\u09C7\u09BE",
+    "\u09C7\u09D7",
+    "\u09A1\u09BC",
+    "\u09A2\u09BC",
+    "\u09AF\u09BC",
+    "\u0A32\u0A3C",
+    "\u0A38\u0A3C",
+    "\u0A16\u0A3C",
+    "\u0A17\u0A3C",
+    "\u0A1C\u0A3C",
+    "\u0A2B\u0A3C",
+    "\u0B47\u0B56",
+    "\u0B47\u0B3E",
+    "\u0B47\u0B57",
+    "\u0B21\u0B3C",
+    "\u0B22\u0B3C",
+    "\u0B92\u0BD7",
+    "\u0BC6\u0BBE",
+    "\u0BC7\u0BBE",
+    "\u0BC6\u0BD7",
+    "\u0C46\u0C56",
+    "\u0CBF\u0CD5",
+    "\u0CC6\u0CD5",
+    "\u0CC6\u0CD6",
+    "\u0CC6\u0CC2",
+    "\u0CC6\u0CC2\u0CD5",
+    "\u0D46\u0D3E",
+    "\u0D47\u0D3E",
+    "\u0D46\u0D57",
+    "\u0DD9\u0DCA",
+    "\u0DD9\u0DCF",
+    "\u0DD9\u0DCF\u0DCA",
+    "\u0DD9\u0DDF",
+    "\u0E4D\u0E32",
+    "\u0ECD\u0EB2",
+    "\u0EAB\u0E99",
+    "\u0EAB\u0EA1",
+    "\u0F0B",
+    "\u0F42\u0FB7",
+    "\u0F4C\u0FB7",
+    "\u0F51\u0FB7",
+    "\u0F56\u0FB7",
+    "\u0F5B\u0FB7",
+    "\u0F40\u0FB5",
+    "\u0F71\u0F72",
+    "\u0F71\u0F74",
+    "\u0FB2\u0F80",
+    "\u0FB2\u0F71\u0F80",
+    "\u0FB3\u0F80",
+    "\u0FB3\u0F71\u0F80",
+    "\u0F71\u0F80",
+    "\u0F92\u0FB7",
+    "\u0F9C\u0FB7",
+    "\u0FA1\u0FB7",
+    "\u0FA6\u0FB7",
+    "\u0FAB\u0FB7",
+    "\u0F90\u0FB5",
+    "\u1025\u102E",
+    "\u10DC",
+    "\u1B05\u1B35",
+    "\u1B07\u1B35",
+    "\u1B09\u1B35",
+    "\u1B0B\u1B35",
+    "\u1B0D\u1B35",
+    "\u1B11\u1B35",
+    "\u1B3A\u1B35",
+    "\u1B3C\u1B35",
+    "\u1B3E\u1B35",
+    "\u1B3F\u1B35",
+    "\u1B42\u1B35",
+    "\u0041",
+    "\u00C6",
+    "\u0042",
+    "\u0044",
+    "\u0045",
+    "\u018E",
+    "\u0047",
+    "\u0048",
+    "\u0049",
+    "\u004A",
+    "\u004B",
+    "\u004C",
+    "\u004D",
+    "\u004E",
+    "\u004F",
+    "\u0222",
+    "\u0050",
+    "\u0052",
+    "\u0054",
+    "\u0055",
+    "\u0057",
+    "\u0250",
+    "\u0251",
+    "\u1D02",
+    "\u0062",
+    "\u0064",
+    "\u0065",
+    "\u0259",
+    "\u025B",
+    "\u025C",
+    "\u0067",
+    "\u006B",
+    "\u006D",
+    "\u014B",
+    "\u0254",
+    "\u1D16",
+    "\u1D17",
+    "\u0070",
+    "\u0074",
+    "\u0075",
+    "\u1D1D",
+    "\u026F",
+    "\u0076",
+    "\u1D25",
+    "\u03B3",
+    "\u03B4",
+    "\u03C7",
+    "\u0069",
+    "\u043D",
+    "\u0252",
+    "\u0063",
+    "\u0255",
+    "\u00F0",
+    "\u0066",
+    "\u025F",
+    "\u0261",
+    "\u0265",
+    "\u0268",
+    "\u0269",
+    "\u026A",
+    "\u1D7B",
+    "\u029D",
+    "\u026D",
+    "\u1D85",
+    "\u029F",
+    "\u0271",
+    "\u0270",
+    "\u0272",
+    "\u0273",
+    "\u0274",
+    "\u0275",
+    "\u0278",
+    "\u0282",
+    "\u0283",
+    "\u01AB",
+    "\u0289",
+    "\u028A",
+    "\u1D1C",
+    "\u028B",
+    "\u028C",
+    "\u007A",
+    "\u0290",
+    "\u0291",
+    "\u0292",
+    "\u0041\u0325",
+    "\u0061\u0325",
+    "\u0042\u0307",
+    "\u0062\u0307",
+    "\u0042\u0323",
+    "\u0062\u0323",
+    "\u0042\u0331",
+    "\u0062\u0331",
+    "\u0043\u0327\u0301",
+    "\u0063\u0327\u0301",
+    "\u0044\u0307",
+    "\u0064\u0307",
+    "\u0044\u0323",
+    "\u0064\u0323",
+    "\u0044\u0331",
+    "\u0064\u0331",
+    "\u0044\u0327",
+    "\u0064\u0327",
+    "\u0044\u032D",
+    "\u0064\u032D",
+    "\u0045\u0304\u0300",
+    "\u0065\u0304\u0300",
+    "\u0045\u0304\u0301",
+    "\u0065\u0304\u0301",
+    "\u0045\u032D",
+    "\u0065\u032D",
+    "\u0045\u0330",
+    "\u0065\u0330",
+    "\u0045\u0327\u0306",
+    "\u0065\u0327\u0306",
+    "\u0046\u0307",
+    "\u0066\u0307",
+    "\u0047\u0304",
+    "\u0067\u0304",
+    "\u0048\u0307",
+    "\u0068\u0307",
+    "\u0048\u0323",
+    "\u0068\u0323",
+    "\u0048\u0308",
+    "\u0068\u0308",
+    "\u0048\u0327",
+    "\u0068\u0327",
+    "\u0048\u032E",
+    "\u0068\u032E",
+    "\u0049\u0330",
+    "\u0069\u0330",
+    "\u0049\u0308\u0301",
+    "\u0069\u0308\u0301",
+    "\u004B\u0301",
+    "\u006B\u0301",
+    "\u004B\u0323",
+    "\u006B\u0323",
+    "\u004B\u0331",
+    "\u006B\u0331",
+    "\u004C\u0323",
+    "\u006C\u0323",
+    "\u004C\u0323\u0304",
+    "\u006C\u0323\u0304",
+    "\u004C\u0331",
+    "\u006C\u0331",
+    "\u004C\u032D",
+    "\u006C\u032D",
+    "\u004D\u0301",
+    "\u006D\u0301",
+    "\u004D\u0307",
+    "\u006D\u0307",
+    "\u004D\u0323",
+    "\u006D\u0323",
+    "\u004E\u0307",
+    "\u006E\u0307",
+    "\u004E\u0323",
+    "\u006E\u0323",
+    "\u004E\u0331",
+    "\u006E\u0331",
+    "\u004E\u032D",
+    "\u006E\u032D",
+    "\u004F\u0303\u0301",
+    "\u006F\u0303\u0301",
+    "\u004F\u0303\u0308",
+    "\u006F\u0303\u0308",
+    "\u004F\u0304\u0300",
+    "\u006F\u0304\u0300",
+    "\u004F\u0304\u0301",
+    "\u006F\u0304\u0301",
+    "\u0050\u0301",
+    "\u0070\u0301",
+    "\u0050\u0307",
+    "\u0070\u0307",
+    "\u0052\u0307",
+    "\u0072\u0307",
+    "\u0052\u0323",
+    "\u0072\u0323",
+    "\u0052\u0323\u0304",
+    "\u0072\u0323\u0304",
+    "\u0052\u0331",
+    "\u0072\u0331",
+    "\u0053\u0307",
+    "\u0073\u0307",
+    "\u0053\u0323",
+    "\u0073\u0323",
+    "\u0053\u0301\u0307",
+    "\u0073\u0301\u0307",
+    "\u0053\u030C\u0307",
+    "\u0073\u030C\u0307",
+    "\u0053\u0323\u0307",
+    "\u0073\u0323\u0307",
+    "\u0054\u0307",
+    "\u0074\u0307",
+    "\u0054\u0323",
+    "\u0074\u0323",
+    "\u0054\u0331",
+    "\u0074\u0331",
+    "\u0054\u032D",
+    "\u0074\u032D",
+    "\u0055\u0324",
+    "\u0075\u0324",
+    "\u0055\u0330",
+    "\u0075\u0330",
+    "\u0055\u032D",
+    "\u0075\u032D",
+    "\u0055\u0303\u0301",
+    "\u0075\u0303\u0301",
+    "\u0055\u0304\u0308",
+    "\u0075\u0304\u0308",
+    "\u0056\u0303",
+    "\u0076\u0303",
+    "\u0056\u0323",
+    "\u0076\u0323",
+    "\u0057\u0300",
+    "\u0077\u0300",
+    "\u0057\u0301",
+    "\u0077\u0301",
+    "\u0057\u0308",
+    "\u0077\u0308",
+    "\u0057\u0307",
+    "\u0077\u0307",
+    "\u0057\u0323",
+    "\u0077\u0323",
+    "\u0058\u0307",
+    "\u0078\u0307",
+    "\u0058\u0308",
+    "\u0078\u0308",
+    "\u0059\u0307",
+    "\u0079\u0307",
+    "\u005A\u0302",
+    "\u007A\u0302",
+    "\u005A\u0323",
+    "\u007A\u0323",
+    "\u005A\u0331",
+    "\u007A\u0331",
+    "\u0068\u0331",
+    "\u0074\u0308",
+    "\u0077\u030A",
+    "\u0079\u030A",
+    "\u0061\u02BE",
+    "\u0041\u0323",
+    "\u0061\u0323",
+    "\u0041\u0309",
+    "\u0061\u0309",
+    "\u0041\u0302\u0301",
+    "\u0061\u0302\u0301",
+    "\u0041\u0302\u0300",
+    "\u0061\u0302\u0300",
+    "\u0041\u0302\u0309",
+    "\u0061\u0302\u0309",
+    "\u0041\u0302\u0303",
+    "\u0061\u0302\u0303",
+    "\u0041\u0323\u0302",
+    "\u0061\u0323\u0302",
+    "\u0041\u0306\u0301",
+    "\u0061\u0306\u0301",
+    "\u0041\u0306\u0300",
+    "\u0061\u0306\u0300",
+    "\u0041\u0306\u0309",
+    "\u0061\u0306\u0309",
+    "\u0041\u0306\u0303",
+    "\u0061\u0306\u0303",
+    "\u0041\u0323\u0306",
+    "\u0061\u0323\u0306",
+    "\u0045\u0323",
+    "\u0065\u0323",
+    "\u0045\u0309",
+    "\u0065\u0309",
+    "\u0045\u0303",
+    "\u0065\u0303",
+    "\u0045\u0302\u0301",
+    "\u0065\u0302\u0301",
+    "\u0045\u0302\u0300",
+    "\u0065\u0302\u0300",
+    "\u0045\u0302\u0309",
+    "\u0065\u0302\u0309",
+    "\u0045\u0302\u0303",
+    "\u0065\u0302\u0303",
+    "\u0045\u0323\u0302",
+    "\u0065\u0323\u0302",
+    "\u0049\u0309",
+    "\u0069\u0309",
+    "\u0049\u0323",
+    "\u0069\u0323",
+    "\u004F\u0323",
+    "\u006F\u0323",
+    "\u004F\u0309",
+    "\u006F\u0309",
+    "\u004F\u0302\u0301",
+    "\u006F\u0302\u0301",
+    "\u004F\u0302\u0300",
+    "\u006F\u0302\u0300",
+    "\u004F\u0302\u0309",
+    "\u006F\u0302\u0309",
+    "\u004F\u0302\u0303",
+    "\u006F\u0302\u0303",
+    "\u004F\u0323\u0302",
+    "\u006F\u0323\u0302",
+    "\u004F\u031B\u0301",
+    "\u006F\u031B\u0301",
+    "\u004F\u031B\u0300",
+    "\u006F\u031B\u0300",
+    "\u004F\u031B\u0309",
+    "\u006F\u031B\u0309",
+    "\u004F\u031B\u0303",
+    "\u006F\u031B\u0303",
+    "\u004F\u031B\u0323",
+    "\u006F\u031B\u0323",
+    "\u0055\u0323",
+    "\u0075\u0323",
+    "\u0055\u0309",
+    "\u0075\u0309",
+    "\u0055\u031B\u0301",
+    "\u0075\u031B\u0301",
+    "\u0055\u031B\u0300",
+    "\u0075\u031B\u0300",
+    "\u0055\u031B\u0309",
+    "\u0075\u031B\u0309",
+    "\u0055\u031B\u0303",
+    "\u0075\u031B\u0303",
+    "\u0055\u031B\u0323",
+    "\u0075\u031B\u0323",
+    "\u0059\u0300",
+    "\u0079\u0300",
+    "\u0059\u0323",
+    "\u0079\u0323",
+    "\u0059\u0309",
+    "\u0079\u0309",
+    "\u0059\u0303",
+    "\u0079\u0303",
+    "\u03B1\u0313",
+    "\u03B1\u0314",
+    "\u03B1\u0313\u0300",
+    "\u03B1\u0314\u0300",
+    "\u03B1\u0313\u0301",
+    "\u03B1\u0314\u0301",
+    "\u03B1\u0313\u0342",
+    "\u03B1\u0314\u0342",
+    "\u0391\u0313",
+    "\u0391\u0314",
+    "\u0391\u0313\u0300",
+    "\u0391\u0314\u0300",
+    "\u0391\u0313\u0301",
+    "\u0391\u0314\u0301",
+    "\u0391\u0313\u0342",
+    "\u0391\u0314\u0342",
+    "\u03B5\u0313",
+    "\u03B5\u0314",
+    "\u03B5\u0313\u0300",
+    "\u03B5\u0314\u0300",
+    "\u03B5\u0313\u0301",
+    "\u03B5\u0314\u0301",
+    "\u0395\u0313",
+    "\u0395\u0314",
+    "\u0395\u0313\u0300",
+    "\u0395\u0314\u0300",
+    "\u0395\u0313\u0301",
+    "\u0395\u0314\u0301",
+    "\u03B7\u0313",
+    "\u03B7\u0314",
+    "\u03B7\u0313\u0300",
+    "\u03B7\u0314\u0300",
+    "\u03B7\u0313\u0301",
+    "\u03B7\u0314\u0301",
+    "\u03B7\u0313\u0342",
+    "\u03B7\u0314\u0342",
+    "\u0397\u0313",
+    "\u0397\u0314",
+    "\u0397\u0313\u0300",
+    "\u0397\u0314\u0300",
+    "\u0397\u0313\u0301",
+    "\u0397\u0314\u0301",
+    "\u0397\u0313\u0342",
+    "\u0397\u0314\u0342",
+    "\u03B9\u0313",
+    "\u03B9\u0314",
+    "\u03B9\u0313\u0300",
+    "\u03B9\u0314\u0300",
+    "\u03B9\u0313\u0301",
+    "\u03B9\u0314\u0301",
+    "\u03B9\u0313\u0342",
+    "\u03B9\u0314\u0342",
+    "\u0399\u0313",
+    "\u0399\u0314",
+    "\u0399\u0313\u0300",
+    "\u0399\u0314\u0300",
+    "\u0399\u0313\u0301",
+    "\u0399\u0314\u0301",
+    "\u0399\u0313\u0342",
+    "\u0399\u0314\u0342",
+    "\u03BF\u0313",
+    "\u03BF\u0314",
+    "\u03BF\u0313\u0300",
+    "\u03BF\u0314\u0300",
+    "\u03BF\u0313\u0301",
+    "\u03BF\u0314\u0301",
+    "\u039F\u0313",
+    "\u039F\u0314",
+    "\u039F\u0313\u0300",
+    "\u039F\u0314\u0300",
+    "\u039F\u0313\u0301",
+    "\u039F\u0314\u0301",
+    "\u03C5\u0313",
+    "\u03C5\u0314",
+    "\u03C5\u0313\u0300",
+    "\u03C5\u0314\u0300",
+    "\u03C5\u0313\u0301",
+    "\u03C5\u0314\u0301",
+    "\u03C5\u0313\u0342",
+    "\u03C5\u0314\u0342",
+    "\u03A5\u0314",
+    "\u03A5\u0314\u0300",
+    "\u03A5\u0314\u0301",
+    "\u03A5\u0314\u0342",
+    "\u03C9\u0313",
+    "\u03C9\u0314",
+    "\u03C9\u0313\u0300",
+    "\u03C9\u0314\u0300",
+    "\u03C9\u0313\u0301",
+    "\u03C9\u0314\u0301",
+    "\u03C9\u0313\u0342",
+    "\u03C9\u0314\u0342",
+    "\u03A9\u0313",
+    "\u03A9\u0314",
+    "\u03A9\u0313\u0300",
+    "\u03A9\u0314\u0300",
+    "\u03A9\u0313\u0301",
+    "\u03A9\u0314\u0301",
+    "\u03A9\u0313\u0342",
+    "\u03A9\u0314\u0342",
+    "\u03B1\u0300",
+    "\u03B5\u0300",
+    "\u03B7\u0300",
+    "\u03B9\u0300",
+    "\u03BF\u0300",
+    "\u03C5\u0300",
+    "\u03C9\u0300",
+    "\u03B1\u0313\u0345",
+    "\u03B1\u0314\u0345",
+    "\u03B1\u0313\u0300\u0345",
+    "\u03B1\u0314\u0300\u0345",
+    "\u03B1\u0313\u0301\u0345",
+    "\u03B1\u0314\u0301\u0345",
+    "\u03B1\u0313\u0342\u0345",
+    "\u03B1\u0314\u0342\u0345",
+    "\u0391\u0313\u0345",
+    "\u0391\u0314\u0345",
+    "\u0391\u0313\u0300\u0345",
+    "\u0391\u0314\u0300\u0345",
+    "\u0391\u0313\u0301\u0345",
+    "\u0391\u0314\u0301\u0345",
+    "\u0391\u0313\u0342\u0345",
+    "\u0391\u0314\u0342\u0345",
+    "\u03B7\u0313\u0345",
+    "\u03B7\u0314\u0345",
+    "\u03B7\u0313\u0300\u0345",
+    "\u03B7\u0314\u0300\u0345",
+    "\u03B7\u0313\u0301\u0345",
+    "\u03B7\u0314\u0301\u0345",
+    "\u03B7\u0313\u0342\u0345",
+    "\u03B7\u0314\u0342\u0345",
+    "\u0397\u0313\u0345",
+    "\u0397\u0314\u0345",
+    "\u0397\u0313\u0300\u0345",
+    "\u0397\u0314\u0300\u0345",
+    "\u0397\u0313\u0301\u0345",
+    "\u0397\u0314\u0301\u0345",
+    "\u0397\u0313\u0342\u0345",
+    "\u0397\u0314\u0342\u0345",
+    "\u03C9\u0313\u0345",
+    "\u03C9\u0314\u0345",
+    "\u03C9\u0313\u0300\u0345",
+    "\u03C9\u0314\u0300\u0345",
+    "\u03C9\u0313\u0301\u0345",
+    "\u03C9\u0314\u0301\u0345",
+    "\u03C9\u0313\u0342\u0345",
+    "\u03C9\u0314\u0342\u0345",
+    "\u03A9\u0313\u0345",
+    "\u03A9\u0314\u0345",
+    "\u03A9\u0313\u0300\u0345",
+    "\u03A9\u0314\u0300\u0345",
+    "\u03A9\u0313\u0301\u0345",
+    "\u03A9\u0314\u0301\u0345",
+    "\u03A9\u0313\u0342\u0345",
+    "\u03A9\u0314\u0342\u0345",
+    "\u03B1\u0306",
+    "\u03B1\u0304",
+    "\u03B1\u0300\u0345",
+    "\u03B1\u0345",
+    "\u03B1\u0301\u0345",
+    "\u03B1\u0342",
+    "\u03B1\u0342\u0345",
+    "\u0391\u0306",
+    "\u0391\u0304",
+    "\u0391\u0300",
+    "\u0391\u0345",
+    "\u0020\u0313",
+    "\u03B9",
+    "\u0020\u0342",
+    "\u0020\u0308\u0342",
+    "\u03B7\u0300\u0345",
+    "\u03B7\u0345",
+    "\u03B7\u0301\u0345",
+    "\u03B7\u0342",
+    "\u03B7\u0342\u0345",
+    "\u0395\u0300",
+    "\u0397\u0300",
+    "\u0397\u0345",
+    "\u0020\u0313\u0300",
+    "\u0020\u0313\u0301",
+    "\u0020\u0313\u0342",
+    "\u03B9\u0306",
+    "\u03B9\u0304",
+    "\u03B9\u0308\u0300",
+    "\u03B9\u0342",
+    "\u03B9\u0308\u0342",
+    "\u0399\u0306",
+    "\u0399\u0304",
+    "\u0399\u0300",
+    "\u0020\u0314\u0300",
+    "\u0020\u0314\u0301",
+    "\u0020\u0314\u0342",
+    "\u03C5\u0306",
+    "\u03C5\u0304",
+    "\u03C5\u0308\u0300",
+    "\u03C1\u0313",
+    "\u03C1\u0314",
+    "\u03C5\u0342",
+    "\u03C5\u0308\u0342",
+    "\u03A5\u0306",
+    "\u03A5\u0304",
+    "\u03A5\u0300",
+    "\u03A1\u0314",
+    "\u0020\u0308\u0300",
+    "\u0060",
+    "\u03C9\u0300\u0345",
+    "\u03C9\u0345",
+    "\u03C9\u0301\u0345",
+    "\u03C9\u0342",
+    "\u03C9\u0342\u0345",
+    "\u039F\u0300",
+    "\u03A9\u0300",
+    "\u03A9\u0345",
+    "\u0020\u0314",
+    "\u2010",
+    "\u0020\u0333",
+    "\u002E",
+    "\u002E\u002E",
+    "\u002E\u002E\u002E",
+    "\u2032\u2032",
+    "\u2032\u2032\u2032",
+    "\u2035\u2035",
+    "\u2035\u2035\u2035",
+    "\u0021\u0021",
+    "\u0020\u0305",
+    "\u003F\u003F",
+    "\u003F\u0021",
+    "\u0021\u003F",
+    "\u2032\u2032\u2032\u2032",
+    "\u0030",
+    "\u0034",
+    "\u0035",
+    "\u0036",
+    "\u0037",
+    "\u0038",
+    "\u0039",
+    "\u002B",
+    "\u2212",
+    "\u003D",
+    "\u0028",
+    "\u0029",
+    "\u006E",
+    "\u0052\u0073",
+    "\u0061\u002F\u0063",
+    "\u0061\u002F\u0073",
+    "\u0043",
+    "\u00B0\u0043",
+    "\u0063\u002F\u006F",
+    "\u0063\u002F\u0075",
+    "\u0190",
+    "\u00B0\u0046",
+    "\u0127",
+    "\u004E\u006F",
+    "\u0051",
+    "\u0053\u004D",
+    "\u0054\u0045\u004C",
+    "\u0054\u004D",
+    "\u005A",
+    "\u03A9",
+    "\u0046",
+    "\u05D0",
+    "\u05D1",
+    "\u05D2",
+    "\u05D3",
+    "\u0046\u0041\u0058",
+    "\u0393",
+    "\u03A0",
+    "\u2211",
+    "\u0031\u2044\u0033",
+    "\u0032\u2044\u0033",
+    "\u0031\u2044\u0035",
+    "\u0032\u2044\u0035",
+    "\u0033\u2044\u0035",
+    "\u0034\u2044\u0035",
+    "\u0031\u2044\u0036",
+    "\u0035\u2044\u0036",
+    "\u0031\u2044\u0038",
+    "\u0033\u2044\u0038",
+    "\u0035\u2044\u0038",
+    "\u0037\u2044\u0038",
+    "\u0031\u2044",
+    "\u0049\u0049",
+    "\u0049\u0049\u0049",
+    "\u0049\u0056",
+    "\u0056",
+    "\u0056\u0049",
+    "\u0056\u0049\u0049",
+    "\u0056\u0049\u0049\u0049",
+    "\u0049\u0058",
+    "\u0058",
+    "\u0058\u0049",
+    "\u0058\u0049\u0049",
+    "\u0069\u0069",
+    "\u0069\u0069\u0069",
+    "\u0069\u0076",
+    "\u0076\u0069",
+    "\u0076\u0069\u0069",
+    "\u0076\u0069\u0069\u0069",
+    "\u0069\u0078",
+    "\u0078\u0069",
+    "\u0078\u0069\u0069",
+    "\u2190\u0338",
+    "\u2192\u0338",
+    "\u2194\u0338",
+    "\u21D0\u0338",
+    "\u21D4\u0338",
+    "\u21D2\u0338",
+    "\u2203\u0338",
+    "\u2208\u0338",
+    "\u220B\u0338",
+    "\u2223\u0338",
+    "\u2225\u0338",
+    "\u222B\u222B",
+    "\u222B\u222B\u222B",
+    "\u222E\u222E",
+    "\u222E\u222E\u222E",
+    "\u223C\u0338",
+    "\u2243\u0338",
+    "\u2245\u0338",
+    "\u2248\u0338",
+    "\u003D\u0338",
+    "\u2261\u0338",
+    "\u224D\u0338",
+    "\u003C\u0338",
+    "\u003E\u0338",
+    "\u2264\u0338",
+    "\u2265\u0338",
+    "\u2272\u0338",
+    "\u2273\u0338",
+    "\u2276\u0338",
+    "\u2277\u0338",
+    "\u227A\u0338",
+    "\u227B\u0338",
+    "\u2282\u0338",
+    "\u2283\u0338",
+    "\u2286\u0338",
+    "\u2287\u0338",
+    "\u22A2\u0338",
+    "\u22A8\u0338",
+    "\u22A9\u0338",
+    "\u22AB\u0338",
+    "\u227C\u0338",
+    "\u227D\u0338",
+    "\u2291\u0338",
+    "\u2292\u0338",
+    "\u22B2\u0338",
+    "\u22B3\u0338",
+    "\u22B4\u0338",
+    "\u22B5\u0338",
+    "\u3008",
+    "\u3009",
+    "\u0031\u0030",
+    "\u0031\u0031",
+    "\u0031\u0032",
+    "\u0031\u0033",
+    "\u0031\u0034",
+    "\u0031\u0035",
+    "\u0031\u0036",
+    "\u0031\u0037",
+    "\u0031\u0038",
+    "\u0031\u0039",
+    "\u0032\u0030",
+    "\u0028\u0031\u0029",
+    "\u0028\u0032\u0029",
+    "\u0028\u0033\u0029",
+    "\u0028\u0034\u0029",
+    "\u0028\u0035\u0029",
+    "\u0028\u0036\u0029",
+    "\u0028\u0037\u0029",
+    "\u0028\u0038\u0029",
+    "\u0028\u0039\u0029",
+    "\u0028\u0031\u0030\u0029",
+    "\u0028\u0031\u0031\u0029",
+    "\u0028\u0031\u0032\u0029",
+    "\u0028\u0031\u0033\u0029",
+    "\u0028\u0031\u0034\u0029",
+    "\u0028\u0031\u0035\u0029",
+    "\u0028\u0031\u0036\u0029",
+    "\u0028\u0031\u0037\u0029",
+    "\u0028\u0031\u0038\u0029",
+    "\u0028\u0031\u0039\u0029",
+    "\u0028\u0032\u0030\u0029",
+    "\u0031\u002E",
+    "\u0032\u002E",
+    "\u0033\u002E",
+    "\u0034\u002E",
+    "\u0035\u002E",
+    "\u0036\u002E",
+    "\u0037\u002E",
+    "\u0038\u002E",
+    "\u0039\u002E",
+    "\u0031\u0030\u002E",
+    "\u0031\u0031\u002E",
+    "\u0031\u0032\u002E",
+    "\u0031\u0033\u002E",
+    "\u0031\u0034\u002E",
+    "\u0031\u0035\u002E",
+    "\u0031\u0036\u002E",
+    "\u0031\u0037\u002E",
+    "\u0031\u0038\u002E",
+    "\u0031\u0039\u002E",
+    "\u0032\u0030\u002E",
+    "\u0028\u0061\u0029",
+    "\u0028\u0062\u0029",
+    "\u0028\u0063\u0029",
+    "\u0028\u0064\u0029",
+    "\u0028\u0065\u0029",
+    "\u0028\u0066\u0029",
+    "\u0028\u0067\u0029",
+    "\u0028\u0068\u0029",
+    "\u0028\u0069\u0029",
+    "\u0028\u006A\u0029",
+    "\u0028\u006B\u0029",
+    "\u0028\u006C\u0029",
+    "\u0028\u006D\u0029",
+    "\u0028\u006E\u0029",
+    "\u0028\u006F\u0029",
+    "\u0028\u0070\u0029",
+    "\u0028\u0071\u0029",
+    "\u0028\u0072\u0029",
+    "\u0028\u0073\u0029",
+    "\u0028\u0074\u0029",
+    "\u0028\u0075\u0029",
+    "\u0028\u0076\u0029",
+    "\u0028\u0077\u0029",
+    "\u0028\u0078\u0029",
+    "\u0028\u0079\u0029",
+    "\u0028\u007A\u0029",
+    "\u0053",
+    "\u0059",
+    "\u0071",
+    "\u222B\u222B\u222B\u222B",
+    "\u003A\u003A\u003D",
+    "\u003D\u003D",
+    "\u003D\u003D\u003D",
+    "\u2ADD\u0338",
+    "\u2D61",
+    "\u6BCD",
+    "\u9F9F",
+    "\u4E00",
+    "\u4E28",
+    "\u4E36",
+    "\u4E3F",
+    "\u4E59",
+    "\u4E85",
+    "\u4E8C",
+    "\u4EA0",
+    "\u4EBA",
+    "\u513F",
+    "\u5165",
+    "\u516B",
+    "\u5182",
+    "\u5196",
+    "\u51AB",
+    "\u51E0",
+    "\u51F5",
+    "\u5200",
+    "\u529B",
+    "\u52F9",
+    "\u5315",
+    "\u531A",
+    "\u5338",
+    "\u5341",
+    "\u535C",
+    "\u5369",
+    "\u5382",
+    "\u53B6",
+    "\u53C8",
+    "\u53E3",
+    "\u56D7",
+    "\u571F",
+    "\u58EB",
+    "\u5902",
+    "\u590A",
+    "\u5915",
+    "\u5927",
+    "\u5973",
+    "\u5B50",
+    "\u5B80",
+    "\u5BF8",
+    "\u5C0F",
+    "\u5C22",
+    "\u5C38",
+    "\u5C6E",
+    "\u5C71",
+    "\u5DDB",
+    "\u5DE5",
+    "\u5DF1",
+    "\u5DFE",
+    "\u5E72",
+    "\u5E7A",
+    "\u5E7F",
+    "\u5EF4",
+    "\u5EFE",
+    "\u5F0B",
+    "\u5F13",
+    "\u5F50",
+    "\u5F61",
+    "\u5F73",
+    "\u5FC3",
+    "\u6208",
+    "\u6236",
+    "\u624B",
+    "\u652F",
+    "\u6534",
+    "\u6587",
+    "\u6597",
+    "\u65A4",
+    "\u65B9",
+    "\u65E0",
+    "\u65E5",
+    "\u66F0",
+    "\u6708",
+    "\u6728",
+    "\u6B20",
+    "\u6B62",
+    "\u6B79",
+    "\u6BB3",
+    "\u6BCB",
+    "\u6BD4",
+    "\u6BDB",
+    "\u6C0F",
+    "\u6C14",
+    "\u6C34",
+    "\u706B",
+    "\u722A",
+    "\u7236",
+    "\u723B",
+    "\u723F",
+    "\u7247",
+    "\u7259",
+    "\u725B",
+    "\u72AC",
+    "\u7384",
+    "\u7389",
+    "\u74DC",
+    "\u74E6",
+    "\u7518",
+    "\u751F",
+    "\u7528",
+    "\u7530",
+    "\u758B",
+    "\u7592",
+    "\u7676",
+    "\u767D",
+    "\u76AE",
+    "\u76BF",
+    "\u76EE",
+    "\u77DB",
+    "\u77E2",
+    "\u77F3",
+    "\u793A",
+    "\u79B8",
+    "\u79BE",
+    "\u7A74",
+    "\u7ACB",
+    "\u7AF9",
+    "\u7C73",
+    "\u7CF8",
+    "\u7F36",
+    "\u7F51",
+    "\u7F8A",
+    "\u7FBD",
+    "\u8001",
+    "\u800C",
+    "\u8012",
+    "\u8033",
+    "\u807F",
+    "\u8089",
+    "\u81E3",
+    "\u81EA",
+    "\u81F3",
+    "\u81FC",
+    "\u820C",
+    "\u821B",
+    "\u821F",
+    "\u826E",
+    "\u8272",
+    "\u8278",
+    "\u864D",
+    "\u866B",
+    "\u8840",
+    "\u884C",
+    "\u8863",
+    "\u897E",
+    "\u898B",
+    "\u89D2",
+    "\u8A00",
+    "\u8C37",
+    "\u8C46",
+    "\u8C55",
+    "\u8C78",
+    "\u8C9D",
+    "\u8D64",
+    "\u8D70",
+    "\u8DB3",
+    "\u8EAB",
+    "\u8ECA",
+    "\u8F9B",
+    "\u8FB0",
+    "\u8FB5",
+    "\u9091",
+    "\u9149",
+    "\u91C6",
+    "\u91CC",
+    "\u91D1",
+    "\u9577",
+    "\u9580",
+    "\u961C",
+    "\u96B6",
+    "\u96B9",
+    "\u96E8",
+    "\u9751",
+    "\u975E",
+    "\u9762",
+    "\u9769",
+    "\u97CB",
+    "\u97ED",
+    "\u97F3",
+    "\u9801",
+    "\u98A8",
+    "\u98DB",
+    "\u98DF",
+    "\u9996",
+    "\u9999",
+    "\u99AC",
+    "\u9AA8",
+    "\u9AD8",
+    "\u9ADF",
+    "\u9B25",
+    "\u9B2F",
+    "\u9B32",
+    "\u9B3C",
+    "\u9B5A",
+    "\u9CE5",
+    "\u9E75",
+    "\u9E7F",
+    "\u9EA5",
+    "\u9EBB",
+    "\u9EC3",
+    "\u9ECD",
+    "\u9ED1",
+    "\u9EF9",
+    "\u9EFD",
+    "\u9F0E",
+    "\u9F13",
+    "\u9F20",
+    "\u9F3B",
+    "\u9F4A",
+    "\u9F52",
+    "\u9F8D",
+    "\u9F9C",
+    "\u9FA0",
+    "\u3012",
+    "\u5344",
+    "\u5345",
+    "\u304B\u3099",
+    "\u304D\u3099",
+    "\u304F\u3099",
+    "\u3051\u3099",
+    "\u3053\u3099",
+    "\u3055\u3099",
+    "\u3057\u3099",
+    "\u3059\u3099",
+    "\u305B\u3099",
+    "\u305D\u3099",
+    "\u305F\u3099",
+    "\u3061\u3099",
+    "\u3064\u3099",
+    "\u3066\u3099",
+    "\u3068\u3099",
+    "\u306F\u3099",
+    "\u306F\u309A",
+    "\u3072\u3099",
+    "\u3072\u309A",
+    "\u3075\u3099",
+    "\u3075\u309A",
+    "\u3078\u3099",
+    "\u3078\u309A",
+    "\u307B\u3099",
+    "\u307B\u309A",
+    "\u3046\u3099",
+    "\u0020\u3099",
+    "\u0020\u309A",
+    "\u309D\u3099",
+    "\u3088\u308A",
+    "\u30AB\u3099",
+    "\u30AD\u3099",
+    "\u30AF\u3099",
+    "\u30B1\u3099",
+    "\u30B3\u3099",
+    "\u30B5\u3099",
+    "\u30B7\u3099",
+    "\u30B9\u3099",
+    "\u30BB\u3099",
+    "\u30BD\u3099",
+    "\u30BF\u3099",
+    "\u30C1\u3099",
+    "\u30C4\u3099",
+    "\u30C6\u3099",
+    "\u30C8\u3099",
+    "\u30CF\u3099",
+    "\u30CF\u309A",
+    "\u30D2\u3099",
+    "\u30D2\u309A",
+    "\u30D5\u3099",
+    "\u30D5\u309A",
+    "\u30D8\u3099",
+    "\u30D8\u309A",
+    "\u30DB\u3099",
+    "\u30DB\u309A",
+    "\u30A6\u3099",
+    "\u30EF\u3099",
+    "\u30F0\u3099",
+    "\u30F1\u3099",
+    "\u30F2\u3099",
+    "\u30FD\u3099",
+    "\u30B3\u30C8",
+    "\u1100",
+    "\u1101",
+    "\u11AA",
+    "\u1102",
+    "\u11AC",
+    "\u11AD",
+    "\u1103",
+    "\u1104",
+    "\u1105",
+    "\u11B0",
+    "\u11B1",
+    "\u11B2",
+    "\u11B3",
+    "\u11B4",
+    "\u11B5",
+    "\u111A",
+    "\u1106",
+    "\u1107",
+    "\u1108",
+    "\u1121",
+    "\u1109",
+    "\u110A",
+    "\u110B",
+    "\u110C",
+    "\u110D",
+    "\u110E",
+    "\u110F",
+    "\u1110",
+    "\u1111",
+    "\u1112",
+    "\u1161",
+    "\u1162",
+    "\u1163",
+    "\u1164",
+    "\u1165",
+    "\u1166",
+    "\u1167",
+    "\u1168",
+    "\u1169",
+    "\u116A",
+    "\u116B",
+    "\u116C",
+    "\u116D",
+    "\u116E",
+    "\u116F",
+    "\u1170",
+    "\u1171",
+    "\u1172",
+    "\u1173",
+    "\u1174",
+    "\u1175",
+    "\u1160",
+    "\u1114",
+    "\u1115",
+    "\u11C7",
+    "\u11C8",
+    "\u11CC",
+    "\u11CE",
+    "\u11D3",
+    "\u11D7",
+    "\u11D9",
+    "\u111C",
+    "\u11DD",
+    "\u11DF",
+    "\u111D",
+    "\u111E",
+    "\u1120",
+    "\u1122",
+    "\u1123",
+    "\u1127",
+    "\u1129",
+    "\u112B",
+    "\u112C",
+    "\u112D",
+    "\u112E",
+    "\u112F",
+    "\u1132",
+    "\u1136",
+    "\u1140",
+    "\u1147",
+    "\u114C",
+    "\u11F1",
+    "\u11F2",
+    "\u1157",
+    "\u1158",
+    "\u1159",
+    "\u1184",
+    "\u1185",
+    "\u1188",
+    "\u1191",
+    "\u1192",
+    "\u1194",
+    "\u119E",
+    "\u11A1",
+    "\u4E09",
+    "\u56DB",
+    "\u4E0A",
+    "\u4E2D",
+    "\u4E0B",
+    "\u7532",
+    "\u4E19",
+    "\u4E01",
+    "\u5929",
+    "\u5730",
+    "\u0028\u1100\u0029",
+    "\u0028\u1102\u0029",
+    "\u0028\u1103\u0029",
+    "\u0028\u1105\u0029",
+    "\u0028\u1106\u0029",
+    "\u0028\u1107\u0029",
+    "\u0028\u1109\u0029",
+    "\u0028\u110B\u0029",
+    "\u0028\u110C\u0029",
+    "\u0028\u110E\u0029",
+    "\u0028\u110F\u0029",
+    "\u0028\u1110\u0029",
+    "\u0028\u1111\u0029",
+    "\u0028\u1112\u0029",
+    "\u0028\u1100\u1161\u0029",
+    "\u0028\u1102\u1161\u0029",
+    "\u0028\u1103\u1161\u0029",
+    "\u0028\u1105\u1161\u0029",
+    "\u0028\u1106\u1161\u0029",
+    "\u0028\u1107\u1161\u0029",
+    "\u0028\u1109\u1161\u0029",
+    "\u0028\u110B\u1161\u0029",
+    "\u0028\u110C\u1161\u0029",
+    "\u0028\u110E\u1161\u0029",
+    "\u0028\u110F\u1161\u0029",
+    "\u0028\u1110\u1161\u0029",
+    "\u0028\u1111\u1161\u0029",
+    "\u0028\u1112\u1161\u0029",
+    "\u0028\u110C\u116E\u0029",
+    "\u0028\u110B\u1169\u110C\u1165\u11AB\u0029",
+    "\u0028\u110B\u1169\u1112\u116E\u0029",
+    "\u0028\u4E00\u0029",
+    "\u0028\u4E8C\u0029",
+    "\u0028\u4E09\u0029",
+    "\u0028\u56DB\u0029",
+    "\u0028\u4E94\u0029",
+    "\u0028\u516D\u0029",
+    "\u0028\u4E03\u0029",
+    "\u0028\u516B\u0029",
+    "\u0028\u4E5D\u0029",
+    "\u0028\u5341\u0029",
+    "\u0028\u6708\u0029",
+    "\u0028\u706B\u0029",
+    "\u0028\u6C34\u0029",
+    "\u0028\u6728\u0029",
+    "\u0028\u91D1\u0029",
+    "\u0028\u571F\u0029",
+    "\u0028\u65E5\u0029",
+    "\u0028\u682A\u0029",
+    "\u0028\u6709\u0029",
+    "\u0028\u793E\u0029",
+    "\u0028\u540D\u0029",
+    "\u0028\u7279\u0029",
+    "\u0028\u8CA1\u0029",
+    "\u0028\u795D\u0029",
+    "\u0028\u52B4\u0029",
+    "\u0028\u4EE3\u0029",
+    "\u0028\u547C\u0029",
+    "\u0028\u5B66\u0029",
+    "\u0028\u76E3\u0029",
+    "\u0028\u4F01\u0029",
+    "\u0028\u8CC7\u0029",
+    "\u0028\u5354\u0029",
+    "\u0028\u796D\u0029",
+    "\u0028\u4F11\u0029",
+    "\u0028\u81EA\u0029",
+    "\u0028\u81F3\u0029",
+    "\u0050\u0054\u0045",
+    "\u0032\u0031",
+    "\u0032\u0032",
+    "\u0032\u0033",
+    "\u0032\u0034",
+    "\u0032\u0035",
+    "\u0032\u0036",
+    "\u0032\u0037",
+    "\u0032\u0038",
+    "\u0032\u0039",
+    "\u0033\u0030",
+    "\u0033\u0031",
+    "\u0033\u0032",
+    "\u0033\u0033",
+    "\u0033\u0034",
+    "\u0033\u0035",
+    "\u1100\u1161",
+    "\u1102\u1161",
+    "\u1103\u1161",
+    "\u1105\u1161",
+    "\u1106\u1161",
+    "\u1107\u1161",
+    "\u1109\u1161",
+    "\u110B\u1161",
+    "\u110C\u1161",
+    "\u110E\u1161",
+    "\u110F\u1161",
+    "\u1110\u1161",
+    "\u1111\u1161",
+    "\u1112\u1161",
+    "\u110E\u1161\u11B7\u1100\u1169",
+    "\u110C\u116E\u110B\u1174",
+    "\u110B\u116E",
+    "\u4E94",
+    "\u516D",
+    "\u4E03",
+    "\u4E5D",
+    "\u682A",
+    "\u6709",
+    "\u793E",
+    "\u540D",
+    "\u7279",
+    "\u8CA1",
+    "\u795D",
+    "\u52B4",
+    "\u79D8",
+    "\u7537",
+    "\u9069",
+    "\u512A",
+    "\u5370",
+    "\u6CE8",
+    "\u9805",
+    "\u4F11",
+    "\u5199",
+    "\u6B63",
+    "\u5DE6",
+    "\u53F3",
+    "\u533B",
+    "\u5B97",
+    "\u5B66",
+    "\u76E3",
+    "\u4F01",
+    "\u8CC7",
+    "\u5354",
+    "\u591C",
+    "\u0033\u0036",
+    "\u0033\u0037",
+    "\u0033\u0038",
+    "\u0033\u0039",
+    "\u0034\u0030",
+    "\u0034\u0031",
+    "\u0034\u0032",
+    "\u0034\u0033",
+    "\u0034\u0034",
+    "\u0034\u0035",
+    "\u0034\u0036",
+    "\u0034\u0037",
+    "\u0034\u0038",
+    "\u0034\u0039",
+    "\u0035\u0030",
+    "\u0031\u6708",
+    "\u0032\u6708",
+    "\u0033\u6708",
+    "\u0034\u6708",
+    "\u0035\u6708",
+    "\u0036\u6708",
+    "\u0037\u6708",
+    "\u0038\u6708",
+    "\u0039\u6708",
+    "\u0031\u0030\u6708",
+    "\u0031\u0031\u6708",
+    "\u0031\u0032\u6708",
+    "\u0048\u0067",
+    "\u0065\u0072\u0067",
+    "\u0065\u0056",
+    "\u004C\u0054\u0044",
+    "\u30A2",
+    "\u30A4",
+    "\u30A6",
+    "\u30A8",
+    "\u30AA",
+    "\u30AB",
+    "\u30AD",
+    "\u30AF",
+    "\u30B1",
+    "\u30B3",
+    "\u30B5",
+    "\u30B7",
+    "\u30B9",
+    "\u30BB",
+    "\u30BD",
+    "\u30BF",
+    "\u30C1",
+    "\u30C4",
+    "\u30C6",
+    "\u30C8",
+    "\u30CA",
+    "\u30CB",
+    "\u30CC",
+    "\u30CD",
+    "\u30CE",
+    "\u30CF",
+    "\u30D2",
+    "\u30D5",
+    "\u30D8",
+    "\u30DB",
+    "\u30DE",
+    "\u30DF",
+    "\u30E0",
+    "\u30E1",
+    "\u30E2",
+    "\u30E4",
+    "\u30E6",
+    "\u30E8",
+    "\u30E9",
+    "\u30EA",
+    "\u30EB",
+    "\u30EC",
+    "\u30ED",
+    "\u30EF",
+    "\u30F0",
+    "\u30F1",
+    "\u30F2",
+    "\u30A2\u30CF\u309A\u30FC\u30C8",
+    "\u30A2\u30EB\u30D5\u30A1",
+    "\u30A2\u30F3\u30D8\u309A\u30A2",
+    "\u30A2\u30FC\u30EB",
+    "\u30A4\u30CB\u30F3\u30AF\u3099",
+    "\u30A4\u30F3\u30C1",
+    "\u30A6\u30A9\u30F3",
+    "\u30A8\u30B9\u30AF\u30FC\u30C8\u3099",
+    "\u30A8\u30FC\u30AB\u30FC",
+    "\u30AA\u30F3\u30B9",
+    "\u30AA\u30FC\u30E0",
+    "\u30AB\u30A4\u30EA",
+    "\u30AB\u30E9\u30C3\u30C8",
+    "\u30AB\u30ED\u30EA\u30FC",
+    "\u30AB\u3099\u30ED\u30F3",
+    "\u30AB\u3099\u30F3\u30DE",
+    "\u30AD\u3099\u30AB\u3099",
+    "\u30AD\u3099\u30CB\u30FC",
+    "\u30AD\u30E5\u30EA\u30FC",
+    "\u30AD\u3099\u30EB\u30BF\u3099\u30FC",
+    "\u30AD\u30ED",
+    "\u30AD\u30ED\u30AF\u3099\u30E9\u30E0",
+    "\u30AD\u30ED\u30E1\u30FC\u30C8\u30EB",
+    "\u30AD\u30ED\u30EF\u30C3\u30C8",
+    "\u30AF\u3099\u30E9\u30E0",
+    "\u30AF\u3099\u30E9\u30E0\u30C8\u30F3",
+    "\u30AF\u30EB\u30BB\u3099\u30A4\u30ED",
+    "\u30AF\u30ED\u30FC\u30CD",
+    "\u30B1\u30FC\u30B9",
+    "\u30B3\u30EB\u30CA",
+    "\u30B3\u30FC\u30DB\u309A",
+    "\u30B5\u30A4\u30AF\u30EB",
+    "\u30B5\u30F3\u30C1\u30FC\u30E0",
+    "\u30B7\u30EA\u30F3\u30AF\u3099",
+    "\u30BB\u30F3\u30C1",
+    "\u30BB\u30F3\u30C8",
+    "\u30BF\u3099\u30FC\u30B9",
+    "\u30C6\u3099\u30B7",
+    "\u30C8\u3099\u30EB",
+    "\u30C8\u30F3",
+    "\u30CA\u30CE",
+    "\u30CE\u30C3\u30C8",
+    "\u30CF\u30A4\u30C4",
+    "\u30CF\u309A\u30FC\u30BB\u30F3\u30C8",
+    "\u30CF\u309A\u30FC\u30C4",
+    "\u30CF\u3099\u30FC\u30EC\u30EB",
+    "\u30D2\u309A\u30A2\u30B9\u30C8\u30EB",
+    "\u30D2\u309A\u30AF\u30EB",
+    "\u30D2\u309A\u30B3",
+    "\u30D2\u3099\u30EB",
+    "\u30D5\u30A1\u30E9\u30C3\u30C8\u3099",
+    "\u30D5\u30A3\u30FC\u30C8",
+    "\u30D5\u3099\u30C3\u30B7\u30A7\u30EB",
+    "\u30D5\u30E9\u30F3",
+    "\u30D8\u30AF\u30BF\u30FC\u30EB",
+    "\u30D8\u309A\u30BD",
+    "\u30D8\u309A\u30CB\u30D2",
+    "\u30D8\u30EB\u30C4",
+    "\u30D8\u309A\u30F3\u30B9",
+    "\u30D8\u309A\u30FC\u30B7\u3099",
+    "\u30D8\u3099\u30FC\u30BF",
+    "\u30DB\u309A\u30A4\u30F3\u30C8",
+    "\u30DB\u3099\u30EB\u30C8",
+    "\u30DB\u30F3",
+    "\u30DB\u309A\u30F3\u30C8\u3099",
+    "\u30DB\u30FC\u30EB",
+    "\u30DB\u30FC\u30F3",
+    "\u30DE\u30A4\u30AF\u30ED",
+    "\u30DE\u30A4\u30EB",
+    "\u30DE\u30C3\u30CF",
+    "\u30DE\u30EB\u30AF",
+    "\u30DE\u30F3\u30B7\u30E7\u30F3",
+    "\u30DF\u30AF\u30ED\u30F3",
+    "\u30DF\u30EA",
+    "\u30DF\u30EA\u30CF\u3099\u30FC\u30EB",
+    "\u30E1\u30AB\u3099",
+    "\u30E1\u30AB\u3099\u30C8\u30F3",
+    "\u30E1\u30FC\u30C8\u30EB",
+    "\u30E4\u30FC\u30C8\u3099",
+    "\u30E4\u30FC\u30EB",
+    "\u30E6\u30A2\u30F3",
+    "\u30EA\u30C3\u30C8\u30EB",
+    "\u30EA\u30E9",
+    "\u30EB\u30D2\u309A\u30FC",
+    "\u30EB\u30FC\u30D5\u3099\u30EB",
+    "\u30EC\u30E0",
+    "\u30EC\u30F3\u30C8\u30B1\u3099\u30F3",
+    "\u30EF\u30C3\u30C8",
+    "\u0030\u70B9",
+    "\u0031\u70B9",
+    "\u0032\u70B9",
+    "\u0033\u70B9",
+    "\u0034\u70B9",
+    "\u0035\u70B9",
+    "\u0036\u70B9",
+    "\u0037\u70B9",
+    "\u0038\u70B9",
+    "\u0039\u70B9",
+    "\u0031\u0030\u70B9",
+    "\u0031\u0031\u70B9",
+    "\u0031\u0032\u70B9",
+    "\u0031\u0033\u70B9",
+    "\u0031\u0034\u70B9",
+    "\u0031\u0035\u70B9",
+    "\u0031\u0036\u70B9",
+    "\u0031\u0037\u70B9",
+    "\u0031\u0038\u70B9",
+    "\u0031\u0039\u70B9",
+    "\u0032\u0030\u70B9",
+    "\u0032\u0031\u70B9",
+    "\u0032\u0032\u70B9",
+    "\u0032\u0033\u70B9",
+    "\u0032\u0034\u70B9",
+    "\u0068\u0050\u0061",
+    "\u0064\u0061",
+    "\u0041\u0055",
+    "\u0062\u0061\u0072",
+    "\u006F\u0056",
+    "\u0070\u0063",
+    "\u0064\u006D",
+    "\u0064\u006D\u0032",
+    "\u0064\u006D\u0033",
+    "\u0049\u0055",
+    "\u5E73\u6210",
+    "\u662D\u548C",
+    "\u5927\u6B63",
+    "\u660E\u6CBB",
+    "\u682A\u5F0F\u4F1A\u793E",
+    "\u0070\u0041",
+    "\u006E\u0041",
+    "\u03BC\u0041",
+    "\u006D\u0041",
+    "\u006B\u0041",
+    "\u004B\u0042",
+    "\u004D\u0042",
+    "\u0047\u0042",
+    "\u0063\u0061\u006C",
+    "\u006B\u0063\u0061\u006C",
+    "\u0070\u0046",
+    "\u006E\u0046",
+    "\u03BC\u0046",
+    "\u03BC\u0067",
+    "\u006D\u0067",
+    "\u006B\u0067",
+    "\u0048\u007A",
+    "\u006B\u0048\u007A",
+    "\u004D\u0048\u007A",
+    "\u0047\u0048\u007A",
+    "\u0054\u0048\u007A",
+    "\u03BC\u006C",
+    "\u006D\u006C",
+    "\u0064\u006C",
+    "\u006B\u006C",
+    "\u0066\u006D",
+    "\u006E\u006D",
+    "\u03BC\u006D",
+    "\u006D\u006D",
+    "\u0063\u006D",
+    "\u006B\u006D",
+    "\u006D\u006D\u0032",
+    "\u0063\u006D\u0032",
+    "\u006D\u0032",
+    "\u006B\u006D\u0032",
+    "\u006D\u006D\u0033",
+    "\u0063\u006D\u0033",
+    "\u006D\u0033",
+    "\u006B\u006D\u0033",
+    "\u006D\u2215\u0073",
+    "\u006D\u2215\u0073\u0032",
+    "\u0050\u0061",
+    "\u006B\u0050\u0061",
+    "\u004D\u0050\u0061",
+    "\u0047\u0050\u0061",
+    "\u0072\u0061\u0064",
+    "\u0072\u0061\u0064\u2215\u0073",
+    "\u0072\u0061\u0064\u2215\u0073\u0032",
+    "\u0070\u0073",
+    "\u006E\u0073",
+    "\u03BC\u0073",
+    "\u006D\u0073",
+    "\u0070\u0056",
+    "\u006E\u0056",
+    "\u03BC\u0056",
+    "\u006D\u0056",
+    "\u006B\u0056",
+    "\u004D\u0056",
+    "\u0070\u0057",
+    "\u006E\u0057",
+    "\u03BC\u0057",
+    "\u006D\u0057",
+    "\u006B\u0057",
+    "\u004D\u0057",
+    "\u006B\u03A9",
+    "\u004D\u03A9",
+    "\u0061\u002E\u006D\u002E",
+    "\u0042\u0071",
+    "\u0063\u0063",
+    "\u0063\u0064",
+    "\u0043\u2215\u006B\u0067",
+    "\u0043\u006F\u002E",
+    "\u0064\u0042",
+    "\u0047\u0079",
+    "\u0068\u0061",
+    "\u0048\u0050",
+    "\u0069\u006E",
+    "\u004B\u004B",
+    "\u004B\u004D",
+    "\u006B\u0074",
+    "\u006C\u006D",
+    "\u006C\u006E",
+    "\u006C\u006F\u0067",
+    "\u006C\u0078",
+    "\u006D\u0062",
+    "\u006D\u0069\u006C",
+    "\u006D\u006F\u006C",
+    "\u0050\u0048",
+    "\u0070\u002E\u006D\u002E",
+    "\u0050\u0050\u004D",
+    "\u0050\u0052",
+    "\u0073\u0072",
+    "\u0053\u0076",
+    "\u0057\u0062",
+    "\u0056\u2215\u006D",
+    "\u0041\u2215\u006D",
+    "\u0031\u65E5",
+    "\u0032\u65E5",
+    "\u0033\u65E5",
+    "\u0034\u65E5",
+    "\u0035\u65E5",
+    "\u0036\u65E5",
+    "\u0037\u65E5",
+    "\u0038\u65E5",
+    "\u0039\u65E5",
+    "\u0031\u0030\u65E5",
+    "\u0031\u0031\u65E5",
+    "\u0031\u0032\u65E5",
+    "\u0031\u0033\u65E5",
+    "\u0031\u0034\u65E5",
+    "\u0031\u0035\u65E5",
+    "\u0031\u0036\u65E5",
+    "\u0031\u0037\u65E5",
+    "\u0031\u0038\u65E5",
+    "\u0031\u0039\u65E5",
+    "\u0032\u0030\u65E5",
+    "\u0032\u0031\u65E5",
+    "\u0032\u0032\u65E5",
+    "\u0032\u0033\u65E5",
+    "\u0032\u0034\u65E5",
+    "\u0032\u0035\u65E5",
+    "\u0032\u0036\u65E5",
+    "\u0032\u0037\u65E5",
+    "\u0032\u0038\u65E5",
+    "\u0032\u0039\u65E5",
+    "\u0033\u0030\u65E5",
+    "\u0033\u0031\u65E5",
+    "\u0067\u0061\u006C",
+    "\uA76F",
+    "\u8C48",
+    "\u66F4",
+    "\u8CC8",
+    "\u6ED1",
+    "\u4E32",
+    "\u53E5",
+    "\u5951",
+    "\u5587",
+    "\u5948",
+    "\u61F6",
+    "\u7669",
+    "\u7F85",
+    "\u863F",
+    "\u87BA",
+    "\u88F8",
+    "\u908F",
+    "\u6A02",
+    "\u6D1B",
+    "\u70D9",
+    "\u73DE",
+    "\u843D",
+    "\u916A",
+    "\u99F1",
+    "\u4E82",
+    "\u5375",
+    "\u6B04",
+    "\u721B",
+    "\u862D",
+    "\u9E1E",
+    "\u5D50",
+    "\u6FEB",
+    "\u85CD",
+    "\u8964",
+    "\u62C9",
+    "\u81D8",
+    "\u881F",
+    "\u5ECA",
+    "\u6717",
+    "\u6D6A",
+    "\u72FC",
+    "\u90CE",
+    "\u4F86",
+    "\u51B7",
+    "\u52DE",
+    "\u64C4",
+    "\u6AD3",
+    "\u7210",
+    "\u76E7",
+    "\u8606",
+    "\u865C",
+    "\u8DEF",
+    "\u9732",
+    "\u9B6F",
+    "\u9DFA",
+    "\u788C",
+    "\u797F",
+    "\u7DA0",
+    "\u83C9",
+    "\u9304",
+    "\u8AD6",
+    "\u58DF",
+    "\u5F04",
+    "\u7C60",
+    "\u807E",
+    "\u7262",
+    "\u78CA",
+    "\u8CC2",
+    "\u96F7",
+    "\u58D8",
+    "\u5C62",
+    "\u6A13",
+    "\u6DDA",
+    "\u6F0F",
+    "\u7D2F",
+    "\u7E37",
+    "\u964B",
+    "\u52D2",
+    "\u808B",
+    "\u51DC",
+    "\u51CC",
+    "\u7A1C",
+    "\u7DBE",
+    "\u83F1",
+    "\u9675",
+    "\u8B80",
+    "\u62CF",
+    "\u8AFE",
+    "\u4E39",
+    "\u5BE7",
+    "\u6012",
+    "\u7387",
+    "\u7570",
+    "\u5317",
+    "\u78FB",
+    "\u4FBF",
+    "\u5FA9",
+    "\u4E0D",
+    "\u6CCC",
+    "\u6578",
+    "\u7D22",
+    "\u53C3",
+    "\u585E",
+    "\u7701",
+    "\u8449",
+    "\u8AAA",
+    "\u6BBA",
+    "\u6C88",
+    "\u62FE",
+    "\u82E5",
+    "\u63A0",
+    "\u7565",
+    "\u4EAE",
+    "\u5169",
+    "\u51C9",
+    "\u6881",
+    "\u7CE7",
+    "\u826F",
+    "\u8AD2",
+    "\u91CF",
+    "\u52F5",
+    "\u5442",
+    "\u5EEC",
+    "\u65C5",
+    "\u6FFE",
+    "\u792A",
+    "\u95AD",
+    "\u9A6A",
+    "\u9E97",
+    "\u9ECE",
+    "\u66C6",
+    "\u6B77",
+    "\u8F62",
+    "\u5E74",
+    "\u6190",
+    "\u6200",
+    "\u649A",
+    "\u6F23",
+    "\u7149",
+    "\u7489",
+    "\u79CA",
+    "\u7DF4",
+    "\u806F",
+    "\u8F26",
+    "\u84EE",
+    "\u9023",
+    "\u934A",
+    "\u5217",
+    "\u52A3",
+    "\u54BD",
+    "\u70C8",
+    "\u88C2",
+    "\u5EC9",
+    "\u5FF5",
+    "\u637B",
+    "\u6BAE",
+    "\u7C3E",
+    "\u7375",
+    "\u4EE4",
+    "\u56F9",
+    "\u5DBA",
+    "\u601C",
+    "\u73B2",
+    "\u7469",
+    "\u7F9A",
+    "\u8046",
+    "\u9234",
+    "\u96F6",
+    "\u9748",
+    "\u9818",
+    "\u4F8B",
+    "\u79AE",
+    "\u91B4",
+    "\u96B8",
+    "\u60E1",
+    "\u4E86",
+    "\u50DA",
+    "\u5BEE",
+    "\u5C3F",
+    "\u6599",
+    "\u71CE",
+    "\u7642",
+    "\u84FC",
+    "\u907C",
+    "\u6688",
+    "\u962E",
+    "\u5289",
+    "\u677B",
+    "\u67F3",
+    "\u6D41",
+    "\u6E9C",
+    "\u7409",
+    "\u7559",
+    "\u786B",
+    "\u7D10",
+    "\u985E",
+    "\u622E",
+    "\u9678",
+    "\u502B",
+    "\u5D19",
+    "\u6DEA",
+    "\u8F2A",
+    "\u5F8B",
+    "\u6144",
+    "\u6817",
+    "\u9686",
+    "\u5229",
+    "\u540F",
+    "\u5C65",
+    "\u6613",
+    "\u674E",
+    "\u68A8",
+    "\u6CE5",
+    "\u7406",
+    "\u75E2",
+    "\u7F79",
+    "\u88CF",
+    "\u88E1",
+    "\u96E2",
+    "\u533F",
+    "\u6EBA",
+    "\u541D",
+    "\u71D0",
+    "\u7498",
+    "\u85FA",
+    "\u96A3",
+    "\u9C57",
+    "\u9E9F",
+    "\u6797",
+    "\u6DCB",
+    "\u81E8",
+    "\u7B20",
+    "\u7C92",
+    "\u72C0",
+    "\u7099",
+    "\u8B58",
+    "\u4EC0",
+    "\u8336",
+    "\u523A",
+    "\u5207",
+    "\u5EA6",
+    "\u62D3",
+    "\u7CD6",
+    "\u5B85",
+    "\u6D1E",
+    "\u66B4",
+    "\u8F3B",
+    "\u964D",
+    "\u5ED3",
+    "\u5140",
+    "\u55C0",
+    "\u585A",
+    "\u6674",
+    "\u51DE",
+    "\u732A",
+    "\u76CA",
+    "\u793C",
+    "\u795E",
+    "\u7965",
+    "\u798F",
+    "\u9756",
+    "\u7CBE",
+    "\u8612",
+    "\u8AF8",
+    "\u9038",
+    "\u90FD",
+    "\u98EF",
+    "\u98FC",
+    "\u9928",
+    "\u9DB4",
+    "\u4FAE",
+    "\u50E7",
+    "\u514D",
+    "\u52C9",
+    "\u52E4",
+    "\u5351",
+    "\u559D",
+    "\u5606",
+    "\u5668",
+    "\u5840",
+    "\u58A8",
+    "\u5C64",
+    "\u6094",
+    "\u6168",
+    "\u618E",
+    "\u61F2",
+    "\u654F",
+    "\u65E2",
+    "\u6691",
+    "\u6885",
+    "\u6D77",
+    "\u6E1A",
+    "\u6F22",
+    "\u716E",
+    "\u722B",
+    "\u7422",
+    "\u7891",
+    "\u7949",
+    "\u7948",
+    "\u7950",
+    "\u7956",
+    "\u798D",
+    "\u798E",
+    "\u7A40",
+    "\u7A81",
+    "\u7BC0",
+    "\u7E09",
+    "\u7E41",
+    "\u7F72",
+    "\u8005",
+    "\u81ED",
+    "\u8279",
+    "\u8457",
+    "\u8910",
+    "\u8996",
+    "\u8B01",
+    "\u8B39",
+    "\u8CD3",
+    "\u8D08",
+    "\u8FB6",
+    "\u96E3",
+    "\u97FF",
+    "\u983B",
+    "\u4E26",
+    "\u51B5",
+    "\u5168",
+    "\u4F80",
+    "\u5145",
+    "\u5180",
+    "\u52C7",
+    "\u52FA",
+    "\u5555",
+    "\u5599",
+    "\u55E2",
+    "\u58B3",
+    "\u5944",
+    "\u5954",
+    "\u5A62",
+    "\u5B28",
+    "\u5ED2",
+    "\u5ED9",
+    "\u5F69",
+    "\u5FAD",
+    "\u60D8",
+    "\u614E",
+    "\u6108",
+    "\u6160",
+    "\u6234",
+    "\u63C4",
+    "\u641C",
+    "\u6452",
+    "\u6556",
+    "\u671B",
+    "\u6756",
+    "\u6EDB",
+    "\u6ECB",
+    "\u701E",
+    "\u77A7",
+    "\u7235",
+    "\u72AF",
+    "\u7471",
+    "\u7506",
+    "\u753B",
+    "\u761D",
+    "\u761F",
+    "\u76DB",
+    "\u76F4",
+    "\u774A",
+    "\u7740",
+    "\u78CC",
+    "\u7AB1",
+    "\u7C7B",
+    "\u7D5B",
+    "\u7F3E",
+    "\u8352",
+    "\u83EF",
+    "\u8779",
+    "\u8941",
+    "\u8986",
+    "\u8ABF",
+    "\u8ACB",
+    "\u8AED",
+    "\u8B8A",
+    "\u8F38",
+    "\u9072",
+    "\u9199",
+    "\u9276",
+    "\u967C",
+    "\u97DB",
+    "\u980B",
+    "\u9B12",
+    "\u2284A",
+    "\u22844",
+    "\u233D5",
+    "\u3B9D",
+    "\u4018",
+    "\u4039",
+    "\u25249",
+    "\u25CD0",
+    "\u27ED3",
+    "\u9F43",
+    "\u9F8E",
+    "\u0066\u0066",
+    "\u0066\u0069",
+    "\u0066\u006C",
+    "\u0066\u0066\u0069",
+    "\u0066\u0066\u006C",
+    "\u0073\u0074",
+    "\u0574\u0576",
+    "\u0574\u0565",
+    "\u0574\u056B",
+    "\u057E\u0576",
+    "\u0574\u056D",
+    "\u05D9\u05B4",
+    "\u05F2\u05B7",
+    "\u05E2",
+    "\u05D4",
+    "\u05DB",
+    "\u05DC",
+    "\u05DD",
+    "\u05E8",
+    "\u05EA",
+    "\u05E9\u05C1",
+    "\u05E9\u05C2",
+    "\u05E9\u05BC\u05C1",
+    "\u05E9\u05BC\u05C2",
+    "\u05D0\u05B7",
+    "\u05D0\u05B8",
+    "\u05D0\u05BC",
+    "\u05D1\u05BC",
+    "\u05D2\u05BC",
+    "\u05D3\u05BC",
+    "\u05D4\u05BC",
+    "\u05D5\u05BC",
+    "\u05D6\u05BC",
+    "\u05D8\u05BC",
+    "\u05D9\u05BC",
+    "\u05DA\u05BC",
+    "\u05DB\u05BC",
+    "\u05DC\u05BC",
+    "\u05DE\u05BC",
+    "\u05E0\u05BC",
+    "\u05E1\u05BC",
+    "\u05E3\u05BC",
+    "\u05E4\u05BC",
+    "\u05E6\u05BC",
+    "\u05E7\u05BC",
+    "\u05E8\u05BC",
+    "\u05E9\u05BC",
+    "\u05EA\u05BC",
+    "\u05D5\u05B9",
+    "\u05D1\u05BF",
+    "\u05DB\u05BF",
+    "\u05E4\u05BF",
+    "\u05D0\u05DC",
+    "\u0671",
+    "\u067B",
+    "\u067E",
+    "\u0680",
+    "\u067A",
+    "\u067F",
+    "\u0679",
+    "\u06A4",
+    "\u06A6",
+    "\u0684",
+    "\u0683",
+    "\u0686",
+    "\u0687",
+    "\u068D",
+    "\u068C",
+    "\u068E",
+    "\u0688",
+    "\u0698",
+    "\u0691",
+    "\u06A9",
+    "\u06AF",
+    "\u06B3",
+    "\u06B1",
+    "\u06BA",
+    "\u06BB",
+    "\u06C1",
+    "\u06BE",
+    "\u06D2",
+    "\u06AD",
+    "\u06C7",
+    "\u06C6",
+    "\u06C8",
+    "\u06CB",
+    "\u06C5",
+    "\u06C9",
+    "\u06D0",
+    "\u0649",
+    "\u064A\u0654\u0627",
+    "\u064A\u0654\u06D5",
+    "\u064A\u0654\u0648",
+    "\u064A\u0654\u06C7",
+    "\u064A\u0654\u06C6",
+    "\u064A\u0654\u06C8",
+    "\u064A\u0654\u06D0",
+    "\u064A\u0654\u0649",
+    "\u06CC",
+    "\u064A\u0654\u062C",
+    "\u064A\u0654\u062D",
+    "\u064A\u0654\u0645",
+    "\u064A\u0654\u064A",
+    "\u0628\u062C",
+    "\u0628\u062D",
+    "\u0628\u062E",
+    "\u0628\u0645",
+    "\u0628\u0649",
+    "\u0628\u064A",
+    "\u062A\u062C",
+    "\u062A\u062D",
+    "\u062A\u062E",
+    "\u062A\u0645",
+    "\u062A\u0649",
+    "\u062A\u064A",
+    "\u062B\u062C",
+    "\u062B\u0645",
+    "\u062B\u0649",
+    "\u062B\u064A",
+    "\u062C\u062D",
+    "\u062C\u0645",
+    "\u062D\u062C",
+    "\u062D\u0645",
+    "\u062E\u062C",
+    "\u062E\u062D",
+    "\u062E\u0645",
+    "\u0633\u062C",
+    "\u0633\u062D",
+    "\u0633\u062E",
+    "\u0633\u0645",
+    "\u0635\u062D",
+    "\u0635\u0645",
+    "\u0636\u062C",
+    "\u0636\u062D",
+    "\u0636\u062E",
+    "\u0636\u0645",
+    "\u0637\u062D",
+    "\u0637\u0645",
+    "\u0638\u0645",
+    "\u0639\u062C",
+    "\u0639\u0645",
+    "\u063A\u062C",
+    "\u063A\u0645",
+    "\u0641\u062C",
+    "\u0641\u062D",
+    "\u0641\u062E",
+    "\u0641\u0645",
+    "\u0641\u0649",
+    "\u0641\u064A",
+    "\u0642\u062D",
+    "\u0642\u0645",
+    "\u0642\u0649",
+    "\u0642\u064A",
+    "\u0643\u0627",
+    "\u0643\u062C",
+    "\u0643\u062D",
+    "\u0643\u062E",
+    "\u0643\u0644",
+    "\u0643\u0645",
+    "\u0643\u0649",
+    "\u0643\u064A",
+    "\u0644\u062C",
+    "\u0644\u062D",
+    "\u0644\u062E",
+    "\u0644\u0645",
+    "\u0644\u0649",
+    "\u0644\u064A",
+    "\u0645\u062C",
+    "\u0645\u062D",
+    "\u0645\u062E",
+    "\u0645\u0645",
+    "\u0645\u0649",
+    "\u0645\u064A",
+    "\u0646\u062C",
+    "\u0646\u062D",
+    "\u0646\u062E",
+    "\u0646\u0645",
+    "\u0646\u0649",
+    "\u0646\u064A",
+    "\u0647\u062C",
+    "\u0647\u0645",
+    "\u0647\u0649",
+    "\u0647\u064A",
+    "\u064A\u062C",
+    "\u064A\u062D",
+    "\u064A\u062E",
+    "\u064A\u0645",
+    "\u064A\u0649",
+    "\u064A\u064A",
+    "\u0630\u0670",
+    "\u0631\u0670",
+    "\u0649\u0670",
+    "\u0020\u064C\u0651",
+    "\u0020\u064D\u0651",
+    "\u0020\u064E\u0651",
+    "\u0020\u064F\u0651",
+    "\u0020\u0650\u0651",
+    "\u0020\u0651\u0670",
+    "\u064A\u0654\u0631",
+    "\u064A\u0654\u0632",
+    "\u064A\u0654\u0646",
+    "\u0628\u0631",
+    "\u0628\u0632",
+    "\u0628\u0646",
+    "\u062A\u0631",
+    "\u062A\u0632",
+    "\u062A\u0646",
+    "\u062B\u0631",
+    "\u062B\u0632",
+    "\u062B\u0646",
+    "\u0645\u0627",
+    "\u0646\u0631",
+    "\u0646\u0632",
+    "\u0646\u0646",
+    "\u064A\u0631",
+    "\u064A\u0632",
+    "\u064A\u0646",
+    "\u064A\u0654\u062E",
+    "\u064A\u0654\u0647",
+    "\u0628\u0647",
+    "\u062A\u0647",
+    "\u0635\u062E",
+    "\u0644\u0647",
+    "\u0646\u0647",
+    "\u0647\u0670",
+    "\u064A\u0647",
+    "\u062B\u0647",
+    "\u0633\u0647",
+    "\u0634\u0645",
+    "\u0634\u0647",
+    "\u0640\u064E\u0651",
+    "\u0640\u064F\u0651",
+    "\u0640\u0650\u0651",
+    "\u0637\u0649",
+    "\u0637\u064A",
+    "\u0639\u0649",
+    "\u0639\u064A",
+    "\u063A\u0649",
+    "\u063A\u064A",
+    "\u0633\u0649",
+    "\u0633\u064A",
+    "\u0634\u0649",
+    "\u0634\u064A",
+    "\u062D\u0649",
+    "\u062D\u064A",
+    "\u062C\u0649",
+    "\u062C\u064A",
+    "\u062E\u0649",
+    "\u062E\u064A",
+    "\u0635\u0649",
+    "\u0635\u064A",
+    "\u0636\u0649",
+    "\u0636\u064A",
+    "\u0634\u062C",
+    "\u0634\u062D",
+    "\u0634\u062E",
+    "\u0634\u0631",
+    "\u0633\u0631",
+    "\u0635\u0631",
+    "\u0636\u0631",
+    "\u0627\u064B",
+    "\u062A\u062C\u0645",
+    "\u062A\u062D\u062C",
+    "\u062A\u062D\u0645",
+    "\u062A\u062E\u0645",
+    "\u062A\u0645\u062C",
+    "\u062A\u0645\u062D",
+    "\u062A\u0645\u062E",
+    "\u062C\u0645\u062D",
+    "\u062D\u0645\u064A",
+    "\u062D\u0645\u0649",
+    "\u0633\u062D\u062C",
+    "\u0633\u062C\u062D",
+    "\u0633\u062C\u0649",
+    "\u0633\u0645\u062D",
+    "\u0633\u0645\u062C",
+    "\u0633\u0645\u0645",
+    "\u0635\u062D\u062D",
+    "\u0635\u0645\u0645",
+    "\u0634\u062D\u0645",
+    "\u0634\u062C\u064A",
+    "\u0634\u0645\u062E",
+    "\u0634\u0645\u0645",
+    "\u0636\u062D\u0649",
+    "\u0636\u062E\u0645",
+    "\u0637\u0645\u062D",
+    "\u0637\u0645\u0645",
+    "\u0637\u0645\u064A",
+    "\u0639\u062C\u0645",
+    "\u0639\u0645\u0645",
+    "\u0639\u0645\u0649",
+    "\u063A\u0645\u0645",
+    "\u063A\u0645\u064A",
+    "\u063A\u0645\u0649",
+    "\u0641\u062E\u0645",
+    "\u0642\u0645\u062D",
+    "\u0642\u0645\u0645",
+    "\u0644\u062D\u0645",
+    "\u0644\u062D\u064A",
+    "\u0644\u062D\u0649",
+    "\u0644\u062C\u062C",
+    "\u0644\u062E\u0645",
+    "\u0644\u0645\u062D",
+    "\u0645\u062D\u062C",
+    "\u0645\u062D\u0645",
+    "\u0645\u062D\u064A",
+    "\u0645\u062C\u062D",
+    "\u0645\u062C\u0645",
+    "\u0645\u062E\u062C",
+    "\u0645\u062E\u0645",
+    "\u0645\u062C\u062E",
+    "\u0647\u0645\u062C",
+    "\u0647\u0645\u0645",
+    "\u0646\u062D\u0645",
+    "\u0646\u062D\u0649",
+    "\u0646\u062C\u0645",
+    "\u0646\u062C\u0649",
+    "\u0646\u0645\u064A",
+    "\u0646\u0645\u0649",
+    "\u064A\u0645\u0645",
+    "\u0628\u062E\u064A",
+    "\u062A\u062C\u064A",
+    "\u062A\u062C\u0649",
+    "\u062A\u062E\u064A",
+    "\u062A\u062E\u0649",
+    "\u062A\u0645\u064A",
+    "\u062A\u0645\u0649",
+    "\u062C\u0645\u064A",
+    "\u062C\u062D\u0649",
+    "\u062C\u0645\u0649",
+    "\u0633\u062E\u0649",
+    "\u0635\u062D\u064A",
+    "\u0634\u062D\u064A",
+    "\u0636\u062D\u064A",
+    "\u0644\u062C\u064A",
+    "\u0644\u0645\u064A",
+    "\u064A\u062D\u064A",
+    "\u064A\u062C\u064A",
+    "\u064A\u0645\u064A",
+    "\u0645\u0645\u064A",
+    "\u0642\u0645\u064A",
+    "\u0646\u062D\u064A",
+    "\u0639\u0645\u064A",
+    "\u0643\u0645\u064A",
+    "\u0646\u062C\u062D",
+    "\u0645\u062E\u064A",
+    "\u0644\u062C\u0645",
+    "\u0643\u0645\u0645",
+    "\u062C\u062D\u064A",
+    "\u062D\u062C\u064A",
+    "\u0645\u062C\u064A",
+    "\u0641\u0645\u064A",
+    "\u0628\u062D\u064A",
+    "\u0633\u062E\u064A",
+    "\u0646\u062C\u064A",
+    "\u0635\u0644\u06D2",
+    "\u0642\u0644\u06D2",
+    "\u0627\u0644\u0644\u0647",
+    "\u0627\u0643\u0628\u0631",
+    "\u0645\u062D\u0645\u062F",
+    "\u0635\u0644\u0639\u0645",
+    "\u0631\u0633\u0648\u0644",
+    "\u0639\u0644\u064A\u0647",
+    "\u0648\u0633\u0644\u0645",
+    "\u0635\u0644\u0649",
+    "\u0635\u0644\u0649\u0020\u0627\u0644\u0644\u0647\u0020\u0639\u0644\u064A\u0647\u0020\u0648\u0633\u0644\u0645",
+    "\u062C\u0644\u0020\u062C\u0644\u0627\u0644\u0647",
+    "\u0631\u06CC\u0627\u0644",
+    "\u002C",
+    "\u3001",
+    "\u3002",
+    "\u003A",
+    "\u0021",
+    "\u003F",
+    "\u3016",
+    "\u3017",
+    "\u2014",
+    "\u2013",
+    "\u005F",
+    "\u007B",
+    "\u007D",
+    "\u3014",
+    "\u3015",
+    "\u3010",
+    "\u3011",
+    "\u300A",
+    "\u300B",
+    "\u300C",
+    "\u300D",
+    "\u300E",
+    "\u300F",
+    "\u005B",
+    "\u005D",
+    "\u0023",
+    "\u0026",
+    "\u002A",
+    "\u002D",
+    "\u003C",
+    "\u003E",
+    "\\",
+    "\u0024",
+    "\u0025",
+    "\u0040",
+    "\u0020\u064B",
+    "\u0640\u064B",
+    "\u0020\u064C",
+    "\u0020\u064D",
+    "\u0020\u064E",
+    "\u0640\u064E",
+    "\u0020\u064F",
+    "\u0640\u064F",
+    "\u0020\u0650",
+    "\u0640\u0650",
+    "\u0020\u0651",
+    "\u0640\u0651",
+    "\u0020\u0652",
+    "\u0640\u0652",
+    "\u0621",
+    "\u0627",
+    "\u0628",
+    "\u0629",
+    "\u062A",
+    "\u062B",
+    "\u062C",
+    "\u062D",
+    "\u062E",
+    "\u062F",
+    "\u0630",
+    "\u0631",
+    "\u0632",
+    "\u0633",
+    "\u0634",
+    "\u0635",
+    "\u0636",
+    "\u0637",
+    "\u0638",
+    "\u0639",
+    "\u063A",
+    "\u0641",
+    "\u0642",
+    "\u0643",
+    "\u0644",
+    "\u0645",
+    "\u0646",
+    "\u0647",
+    "\u0648",
+    "\u064A",
+    "\u0644\u0627\u0653",
+    "\u0644\u0627\u0654",
+    "\u0644\u0627\u0655",
+    "\u0644\u0627",
+    "\"",
+    "\u0027",
+    "\u002F",
+    "\u005E",
+    "\u007C",
+    "\u007E",
+    "\u2985",
+    "\u2986",
+    "\u30FB",
+    "\u30A1",
+    "\u30A3",
+    "\u30A5",
+    "\u30A7",
+    "\u30A9",
+    "\u30E3",
+    "\u30E5",
+    "\u30E7",
+    "\u30C3",
+    "\u30FC",
+    "\u30F3",
+    "\u3099",
+    "\u309A",
+    "\u00A2",
+    "\u00A3",
+    "\u00AC",
+    "\u00A6",
+    "\u00A5",
+    "\u20A9",
+    "\u2502",
+    "\u2190",
+    "\u2191",
+    "\u2192",
+    "\u2193",
+    "\u25A0",
+    "\u25CB",
+  };
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/IDNA.cs b/lib/agsxmpp/agsxmpp/Idn/IDNA.cs
new file mode 100644
index 0000000..146af47
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/IDNA.cs
@@ -0,0 +1,305 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Idn
+{	
+	public class IDNA
+	{
+		public const string ACE_PREFIX = "xn--";
+		
+		/// <summary>
+        /// Converts a Unicode string to ASCII using the procedure in RFC3490
+		/// section 4.1. Unassigned characters are not allowed and STD3 ASCII
+		/// rules are enforced. The input string may be a domain name
+		/// containing dots.
+		/// </summary>
+		/// <param name="input">Unicode string.</param>
+		/// <returns> Encoded string.</returns>
+		public static string ToASCII(string input)
+		{
+			StringBuilder o = new StringBuilder();
+			StringBuilder h = new StringBuilder();
+			
+			for (int i = 0; i < input.Length; i++)
+			{
+				char c = input[i];
+				if (c == '.' || c == '\u3002' || c == '\uff0e' || c == '\uff61')
+				{
+					o.Append(ToASCII(h.ToString(), false, true));
+                    o.Append('.');
+					h = new StringBuilder();
+				}
+				else
+				{
+					h.Append(c);
+				}
+			}
+			o.Append(ToASCII(h.ToString(), false, true));
+			return o.ToString();
+		}
+		
+		/// <summary>
+        /// Converts a Unicode string to ASCII using the procedure in RFC3490
+		/// section 4.1. Unassigned characters are not allowed and STD3 ASCII
+		/// rules are enforced.
+        /// </summary>
+		/// <param name="input">Unicode string.</param>
+		/// <param name="allowUnassigned">Unassigned characters, allowed or not?</param>
+		/// <param name="useSTD3ASCIIRules">STD3 ASCII rules, enforced or not?</param>
+		/// <returns> Encoded string.</returns>
+		public static string ToASCII(string input, bool allowUnassigned, bool useSTD3ASCIIRules)
+		{
+			// Step 1: Check if the string contains code points outside
+			//         the ASCII range 0..0x7c.
+			
+			bool nonASCII = false;
+			
+			for (int i = 0; i < input.Length; i++)
+			{
+				int c = input[i];
+				if (c > 0x7f)
+				{
+					nonASCII = true;
+					break;
+				}
+			}
+			
+			// Step 2: Perform the nameprep operation.
+			
+			if (nonASCII)
+			{
+				try
+				{
+					input = Stringprep.NamePrep(input, allowUnassigned);
+				}
+				catch (StringprepException e)
+				{
+					// TODO 
+					throw new IDNAException(e);
+				}
+			}
+			
+			// Step 3: - Verify the absence of non-LDH ASCII code points
+			//    (char) 0..0x2c, 0x2e..0x2f, 0x3a..0x40, 0x5b..0x60,
+			//    (char) 0x7b..0x7f
+			//         - Verify the absence of leading and trailing
+			//           hyphen-minus
+			
+			if (useSTD3ASCIIRules)
+			{
+				for (int i = 0; i < input.Length; i++)
+				{
+					int c = input[i];
+					if ((c <= 0x2c) || (c >= 0x2e && c <= 0x2f) || (c >= 0x3a && c <= 0x40) || (c >= 0x5b && c <= 0x60) || (c >= 0x7b && c <= 0x7f))
+					{
+						throw new IDNAException(IDNAException.CONTAINS_NON_LDH);
+					}
+				}
+				
+				if (input.StartsWith("-") || input.EndsWith("-"))
+				{
+					throw new IDNAException(IDNAException.CONTAINS_HYPHEN);
+				}
+			}
+			
+			// Step 4: If all code points are inside 0..0x7f, skip to step 8
+			
+			nonASCII = false;
+			
+			for (int i = 0; i < input.Length; i++)
+			{
+				int c = input[i];
+				if (c > 0x7f)
+				{
+					nonASCII = true;
+					break;
+				}
+			}
+			
+			string output = input;
+			
+			if (nonASCII)
+			{
+				
+				// Step 5: Verify that the sequence does not begin with the ACE prefix.
+				
+				if (input.StartsWith(ACE_PREFIX))
+				{
+					throw new IDNAException(IDNAException.CONTAINS_ACE_PREFIX);
+				}
+				
+				// Step 6: Punycode
+				
+				try
+				{
+					output = Punycode.Encode(input);
+				}
+				catch (PunycodeException e)
+				{
+					// TODO
+					throw new IDNAException(e);
+				}
+				
+				// Step 7: Prepend the ACE prefix.
+				
+				output = ACE_PREFIX + output;
+			}
+			
+			// Step 8: Check that the length is inside 1..63.
+			
+			if (output.Length < 1 || output.Length > 63)
+			{
+				throw new IDNAException(IDNAException.TOO_LONG);
+			}
+			
+			return output;
+		}
+		
+		/// <summary>
+        /// Converts an ASCII-encoded string to Unicode. Unassigned
+		/// characters are not allowed and STD3 hostnames are enforced. Input
+		/// may be domain name containing dots.
+		/// </summary>
+		/// <param name="input">ASCII input string.</param>
+		/// <returns> Unicode string.</returns>
+		public static string ToUnicode(string input)
+		{
+            input = input.ToLower();
+			StringBuilder o = new StringBuilder();
+			StringBuilder h = new StringBuilder();
+			
+			for (int i = 0; i < input.Length; i++)
+			{
+				char c = input[i];
+				if (c == '.' || c == '\u3002' || c == '\uff0e' || c == '\uff61')
+				{
+					o.Append(ToUnicode(h.ToString(), false, true));
+					o.Append(c);
+					h = new StringBuilder();
+				}
+				else
+				{
+					h.Append(c);
+				}
+			}
+			o.Append(ToUnicode(h.ToString(), false, true));
+			return o.ToString();
+		}
+		
+		/// <summary>
+        /// Converts an ASCII-encoded string to Unicode.		
+		/// </summary>
+		/// <param name="input">ASCII input string.</param>
+		/// <param name="allowUnassigned">Allow unassigned Unicode characters.</param>
+		/// <param name="useSTD3ASCIIRules">Check that the output conforms to STD3.</param>
+		/// <returns>Unicode string.</returns>
+		public static string ToUnicode(string input, bool allowUnassigned, bool useSTD3ASCIIRules)
+		{
+			string original = input;
+			bool nonASCII = false;
+			
+			// Step 1: If all code points are inside 0..0x7f, skip to step 3.
+			
+			for (int i = 0; i < input.Length; i++)
+			{
+				int c = input[i];
+				if (c > 0x7f)
+				{
+					nonASCII = true;
+					break;
+				}
+			}
+			
+			// Step 2: Perform the Nameprep operation.
+			
+			if (nonASCII)
+			{
+				try
+				{
+					input = Stringprep.NamePrep(input, allowUnassigned);
+				}
+				catch (StringprepException e)
+				{
+					// ToUnicode never fails!
+					return original;
+				}
+			}
+			
+			// Step 3: Verify the sequence starts with the ACE prefix.
+			
+			if (!input.StartsWith(ACE_PREFIX))
+			{
+				// ToUnicode never fails!
+				return original;
+			}
+			
+			string stored = input;
+			
+			// Step 4: Remove the ACE prefix.
+			
+			input = input.Substring(ACE_PREFIX.Length);
+			
+			// Step 5: Decode using punycode
+			
+			string output;
+			
+			try
+			{
+				output = Punycode.Decode(input);
+			}
+			catch (PunycodeException e)
+			{
+				// ToUnicode never fails!
+				return original;
+			}
+			
+			// Step 6: Apply toASCII
+			
+			string ascii;
+			
+			try
+			{
+				ascii = ToASCII(output, allowUnassigned, useSTD3ASCIIRules);
+			}
+			catch (IDNAException e)
+			{
+				// ToUnicode never fails!
+				return original;
+			}
+			
+			// Step 7: Compare case-insensitively.
+			
+			if (!ascii.ToUpper().Equals(stored.ToUpper()))
+			{
+				// ToUnicode never fails!
+				return original;
+			}
+			
+			// Step 8: Return the result.
+			
+			return output;
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/IDNAException.cs b/lib/agsxmpp/agsxmpp/Idn/IDNAException.cs
new file mode 100644
index 0000000..1d41f91
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/IDNAException.cs
@@ -0,0 +1,48 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+
+namespace agsXMPP.Idn
+{		
+	public class IDNAException : System.Exception
+	{
+		public static string CONTAINS_NON_LDH		= "Contains non-LDH characters.";
+		public static string CONTAINS_HYPHEN		= "Leading or trailing hyphen not allowed.";
+		public static string CONTAINS_ACE_PREFIX	= "ACE prefix (xn--) not allowed.";
+		public static string TOO_LONG				= "String too long.";
+		
+		public IDNAException(string m) : base(m)
+		{
+		
+		}
+
+		// TODO
+		public IDNAException(StringprepException e) :base( "", e)
+		{
+		}
+		
+		public IDNAException(PunycodeException e) : base( "", e)
+		{
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/NFKC.cs b/lib/agsxmpp/agsxmpp/Idn/NFKC.cs
new file mode 100644
index 0000000..2366d18
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/NFKC.cs
@@ -0,0 +1,373 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Idn
+{		
+	public class NFKC
+	{
+		/// <summary>
+        /// Applies NFKC normalization to a string.
+        /// </summary>
+		/// <param name="in">The string to normalize.</param>
+		/// <returns> An NFKC normalized string.</returns>
+		public static string NormalizeNFKC(string sbIn)
+		{
+			StringBuilder sbOut = new StringBuilder();
+			
+			for (int i = 0; i < sbIn.Length; i++)
+			{
+				char code = sbIn[i];
+				
+				// In Unicode 3.0, Hangul was defined as the block from U+AC00
+				// to U+D7A3, however, since Unicode 3.2 the block extends until
+				// U+D7AF. The decomposeHangul function only decomposes until
+				// U+D7A3. Should this be changed?
+				if (code >= 0xAC00 && code <= 0xD7AF)
+				{
+					sbOut.Append(decomposeHangul(code));
+				}
+				else
+				{
+					int index = decomposeIndex(code);
+					if (index == - 1)
+					{
+						sbOut.Append(code);
+					}
+					else
+					{
+						sbOut.Append(DecompositionMappings.m[index]);
+					}
+				}
+			}
+			
+			// Bring the stringbuffer into canonical order.
+			canonicalOrdering(sbOut);
+			
+			// Do the canonical composition.
+			int last_cc = 0;
+			int last_start = 0;
+			
+			for (int i = 0; i < sbOut.Length; i++)
+			{
+				int cc = combiningClass(sbOut[i]);
+				
+				if (i > 0 && (last_cc == 0 || last_cc != cc))
+				{
+					// Try to combine characters
+					char a = sbOut[last_start];
+					char b = sbOut[i];
+					
+					int c = compose(a, b);
+					
+					if (c != - 1)
+					{
+						sbOut[last_start] = (char) c;
+						//sbOut.deleteCharAt(i);
+						sbOut.Remove(i, 1);
+						i--;
+						
+						if (i == last_start)
+						{
+							last_cc = 0;
+						}
+						else
+						{
+							last_cc = combiningClass(sbOut[i - 1]);
+						}
+						continue;
+					}
+				}
+				
+				if (cc == 0)
+				{
+					last_start = i;
+				}
+				
+				last_cc = cc;
+			}
+			
+			return sbOut.ToString();
+		}
+		
+		
+		/// <summary>
+        /// Returns the index inside the decomposition table, implemented
+		/// using a binary search.
+		/// </summary>
+		/// <param name="c">Character to look up.</param>
+		/// <returns> Index if found, -1 otherwise.</returns>
+		internal static int decomposeIndex(char c)
+		{
+			int start = 0;
+			int end = DecompositionKeys.k.Length / 2;
+			
+			while (true)
+			{
+				int half = (start + end) / 2;
+				int code = DecompositionKeys.k[half * 2];
+				
+				if (c == code)
+				{
+					return DecompositionKeys.k[half * 2 + 1];
+				}
+				if (half == start)
+				{
+					// Character not found
+					return - 1;
+				}
+				else if (c > code)
+				{
+					start = half;
+				}
+				else
+				{
+					end = half;
+				}
+			}
+		}
+		
+		/// <summary>
+        /// Returns the combining class of a given character.
+		/// </summary>
+		/// <param name="c">The character.</param>
+		/// <returns> The combining class.</returns>
+		internal static int combiningClass(char c)
+		{
+			int h = c >> 8;
+			int l = c & 0xff;
+			
+			int i = CombiningClass.i[h];
+			if (i > - 1)
+			{
+				return CombiningClass.c[i, l];
+			}
+			else
+			{
+				return 0;
+			}
+		}
+		
+		/// <summary>
+        /// Rearranges characters in a stringbuffer in order to respect the
+		/// canonical ordering properties.
+		/// </summary>
+		/// <param name="The">StringBuffer to rearrange.</param>
+		internal static void  canonicalOrdering(StringBuilder sbIn)
+		{
+			bool isOrdered = false;
+			
+			while (!isOrdered)
+			{
+				isOrdered = true;
+				
+
+				// 24.10.2005
+				int lastCC = 0;
+				if (sbIn.Length > 0)
+					lastCC = combiningClass(sbIn[0]);
+				
+				for (int i = 0; i < sbIn.Length - 1; i++)
+				{
+					int nextCC = combiningClass(sbIn[i + 1]);
+					if (nextCC != 0 && lastCC > nextCC)
+					{
+						for (int j = i + 1; j > 0; j--)
+						{
+							if (combiningClass(sbIn[j - 1]) <= nextCC)
+							{
+								break;
+							}
+							char t = sbIn[j];
+							sbIn[j] = sbIn[j - 1];
+							sbIn[j - 1] = t;
+							isOrdered = false;
+						}
+						nextCC = lastCC;
+					}
+					lastCC = nextCC;
+				}
+			}
+		}
+		
+		/// <summary>
+        /// Returns the index inside the composition table.		
+		/// </summary>
+		/// <param name="a">Character to look up.</param>
+		/// <returns> Index if found, -1 otherwise.</returns>
+		internal static int composeIndex(char a)
+		{
+			if (a >> 8 >= Composition.composePage.Length)
+			{
+				return - 1;
+			}
+			int ap = Composition.composePage[a >> 8];
+			if (ap == - 1)
+			{
+				return - 1;
+			}
+			return Composition.composeData[ap, a & 0xff];
+		}
+		
+		/// <summary>
+        /// Tries to compose two characters canonically.
+		/// </summary>
+		/// <param name="a">First character.</param>
+		/// <param name="b">Second character.</param>
+		/// <returns> The composed character or -1 if no composition could be found.</returns>
+		internal static int compose(char a, char b)
+		{
+			int h = composeHangul(a, b);
+			if (h != - 1)
+			{
+				return h;
+			}
+			
+			int ai = composeIndex(a);
+			
+			if (ai >= Composition.singleFirstStart && ai < Composition.singleSecondStart)
+			{
+				if (b == Composition.singleFirst[ai - Composition.singleFirstStart, 0])                
+				{
+					return Composition.singleFirst[ai - Composition.singleFirstStart, 1];                    
+				}
+				else
+				{
+					return - 1;
+				}
+			}
+
+			
+			int bi = composeIndex(b);
+			
+			if (bi >= Composition.singleSecondStart)
+			{
+				if (a == Composition.singleSecond[bi - Composition.singleSecondStart,0])
+				{
+					return Composition.singleSecond[bi - Composition.singleSecondStart,1];
+				}
+				else
+				{
+					return - 1;
+				}
+			}
+			
+			if (ai >= 0 && ai < Composition.multiSecondStart && bi >= Composition.multiSecondStart && bi < Composition.singleFirstStart)
+			{
+				char[] f = Composition.multiFirst[ai];
+				
+				if (bi - Composition.multiSecondStart < f.Length)
+				{
+					char r = f[bi - Composition.multiSecondStart];
+					if (r == 0)
+					{
+						return - 1;
+					}
+					else
+					{
+						return r;
+					}
+				}
+			}			
+			
+			return - 1;
+		}
+		
+		/// <summary>
+        /// Entire hangul code copied from:
+		/// http://www.unicode.org/unicode/reports/tr15/
+		/// Several hangul specific constants
+		/// </summary>
+		internal const int SBase = 0xAC00;
+		internal const int LBase = 0x1100;
+		internal const int VBase = 0x1161;
+		internal const int TBase = 0x11A7;
+		internal const int LCount = 19;
+		internal const int VCount = 21;
+		internal const int TCount = 28;
+		
+		internal static readonly int NCount = VCount * TCount;
+		
+		internal static readonly int SCount = LCount * NCount;
+		
+		/// <summary>
+        /// Decomposes a hangul character.
+		/// </summary>
+		/// <param name="s">A character to decompose.</param>
+		/// <returns> A string containing the hangul decomposition of the input
+		/// character. If no hangul decomposition can be found, a string
+		/// containing the character itself is returned.</returns>
+		internal static string decomposeHangul(char s)
+		{
+			int SIndex = s - SBase;
+			if (SIndex < 0 || SIndex >= SCount)
+			{
+				return s.ToString();
+			}
+			StringBuilder result = new StringBuilder();
+			int L = LBase + SIndex / NCount;
+			int V = VBase + (SIndex % NCount) / TCount;
+			int T = TBase + SIndex % TCount;
+			result.Append((char) L);
+			result.Append((char) V);
+			if (T != TBase)
+				result.Append((char) T);
+			return result.ToString();
+		}
+		
+		/// <summary>
+        /// Composes two hangul characters.
+		/// </summary>
+		/// <param name="a">First character.</param>
+		/// <param name="b">Second character.</param>
+		/// <returns> Returns the composed character or -1 if the two characters cannot be composed.</returns>
+		internal static int composeHangul(char a, char b)
+		{
+			// 1. check to see if two current characters are L and V
+			int LIndex = a - LBase;
+			if (0 <= LIndex && LIndex < LCount)
+			{
+				int VIndex = b - VBase;
+				if (0 <= VIndex && VIndex < VCount)
+				{
+					// make syllable of form LV
+					return SBase + (LIndex * VCount + VIndex) * TCount;
+				}
+			}
+			
+			// 2. check to see if two current characters are LV and T
+			int SIndex = a - SBase;
+			if (0 <= SIndex && SIndex < SCount && (SIndex % TCount) == 0)
+			{
+				int TIndex = b - TBase;
+				if (0 <= TIndex && TIndex <= TCount)
+				{
+					// make syllable of form LVT
+					return a + TIndex;
+				}
+			}
+			return - 1;
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/Punycode.cs b/lib/agsxmpp/agsxmpp/Idn/Punycode.cs
new file mode 100644
index 0000000..b134687
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/Punycode.cs
@@ -0,0 +1,298 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Idn
+{	
+	
+	public class Punycode
+	{
+		/* Punycode parameters */
+		internal const int TMIN = 1;
+		internal const int TMAX = 26;
+		internal const int BASE = 36;
+		internal const int INITIAL_N = 128;
+		internal const int INITIAL_BIAS = 72;
+		internal const int DAMP = 700;
+		internal const int SKEW = 38;
+		internal const char DELIMITER = '-';
+		
+		/// <summary>
+        /// Punycodes a unicode string.
+		/// </summary>
+		/// <param name="input">Unicode string.</param>
+		/// <returns> Punycoded string.</returns>
+		public static string Encode(string input)
+		{
+			int n = INITIAL_N;
+			int delta = 0;
+			int bias = INITIAL_BIAS;
+			StringBuilder output = new StringBuilder();
+			
+			// Copy all basic code points to the output
+			int b = 0;
+			for (int i = 0; i < input.Length; i++)
+			{
+				char c = input[i];
+				if (IsBasic(c))
+				{
+					output.Append(c);
+					b++;
+				}
+			}
+			
+			// Append delimiter
+			if (b > 0)
+			{
+				output.Append(DELIMITER);
+			}
+			
+			int h = b;
+			while (h < input.Length)
+			{
+				int m = System.Int32.MaxValue;
+				
+				// Find the minimum code point >= n
+				for (int i = 0; i < input.Length; i++)
+				{
+					int c = input[i];
+					if (c >= n && c < m)
+					{
+						m = c;
+					}
+				}
+				
+				if (m - n > (System.Int32.MaxValue - delta) / (h + 1))
+				{
+					throw new PunycodeException(PunycodeException.OVERFLOW);
+				}
+				delta = delta + (m - n) * (h + 1);
+				n = m;
+				
+				for (int j = 0; j < input.Length; j++)
+				{
+					int c = input[j];
+					if (c < n)
+					{
+						delta++;
+						if (0 == delta)
+						{
+							throw new PunycodeException(PunycodeException.OVERFLOW);
+						}
+					}
+					if (c == n)
+					{
+						int q = delta;
+						
+						for (int k = BASE; ; k += BASE)
+						{
+							int t;
+							if (k <= bias)
+							{
+								t = TMIN;
+							}
+							else if (k >= bias + TMAX)
+							{
+								t = TMAX;
+							}
+							else
+							{
+								t = k - bias;
+							}
+							if (q < t)
+							{
+								break;
+							}
+							output.Append((char) Digit2Codepoint(t + (q - t) % (BASE - t)));
+							q = (q - t) / (BASE - t);
+						}
+						
+						output.Append((char) Digit2Codepoint(q));
+						bias = Adapt(delta, h + 1, h == b);
+						delta = 0;
+						h++;
+					}
+				}
+				
+				delta++;
+				n++;
+			}
+			
+			return output.ToString();
+		}
+		
+		/// <summary>
+        /// Decode a punycoded string.
+		/// </summary>
+		/// <param name="input">Punycode string</param>
+		/// <returns> Unicode string.</returns>
+		public static string Decode(string input)
+		{
+			int n = INITIAL_N;
+			int i = 0;
+			int bias = INITIAL_BIAS;
+			StringBuilder output = new StringBuilder();
+			
+			int d = input.LastIndexOf((System.Char) DELIMITER);
+			if (d > 0)
+			{
+				for (int j = 0; j < d; j++)
+				{
+					char c = input[j];
+					if (!IsBasic(c))
+					{
+						throw new PunycodeException(PunycodeException.BAD_INPUT);
+					}
+					output.Append(c);
+				}
+				d++;
+			}
+			else
+			{
+				d = 0;
+			}
+			
+			while (d < input.Length)
+			{
+				int oldi = i;
+				int w = 1;
+				
+				for (int k = BASE; ; k += BASE)
+				{
+					if (d == input.Length)
+					{
+						throw new PunycodeException(PunycodeException.BAD_INPUT);
+					}
+					int c = input[d++];
+					int digit = Codepoint2Digit(c);
+					if (digit > (System.Int32.MaxValue - i) / w)
+					{
+						throw new PunycodeException(PunycodeException.OVERFLOW);
+					}
+					
+					i = i + digit * w;
+					
+					int t;
+					if (k <= bias)
+					{
+						t = TMIN;
+					}
+					else if (k >= bias + TMAX)
+					{
+						t = TMAX;
+					}
+					else
+					{
+						t = k - bias;
+					}
+					if (digit < t)
+					{
+						break;
+					}
+					w = w * (BASE - t);
+				}
+				
+				bias = Adapt(i - oldi, output.Length + 1, oldi == 0);
+				
+				if (i / (output.Length + 1) > Int32.MaxValue - n)
+				{
+					throw new PunycodeException(PunycodeException.OVERFLOW);
+				}
+				
+				n = n + i / (output.Length + 1);
+				i = i % (output.Length + 1);
+				// following overload is not supported on CF
+				//output.Insert(i,(char) n);
+				output.Insert(i, new char[1] { (char) n });
+				i++;
+			}
+			
+			return output.ToString();
+		}
+		
+		public static int Adapt(int delta, int numpoints, bool first)
+		{
+			if (first)
+			{
+				delta = delta / DAMP;
+			}
+			else
+			{
+				delta = delta / 2;
+			}
+			
+			delta = delta + (delta / numpoints);
+			
+			int k = 0;
+			while (delta > ((BASE - TMIN) * TMAX) / 2)
+			{
+				delta = delta / (BASE - TMIN);
+				k = k + BASE;
+			}
+			
+			return k + ((BASE - TMIN + 1) * delta) / (delta + SKEW);
+		}
+		
+		public static bool IsBasic(char c)
+		{
+			return c < 0x80;
+		}
+		
+		public static int Digit2Codepoint(int d)
+		{
+			if (d < 26)
+			{
+				// 0..25 : 'a'..'z'
+				return d + 'a';
+			}
+			else if (d < 36)
+			{
+				// 26..35 : '0'..'9';
+				return d - 26 + '0';
+			}
+			else
+			{
+				throw new PunycodeException(PunycodeException.BAD_INPUT);
+			}
+		}
+		
+		public static int Codepoint2Digit(int c)
+		{
+			if (c - '0' < 10)
+			{
+				// '0'..'9' : 26..35
+				return c - '0' + 26;
+			}
+			else if (c - 'a' < 26)
+			{
+				// 'a'..'z' : 0..25
+				return c - 'a';
+			}
+			else
+			{
+				throw new PunycodeException(PunycodeException.BAD_INPUT);
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/PunycodeException.cs b/lib/agsxmpp/agsxmpp/Idn/PunycodeException.cs
new file mode 100644
index 0000000..33d8fc2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/PunycodeException.cs
@@ -0,0 +1,41 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+
+namespace agsXMPP.Idn
+{
+	
+	public class PunycodeException : Exception
+	{
+		public static string OVERFLOW   = "Overflow.";
+		public static string BAD_INPUT  = "Bad input.";
+		
+		/// <summary>
+        /// Creates a new PunycodeException.
+		/// </summary>
+        /// <param name="message">message</param>
+		public PunycodeException(string message) : base(message)
+		{
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/RFC3454.cs b/lib/agsxmpp/agsxmpp/Idn/RFC3454.cs
new file mode 100644
index 0000000..1c45a91
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/RFC3454.cs
@@ -0,0 +1,4275 @@
+// Do not edit !!!
+// this file is generated automatically
+
+using System;
+
+namespace agsXMPP.Idn
+{
+    public class RFC3454
+    {
+        public static char[][] A1 = new char[][] {
+    new char[] { '\u0221' },	/* 0221 */
+    new char[] { '\u0234', '\u024F' },	/* 0234-024F */
+    new char[] { '\u02AE', '\u02AF' },	/* 02AE-02AF */
+    new char[] { '\u02EF', '\u02FF' },	/* 02EF-02FF */
+    new char[] { '\u0350', '\u035F' },	/* 0350-035F */
+    new char[] { '\u0370', '\u0373' },	/* 0370-0373 */
+    new char[] { '\u0376', '\u0379' },	/* 0376-0379 */
+    new char[] { '\u037B', '\u037D' },	/* 037B-037D */
+    new char[] { '\u037F', '\u0383' },	/* 037F-0383 */
+    new char[] { '\u038B' },	/* 038B */
+    new char[] { '\u038D' },	/* 038D */
+    new char[] { '\u03A2' },	/* 03A2 */
+    new char[] { '\u03CF' },	/* 03CF */
+    new char[] { '\u03F7', '\u03FF' },	/* 03F7-03FF */
+    new char[] { '\u0487' },	/* 0487 */
+    new char[] { '\u04CF' },	/* 04CF */
+    new char[] { '\u04F6', '\u04F7' },	/* 04F6-04F7 */
+    new char[] { '\u04FA', '\u04FF' },	/* 04FA-04FF */
+    new char[] { '\u0510', '\u0530' },	/* 0510-0530 */
+    new char[] { '\u0557', '\u0558' },	/* 0557-0558 */
+    new char[] { '\u0560' },	/* 0560 */
+    new char[] { '\u0588' },	/* 0588 */
+    new char[] { '\u058B', '\u0590' },	/* 058B-0590 */
+    new char[] { '\u05A2' },	/* 05A2 */
+    new char[] { '\u05BA' },	/* 05BA */
+    new char[] { '\u05C5', '\u05CF' },	/* 05C5-05CF */
+    new char[] { '\u05EB', '\u05EF' },	/* 05EB-05EF */
+    new char[] { '\u05F5', '\u060B' },	/* 05F5-060B */
+    new char[] { '\u060D', '\u061A' },	/* 060D-061A */
+    new char[] { '\u061C', '\u061E' },	/* 061C-061E */
+    new char[] { '\u0620' },	/* 0620 */
+    new char[] { '\u063B', '\u063F' },	/* 063B-063F */
+    new char[] { '\u0656', '\u065F' },	/* 0656-065F */
+    new char[] { '\u06EE', '\u06EF' },	/* 06EE-06EF */
+    new char[] { '\u06FF' },	/* 06FF */
+    new char[] { '\u070E' },	/* 070E */
+    new char[] { '\u072D', '\u072F' },	/* 072D-072F */
+    new char[] { '\u074B', '\u077F' },	/* 074B-077F */
+    new char[] { '\u07B2', '\u0900' },	/* 07B2-0900 */
+    new char[] { '\u0904' },	/* 0904 */
+    new char[] { '\u093A', '\u093B' },	/* 093A-093B */
+    new char[] { '\u094E', '\u094F' },	/* 094E-094F */
+    new char[] { '\u0955', '\u0957' },	/* 0955-0957 */
+    new char[] { '\u0971', '\u0980' },	/* 0971-0980 */
+    new char[] { '\u0984' },	/* 0984 */
+    new char[] { '\u098D', '\u098E' },	/* 098D-098E */
+    new char[] { '\u0991', '\u0992' },	/* 0991-0992 */
+    new char[] { '\u09A9' },	/* 09A9 */
+    new char[] { '\u09B1' },	/* 09B1 */
+    new char[] { '\u09B3', '\u09B5' },	/* 09B3-09B5 */
+    new char[] { '\u09BA', '\u09BB' },	/* 09BA-09BB */
+    new char[] { '\u09BD' },	/* 09BD */
+    new char[] { '\u09C5', '\u09C6' },	/* 09C5-09C6 */
+    new char[] { '\u09C9', '\u09CA' },	/* 09C9-09CA */
+    new char[] { '\u09CE', '\u09D6' },	/* 09CE-09D6 */
+    new char[] { '\u09D8', '\u09DB' },	/* 09D8-09DB */
+    new char[] { '\u09DE' },	/* 09DE */
+    new char[] { '\u09E4', '\u09E5' },	/* 09E4-09E5 */
+    new char[] { '\u09FB', '\u0A01' },	/* 09FB-0A01 */
+    new char[] { '\u0A03', '\u0A04' },	/* 0A03-0A04 */
+    new char[] { '\u0A0B', '\u0A0E' },	/* 0A0B-0A0E */
+    new char[] { '\u0A11', '\u0A12' },	/* 0A11-0A12 */
+    new char[] { '\u0A29' },	/* 0A29 */
+    new char[] { '\u0A31' },	/* 0A31 */
+    new char[] { '\u0A34' },	/* 0A34 */
+    new char[] { '\u0A37' },	/* 0A37 */
+    new char[] { '\u0A3A', '\u0A3B' },	/* 0A3A-0A3B */
+    new char[] { '\u0A3D' },	/* 0A3D */
+    new char[] { '\u0A43', '\u0A46' },	/* 0A43-0A46 */
+    new char[] { '\u0A49', '\u0A4A' },	/* 0A49-0A4A */
+    new char[] { '\u0A4E', '\u0A58' },	/* 0A4E-0A58 */
+    new char[] { '\u0A5D' },	/* 0A5D */
+    new char[] { '\u0A5F', '\u0A65' },	/* 0A5F-0A65 */
+    new char[] { '\u0A75', '\u0A80' },	/* 0A75-0A80 */
+    new char[] { '\u0A84' },	/* 0A84 */
+    new char[] { '\u0A8C' },	/* 0A8C */
+    new char[] { '\u0A8E' },	/* 0A8E */
+    new char[] { '\u0A92' },	/* 0A92 */
+    new char[] { '\u0AA9' },	/* 0AA9 */
+    new char[] { '\u0AB1' },	/* 0AB1 */
+    new char[] { '\u0AB4' },	/* 0AB4 */
+    new char[] { '\u0ABA', '\u0ABB' },	/* 0ABA-0ABB */
+    new char[] { '\u0AC6' },	/* 0AC6 */
+    new char[] { '\u0ACA' },	/* 0ACA */
+    new char[] { '\u0ACE', '\u0ACF' },	/* 0ACE-0ACF */
+    new char[] { '\u0AD1', '\u0ADF' },	/* 0AD1-0ADF */
+    new char[] { '\u0AE1', '\u0AE5' },	/* 0AE1-0AE5 */
+    new char[] { '\u0AF0', '\u0B00' },	/* 0AF0-0B00 */
+    new char[] { '\u0B04' },	/* 0B04 */
+    new char[] { '\u0B0D', '\u0B0E' },	/* 0B0D-0B0E */
+    new char[] { '\u0B11', '\u0B12' },	/* 0B11-0B12 */
+    new char[] { '\u0B29' },	/* 0B29 */
+    new char[] { '\u0B31' },	/* 0B31 */
+    new char[] { '\u0B34', '\u0B35' },	/* 0B34-0B35 */
+    new char[] { '\u0B3A', '\u0B3B' },	/* 0B3A-0B3B */
+    new char[] { '\u0B44', '\u0B46' },	/* 0B44-0B46 */
+    new char[] { '\u0B49', '\u0B4A' },	/* 0B49-0B4A */
+    new char[] { '\u0B4E', '\u0B55' },	/* 0B4E-0B55 */
+    new char[] { '\u0B58', '\u0B5B' },	/* 0B58-0B5B */
+    new char[] { '\u0B5E' },	/* 0B5E */
+    new char[] { '\u0B62', '\u0B65' },	/* 0B62-0B65 */
+    new char[] { '\u0B71', '\u0B81' },	/* 0B71-0B81 */
+    new char[] { '\u0B84' },	/* 0B84 */
+    new char[] { '\u0B8B', '\u0B8D' },	/* 0B8B-0B8D */
+    new char[] { '\u0B91' },	/* 0B91 */
+    new char[] { '\u0B96', '\u0B98' },	/* 0B96-0B98 */
+    new char[] { '\u0B9B' },	/* 0B9B */
+    new char[] { '\u0B9D' },	/* 0B9D */
+    new char[] { '\u0BA0', '\u0BA2' },	/* 0BA0-0BA2 */
+    new char[] { '\u0BA5', '\u0BA7' },	/* 0BA5-0BA7 */
+    new char[] { '\u0BAB', '\u0BAD' },	/* 0BAB-0BAD */
+    new char[] { '\u0BB6' },	/* 0BB6 */
+    new char[] { '\u0BBA', '\u0BBD' },	/* 0BBA-0BBD */
+    new char[] { '\u0BC3', '\u0BC5' },	/* 0BC3-0BC5 */
+    new char[] { '\u0BC9' },	/* 0BC9 */
+    new char[] { '\u0BCE', '\u0BD6' },	/* 0BCE-0BD6 */
+    new char[] { '\u0BD8', '\u0BE6' },	/* 0BD8-0BE6 */
+    new char[] { '\u0BF3', '\u0C00' },	/* 0BF3-0C00 */
+    new char[] { '\u0C04' },	/* 0C04 */
+    new char[] { '\u0C0D' },	/* 0C0D */
+    new char[] { '\u0C11' },	/* 0C11 */
+    new char[] { '\u0C29' },	/* 0C29 */
+    new char[] { '\u0C34' },	/* 0C34 */
+    new char[] { '\u0C3A', '\u0C3D' },	/* 0C3A-0C3D */
+    new char[] { '\u0C45' },	/* 0C45 */
+    new char[] { '\u0C49' },	/* 0C49 */
+    new char[] { '\u0C4E', '\u0C54' },	/* 0C4E-0C54 */
+    new char[] { '\u0C57', '\u0C5F' },	/* 0C57-0C5F */
+    new char[] { '\u0C62', '\u0C65' },	/* 0C62-0C65 */
+    new char[] { '\u0C70', '\u0C81' },	/* 0C70-0C81 */
+    new char[] { '\u0C84' },	/* 0C84 */
+    new char[] { '\u0C8D' },	/* 0C8D */
+    new char[] { '\u0C91' },	/* 0C91 */
+    new char[] { '\u0CA9' },	/* 0CA9 */
+    new char[] { '\u0CB4' },	/* 0CB4 */
+    new char[] { '\u0CBA', '\u0CBD' },	/* 0CBA-0CBD */
+    new char[] { '\u0CC5' },	/* 0CC5 */
+    new char[] { '\u0CC9' },	/* 0CC9 */
+    new char[] { '\u0CCE', '\u0CD4' },	/* 0CCE-0CD4 */
+    new char[] { '\u0CD7', '\u0CDD' },	/* 0CD7-0CDD */
+    new char[] { '\u0CDF' },	/* 0CDF */
+    new char[] { '\u0CE2', '\u0CE5' },	/* 0CE2-0CE5 */
+    new char[] { '\u0CF0', '\u0D01' },	/* 0CF0-0D01 */
+    new char[] { '\u0D04' },	/* 0D04 */
+    new char[] { '\u0D0D' },	/* 0D0D */
+    new char[] { '\u0D11' },	/* 0D11 */
+    new char[] { '\u0D29' },	/* 0D29 */
+    new char[] { '\u0D3A', '\u0D3D' },	/* 0D3A-0D3D */
+    new char[] { '\u0D44', '\u0D45' },	/* 0D44-0D45 */
+    new char[] { '\u0D49' },	/* 0D49 */
+    new char[] { '\u0D4E', '\u0D56' },	/* 0D4E-0D56 */
+    new char[] { '\u0D58', '\u0D5F' },	/* 0D58-0D5F */
+    new char[] { '\u0D62', '\u0D65' },	/* 0D62-0D65 */
+    new char[] { '\u0D70', '\u0D81' },	/* 0D70-0D81 */
+    new char[] { '\u0D84' },	/* 0D84 */
+    new char[] { '\u0D97', '\u0D99' },	/* 0D97-0D99 */
+    new char[] { '\u0DB2' },	/* 0DB2 */
+    new char[] { '\u0DBC' },	/* 0DBC */
+    new char[] { '\u0DBE', '\u0DBF' },	/* 0DBE-0DBF */
+    new char[] { '\u0DC7', '\u0DC9' },	/* 0DC7-0DC9 */
+    new char[] { '\u0DCB', '\u0DCE' },	/* 0DCB-0DCE */
+    new char[] { '\u0DD5' },	/* 0DD5 */
+    new char[] { '\u0DD7' },	/* 0DD7 */
+    new char[] { '\u0DE0', '\u0DF1' },	/* 0DE0-0DF1 */
+    new char[] { '\u0DF5', '\u0E00' },	/* 0DF5-0E00 */
+    new char[] { '\u0E3B', '\u0E3E' },	/* 0E3B-0E3E */
+    new char[] { '\u0E5C', '\u0E80' },	/* 0E5C-0E80 */
+    new char[] { '\u0E83' },	/* 0E83 */
+    new char[] { '\u0E85', '\u0E86' },	/* 0E85-0E86 */
+    new char[] { '\u0E89' },	/* 0E89 */
+    new char[] { '\u0E8B', '\u0E8C' },	/* 0E8B-0E8C */
+    new char[] { '\u0E8E', '\u0E93' },	/* 0E8E-0E93 */
+    new char[] { '\u0E98' },	/* 0E98 */
+    new char[] { '\u0EA0' },	/* 0EA0 */
+    new char[] { '\u0EA4' },	/* 0EA4 */
+    new char[] { '\u0EA6' },	/* 0EA6 */
+    new char[] { '\u0EA8', '\u0EA9' },	/* 0EA8-0EA9 */
+    new char[] { '\u0EAC' },	/* 0EAC */
+    new char[] { '\u0EBA' },	/* 0EBA */
+    new char[] { '\u0EBE', '\u0EBF' },	/* 0EBE-0EBF */
+    new char[] { '\u0EC5' },	/* 0EC5 */
+    new char[] { '\u0EC7' },	/* 0EC7 */
+    new char[] { '\u0ECE', '\u0ECF' },	/* 0ECE-0ECF */
+    new char[] { '\u0EDA', '\u0EDB' },	/* 0EDA-0EDB */
+    new char[] { '\u0EDE', '\u0EFF' },	/* 0EDE-0EFF */
+    new char[] { '\u0F48' },	/* 0F48 */
+    new char[] { '\u0F6B', '\u0F70' },	/* 0F6B-0F70 */
+    new char[] { '\u0F8C', '\u0F8F' },	/* 0F8C-0F8F */
+    new char[] { '\u0F98' },	/* 0F98 */
+    new char[] { '\u0FBD' },	/* 0FBD */
+    new char[] { '\u0FCD', '\u0FCE' },	/* 0FCD-0FCE */
+    new char[] { '\u0FD0', '\u0FFF' },	/* 0FD0-0FFF */
+    new char[] { '\u1022' },	/* 1022 */
+    new char[] { '\u1028' },	/* 1028 */
+    new char[] { '\u102B' },	/* 102B */
+    new char[] { '\u1033', '\u1035' },	/* 1033-1035 */
+    new char[] { '\u103A', '\u103F' },	/* 103A-103F */
+    new char[] { '\u105A', '\u109F' },	/* 105A-109F */
+    new char[] { '\u10C6', '\u10CF' },	/* 10C6-10CF */
+    new char[] { '\u10F9', '\u10FA' },	/* 10F9-10FA */
+    new char[] { '\u10FC', '\u10FF' },	/* 10FC-10FF */
+    new char[] { '\u115A', '\u115E' },	/* 115A-115E */
+    new char[] { '\u11A3', '\u11A7' },	/* 11A3-11A7 */
+    new char[] { '\u11FA', '\u11FF' },	/* 11FA-11FF */
+    new char[] { '\u1207' },	/* 1207 */
+    new char[] { '\u1247' },	/* 1247 */
+    new char[] { '\u1249' },	/* 1249 */
+    new char[] { '\u124E', '\u124F' },	/* 124E-124F */
+    new char[] { '\u1257' },	/* 1257 */
+    new char[] { '\u1259' },	/* 1259 */
+    new char[] { '\u125E', '\u125F' },	/* 125E-125F */
+    new char[] { '\u1287' },	/* 1287 */
+    new char[] { '\u1289' },	/* 1289 */
+    new char[] { '\u128E', '\u128F' },	/* 128E-128F */
+    new char[] { '\u12AF' },	/* 12AF */
+    new char[] { '\u12B1' },	/* 12B1 */
+    new char[] { '\u12B6', '\u12B7' },	/* 12B6-12B7 */
+    new char[] { '\u12BF' },	/* 12BF */
+    new char[] { '\u12C1' },	/* 12C1 */
+    new char[] { '\u12C6', '\u12C7' },	/* 12C6-12C7 */
+    new char[] { '\u12CF' },	/* 12CF */
+    new char[] { '\u12D7' },	/* 12D7 */
+    new char[] { '\u12EF' },	/* 12EF */
+    new char[] { '\u130F' },	/* 130F */
+    new char[] { '\u1311' },	/* 1311 */
+    new char[] { '\u1316', '\u1317' },	/* 1316-1317 */
+    new char[] { '\u131F' },	/* 131F */
+    new char[] { '\u1347' },	/* 1347 */
+    new char[] { '\u135B', '\u1360' },	/* 135B-1360 */
+    new char[] { '\u137D', '\u139F' },	/* 137D-139F */
+    new char[] { '\u13F5', '\u1400' },	/* 13F5-1400 */
+    new char[] { '\u1677', '\u167F' },	/* 1677-167F */
+    new char[] { '\u169D', '\u169F' },	/* 169D-169F */
+    new char[] { '\u16F1', '\u16FF' },	/* 16F1-16FF */
+    new char[] { '\u170D' },	/* 170D */
+    new char[] { '\u1715', '\u171F' },	/* 1715-171F */
+    new char[] { '\u1737', '\u173F' },	/* 1737-173F */
+    new char[] { '\u1754', '\u175F' },	/* 1754-175F */
+    new char[] { '\u176D' },	/* 176D */
+    new char[] { '\u1771' },	/* 1771 */
+    new char[] { '\u1774', '\u177F' },	/* 1774-177F */
+    new char[] { '\u17DD', '\u17DF' },	/* 17DD-17DF */
+    new char[] { '\u17EA', '\u17FF' },	/* 17EA-17FF */
+    new char[] { '\u180F' },	/* 180F */
+    new char[] { '\u181A', '\u181F' },	/* 181A-181F */
+    new char[] { '\u1878', '\u187F' },	/* 1878-187F */
+    new char[] { '\u18AA', '\u1DFF' },	/* 18AA-1DFF */
+    new char[] { '\u1E9C', '\u1E9F' },	/* 1E9C-1E9F */
+    new char[] { '\u1EFA', '\u1EFF' },	/* 1EFA-1EFF */
+    new char[] { '\u1F16', '\u1F17' },	/* 1F16-1F17 */
+    new char[] { '\u1F1E', '\u1F1F' },	/* 1F1E-1F1F */
+    new char[] { '\u1F46', '\u1F47' },	/* 1F46-1F47 */
+    new char[] { '\u1F4E', '\u1F4F' },	/* 1F4E-1F4F */
+    new char[] { '\u1F58' },	/* 1F58 */
+    new char[] { '\u1F5A' },	/* 1F5A */
+    new char[] { '\u1F5C' },	/* 1F5C */
+    new char[] { '\u1F5E' },	/* 1F5E */
+    new char[] { '\u1F7E', '\u1F7F' },	/* 1F7E-1F7F */
+    new char[] { '\u1FB5' },	/* 1FB5 */
+    new char[] { '\u1FC5' },	/* 1FC5 */
+    new char[] { '\u1FD4', '\u1FD5' },	/* 1FD4-1FD5 */
+    new char[] { '\u1FDC' },	/* 1FDC */
+    new char[] { '\u1FF0', '\u1FF1' },	/* 1FF0-1FF1 */
+    new char[] { '\u1FF5' },	/* 1FF5 */
+    new char[] { '\u1FFF' },	/* 1FFF */
+    new char[] { '\u2053', '\u2056' },	/* 2053-2056 */
+    new char[] { '\u2058', '\u205E' },	/* 2058-205E */
+    new char[] { '\u2064', '\u2069' },	/* 2064-2069 */
+    new char[] { '\u2072', '\u2073' },	/* 2072-2073 */
+    new char[] { '\u208F', '\u209F' },	/* 208F-209F */
+    new char[] { '\u20B2', '\u20CF' },	/* 20B2-20CF */
+    new char[] { '\u20EB', '\u20FF' },	/* 20EB-20FF */
+    new char[] { '\u213B', '\u213C' },	/* 213B-213C */
+    new char[] { '\u214C', '\u2152' },	/* 214C-2152 */
+    new char[] { '\u2184', '\u218F' },	/* 2184-218F */
+    new char[] { '\u23CF', '\u23FF' },	/* 23CF-23FF */
+    new char[] { '\u2427', '\u243F' },	/* 2427-243F */
+    new char[] { '\u244B', '\u245F' },	/* 244B-245F */
+    new char[] { '\u24FF' },	/* 24FF */
+    new char[] { '\u2614', '\u2615' },	/* 2614-2615 */
+    new char[] { '\u2618' },	/* 2618 */
+    new char[] { '\u267E', '\u267F' },	/* 267E-267F */
+    new char[] { '\u268A', '\u2700' },	/* 268A-2700 */
+    new char[] { '\u2705' },	/* 2705 */
+    new char[] { '\u270A', '\u270B' },	/* 270A-270B */
+    new char[] { '\u2728' },	/* 2728 */
+    new char[] { '\u274C' },	/* 274C */
+    new char[] { '\u274E' },	/* 274E */
+    new char[] { '\u2753', '\u2755' },	/* 2753-2755 */
+    new char[] { '\u2757' },	/* 2757 */
+    new char[] { '\u275F', '\u2760' },	/* 275F-2760 */
+    new char[] { '\u2795', '\u2797' },	/* 2795-2797 */
+    new char[] { '\u27B0' },	/* 27B0 */
+    new char[] { '\u27BF', '\u27CF' },	/* 27BF-27CF */
+    new char[] { '\u27EC', '\u27EF' },	/* 27EC-27EF */
+    new char[] { '\u2B00', '\u2E7F' },	/* 2B00-2E7F */
+    new char[] { '\u2E9A' },	/* 2E9A */
+    new char[] { '\u2EF4', '\u2EFF' },	/* 2EF4-2EFF */
+    new char[] { '\u2FD6', '\u2FEF' },	/* 2FD6-2FEF */
+    new char[] { '\u2FFC', '\u2FFF' },	/* 2FFC-2FFF */
+    new char[] { '\u3040' },	/* 3040 */
+    new char[] { '\u3097', '\u3098' },	/* 3097-3098 */
+    new char[] { '\u3100', '\u3104' },	/* 3100-3104 */
+    new char[] { '\u312D', '\u3130' },	/* 312D-3130 */
+    new char[] { '\u318F' },	/* 318F */
+    new char[] { '\u31B8', '\u31EF' },	/* 31B8-31EF */
+    new char[] { '\u321D', '\u321F' },	/* 321D-321F */
+    new char[] { '\u3244', '\u3250' },	/* 3244-3250 */
+    new char[] { '\u327C', '\u327E' },	/* 327C-327E */
+    new char[] { '\u32CC', '\u32CF' },	/* 32CC-32CF */
+    new char[] { '\u32FF' },	/* 32FF */
+    new char[] { '\u3377', '\u337A' },	/* 3377-337A */
+    new char[] { '\u33DE', '\u33DF' },	/* 33DE-33DF */
+    new char[] { '\u33FF' },	/* 33FF */
+    new char[] { '\u4DB6', '\u4DFF' },	/* 4DB6-4DFF */
+    new char[] { '\u9FA6', '\u9FFF' },	/* 9FA6-9FFF */
+    new char[] { '\uA48D', '\uA48F' },	/* A48D-A48F */
+    new char[] { '\uA4C7', '\uABFF' },	/* A4C7-ABFF */
+    new char[] { '\uD7A4', '\uD7FF' },	/* D7A4-D7FF */
+    new char[] { '\uFA2E', '\uFA2F' },	/* FA2E-FA2F */
+    new char[] { '\uFA6B', '\uFAFF' },	/* FA6B-FAFF */
+    new char[] { '\uFB07', '\uFB12' },	/* FB07-FB12 */
+    new char[] { '\uFB18', '\uFB1C' },	/* FB18-FB1C */
+    new char[] { '\uFB37' },	/* FB37 */
+    new char[] { '\uFB3D' },	/* FB3D */
+    new char[] { '\uFB3F' },	/* FB3F */
+    new char[] { '\uFB42' },	/* FB42 */
+    new char[] { '\uFB45' },	/* FB45 */
+    new char[] { '\uFBB2', '\uFBD2' },	/* FBB2-FBD2 */
+    new char[] { '\uFD40', '\uFD4F' },	/* FD40-FD4F */
+    new char[] { '\uFD90', '\uFD91' },	/* FD90-FD91 */
+    new char[] { '\uFDC8', '\uFDCF' },	/* FDC8-FDCF */
+    new char[] { '\uFDFD', '\uFDFF' },	/* FDFD-FDFF */
+    new char[] { '\uFE10', '\uFE1F' },	/* FE10-FE1F */
+    new char[] { '\uFE24', '\uFE2F' },	/* FE24-FE2F */
+    new char[] { '\uFE47', '\uFE48' },	/* FE47-FE48 */
+    new char[] { '\uFE53' },	/* FE53 */
+    new char[] { '\uFE67' },	/* FE67 */
+    new char[] { '\uFE6C', '\uFE6F' },	/* FE6C-FE6F */
+    new char[] { '\uFE75' },	/* FE75 */
+    new char[] { '\uFEFD', '\uFEFE' },	/* FEFD-FEFE */
+    new char[] { '\uFF00' },	/* FF00 */
+    new char[] { '\uFFBF', '\uFFC1' },	/* FFBF-FFC1 */
+    new char[] { '\uFFC8', '\uFFC9' },	/* FFC8-FFC9 */
+    new char[] { '\uFFD0', '\uFFD1' },	/* FFD0-FFD1 */
+    new char[] { '\uFFD8', '\uFFD9' },	/* FFD8-FFD9 */
+    new char[] { '\uFFDD', '\uFFDF' },	/* FFDD-FFDF */
+    new char[] { '\uFFE7' },	/* FFE7 */
+    new char[] { '\uFFEF', '\uFFF8' },	/* FFEF-FFF8 */
+	/* Skip characters outside the range of .NET unicode 10000-102FF */
+	/* Skip characters outside the range of .NET unicode 1031F */
+	/* Skip characters outside the range of .NET unicode 10324-1032F */
+	/* Skip characters outside the range of .NET unicode 1034B-103FF */
+	/* Skip characters outside the range of .NET unicode 10426-10427 */
+	/* Skip characters outside the range of .NET unicode 1044E-1CFFF */
+	/* Skip characters outside the range of .NET unicode 1D0F6-1D0FF */
+	/* Skip characters outside the range of .NET unicode 1D127-1D129 */
+	/* Skip characters outside the range of .NET unicode 1D1DE-1D3FF */
+	/* Skip characters outside the range of .NET unicode 1D455 */
+	/* Skip characters outside the range of .NET unicode 1D49D */
+	/* Skip characters outside the range of .NET unicode 1D4A0-1D4A1 */
+	/* Skip characters outside the range of .NET unicode 1D4A3-1D4A4 */
+	/* Skip characters outside the range of .NET unicode 1D4A7-1D4A8 */
+	/* Skip characters outside the range of .NET unicode 1D4AD */
+	/* Skip characters outside the range of .NET unicode 1D4BA */
+	/* Skip characters outside the range of .NET unicode 1D4BC */
+	/* Skip characters outside the range of .NET unicode 1D4C1 */
+	/* Skip characters outside the range of .NET unicode 1D4C4 */
+	/* Skip characters outside the range of .NET unicode 1D506 */
+	/* Skip characters outside the range of .NET unicode 1D50B-1D50C */
+	/* Skip characters outside the range of .NET unicode 1D515 */
+	/* Skip characters outside the range of .NET unicode 1D51D */
+	/* Skip characters outside the range of .NET unicode 1D53A */
+	/* Skip characters outside the range of .NET unicode 1D53F */
+	/* Skip characters outside the range of .NET unicode 1D545 */
+	/* Skip characters outside the range of .NET unicode 1D547-1D549 */
+	/* Skip characters outside the range of .NET unicode 1D551 */
+	/* Skip characters outside the range of .NET unicode 1D6A4-1D6A7 */
+	/* Skip characters outside the range of .NET unicode 1D7CA-1D7CD */
+	/* Skip characters outside the range of .NET unicode 1D800-1FFFD */
+	/* Skip characters outside the range of .NET unicode 2A6D7-2F7FF */
+	/* Skip characters outside the range of .NET unicode 2FA1E-2FFFD */
+	/* Skip characters outside the range of .NET unicode 30000-3FFFD */
+	/* Skip characters outside the range of .NET unicode 40000-4FFFD */
+	/* Skip characters outside the range of .NET unicode 50000-5FFFD */
+	/* Skip characters outside the range of .NET unicode 60000-6FFFD */
+	/* Skip characters outside the range of .NET unicode 70000-7FFFD */
+	/* Skip characters outside the range of .NET unicode 80000-8FFFD */
+	/* Skip characters outside the range of .NET unicode 90000-9FFFD */
+	/* Skip characters outside the range of .NET unicode A0000-AFFFD */
+	/* Skip characters outside the range of .NET unicode B0000-BFFFD */
+	/* Skip characters outside the range of .NET unicode C0000-CFFFD */
+	/* Skip characters outside the range of .NET unicode D0000-DFFFD */
+	/* Skip characters outside the range of .NET unicode E0000 */
+	/* Skip characters outside the range of .NET unicode E0002-E001F */
+	/* Skip characters outside the range of .NET unicode E0080-EFFFD */
+  };
+
+        public static char[] B1 = new char[] {
+    '\u00AD',	/* 00AD; ; Map to nothing */
+    '\u034F',	/* 034F; ; Map to nothing */
+    '\u1806',	/* 1806; ; Map to nothing */
+    '\u180B',	/* 180B; ; Map to nothing */
+    '\u180C',	/* 180C; ; Map to nothing */
+    '\u180D',	/* 180D; ; Map to nothing */
+    '\u200B',	/* 200B; ; Map to nothing */
+    '\u200C',	/* 200C; ; Map to nothing */
+    '\u200D',	/* 200D; ; Map to nothing */
+    '\u2060',	/* 2060; ; Map to nothing */
+    '\uFE00',	/* FE00; ; Map to nothing */
+    '\uFE01',	/* FE01; ; Map to nothing */
+    '\uFE02',	/* FE02; ; Map to nothing */
+    '\uFE03',	/* FE03; ; Map to nothing */
+    '\uFE04',	/* FE04; ; Map to nothing */
+    '\uFE05',	/* FE05; ; Map to nothing */
+    '\uFE06',	/* FE06; ; Map to nothing */
+    '\uFE07',	/* FE07; ; Map to nothing */
+    '\uFE08',	/* FE08; ; Map to nothing */
+    '\uFE09',	/* FE09; ; Map to nothing */
+    '\uFE0A',	/* FE0A; ; Map to nothing */
+    '\uFE0B',	/* FE0B; ; Map to nothing */
+    '\uFE0C',	/* FE0C; ; Map to nothing */
+    '\uFE0D',	/* FE0D; ; Map to nothing */
+    '\uFE0E',	/* FE0E; ; Map to nothing */
+    '\uFE0F',	/* FE0F; ; Map to nothing */
+    '\uFEFF',	/* FEFF; ; Map to nothing */
+  };
+
+        public static char[] B2search = new char[] {
+    '\u0041',	/*0041; 0061; Case map*/
+    '\u0042',	/*0042; 0062; Case map*/
+    '\u0043',	/*0043; 0063; Case map*/
+    '\u0044',	/*0044; 0064; Case map*/
+    '\u0045',	/*0045; 0065; Case map*/
+    '\u0046',	/*0046; 0066; Case map*/
+    '\u0047',	/*0047; 0067; Case map*/
+    '\u0048',	/*0048; 0068; Case map*/
+    '\u0049',	/*0049; 0069; Case map*/
+    '\u004A',	/*004A; 006A; Case map*/
+    '\u004B',	/*004B; 006B; Case map*/
+    '\u004C',	/*004C; 006C; Case map*/
+    '\u004D',	/*004D; 006D; Case map*/
+    '\u004E',	/*004E; 006E; Case map*/
+    '\u004F',	/*004F; 006F; Case map*/
+    '\u0050',	/*0050; 0070; Case map*/
+    '\u0051',	/*0051; 0071; Case map*/
+    '\u0052',	/*0052; 0072; Case map*/
+    '\u0053',	/*0053; 0073; Case map*/
+    '\u0054',	/*0054; 0074; Case map*/
+    '\u0055',	/*0055; 0075; Case map*/
+    '\u0056',	/*0056; 0076; Case map*/
+    '\u0057',	/*0057; 0077; Case map*/
+    '\u0058',	/*0058; 0078; Case map*/
+    '\u0059',	/*0059; 0079; Case map*/
+    '\u005A',	/*005A; 007A; Case map*/
+    '\u00B5',	/*00B5; 03BC; Case map*/
+    '\u00C0',	/*00C0; 00E0; Case map*/
+    '\u00C1',	/*00C1; 00E1; Case map*/
+    '\u00C2',	/*00C2; 00E2; Case map*/
+    '\u00C3',	/*00C3; 00E3; Case map*/
+    '\u00C4',	/*00C4; 00E4; Case map*/
+    '\u00C5',	/*00C5; 00E5; Case map*/
+    '\u00C6',	/*00C6; 00E6; Case map*/
+    '\u00C7',	/*00C7; 00E7; Case map*/
+    '\u00C8',	/*00C8; 00E8; Case map*/
+    '\u00C9',	/*00C9; 00E9; Case map*/
+    '\u00CA',	/*00CA; 00EA; Case map*/
+    '\u00CB',	/*00CB; 00EB; Case map*/
+    '\u00CC',	/*00CC; 00EC; Case map*/
+    '\u00CD',	/*00CD; 00ED; Case map*/
+    '\u00CE',	/*00CE; 00EE; Case map*/
+    '\u00CF',	/*00CF; 00EF; Case map*/
+    '\u00D0',	/*00D0; 00F0; Case map*/
+    '\u00D1',	/*00D1; 00F1; Case map*/
+    '\u00D2',	/*00D2; 00F2; Case map*/
+    '\u00D3',	/*00D3; 00F3; Case map*/
+    '\u00D4',	/*00D4; 00F4; Case map*/
+    '\u00D5',	/*00D5; 00F5; Case map*/
+    '\u00D6',	/*00D6; 00F6; Case map*/
+    '\u00D8',	/*00D8; 00F8; Case map*/
+    '\u00D9',	/*00D9; 00F9; Case map*/
+    '\u00DA',	/*00DA; 00FA; Case map*/
+    '\u00DB',	/*00DB; 00FB; Case map*/
+    '\u00DC',	/*00DC; 00FC; Case map*/
+    '\u00DD',	/*00DD; 00FD; Case map*/
+    '\u00DE',	/*00DE; 00FE; Case map*/
+    '\u00DF',	/*00DF; 0073 0073; Case map*/
+    '\u0100',	/*0100; 0101; Case map*/
+    '\u0102',	/*0102; 0103; Case map*/
+    '\u0104',	/*0104; 0105; Case map*/
+    '\u0106',	/*0106; 0107; Case map*/
+    '\u0108',	/*0108; 0109; Case map*/
+    '\u010A',	/*010A; 010B; Case map*/
+    '\u010C',	/*010C; 010D; Case map*/
+    '\u010E',	/*010E; 010F; Case map*/
+    '\u0110',	/*0110; 0111; Case map*/
+    '\u0112',	/*0112; 0113; Case map*/
+    '\u0114',	/*0114; 0115; Case map*/
+    '\u0116',	/*0116; 0117; Case map*/
+    '\u0118',	/*0118; 0119; Case map*/
+    '\u011A',	/*011A; 011B; Case map*/
+    '\u011C',	/*011C; 011D; Case map*/
+    '\u011E',	/*011E; 011F; Case map*/
+    '\u0120',	/*0120; 0121; Case map*/
+    '\u0122',	/*0122; 0123; Case map*/
+    '\u0124',	/*0124; 0125; Case map*/
+    '\u0126',	/*0126; 0127; Case map*/
+    '\u0128',	/*0128; 0129; Case map*/
+    '\u012A',	/*012A; 012B; Case map*/
+    '\u012C',	/*012C; 012D; Case map*/
+    '\u012E',	/*012E; 012F; Case map*/
+    '\u0130',	/*0130; 0069 0307; Case map*/
+    '\u0132',	/*0132; 0133; Case map*/
+    '\u0134',	/*0134; 0135; Case map*/
+    '\u0136',	/*0136; 0137; Case map*/
+    '\u0139',	/*0139; 013A; Case map*/
+    '\u013B',	/*013B; 013C; Case map*/
+    '\u013D',	/*013D; 013E; Case map*/
+    '\u013F',	/*013F; 0140; Case map*/
+    '\u0141',	/*0141; 0142; Case map*/
+    '\u0143',	/*0143; 0144; Case map*/
+    '\u0145',	/*0145; 0146; Case map*/
+    '\u0147',	/*0147; 0148; Case map*/
+    '\u0149',	/*0149; 02BC 006E; Case map*/
+    '\u014A',	/*014A; 014B; Case map*/
+    '\u014C',	/*014C; 014D; Case map*/
+    '\u014E',	/*014E; 014F; Case map*/
+    '\u0150',	/*0150; 0151; Case map*/
+    '\u0152',	/*0152; 0153; Case map*/
+    '\u0154',	/*0154; 0155; Case map*/
+    '\u0156',	/*0156; 0157; Case map*/
+    '\u0158',	/*0158; 0159; Case map*/
+    '\u015A',	/*015A; 015B; Case map*/
+    '\u015C',	/*015C; 015D; Case map*/
+    '\u015E',	/*015E; 015F; Case map*/
+    '\u0160',	/*0160; 0161; Case map*/
+    '\u0162',	/*0162; 0163; Case map*/
+    '\u0164',	/*0164; 0165; Case map*/
+    '\u0166',	/*0166; 0167; Case map*/
+    '\u0168',	/*0168; 0169; Case map*/
+    '\u016A',	/*016A; 016B; Case map*/
+    '\u016C',	/*016C; 016D; Case map*/
+    '\u016E',	/*016E; 016F; Case map*/
+    '\u0170',	/*0170; 0171; Case map*/
+    '\u0172',	/*0172; 0173; Case map*/
+    '\u0174',	/*0174; 0175; Case map*/
+    '\u0176',	/*0176; 0177; Case map*/
+    '\u0178',	/*0178; 00FF; Case map*/
+    '\u0179',	/*0179; 017A; Case map*/
+    '\u017B',	/*017B; 017C; Case map*/
+    '\u017D',	/*017D; 017E; Case map*/
+    '\u017F',	/*017F; 0073; Case map*/
+    '\u0181',	/*0181; 0253; Case map*/
+    '\u0182',	/*0182; 0183; Case map*/
+    '\u0184',	/*0184; 0185; Case map*/
+    '\u0186',	/*0186; 0254; Case map*/
+    '\u0187',	/*0187; 0188; Case map*/
+    '\u0189',	/*0189; 0256; Case map*/
+    '\u018A',	/*018A; 0257; Case map*/
+    '\u018B',	/*018B; 018C; Case map*/
+    '\u018E',	/*018E; 01DD; Case map*/
+    '\u018F',	/*018F; 0259; Case map*/
+    '\u0190',	/*0190; 025B; Case map*/
+    '\u0191',	/*0191; 0192; Case map*/
+    '\u0193',	/*0193; 0260; Case map*/
+    '\u0194',	/*0194; 0263; Case map*/
+    '\u0196',	/*0196; 0269; Case map*/
+    '\u0197',	/*0197; 0268; Case map*/
+    '\u0198',	/*0198; 0199; Case map*/
+    '\u019C',	/*019C; 026F; Case map*/
+    '\u019D',	/*019D; 0272; Case map*/
+    '\u019F',	/*019F; 0275; Case map*/
+    '\u01A0',	/*01A0; 01A1; Case map*/
+    '\u01A2',	/*01A2; 01A3; Case map*/
+    '\u01A4',	/*01A4; 01A5; Case map*/
+    '\u01A6',	/*01A6; 0280; Case map*/
+    '\u01A7',	/*01A7; 01A8; Case map*/
+    '\u01A9',	/*01A9; 0283; Case map*/
+    '\u01AC',	/*01AC; 01AD; Case map*/
+    '\u01AE',	/*01AE; 0288; Case map*/
+    '\u01AF',	/*01AF; 01B0; Case map*/
+    '\u01B1',	/*01B1; 028A; Case map*/
+    '\u01B2',	/*01B2; 028B; Case map*/
+    '\u01B3',	/*01B3; 01B4; Case map*/
+    '\u01B5',	/*01B5; 01B6; Case map*/
+    '\u01B7',	/*01B7; 0292; Case map*/
+    '\u01B8',	/*01B8; 01B9; Case map*/
+    '\u01BC',	/*01BC; 01BD; Case map*/
+    '\u01C4',	/*01C4; 01C6; Case map*/
+    '\u01C5',	/*01C5; 01C6; Case map*/
+    '\u01C7',	/*01C7; 01C9; Case map*/
+    '\u01C8',	/*01C8; 01C9; Case map*/
+    '\u01CA',	/*01CA; 01CC; Case map*/
+    '\u01CB',	/*01CB; 01CC; Case map*/
+    '\u01CD',	/*01CD; 01CE; Case map*/
+    '\u01CF',	/*01CF; 01D0; Case map*/
+    '\u01D1',	/*01D1; 01D2; Case map*/
+    '\u01D3',	/*01D3; 01D4; Case map*/
+    '\u01D5',	/*01D5; 01D6; Case map*/
+    '\u01D7',	/*01D7; 01D8; Case map*/
+    '\u01D9',	/*01D9; 01DA; Case map*/
+    '\u01DB',	/*01DB; 01DC; Case map*/
+    '\u01DE',	/*01DE; 01DF; Case map*/
+    '\u01E0',	/*01E0; 01E1; Case map*/
+    '\u01E2',	/*01E2; 01E3; Case map*/
+    '\u01E4',	/*01E4; 01E5; Case map*/
+    '\u01E6',	/*01E6; 01E7; Case map*/
+    '\u01E8',	/*01E8; 01E9; Case map*/
+    '\u01EA',	/*01EA; 01EB; Case map*/
+    '\u01EC',	/*01EC; 01ED; Case map*/
+    '\u01EE',	/*01EE; 01EF; Case map*/
+    '\u01F0',	/*01F0; 006A 030C; Case map*/
+    '\u01F1',	/*01F1; 01F3; Case map*/
+    '\u01F2',	/*01F2; 01F3; Case map*/
+    '\u01F4',	/*01F4; 01F5; Case map*/
+    '\u01F6',	/*01F6; 0195; Case map*/
+    '\u01F7',	/*01F7; 01BF; Case map*/
+    '\u01F8',	/*01F8; 01F9; Case map*/
+    '\u01FA',	/*01FA; 01FB; Case map*/
+    '\u01FC',	/*01FC; 01FD; Case map*/
+    '\u01FE',	/*01FE; 01FF; Case map*/
+    '\u0200',	/*0200; 0201; Case map*/
+    '\u0202',	/*0202; 0203; Case map*/
+    '\u0204',	/*0204; 0205; Case map*/
+    '\u0206',	/*0206; 0207; Case map*/
+    '\u0208',	/*0208; 0209; Case map*/
+    '\u020A',	/*020A; 020B; Case map*/
+    '\u020C',	/*020C; 020D; Case map*/
+    '\u020E',	/*020E; 020F; Case map*/
+    '\u0210',	/*0210; 0211; Case map*/
+    '\u0212',	/*0212; 0213; Case map*/
+    '\u0214',	/*0214; 0215; Case map*/
+    '\u0216',	/*0216; 0217; Case map*/
+    '\u0218',	/*0218; 0219; Case map*/
+    '\u021A',	/*021A; 021B; Case map*/
+    '\u021C',	/*021C; 021D; Case map*/
+    '\u021E',	/*021E; 021F; Case map*/
+    '\u0220',	/*0220; 019E; Case map*/
+    '\u0222',	/*0222; 0223; Case map*/
+    '\u0224',	/*0224; 0225; Case map*/
+    '\u0226',	/*0226; 0227; Case map*/
+    '\u0228',	/*0228; 0229; Case map*/
+    '\u022A',	/*022A; 022B; Case map*/
+    '\u022C',	/*022C; 022D; Case map*/
+    '\u022E',	/*022E; 022F; Case map*/
+    '\u0230',	/*0230; 0231; Case map*/
+    '\u0232',	/*0232; 0233; Case map*/
+    '\u0345',	/*0345; 03B9; Case map*/
+    '\u037A',	/*037A; 0020 03B9; Additional folding*/
+    '\u0386',	/*0386; 03AC; Case map*/
+    '\u0388',	/*0388; 03AD; Case map*/
+    '\u0389',	/*0389; 03AE; Case map*/
+    '\u038A',	/*038A; 03AF; Case map*/
+    '\u038C',	/*038C; 03CC; Case map*/
+    '\u038E',	/*038E; 03CD; Case map*/
+    '\u038F',	/*038F; 03CE; Case map*/
+    '\u0390',	/*0390; 03B9 0308 0301; Case map*/
+    '\u0391',	/*0391; 03B1; Case map*/
+    '\u0392',	/*0392; 03B2; Case map*/
+    '\u0393',	/*0393; 03B3; Case map*/
+    '\u0394',	/*0394; 03B4; Case map*/
+    '\u0395',	/*0395; 03B5; Case map*/
+    '\u0396',	/*0396; 03B6; Case map*/
+    '\u0397',	/*0397; 03B7; Case map*/
+    '\u0398',	/*0398; 03B8; Case map*/
+    '\u0399',	/*0399; 03B9; Case map*/
+    '\u039A',	/*039A; 03BA; Case map*/
+    '\u039B',	/*039B; 03BB; Case map*/
+    '\u039C',	/*039C; 03BC; Case map*/
+    '\u039D',	/*039D; 03BD; Case map*/
+    '\u039E',	/*039E; 03BE; Case map*/
+    '\u039F',	/*039F; 03BF; Case map*/
+    '\u03A0',	/*03A0; 03C0; Case map*/
+    '\u03A1',	/*03A1; 03C1; Case map*/
+    '\u03A3',	/*03A3; 03C3; Case map*/
+    '\u03A4',	/*03A4; 03C4; Case map*/
+    '\u03A5',	/*03A5; 03C5; Case map*/
+    '\u03A6',	/*03A6; 03C6; Case map*/
+    '\u03A7',	/*03A7; 03C7; Case map*/
+    '\u03A8',	/*03A8; 03C8; Case map*/
+    '\u03A9',	/*03A9; 03C9; Case map*/
+    '\u03AA',	/*03AA; 03CA; Case map*/
+    '\u03AB',	/*03AB; 03CB; Case map*/
+    '\u03B0',	/*03B0; 03C5 0308 0301; Case map*/
+    '\u03C2',	/*03C2; 03C3; Case map*/
+    '\u03D0',	/*03D0; 03B2; Case map*/
+    '\u03D1',	/*03D1; 03B8; Case map*/
+    '\u03D2',	/*03D2; 03C5; Additional folding*/
+    '\u03D3',	/*03D3; 03CD; Additional folding*/
+    '\u03D4',	/*03D4; 03CB; Additional folding*/
+    '\u03D5',	/*03D5; 03C6; Case map*/
+    '\u03D6',	/*03D6; 03C0; Case map*/
+    '\u03D8',	/*03D8; 03D9; Case map*/
+    '\u03DA',	/*03DA; 03DB; Case map*/
+    '\u03DC',	/*03DC; 03DD; Case map*/
+    '\u03DE',	/*03DE; 03DF; Case map*/
+    '\u03E0',	/*03E0; 03E1; Case map*/
+    '\u03E2',	/*03E2; 03E3; Case map*/
+    '\u03E4',	/*03E4; 03E5; Case map*/
+    '\u03E6',	/*03E6; 03E7; Case map*/
+    '\u03E8',	/*03E8; 03E9; Case map*/
+    '\u03EA',	/*03EA; 03EB; Case map*/
+    '\u03EC',	/*03EC; 03ED; Case map*/
+    '\u03EE',	/*03EE; 03EF; Case map*/
+    '\u03F0',	/*03F0; 03BA; Case map*/
+    '\u03F1',	/*03F1; 03C1; Case map*/
+    '\u03F2',	/*03F2; 03C3; Case map*/
+    '\u03F4',	/*03F4; 03B8; Case map*/
+    '\u03F5',	/*03F5; 03B5; Case map*/
+    '\u0400',	/*0400; 0450; Case map*/
+    '\u0401',	/*0401; 0451; Case map*/
+    '\u0402',	/*0402; 0452; Case map*/
+    '\u0403',	/*0403; 0453; Case map*/
+    '\u0404',	/*0404; 0454; Case map*/
+    '\u0405',	/*0405; 0455; Case map*/
+    '\u0406',	/*0406; 0456; Case map*/
+    '\u0407',	/*0407; 0457; Case map*/
+    '\u0408',	/*0408; 0458; Case map*/
+    '\u0409',	/*0409; 0459; Case map*/
+    '\u040A',	/*040A; 045A; Case map*/
+    '\u040B',	/*040B; 045B; Case map*/
+    '\u040C',	/*040C; 045C; Case map*/
+    '\u040D',	/*040D; 045D; Case map*/
+    '\u040E',	/*040E; 045E; Case map*/
+    '\u040F',	/*040F; 045F; Case map*/
+    '\u0410',	/*0410; 0430; Case map*/
+    '\u0411',	/*0411; 0431; Case map*/
+    '\u0412',	/*0412; 0432; Case map*/
+    '\u0413',	/*0413; 0433; Case map*/
+    '\u0414',	/*0414; 0434; Case map*/
+    '\u0415',	/*0415; 0435; Case map*/
+    '\u0416',	/*0416; 0436; Case map*/
+    '\u0417',	/*0417; 0437; Case map*/
+    '\u0418',	/*0418; 0438; Case map*/
+    '\u0419',	/*0419; 0439; Case map*/
+    '\u041A',	/*041A; 043A; Case map*/
+    '\u041B',	/*041B; 043B; Case map*/
+    '\u041C',	/*041C; 043C; Case map*/
+    '\u041D',	/*041D; 043D; Case map*/
+    '\u041E',	/*041E; 043E; Case map*/
+    '\u041F',	/*041F; 043F; Case map*/
+    '\u0420',	/*0420; 0440; Case map*/
+    '\u0421',	/*0421; 0441; Case map*/
+    '\u0422',	/*0422; 0442; Case map*/
+    '\u0423',	/*0423; 0443; Case map*/
+    '\u0424',	/*0424; 0444; Case map*/
+    '\u0425',	/*0425; 0445; Case map*/
+    '\u0426',	/*0426; 0446; Case map*/
+    '\u0427',	/*0427; 0447; Case map*/
+    '\u0428',	/*0428; 0448; Case map*/
+    '\u0429',	/*0429; 0449; Case map*/
+    '\u042A',	/*042A; 044A; Case map*/
+    '\u042B',	/*042B; 044B; Case map*/
+    '\u042C',	/*042C; 044C; Case map*/
+    '\u042D',	/*042D; 044D; Case map*/
+    '\u042E',	/*042E; 044E; Case map*/
+    '\u042F',	/*042F; 044F; Case map*/
+    '\u0460',	/*0460; 0461; Case map*/
+    '\u0462',	/*0462; 0463; Case map*/
+    '\u0464',	/*0464; 0465; Case map*/
+    '\u0466',	/*0466; 0467; Case map*/
+    '\u0468',	/*0468; 0469; Case map*/
+    '\u046A',	/*046A; 046B; Case map*/
+    '\u046C',	/*046C; 046D; Case map*/
+    '\u046E',	/*046E; 046F; Case map*/
+    '\u0470',	/*0470; 0471; Case map*/
+    '\u0472',	/*0472; 0473; Case map*/
+    '\u0474',	/*0474; 0475; Case map*/
+    '\u0476',	/*0476; 0477; Case map*/
+    '\u0478',	/*0478; 0479; Case map*/
+    '\u047A',	/*047A; 047B; Case map*/
+    '\u047C',	/*047C; 047D; Case map*/
+    '\u047E',	/*047E; 047F; Case map*/
+    '\u0480',	/*0480; 0481; Case map*/
+    '\u048A',	/*048A; 048B; Case map*/
+    '\u048C',	/*048C; 048D; Case map*/
+    '\u048E',	/*048E; 048F; Case map*/
+    '\u0490',	/*0490; 0491; Case map*/
+    '\u0492',	/*0492; 0493; Case map*/
+    '\u0494',	/*0494; 0495; Case map*/
+    '\u0496',	/*0496; 0497; Case map*/
+    '\u0498',	/*0498; 0499; Case map*/
+    '\u049A',	/*049A; 049B; Case map*/
+    '\u049C',	/*049C; 049D; Case map*/
+    '\u049E',	/*049E; 049F; Case map*/
+    '\u04A0',	/*04A0; 04A1; Case map*/
+    '\u04A2',	/*04A2; 04A3; Case map*/
+    '\u04A4',	/*04A4; 04A5; Case map*/
+    '\u04A6',	/*04A6; 04A7; Case map*/
+    '\u04A8',	/*04A8; 04A9; Case map*/
+    '\u04AA',	/*04AA; 04AB; Case map*/
+    '\u04AC',	/*04AC; 04AD; Case map*/
+    '\u04AE',	/*04AE; 04AF; Case map*/
+    '\u04B0',	/*04B0; 04B1; Case map*/
+    '\u04B2',	/*04B2; 04B3; Case map*/
+    '\u04B4',	/*04B4; 04B5; Case map*/
+    '\u04B6',	/*04B6; 04B7; Case map*/
+    '\u04B8',	/*04B8; 04B9; Case map*/
+    '\u04BA',	/*04BA; 04BB; Case map*/
+    '\u04BC',	/*04BC; 04BD; Case map*/
+    '\u04BE',	/*04BE; 04BF; Case map*/
+    '\u04C1',	/*04C1; 04C2; Case map*/
+    '\u04C3',	/*04C3; 04C4; Case map*/
+    '\u04C5',	/*04C5; 04C6; Case map*/
+    '\u04C7',	/*04C7; 04C8; Case map*/
+    '\u04C9',	/*04C9; 04CA; Case map*/
+    '\u04CB',	/*04CB; 04CC; Case map*/
+    '\u04CD',	/*04CD; 04CE; Case map*/
+    '\u04D0',	/*04D0; 04D1; Case map*/
+    '\u04D2',	/*04D2; 04D3; Case map*/
+    '\u04D4',	/*04D4; 04D5; Case map*/
+    '\u04D6',	/*04D6; 04D7; Case map*/
+    '\u04D8',	/*04D8; 04D9; Case map*/
+    '\u04DA',	/*04DA; 04DB; Case map*/
+    '\u04DC',	/*04DC; 04DD; Case map*/
+    '\u04DE',	/*04DE; 04DF; Case map*/
+    '\u04E0',	/*04E0; 04E1; Case map*/
+    '\u04E2',	/*04E2; 04E3; Case map*/
+    '\u04E4',	/*04E4; 04E5; Case map*/
+    '\u04E6',	/*04E6; 04E7; Case map*/
+    '\u04E8',	/*04E8; 04E9; Case map*/
+    '\u04EA',	/*04EA; 04EB; Case map*/
+    '\u04EC',	/*04EC; 04ED; Case map*/
+    '\u04EE',	/*04EE; 04EF; Case map*/
+    '\u04F0',	/*04F0; 04F1; Case map*/
+    '\u04F2',	/*04F2; 04F3; Case map*/
+    '\u04F4',	/*04F4; 04F5; Case map*/
+    '\u04F8',	/*04F8; 04F9; Case map*/
+    '\u0500',	/*0500; 0501; Case map*/
+    '\u0502',	/*0502; 0503; Case map*/
+    '\u0504',	/*0504; 0505; Case map*/
+    '\u0506',	/*0506; 0507; Case map*/
+    '\u0508',	/*0508; 0509; Case map*/
+    '\u050A',	/*050A; 050B; Case map*/
+    '\u050C',	/*050C; 050D; Case map*/
+    '\u050E',	/*050E; 050F; Case map*/
+    '\u0531',	/*0531; 0561; Case map*/
+    '\u0532',	/*0532; 0562; Case map*/
+    '\u0533',	/*0533; 0563; Case map*/
+    '\u0534',	/*0534; 0564; Case map*/
+    '\u0535',	/*0535; 0565; Case map*/
+    '\u0536',	/*0536; 0566; Case map*/
+    '\u0537',	/*0537; 0567; Case map*/
+    '\u0538',	/*0538; 0568; Case map*/
+    '\u0539',	/*0539; 0569; Case map*/
+    '\u053A',	/*053A; 056A; Case map*/
+    '\u053B',	/*053B; 056B; Case map*/
+    '\u053C',	/*053C; 056C; Case map*/
+    '\u053D',	/*053D; 056D; Case map*/
+    '\u053E',	/*053E; 056E; Case map*/
+    '\u053F',	/*053F; 056F; Case map*/
+    '\u0540',	/*0540; 0570; Case map*/
+    '\u0541',	/*0541; 0571; Case map*/
+    '\u0542',	/*0542; 0572; Case map*/
+    '\u0543',	/*0543; 0573; Case map*/
+    '\u0544',	/*0544; 0574; Case map*/
+    '\u0545',	/*0545; 0575; Case map*/
+    '\u0546',	/*0546; 0576; Case map*/
+    '\u0547',	/*0547; 0577; Case map*/
+    '\u0548',	/*0548; 0578; Case map*/
+    '\u0549',	/*0549; 0579; Case map*/
+    '\u054A',	/*054A; 057A; Case map*/
+    '\u054B',	/*054B; 057B; Case map*/
+    '\u054C',	/*054C; 057C; Case map*/
+    '\u054D',	/*054D; 057D; Case map*/
+    '\u054E',	/*054E; 057E; Case map*/
+    '\u054F',	/*054F; 057F; Case map*/
+    '\u0550',	/*0550; 0580; Case map*/
+    '\u0551',	/*0551; 0581; Case map*/
+    '\u0552',	/*0552; 0582; Case map*/
+    '\u0553',	/*0553; 0583; Case map*/
+    '\u0554',	/*0554; 0584; Case map*/
+    '\u0555',	/*0555; 0585; Case map*/
+    '\u0556',	/*0556; 0586; Case map*/
+    '\u0587',	/*0587; 0565 0582; Case map*/
+    '\u1E00',	/*1E00; 1E01; Case map*/
+    '\u1E02',	/*1E02; 1E03; Case map*/
+    '\u1E04',	/*1E04; 1E05; Case map*/
+    '\u1E06',	/*1E06; 1E07; Case map*/
+    '\u1E08',	/*1E08; 1E09; Case map*/
+    '\u1E0A',	/*1E0A; 1E0B; Case map*/
+    '\u1E0C',	/*1E0C; 1E0D; Case map*/
+    '\u1E0E',	/*1E0E; 1E0F; Case map*/
+    '\u1E10',	/*1E10; 1E11; Case map*/
+    '\u1E12',	/*1E12; 1E13; Case map*/
+    '\u1E14',	/*1E14; 1E15; Case map*/
+    '\u1E16',	/*1E16; 1E17; Case map*/
+    '\u1E18',	/*1E18; 1E19; Case map*/
+    '\u1E1A',	/*1E1A; 1E1B; Case map*/
+    '\u1E1C',	/*1E1C; 1E1D; Case map*/
+    '\u1E1E',	/*1E1E; 1E1F; Case map*/
+    '\u1E20',	/*1E20; 1E21; Case map*/
+    '\u1E22',	/*1E22; 1E23; Case map*/
+    '\u1E24',	/*1E24; 1E25; Case map*/
+    '\u1E26',	/*1E26; 1E27; Case map*/
+    '\u1E28',	/*1E28; 1E29; Case map*/
+    '\u1E2A',	/*1E2A; 1E2B; Case map*/
+    '\u1E2C',	/*1E2C; 1E2D; Case map*/
+    '\u1E2E',	/*1E2E; 1E2F; Case map*/
+    '\u1E30',	/*1E30; 1E31; Case map*/
+    '\u1E32',	/*1E32; 1E33; Case map*/
+    '\u1E34',	/*1E34; 1E35; Case map*/
+    '\u1E36',	/*1E36; 1E37; Case map*/
+    '\u1E38',	/*1E38; 1E39; Case map*/
+    '\u1E3A',	/*1E3A; 1E3B; Case map*/
+    '\u1E3C',	/*1E3C; 1E3D; Case map*/
+    '\u1E3E',	/*1E3E; 1E3F; Case map*/
+    '\u1E40',	/*1E40; 1E41; Case map*/
+    '\u1E42',	/*1E42; 1E43; Case map*/
+    '\u1E44',	/*1E44; 1E45; Case map*/
+    '\u1E46',	/*1E46; 1E47; Case map*/
+    '\u1E48',	/*1E48; 1E49; Case map*/
+    '\u1E4A',	/*1E4A; 1E4B; Case map*/
+    '\u1E4C',	/*1E4C; 1E4D; Case map*/
+    '\u1E4E',	/*1E4E; 1E4F; Case map*/
+    '\u1E50',	/*1E50; 1E51; Case map*/
+    '\u1E52',	/*1E52; 1E53; Case map*/
+    '\u1E54',	/*1E54; 1E55; Case map*/
+    '\u1E56',	/*1E56; 1E57; Case map*/
+    '\u1E58',	/*1E58; 1E59; Case map*/
+    '\u1E5A',	/*1E5A; 1E5B; Case map*/
+    '\u1E5C',	/*1E5C; 1E5D; Case map*/
+    '\u1E5E',	/*1E5E; 1E5F; Case map*/
+    '\u1E60',	/*1E60; 1E61; Case map*/
+    '\u1E62',	/*1E62; 1E63; Case map*/
+    '\u1E64',	/*1E64; 1E65; Case map*/
+    '\u1E66',	/*1E66; 1E67; Case map*/
+    '\u1E68',	/*1E68; 1E69; Case map*/
+    '\u1E6A',	/*1E6A; 1E6B; Case map*/
+    '\u1E6C',	/*1E6C; 1E6D; Case map*/
+    '\u1E6E',	/*1E6E; 1E6F; Case map*/
+    '\u1E70',	/*1E70; 1E71; Case map*/
+    '\u1E72',	/*1E72; 1E73; Case map*/
+    '\u1E74',	/*1E74; 1E75; Case map*/
+    '\u1E76',	/*1E76; 1E77; Case map*/
+    '\u1E78',	/*1E78; 1E79; Case map*/
+    '\u1E7A',	/*1E7A; 1E7B; Case map*/
+    '\u1E7C',	/*1E7C; 1E7D; Case map*/
+    '\u1E7E',	/*1E7E; 1E7F; Case map*/
+    '\u1E80',	/*1E80; 1E81; Case map*/
+    '\u1E82',	/*1E82; 1E83; Case map*/
+    '\u1E84',	/*1E84; 1E85; Case map*/
+    '\u1E86',	/*1E86; 1E87; Case map*/
+    '\u1E88',	/*1E88; 1E89; Case map*/
+    '\u1E8A',	/*1E8A; 1E8B; Case map*/
+    '\u1E8C',	/*1E8C; 1E8D; Case map*/
+    '\u1E8E',	/*1E8E; 1E8F; Case map*/
+    '\u1E90',	/*1E90; 1E91; Case map*/
+    '\u1E92',	/*1E92; 1E93; Case map*/
+    '\u1E94',	/*1E94; 1E95; Case map*/
+    '\u1E96',	/*1E96; 0068 0331; Case map*/
+    '\u1E97',	/*1E97; 0074 0308; Case map*/
+    '\u1E98',	/*1E98; 0077 030A; Case map*/
+    '\u1E99',	/*1E99; 0079 030A; Case map*/
+    '\u1E9A',	/*1E9A; 0061 02BE; Case map*/
+    '\u1E9B',	/*1E9B; 1E61; Case map*/
+    '\u1EA0',	/*1EA0; 1EA1; Case map*/
+    '\u1EA2',	/*1EA2; 1EA3; Case map*/
+    '\u1EA4',	/*1EA4; 1EA5; Case map*/
+    '\u1EA6',	/*1EA6; 1EA7; Case map*/
+    '\u1EA8',	/*1EA8; 1EA9; Case map*/
+    '\u1EAA',	/*1EAA; 1EAB; Case map*/
+    '\u1EAC',	/*1EAC; 1EAD; Case map*/
+    '\u1EAE',	/*1EAE; 1EAF; Case map*/
+    '\u1EB0',	/*1EB0; 1EB1; Case map*/
+    '\u1EB2',	/*1EB2; 1EB3; Case map*/
+    '\u1EB4',	/*1EB4; 1EB5; Case map*/
+    '\u1EB6',	/*1EB6; 1EB7; Case map*/
+    '\u1EB8',	/*1EB8; 1EB9; Case map*/
+    '\u1EBA',	/*1EBA; 1EBB; Case map*/
+    '\u1EBC',	/*1EBC; 1EBD; Case map*/
+    '\u1EBE',	/*1EBE; 1EBF; Case map*/
+    '\u1EC0',	/*1EC0; 1EC1; Case map*/
+    '\u1EC2',	/*1EC2; 1EC3; Case map*/
+    '\u1EC4',	/*1EC4; 1EC5; Case map*/
+    '\u1EC6',	/*1EC6; 1EC7; Case map*/
+    '\u1EC8',	/*1EC8; 1EC9; Case map*/
+    '\u1ECA',	/*1ECA; 1ECB; Case map*/
+    '\u1ECC',	/*1ECC; 1ECD; Case map*/
+    '\u1ECE',	/*1ECE; 1ECF; Case map*/
+    '\u1ED0',	/*1ED0; 1ED1; Case map*/
+    '\u1ED2',	/*1ED2; 1ED3; Case map*/
+    '\u1ED4',	/*1ED4; 1ED5; Case map*/
+    '\u1ED6',	/*1ED6; 1ED7; Case map*/
+    '\u1ED8',	/*1ED8; 1ED9; Case map*/
+    '\u1EDA',	/*1EDA; 1EDB; Case map*/
+    '\u1EDC',	/*1EDC; 1EDD; Case map*/
+    '\u1EDE',	/*1EDE; 1EDF; Case map*/
+    '\u1EE0',	/*1EE0; 1EE1; Case map*/
+    '\u1EE2',	/*1EE2; 1EE3; Case map*/
+    '\u1EE4',	/*1EE4; 1EE5; Case map*/
+    '\u1EE6',	/*1EE6; 1EE7; Case map*/
+    '\u1EE8',	/*1EE8; 1EE9; Case map*/
+    '\u1EEA',	/*1EEA; 1EEB; Case map*/
+    '\u1EEC',	/*1EEC; 1EED; Case map*/
+    '\u1EEE',	/*1EEE; 1EEF; Case map*/
+    '\u1EF0',	/*1EF0; 1EF1; Case map*/
+    '\u1EF2',	/*1EF2; 1EF3; Case map*/
+    '\u1EF4',	/*1EF4; 1EF5; Case map*/
+    '\u1EF6',	/*1EF6; 1EF7; Case map*/
+    '\u1EF8',	/*1EF8; 1EF9; Case map*/
+    '\u1F08',	/*1F08; 1F00; Case map*/
+    '\u1F09',	/*1F09; 1F01; Case map*/
+    '\u1F0A',	/*1F0A; 1F02; Case map*/
+    '\u1F0B',	/*1F0B; 1F03; Case map*/
+    '\u1F0C',	/*1F0C; 1F04; Case map*/
+    '\u1F0D',	/*1F0D; 1F05; Case map*/
+    '\u1F0E',	/*1F0E; 1F06; Case map*/
+    '\u1F0F',	/*1F0F; 1F07; Case map*/
+    '\u1F18',	/*1F18; 1F10; Case map*/
+    '\u1F19',	/*1F19; 1F11; Case map*/
+    '\u1F1A',	/*1F1A; 1F12; Case map*/
+    '\u1F1B',	/*1F1B; 1F13; Case map*/
+    '\u1F1C',	/*1F1C; 1F14; Case map*/
+    '\u1F1D',	/*1F1D; 1F15; Case map*/
+    '\u1F28',	/*1F28; 1F20; Case map*/
+    '\u1F29',	/*1F29; 1F21; Case map*/
+    '\u1F2A',	/*1F2A; 1F22; Case map*/
+    '\u1F2B',	/*1F2B; 1F23; Case map*/
+    '\u1F2C',	/*1F2C; 1F24; Case map*/
+    '\u1F2D',	/*1F2D; 1F25; Case map*/
+    '\u1F2E',	/*1F2E; 1F26; Case map*/
+    '\u1F2F',	/*1F2F; 1F27; Case map*/
+    '\u1F38',	/*1F38; 1F30; Case map*/
+    '\u1F39',	/*1F39; 1F31; Case map*/
+    '\u1F3A',	/*1F3A; 1F32; Case map*/
+    '\u1F3B',	/*1F3B; 1F33; Case map*/
+    '\u1F3C',	/*1F3C; 1F34; Case map*/
+    '\u1F3D',	/*1F3D; 1F35; Case map*/
+    '\u1F3E',	/*1F3E; 1F36; Case map*/
+    '\u1F3F',	/*1F3F; 1F37; Case map*/
+    '\u1F48',	/*1F48; 1F40; Case map*/
+    '\u1F49',	/*1F49; 1F41; Case map*/
+    '\u1F4A',	/*1F4A; 1F42; Case map*/
+    '\u1F4B',	/*1F4B; 1F43; Case map*/
+    '\u1F4C',	/*1F4C; 1F44; Case map*/
+    '\u1F4D',	/*1F4D; 1F45; Case map*/
+    '\u1F50',	/*1F50; 03C5 0313; Case map*/
+    '\u1F52',	/*1F52; 03C5 0313 0300; Case map*/
+    '\u1F54',	/*1F54; 03C5 0313 0301; Case map*/
+    '\u1F56',	/*1F56; 03C5 0313 0342; Case map*/
+    '\u1F59',	/*1F59; 1F51; Case map*/
+    '\u1F5B',	/*1F5B; 1F53; Case map*/
+    '\u1F5D',	/*1F5D; 1F55; Case map*/
+    '\u1F5F',	/*1F5F; 1F57; Case map*/
+    '\u1F68',	/*1F68; 1F60; Case map*/
+    '\u1F69',	/*1F69; 1F61; Case map*/
+    '\u1F6A',	/*1F6A; 1F62; Case map*/
+    '\u1F6B',	/*1F6B; 1F63; Case map*/
+    '\u1F6C',	/*1F6C; 1F64; Case map*/
+    '\u1F6D',	/*1F6D; 1F65; Case map*/
+    '\u1F6E',	/*1F6E; 1F66; Case map*/
+    '\u1F6F',	/*1F6F; 1F67; Case map*/
+    '\u1F80',	/*1F80; 1F00 03B9; Case map*/
+    '\u1F81',	/*1F81; 1F01 03B9; Case map*/
+    '\u1F82',	/*1F82; 1F02 03B9; Case map*/
+    '\u1F83',	/*1F83; 1F03 03B9; Case map*/
+    '\u1F84',	/*1F84; 1F04 03B9; Case map*/
+    '\u1F85',	/*1F85; 1F05 03B9; Case map*/
+    '\u1F86',	/*1F86; 1F06 03B9; Case map*/
+    '\u1F87',	/*1F87; 1F07 03B9; Case map*/
+    '\u1F88',	/*1F88; 1F00 03B9; Case map*/
+    '\u1F89',	/*1F89; 1F01 03B9; Case map*/
+    '\u1F8A',	/*1F8A; 1F02 03B9; Case map*/
+    '\u1F8B',	/*1F8B; 1F03 03B9; Case map*/
+    '\u1F8C',	/*1F8C; 1F04 03B9; Case map*/
+    '\u1F8D',	/*1F8D; 1F05 03B9; Case map*/
+    '\u1F8E',	/*1F8E; 1F06 03B9; Case map*/
+    '\u1F8F',	/*1F8F; 1F07 03B9; Case map*/
+    '\u1F90',	/*1F90; 1F20 03B9; Case map*/
+    '\u1F91',	/*1F91; 1F21 03B9; Case map*/
+    '\u1F92',	/*1F92; 1F22 03B9; Case map*/
+    '\u1F93',	/*1F93; 1F23 03B9; Case map*/
+    '\u1F94',	/*1F94; 1F24 03B9; Case map*/
+    '\u1F95',	/*1F95; 1F25 03B9; Case map*/
+    '\u1F96',	/*1F96; 1F26 03B9; Case map*/
+    '\u1F97',	/*1F97; 1F27 03B9; Case map*/
+    '\u1F98',	/*1F98; 1F20 03B9; Case map*/
+    '\u1F99',	/*1F99; 1F21 03B9; Case map*/
+    '\u1F9A',	/*1F9A; 1F22 03B9; Case map*/
+    '\u1F9B',	/*1F9B; 1F23 03B9; Case map*/
+    '\u1F9C',	/*1F9C; 1F24 03B9; Case map*/
+    '\u1F9D',	/*1F9D; 1F25 03B9; Case map*/
+    '\u1F9E',	/*1F9E; 1F26 03B9; Case map*/
+    '\u1F9F',	/*1F9F; 1F27 03B9; Case map*/
+    '\u1FA0',	/*1FA0; 1F60 03B9; Case map*/
+    '\u1FA1',	/*1FA1; 1F61 03B9; Case map*/
+    '\u1FA2',	/*1FA2; 1F62 03B9; Case map*/
+    '\u1FA3',	/*1FA3; 1F63 03B9; Case map*/
+    '\u1FA4',	/*1FA4; 1F64 03B9; Case map*/
+    '\u1FA5',	/*1FA5; 1F65 03B9; Case map*/
+    '\u1FA6',	/*1FA6; 1F66 03B9; Case map*/
+    '\u1FA7',	/*1FA7; 1F67 03B9; Case map*/
+    '\u1FA8',	/*1FA8; 1F60 03B9; Case map*/
+    '\u1FA9',	/*1FA9; 1F61 03B9; Case map*/
+    '\u1FAA',	/*1FAA; 1F62 03B9; Case map*/
+    '\u1FAB',	/*1FAB; 1F63 03B9; Case map*/
+    '\u1FAC',	/*1FAC; 1F64 03B9; Case map*/
+    '\u1FAD',	/*1FAD; 1F65 03B9; Case map*/
+    '\u1FAE',	/*1FAE; 1F66 03B9; Case map*/
+    '\u1FAF',	/*1FAF; 1F67 03B9; Case map*/
+    '\u1FB2',	/*1FB2; 1F70 03B9; Case map*/
+    '\u1FB3',	/*1FB3; 03B1 03B9; Case map*/
+    '\u1FB4',	/*1FB4; 03AC 03B9; Case map*/
+    '\u1FB6',	/*1FB6; 03B1 0342; Case map*/
+    '\u1FB7',	/*1FB7; 03B1 0342 03B9; Case map*/
+    '\u1FB8',	/*1FB8; 1FB0; Case map*/
+    '\u1FB9',	/*1FB9; 1FB1; Case map*/
+    '\u1FBA',	/*1FBA; 1F70; Case map*/
+    '\u1FBB',	/*1FBB; 1F71; Case map*/
+    '\u1FBC',	/*1FBC; 03B1 03B9; Case map*/
+    '\u1FBE',	/*1FBE; 03B9; Case map*/
+    '\u1FC2',	/*1FC2; 1F74 03B9; Case map*/
+    '\u1FC3',	/*1FC3; 03B7 03B9; Case map*/
+    '\u1FC4',	/*1FC4; 03AE 03B9; Case map*/
+    '\u1FC6',	/*1FC6; 03B7 0342; Case map*/
+    '\u1FC7',	/*1FC7; 03B7 0342 03B9; Case map*/
+    '\u1FC8',	/*1FC8; 1F72; Case map*/
+    '\u1FC9',	/*1FC9; 1F73; Case map*/
+    '\u1FCA',	/*1FCA; 1F74; Case map*/
+    '\u1FCB',	/*1FCB; 1F75; Case map*/
+    '\u1FCC',	/*1FCC; 03B7 03B9; Case map*/
+    '\u1FD2',	/*1FD2; 03B9 0308 0300; Case map*/
+    '\u1FD3',	/*1FD3; 03B9 0308 0301; Case map*/
+    '\u1FD6',	/*1FD6; 03B9 0342; Case map*/
+    '\u1FD7',	/*1FD7; 03B9 0308 0342; Case map*/
+    '\u1FD8',	/*1FD8; 1FD0; Case map*/
+    '\u1FD9',	/*1FD9; 1FD1; Case map*/
+    '\u1FDA',	/*1FDA; 1F76; Case map*/
+    '\u1FDB',	/*1FDB; 1F77; Case map*/
+    '\u1FE2',	/*1FE2; 03C5 0308 0300; Case map*/
+    '\u1FE3',	/*1FE3; 03C5 0308 0301; Case map*/
+    '\u1FE4',	/*1FE4; 03C1 0313; Case map*/
+    '\u1FE6',	/*1FE6; 03C5 0342; Case map*/
+    '\u1FE7',	/*1FE7; 03C5 0308 0342; Case map*/
+    '\u1FE8',	/*1FE8; 1FE0; Case map*/
+    '\u1FE9',	/*1FE9; 1FE1; Case map*/
+    '\u1FEA',	/*1FEA; 1F7A; Case map*/
+    '\u1FEB',	/*1FEB; 1F7B; Case map*/
+    '\u1FEC',	/*1FEC; 1FE5; Case map*/
+    '\u1FF2',	/*1FF2; 1F7C 03B9; Case map*/
+    '\u1FF3',	/*1FF3; 03C9 03B9; Case map*/
+    '\u1FF4',	/*1FF4; 03CE 03B9; Case map*/
+    '\u1FF6',	/*1FF6; 03C9 0342; Case map*/
+    '\u1FF7',	/*1FF7; 03C9 0342 03B9; Case map*/
+    '\u1FF8',	/*1FF8; 1F78; Case map*/
+    '\u1FF9',	/*1FF9; 1F79; Case map*/
+    '\u1FFA',	/*1FFA; 1F7C; Case map*/
+    '\u1FFB',	/*1FFB; 1F7D; Case map*/
+    '\u1FFC',	/*1FFC; 03C9 03B9; Case map*/
+    '\u20A8',	/*20A8; 0072 0073; Additional folding*/
+    '\u2102',	/*2102; 0063; Additional folding*/
+    '\u2103',	/*2103; 00B0 0063; Additional folding*/
+    '\u2107',	/*2107; 025B; Additional folding*/
+    '\u2109',	/*2109; 00B0 0066; Additional folding*/
+    '\u210B',	/*210B; 0068; Additional folding*/
+    '\u210C',	/*210C; 0068; Additional folding*/
+    '\u210D',	/*210D; 0068; Additional folding*/
+    '\u2110',	/*2110; 0069; Additional folding*/
+    '\u2111',	/*2111; 0069; Additional folding*/
+    '\u2112',	/*2112; 006C; Additional folding*/
+    '\u2115',	/*2115; 006E; Additional folding*/
+    '\u2116',	/*2116; 006E 006F; Additional folding*/
+    '\u2119',	/*2119; 0070; Additional folding*/
+    '\u211A',	/*211A; 0071; Additional folding*/
+    '\u211B',	/*211B; 0072; Additional folding*/
+    '\u211C',	/*211C; 0072; Additional folding*/
+    '\u211D',	/*211D; 0072; Additional folding*/
+    '\u2120',	/*2120; 0073 006D; Additional folding*/
+    '\u2121',	/*2121; 0074 0065 006C; Additional folding*/
+    '\u2122',	/*2122; 0074 006D; Additional folding*/
+    '\u2124',	/*2124; 007A; Additional folding*/
+    '\u2126',	/*2126; 03C9; Case map*/
+    '\u2128',	/*2128; 007A; Additional folding*/
+    '\u212A',	/*212A; 006B; Case map*/
+    '\u212B',	/*212B; 00E5; Case map*/
+    '\u212C',	/*212C; 0062; Additional folding*/
+    '\u212D',	/*212D; 0063; Additional folding*/
+    '\u2130',	/*2130; 0065; Additional folding*/
+    '\u2131',	/*2131; 0066; Additional folding*/
+    '\u2133',	/*2133; 006D; Additional folding*/
+    '\u213E',	/*213E; 03B3; Additional folding*/
+    '\u213F',	/*213F; 03C0; Additional folding*/
+    '\u2145',	/*2145; 0064; Additional folding*/
+    '\u2160',	/*2160; 2170; Case map*/
+    '\u2161',	/*2161; 2171; Case map*/
+    '\u2162',	/*2162; 2172; Case map*/
+    '\u2163',	/*2163; 2173; Case map*/
+    '\u2164',	/*2164; 2174; Case map*/
+    '\u2165',	/*2165; 2175; Case map*/
+    '\u2166',	/*2166; 2176; Case map*/
+    '\u2167',	/*2167; 2177; Case map*/
+    '\u2168',	/*2168; 2178; Case map*/
+    '\u2169',	/*2169; 2179; Case map*/
+    '\u216A',	/*216A; 217A; Case map*/
+    '\u216B',	/*216B; 217B; Case map*/
+    '\u216C',	/*216C; 217C; Case map*/
+    '\u216D',	/*216D; 217D; Case map*/
+    '\u216E',	/*216E; 217E; Case map*/
+    '\u216F',	/*216F; 217F; Case map*/
+    '\u24B6',	/*24B6; 24D0; Case map*/
+    '\u24B7',	/*24B7; 24D1; Case map*/
+    '\u24B8',	/*24B8; 24D2; Case map*/
+    '\u24B9',	/*24B9; 24D3; Case map*/
+    '\u24BA',	/*24BA; 24D4; Case map*/
+    '\u24BB',	/*24BB; 24D5; Case map*/
+    '\u24BC',	/*24BC; 24D6; Case map*/
+    '\u24BD',	/*24BD; 24D7; Case map*/
+    '\u24BE',	/*24BE; 24D8; Case map*/
+    '\u24BF',	/*24BF; 24D9; Case map*/
+    '\u24C0',	/*24C0; 24DA; Case map*/
+    '\u24C1',	/*24C1; 24DB; Case map*/
+    '\u24C2',	/*24C2; 24DC; Case map*/
+    '\u24C3',	/*24C3; 24DD; Case map*/
+    '\u24C4',	/*24C4; 24DE; Case map*/
+    '\u24C5',	/*24C5; 24DF; Case map*/
+    '\u24C6',	/*24C6; 24E0; Case map*/
+    '\u24C7',	/*24C7; 24E1; Case map*/
+    '\u24C8',	/*24C8; 24E2; Case map*/
+    '\u24C9',	/*24C9; 24E3; Case map*/
+    '\u24CA',	/*24CA; 24E4; Case map*/
+    '\u24CB',	/*24CB; 24E5; Case map*/
+    '\u24CC',	/*24CC; 24E6; Case map*/
+    '\u24CD',	/*24CD; 24E7; Case map*/
+    '\u24CE',	/*24CE; 24E8; Case map*/
+    '\u24CF',	/*24CF; 24E9; Case map*/
+    '\u3371',	/*3371; 0068 0070 0061; Additional folding*/
+    '\u3373',	/*3373; 0061 0075; Additional folding*/
+    '\u3375',	/*3375; 006F 0076; Additional folding*/
+    '\u3380',	/*3380; 0070 0061; Additional folding*/
+    '\u3381',	/*3381; 006E 0061; Additional folding*/
+    '\u3382',	/*3382; 03BC 0061; Additional folding*/
+    '\u3383',	/*3383; 006D 0061; Additional folding*/
+    '\u3384',	/*3384; 006B 0061; Additional folding*/
+    '\u3385',	/*3385; 006B 0062; Additional folding*/
+    '\u3386',	/*3386; 006D 0062; Additional folding*/
+    '\u3387',	/*3387; 0067 0062; Additional folding*/
+    '\u338A',	/*338A; 0070 0066; Additional folding*/
+    '\u338B',	/*338B; 006E 0066; Additional folding*/
+    '\u338C',	/*338C; 03BC 0066; Additional folding*/
+    '\u3390',	/*3390; 0068 007A; Additional folding*/
+    '\u3391',	/*3391; 006B 0068 007A; Additional folding*/
+    '\u3392',	/*3392; 006D 0068 007A; Additional folding*/
+    '\u3393',	/*3393; 0067 0068 007A; Additional folding*/
+    '\u3394',	/*3394; 0074 0068 007A; Additional folding*/
+    '\u33A9',	/*33A9; 0070 0061; Additional folding*/
+    '\u33AA',	/*33AA; 006B 0070 0061; Additional folding*/
+    '\u33AB',	/*33AB; 006D 0070 0061; Additional folding*/
+    '\u33AC',	/*33AC; 0067 0070 0061; Additional folding*/
+    '\u33B4',	/*33B4; 0070 0076; Additional folding*/
+    '\u33B5',	/*33B5; 006E 0076; Additional folding*/
+    '\u33B6',	/*33B6; 03BC 0076; Additional folding*/
+    '\u33B7',	/*33B7; 006D 0076; Additional folding*/
+    '\u33B8',	/*33B8; 006B 0076; Additional folding*/
+    '\u33B9',	/*33B9; 006D 0076; Additional folding*/
+    '\u33BA',	/*33BA; 0070 0077; Additional folding*/
+    '\u33BB',	/*33BB; 006E 0077; Additional folding*/
+    '\u33BC',	/*33BC; 03BC 0077; Additional folding*/
+    '\u33BD',	/*33BD; 006D 0077; Additional folding*/
+    '\u33BE',	/*33BE; 006B 0077; Additional folding*/
+    '\u33BF',	/*33BF; 006D 0077; Additional folding*/
+    '\u33C0',	/*33C0; 006B 03C9; Additional folding*/
+    '\u33C1',	/*33C1; 006D 03C9; Additional folding*/
+    '\u33C3',	/*33C3; 0062 0071; Additional folding*/
+    '\u33C6',	/*33C6; 0063 2215 006B 0067; Additional folding*/
+    '\u33C7',	/*33C7; 0063 006F 002E; Additional folding*/
+    '\u33C8',	/*33C8; 0064 0062; Additional folding*/
+    '\u33C9',	/*33C9; 0067 0079; Additional folding*/
+    '\u33CB',	/*33CB; 0068 0070; Additional folding*/
+    '\u33CD',	/*33CD; 006B 006B; Additional folding*/
+    '\u33CE',	/*33CE; 006B 006D; Additional folding*/
+    '\u33D7',	/*33D7; 0070 0068; Additional folding*/
+    '\u33D9',	/*33D9; 0070 0070 006D; Additional folding*/
+    '\u33DA',	/*33DA; 0070 0072; Additional folding*/
+    '\u33DC',	/*33DC; 0073 0076; Additional folding*/
+    '\u33DD',	/*33DD; 0077 0062; Additional folding*/
+    '\uFB00',	/*FB00; 0066 0066; Case map*/
+    '\uFB01',	/*FB01; 0066 0069; Case map*/
+    '\uFB02',	/*FB02; 0066 006C; Case map*/
+    '\uFB03',	/*FB03; 0066 0066 0069; Case map*/
+    '\uFB04',	/*FB04; 0066 0066 006C; Case map*/
+    '\uFB05',	/*FB05; 0073 0074; Case map*/
+    '\uFB06',	/*FB06; 0073 0074; Case map*/
+    '\uFB13',	/*FB13; 0574 0576; Case map*/
+    '\uFB14',	/*FB14; 0574 0565; Case map*/
+    '\uFB15',	/*FB15; 0574 056B; Case map*/
+    '\uFB16',	/*FB16; 057E 0576; Case map*/
+    '\uFB17',	/*FB17; 0574 056D; Case map*/
+    '\uFF21',	/*FF21; FF41; Case map*/
+    '\uFF22',	/*FF22; FF42; Case map*/
+    '\uFF23',	/*FF23; FF43; Case map*/
+    '\uFF24',	/*FF24; FF44; Case map*/
+    '\uFF25',	/*FF25; FF45; Case map*/
+    '\uFF26',	/*FF26; FF46; Case map*/
+    '\uFF27',	/*FF27; FF47; Case map*/
+    '\uFF28',	/*FF28; FF48; Case map*/
+    '\uFF29',	/*FF29; FF49; Case map*/
+    '\uFF2A',	/*FF2A; FF4A; Case map*/
+    '\uFF2B',	/*FF2B; FF4B; Case map*/
+    '\uFF2C',	/*FF2C; FF4C; Case map*/
+    '\uFF2D',	/*FF2D; FF4D; Case map*/
+    '\uFF2E',	/*FF2E; FF4E; Case map*/
+    '\uFF2F',	/*FF2F; FF4F; Case map*/
+    '\uFF30',	/*FF30; FF50; Case map*/
+    '\uFF31',	/*FF31; FF51; Case map*/
+    '\uFF32',	/*FF32; FF52; Case map*/
+    '\uFF33',	/*FF33; FF53; Case map*/
+    '\uFF34',	/*FF34; FF54; Case map*/
+    '\uFF35',	/*FF35; FF55; Case map*/
+    '\uFF36',	/*FF36; FF56; Case map*/
+    '\uFF37',	/*FF37; FF57; Case map*/
+    '\uFF38',	/*FF38; FF58; Case map*/
+    '\uFF39',	/*FF39; FF59; Case map*/
+    '\uFF3A',	/*FF3A; FF5A; Case map*/
+  };
+
+        public static string[] B2replace = new string[] {
+    "\u0061",	/*0041; 0061; Case map*/
+    "\u0062",	/*0042; 0062; Case map*/
+    "\u0063",	/*0043; 0063; Case map*/
+    "\u0064",	/*0044; 0064; Case map*/
+    "\u0065",	/*0045; 0065; Case map*/
+    "\u0066",	/*0046; 0066; Case map*/
+    "\u0067",	/*0047; 0067; Case map*/
+    "\u0068",	/*0048; 0068; Case map*/
+    "\u0069",	/*0049; 0069; Case map*/
+    "\u006A",	/*004A; 006A; Case map*/
+    "\u006B",	/*004B; 006B; Case map*/
+    "\u006C",	/*004C; 006C; Case map*/
+    "\u006D",	/*004D; 006D; Case map*/
+    "\u006E",	/*004E; 006E; Case map*/
+    "\u006F",	/*004F; 006F; Case map*/
+    "\u0070",	/*0050; 0070; Case map*/
+    "\u0071",	/*0051; 0071; Case map*/
+    "\u0072",	/*0052; 0072; Case map*/
+    "\u0073",	/*0053; 0073; Case map*/
+    "\u0074",	/*0054; 0074; Case map*/
+    "\u0075",	/*0055; 0075; Case map*/
+    "\u0076",	/*0056; 0076; Case map*/
+    "\u0077",	/*0057; 0077; Case map*/
+    "\u0078",	/*0058; 0078; Case map*/
+    "\u0079",	/*0059; 0079; Case map*/
+    "\u007A",	/*005A; 007A; Case map*/
+    "\u03BC",	/*00B5; 03BC; Case map*/
+    "\u00E0",	/*00C0; 00E0; Case map*/
+    "\u00E1",	/*00C1; 00E1; Case map*/
+    "\u00E2",	/*00C2; 00E2; Case map*/
+    "\u00E3",	/*00C3; 00E3; Case map*/
+    "\u00E4",	/*00C4; 00E4; Case map*/
+    "\u00E5",	/*00C5; 00E5; Case map*/
+    "\u00E6",	/*00C6; 00E6; Case map*/
+    "\u00E7",	/*00C7; 00E7; Case map*/
+    "\u00E8",	/*00C8; 00E8; Case map*/
+    "\u00E9",	/*00C9; 00E9; Case map*/
+    "\u00EA",	/*00CA; 00EA; Case map*/
+    "\u00EB",	/*00CB; 00EB; Case map*/
+    "\u00EC",	/*00CC; 00EC; Case map*/
+    "\u00ED",	/*00CD; 00ED; Case map*/
+    "\u00EE",	/*00CE; 00EE; Case map*/
+    "\u00EF",	/*00CF; 00EF; Case map*/
+    "\u00F0",	/*00D0; 00F0; Case map*/
+    "\u00F1",	/*00D1; 00F1; Case map*/
+    "\u00F2",	/*00D2; 00F2; Case map*/
+    "\u00F3",	/*00D3; 00F3; Case map*/
+    "\u00F4",	/*00D4; 00F4; Case map*/
+    "\u00F5",	/*00D5; 00F5; Case map*/
+    "\u00F6",	/*00D6; 00F6; Case map*/
+    "\u00F8",	/*00D8; 00F8; Case map*/
+    "\u00F9",	/*00D9; 00F9; Case map*/
+    "\u00FA",	/*00DA; 00FA; Case map*/
+    "\u00FB",	/*00DB; 00FB; Case map*/
+    "\u00FC",	/*00DC; 00FC; Case map*/
+    "\u00FD",	/*00DD; 00FD; Case map*/
+    "\u00FE",	/*00DE; 00FE; Case map*/
+    "\u0073\u0073",	/*00DF; 0073 0073; Case map*/
+    "\u0101",	/*0100; 0101; Case map*/
+    "\u0103",	/*0102; 0103; Case map*/
+    "\u0105",	/*0104; 0105; Case map*/
+    "\u0107",	/*0106; 0107; Case map*/
+    "\u0109",	/*0108; 0109; Case map*/
+    "\u010B",	/*010A; 010B; Case map*/
+    "\u010D",	/*010C; 010D; Case map*/
+    "\u010F",	/*010E; 010F; Case map*/
+    "\u0111",	/*0110; 0111; Case map*/
+    "\u0113",	/*0112; 0113; Case map*/
+    "\u0115",	/*0114; 0115; Case map*/
+    "\u0117",	/*0116; 0117; Case map*/
+    "\u0119",	/*0118; 0119; Case map*/
+    "\u011B",	/*011A; 011B; Case map*/
+    "\u011D",	/*011C; 011D; Case map*/
+    "\u011F",	/*011E; 011F; Case map*/
+    "\u0121",	/*0120; 0121; Case map*/
+    "\u0123",	/*0122; 0123; Case map*/
+    "\u0125",	/*0124; 0125; Case map*/
+    "\u0127",	/*0126; 0127; Case map*/
+    "\u0129",	/*0128; 0129; Case map*/
+    "\u012B",	/*012A; 012B; Case map*/
+    "\u012D",	/*012C; 012D; Case map*/
+    "\u012F",	/*012E; 012F; Case map*/
+    "\u0069\u0307",	/*0130; 0069 0307; Case map*/
+    "\u0133",	/*0132; 0133; Case map*/
+    "\u0135",	/*0134; 0135; Case map*/
+    "\u0137",	/*0136; 0137; Case map*/
+    "\u013A",	/*0139; 013A; Case map*/
+    "\u013C",	/*013B; 013C; Case map*/
+    "\u013E",	/*013D; 013E; Case map*/
+    "\u0140",	/*013F; 0140; Case map*/
+    "\u0142",	/*0141; 0142; Case map*/
+    "\u0144",	/*0143; 0144; Case map*/
+    "\u0146",	/*0145; 0146; Case map*/
+    "\u0148",	/*0147; 0148; Case map*/
+    "\u02BC\u006E",	/*0149; 02BC 006E; Case map*/
+    "\u014B",	/*014A; 014B; Case map*/
+    "\u014D",	/*014C; 014D; Case map*/
+    "\u014F",	/*014E; 014F; Case map*/
+    "\u0151",	/*0150; 0151; Case map*/
+    "\u0153",	/*0152; 0153; Case map*/
+    "\u0155",	/*0154; 0155; Case map*/
+    "\u0157",	/*0156; 0157; Case map*/
+    "\u0159",	/*0158; 0159; Case map*/
+    "\u015B",	/*015A; 015B; Case map*/
+    "\u015D",	/*015C; 015D; Case map*/
+    "\u015F",	/*015E; 015F; Case map*/
+    "\u0161",	/*0160; 0161; Case map*/
+    "\u0163",	/*0162; 0163; Case map*/
+    "\u0165",	/*0164; 0165; Case map*/
+    "\u0167",	/*0166; 0167; Case map*/
+    "\u0169",	/*0168; 0169; Case map*/
+    "\u016B",	/*016A; 016B; Case map*/
+    "\u016D",	/*016C; 016D; Case map*/
+    "\u016F",	/*016E; 016F; Case map*/
+    "\u0171",	/*0170; 0171; Case map*/
+    "\u0173",	/*0172; 0173; Case map*/
+    "\u0175",	/*0174; 0175; Case map*/
+    "\u0177",	/*0176; 0177; Case map*/
+    "\u00FF",	/*0178; 00FF; Case map*/
+    "\u017A",	/*0179; 017A; Case map*/
+    "\u017C",	/*017B; 017C; Case map*/
+    "\u017E",	/*017D; 017E; Case map*/
+    "\u0073",	/*017F; 0073; Case map*/
+    "\u0253",	/*0181; 0253; Case map*/
+    "\u0183",	/*0182; 0183; Case map*/
+    "\u0185",	/*0184; 0185; Case map*/
+    "\u0254",	/*0186; 0254; Case map*/
+    "\u0188",	/*0187; 0188; Case map*/
+    "\u0256",	/*0189; 0256; Case map*/
+    "\u0257",	/*018A; 0257; Case map*/
+    "\u018C",	/*018B; 018C; Case map*/
+    "\u01DD",	/*018E; 01DD; Case map*/
+    "\u0259",	/*018F; 0259; Case map*/
+    "\u025B",	/*0190; 025B; Case map*/
+    "\u0192",	/*0191; 0192; Case map*/
+    "\u0260",	/*0193; 0260; Case map*/
+    "\u0263",	/*0194; 0263; Case map*/
+    "\u0269",	/*0196; 0269; Case map*/
+    "\u0268",	/*0197; 0268; Case map*/
+    "\u0199",	/*0198; 0199; Case map*/
+    "\u026F",	/*019C; 026F; Case map*/
+    "\u0272",	/*019D; 0272; Case map*/
+    "\u0275",	/*019F; 0275; Case map*/
+    "\u01A1",	/*01A0; 01A1; Case map*/
+    "\u01A3",	/*01A2; 01A3; Case map*/
+    "\u01A5",	/*01A4; 01A5; Case map*/
+    "\u0280",	/*01A6; 0280; Case map*/
+    "\u01A8",	/*01A7; 01A8; Case map*/
+    "\u0283",	/*01A9; 0283; Case map*/
+    "\u01AD",	/*01AC; 01AD; Case map*/
+    "\u0288",	/*01AE; 0288; Case map*/
+    "\u01B0",	/*01AF; 01B0; Case map*/
+    "\u028A",	/*01B1; 028A; Case map*/
+    "\u028B",	/*01B2; 028B; Case map*/
+    "\u01B4",	/*01B3; 01B4; Case map*/
+    "\u01B6",	/*01B5; 01B6; Case map*/
+    "\u0292",	/*01B7; 0292; Case map*/
+    "\u01B9",	/*01B8; 01B9; Case map*/
+    "\u01BD",	/*01BC; 01BD; Case map*/
+    "\u01C6",	/*01C4; 01C6; Case map*/
+    "\u01C6",	/*01C5; 01C6; Case map*/
+    "\u01C9",	/*01C7; 01C9; Case map*/
+    "\u01C9",	/*01C8; 01C9; Case map*/
+    "\u01CC",	/*01CA; 01CC; Case map*/
+    "\u01CC",	/*01CB; 01CC; Case map*/
+    "\u01CE",	/*01CD; 01CE; Case map*/
+    "\u01D0",	/*01CF; 01D0; Case map*/
+    "\u01D2",	/*01D1; 01D2; Case map*/
+    "\u01D4",	/*01D3; 01D4; Case map*/
+    "\u01D6",	/*01D5; 01D6; Case map*/
+    "\u01D8",	/*01D7; 01D8; Case map*/
+    "\u01DA",	/*01D9; 01DA; Case map*/
+    "\u01DC",	/*01DB; 01DC; Case map*/
+    "\u01DF",	/*01DE; 01DF; Case map*/
+    "\u01E1",	/*01E0; 01E1; Case map*/
+    "\u01E3",	/*01E2; 01E3; Case map*/
+    "\u01E5",	/*01E4; 01E5; Case map*/
+    "\u01E7",	/*01E6; 01E7; Case map*/
+    "\u01E9",	/*01E8; 01E9; Case map*/
+    "\u01EB",	/*01EA; 01EB; Case map*/
+    "\u01ED",	/*01EC; 01ED; Case map*/
+    "\u01EF",	/*01EE; 01EF; Case map*/
+    "\u006A\u030C",	/*01F0; 006A 030C; Case map*/
+    "\u01F3",	/*01F1; 01F3; Case map*/
+    "\u01F3",	/*01F2; 01F3; Case map*/
+    "\u01F5",	/*01F4; 01F5; Case map*/
+    "\u0195",	/*01F6; 0195; Case map*/
+    "\u01BF",	/*01F7; 01BF; Case map*/
+    "\u01F9",	/*01F8; 01F9; Case map*/
+    "\u01FB",	/*01FA; 01FB; Case map*/
+    "\u01FD",	/*01FC; 01FD; Case map*/
+    "\u01FF",	/*01FE; 01FF; Case map*/
+    "\u0201",	/*0200; 0201; Case map*/
+    "\u0203",	/*0202; 0203; Case map*/
+    "\u0205",	/*0204; 0205; Case map*/
+    "\u0207",	/*0206; 0207; Case map*/
+    "\u0209",	/*0208; 0209; Case map*/
+    "\u020B",	/*020A; 020B; Case map*/
+    "\u020D",	/*020C; 020D; Case map*/
+    "\u020F",	/*020E; 020F; Case map*/
+    "\u0211",	/*0210; 0211; Case map*/
+    "\u0213",	/*0212; 0213; Case map*/
+    "\u0215",	/*0214; 0215; Case map*/
+    "\u0217",	/*0216; 0217; Case map*/
+    "\u0219",	/*0218; 0219; Case map*/
+    "\u021B",	/*021A; 021B; Case map*/
+    "\u021D",	/*021C; 021D; Case map*/
+    "\u021F",	/*021E; 021F; Case map*/
+    "\u019E",	/*0220; 019E; Case map*/
+    "\u0223",	/*0222; 0223; Case map*/
+    "\u0225",	/*0224; 0225; Case map*/
+    "\u0227",	/*0226; 0227; Case map*/
+    "\u0229",	/*0228; 0229; Case map*/
+    "\u022B",	/*022A; 022B; Case map*/
+    "\u022D",	/*022C; 022D; Case map*/
+    "\u022F",	/*022E; 022F; Case map*/
+    "\u0231",	/*0230; 0231; Case map*/
+    "\u0233",	/*0232; 0233; Case map*/
+    "\u03B9",	/*0345; 03B9; Case map*/
+    "\u0020\u03B9",	/*037A; 0020 03B9; Additional folding*/
+    "\u03AC",	/*0386; 03AC; Case map*/
+    "\u03AD",	/*0388; 03AD; Case map*/
+    "\u03AE",	/*0389; 03AE; Case map*/
+    "\u03AF",	/*038A; 03AF; Case map*/
+    "\u03CC",	/*038C; 03CC; Case map*/
+    "\u03CD",	/*038E; 03CD; Case map*/
+    "\u03CE",	/*038F; 03CE; Case map*/
+    "\u03B9\u0308\u0301",	/*0390; 03B9 0308 0301; Case map*/
+    "\u03B1",	/*0391; 03B1; Case map*/
+    "\u03B2",	/*0392; 03B2; Case map*/
+    "\u03B3",	/*0393; 03B3; Case map*/
+    "\u03B4",	/*0394; 03B4; Case map*/
+    "\u03B5",	/*0395; 03B5; Case map*/
+    "\u03B6",	/*0396; 03B6; Case map*/
+    "\u03B7",	/*0397; 03B7; Case map*/
+    "\u03B8",	/*0398; 03B8; Case map*/
+    "\u03B9",	/*0399; 03B9; Case map*/
+    "\u03BA",	/*039A; 03BA; Case map*/
+    "\u03BB",	/*039B; 03BB; Case map*/
+    "\u03BC",	/*039C; 03BC; Case map*/
+    "\u03BD",	/*039D; 03BD; Case map*/
+    "\u03BE",	/*039E; 03BE; Case map*/
+    "\u03BF",	/*039F; 03BF; Case map*/
+    "\u03C0",	/*03A0; 03C0; Case map*/
+    "\u03C1",	/*03A1; 03C1; Case map*/
+    "\u03C3",	/*03A3; 03C3; Case map*/
+    "\u03C4",	/*03A4; 03C4; Case map*/
+    "\u03C5",	/*03A5; 03C5; Case map*/
+    "\u03C6",	/*03A6; 03C6; Case map*/
+    "\u03C7",	/*03A7; 03C7; Case map*/
+    "\u03C8",	/*03A8; 03C8; Case map*/
+    "\u03C9",	/*03A9; 03C9; Case map*/
+    "\u03CA",	/*03AA; 03CA; Case map*/
+    "\u03CB",	/*03AB; 03CB; Case map*/
+    "\u03C5\u0308\u0301",	/*03B0; 03C5 0308 0301; Case map*/
+    "\u03C3",	/*03C2; 03C3; Case map*/
+    "\u03B2",	/*03D0; 03B2; Case map*/
+    "\u03B8",	/*03D1; 03B8; Case map*/
+    "\u03C5",	/*03D2; 03C5; Additional folding*/
+    "\u03CD",	/*03D3; 03CD; Additional folding*/
+    "\u03CB",	/*03D4; 03CB; Additional folding*/
+    "\u03C6",	/*03D5; 03C6; Case map*/
+    "\u03C0",	/*03D6; 03C0; Case map*/
+    "\u03D9",	/*03D8; 03D9; Case map*/
+    "\u03DB",	/*03DA; 03DB; Case map*/
+    "\u03DD",	/*03DC; 03DD; Case map*/
+    "\u03DF",	/*03DE; 03DF; Case map*/
+    "\u03E1",	/*03E0; 03E1; Case map*/
+    "\u03E3",	/*03E2; 03E3; Case map*/
+    "\u03E5",	/*03E4; 03E5; Case map*/
+    "\u03E7",	/*03E6; 03E7; Case map*/
+    "\u03E9",	/*03E8; 03E9; Case map*/
+    "\u03EB",	/*03EA; 03EB; Case map*/
+    "\u03ED",	/*03EC; 03ED; Case map*/
+    "\u03EF",	/*03EE; 03EF; Case map*/
+    "\u03BA",	/*03F0; 03BA; Case map*/
+    "\u03C1",	/*03F1; 03C1; Case map*/
+    "\u03C3",	/*03F2; 03C3; Case map*/
+    "\u03B8",	/*03F4; 03B8; Case map*/
+    "\u03B5",	/*03F5; 03B5; Case map*/
+    "\u0450",	/*0400; 0450; Case map*/
+    "\u0451",	/*0401; 0451; Case map*/
+    "\u0452",	/*0402; 0452; Case map*/
+    "\u0453",	/*0403; 0453; Case map*/
+    "\u0454",	/*0404; 0454; Case map*/
+    "\u0455",	/*0405; 0455; Case map*/
+    "\u0456",	/*0406; 0456; Case map*/
+    "\u0457",	/*0407; 0457; Case map*/
+    "\u0458",	/*0408; 0458; Case map*/
+    "\u0459",	/*0409; 0459; Case map*/
+    "\u045A",	/*040A; 045A; Case map*/
+    "\u045B",	/*040B; 045B; Case map*/
+    "\u045C",	/*040C; 045C; Case map*/
+    "\u045D",	/*040D; 045D; Case map*/
+    "\u045E",	/*040E; 045E; Case map*/
+    "\u045F",	/*040F; 045F; Case map*/
+    "\u0430",	/*0410; 0430; Case map*/
+    "\u0431",	/*0411; 0431; Case map*/
+    "\u0432",	/*0412; 0432; Case map*/
+    "\u0433",	/*0413; 0433; Case map*/
+    "\u0434",	/*0414; 0434; Case map*/
+    "\u0435",	/*0415; 0435; Case map*/
+    "\u0436",	/*0416; 0436; Case map*/
+    "\u0437",	/*0417; 0437; Case map*/
+    "\u0438",	/*0418; 0438; Case map*/
+    "\u0439",	/*0419; 0439; Case map*/
+    "\u043A",	/*041A; 043A; Case map*/
+    "\u043B",	/*041B; 043B; Case map*/
+    "\u043C",	/*041C; 043C; Case map*/
+    "\u043D",	/*041D; 043D; Case map*/
+    "\u043E",	/*041E; 043E; Case map*/
+    "\u043F",	/*041F; 043F; Case map*/
+    "\u0440",	/*0420; 0440; Case map*/
+    "\u0441",	/*0421; 0441; Case map*/
+    "\u0442",	/*0422; 0442; Case map*/
+    "\u0443",	/*0423; 0443; Case map*/
+    "\u0444",	/*0424; 0444; Case map*/
+    "\u0445",	/*0425; 0445; Case map*/
+    "\u0446",	/*0426; 0446; Case map*/
+    "\u0447",	/*0427; 0447; Case map*/
+    "\u0448",	/*0428; 0448; Case map*/
+    "\u0449",	/*0429; 0449; Case map*/
+    "\u044A",	/*042A; 044A; Case map*/
+    "\u044B",	/*042B; 044B; Case map*/
+    "\u044C",	/*042C; 044C; Case map*/
+    "\u044D",	/*042D; 044D; Case map*/
+    "\u044E",	/*042E; 044E; Case map*/
+    "\u044F",	/*042F; 044F; Case map*/
+    "\u0461",	/*0460; 0461; Case map*/
+    "\u0463",	/*0462; 0463; Case map*/
+    "\u0465",	/*0464; 0465; Case map*/
+    "\u0467",	/*0466; 0467; Case map*/
+    "\u0469",	/*0468; 0469; Case map*/
+    "\u046B",	/*046A; 046B; Case map*/
+    "\u046D",	/*046C; 046D; Case map*/
+    "\u046F",	/*046E; 046F; Case map*/
+    "\u0471",	/*0470; 0471; Case map*/
+    "\u0473",	/*0472; 0473; Case map*/
+    "\u0475",	/*0474; 0475; Case map*/
+    "\u0477",	/*0476; 0477; Case map*/
+    "\u0479",	/*0478; 0479; Case map*/
+    "\u047B",	/*047A; 047B; Case map*/
+    "\u047D",	/*047C; 047D; Case map*/
+    "\u047F",	/*047E; 047F; Case map*/
+    "\u0481",	/*0480; 0481; Case map*/
+    "\u048B",	/*048A; 048B; Case map*/
+    "\u048D",	/*048C; 048D; Case map*/
+    "\u048F",	/*048E; 048F; Case map*/
+    "\u0491",	/*0490; 0491; Case map*/
+    "\u0493",	/*0492; 0493; Case map*/
+    "\u0495",	/*0494; 0495; Case map*/
+    "\u0497",	/*0496; 0497; Case map*/
+    "\u0499",	/*0498; 0499; Case map*/
+    "\u049B",	/*049A; 049B; Case map*/
+    "\u049D",	/*049C; 049D; Case map*/
+    "\u049F",	/*049E; 049F; Case map*/
+    "\u04A1",	/*04A0; 04A1; Case map*/
+    "\u04A3",	/*04A2; 04A3; Case map*/
+    "\u04A5",	/*04A4; 04A5; Case map*/
+    "\u04A7",	/*04A6; 04A7; Case map*/
+    "\u04A9",	/*04A8; 04A9; Case map*/
+    "\u04AB",	/*04AA; 04AB; Case map*/
+    "\u04AD",	/*04AC; 04AD; Case map*/
+    "\u04AF",	/*04AE; 04AF; Case map*/
+    "\u04B1",	/*04B0; 04B1; Case map*/
+    "\u04B3",	/*04B2; 04B3; Case map*/
+    "\u04B5",	/*04B4; 04B5; Case map*/
+    "\u04B7",	/*04B6; 04B7; Case map*/
+    "\u04B9",	/*04B8; 04B9; Case map*/
+    "\u04BB",	/*04BA; 04BB; Case map*/
+    "\u04BD",	/*04BC; 04BD; Case map*/
+    "\u04BF",	/*04BE; 04BF; Case map*/
+    "\u04C2",	/*04C1; 04C2; Case map*/
+    "\u04C4",	/*04C3; 04C4; Case map*/
+    "\u04C6",	/*04C5; 04C6; Case map*/
+    "\u04C8",	/*04C7; 04C8; Case map*/
+    "\u04CA",	/*04C9; 04CA; Case map*/
+    "\u04CC",	/*04CB; 04CC; Case map*/
+    "\u04CE",	/*04CD; 04CE; Case map*/
+    "\u04D1",	/*04D0; 04D1; Case map*/
+    "\u04D3",	/*04D2; 04D3; Case map*/
+    "\u04D5",	/*04D4; 04D5; Case map*/
+    "\u04D7",	/*04D6; 04D7; Case map*/
+    "\u04D9",	/*04D8; 04D9; Case map*/
+    "\u04DB",	/*04DA; 04DB; Case map*/
+    "\u04DD",	/*04DC; 04DD; Case map*/
+    "\u04DF",	/*04DE; 04DF; Case map*/
+    "\u04E1",	/*04E0; 04E1; Case map*/
+    "\u04E3",	/*04E2; 04E3; Case map*/
+    "\u04E5",	/*04E4; 04E5; Case map*/
+    "\u04E7",	/*04E6; 04E7; Case map*/
+    "\u04E9",	/*04E8; 04E9; Case map*/
+    "\u04EB",	/*04EA; 04EB; Case map*/
+    "\u04ED",	/*04EC; 04ED; Case map*/
+    "\u04EF",	/*04EE; 04EF; Case map*/
+    "\u04F1",	/*04F0; 04F1; Case map*/
+    "\u04F3",	/*04F2; 04F3; Case map*/
+    "\u04F5",	/*04F4; 04F5; Case map*/
+    "\u04F9",	/*04F8; 04F9; Case map*/
+    "\u0501",	/*0500; 0501; Case map*/
+    "\u0503",	/*0502; 0503; Case map*/
+    "\u0505",	/*0504; 0505; Case map*/
+    "\u0507",	/*0506; 0507; Case map*/
+    "\u0509",	/*0508; 0509; Case map*/
+    "\u050B",	/*050A; 050B; Case map*/
+    "\u050D",	/*050C; 050D; Case map*/
+    "\u050F",	/*050E; 050F; Case map*/
+    "\u0561",	/*0531; 0561; Case map*/
+    "\u0562",	/*0532; 0562; Case map*/
+    "\u0563",	/*0533; 0563; Case map*/
+    "\u0564",	/*0534; 0564; Case map*/
+    "\u0565",	/*0535; 0565; Case map*/
+    "\u0566",	/*0536; 0566; Case map*/
+    "\u0567",	/*0537; 0567; Case map*/
+    "\u0568",	/*0538; 0568; Case map*/
+    "\u0569",	/*0539; 0569; Case map*/
+    "\u056A",	/*053A; 056A; Case map*/
+    "\u056B",	/*053B; 056B; Case map*/
+    "\u056C",	/*053C; 056C; Case map*/
+    "\u056D",	/*053D; 056D; Case map*/
+    "\u056E",	/*053E; 056E; Case map*/
+    "\u056F",	/*053F; 056F; Case map*/
+    "\u0570",	/*0540; 0570; Case map*/
+    "\u0571",	/*0541; 0571; Case map*/
+    "\u0572",	/*0542; 0572; Case map*/
+    "\u0573",	/*0543; 0573; Case map*/
+    "\u0574",	/*0544; 0574; Case map*/
+    "\u0575",	/*0545; 0575; Case map*/
+    "\u0576",	/*0546; 0576; Case map*/
+    "\u0577",	/*0547; 0577; Case map*/
+    "\u0578",	/*0548; 0578; Case map*/
+    "\u0579",	/*0549; 0579; Case map*/
+    "\u057A",	/*054A; 057A; Case map*/
+    "\u057B",	/*054B; 057B; Case map*/
+    "\u057C",	/*054C; 057C; Case map*/
+    "\u057D",	/*054D; 057D; Case map*/
+    "\u057E",	/*054E; 057E; Case map*/
+    "\u057F",	/*054F; 057F; Case map*/
+    "\u0580",	/*0550; 0580; Case map*/
+    "\u0581",	/*0551; 0581; Case map*/
+    "\u0582",	/*0552; 0582; Case map*/
+    "\u0583",	/*0553; 0583; Case map*/
+    "\u0584",	/*0554; 0584; Case map*/
+    "\u0585",	/*0555; 0585; Case map*/
+    "\u0586",	/*0556; 0586; Case map*/
+    "\u0565\u0582",	/*0587; 0565 0582; Case map*/
+    "\u1E01",	/*1E00; 1E01; Case map*/
+    "\u1E03",	/*1E02; 1E03; Case map*/
+    "\u1E05",	/*1E04; 1E05; Case map*/
+    "\u1E07",	/*1E06; 1E07; Case map*/
+    "\u1E09",	/*1E08; 1E09; Case map*/
+    "\u1E0B",	/*1E0A; 1E0B; Case map*/
+    "\u1E0D",	/*1E0C; 1E0D; Case map*/
+    "\u1E0F",	/*1E0E; 1E0F; Case map*/
+    "\u1E11",	/*1E10; 1E11; Case map*/
+    "\u1E13",	/*1E12; 1E13; Case map*/
+    "\u1E15",	/*1E14; 1E15; Case map*/
+    "\u1E17",	/*1E16; 1E17; Case map*/
+    "\u1E19",	/*1E18; 1E19; Case map*/
+    "\u1E1B",	/*1E1A; 1E1B; Case map*/
+    "\u1E1D",	/*1E1C; 1E1D; Case map*/
+    "\u1E1F",	/*1E1E; 1E1F; Case map*/
+    "\u1E21",	/*1E20; 1E21; Case map*/
+    "\u1E23",	/*1E22; 1E23; Case map*/
+    "\u1E25",	/*1E24; 1E25; Case map*/
+    "\u1E27",	/*1E26; 1E27; Case map*/
+    "\u1E29",	/*1E28; 1E29; Case map*/
+    "\u1E2B",	/*1E2A; 1E2B; Case map*/
+    "\u1E2D",	/*1E2C; 1E2D; Case map*/
+    "\u1E2F",	/*1E2E; 1E2F; Case map*/
+    "\u1E31",	/*1E30; 1E31; Case map*/
+    "\u1E33",	/*1E32; 1E33; Case map*/
+    "\u1E35",	/*1E34; 1E35; Case map*/
+    "\u1E37",	/*1E36; 1E37; Case map*/
+    "\u1E39",	/*1E38; 1E39; Case map*/
+    "\u1E3B",	/*1E3A; 1E3B; Case map*/
+    "\u1E3D",	/*1E3C; 1E3D; Case map*/
+    "\u1E3F",	/*1E3E; 1E3F; Case map*/
+    "\u1E41",	/*1E40; 1E41; Case map*/
+    "\u1E43",	/*1E42; 1E43; Case map*/
+    "\u1E45",	/*1E44; 1E45; Case map*/
+    "\u1E47",	/*1E46; 1E47; Case map*/
+    "\u1E49",	/*1E48; 1E49; Case map*/
+    "\u1E4B",	/*1E4A; 1E4B; Case map*/
+    "\u1E4D",	/*1E4C; 1E4D; Case map*/
+    "\u1E4F",	/*1E4E; 1E4F; Case map*/
+    "\u1E51",	/*1E50; 1E51; Case map*/
+    "\u1E53",	/*1E52; 1E53; Case map*/
+    "\u1E55",	/*1E54; 1E55; Case map*/
+    "\u1E57",	/*1E56; 1E57; Case map*/
+    "\u1E59",	/*1E58; 1E59; Case map*/
+    "\u1E5B",	/*1E5A; 1E5B; Case map*/
+    "\u1E5D",	/*1E5C; 1E5D; Case map*/
+    "\u1E5F",	/*1E5E; 1E5F; Case map*/
+    "\u1E61",	/*1E60; 1E61; Case map*/
+    "\u1E63",	/*1E62; 1E63; Case map*/
+    "\u1E65",	/*1E64; 1E65; Case map*/
+    "\u1E67",	/*1E66; 1E67; Case map*/
+    "\u1E69",	/*1E68; 1E69; Case map*/
+    "\u1E6B",	/*1E6A; 1E6B; Case map*/
+    "\u1E6D",	/*1E6C; 1E6D; Case map*/
+    "\u1E6F",	/*1E6E; 1E6F; Case map*/
+    "\u1E71",	/*1E70; 1E71; Case map*/
+    "\u1E73",	/*1E72; 1E73; Case map*/
+    "\u1E75",	/*1E74; 1E75; Case map*/
+    "\u1E77",	/*1E76; 1E77; Case map*/
+    "\u1E79",	/*1E78; 1E79; Case map*/
+    "\u1E7B",	/*1E7A; 1E7B; Case map*/
+    "\u1E7D",	/*1E7C; 1E7D; Case map*/
+    "\u1E7F",	/*1E7E; 1E7F; Case map*/
+    "\u1E81",	/*1E80; 1E81; Case map*/
+    "\u1E83",	/*1E82; 1E83; Case map*/
+    "\u1E85",	/*1E84; 1E85; Case map*/
+    "\u1E87",	/*1E86; 1E87; Case map*/
+    "\u1E89",	/*1E88; 1E89; Case map*/
+    "\u1E8B",	/*1E8A; 1E8B; Case map*/
+    "\u1E8D",	/*1E8C; 1E8D; Case map*/
+    "\u1E8F",	/*1E8E; 1E8F; Case map*/
+    "\u1E91",	/*1E90; 1E91; Case map*/
+    "\u1E93",	/*1E92; 1E93; Case map*/
+    "\u1E95",	/*1E94; 1E95; Case map*/
+    "\u0068\u0331",	/*1E96; 0068 0331; Case map*/
+    "\u0074\u0308",	/*1E97; 0074 0308; Case map*/
+    "\u0077\u030A",	/*1E98; 0077 030A; Case map*/
+    "\u0079\u030A",	/*1E99; 0079 030A; Case map*/
+    "\u0061\u02BE",	/*1E9A; 0061 02BE; Case map*/
+    "\u1E61",	/*1E9B; 1E61; Case map*/
+    "\u1EA1",	/*1EA0; 1EA1; Case map*/
+    "\u1EA3",	/*1EA2; 1EA3; Case map*/
+    "\u1EA5",	/*1EA4; 1EA5; Case map*/
+    "\u1EA7",	/*1EA6; 1EA7; Case map*/
+    "\u1EA9",	/*1EA8; 1EA9; Case map*/
+    "\u1EAB",	/*1EAA; 1EAB; Case map*/
+    "\u1EAD",	/*1EAC; 1EAD; Case map*/
+    "\u1EAF",	/*1EAE; 1EAF; Case map*/
+    "\u1EB1",	/*1EB0; 1EB1; Case map*/
+    "\u1EB3",	/*1EB2; 1EB3; Case map*/
+    "\u1EB5",	/*1EB4; 1EB5; Case map*/
+    "\u1EB7",	/*1EB6; 1EB7; Case map*/
+    "\u1EB9",	/*1EB8; 1EB9; Case map*/
+    "\u1EBB",	/*1EBA; 1EBB; Case map*/
+    "\u1EBD",	/*1EBC; 1EBD; Case map*/
+    "\u1EBF",	/*1EBE; 1EBF; Case map*/
+    "\u1EC1",	/*1EC0; 1EC1; Case map*/
+    "\u1EC3",	/*1EC2; 1EC3; Case map*/
+    "\u1EC5",	/*1EC4; 1EC5; Case map*/
+    "\u1EC7",	/*1EC6; 1EC7; Case map*/
+    "\u1EC9",	/*1EC8; 1EC9; Case map*/
+    "\u1ECB",	/*1ECA; 1ECB; Case map*/
+    "\u1ECD",	/*1ECC; 1ECD; Case map*/
+    "\u1ECF",	/*1ECE; 1ECF; Case map*/
+    "\u1ED1",	/*1ED0; 1ED1; Case map*/
+    "\u1ED3",	/*1ED2; 1ED3; Case map*/
+    "\u1ED5",	/*1ED4; 1ED5; Case map*/
+    "\u1ED7",	/*1ED6; 1ED7; Case map*/
+    "\u1ED9",	/*1ED8; 1ED9; Case map*/
+    "\u1EDB",	/*1EDA; 1EDB; Case map*/
+    "\u1EDD",	/*1EDC; 1EDD; Case map*/
+    "\u1EDF",	/*1EDE; 1EDF; Case map*/
+    "\u1EE1",	/*1EE0; 1EE1; Case map*/
+    "\u1EE3",	/*1EE2; 1EE3; Case map*/
+    "\u1EE5",	/*1EE4; 1EE5; Case map*/
+    "\u1EE7",	/*1EE6; 1EE7; Case map*/
+    "\u1EE9",	/*1EE8; 1EE9; Case map*/
+    "\u1EEB",	/*1EEA; 1EEB; Case map*/
+    "\u1EED",	/*1EEC; 1EED; Case map*/
+    "\u1EEF",	/*1EEE; 1EEF; Case map*/
+    "\u1EF1",	/*1EF0; 1EF1; Case map*/
+    "\u1EF3",	/*1EF2; 1EF3; Case map*/
+    "\u1EF5",	/*1EF4; 1EF5; Case map*/
+    "\u1EF7",	/*1EF6; 1EF7; Case map*/
+    "\u1EF9",	/*1EF8; 1EF9; Case map*/
+    "\u1F00",	/*1F08; 1F00; Case map*/
+    "\u1F01",	/*1F09; 1F01; Case map*/
+    "\u1F02",	/*1F0A; 1F02; Case map*/
+    "\u1F03",	/*1F0B; 1F03; Case map*/
+    "\u1F04",	/*1F0C; 1F04; Case map*/
+    "\u1F05",	/*1F0D; 1F05; Case map*/
+    "\u1F06",	/*1F0E; 1F06; Case map*/
+    "\u1F07",	/*1F0F; 1F07; Case map*/
+    "\u1F10",	/*1F18; 1F10; Case map*/
+    "\u1F11",	/*1F19; 1F11; Case map*/
+    "\u1F12",	/*1F1A; 1F12; Case map*/
+    "\u1F13",	/*1F1B; 1F13; Case map*/
+    "\u1F14",	/*1F1C; 1F14; Case map*/
+    "\u1F15",	/*1F1D; 1F15; Case map*/
+    "\u1F20",	/*1F28; 1F20; Case map*/
+    "\u1F21",	/*1F29; 1F21; Case map*/
+    "\u1F22",	/*1F2A; 1F22; Case map*/
+    "\u1F23",	/*1F2B; 1F23; Case map*/
+    "\u1F24",	/*1F2C; 1F24; Case map*/
+    "\u1F25",	/*1F2D; 1F25; Case map*/
+    "\u1F26",	/*1F2E; 1F26; Case map*/
+    "\u1F27",	/*1F2F; 1F27; Case map*/
+    "\u1F30",	/*1F38; 1F30; Case map*/
+    "\u1F31",	/*1F39; 1F31; Case map*/
+    "\u1F32",	/*1F3A; 1F32; Case map*/
+    "\u1F33",	/*1F3B; 1F33; Case map*/
+    "\u1F34",	/*1F3C; 1F34; Case map*/
+    "\u1F35",	/*1F3D; 1F35; Case map*/
+    "\u1F36",	/*1F3E; 1F36; Case map*/
+    "\u1F37",	/*1F3F; 1F37; Case map*/
+    "\u1F40",	/*1F48; 1F40; Case map*/
+    "\u1F41",	/*1F49; 1F41; Case map*/
+    "\u1F42",	/*1F4A; 1F42; Case map*/
+    "\u1F43",	/*1F4B; 1F43; Case map*/
+    "\u1F44",	/*1F4C; 1F44; Case map*/
+    "\u1F45",	/*1F4D; 1F45; Case map*/
+    "\u03C5\u0313",	/*1F50; 03C5 0313; Case map*/
+    "\u03C5\u0313\u0300",	/*1F52; 03C5 0313 0300; Case map*/
+    "\u03C5\u0313\u0301",	/*1F54; 03C5 0313 0301; Case map*/
+    "\u03C5\u0313\u0342",	/*1F56; 03C5 0313 0342; Case map*/
+    "\u1F51",	/*1F59; 1F51; Case map*/
+    "\u1F53",	/*1F5B; 1F53; Case map*/
+    "\u1F55",	/*1F5D; 1F55; Case map*/
+    "\u1F57",	/*1F5F; 1F57; Case map*/
+    "\u1F60",	/*1F68; 1F60; Case map*/
+    "\u1F61",	/*1F69; 1F61; Case map*/
+    "\u1F62",	/*1F6A; 1F62; Case map*/
+    "\u1F63",	/*1F6B; 1F63; Case map*/
+    "\u1F64",	/*1F6C; 1F64; Case map*/
+    "\u1F65",	/*1F6D; 1F65; Case map*/
+    "\u1F66",	/*1F6E; 1F66; Case map*/
+    "\u1F67",	/*1F6F; 1F67; Case map*/
+    "\u1F00\u03B9",	/*1F80; 1F00 03B9; Case map*/
+    "\u1F01\u03B9",	/*1F81; 1F01 03B9; Case map*/
+    "\u1F02\u03B9",	/*1F82; 1F02 03B9; Case map*/
+    "\u1F03\u03B9",	/*1F83; 1F03 03B9; Case map*/
+    "\u1F04\u03B9",	/*1F84; 1F04 03B9; Case map*/
+    "\u1F05\u03B9",	/*1F85; 1F05 03B9; Case map*/
+    "\u1F06\u03B9",	/*1F86; 1F06 03B9; Case map*/
+    "\u1F07\u03B9",	/*1F87; 1F07 03B9; Case map*/
+    "\u1F00\u03B9",	/*1F88; 1F00 03B9; Case map*/
+    "\u1F01\u03B9",	/*1F89; 1F01 03B9; Case map*/
+    "\u1F02\u03B9",	/*1F8A; 1F02 03B9; Case map*/
+    "\u1F03\u03B9",	/*1F8B; 1F03 03B9; Case map*/
+    "\u1F04\u03B9",	/*1F8C; 1F04 03B9; Case map*/
+    "\u1F05\u03B9",	/*1F8D; 1F05 03B9; Case map*/
+    "\u1F06\u03B9",	/*1F8E; 1F06 03B9; Case map*/
+    "\u1F07\u03B9",	/*1F8F; 1F07 03B9; Case map*/
+    "\u1F20\u03B9",	/*1F90; 1F20 03B9; Case map*/
+    "\u1F21\u03B9",	/*1F91; 1F21 03B9; Case map*/
+    "\u1F22\u03B9",	/*1F92; 1F22 03B9; Case map*/
+    "\u1F23\u03B9",	/*1F93; 1F23 03B9; Case map*/
+    "\u1F24\u03B9",	/*1F94; 1F24 03B9; Case map*/
+    "\u1F25\u03B9",	/*1F95; 1F25 03B9; Case map*/
+    "\u1F26\u03B9",	/*1F96; 1F26 03B9; Case map*/
+    "\u1F27\u03B9",	/*1F97; 1F27 03B9; Case map*/
+    "\u1F20\u03B9",	/*1F98; 1F20 03B9; Case map*/
+    "\u1F21\u03B9",	/*1F99; 1F21 03B9; Case map*/
+    "\u1F22\u03B9",	/*1F9A; 1F22 03B9; Case map*/
+    "\u1F23\u03B9",	/*1F9B; 1F23 03B9; Case map*/
+    "\u1F24\u03B9",	/*1F9C; 1F24 03B9; Case map*/
+    "\u1F25\u03B9",	/*1F9D; 1F25 03B9; Case map*/
+    "\u1F26\u03B9",	/*1F9E; 1F26 03B9; Case map*/
+    "\u1F27\u03B9",	/*1F9F; 1F27 03B9; Case map*/
+    "\u1F60\u03B9",	/*1FA0; 1F60 03B9; Case map*/
+    "\u1F61\u03B9",	/*1FA1; 1F61 03B9; Case map*/
+    "\u1F62\u03B9",	/*1FA2; 1F62 03B9; Case map*/
+    "\u1F63\u03B9",	/*1FA3; 1F63 03B9; Case map*/
+    "\u1F64\u03B9",	/*1FA4; 1F64 03B9; Case map*/
+    "\u1F65\u03B9",	/*1FA5; 1F65 03B9; Case map*/
+    "\u1F66\u03B9",	/*1FA6; 1F66 03B9; Case map*/
+    "\u1F67\u03B9",	/*1FA7; 1F67 03B9; Case map*/
+    "\u1F60\u03B9",	/*1FA8; 1F60 03B9; Case map*/
+    "\u1F61\u03B9",	/*1FA9; 1F61 03B9; Case map*/
+    "\u1F62\u03B9",	/*1FAA; 1F62 03B9; Case map*/
+    "\u1F63\u03B9",	/*1FAB; 1F63 03B9; Case map*/
+    "\u1F64\u03B9",	/*1FAC; 1F64 03B9; Case map*/
+    "\u1F65\u03B9",	/*1FAD; 1F65 03B9; Case map*/
+    "\u1F66\u03B9",	/*1FAE; 1F66 03B9; Case map*/
+    "\u1F67\u03B9",	/*1FAF; 1F67 03B9; Case map*/
+    "\u1F70\u03B9",	/*1FB2; 1F70 03B9; Case map*/
+    "\u03B1\u03B9",	/*1FB3; 03B1 03B9; Case map*/
+    "\u03AC\u03B9",	/*1FB4; 03AC 03B9; Case map*/
+    "\u03B1\u0342",	/*1FB6; 03B1 0342; Case map*/
+    "\u03B1\u0342\u03B9",	/*1FB7; 03B1 0342 03B9; Case map*/
+    "\u1FB0",	/*1FB8; 1FB0; Case map*/
+    "\u1FB1",	/*1FB9; 1FB1; Case map*/
+    "\u1F70",	/*1FBA; 1F70; Case map*/
+    "\u1F71",	/*1FBB; 1F71; Case map*/
+    "\u03B1\u03B9",	/*1FBC; 03B1 03B9; Case map*/
+    "\u03B9",	/*1FBE; 03B9; Case map*/
+    "\u1F74\u03B9",	/*1FC2; 1F74 03B9; Case map*/
+    "\u03B7\u03B9",	/*1FC3; 03B7 03B9; Case map*/
+    "\u03AE\u03B9",	/*1FC4; 03AE 03B9; Case map*/
+    "\u03B7\u0342",	/*1FC6; 03B7 0342; Case map*/
+    "\u03B7\u0342\u03B9",	/*1FC7; 03B7 0342 03B9; Case map*/
+    "\u1F72",	/*1FC8; 1F72; Case map*/
+    "\u1F73",	/*1FC9; 1F73; Case map*/
+    "\u1F74",	/*1FCA; 1F74; Case map*/
+    "\u1F75",	/*1FCB; 1F75; Case map*/
+    "\u03B7\u03B9",	/*1FCC; 03B7 03B9; Case map*/
+    "\u03B9\u0308\u0300",	/*1FD2; 03B9 0308 0300; Case map*/
+    "\u03B9\u0308\u0301",	/*1FD3; 03B9 0308 0301; Case map*/
+    "\u03B9\u0342",	/*1FD6; 03B9 0342; Case map*/
+    "\u03B9\u0308\u0342",	/*1FD7; 03B9 0308 0342; Case map*/
+    "\u1FD0",	/*1FD8; 1FD0; Case map*/
+    "\u1FD1",	/*1FD9; 1FD1; Case map*/
+    "\u1F76",	/*1FDA; 1F76; Case map*/
+    "\u1F77",	/*1FDB; 1F77; Case map*/
+    "\u03C5\u0308\u0300",	/*1FE2; 03C5 0308 0300; Case map*/
+    "\u03C5\u0308\u0301",	/*1FE3; 03C5 0308 0301; Case map*/
+    "\u03C1\u0313",	/*1FE4; 03C1 0313; Case map*/
+    "\u03C5\u0342",	/*1FE6; 03C5 0342; Case map*/
+    "\u03C5\u0308\u0342",	/*1FE7; 03C5 0308 0342; Case map*/
+    "\u1FE0",	/*1FE8; 1FE0; Case map*/
+    "\u1FE1",	/*1FE9; 1FE1; Case map*/
+    "\u1F7A",	/*1FEA; 1F7A; Case map*/
+    "\u1F7B",	/*1FEB; 1F7B; Case map*/
+    "\u1FE5",	/*1FEC; 1FE5; Case map*/
+    "\u1F7C\u03B9",	/*1FF2; 1F7C 03B9; Case map*/
+    "\u03C9\u03B9",	/*1FF3; 03C9 03B9; Case map*/
+    "\u03CE\u03B9",	/*1FF4; 03CE 03B9; Case map*/
+    "\u03C9\u0342",	/*1FF6; 03C9 0342; Case map*/
+    "\u03C9\u0342\u03B9",	/*1FF7; 03C9 0342 03B9; Case map*/
+    "\u1F78",	/*1FF8; 1F78; Case map*/
+    "\u1F79",	/*1FF9; 1F79; Case map*/
+    "\u1F7C",	/*1FFA; 1F7C; Case map*/
+    "\u1F7D",	/*1FFB; 1F7D; Case map*/
+    "\u03C9\u03B9",	/*1FFC; 03C9 03B9; Case map*/
+    "\u0072\u0073",	/*20A8; 0072 0073; Additional folding*/
+    "\u0063",	/*2102; 0063; Additional folding*/
+    "\u00B0\u0063",	/*2103; 00B0 0063; Additional folding*/
+    "\u025B",	/*2107; 025B; Additional folding*/
+    "\u00B0\u0066",	/*2109; 00B0 0066; Additional folding*/
+    "\u0068",	/*210B; 0068; Additional folding*/
+    "\u0068",	/*210C; 0068; Additional folding*/
+    "\u0068",	/*210D; 0068; Additional folding*/
+    "\u0069",	/*2110; 0069; Additional folding*/
+    "\u0069",	/*2111; 0069; Additional folding*/
+    "\u006C",	/*2112; 006C; Additional folding*/
+    "\u006E",	/*2115; 006E; Additional folding*/
+    "\u006E\u006F",	/*2116; 006E 006F; Additional folding*/
+    "\u0070",	/*2119; 0070; Additional folding*/
+    "\u0071",	/*211A; 0071; Additional folding*/
+    "\u0072",	/*211B; 0072; Additional folding*/
+    "\u0072",	/*211C; 0072; Additional folding*/
+    "\u0072",	/*211D; 0072; Additional folding*/
+    "\u0073\u006D",	/*2120; 0073 006D; Additional folding*/
+    "\u0074\u0065\u006C",	/*2121; 0074 0065 006C; Additional folding*/
+    "\u0074\u006D",	/*2122; 0074 006D; Additional folding*/
+    "\u007A",	/*2124; 007A; Additional folding*/
+    "\u03C9",	/*2126; 03C9; Case map*/
+    "\u007A",	/*2128; 007A; Additional folding*/
+    "\u006B",	/*212A; 006B; Case map*/
+    "\u00E5",	/*212B; 00E5; Case map*/
+    "\u0062",	/*212C; 0062; Additional folding*/
+    "\u0063",	/*212D; 0063; Additional folding*/
+    "\u0065",	/*2130; 0065; Additional folding*/
+    "\u0066",	/*2131; 0066; Additional folding*/
+    "\u006D",	/*2133; 006D; Additional folding*/
+    "\u03B3",	/*213E; 03B3; Additional folding*/
+    "\u03C0",	/*213F; 03C0; Additional folding*/
+    "\u0064",	/*2145; 0064; Additional folding*/
+    "\u2170",	/*2160; 2170; Case map*/
+    "\u2171",	/*2161; 2171; Case map*/
+    "\u2172",	/*2162; 2172; Case map*/
+    "\u2173",	/*2163; 2173; Case map*/
+    "\u2174",	/*2164; 2174; Case map*/
+    "\u2175",	/*2165; 2175; Case map*/
+    "\u2176",	/*2166; 2176; Case map*/
+    "\u2177",	/*2167; 2177; Case map*/
+    "\u2178",	/*2168; 2178; Case map*/
+    "\u2179",	/*2169; 2179; Case map*/
+    "\u217A",	/*216A; 217A; Case map*/
+    "\u217B",	/*216B; 217B; Case map*/
+    "\u217C",	/*216C; 217C; Case map*/
+    "\u217D",	/*216D; 217D; Case map*/
+    "\u217E",	/*216E; 217E; Case map*/
+    "\u217F",	/*216F; 217F; Case map*/
+    "\u24D0",	/*24B6; 24D0; Case map*/
+    "\u24D1",	/*24B7; 24D1; Case map*/
+    "\u24D2",	/*24B8; 24D2; Case map*/
+    "\u24D3",	/*24B9; 24D3; Case map*/
+    "\u24D4",	/*24BA; 24D4; Case map*/
+    "\u24D5",	/*24BB; 24D5; Case map*/
+    "\u24D6",	/*24BC; 24D6; Case map*/
+    "\u24D7",	/*24BD; 24D7; Case map*/
+    "\u24D8",	/*24BE; 24D8; Case map*/
+    "\u24D9",	/*24BF; 24D9; Case map*/
+    "\u24DA",	/*24C0; 24DA; Case map*/
+    "\u24DB",	/*24C1; 24DB; Case map*/
+    "\u24DC",	/*24C2; 24DC; Case map*/
+    "\u24DD",	/*24C3; 24DD; Case map*/
+    "\u24DE",	/*24C4; 24DE; Case map*/
+    "\u24DF",	/*24C5; 24DF; Case map*/
+    "\u24E0",	/*24C6; 24E0; Case map*/
+    "\u24E1",	/*24C7; 24E1; Case map*/
+    "\u24E2",	/*24C8; 24E2; Case map*/
+    "\u24E3",	/*24C9; 24E3; Case map*/
+    "\u24E4",	/*24CA; 24E4; Case map*/
+    "\u24E5",	/*24CB; 24E5; Case map*/
+    "\u24E6",	/*24CC; 24E6; Case map*/
+    "\u24E7",	/*24CD; 24E7; Case map*/
+    "\u24E8",	/*24CE; 24E8; Case map*/
+    "\u24E9",	/*24CF; 24E9; Case map*/
+    "\u0068\u0070\u0061",	/*3371; 0068 0070 0061; Additional folding*/
+    "\u0061\u0075",	/*3373; 0061 0075; Additional folding*/
+    "\u006F\u0076",	/*3375; 006F 0076; Additional folding*/
+    "\u0070\u0061",	/*3380; 0070 0061; Additional folding*/
+    "\u006E\u0061",	/*3381; 006E 0061; Additional folding*/
+    "\u03BC\u0061",	/*3382; 03BC 0061; Additional folding*/
+    "\u006D\u0061",	/*3383; 006D 0061; Additional folding*/
+    "\u006B\u0061",	/*3384; 006B 0061; Additional folding*/
+    "\u006B\u0062",	/*3385; 006B 0062; Additional folding*/
+    "\u006D\u0062",	/*3386; 006D 0062; Additional folding*/
+    "\u0067\u0062",	/*3387; 0067 0062; Additional folding*/
+    "\u0070\u0066",	/*338A; 0070 0066; Additional folding*/
+    "\u006E\u0066",	/*338B; 006E 0066; Additional folding*/
+    "\u03BC\u0066",	/*338C; 03BC 0066; Additional folding*/
+    "\u0068\u007A",	/*3390; 0068 007A; Additional folding*/
+    "\u006B\u0068\u007A",	/*3391; 006B 0068 007A; Additional folding*/
+    "\u006D\u0068\u007A",	/*3392; 006D 0068 007A; Additional folding*/
+    "\u0067\u0068\u007A",	/*3393; 0067 0068 007A; Additional folding*/
+    "\u0074\u0068\u007A",	/*3394; 0074 0068 007A; Additional folding*/
+    "\u0070\u0061",	/*33A9; 0070 0061; Additional folding*/
+    "\u006B\u0070\u0061",	/*33AA; 006B 0070 0061; Additional folding*/
+    "\u006D\u0070\u0061",	/*33AB; 006D 0070 0061; Additional folding*/
+    "\u0067\u0070\u0061",	/*33AC; 0067 0070 0061; Additional folding*/
+    "\u0070\u0076",	/*33B4; 0070 0076; Additional folding*/
+    "\u006E\u0076",	/*33B5; 006E 0076; Additional folding*/
+    "\u03BC\u0076",	/*33B6; 03BC 0076; Additional folding*/
+    "\u006D\u0076",	/*33B7; 006D 0076; Additional folding*/
+    "\u006B\u0076",	/*33B8; 006B 0076; Additional folding*/
+    "\u006D\u0076",	/*33B9; 006D 0076; Additional folding*/
+    "\u0070\u0077",	/*33BA; 0070 0077; Additional folding*/
+    "\u006E\u0077",	/*33BB; 006E 0077; Additional folding*/
+    "\u03BC\u0077",	/*33BC; 03BC 0077; Additional folding*/
+    "\u006D\u0077",	/*33BD; 006D 0077; Additional folding*/
+    "\u006B\u0077",	/*33BE; 006B 0077; Additional folding*/
+    "\u006D\u0077",	/*33BF; 006D 0077; Additional folding*/
+    "\u006B\u03C9",	/*33C0; 006B 03C9; Additional folding*/
+    "\u006D\u03C9",	/*33C1; 006D 03C9; Additional folding*/
+    "\u0062\u0071",	/*33C3; 0062 0071; Additional folding*/
+    "\u0063\u2215\u006B\u0067",	/*33C6; 0063 2215 006B 0067; Additional folding*/
+    "\u0063\u006F\u002E",	/*33C7; 0063 006F 002E; Additional folding*/
+    "\u0064\u0062",	/*33C8; 0064 0062; Additional folding*/
+    "\u0067\u0079",	/*33C9; 0067 0079; Additional folding*/
+    "\u0068\u0070",	/*33CB; 0068 0070; Additional folding*/
+    "\u006B\u006B",	/*33CD; 006B 006B; Additional folding*/
+    "\u006B\u006D",	/*33CE; 006B 006D; Additional folding*/
+    "\u0070\u0068",	/*33D7; 0070 0068; Additional folding*/
+    "\u0070\u0070\u006D",	/*33D9; 0070 0070 006D; Additional folding*/
+    "\u0070\u0072",	/*33DA; 0070 0072; Additional folding*/
+    "\u0073\u0076",	/*33DC; 0073 0076; Additional folding*/
+    "\u0077\u0062",	/*33DD; 0077 0062; Additional folding*/
+    "\u0066\u0066",	/*FB00; 0066 0066; Case map*/
+    "\u0066\u0069",	/*FB01; 0066 0069; Case map*/
+    "\u0066\u006C",	/*FB02; 0066 006C; Case map*/
+    "\u0066\u0066\u0069",	/*FB03; 0066 0066 0069; Case map*/
+    "\u0066\u0066\u006C",	/*FB04; 0066 0066 006C; Case map*/
+    "\u0073\u0074",	/*FB05; 0073 0074; Case map*/
+    "\u0073\u0074",	/*FB06; 0073 0074; Case map*/
+    "\u0574\u0576",	/*FB13; 0574 0576; Case map*/
+    "\u0574\u0565",	/*FB14; 0574 0565; Case map*/
+    "\u0574\u056B",	/*FB15; 0574 056B; Case map*/
+    "\u057E\u0576",	/*FB16; 057E 0576; Case map*/
+    "\u0574\u056D",	/*FB17; 0574 056D; Case map*/
+    "\uFF41",	/*FF21; FF41; Case map*/
+    "\uFF42",	/*FF22; FF42; Case map*/
+    "\uFF43",	/*FF23; FF43; Case map*/
+    "\uFF44",	/*FF24; FF44; Case map*/
+    "\uFF45",	/*FF25; FF45; Case map*/
+    "\uFF46",	/*FF26; FF46; Case map*/
+    "\uFF47",	/*FF27; FF47; Case map*/
+    "\uFF48",	/*FF28; FF48; Case map*/
+    "\uFF49",	/*FF29; FF49; Case map*/
+    "\uFF4A",	/*FF2A; FF4A; Case map*/
+    "\uFF4B",	/*FF2B; FF4B; Case map*/
+    "\uFF4C",	/*FF2C; FF4C; Case map*/
+    "\uFF4D",	/*FF2D; FF4D; Case map*/
+    "\uFF4E",	/*FF2E; FF4E; Case map*/
+    "\uFF4F",	/*FF2F; FF4F; Case map*/
+    "\uFF50",	/*FF30; FF50; Case map*/
+    "\uFF51",	/*FF31; FF51; Case map*/
+    "\uFF52",	/*FF32; FF52; Case map*/
+    "\uFF53",	/*FF33; FF53; Case map*/
+    "\uFF54",	/*FF34; FF54; Case map*/
+    "\uFF55",	/*FF35; FF55; Case map*/
+    "\uFF56",	/*FF36; FF56; Case map*/
+    "\uFF57",	/*FF37; FF57; Case map*/
+    "\uFF58",	/*FF38; FF58; Case map*/
+    "\uFF59",	/*FF39; FF59; Case map*/
+    "\uFF5A",	/*FF3A; FF5A; Case map*/
+  };
+
+        public static char[] B3search = new char[] {
+    '\u0041',	/*0041; 0061; Case map*/
+    '\u0042',	/*0042; 0062; Case map*/
+    '\u0043',	/*0043; 0063; Case map*/
+    '\u0044',	/*0044; 0064; Case map*/
+    '\u0045',	/*0045; 0065; Case map*/
+    '\u0046',	/*0046; 0066; Case map*/
+    '\u0047',	/*0047; 0067; Case map*/
+    '\u0048',	/*0048; 0068; Case map*/
+    '\u0049',	/*0049; 0069; Case map*/
+    '\u004A',	/*004A; 006A; Case map*/
+    '\u004B',	/*004B; 006B; Case map*/
+    '\u004C',	/*004C; 006C; Case map*/
+    '\u004D',	/*004D; 006D; Case map*/
+    '\u004E',	/*004E; 006E; Case map*/
+    '\u004F',	/*004F; 006F; Case map*/
+    '\u0050',	/*0050; 0070; Case map*/
+    '\u0051',	/*0051; 0071; Case map*/
+    '\u0052',	/*0052; 0072; Case map*/
+    '\u0053',	/*0053; 0073; Case map*/
+    '\u0054',	/*0054; 0074; Case map*/
+    '\u0055',	/*0055; 0075; Case map*/
+    '\u0056',	/*0056; 0076; Case map*/
+    '\u0057',	/*0057; 0077; Case map*/
+    '\u0058',	/*0058; 0078; Case map*/
+    '\u0059',	/*0059; 0079; Case map*/
+    '\u005A',	/*005A; 007A; Case map*/
+    '\u00B5',	/*00B5; 03BC; Case map*/
+    '\u00C0',	/*00C0; 00E0; Case map*/
+    '\u00C1',	/*00C1; 00E1; Case map*/
+    '\u00C2',	/*00C2; 00E2; Case map*/
+    '\u00C3',	/*00C3; 00E3; Case map*/
+    '\u00C4',	/*00C4; 00E4; Case map*/
+    '\u00C5',	/*00C5; 00E5; Case map*/
+    '\u00C6',	/*00C6; 00E6; Case map*/
+    '\u00C7',	/*00C7; 00E7; Case map*/
+    '\u00C8',	/*00C8; 00E8; Case map*/
+    '\u00C9',	/*00C9; 00E9; Case map*/
+    '\u00CA',	/*00CA; 00EA; Case map*/
+    '\u00CB',	/*00CB; 00EB; Case map*/
+    '\u00CC',	/*00CC; 00EC; Case map*/
+    '\u00CD',	/*00CD; 00ED; Case map*/
+    '\u00CE',	/*00CE; 00EE; Case map*/
+    '\u00CF',	/*00CF; 00EF; Case map*/
+    '\u00D0',	/*00D0; 00F0; Case map*/
+    '\u00D1',	/*00D1; 00F1; Case map*/
+    '\u00D2',	/*00D2; 00F2; Case map*/
+    '\u00D3',	/*00D3; 00F3; Case map*/
+    '\u00D4',	/*00D4; 00F4; Case map*/
+    '\u00D5',	/*00D5; 00F5; Case map*/
+    '\u00D6',	/*00D6; 00F6; Case map*/
+    '\u00D8',	/*00D8; 00F8; Case map*/
+    '\u00D9',	/*00D9; 00F9; Case map*/
+    '\u00DA',	/*00DA; 00FA; Case map*/
+    '\u00DB',	/*00DB; 00FB; Case map*/
+    '\u00DC',	/*00DC; 00FC; Case map*/
+    '\u00DD',	/*00DD; 00FD; Case map*/
+    '\u00DE',	/*00DE; 00FE; Case map*/
+    '\u00DF',	/*00DF; 0073 0073; Case map*/
+    '\u0100',	/*0100; 0101; Case map*/
+    '\u0102',	/*0102; 0103; Case map*/
+    '\u0104',	/*0104; 0105; Case map*/
+    '\u0106',	/*0106; 0107; Case map*/
+    '\u0108',	/*0108; 0109; Case map*/
+    '\u010A',	/*010A; 010B; Case map*/
+    '\u010C',	/*010C; 010D; Case map*/
+    '\u010E',	/*010E; 010F; Case map*/
+    '\u0110',	/*0110; 0111; Case map*/
+    '\u0112',	/*0112; 0113; Case map*/
+    '\u0114',	/*0114; 0115; Case map*/
+    '\u0116',	/*0116; 0117; Case map*/
+    '\u0118',	/*0118; 0119; Case map*/
+    '\u011A',	/*011A; 011B; Case map*/
+    '\u011C',	/*011C; 011D; Case map*/
+    '\u011E',	/*011E; 011F; Case map*/
+    '\u0120',	/*0120; 0121; Case map*/
+    '\u0122',	/*0122; 0123; Case map*/
+    '\u0124',	/*0124; 0125; Case map*/
+    '\u0126',	/*0126; 0127; Case map*/
+    '\u0128',	/*0128; 0129; Case map*/
+    '\u012A',	/*012A; 012B; Case map*/
+    '\u012C',	/*012C; 012D; Case map*/
+    '\u012E',	/*012E; 012F; Case map*/
+    '\u0130',	/*0130; 0069 0307; Case map*/
+    '\u0132',	/*0132; 0133; Case map*/
+    '\u0134',	/*0134; 0135; Case map*/
+    '\u0136',	/*0136; 0137; Case map*/
+    '\u0139',	/*0139; 013A; Case map*/
+    '\u013B',	/*013B; 013C; Case map*/
+    '\u013D',	/*013D; 013E; Case map*/
+    '\u013F',	/*013F; 0140; Case map*/
+    '\u0141',	/*0141; 0142; Case map*/
+    '\u0143',	/*0143; 0144; Case map*/
+    '\u0145',	/*0145; 0146; Case map*/
+    '\u0147',	/*0147; 0148; Case map*/
+    '\u0149',	/*0149; 02BC 006E; Case map*/
+    '\u014A',	/*014A; 014B; Case map*/
+    '\u014C',	/*014C; 014D; Case map*/
+    '\u014E',	/*014E; 014F; Case map*/
+    '\u0150',	/*0150; 0151; Case map*/
+    '\u0152',	/*0152; 0153; Case map*/
+    '\u0154',	/*0154; 0155; Case map*/
+    '\u0156',	/*0156; 0157; Case map*/
+    '\u0158',	/*0158; 0159; Case map*/
+    '\u015A',	/*015A; 015B; Case map*/
+    '\u015C',	/*015C; 015D; Case map*/
+    '\u015E',	/*015E; 015F; Case map*/
+    '\u0160',	/*0160; 0161; Case map*/
+    '\u0162',	/*0162; 0163; Case map*/
+    '\u0164',	/*0164; 0165; Case map*/
+    '\u0166',	/*0166; 0167; Case map*/
+    '\u0168',	/*0168; 0169; Case map*/
+    '\u016A',	/*016A; 016B; Case map*/
+    '\u016C',	/*016C; 016D; Case map*/
+    '\u016E',	/*016E; 016F; Case map*/
+    '\u0170',	/*0170; 0171; Case map*/
+    '\u0172',	/*0172; 0173; Case map*/
+    '\u0174',	/*0174; 0175; Case map*/
+    '\u0176',	/*0176; 0177; Case map*/
+    '\u0178',	/*0178; 00FF; Case map*/
+    '\u0179',	/*0179; 017A; Case map*/
+    '\u017B',	/*017B; 017C; Case map*/
+    '\u017D',	/*017D; 017E; Case map*/
+    '\u017F',	/*017F; 0073; Case map*/
+    '\u0181',	/*0181; 0253; Case map*/
+    '\u0182',	/*0182; 0183; Case map*/
+    '\u0184',	/*0184; 0185; Case map*/
+    '\u0186',	/*0186; 0254; Case map*/
+    '\u0187',	/*0187; 0188; Case map*/
+    '\u0189',	/*0189; 0256; Case map*/
+    '\u018A',	/*018A; 0257; Case map*/
+    '\u018B',	/*018B; 018C; Case map*/
+    '\u018E',	/*018E; 01DD; Case map*/
+    '\u018F',	/*018F; 0259; Case map*/
+    '\u0190',	/*0190; 025B; Case map*/
+    '\u0191',	/*0191; 0192; Case map*/
+    '\u0193',	/*0193; 0260; Case map*/
+    '\u0194',	/*0194; 0263; Case map*/
+    '\u0196',	/*0196; 0269; Case map*/
+    '\u0197',	/*0197; 0268; Case map*/
+    '\u0198',	/*0198; 0199; Case map*/
+    '\u019C',	/*019C; 026F; Case map*/
+    '\u019D',	/*019D; 0272; Case map*/
+    '\u019F',	/*019F; 0275; Case map*/
+    '\u01A0',	/*01A0; 01A1; Case map*/
+    '\u01A2',	/*01A2; 01A3; Case map*/
+    '\u01A4',	/*01A4; 01A5; Case map*/
+    '\u01A6',	/*01A6; 0280; Case map*/
+    '\u01A7',	/*01A7; 01A8; Case map*/
+    '\u01A9',	/*01A9; 0283; Case map*/
+    '\u01AC',	/*01AC; 01AD; Case map*/
+    '\u01AE',	/*01AE; 0288; Case map*/
+    '\u01AF',	/*01AF; 01B0; Case map*/
+    '\u01B1',	/*01B1; 028A; Case map*/
+    '\u01B2',	/*01B2; 028B; Case map*/
+    '\u01B3',	/*01B3; 01B4; Case map*/
+    '\u01B5',	/*01B5; 01B6; Case map*/
+    '\u01B7',	/*01B7; 0292; Case map*/
+    '\u01B8',	/*01B8; 01B9; Case map*/
+    '\u01BC',	/*01BC; 01BD; Case map*/
+    '\u01C4',	/*01C4; 01C6; Case map*/
+    '\u01C5',	/*01C5; 01C6; Case map*/
+    '\u01C7',	/*01C7; 01C9; Case map*/
+    '\u01C8',	/*01C8; 01C9; Case map*/
+    '\u01CA',	/*01CA; 01CC; Case map*/
+    '\u01CB',	/*01CB; 01CC; Case map*/
+    '\u01CD',	/*01CD; 01CE; Case map*/
+    '\u01CF',	/*01CF; 01D0; Case map*/
+    '\u01D1',	/*01D1; 01D2; Case map*/
+    '\u01D3',	/*01D3; 01D4; Case map*/
+    '\u01D5',	/*01D5; 01D6; Case map*/
+    '\u01D7',	/*01D7; 01D8; Case map*/
+    '\u01D9',	/*01D9; 01DA; Case map*/
+    '\u01DB',	/*01DB; 01DC; Case map*/
+    '\u01DE',	/*01DE; 01DF; Case map*/
+    '\u01E0',	/*01E0; 01E1; Case map*/
+    '\u01E2',	/*01E2; 01E3; Case map*/
+    '\u01E4',	/*01E4; 01E5; Case map*/
+    '\u01E6',	/*01E6; 01E7; Case map*/
+    '\u01E8',	/*01E8; 01E9; Case map*/
+    '\u01EA',	/*01EA; 01EB; Case map*/
+    '\u01EC',	/*01EC; 01ED; Case map*/
+    '\u01EE',	/*01EE; 01EF; Case map*/
+    '\u01F0',	/*01F0; 006A 030C; Case map*/
+    '\u01F1',	/*01F1; 01F3; Case map*/
+    '\u01F2',	/*01F2; 01F3; Case map*/
+    '\u01F4',	/*01F4; 01F5; Case map*/
+    '\u01F6',	/*01F6; 0195; Case map*/
+    '\u01F7',	/*01F7; 01BF; Case map*/
+    '\u01F8',	/*01F8; 01F9; Case map*/
+    '\u01FA',	/*01FA; 01FB; Case map*/
+    '\u01FC',	/*01FC; 01FD; Case map*/
+    '\u01FE',	/*01FE; 01FF; Case map*/
+    '\u0200',	/*0200; 0201; Case map*/
+    '\u0202',	/*0202; 0203; Case map*/
+    '\u0204',	/*0204; 0205; Case map*/
+    '\u0206',	/*0206; 0207; Case map*/
+    '\u0208',	/*0208; 0209; Case map*/
+    '\u020A',	/*020A; 020B; Case map*/
+    '\u020C',	/*020C; 020D; Case map*/
+    '\u020E',	/*020E; 020F; Case map*/
+    '\u0210',	/*0210; 0211; Case map*/
+    '\u0212',	/*0212; 0213; Case map*/
+    '\u0214',	/*0214; 0215; Case map*/
+    '\u0216',	/*0216; 0217; Case map*/
+    '\u0218',	/*0218; 0219; Case map*/
+    '\u021A',	/*021A; 021B; Case map*/
+    '\u021C',	/*021C; 021D; Case map*/
+    '\u021E',	/*021E; 021F; Case map*/
+    '\u0220',	/*0220; 019E; Case map*/
+    '\u0222',	/*0222; 0223; Case map*/
+    '\u0224',	/*0224; 0225; Case map*/
+    '\u0226',	/*0226; 0227; Case map*/
+    '\u0228',	/*0228; 0229; Case map*/
+    '\u022A',	/*022A; 022B; Case map*/
+    '\u022C',	/*022C; 022D; Case map*/
+    '\u022E',	/*022E; 022F; Case map*/
+    '\u0230',	/*0230; 0231; Case map*/
+    '\u0232',	/*0232; 0233; Case map*/
+    '\u0345',	/*0345; 03B9; Case map*/
+    '\u0386',	/*0386; 03AC; Case map*/
+    '\u0388',	/*0388; 03AD; Case map*/
+    '\u0389',	/*0389; 03AE; Case map*/
+    '\u038A',	/*038A; 03AF; Case map*/
+    '\u038C',	/*038C; 03CC; Case map*/
+    '\u038E',	/*038E; 03CD; Case map*/
+    '\u038F',	/*038F; 03CE; Case map*/
+    '\u0390',	/*0390; 03B9 0308 0301; Case map*/
+    '\u0391',	/*0391; 03B1; Case map*/
+    '\u0392',	/*0392; 03B2; Case map*/
+    '\u0393',	/*0393; 03B3; Case map*/
+    '\u0394',	/*0394; 03B4; Case map*/
+    '\u0395',	/*0395; 03B5; Case map*/
+    '\u0396',	/*0396; 03B6; Case map*/
+    '\u0397',	/*0397; 03B7; Case map*/
+    '\u0398',	/*0398; 03B8; Case map*/
+    '\u0399',	/*0399; 03B9; Case map*/
+    '\u039A',	/*039A; 03BA; Case map*/
+    '\u039B',	/*039B; 03BB; Case map*/
+    '\u039C',	/*039C; 03BC; Case map*/
+    '\u039D',	/*039D; 03BD; Case map*/
+    '\u039E',	/*039E; 03BE; Case map*/
+    '\u039F',	/*039F; 03BF; Case map*/
+    '\u03A0',	/*03A0; 03C0; Case map*/
+    '\u03A1',	/*03A1; 03C1; Case map*/
+    '\u03A3',	/*03A3; 03C3; Case map*/
+    '\u03A4',	/*03A4; 03C4; Case map*/
+    '\u03A5',	/*03A5; 03C5; Case map*/
+    '\u03A6',	/*03A6; 03C6; Case map*/
+    '\u03A7',	/*03A7; 03C7; Case map*/
+    '\u03A8',	/*03A8; 03C8; Case map*/
+    '\u03A9',	/*03A9; 03C9; Case map*/
+    '\u03AA',	/*03AA; 03CA; Case map*/
+    '\u03AB',	/*03AB; 03CB; Case map*/
+    '\u03B0',	/*03B0; 03C5 0308 0301; Case map*/
+    '\u03C2',	/*03C2; 03C3; Case map*/
+    '\u03D0',	/*03D0; 03B2; Case map*/
+    '\u03D1',	/*03D1; 03B8; Case map*/
+    '\u03D5',	/*03D5; 03C6; Case map*/
+    '\u03D6',	/*03D6; 03C0; Case map*/
+    '\u03D8',	/*03D8; 03D9; Case map*/
+    '\u03DA',	/*03DA; 03DB; Case map*/
+    '\u03DC',	/*03DC; 03DD; Case map*/
+    '\u03DE',	/*03DE; 03DF; Case map*/
+    '\u03E0',	/*03E0; 03E1; Case map*/
+    '\u03E2',	/*03E2; 03E3; Case map*/
+    '\u03E4',	/*03E4; 03E5; Case map*/
+    '\u03E6',	/*03E6; 03E7; Case map*/
+    '\u03E8',	/*03E8; 03E9; Case map*/
+    '\u03EA',	/*03EA; 03EB; Case map*/
+    '\u03EC',	/*03EC; 03ED; Case map*/
+    '\u03EE',	/*03EE; 03EF; Case map*/
+    '\u03F0',	/*03F0; 03BA; Case map*/
+    '\u03F1',	/*03F1; 03C1; Case map*/
+    '\u03F2',	/*03F2; 03C3; Case map*/
+    '\u03F4',	/*03F4; 03B8; Case map*/
+    '\u03F5',	/*03F5; 03B5; Case map*/
+    '\u0400',	/*0400; 0450; Case map*/
+    '\u0401',	/*0401; 0451; Case map*/
+    '\u0402',	/*0402; 0452; Case map*/
+    '\u0403',	/*0403; 0453; Case map*/
+    '\u0404',	/*0404; 0454; Case map*/
+    '\u0405',	/*0405; 0455; Case map*/
+    '\u0406',	/*0406; 0456; Case map*/
+    '\u0407',	/*0407; 0457; Case map*/
+    '\u0408',	/*0408; 0458; Case map*/
+    '\u0409',	/*0409; 0459; Case map*/
+    '\u040A',	/*040A; 045A; Case map*/
+    '\u040B',	/*040B; 045B; Case map*/
+    '\u040C',	/*040C; 045C; Case map*/
+    '\u040D',	/*040D; 045D; Case map*/
+    '\u040E',	/*040E; 045E; Case map*/
+    '\u040F',	/*040F; 045F; Case map*/
+    '\u0410',	/*0410; 0430; Case map*/
+    '\u0411',	/*0411; 0431; Case map*/
+    '\u0412',	/*0412; 0432; Case map*/
+    '\u0413',	/*0413; 0433; Case map*/
+    '\u0414',	/*0414; 0434; Case map*/
+    '\u0415',	/*0415; 0435; Case map*/
+    '\u0416',	/*0416; 0436; Case map*/
+    '\u0417',	/*0417; 0437; Case map*/
+    '\u0418',	/*0418; 0438; Case map*/
+    '\u0419',	/*0419; 0439; Case map*/
+    '\u041A',	/*041A; 043A; Case map*/
+    '\u041B',	/*041B; 043B; Case map*/
+    '\u041C',	/*041C; 043C; Case map*/
+    '\u041D',	/*041D; 043D; Case map*/
+    '\u041E',	/*041E; 043E; Case map*/
+    '\u041F',	/*041F; 043F; Case map*/
+    '\u0420',	/*0420; 0440; Case map*/
+    '\u0421',	/*0421; 0441; Case map*/
+    '\u0422',	/*0422; 0442; Case map*/
+    '\u0423',	/*0423; 0443; Case map*/
+    '\u0424',	/*0424; 0444; Case map*/
+    '\u0425',	/*0425; 0445; Case map*/
+    '\u0426',	/*0426; 0446; Case map*/
+    '\u0427',	/*0427; 0447; Case map*/
+    '\u0428',	/*0428; 0448; Case map*/
+    '\u0429',	/*0429; 0449; Case map*/
+    '\u042A',	/*042A; 044A; Case map*/
+    '\u042B',	/*042B; 044B; Case map*/
+    '\u042C',	/*042C; 044C; Case map*/
+    '\u042D',	/*042D; 044D; Case map*/
+    '\u042E',	/*042E; 044E; Case map*/
+    '\u042F',	/*042F; 044F; Case map*/
+    '\u0460',	/*0460; 0461; Case map*/
+    '\u0462',	/*0462; 0463; Case map*/
+    '\u0464',	/*0464; 0465; Case map*/
+    '\u0466',	/*0466; 0467; Case map*/
+    '\u0468',	/*0468; 0469; Case map*/
+    '\u046A',	/*046A; 046B; Case map*/
+    '\u046C',	/*046C; 046D; Case map*/
+    '\u046E',	/*046E; 046F; Case map*/
+    '\u0470',	/*0470; 0471; Case map*/
+    '\u0472',	/*0472; 0473; Case map*/
+    '\u0474',	/*0474; 0475; Case map*/
+    '\u0476',	/*0476; 0477; Case map*/
+    '\u0478',	/*0478; 0479; Case map*/
+    '\u047A',	/*047A; 047B; Case map*/
+    '\u047C',	/*047C; 047D; Case map*/
+    '\u047E',	/*047E; 047F; Case map*/
+    '\u0480',	/*0480; 0481; Case map*/
+    '\u048A',	/*048A; 048B; Case map*/
+    '\u048C',	/*048C; 048D; Case map*/
+    '\u048E',	/*048E; 048F; Case map*/
+    '\u0490',	/*0490; 0491; Case map*/
+    '\u0492',	/*0492; 0493; Case map*/
+    '\u0494',	/*0494; 0495; Case map*/
+    '\u0496',	/*0496; 0497; Case map*/
+    '\u0498',	/*0498; 0499; Case map*/
+    '\u049A',	/*049A; 049B; Case map*/
+    '\u049C',	/*049C; 049D; Case map*/
+    '\u049E',	/*049E; 049F; Case map*/
+    '\u04A0',	/*04A0; 04A1; Case map*/
+    '\u04A2',	/*04A2; 04A3; Case map*/
+    '\u04A4',	/*04A4; 04A5; Case map*/
+    '\u04A6',	/*04A6; 04A7; Case map*/
+    '\u04A8',	/*04A8; 04A9; Case map*/
+    '\u04AA',	/*04AA; 04AB; Case map*/
+    '\u04AC',	/*04AC; 04AD; Case map*/
+    '\u04AE',	/*04AE; 04AF; Case map*/
+    '\u04B0',	/*04B0; 04B1; Case map*/
+    '\u04B2',	/*04B2; 04B3; Case map*/
+    '\u04B4',	/*04B4; 04B5; Case map*/
+    '\u04B6',	/*04B6; 04B7; Case map*/
+    '\u04B8',	/*04B8; 04B9; Case map*/
+    '\u04BA',	/*04BA; 04BB; Case map*/
+    '\u04BC',	/*04BC; 04BD; Case map*/
+    '\u04BE',	/*04BE; 04BF; Case map*/
+    '\u04C1',	/*04C1; 04C2; Case map*/
+    '\u04C3',	/*04C3; 04C4; Case map*/
+    '\u04C5',	/*04C5; 04C6; Case map*/
+    '\u04C7',	/*04C7; 04C8; Case map*/
+    '\u04C9',	/*04C9; 04CA; Case map*/
+    '\u04CB',	/*04CB; 04CC; Case map*/
+    '\u04CD',	/*04CD; 04CE; Case map*/
+    '\u04D0',	/*04D0; 04D1; Case map*/
+    '\u04D2',	/*04D2; 04D3; Case map*/
+    '\u04D4',	/*04D4; 04D5; Case map*/
+    '\u04D6',	/*04D6; 04D7; Case map*/
+    '\u04D8',	/*04D8; 04D9; Case map*/
+    '\u04DA',	/*04DA; 04DB; Case map*/
+    '\u04DC',	/*04DC; 04DD; Case map*/
+    '\u04DE',	/*04DE; 04DF; Case map*/
+    '\u04E0',	/*04E0; 04E1; Case map*/
+    '\u04E2',	/*04E2; 04E3; Case map*/
+    '\u04E4',	/*04E4; 04E5; Case map*/
+    '\u04E6',	/*04E6; 04E7; Case map*/
+    '\u04E8',	/*04E8; 04E9; Case map*/
+    '\u04EA',	/*04EA; 04EB; Case map*/
+    '\u04EC',	/*04EC; 04ED; Case map*/
+    '\u04EE',	/*04EE; 04EF; Case map*/
+    '\u04F0',	/*04F0; 04F1; Case map*/
+    '\u04F2',	/*04F2; 04F3; Case map*/
+    '\u04F4',	/*04F4; 04F5; Case map*/
+    '\u04F8',	/*04F8; 04F9; Case map*/
+    '\u0500',	/*0500; 0501; Case map*/
+    '\u0502',	/*0502; 0503; Case map*/
+    '\u0504',	/*0504; 0505; Case map*/
+    '\u0506',	/*0506; 0507; Case map*/
+    '\u0508',	/*0508; 0509; Case map*/
+    '\u050A',	/*050A; 050B; Case map*/
+    '\u050C',	/*050C; 050D; Case map*/
+    '\u050E',	/*050E; 050F; Case map*/
+    '\u0531',	/*0531; 0561; Case map*/
+    '\u0532',	/*0532; 0562; Case map*/
+    '\u0533',	/*0533; 0563; Case map*/
+    '\u0534',	/*0534; 0564; Case map*/
+    '\u0535',	/*0535; 0565; Case map*/
+    '\u0536',	/*0536; 0566; Case map*/
+    '\u0537',	/*0537; 0567; Case map*/
+    '\u0538',	/*0538; 0568; Case map*/
+    '\u0539',	/*0539; 0569; Case map*/
+    '\u053A',	/*053A; 056A; Case map*/
+    '\u053B',	/*053B; 056B; Case map*/
+    '\u053C',	/*053C; 056C; Case map*/
+    '\u053D',	/*053D; 056D; Case map*/
+    '\u053E',	/*053E; 056E; Case map*/
+    '\u053F',	/*053F; 056F; Case map*/
+    '\u0540',	/*0540; 0570; Case map*/
+    '\u0541',	/*0541; 0571; Case map*/
+    '\u0542',	/*0542; 0572; Case map*/
+    '\u0543',	/*0543; 0573; Case map*/
+    '\u0544',	/*0544; 0574; Case map*/
+    '\u0545',	/*0545; 0575; Case map*/
+    '\u0546',	/*0546; 0576; Case map*/
+    '\u0547',	/*0547; 0577; Case map*/
+    '\u0548',	/*0548; 0578; Case map*/
+    '\u0549',	/*0549; 0579; Case map*/
+    '\u054A',	/*054A; 057A; Case map*/
+    '\u054B',	/*054B; 057B; Case map*/
+    '\u054C',	/*054C; 057C; Case map*/
+    '\u054D',	/*054D; 057D; Case map*/
+    '\u054E',	/*054E; 057E; Case map*/
+    '\u054F',	/*054F; 057F; Case map*/
+    '\u0550',	/*0550; 0580; Case map*/
+    '\u0551',	/*0551; 0581; Case map*/
+    '\u0552',	/*0552; 0582; Case map*/
+    '\u0553',	/*0553; 0583; Case map*/
+    '\u0554',	/*0554; 0584; Case map*/
+    '\u0555',	/*0555; 0585; Case map*/
+    '\u0556',	/*0556; 0586; Case map*/
+    '\u0587',	/*0587; 0565 0582; Case map*/
+    '\u1E00',	/*1E00; 1E01; Case map*/
+    '\u1E02',	/*1E02; 1E03; Case map*/
+    '\u1E04',	/*1E04; 1E05; Case map*/
+    '\u1E06',	/*1E06; 1E07; Case map*/
+    '\u1E08',	/*1E08; 1E09; Case map*/
+    '\u1E0A',	/*1E0A; 1E0B; Case map*/
+    '\u1E0C',	/*1E0C; 1E0D; Case map*/
+    '\u1E0E',	/*1E0E; 1E0F; Case map*/
+    '\u1E10',	/*1E10; 1E11; Case map*/
+    '\u1E12',	/*1E12; 1E13; Case map*/
+    '\u1E14',	/*1E14; 1E15; Case map*/
+    '\u1E16',	/*1E16; 1E17; Case map*/
+    '\u1E18',	/*1E18; 1E19; Case map*/
+    '\u1E1A',	/*1E1A; 1E1B; Case map*/
+    '\u1E1C',	/*1E1C; 1E1D; Case map*/
+    '\u1E1E',	/*1E1E; 1E1F; Case map*/
+    '\u1E20',	/*1E20; 1E21; Case map*/
+    '\u1E22',	/*1E22; 1E23; Case map*/
+    '\u1E24',	/*1E24; 1E25; Case map*/
+    '\u1E26',	/*1E26; 1E27; Case map*/
+    '\u1E28',	/*1E28; 1E29; Case map*/
+    '\u1E2A',	/*1E2A; 1E2B; Case map*/
+    '\u1E2C',	/*1E2C; 1E2D; Case map*/
+    '\u1E2E',	/*1E2E; 1E2F; Case map*/
+    '\u1E30',	/*1E30; 1E31; Case map*/
+    '\u1E32',	/*1E32; 1E33; Case map*/
+    '\u1E34',	/*1E34; 1E35; Case map*/
+    '\u1E36',	/*1E36; 1E37; Case map*/
+    '\u1E38',	/*1E38; 1E39; Case map*/
+    '\u1E3A',	/*1E3A; 1E3B; Case map*/
+    '\u1E3C',	/*1E3C; 1E3D; Case map*/
+    '\u1E3E',	/*1E3E; 1E3F; Case map*/
+    '\u1E40',	/*1E40; 1E41; Case map*/
+    '\u1E42',	/*1E42; 1E43; Case map*/
+    '\u1E44',	/*1E44; 1E45; Case map*/
+    '\u1E46',	/*1E46; 1E47; Case map*/
+    '\u1E48',	/*1E48; 1E49; Case map*/
+    '\u1E4A',	/*1E4A; 1E4B; Case map*/
+    '\u1E4C',	/*1E4C; 1E4D; Case map*/
+    '\u1E4E',	/*1E4E; 1E4F; Case map*/
+    '\u1E50',	/*1E50; 1E51; Case map*/
+    '\u1E52',	/*1E52; 1E53; Case map*/
+    '\u1E54',	/*1E54; 1E55; Case map*/
+    '\u1E56',	/*1E56; 1E57; Case map*/
+    '\u1E58',	/*1E58; 1E59; Case map*/
+    '\u1E5A',	/*1E5A; 1E5B; Case map*/
+    '\u1E5C',	/*1E5C; 1E5D; Case map*/
+    '\u1E5E',	/*1E5E; 1E5F; Case map*/
+    '\u1E60',	/*1E60; 1E61; Case map*/
+    '\u1E62',	/*1E62; 1E63; Case map*/
+    '\u1E64',	/*1E64; 1E65; Case map*/
+    '\u1E66',	/*1E66; 1E67; Case map*/
+    '\u1E68',	/*1E68; 1E69; Case map*/
+    '\u1E6A',	/*1E6A; 1E6B; Case map*/
+    '\u1E6C',	/*1E6C; 1E6D; Case map*/
+    '\u1E6E',	/*1E6E; 1E6F; Case map*/
+    '\u1E70',	/*1E70; 1E71; Case map*/
+    '\u1E72',	/*1E72; 1E73; Case map*/
+    '\u1E74',	/*1E74; 1E75; Case map*/
+    '\u1E76',	/*1E76; 1E77; Case map*/
+    '\u1E78',	/*1E78; 1E79; Case map*/
+    '\u1E7A',	/*1E7A; 1E7B; Case map*/
+    '\u1E7C',	/*1E7C; 1E7D; Case map*/
+    '\u1E7E',	/*1E7E; 1E7F; Case map*/
+    '\u1E80',	/*1E80; 1E81; Case map*/
+    '\u1E82',	/*1E82; 1E83; Case map*/
+    '\u1E84',	/*1E84; 1E85; Case map*/
+    '\u1E86',	/*1E86; 1E87; Case map*/
+    '\u1E88',	/*1E88; 1E89; Case map*/
+    '\u1E8A',	/*1E8A; 1E8B; Case map*/
+    '\u1E8C',	/*1E8C; 1E8D; Case map*/
+    '\u1E8E',	/*1E8E; 1E8F; Case map*/
+    '\u1E90',	/*1E90; 1E91; Case map*/
+    '\u1E92',	/*1E92; 1E93; Case map*/
+    '\u1E94',	/*1E94; 1E95; Case map*/
+    '\u1E96',	/*1E96; 0068 0331; Case map*/
+    '\u1E97',	/*1E97; 0074 0308; Case map*/
+    '\u1E98',	/*1E98; 0077 030A; Case map*/
+    '\u1E99',	/*1E99; 0079 030A; Case map*/
+    '\u1E9A',	/*1E9A; 0061 02BE; Case map*/
+    '\u1E9B',	/*1E9B; 1E61; Case map*/
+    '\u1EA0',	/*1EA0; 1EA1; Case map*/
+    '\u1EA2',	/*1EA2; 1EA3; Case map*/
+    '\u1EA4',	/*1EA4; 1EA5; Case map*/
+    '\u1EA6',	/*1EA6; 1EA7; Case map*/
+    '\u1EA8',	/*1EA8; 1EA9; Case map*/
+    '\u1EAA',	/*1EAA; 1EAB; Case map*/
+    '\u1EAC',	/*1EAC; 1EAD; Case map*/
+    '\u1EAE',	/*1EAE; 1EAF; Case map*/
+    '\u1EB0',	/*1EB0; 1EB1; Case map*/
+    '\u1EB2',	/*1EB2; 1EB3; Case map*/
+    '\u1EB4',	/*1EB4; 1EB5; Case map*/
+    '\u1EB6',	/*1EB6; 1EB7; Case map*/
+    '\u1EB8',	/*1EB8; 1EB9; Case map*/
+    '\u1EBA',	/*1EBA; 1EBB; Case map*/
+    '\u1EBC',	/*1EBC; 1EBD; Case map*/
+    '\u1EBE',	/*1EBE; 1EBF; Case map*/
+    '\u1EC0',	/*1EC0; 1EC1; Case map*/
+    '\u1EC2',	/*1EC2; 1EC3; Case map*/
+    '\u1EC4',	/*1EC4; 1EC5; Case map*/
+    '\u1EC6',	/*1EC6; 1EC7; Case map*/
+    '\u1EC8',	/*1EC8; 1EC9; Case map*/
+    '\u1ECA',	/*1ECA; 1ECB; Case map*/
+    '\u1ECC',	/*1ECC; 1ECD; Case map*/
+    '\u1ECE',	/*1ECE; 1ECF; Case map*/
+    '\u1ED0',	/*1ED0; 1ED1; Case map*/
+    '\u1ED2',	/*1ED2; 1ED3; Case map*/
+    '\u1ED4',	/*1ED4; 1ED5; Case map*/
+    '\u1ED6',	/*1ED6; 1ED7; Case map*/
+    '\u1ED8',	/*1ED8; 1ED9; Case map*/
+    '\u1EDA',	/*1EDA; 1EDB; Case map*/
+    '\u1EDC',	/*1EDC; 1EDD; Case map*/
+    '\u1EDE',	/*1EDE; 1EDF; Case map*/
+    '\u1EE0',	/*1EE0; 1EE1; Case map*/
+    '\u1EE2',	/*1EE2; 1EE3; Case map*/
+    '\u1EE4',	/*1EE4; 1EE5; Case map*/
+    '\u1EE6',	/*1EE6; 1EE7; Case map*/
+    '\u1EE8',	/*1EE8; 1EE9; Case map*/
+    '\u1EEA',	/*1EEA; 1EEB; Case map*/
+    '\u1EEC',	/*1EEC; 1EED; Case map*/
+    '\u1EEE',	/*1EEE; 1EEF; Case map*/
+    '\u1EF0',	/*1EF0; 1EF1; Case map*/
+    '\u1EF2',	/*1EF2; 1EF3; Case map*/
+    '\u1EF4',	/*1EF4; 1EF5; Case map*/
+    '\u1EF6',	/*1EF6; 1EF7; Case map*/
+    '\u1EF8',	/*1EF8; 1EF9; Case map*/
+    '\u1F08',	/*1F08; 1F00; Case map*/
+    '\u1F09',	/*1F09; 1F01; Case map*/
+    '\u1F0A',	/*1F0A; 1F02; Case map*/
+    '\u1F0B',	/*1F0B; 1F03; Case map*/
+    '\u1F0C',	/*1F0C; 1F04; Case map*/
+    '\u1F0D',	/*1F0D; 1F05; Case map*/
+    '\u1F0E',	/*1F0E; 1F06; Case map*/
+    '\u1F0F',	/*1F0F; 1F07; Case map*/
+    '\u1F18',	/*1F18; 1F10; Case map*/
+    '\u1F19',	/*1F19; 1F11; Case map*/
+    '\u1F1A',	/*1F1A; 1F12; Case map*/
+    '\u1F1B',	/*1F1B; 1F13; Case map*/
+    '\u1F1C',	/*1F1C; 1F14; Case map*/
+    '\u1F1D',	/*1F1D; 1F15; Case map*/
+    '\u1F28',	/*1F28; 1F20; Case map*/
+    '\u1F29',	/*1F29; 1F21; Case map*/
+    '\u1F2A',	/*1F2A; 1F22; Case map*/
+    '\u1F2B',	/*1F2B; 1F23; Case map*/
+    '\u1F2C',	/*1F2C; 1F24; Case map*/
+    '\u1F2D',	/*1F2D; 1F25; Case map*/
+    '\u1F2E',	/*1F2E; 1F26; Case map*/
+    '\u1F2F',	/*1F2F; 1F27; Case map*/
+    '\u1F38',	/*1F38; 1F30; Case map*/
+    '\u1F39',	/*1F39; 1F31; Case map*/
+    '\u1F3A',	/*1F3A; 1F32; Case map*/
+    '\u1F3B',	/*1F3B; 1F33; Case map*/
+    '\u1F3C',	/*1F3C; 1F34; Case map*/
+    '\u1F3D',	/*1F3D; 1F35; Case map*/
+    '\u1F3E',	/*1F3E; 1F36; Case map*/
+    '\u1F3F',	/*1F3F; 1F37; Case map*/
+    '\u1F48',	/*1F48; 1F40; Case map*/
+    '\u1F49',	/*1F49; 1F41; Case map*/
+    '\u1F4A',	/*1F4A; 1F42; Case map*/
+    '\u1F4B',	/*1F4B; 1F43; Case map*/
+    '\u1F4C',	/*1F4C; 1F44; Case map*/
+    '\u1F4D',	/*1F4D; 1F45; Case map*/
+    '\u1F50',	/*1F50; 03C5 0313; Case map*/
+    '\u1F52',	/*1F52; 03C5 0313 0300; Case map*/
+    '\u1F54',	/*1F54; 03C5 0313 0301; Case map*/
+    '\u1F56',	/*1F56; 03C5 0313 0342; Case map*/
+    '\u1F59',	/*1F59; 1F51; Case map*/
+    '\u1F5B',	/*1F5B; 1F53; Case map*/
+    '\u1F5D',	/*1F5D; 1F55; Case map*/
+    '\u1F5F',	/*1F5F; 1F57; Case map*/
+    '\u1F68',	/*1F68; 1F60; Case map*/
+    '\u1F69',	/*1F69; 1F61; Case map*/
+    '\u1F6A',	/*1F6A; 1F62; Case map*/
+    '\u1F6B',	/*1F6B; 1F63; Case map*/
+    '\u1F6C',	/*1F6C; 1F64; Case map*/
+    '\u1F6D',	/*1F6D; 1F65; Case map*/
+    '\u1F6E',	/*1F6E; 1F66; Case map*/
+    '\u1F6F',	/*1F6F; 1F67; Case map*/
+    '\u1F80',	/*1F80; 1F00 03B9; Case map*/
+    '\u1F81',	/*1F81; 1F01 03B9; Case map*/
+    '\u1F82',	/*1F82; 1F02 03B9; Case map*/
+    '\u1F83',	/*1F83; 1F03 03B9; Case map*/
+    '\u1F84',	/*1F84; 1F04 03B9; Case map*/
+    '\u1F85',	/*1F85; 1F05 03B9; Case map*/
+    '\u1F86',	/*1F86; 1F06 03B9; Case map*/
+    '\u1F87',	/*1F87; 1F07 03B9; Case map*/
+    '\u1F88',	/*1F88; 1F00 03B9; Case map*/
+    '\u1F89',	/*1F89; 1F01 03B9; Case map*/
+    '\u1F8A',	/*1F8A; 1F02 03B9; Case map*/
+    '\u1F8B',	/*1F8B; 1F03 03B9; Case map*/
+    '\u1F8C',	/*1F8C; 1F04 03B9; Case map*/
+    '\u1F8D',	/*1F8D; 1F05 03B9; Case map*/
+    '\u1F8E',	/*1F8E; 1F06 03B9; Case map*/
+    '\u1F8F',	/*1F8F; 1F07 03B9; Case map*/
+    '\u1F90',	/*1F90; 1F20 03B9; Case map*/
+    '\u1F91',	/*1F91; 1F21 03B9; Case map*/
+    '\u1F92',	/*1F92; 1F22 03B9; Case map*/
+    '\u1F93',	/*1F93; 1F23 03B9; Case map*/
+    '\u1F94',	/*1F94; 1F24 03B9; Case map*/
+    '\u1F95',	/*1F95; 1F25 03B9; Case map*/
+    '\u1F96',	/*1F96; 1F26 03B9; Case map*/
+    '\u1F97',	/*1F97; 1F27 03B9; Case map*/
+    '\u1F98',	/*1F98; 1F20 03B9; Case map*/
+    '\u1F99',	/*1F99; 1F21 03B9; Case map*/
+    '\u1F9A',	/*1F9A; 1F22 03B9; Case map*/
+    '\u1F9B',	/*1F9B; 1F23 03B9; Case map*/
+    '\u1F9C',	/*1F9C; 1F24 03B9; Case map*/
+    '\u1F9D',	/*1F9D; 1F25 03B9; Case map*/
+    '\u1F9E',	/*1F9E; 1F26 03B9; Case map*/
+    '\u1F9F',	/*1F9F; 1F27 03B9; Case map*/
+    '\u1FA0',	/*1FA0; 1F60 03B9; Case map*/
+    '\u1FA1',	/*1FA1; 1F61 03B9; Case map*/
+    '\u1FA2',	/*1FA2; 1F62 03B9; Case map*/
+    '\u1FA3',	/*1FA3; 1F63 03B9; Case map*/
+    '\u1FA4',	/*1FA4; 1F64 03B9; Case map*/
+    '\u1FA5',	/*1FA5; 1F65 03B9; Case map*/
+    '\u1FA6',	/*1FA6; 1F66 03B9; Case map*/
+    '\u1FA7',	/*1FA7; 1F67 03B9; Case map*/
+    '\u1FA8',	/*1FA8; 1F60 03B9; Case map*/
+    '\u1FA9',	/*1FA9; 1F61 03B9; Case map*/
+    '\u1FAA',	/*1FAA; 1F62 03B9; Case map*/
+    '\u1FAB',	/*1FAB; 1F63 03B9; Case map*/
+    '\u1FAC',	/*1FAC; 1F64 03B9; Case map*/
+    '\u1FAD',	/*1FAD; 1F65 03B9; Case map*/
+    '\u1FAE',	/*1FAE; 1F66 03B9; Case map*/
+    '\u1FAF',	/*1FAF; 1F67 03B9; Case map*/
+    '\u1FB2',	/*1FB2; 1F70 03B9; Case map*/
+    '\u1FB3',	/*1FB3; 03B1 03B9; Case map*/
+    '\u1FB4',	/*1FB4; 03AC 03B9; Case map*/
+    '\u1FB6',	/*1FB6; 03B1 0342; Case map*/
+    '\u1FB7',	/*1FB7; 03B1 0342 03B9; Case map*/
+    '\u1FB8',	/*1FB8; 1FB0; Case map*/
+    '\u1FB9',	/*1FB9; 1FB1; Case map*/
+    '\u1FBA',	/*1FBA; 1F70; Case map*/
+    '\u1FBB',	/*1FBB; 1F71; Case map*/
+    '\u1FBC',	/*1FBC; 03B1 03B9; Case map*/
+    '\u1FBE',	/*1FBE; 03B9; Case map*/
+    '\u1FC2',	/*1FC2; 1F74 03B9; Case map*/
+    '\u1FC3',	/*1FC3; 03B7 03B9; Case map*/
+    '\u1FC4',	/*1FC4; 03AE 03B9; Case map*/
+    '\u1FC6',	/*1FC6; 03B7 0342; Case map*/
+    '\u1FC7',	/*1FC7; 03B7 0342 03B9; Case map*/
+    '\u1FC8',	/*1FC8; 1F72; Case map*/
+    '\u1FC9',	/*1FC9; 1F73; Case map*/
+    '\u1FCA',	/*1FCA; 1F74; Case map*/
+    '\u1FCB',	/*1FCB; 1F75; Case map*/
+    '\u1FCC',	/*1FCC; 03B7 03B9; Case map*/
+    '\u1FD2',	/*1FD2; 03B9 0308 0300; Case map*/
+    '\u1FD3',	/*1FD3; 03B9 0308 0301; Case map*/
+    '\u1FD6',	/*1FD6; 03B9 0342; Case map*/
+    '\u1FD7',	/*1FD7; 03B9 0308 0342; Case map*/
+    '\u1FD8',	/*1FD8; 1FD0; Case map*/
+    '\u1FD9',	/*1FD9; 1FD1; Case map*/
+    '\u1FDA',	/*1FDA; 1F76; Case map*/
+    '\u1FDB',	/*1FDB; 1F77; Case map*/
+    '\u1FE2',	/*1FE2; 03C5 0308 0300; Case map*/
+    '\u1FE3',	/*1FE3; 03C5 0308 0301; Case map*/
+    '\u1FE4',	/*1FE4; 03C1 0313; Case map*/
+    '\u1FE6',	/*1FE6; 03C5 0342; Case map*/
+    '\u1FE7',	/*1FE7; 03C5 0308 0342; Case map*/
+    '\u1FE8',	/*1FE8; 1FE0; Case map*/
+    '\u1FE9',	/*1FE9; 1FE1; Case map*/
+    '\u1FEA',	/*1FEA; 1F7A; Case map*/
+    '\u1FEB',	/*1FEB; 1F7B; Case map*/
+    '\u1FEC',	/*1FEC; 1FE5; Case map*/
+    '\u1FF2',	/*1FF2; 1F7C 03B9; Case map*/
+    '\u1FF3',	/*1FF3; 03C9 03B9; Case map*/
+    '\u1FF4',	/*1FF4; 03CE 03B9; Case map*/
+    '\u1FF6',	/*1FF6; 03C9 0342; Case map*/
+    '\u1FF7',	/*1FF7; 03C9 0342 03B9; Case map*/
+    '\u1FF8',	/*1FF8; 1F78; Case map*/
+    '\u1FF9',	/*1FF9; 1F79; Case map*/
+    '\u1FFA',	/*1FFA; 1F7C; Case map*/
+    '\u1FFB',	/*1FFB; 1F7D; Case map*/
+    '\u1FFC',	/*1FFC; 03C9 03B9; Case map*/
+    '\u2126',	/*2126; 03C9; Case map*/
+    '\u212A',	/*212A; 006B; Case map*/
+    '\u212B',	/*212B; 00E5; Case map*/
+    '\u2160',	/*2160; 2170; Case map*/
+    '\u2161',	/*2161; 2171; Case map*/
+    '\u2162',	/*2162; 2172; Case map*/
+    '\u2163',	/*2163; 2173; Case map*/
+    '\u2164',	/*2164; 2174; Case map*/
+    '\u2165',	/*2165; 2175; Case map*/
+    '\u2166',	/*2166; 2176; Case map*/
+    '\u2167',	/*2167; 2177; Case map*/
+    '\u2168',	/*2168; 2178; Case map*/
+    '\u2169',	/*2169; 2179; Case map*/
+    '\u216A',	/*216A; 217A; Case map*/
+    '\u216B',	/*216B; 217B; Case map*/
+    '\u216C',	/*216C; 217C; Case map*/
+    '\u216D',	/*216D; 217D; Case map*/
+    '\u216E',	/*216E; 217E; Case map*/
+    '\u216F',	/*216F; 217F; Case map*/
+    '\u24B6',	/*24B6; 24D0; Case map*/
+    '\u24B7',	/*24B7; 24D1; Case map*/
+    '\u24B8',	/*24B8; 24D2; Case map*/
+    '\u24B9',	/*24B9; 24D3; Case map*/
+    '\u24BA',	/*24BA; 24D4; Case map*/
+    '\u24BB',	/*24BB; 24D5; Case map*/
+    '\u24BC',	/*24BC; 24D6; Case map*/
+    '\u24BD',	/*24BD; 24D7; Case map*/
+    '\u24BE',	/*24BE; 24D8; Case map*/
+    '\u24BF',	/*24BF; 24D9; Case map*/
+    '\u24C0',	/*24C0; 24DA; Case map*/
+    '\u24C1',	/*24C1; 24DB; Case map*/
+    '\u24C2',	/*24C2; 24DC; Case map*/
+    '\u24C3',	/*24C3; 24DD; Case map*/
+    '\u24C4',	/*24C4; 24DE; Case map*/
+    '\u24C5',	/*24C5; 24DF; Case map*/
+    '\u24C6',	/*24C6; 24E0; Case map*/
+    '\u24C7',	/*24C7; 24E1; Case map*/
+    '\u24C8',	/*24C8; 24E2; Case map*/
+    '\u24C9',	/*24C9; 24E3; Case map*/
+    '\u24CA',	/*24CA; 24E4; Case map*/
+    '\u24CB',	/*24CB; 24E5; Case map*/
+    '\u24CC',	/*24CC; 24E6; Case map*/
+    '\u24CD',	/*24CD; 24E7; Case map*/
+    '\u24CE',	/*24CE; 24E8; Case map*/
+    '\u24CF',	/*24CF; 24E9; Case map*/
+    '\uFB00',	/*FB00; 0066 0066; Case map*/
+    '\uFB01',	/*FB01; 0066 0069; Case map*/
+    '\uFB02',	/*FB02; 0066 006C; Case map*/
+    '\uFB03',	/*FB03; 0066 0066 0069; Case map*/
+    '\uFB04',	/*FB04; 0066 0066 006C; Case map*/
+    '\uFB05',	/*FB05; 0073 0074; Case map*/
+    '\uFB06',	/*FB06; 0073 0074; Case map*/
+    '\uFB13',	/*FB13; 0574 0576; Case map*/
+    '\uFB14',	/*FB14; 0574 0565; Case map*/
+    '\uFB15',	/*FB15; 0574 056B; Case map*/
+    '\uFB16',	/*FB16; 057E 0576; Case map*/
+    '\uFB17',	/*FB17; 0574 056D; Case map*/
+    '\uFF21',	/*FF21; FF41; Case map*/
+    '\uFF22',	/*FF22; FF42; Case map*/
+    '\uFF23',	/*FF23; FF43; Case map*/
+    '\uFF24',	/*FF24; FF44; Case map*/
+    '\uFF25',	/*FF25; FF45; Case map*/
+    '\uFF26',	/*FF26; FF46; Case map*/
+    '\uFF27',	/*FF27; FF47; Case map*/
+    '\uFF28',	/*FF28; FF48; Case map*/
+    '\uFF29',	/*FF29; FF49; Case map*/
+    '\uFF2A',	/*FF2A; FF4A; Case map*/
+    '\uFF2B',	/*FF2B; FF4B; Case map*/
+    '\uFF2C',	/*FF2C; FF4C; Case map*/
+    '\uFF2D',	/*FF2D; FF4D; Case map*/
+    '\uFF2E',	/*FF2E; FF4E; Case map*/
+    '\uFF2F',	/*FF2F; FF4F; Case map*/
+    '\uFF30',	/*FF30; FF50; Case map*/
+    '\uFF31',	/*FF31; FF51; Case map*/
+    '\uFF32',	/*FF32; FF52; Case map*/
+    '\uFF33',	/*FF33; FF53; Case map*/
+    '\uFF34',	/*FF34; FF54; Case map*/
+    '\uFF35',	/*FF35; FF55; Case map*/
+    '\uFF36',	/*FF36; FF56; Case map*/
+    '\uFF37',	/*FF37; FF57; Case map*/
+    '\uFF38',	/*FF38; FF58; Case map*/
+    '\uFF39',	/*FF39; FF59; Case map*/
+    '\uFF3A',	/*FF3A; FF5A; Case map*/
+  };
+
+        public static string[] B3replace = new string[] {
+    "\u0061",	/*0041; 0061; Case map*/
+    "\u0062",	/*0042; 0062; Case map*/
+    "\u0063",	/*0043; 0063; Case map*/
+    "\u0064",	/*0044; 0064; Case map*/
+    "\u0065",	/*0045; 0065; Case map*/
+    "\u0066",	/*0046; 0066; Case map*/
+    "\u0067",	/*0047; 0067; Case map*/
+    "\u0068",	/*0048; 0068; Case map*/
+    "\u0069",	/*0049; 0069; Case map*/
+    "\u006A",	/*004A; 006A; Case map*/
+    "\u006B",	/*004B; 006B; Case map*/
+    "\u006C",	/*004C; 006C; Case map*/
+    "\u006D",	/*004D; 006D; Case map*/
+    "\u006E",	/*004E; 006E; Case map*/
+    "\u006F",	/*004F; 006F; Case map*/
+    "\u0070",	/*0050; 0070; Case map*/
+    "\u0071",	/*0051; 0071; Case map*/
+    "\u0072",	/*0052; 0072; Case map*/
+    "\u0073",	/*0053; 0073; Case map*/
+    "\u0074",	/*0054; 0074; Case map*/
+    "\u0075",	/*0055; 0075; Case map*/
+    "\u0076",	/*0056; 0076; Case map*/
+    "\u0077",	/*0057; 0077; Case map*/
+    "\u0078",	/*0058; 0078; Case map*/
+    "\u0079",	/*0059; 0079; Case map*/
+    "\u007A",	/*005A; 007A; Case map*/
+    "\u03BC",	/*00B5; 03BC; Case map*/
+    "\u00E0",	/*00C0; 00E0; Case map*/
+    "\u00E1",	/*00C1; 00E1; Case map*/
+    "\u00E2",	/*00C2; 00E2; Case map*/
+    "\u00E3",	/*00C3; 00E3; Case map*/
+    "\u00E4",	/*00C4; 00E4; Case map*/
+    "\u00E5",	/*00C5; 00E5; Case map*/
+    "\u00E6",	/*00C6; 00E6; Case map*/
+    "\u00E7",	/*00C7; 00E7; Case map*/
+    "\u00E8",	/*00C8; 00E8; Case map*/
+    "\u00E9",	/*00C9; 00E9; Case map*/
+    "\u00EA",	/*00CA; 00EA; Case map*/
+    "\u00EB",	/*00CB; 00EB; Case map*/
+    "\u00EC",	/*00CC; 00EC; Case map*/
+    "\u00ED",	/*00CD; 00ED; Case map*/
+    "\u00EE",	/*00CE; 00EE; Case map*/
+    "\u00EF",	/*00CF; 00EF; Case map*/
+    "\u00F0",	/*00D0; 00F0; Case map*/
+    "\u00F1",	/*00D1; 00F1; Case map*/
+    "\u00F2",	/*00D2; 00F2; Case map*/
+    "\u00F3",	/*00D3; 00F3; Case map*/
+    "\u00F4",	/*00D4; 00F4; Case map*/
+    "\u00F5",	/*00D5; 00F5; Case map*/
+    "\u00F6",	/*00D6; 00F6; Case map*/
+    "\u00F8",	/*00D8; 00F8; Case map*/
+    "\u00F9",	/*00D9; 00F9; Case map*/
+    "\u00FA",	/*00DA; 00FA; Case map*/
+    "\u00FB",	/*00DB; 00FB; Case map*/
+    "\u00FC",	/*00DC; 00FC; Case map*/
+    "\u00FD",	/*00DD; 00FD; Case map*/
+    "\u00FE",	/*00DE; 00FE; Case map*/
+    "\u0073\u0073",	/*00DF; 0073 0073; Case map*/
+    "\u0101",	/*0100; 0101; Case map*/
+    "\u0103",	/*0102; 0103; Case map*/
+    "\u0105",	/*0104; 0105; Case map*/
+    "\u0107",	/*0106; 0107; Case map*/
+    "\u0109",	/*0108; 0109; Case map*/
+    "\u010B",	/*010A; 010B; Case map*/
+    "\u010D",	/*010C; 010D; Case map*/
+    "\u010F",	/*010E; 010F; Case map*/
+    "\u0111",	/*0110; 0111; Case map*/
+    "\u0113",	/*0112; 0113; Case map*/
+    "\u0115",	/*0114; 0115; Case map*/
+    "\u0117",	/*0116; 0117; Case map*/
+    "\u0119",	/*0118; 0119; Case map*/
+    "\u011B",	/*011A; 011B; Case map*/
+    "\u011D",	/*011C; 011D; Case map*/
+    "\u011F",	/*011E; 011F; Case map*/
+    "\u0121",	/*0120; 0121; Case map*/
+    "\u0123",	/*0122; 0123; Case map*/
+    "\u0125",	/*0124; 0125; Case map*/
+    "\u0127",	/*0126; 0127; Case map*/
+    "\u0129",	/*0128; 0129; Case map*/
+    "\u012B",	/*012A; 012B; Case map*/
+    "\u012D",	/*012C; 012D; Case map*/
+    "\u012F",	/*012E; 012F; Case map*/
+    "\u0069\u0307",	/*0130; 0069 0307; Case map*/
+    "\u0133",	/*0132; 0133; Case map*/
+    "\u0135",	/*0134; 0135; Case map*/
+    "\u0137",	/*0136; 0137; Case map*/
+    "\u013A",	/*0139; 013A; Case map*/
+    "\u013C",	/*013B; 013C; Case map*/
+    "\u013E",	/*013D; 013E; Case map*/
+    "\u0140",	/*013F; 0140; Case map*/
+    "\u0142",	/*0141; 0142; Case map*/
+    "\u0144",	/*0143; 0144; Case map*/
+    "\u0146",	/*0145; 0146; Case map*/
+    "\u0148",	/*0147; 0148; Case map*/
+    "\u02BC\u006E",	/*0149; 02BC 006E; Case map*/
+    "\u014B",	/*014A; 014B; Case map*/
+    "\u014D",	/*014C; 014D; Case map*/
+    "\u014F",	/*014E; 014F; Case map*/
+    "\u0151",	/*0150; 0151; Case map*/
+    "\u0153",	/*0152; 0153; Case map*/
+    "\u0155",	/*0154; 0155; Case map*/
+    "\u0157",	/*0156; 0157; Case map*/
+    "\u0159",	/*0158; 0159; Case map*/
+    "\u015B",	/*015A; 015B; Case map*/
+    "\u015D",	/*015C; 015D; Case map*/
+    "\u015F",	/*015E; 015F; Case map*/
+    "\u0161",	/*0160; 0161; Case map*/
+    "\u0163",	/*0162; 0163; Case map*/
+    "\u0165",	/*0164; 0165; Case map*/
+    "\u0167",	/*0166; 0167; Case map*/
+    "\u0169",	/*0168; 0169; Case map*/
+    "\u016B",	/*016A; 016B; Case map*/
+    "\u016D",	/*016C; 016D; Case map*/
+    "\u016F",	/*016E; 016F; Case map*/
+    "\u0171",	/*0170; 0171; Case map*/
+    "\u0173",	/*0172; 0173; Case map*/
+    "\u0175",	/*0174; 0175; Case map*/
+    "\u0177",	/*0176; 0177; Case map*/
+    "\u00FF",	/*0178; 00FF; Case map*/
+    "\u017A",	/*0179; 017A; Case map*/
+    "\u017C",	/*017B; 017C; Case map*/
+    "\u017E",	/*017D; 017E; Case map*/
+    "\u0073",	/*017F; 0073; Case map*/
+    "\u0253",	/*0181; 0253; Case map*/
+    "\u0183",	/*0182; 0183; Case map*/
+    "\u0185",	/*0184; 0185; Case map*/
+    "\u0254",	/*0186; 0254; Case map*/
+    "\u0188",	/*0187; 0188; Case map*/
+    "\u0256",	/*0189; 0256; Case map*/
+    "\u0257",	/*018A; 0257; Case map*/
+    "\u018C",	/*018B; 018C; Case map*/
+    "\u01DD",	/*018E; 01DD; Case map*/
+    "\u0259",	/*018F; 0259; Case map*/
+    "\u025B",	/*0190; 025B; Case map*/
+    "\u0192",	/*0191; 0192; Case map*/
+    "\u0260",	/*0193; 0260; Case map*/
+    "\u0263",	/*0194; 0263; Case map*/
+    "\u0269",	/*0196; 0269; Case map*/
+    "\u0268",	/*0197; 0268; Case map*/
+    "\u0199",	/*0198; 0199; Case map*/
+    "\u026F",	/*019C; 026F; Case map*/
+    "\u0272",	/*019D; 0272; Case map*/
+    "\u0275",	/*019F; 0275; Case map*/
+    "\u01A1",	/*01A0; 01A1; Case map*/
+    "\u01A3",	/*01A2; 01A3; Case map*/
+    "\u01A5",	/*01A4; 01A5; Case map*/
+    "\u0280",	/*01A6; 0280; Case map*/
+    "\u01A8",	/*01A7; 01A8; Case map*/
+    "\u0283",	/*01A9; 0283; Case map*/
+    "\u01AD",	/*01AC; 01AD; Case map*/
+    "\u0288",	/*01AE; 0288; Case map*/
+    "\u01B0",	/*01AF; 01B0; Case map*/
+    "\u028A",	/*01B1; 028A; Case map*/
+    "\u028B",	/*01B2; 028B; Case map*/
+    "\u01B4",	/*01B3; 01B4; Case map*/
+    "\u01B6",	/*01B5; 01B6; Case map*/
+    "\u0292",	/*01B7; 0292; Case map*/
+    "\u01B9",	/*01B8; 01B9; Case map*/
+    "\u01BD",	/*01BC; 01BD; Case map*/
+    "\u01C6",	/*01C4; 01C6; Case map*/
+    "\u01C6",	/*01C5; 01C6; Case map*/
+    "\u01C9",	/*01C7; 01C9; Case map*/
+    "\u01C9",	/*01C8; 01C9; Case map*/
+    "\u01CC",	/*01CA; 01CC; Case map*/
+    "\u01CC",	/*01CB; 01CC; Case map*/
+    "\u01CE",	/*01CD; 01CE; Case map*/
+    "\u01D0",	/*01CF; 01D0; Case map*/
+    "\u01D2",	/*01D1; 01D2; Case map*/
+    "\u01D4",	/*01D3; 01D4; Case map*/
+    "\u01D6",	/*01D5; 01D6; Case map*/
+    "\u01D8",	/*01D7; 01D8; Case map*/
+    "\u01DA",	/*01D9; 01DA; Case map*/
+    "\u01DC",	/*01DB; 01DC; Case map*/
+    "\u01DF",	/*01DE; 01DF; Case map*/
+    "\u01E1",	/*01E0; 01E1; Case map*/
+    "\u01E3",	/*01E2; 01E3; Case map*/
+    "\u01E5",	/*01E4; 01E5; Case map*/
+    "\u01E7",	/*01E6; 01E7; Case map*/
+    "\u01E9",	/*01E8; 01E9; Case map*/
+    "\u01EB",	/*01EA; 01EB; Case map*/
+    "\u01ED",	/*01EC; 01ED; Case map*/
+    "\u01EF",	/*01EE; 01EF; Case map*/
+    "\u006A\u030C",	/*01F0; 006A 030C; Case map*/
+    "\u01F3",	/*01F1; 01F3; Case map*/
+    "\u01F3",	/*01F2; 01F3; Case map*/
+    "\u01F5",	/*01F4; 01F5; Case map*/
+    "\u0195",	/*01F6; 0195; Case map*/
+    "\u01BF",	/*01F7; 01BF; Case map*/
+    "\u01F9",	/*01F8; 01F9; Case map*/
+    "\u01FB",	/*01FA; 01FB; Case map*/
+    "\u01FD",	/*01FC; 01FD; Case map*/
+    "\u01FF",	/*01FE; 01FF; Case map*/
+    "\u0201",	/*0200; 0201; Case map*/
+    "\u0203",	/*0202; 0203; Case map*/
+    "\u0205",	/*0204; 0205; Case map*/
+    "\u0207",	/*0206; 0207; Case map*/
+    "\u0209",	/*0208; 0209; Case map*/
+    "\u020B",	/*020A; 020B; Case map*/
+    "\u020D",	/*020C; 020D; Case map*/
+    "\u020F",	/*020E; 020F; Case map*/
+    "\u0211",	/*0210; 0211; Case map*/
+    "\u0213",	/*0212; 0213; Case map*/
+    "\u0215",	/*0214; 0215; Case map*/
+    "\u0217",	/*0216; 0217; Case map*/
+    "\u0219",	/*0218; 0219; Case map*/
+    "\u021B",	/*021A; 021B; Case map*/
+    "\u021D",	/*021C; 021D; Case map*/
+    "\u021F",	/*021E; 021F; Case map*/
+    "\u019E",	/*0220; 019E; Case map*/
+    "\u0223",	/*0222; 0223; Case map*/
+    "\u0225",	/*0224; 0225; Case map*/
+    "\u0227",	/*0226; 0227; Case map*/
+    "\u0229",	/*0228; 0229; Case map*/
+    "\u022B",	/*022A; 022B; Case map*/
+    "\u022D",	/*022C; 022D; Case map*/
+    "\u022F",	/*022E; 022F; Case map*/
+    "\u0231",	/*0230; 0231; Case map*/
+    "\u0233",	/*0232; 0233; Case map*/
+    "\u03B9",	/*0345; 03B9; Case map*/
+    "\u03AC",	/*0386; 03AC; Case map*/
+    "\u03AD",	/*0388; 03AD; Case map*/
+    "\u03AE",	/*0389; 03AE; Case map*/
+    "\u03AF",	/*038A; 03AF; Case map*/
+    "\u03CC",	/*038C; 03CC; Case map*/
+    "\u03CD",	/*038E; 03CD; Case map*/
+    "\u03CE",	/*038F; 03CE; Case map*/
+    "\u03B9\u0308\u0301",	/*0390; 03B9 0308 0301; Case map*/
+    "\u03B1",	/*0391; 03B1; Case map*/
+    "\u03B2",	/*0392; 03B2; Case map*/
+    "\u03B3",	/*0393; 03B3; Case map*/
+    "\u03B4",	/*0394; 03B4; Case map*/
+    "\u03B5",	/*0395; 03B5; Case map*/
+    "\u03B6",	/*0396; 03B6; Case map*/
+    "\u03B7",	/*0397; 03B7; Case map*/
+    "\u03B8",	/*0398; 03B8; Case map*/
+    "\u03B9",	/*0399; 03B9; Case map*/
+    "\u03BA",	/*039A; 03BA; Case map*/
+    "\u03BB",	/*039B; 03BB; Case map*/
+    "\u03BC",	/*039C; 03BC; Case map*/
+    "\u03BD",	/*039D; 03BD; Case map*/
+    "\u03BE",	/*039E; 03BE; Case map*/
+    "\u03BF",	/*039F; 03BF; Case map*/
+    "\u03C0",	/*03A0; 03C0; Case map*/
+    "\u03C1",	/*03A1; 03C1; Case map*/
+    "\u03C3",	/*03A3; 03C3; Case map*/
+    "\u03C4",	/*03A4; 03C4; Case map*/
+    "\u03C5",	/*03A5; 03C5; Case map*/
+    "\u03C6",	/*03A6; 03C6; Case map*/
+    "\u03C7",	/*03A7; 03C7; Case map*/
+    "\u03C8",	/*03A8; 03C8; Case map*/
+    "\u03C9",	/*03A9; 03C9; Case map*/
+    "\u03CA",	/*03AA; 03CA; Case map*/
+    "\u03CB",	/*03AB; 03CB; Case map*/
+    "\u03C5\u0308\u0301",	/*03B0; 03C5 0308 0301; Case map*/
+    "\u03C3",	/*03C2; 03C3; Case map*/
+    "\u03B2",	/*03D0; 03B2; Case map*/
+    "\u03B8",	/*03D1; 03B8; Case map*/
+    "\u03C6",	/*03D5; 03C6; Case map*/
+    "\u03C0",	/*03D6; 03C0; Case map*/
+    "\u03D9",	/*03D8; 03D9; Case map*/
+    "\u03DB",	/*03DA; 03DB; Case map*/
+    "\u03DD",	/*03DC; 03DD; Case map*/
+    "\u03DF",	/*03DE; 03DF; Case map*/
+    "\u03E1",	/*03E0; 03E1; Case map*/
+    "\u03E3",	/*03E2; 03E3; Case map*/
+    "\u03E5",	/*03E4; 03E5; Case map*/
+    "\u03E7",	/*03E6; 03E7; Case map*/
+    "\u03E9",	/*03E8; 03E9; Case map*/
+    "\u03EB",	/*03EA; 03EB; Case map*/
+    "\u03ED",	/*03EC; 03ED; Case map*/
+    "\u03EF",	/*03EE; 03EF; Case map*/
+    "\u03BA",	/*03F0; 03BA; Case map*/
+    "\u03C1",	/*03F1; 03C1; Case map*/
+    "\u03C3",	/*03F2; 03C3; Case map*/
+    "\u03B8",	/*03F4; 03B8; Case map*/
+    "\u03B5",	/*03F5; 03B5; Case map*/
+    "\u0450",	/*0400; 0450; Case map*/
+    "\u0451",	/*0401; 0451; Case map*/
+    "\u0452",	/*0402; 0452; Case map*/
+    "\u0453",	/*0403; 0453; Case map*/
+    "\u0454",	/*0404; 0454; Case map*/
+    "\u0455",	/*0405; 0455; Case map*/
+    "\u0456",	/*0406; 0456; Case map*/
+    "\u0457",	/*0407; 0457; Case map*/
+    "\u0458",	/*0408; 0458; Case map*/
+    "\u0459",	/*0409; 0459; Case map*/
+    "\u045A",	/*040A; 045A; Case map*/
+    "\u045B",	/*040B; 045B; Case map*/
+    "\u045C",	/*040C; 045C; Case map*/
+    "\u045D",	/*040D; 045D; Case map*/
+    "\u045E",	/*040E; 045E; Case map*/
+    "\u045F",	/*040F; 045F; Case map*/
+    "\u0430",	/*0410; 0430; Case map*/
+    "\u0431",	/*0411; 0431; Case map*/
+    "\u0432",	/*0412; 0432; Case map*/
+    "\u0433",	/*0413; 0433; Case map*/
+    "\u0434",	/*0414; 0434; Case map*/
+    "\u0435",	/*0415; 0435; Case map*/
+    "\u0436",	/*0416; 0436; Case map*/
+    "\u0437",	/*0417; 0437; Case map*/
+    "\u0438",	/*0418; 0438; Case map*/
+    "\u0439",	/*0419; 0439; Case map*/
+    "\u043A",	/*041A; 043A; Case map*/
+    "\u043B",	/*041B; 043B; Case map*/
+    "\u043C",	/*041C; 043C; Case map*/
+    "\u043D",	/*041D; 043D; Case map*/
+    "\u043E",	/*041E; 043E; Case map*/
+    "\u043F",	/*041F; 043F; Case map*/
+    "\u0440",	/*0420; 0440; Case map*/
+    "\u0441",	/*0421; 0441; Case map*/
+    "\u0442",	/*0422; 0442; Case map*/
+    "\u0443",	/*0423; 0443; Case map*/
+    "\u0444",	/*0424; 0444; Case map*/
+    "\u0445",	/*0425; 0445; Case map*/
+    "\u0446",	/*0426; 0446; Case map*/
+    "\u0447",	/*0427; 0447; Case map*/
+    "\u0448",	/*0428; 0448; Case map*/
+    "\u0449",	/*0429; 0449; Case map*/
+    "\u044A",	/*042A; 044A; Case map*/
+    "\u044B",	/*042B; 044B; Case map*/
+    "\u044C",	/*042C; 044C; Case map*/
+    "\u044D",	/*042D; 044D; Case map*/
+    "\u044E",	/*042E; 044E; Case map*/
+    "\u044F",	/*042F; 044F; Case map*/
+    "\u0461",	/*0460; 0461; Case map*/
+    "\u0463",	/*0462; 0463; Case map*/
+    "\u0465",	/*0464; 0465; Case map*/
+    "\u0467",	/*0466; 0467; Case map*/
+    "\u0469",	/*0468; 0469; Case map*/
+    "\u046B",	/*046A; 046B; Case map*/
+    "\u046D",	/*046C; 046D; Case map*/
+    "\u046F",	/*046E; 046F; Case map*/
+    "\u0471",	/*0470; 0471; Case map*/
+    "\u0473",	/*0472; 0473; Case map*/
+    "\u0475",	/*0474; 0475; Case map*/
+    "\u0477",	/*0476; 0477; Case map*/
+    "\u0479",	/*0478; 0479; Case map*/
+    "\u047B",	/*047A; 047B; Case map*/
+    "\u047D",	/*047C; 047D; Case map*/
+    "\u047F",	/*047E; 047F; Case map*/
+    "\u0481",	/*0480; 0481; Case map*/
+    "\u048B",	/*048A; 048B; Case map*/
+    "\u048D",	/*048C; 048D; Case map*/
+    "\u048F",	/*048E; 048F; Case map*/
+    "\u0491",	/*0490; 0491; Case map*/
+    "\u0493",	/*0492; 0493; Case map*/
+    "\u0495",	/*0494; 0495; Case map*/
+    "\u0497",	/*0496; 0497; Case map*/
+    "\u0499",	/*0498; 0499; Case map*/
+    "\u049B",	/*049A; 049B; Case map*/
+    "\u049D",	/*049C; 049D; Case map*/
+    "\u049F",	/*049E; 049F; Case map*/
+    "\u04A1",	/*04A0; 04A1; Case map*/
+    "\u04A3",	/*04A2; 04A3; Case map*/
+    "\u04A5",	/*04A4; 04A5; Case map*/
+    "\u04A7",	/*04A6; 04A7; Case map*/
+    "\u04A9",	/*04A8; 04A9; Case map*/
+    "\u04AB",	/*04AA; 04AB; Case map*/
+    "\u04AD",	/*04AC; 04AD; Case map*/
+    "\u04AF",	/*04AE; 04AF; Case map*/
+    "\u04B1",	/*04B0; 04B1; Case map*/
+    "\u04B3",	/*04B2; 04B3; Case map*/
+    "\u04B5",	/*04B4; 04B5; Case map*/
+    "\u04B7",	/*04B6; 04B7; Case map*/
+    "\u04B9",	/*04B8; 04B9; Case map*/
+    "\u04BB",	/*04BA; 04BB; Case map*/
+    "\u04BD",	/*04BC; 04BD; Case map*/
+    "\u04BF",	/*04BE; 04BF; Case map*/
+    "\u04C2",	/*04C1; 04C2; Case map*/
+    "\u04C4",	/*04C3; 04C4; Case map*/
+    "\u04C6",	/*04C5; 04C6; Case map*/
+    "\u04C8",	/*04C7; 04C8; Case map*/
+    "\u04CA",	/*04C9; 04CA; Case map*/
+    "\u04CC",	/*04CB; 04CC; Case map*/
+    "\u04CE",	/*04CD; 04CE; Case map*/
+    "\u04D1",	/*04D0; 04D1; Case map*/
+    "\u04D3",	/*04D2; 04D3; Case map*/
+    "\u04D5",	/*04D4; 04D5; Case map*/
+    "\u04D7",	/*04D6; 04D7; Case map*/
+    "\u04D9",	/*04D8; 04D9; Case map*/
+    "\u04DB",	/*04DA; 04DB; Case map*/
+    "\u04DD",	/*04DC; 04DD; Case map*/
+    "\u04DF",	/*04DE; 04DF; Case map*/
+    "\u04E1",	/*04E0; 04E1; Case map*/
+    "\u04E3",	/*04E2; 04E3; Case map*/
+    "\u04E5",	/*04E4; 04E5; Case map*/
+    "\u04E7",	/*04E6; 04E7; Case map*/
+    "\u04E9",	/*04E8; 04E9; Case map*/
+    "\u04EB",	/*04EA; 04EB; Case map*/
+    "\u04ED",	/*04EC; 04ED; Case map*/
+    "\u04EF",	/*04EE; 04EF; Case map*/
+    "\u04F1",	/*04F0; 04F1; Case map*/
+    "\u04F3",	/*04F2; 04F3; Case map*/
+    "\u04F5",	/*04F4; 04F5; Case map*/
+    "\u04F9",	/*04F8; 04F9; Case map*/
+    "\u0501",	/*0500; 0501; Case map*/
+    "\u0503",	/*0502; 0503; Case map*/
+    "\u0505",	/*0504; 0505; Case map*/
+    "\u0507",	/*0506; 0507; Case map*/
+    "\u0509",	/*0508; 0509; Case map*/
+    "\u050B",	/*050A; 050B; Case map*/
+    "\u050D",	/*050C; 050D; Case map*/
+    "\u050F",	/*050E; 050F; Case map*/
+    "\u0561",	/*0531; 0561; Case map*/
+    "\u0562",	/*0532; 0562; Case map*/
+    "\u0563",	/*0533; 0563; Case map*/
+    "\u0564",	/*0534; 0564; Case map*/
+    "\u0565",	/*0535; 0565; Case map*/
+    "\u0566",	/*0536; 0566; Case map*/
+    "\u0567",	/*0537; 0567; Case map*/
+    "\u0568",	/*0538; 0568; Case map*/
+    "\u0569",	/*0539; 0569; Case map*/
+    "\u056A",	/*053A; 056A; Case map*/
+    "\u056B",	/*053B; 056B; Case map*/
+    "\u056C",	/*053C; 056C; Case map*/
+    "\u056D",	/*053D; 056D; Case map*/
+    "\u056E",	/*053E; 056E; Case map*/
+    "\u056F",	/*053F; 056F; Case map*/
+    "\u0570",	/*0540; 0570; Case map*/
+    "\u0571",	/*0541; 0571; Case map*/
+    "\u0572",	/*0542; 0572; Case map*/
+    "\u0573",	/*0543; 0573; Case map*/
+    "\u0574",	/*0544; 0574; Case map*/
+    "\u0575",	/*0545; 0575; Case map*/
+    "\u0576",	/*0546; 0576; Case map*/
+    "\u0577",	/*0547; 0577; Case map*/
+    "\u0578",	/*0548; 0578; Case map*/
+    "\u0579",	/*0549; 0579; Case map*/
+    "\u057A",	/*054A; 057A; Case map*/
+    "\u057B",	/*054B; 057B; Case map*/
+    "\u057C",	/*054C; 057C; Case map*/
+    "\u057D",	/*054D; 057D; Case map*/
+    "\u057E",	/*054E; 057E; Case map*/
+    "\u057F",	/*054F; 057F; Case map*/
+    "\u0580",	/*0550; 0580; Case map*/
+    "\u0581",	/*0551; 0581; Case map*/
+    "\u0582",	/*0552; 0582; Case map*/
+    "\u0583",	/*0553; 0583; Case map*/
+    "\u0584",	/*0554; 0584; Case map*/
+    "\u0585",	/*0555; 0585; Case map*/
+    "\u0586",	/*0556; 0586; Case map*/
+    "\u0565\u0582",	/*0587; 0565 0582; Case map*/
+    "\u1E01",	/*1E00; 1E01; Case map*/
+    "\u1E03",	/*1E02; 1E03; Case map*/
+    "\u1E05",	/*1E04; 1E05; Case map*/
+    "\u1E07",	/*1E06; 1E07; Case map*/
+    "\u1E09",	/*1E08; 1E09; Case map*/
+    "\u1E0B",	/*1E0A; 1E0B; Case map*/
+    "\u1E0D",	/*1E0C; 1E0D; Case map*/
+    "\u1E0F",	/*1E0E; 1E0F; Case map*/
+    "\u1E11",	/*1E10; 1E11; Case map*/
+    "\u1E13",	/*1E12; 1E13; Case map*/
+    "\u1E15",	/*1E14; 1E15; Case map*/
+    "\u1E17",	/*1E16; 1E17; Case map*/
+    "\u1E19",	/*1E18; 1E19; Case map*/
+    "\u1E1B",	/*1E1A; 1E1B; Case map*/
+    "\u1E1D",	/*1E1C; 1E1D; Case map*/
+    "\u1E1F",	/*1E1E; 1E1F; Case map*/
+    "\u1E21",	/*1E20; 1E21; Case map*/
+    "\u1E23",	/*1E22; 1E23; Case map*/
+    "\u1E25",	/*1E24; 1E25; Case map*/
+    "\u1E27",	/*1E26; 1E27; Case map*/
+    "\u1E29",	/*1E28; 1E29; Case map*/
+    "\u1E2B",	/*1E2A; 1E2B; Case map*/
+    "\u1E2D",	/*1E2C; 1E2D; Case map*/
+    "\u1E2F",	/*1E2E; 1E2F; Case map*/
+    "\u1E31",	/*1E30; 1E31; Case map*/
+    "\u1E33",	/*1E32; 1E33; Case map*/
+    "\u1E35",	/*1E34; 1E35; Case map*/
+    "\u1E37",	/*1E36; 1E37; Case map*/
+    "\u1E39",	/*1E38; 1E39; Case map*/
+    "\u1E3B",	/*1E3A; 1E3B; Case map*/
+    "\u1E3D",	/*1E3C; 1E3D; Case map*/
+    "\u1E3F",	/*1E3E; 1E3F; Case map*/
+    "\u1E41",	/*1E40; 1E41; Case map*/
+    "\u1E43",	/*1E42; 1E43; Case map*/
+    "\u1E45",	/*1E44; 1E45; Case map*/
+    "\u1E47",	/*1E46; 1E47; Case map*/
+    "\u1E49",	/*1E48; 1E49; Case map*/
+    "\u1E4B",	/*1E4A; 1E4B; Case map*/
+    "\u1E4D",	/*1E4C; 1E4D; Case map*/
+    "\u1E4F",	/*1E4E; 1E4F; Case map*/
+    "\u1E51",	/*1E50; 1E51; Case map*/
+    "\u1E53",	/*1E52; 1E53; Case map*/
+    "\u1E55",	/*1E54; 1E55; Case map*/
+    "\u1E57",	/*1E56; 1E57; Case map*/
+    "\u1E59",	/*1E58; 1E59; Case map*/
+    "\u1E5B",	/*1E5A; 1E5B; Case map*/
+    "\u1E5D",	/*1E5C; 1E5D; Case map*/
+    "\u1E5F",	/*1E5E; 1E5F; Case map*/
+    "\u1E61",	/*1E60; 1E61; Case map*/
+    "\u1E63",	/*1E62; 1E63; Case map*/
+    "\u1E65",	/*1E64; 1E65; Case map*/
+    "\u1E67",	/*1E66; 1E67; Case map*/
+    "\u1E69",	/*1E68; 1E69; Case map*/
+    "\u1E6B",	/*1E6A; 1E6B; Case map*/
+    "\u1E6D",	/*1E6C; 1E6D; Case map*/
+    "\u1E6F",	/*1E6E; 1E6F; Case map*/
+    "\u1E71",	/*1E70; 1E71; Case map*/
+    "\u1E73",	/*1E72; 1E73; Case map*/
+    "\u1E75",	/*1E74; 1E75; Case map*/
+    "\u1E77",	/*1E76; 1E77; Case map*/
+    "\u1E79",	/*1E78; 1E79; Case map*/
+    "\u1E7B",	/*1E7A; 1E7B; Case map*/
+    "\u1E7D",	/*1E7C; 1E7D; Case map*/
+    "\u1E7F",	/*1E7E; 1E7F; Case map*/
+    "\u1E81",	/*1E80; 1E81; Case map*/
+    "\u1E83",	/*1E82; 1E83; Case map*/
+    "\u1E85",	/*1E84; 1E85; Case map*/
+    "\u1E87",	/*1E86; 1E87; Case map*/
+    "\u1E89",	/*1E88; 1E89; Case map*/
+    "\u1E8B",	/*1E8A; 1E8B; Case map*/
+    "\u1E8D",	/*1E8C; 1E8D; Case map*/
+    "\u1E8F",	/*1E8E; 1E8F; Case map*/
+    "\u1E91",	/*1E90; 1E91; Case map*/
+    "\u1E93",	/*1E92; 1E93; Case map*/
+    "\u1E95",	/*1E94; 1E95; Case map*/
+    "\u0068\u0331",	/*1E96; 0068 0331; Case map*/
+    "\u0074\u0308",	/*1E97; 0074 0308; Case map*/
+    "\u0077\u030A",	/*1E98; 0077 030A; Case map*/
+    "\u0079\u030A",	/*1E99; 0079 030A; Case map*/
+    "\u0061\u02BE",	/*1E9A; 0061 02BE; Case map*/
+    "\u1E61",	/*1E9B; 1E61; Case map*/
+    "\u1EA1",	/*1EA0; 1EA1; Case map*/
+    "\u1EA3",	/*1EA2; 1EA3; Case map*/
+    "\u1EA5",	/*1EA4; 1EA5; Case map*/
+    "\u1EA7",	/*1EA6; 1EA7; Case map*/
+    "\u1EA9",	/*1EA8; 1EA9; Case map*/
+    "\u1EAB",	/*1EAA; 1EAB; Case map*/
+    "\u1EAD",	/*1EAC; 1EAD; Case map*/
+    "\u1EAF",	/*1EAE; 1EAF; Case map*/
+    "\u1EB1",	/*1EB0; 1EB1; Case map*/
+    "\u1EB3",	/*1EB2; 1EB3; Case map*/
+    "\u1EB5",	/*1EB4; 1EB5; Case map*/
+    "\u1EB7",	/*1EB6; 1EB7; Case map*/
+    "\u1EB9",	/*1EB8; 1EB9; Case map*/
+    "\u1EBB",	/*1EBA; 1EBB; Case map*/
+    "\u1EBD",	/*1EBC; 1EBD; Case map*/
+    "\u1EBF",	/*1EBE; 1EBF; Case map*/
+    "\u1EC1",	/*1EC0; 1EC1; Case map*/
+    "\u1EC3",	/*1EC2; 1EC3; Case map*/
+    "\u1EC5",	/*1EC4; 1EC5; Case map*/
+    "\u1EC7",	/*1EC6; 1EC7; Case map*/
+    "\u1EC9",	/*1EC8; 1EC9; Case map*/
+    "\u1ECB",	/*1ECA; 1ECB; Case map*/
+    "\u1ECD",	/*1ECC; 1ECD; Case map*/
+    "\u1ECF",	/*1ECE; 1ECF; Case map*/
+    "\u1ED1",	/*1ED0; 1ED1; Case map*/
+    "\u1ED3",	/*1ED2; 1ED3; Case map*/
+    "\u1ED5",	/*1ED4; 1ED5; Case map*/
+    "\u1ED7",	/*1ED6; 1ED7; Case map*/
+    "\u1ED9",	/*1ED8; 1ED9; Case map*/
+    "\u1EDB",	/*1EDA; 1EDB; Case map*/
+    "\u1EDD",	/*1EDC; 1EDD; Case map*/
+    "\u1EDF",	/*1EDE; 1EDF; Case map*/
+    "\u1EE1",	/*1EE0; 1EE1; Case map*/
+    "\u1EE3",	/*1EE2; 1EE3; Case map*/
+    "\u1EE5",	/*1EE4; 1EE5; Case map*/
+    "\u1EE7",	/*1EE6; 1EE7; Case map*/
+    "\u1EE9",	/*1EE8; 1EE9; Case map*/
+    "\u1EEB",	/*1EEA; 1EEB; Case map*/
+    "\u1EED",	/*1EEC; 1EED; Case map*/
+    "\u1EEF",	/*1EEE; 1EEF; Case map*/
+    "\u1EF1",	/*1EF0; 1EF1; Case map*/
+    "\u1EF3",	/*1EF2; 1EF3; Case map*/
+    "\u1EF5",	/*1EF4; 1EF5; Case map*/
+    "\u1EF7",	/*1EF6; 1EF7; Case map*/
+    "\u1EF9",	/*1EF8; 1EF9; Case map*/
+    "\u1F00",	/*1F08; 1F00; Case map*/
+    "\u1F01",	/*1F09; 1F01; Case map*/
+    "\u1F02",	/*1F0A; 1F02; Case map*/
+    "\u1F03",	/*1F0B; 1F03; Case map*/
+    "\u1F04",	/*1F0C; 1F04; Case map*/
+    "\u1F05",	/*1F0D; 1F05; Case map*/
+    "\u1F06",	/*1F0E; 1F06; Case map*/
+    "\u1F07",	/*1F0F; 1F07; Case map*/
+    "\u1F10",	/*1F18; 1F10; Case map*/
+    "\u1F11",	/*1F19; 1F11; Case map*/
+    "\u1F12",	/*1F1A; 1F12; Case map*/
+    "\u1F13",	/*1F1B; 1F13; Case map*/
+    "\u1F14",	/*1F1C; 1F14; Case map*/
+    "\u1F15",	/*1F1D; 1F15; Case map*/
+    "\u1F20",	/*1F28; 1F20; Case map*/
+    "\u1F21",	/*1F29; 1F21; Case map*/
+    "\u1F22",	/*1F2A; 1F22; Case map*/
+    "\u1F23",	/*1F2B; 1F23; Case map*/
+    "\u1F24",	/*1F2C; 1F24; Case map*/
+    "\u1F25",	/*1F2D; 1F25; Case map*/
+    "\u1F26",	/*1F2E; 1F26; Case map*/
+    "\u1F27",	/*1F2F; 1F27; Case map*/
+    "\u1F30",	/*1F38; 1F30; Case map*/
+    "\u1F31",	/*1F39; 1F31; Case map*/
+    "\u1F32",	/*1F3A; 1F32; Case map*/
+    "\u1F33",	/*1F3B; 1F33; Case map*/
+    "\u1F34",	/*1F3C; 1F34; Case map*/
+    "\u1F35",	/*1F3D; 1F35; Case map*/
+    "\u1F36",	/*1F3E; 1F36; Case map*/
+    "\u1F37",	/*1F3F; 1F37; Case map*/
+    "\u1F40",	/*1F48; 1F40; Case map*/
+    "\u1F41",	/*1F49; 1F41; Case map*/
+    "\u1F42",	/*1F4A; 1F42; Case map*/
+    "\u1F43",	/*1F4B; 1F43; Case map*/
+    "\u1F44",	/*1F4C; 1F44; Case map*/
+    "\u1F45",	/*1F4D; 1F45; Case map*/
+    "\u03C5\u0313",	/*1F50; 03C5 0313; Case map*/
+    "\u03C5\u0313\u0300",	/*1F52; 03C5 0313 0300; Case map*/
+    "\u03C5\u0313\u0301",	/*1F54; 03C5 0313 0301; Case map*/
+    "\u03C5\u0313\u0342",	/*1F56; 03C5 0313 0342; Case map*/
+    "\u1F51",	/*1F59; 1F51; Case map*/
+    "\u1F53",	/*1F5B; 1F53; Case map*/
+    "\u1F55",	/*1F5D; 1F55; Case map*/
+    "\u1F57",	/*1F5F; 1F57; Case map*/
+    "\u1F60",	/*1F68; 1F60; Case map*/
+    "\u1F61",	/*1F69; 1F61; Case map*/
+    "\u1F62",	/*1F6A; 1F62; Case map*/
+    "\u1F63",	/*1F6B; 1F63; Case map*/
+    "\u1F64",	/*1F6C; 1F64; Case map*/
+    "\u1F65",	/*1F6D; 1F65; Case map*/
+    "\u1F66",	/*1F6E; 1F66; Case map*/
+    "\u1F67",	/*1F6F; 1F67; Case map*/
+    "\u1F00\u03B9",	/*1F80; 1F00 03B9; Case map*/
+    "\u1F01\u03B9",	/*1F81; 1F01 03B9; Case map*/
+    "\u1F02\u03B9",	/*1F82; 1F02 03B9; Case map*/
+    "\u1F03\u03B9",	/*1F83; 1F03 03B9; Case map*/
+    "\u1F04\u03B9",	/*1F84; 1F04 03B9; Case map*/
+    "\u1F05\u03B9",	/*1F85; 1F05 03B9; Case map*/
+    "\u1F06\u03B9",	/*1F86; 1F06 03B9; Case map*/
+    "\u1F07\u03B9",	/*1F87; 1F07 03B9; Case map*/
+    "\u1F00\u03B9",	/*1F88; 1F00 03B9; Case map*/
+    "\u1F01\u03B9",	/*1F89; 1F01 03B9; Case map*/
+    "\u1F02\u03B9",	/*1F8A; 1F02 03B9; Case map*/
+    "\u1F03\u03B9",	/*1F8B; 1F03 03B9; Case map*/
+    "\u1F04\u03B9",	/*1F8C; 1F04 03B9; Case map*/
+    "\u1F05\u03B9",	/*1F8D; 1F05 03B9; Case map*/
+    "\u1F06\u03B9",	/*1F8E; 1F06 03B9; Case map*/
+    "\u1F07\u03B9",	/*1F8F; 1F07 03B9; Case map*/
+    "\u1F20\u03B9",	/*1F90; 1F20 03B9; Case map*/
+    "\u1F21\u03B9",	/*1F91; 1F21 03B9; Case map*/
+    "\u1F22\u03B9",	/*1F92; 1F22 03B9; Case map*/
+    "\u1F23\u03B9",	/*1F93; 1F23 03B9; Case map*/
+    "\u1F24\u03B9",	/*1F94; 1F24 03B9; Case map*/
+    "\u1F25\u03B9",	/*1F95; 1F25 03B9; Case map*/
+    "\u1F26\u03B9",	/*1F96; 1F26 03B9; Case map*/
+    "\u1F27\u03B9",	/*1F97; 1F27 03B9; Case map*/
+    "\u1F20\u03B9",	/*1F98; 1F20 03B9; Case map*/
+    "\u1F21\u03B9",	/*1F99; 1F21 03B9; Case map*/
+    "\u1F22\u03B9",	/*1F9A; 1F22 03B9; Case map*/
+    "\u1F23\u03B9",	/*1F9B; 1F23 03B9; Case map*/
+    "\u1F24\u03B9",	/*1F9C; 1F24 03B9; Case map*/
+    "\u1F25\u03B9",	/*1F9D; 1F25 03B9; Case map*/
+    "\u1F26\u03B9",	/*1F9E; 1F26 03B9; Case map*/
+    "\u1F27\u03B9",	/*1F9F; 1F27 03B9; Case map*/
+    "\u1F60\u03B9",	/*1FA0; 1F60 03B9; Case map*/
+    "\u1F61\u03B9",	/*1FA1; 1F61 03B9; Case map*/
+    "\u1F62\u03B9",	/*1FA2; 1F62 03B9; Case map*/
+    "\u1F63\u03B9",	/*1FA3; 1F63 03B9; Case map*/
+    "\u1F64\u03B9",	/*1FA4; 1F64 03B9; Case map*/
+    "\u1F65\u03B9",	/*1FA5; 1F65 03B9; Case map*/
+    "\u1F66\u03B9",	/*1FA6; 1F66 03B9; Case map*/
+    "\u1F67\u03B9",	/*1FA7; 1F67 03B9; Case map*/
+    "\u1F60\u03B9",	/*1FA8; 1F60 03B9; Case map*/
+    "\u1F61\u03B9",	/*1FA9; 1F61 03B9; Case map*/
+    "\u1F62\u03B9",	/*1FAA; 1F62 03B9; Case map*/
+    "\u1F63\u03B9",	/*1FAB; 1F63 03B9; Case map*/
+    "\u1F64\u03B9",	/*1FAC; 1F64 03B9; Case map*/
+    "\u1F65\u03B9",	/*1FAD; 1F65 03B9; Case map*/
+    "\u1F66\u03B9",	/*1FAE; 1F66 03B9; Case map*/
+    "\u1F67\u03B9",	/*1FAF; 1F67 03B9; Case map*/
+    "\u1F70\u03B9",	/*1FB2; 1F70 03B9; Case map*/
+    "\u03B1\u03B9",	/*1FB3; 03B1 03B9; Case map*/
+    "\u03AC\u03B9",	/*1FB4; 03AC 03B9; Case map*/
+    "\u03B1\u0342",	/*1FB6; 03B1 0342; Case map*/
+    "\u03B1\u0342\u03B9",	/*1FB7; 03B1 0342 03B9; Case map*/
+    "\u1FB0",	/*1FB8; 1FB0; Case map*/
+    "\u1FB1",	/*1FB9; 1FB1; Case map*/
+    "\u1F70",	/*1FBA; 1F70; Case map*/
+    "\u1F71",	/*1FBB; 1F71; Case map*/
+    "\u03B1\u03B9",	/*1FBC; 03B1 03B9; Case map*/
+    "\u03B9",	/*1FBE; 03B9; Case map*/
+    "\u1F74\u03B9",	/*1FC2; 1F74 03B9; Case map*/
+    "\u03B7\u03B9",	/*1FC3; 03B7 03B9; Case map*/
+    "\u03AE\u03B9",	/*1FC4; 03AE 03B9; Case map*/
+    "\u03B7\u0342",	/*1FC6; 03B7 0342; Case map*/
+    "\u03B7\u0342\u03B9",	/*1FC7; 03B7 0342 03B9; Case map*/
+    "\u1F72",	/*1FC8; 1F72; Case map*/
+    "\u1F73",	/*1FC9; 1F73; Case map*/
+    "\u1F74",	/*1FCA; 1F74; Case map*/
+    "\u1F75",	/*1FCB; 1F75; Case map*/
+    "\u03B7\u03B9",	/*1FCC; 03B7 03B9; Case map*/
+    "\u03B9\u0308\u0300",	/*1FD2; 03B9 0308 0300; Case map*/
+    "\u03B9\u0308\u0301",	/*1FD3; 03B9 0308 0301; Case map*/
+    "\u03B9\u0342",	/*1FD6; 03B9 0342; Case map*/
+    "\u03B9\u0308\u0342",	/*1FD7; 03B9 0308 0342; Case map*/
+    "\u1FD0",	/*1FD8; 1FD0; Case map*/
+    "\u1FD1",	/*1FD9; 1FD1; Case map*/
+    "\u1F76",	/*1FDA; 1F76; Case map*/
+    "\u1F77",	/*1FDB; 1F77; Case map*/
+    "\u03C5\u0308\u0300",	/*1FE2; 03C5 0308 0300; Case map*/
+    "\u03C5\u0308\u0301",	/*1FE3; 03C5 0308 0301; Case map*/
+    "\u03C1\u0313",	/*1FE4; 03C1 0313; Case map*/
+    "\u03C5\u0342",	/*1FE6; 03C5 0342; Case map*/
+    "\u03C5\u0308\u0342",	/*1FE7; 03C5 0308 0342; Case map*/
+    "\u1FE0",	/*1FE8; 1FE0; Case map*/
+    "\u1FE1",	/*1FE9; 1FE1; Case map*/
+    "\u1F7A",	/*1FEA; 1F7A; Case map*/
+    "\u1F7B",	/*1FEB; 1F7B; Case map*/
+    "\u1FE5",	/*1FEC; 1FE5; Case map*/
+    "\u1F7C\u03B9",	/*1FF2; 1F7C 03B9; Case map*/
+    "\u03C9\u03B9",	/*1FF3; 03C9 03B9; Case map*/
+    "\u03CE\u03B9",	/*1FF4; 03CE 03B9; Case map*/
+    "\u03C9\u0342",	/*1FF6; 03C9 0342; Case map*/
+    "\u03C9\u0342\u03B9",	/*1FF7; 03C9 0342 03B9; Case map*/
+    "\u1F78",	/*1FF8; 1F78; Case map*/
+    "\u1F79",	/*1FF9; 1F79; Case map*/
+    "\u1F7C",	/*1FFA; 1F7C; Case map*/
+    "\u1F7D",	/*1FFB; 1F7D; Case map*/
+    "\u03C9\u03B9",	/*1FFC; 03C9 03B9; Case map*/
+    "\u03C9",	/*2126; 03C9; Case map*/
+    "\u006B",	/*212A; 006B; Case map*/
+    "\u00E5",	/*212B; 00E5; Case map*/
+    "\u2170",	/*2160; 2170; Case map*/
+    "\u2171",	/*2161; 2171; Case map*/
+    "\u2172",	/*2162; 2172; Case map*/
+    "\u2173",	/*2163; 2173; Case map*/
+    "\u2174",	/*2164; 2174; Case map*/
+    "\u2175",	/*2165; 2175; Case map*/
+    "\u2176",	/*2166; 2176; Case map*/
+    "\u2177",	/*2167; 2177; Case map*/
+    "\u2178",	/*2168; 2178; Case map*/
+    "\u2179",	/*2169; 2179; Case map*/
+    "\u217A",	/*216A; 217A; Case map*/
+    "\u217B",	/*216B; 217B; Case map*/
+    "\u217C",	/*216C; 217C; Case map*/
+    "\u217D",	/*216D; 217D; Case map*/
+    "\u217E",	/*216E; 217E; Case map*/
+    "\u217F",	/*216F; 217F; Case map*/
+    "\u24D0",	/*24B6; 24D0; Case map*/
+    "\u24D1",	/*24B7; 24D1; Case map*/
+    "\u24D2",	/*24B8; 24D2; Case map*/
+    "\u24D3",	/*24B9; 24D3; Case map*/
+    "\u24D4",	/*24BA; 24D4; Case map*/
+    "\u24D5",	/*24BB; 24D5; Case map*/
+    "\u24D6",	/*24BC; 24D6; Case map*/
+    "\u24D7",	/*24BD; 24D7; Case map*/
+    "\u24D8",	/*24BE; 24D8; Case map*/
+    "\u24D9",	/*24BF; 24D9; Case map*/
+    "\u24DA",	/*24C0; 24DA; Case map*/
+    "\u24DB",	/*24C1; 24DB; Case map*/
+    "\u24DC",	/*24C2; 24DC; Case map*/
+    "\u24DD",	/*24C3; 24DD; Case map*/
+    "\u24DE",	/*24C4; 24DE; Case map*/
+    "\u24DF",	/*24C5; 24DF; Case map*/
+    "\u24E0",	/*24C6; 24E0; Case map*/
+    "\u24E1",	/*24C7; 24E1; Case map*/
+    "\u24E2",	/*24C8; 24E2; Case map*/
+    "\u24E3",	/*24C9; 24E3; Case map*/
+    "\u24E4",	/*24CA; 24E4; Case map*/
+    "\u24E5",	/*24CB; 24E5; Case map*/
+    "\u24E6",	/*24CC; 24E6; Case map*/
+    "\u24E7",	/*24CD; 24E7; Case map*/
+    "\u24E8",	/*24CE; 24E8; Case map*/
+    "\u24E9",	/*24CF; 24E9; Case map*/
+    "\u0066\u0066",	/*FB00; 0066 0066; Case map*/
+    "\u0066\u0069",	/*FB01; 0066 0069; Case map*/
+    "\u0066\u006C",	/*FB02; 0066 006C; Case map*/
+    "\u0066\u0066\u0069",	/*FB03; 0066 0066 0069; Case map*/
+    "\u0066\u0066\u006C",	/*FB04; 0066 0066 006C; Case map*/
+    "\u0073\u0074",	/*FB05; 0073 0074; Case map*/
+    "\u0073\u0074",	/*FB06; 0073 0074; Case map*/
+    "\u0574\u0576",	/*FB13; 0574 0576; Case map*/
+    "\u0574\u0565",	/*FB14; 0574 0565; Case map*/
+    "\u0574\u056B",	/*FB15; 0574 056B; Case map*/
+    "\u057E\u0576",	/*FB16; 057E 0576; Case map*/
+    "\u0574\u056D",	/*FB17; 0574 056D; Case map*/
+    "\uFF41",	/*FF21; FF41; Case map*/
+    "\uFF42",	/*FF22; FF42; Case map*/
+    "\uFF43",	/*FF23; FF43; Case map*/
+    "\uFF44",	/*FF24; FF44; Case map*/
+    "\uFF45",	/*FF25; FF45; Case map*/
+    "\uFF46",	/*FF26; FF46; Case map*/
+    "\uFF47",	/*FF27; FF47; Case map*/
+    "\uFF48",	/*FF28; FF48; Case map*/
+    "\uFF49",	/*FF29; FF49; Case map*/
+    "\uFF4A",	/*FF2A; FF4A; Case map*/
+    "\uFF4B",	/*FF2B; FF4B; Case map*/
+    "\uFF4C",	/*FF2C; FF4C; Case map*/
+    "\uFF4D",	/*FF2D; FF4D; Case map*/
+    "\uFF4E",	/*FF2E; FF4E; Case map*/
+    "\uFF4F",	/*FF2F; FF4F; Case map*/
+    "\uFF50",	/*FF30; FF50; Case map*/
+    "\uFF51",	/*FF31; FF51; Case map*/
+    "\uFF52",	/*FF32; FF52; Case map*/
+    "\uFF53",	/*FF33; FF53; Case map*/
+    "\uFF54",	/*FF34; FF54; Case map*/
+    "\uFF55",	/*FF35; FF55; Case map*/
+    "\uFF56",	/*FF36; FF56; Case map*/
+    "\uFF57",	/*FF37; FF57; Case map*/
+    "\uFF58",	/*FF38; FF58; Case map*/
+    "\uFF59",	/*FF39; FF59; Case map*/
+    "\uFF5A",	/*FF3A; FF5A; Case map*/
+  };
+
+        public static char[] C11 = new char[] {
+    '\u0020',	/* 0020; SPACE */
+  };
+
+        public static char[] C12 = new char[] {
+    '\u00A0',	/* 00A0; NO-BREAK SPACE */
+    '\u1680',	/* 1680; OGHAM SPACE MARK */
+    '\u2000',	/* 2000; EN QUAD */
+    '\u2001',	/* 2001; EM QUAD */
+    '\u2002',	/* 2002; EN SPACE */
+    '\u2003',	/* 2003; EM SPACE */
+    '\u2004',	/* 2004; THREE-PER-EM SPACE */
+    '\u2005',	/* 2005; FOUR-PER-EM SPACE */
+    '\u2006',	/* 2006; SIX-PER-EM SPACE */
+    '\u2007',	/* 2007; FIGURE SPACE */
+    '\u2008',	/* 2008; PUNCTUATION SPACE */
+    '\u2009',	/* 2009; THIN SPACE */
+    '\u200A',	/* 200A; HAIR SPACE */
+    '\u200B',	/* 200B; ZERO WIDTH SPACE */
+    '\u202F',	/* 202F; NARROW NO-BREAK SPACE */
+    '\u205F',	/* 205F; MEDIUM MATHEMATICAL SPACE */
+    '\u3000',	/* 3000; IDEOGRAPHIC SPACE */
+  };
+
+        public static char[][] C21 = new char[][] {
+    new char[] { '\u0000', '\u001F' },	/* 0000-001F; [CONTROL CHARACTERS] */
+    new char[] { '\u007F' },	/* 007F; DELETE */
+  };
+
+        public static char[][] C22 = new char[][] {
+    new char[] { '\u0080', '\u009F' },	/* 0080-009F; [CONTROL CHARACTERS] */
+    new char[] { '\u06DD' },	/* 06DD; ARABIC END OF AYAH */
+    new char[] { '\u070F' },	/* 070F; SYRIAC ABBREVIATION MARK */
+    new char[] { '\u180E' },	/* 180E; MONGOLIAN VOWEL SEPARATOR */
+    new char[] { '\u200C' },	/* 200C; ZERO WIDTH NON-JOINER */
+    new char[] { '\u200D' },	/* 200D; ZERO WIDTH JOINER */
+    new char[] { '\u2028' },	/* 2028; LINE SEPARATOR */
+    new char[] { '\u2029' },	/* 2029; PARAGRAPH SEPARATOR */
+    new char[] { '\u2060' },	/* 2060; WORD JOINER */
+    new char[] { '\u2061' },	/* 2061; FUNCTION APPLICATION */
+    new char[] { '\u2062' },	/* 2062; INVISIBLE TIMES */
+    new char[] { '\u2063' },	/* 2063; INVISIBLE SEPARATOR */
+    new char[] { '\u206A', '\u206F' },	/* 206A-206F; [CONTROL CHARACTERS] */
+    new char[] { '\uFEFF' },	/* FEFF; ZERO WIDTH NO-BREAK SPACE */
+    new char[] { '\uFFF9', '\uFFFC' },	/* FFF9-FFFC; [CONTROL CHARACTERS] */
+  };
+
+        public static char[][] C3 = new char[][] {
+    new char[] { '\uE000', '\uF8FF' },	/* E000-F8FF; [PRIVATE USE, PLANE 0] */
+  };
+
+        public static char[][] C4 = new char[][] {
+    new char[] { '\uFDD0', '\uFDEF' },	/* FDD0-FDEF; [NONCHARACTER CODE POINTS] */
+    new char[] { '\uFFFE', '\uFFFF' },	/* FFFE-FFFF; [NONCHARACTER CODE POINTS] */
+  };
+
+        public static char[][] C5 = new char[][] {
+    new char[] { '\uD800', '\uDFFF' },	/* D800-DFFF; [SURROGATE CODES] */
+  };
+
+        public static char[][] C6 = new char[][] {
+    new char[] { '\uFFF9' },	/* FFF9; INTERLINEAR ANNOTATION ANCHOR */
+    new char[] { '\uFFFA' },	/* FFFA; INTERLINEAR ANNOTATION SEPARATOR */
+    new char[] { '\uFFFB' },	/* FFFB; INTERLINEAR ANNOTATION TERMINATOR */
+    new char[] { '\uFFFC' },	/* FFFC; OBJECT REPLACEMENT CHARACTER */
+    new char[] { '\uFFFD' },	/* FFFD; REPLACEMENT CHARACTER */
+  };
+
+        public static char[][] C7 = new char[][] {
+    new char[] { '\u2FF0', '\u2FFB' },	/* 2FF0-2FFB; [IDEOGRAPHIC DESCRIPTION CHARACTERS] */
+  };
+
+        public static char[][] C8 = new char[][] {
+    new char[] { '\u0340' },	/* 0340; COMBINING GRAVE TONE MARK */
+    new char[] { '\u0341' },	/* 0341; COMBINING ACUTE TONE MARK */
+    new char[] { '\u200E' },	/* 200E; LEFT-TO-RIGHT MARK */
+    new char[] { '\u200F' },	/* 200F; RIGHT-TO-LEFT MARK */
+    new char[] { '\u202A' },	/* 202A; LEFT-TO-RIGHT EMBEDDING */
+    new char[] { '\u202B' },	/* 202B; RIGHT-TO-LEFT EMBEDDING */
+    new char[] { '\u202C' },	/* 202C; POP DIRECTIONAL FORMATTING */
+    new char[] { '\u202D' },	/* 202D; LEFT-TO-RIGHT OVERRIDE */
+    new char[] { '\u202E' },	/* 202E; RIGHT-TO-LEFT OVERRIDE */
+    new char[] { '\u206A' },	/* 206A; INHIBIT SYMMETRIC SWAPPING */
+    new char[] { '\u206B' },	/* 206B; ACTIVATE SYMMETRIC SWAPPING */
+    new char[] { '\u206C' },	/* 206C; INHIBIT ARABIC FORM SHAPING */
+    new char[] { '\u206D' },	/* 206D; ACTIVATE ARABIC FORM SHAPING */
+    new char[] { '\u206E' },	/* 206E; NATIONAL DIGIT SHAPES */
+    new char[] { '\u206F' },	/* 206F; NOMINAL DIGIT SHAPES */
+  };
+
+        public static char[][] D1 = new char[][] {
+    new char[] { '\u05BE' },	/* 05BE */
+    new char[] { '\u05C0' },	/* 05C0 */
+    new char[] { '\u05C3' },	/* 05C3 */
+    new char[] { '\u05D0', '\u05EA' },	/* 05D0-05EA */
+    new char[] { '\u05F0', '\u05F4' },	/* 05F0-05F4 */
+    new char[] { '\u061B' },	/* 061B */
+    new char[] { '\u061F' },	/* 061F */
+    new char[] { '\u0621', '\u063A' },	/* 0621-063A */
+    new char[] { '\u0640', '\u064A' },	/* 0640-064A */
+    new char[] { '\u066D', '\u066F' },	/* 066D-066F */
+    new char[] { '\u0671', '\u06D5' },	/* 0671-06D5 */
+    new char[] { '\u06DD' },	/* 06DD */
+    new char[] { '\u06E5', '\u06E6' },	/* 06E5-06E6 */
+    new char[] { '\u06FA', '\u06FE' },	/* 06FA-06FE */
+    new char[] { '\u0700', '\u070D' },	/* 0700-070D */
+    new char[] { '\u0710' },	/* 0710 */
+    new char[] { '\u0712', '\u072C' },	/* 0712-072C */
+    new char[] { '\u0780', '\u07A5' },	/* 0780-07A5 */
+    new char[] { '\u07B1' },	/* 07B1 */
+    new char[] { '\u200F' },	/* 200F */
+    new char[] { '\uFB1D' },	/* FB1D */
+    new char[] { '\uFB1F', '\uFB28' },	/* FB1F-FB28 */
+    new char[] { '\uFB2A', '\uFB36' },	/* FB2A-FB36 */
+    new char[] { '\uFB38', '\uFB3C' },	/* FB38-FB3C */
+    new char[] { '\uFB3E' },	/* FB3E */
+    new char[] { '\uFB40', '\uFB41' },	/* FB40-FB41 */
+    new char[] { '\uFB43', '\uFB44' },	/* FB43-FB44 */
+    new char[] { '\uFB46', '\uFBB1' },	/* FB46-FBB1 */
+    new char[] { '\uFBD3', '\uFD3D' },	/* FBD3-FD3D */
+    new char[] { '\uFD50', '\uFD8F' },	/* FD50-FD8F */
+    new char[] { '\uFD92', '\uFDC7' },	/* FD92-FDC7 */
+    new char[] { '\uFDF0', '\uFDFC' },	/* FDF0-FDFC */
+    new char[] { '\uFE70', '\uFE74' },	/* FE70-FE74 */
+    new char[] { '\uFE76', '\uFEFC' },	/* FE76-FEFC */
+  };
+
+        public static char[][] D2 = new char[][] {
+    new char[] { '\u0041', '\u005A' },	/* 0041-005A */
+    new char[] { '\u0061', '\u007A' },	/* 0061-007A */
+    new char[] { '\u00AA' },	/* 00AA */
+    new char[] { '\u00B5' },	/* 00B5 */
+    new char[] { '\u00BA' },	/* 00BA */
+    new char[] { '\u00C0', '\u00D6' },	/* 00C0-00D6 */
+    new char[] { '\u00D8', '\u00F6' },	/* 00D8-00F6 */
+    new char[] { '\u00F8', '\u0220' },	/* 00F8-0220 */
+    new char[] { '\u0222', '\u0233' },	/* 0222-0233 */
+    new char[] { '\u0250', '\u02AD' },	/* 0250-02AD */
+    new char[] { '\u02B0', '\u02B8' },	/* 02B0-02B8 */
+    new char[] { '\u02BB', '\u02C1' },	/* 02BB-02C1 */
+    new char[] { '\u02D0', '\u02D1' },	/* 02D0-02D1 */
+    new char[] { '\u02E0', '\u02E4' },	/* 02E0-02E4 */
+    new char[] { '\u02EE' },	/* 02EE */
+    new char[] { '\u037A' },	/* 037A */
+    new char[] { '\u0386' },	/* 0386 */
+    new char[] { '\u0388', '\u038A' },	/* 0388-038A */
+    new char[] { '\u038C' },	/* 038C */
+    new char[] { '\u038E', '\u03A1' },	/* 038E-03A1 */
+    new char[] { '\u03A3', '\u03CE' },	/* 03A3-03CE */
+    new char[] { '\u03D0', '\u03F5' },	/* 03D0-03F5 */
+    new char[] { '\u0400', '\u0482' },	/* 0400-0482 */
+    new char[] { '\u048A', '\u04CE' },	/* 048A-04CE */
+    new char[] { '\u04D0', '\u04F5' },	/* 04D0-04F5 */
+    new char[] { '\u04F8', '\u04F9' },	/* 04F8-04F9 */
+    new char[] { '\u0500', '\u050F' },	/* 0500-050F */
+    new char[] { '\u0531', '\u0556' },	/* 0531-0556 */
+    new char[] { '\u0559', '\u055F' },	/* 0559-055F */
+    new char[] { '\u0561', '\u0587' },	/* 0561-0587 */
+    new char[] { '\u0589' },	/* 0589 */
+    new char[] { '\u0903' },	/* 0903 */
+    new char[] { '\u0905', '\u0939' },	/* 0905-0939 */
+    new char[] { '\u093D', '\u0940' },	/* 093D-0940 */
+    new char[] { '\u0949', '\u094C' },	/* 0949-094C */
+    new char[] { '\u0950' },	/* 0950 */
+    new char[] { '\u0958', '\u0961' },	/* 0958-0961 */
+    new char[] { '\u0964', '\u0970' },	/* 0964-0970 */
+    new char[] { '\u0982', '\u0983' },	/* 0982-0983 */
+    new char[] { '\u0985', '\u098C' },	/* 0985-098C */
+    new char[] { '\u098F', '\u0990' },	/* 098F-0990 */
+    new char[] { '\u0993', '\u09A8' },	/* 0993-09A8 */
+    new char[] { '\u09AA', '\u09B0' },	/* 09AA-09B0 */
+    new char[] { '\u09B2' },	/* 09B2 */
+    new char[] { '\u09B6', '\u09B9' },	/* 09B6-09B9 */
+    new char[] { '\u09BE', '\u09C0' },	/* 09BE-09C0 */
+    new char[] { '\u09C7', '\u09C8' },	/* 09C7-09C8 */
+    new char[] { '\u09CB', '\u09CC' },	/* 09CB-09CC */
+    new char[] { '\u09D7' },	/* 09D7 */
+    new char[] { '\u09DC', '\u09DD' },	/* 09DC-09DD */
+    new char[] { '\u09DF', '\u09E1' },	/* 09DF-09E1 */
+    new char[] { '\u09E6', '\u09F1' },	/* 09E6-09F1 */
+    new char[] { '\u09F4', '\u09FA' },	/* 09F4-09FA */
+    new char[] { '\u0A05', '\u0A0A' },	/* 0A05-0A0A */
+    new char[] { '\u0A0F', '\u0A10' },	/* 0A0F-0A10 */
+    new char[] { '\u0A13', '\u0A28' },	/* 0A13-0A28 */
+    new char[] { '\u0A2A', '\u0A30' },	/* 0A2A-0A30 */
+    new char[] { '\u0A32', '\u0A33' },	/* 0A32-0A33 */
+    new char[] { '\u0A35', '\u0A36' },	/* 0A35-0A36 */
+    new char[] { '\u0A38', '\u0A39' },	/* 0A38-0A39 */
+    new char[] { '\u0A3E', '\u0A40' },	/* 0A3E-0A40 */
+    new char[] { '\u0A59', '\u0A5C' },	/* 0A59-0A5C */
+    new char[] { '\u0A5E' },	/* 0A5E */
+    new char[] { '\u0A66', '\u0A6F' },	/* 0A66-0A6F */
+    new char[] { '\u0A72', '\u0A74' },	/* 0A72-0A74 */
+    new char[] { '\u0A83' },	/* 0A83 */
+    new char[] { '\u0A85', '\u0A8B' },	/* 0A85-0A8B */
+    new char[] { '\u0A8D' },	/* 0A8D */
+    new char[] { '\u0A8F', '\u0A91' },	/* 0A8F-0A91 */
+    new char[] { '\u0A93', '\u0AA8' },	/* 0A93-0AA8 */
+    new char[] { '\u0AAA', '\u0AB0' },	/* 0AAA-0AB0 */
+    new char[] { '\u0AB2', '\u0AB3' },	/* 0AB2-0AB3 */
+    new char[] { '\u0AB5', '\u0AB9' },	/* 0AB5-0AB9 */
+    new char[] { '\u0ABD', '\u0AC0' },	/* 0ABD-0AC0 */
+    new char[] { '\u0AC9' },	/* 0AC9 */
+    new char[] { '\u0ACB', '\u0ACC' },	/* 0ACB-0ACC */
+    new char[] { '\u0AD0' },	/* 0AD0 */
+    new char[] { '\u0AE0' },	/* 0AE0 */
+    new char[] { '\u0AE6', '\u0AEF' },	/* 0AE6-0AEF */
+    new char[] { '\u0B02', '\u0B03' },	/* 0B02-0B03 */
+    new char[] { '\u0B05', '\u0B0C' },	/* 0B05-0B0C */
+    new char[] { '\u0B0F', '\u0B10' },	/* 0B0F-0B10 */
+    new char[] { '\u0B13', '\u0B28' },	/* 0B13-0B28 */
+    new char[] { '\u0B2A', '\u0B30' },	/* 0B2A-0B30 */
+    new char[] { '\u0B32', '\u0B33' },	/* 0B32-0B33 */
+    new char[] { '\u0B36', '\u0B39' },	/* 0B36-0B39 */
+    new char[] { '\u0B3D', '\u0B3E' },	/* 0B3D-0B3E */
+    new char[] { '\u0B40' },	/* 0B40 */
+    new char[] { '\u0B47', '\u0B48' },	/* 0B47-0B48 */
+    new char[] { '\u0B4B', '\u0B4C' },	/* 0B4B-0B4C */
+    new char[] { '\u0B57' },	/* 0B57 */
+    new char[] { '\u0B5C', '\u0B5D' },	/* 0B5C-0B5D */
+    new char[] { '\u0B5F', '\u0B61' },	/* 0B5F-0B61 */
+    new char[] { '\u0B66', '\u0B70' },	/* 0B66-0B70 */
+    new char[] { '\u0B83' },	/* 0B83 */
+    new char[] { '\u0B85', '\u0B8A' },	/* 0B85-0B8A */
+    new char[] { '\u0B8E', '\u0B90' },	/* 0B8E-0B90 */
+    new char[] { '\u0B92', '\u0B95' },	/* 0B92-0B95 */
+    new char[] { '\u0B99', '\u0B9A' },	/* 0B99-0B9A */
+    new char[] { '\u0B9C' },	/* 0B9C */
+    new char[] { '\u0B9E', '\u0B9F' },	/* 0B9E-0B9F */
+    new char[] { '\u0BA3', '\u0BA4' },	/* 0BA3-0BA4 */
+    new char[] { '\u0BA8', '\u0BAA' },	/* 0BA8-0BAA */
+    new char[] { '\u0BAE', '\u0BB5' },	/* 0BAE-0BB5 */
+    new char[] { '\u0BB7', '\u0BB9' },	/* 0BB7-0BB9 */
+    new char[] { '\u0BBE', '\u0BBF' },	/* 0BBE-0BBF */
+    new char[] { '\u0BC1', '\u0BC2' },	/* 0BC1-0BC2 */
+    new char[] { '\u0BC6', '\u0BC8' },	/* 0BC6-0BC8 */
+    new char[] { '\u0BCA', '\u0BCC' },	/* 0BCA-0BCC */
+    new char[] { '\u0BD7' },	/* 0BD7 */
+    new char[] { '\u0BE7', '\u0BF2' },	/* 0BE7-0BF2 */
+    new char[] { '\u0C01', '\u0C03' },	/* 0C01-0C03 */
+    new char[] { '\u0C05', '\u0C0C' },	/* 0C05-0C0C */
+    new char[] { '\u0C0E', '\u0C10' },	/* 0C0E-0C10 */
+    new char[] { '\u0C12', '\u0C28' },	/* 0C12-0C28 */
+    new char[] { '\u0C2A', '\u0C33' },	/* 0C2A-0C33 */
+    new char[] { '\u0C35', '\u0C39' },	/* 0C35-0C39 */
+    new char[] { '\u0C41', '\u0C44' },	/* 0C41-0C44 */
+    new char[] { '\u0C60', '\u0C61' },	/* 0C60-0C61 */
+    new char[] { '\u0C66', '\u0C6F' },	/* 0C66-0C6F */
+    new char[] { '\u0C82', '\u0C83' },	/* 0C82-0C83 */
+    new char[] { '\u0C85', '\u0C8C' },	/* 0C85-0C8C */
+    new char[] { '\u0C8E', '\u0C90' },	/* 0C8E-0C90 */
+    new char[] { '\u0C92', '\u0CA8' },	/* 0C92-0CA8 */
+    new char[] { '\u0CAA', '\u0CB3' },	/* 0CAA-0CB3 */
+    new char[] { '\u0CB5', '\u0CB9' },	/* 0CB5-0CB9 */
+    new char[] { '\u0CBE' },	/* 0CBE */
+    new char[] { '\u0CC0', '\u0CC4' },	/* 0CC0-0CC4 */
+    new char[] { '\u0CC7', '\u0CC8' },	/* 0CC7-0CC8 */
+    new char[] { '\u0CCA', '\u0CCB' },	/* 0CCA-0CCB */
+    new char[] { '\u0CD5', '\u0CD6' },	/* 0CD5-0CD6 */
+    new char[] { '\u0CDE' },	/* 0CDE */
+    new char[] { '\u0CE0', '\u0CE1' },	/* 0CE0-0CE1 */
+    new char[] { '\u0CE6', '\u0CEF' },	/* 0CE6-0CEF */
+    new char[] { '\u0D02', '\u0D03' },	/* 0D02-0D03 */
+    new char[] { '\u0D05', '\u0D0C' },	/* 0D05-0D0C */
+    new char[] { '\u0D0E', '\u0D10' },	/* 0D0E-0D10 */
+    new char[] { '\u0D12', '\u0D28' },	/* 0D12-0D28 */
+    new char[] { '\u0D2A', '\u0D39' },	/* 0D2A-0D39 */
+    new char[] { '\u0D3E', '\u0D40' },	/* 0D3E-0D40 */
+    new char[] { '\u0D46', '\u0D48' },	/* 0D46-0D48 */
+    new char[] { '\u0D4A', '\u0D4C' },	/* 0D4A-0D4C */
+    new char[] { '\u0D57' },	/* 0D57 */
+    new char[] { '\u0D60', '\u0D61' },	/* 0D60-0D61 */
+    new char[] { '\u0D66', '\u0D6F' },	/* 0D66-0D6F */
+    new char[] { '\u0D82', '\u0D83' },	/* 0D82-0D83 */
+    new char[] { '\u0D85', '\u0D96' },	/* 0D85-0D96 */
+    new char[] { '\u0D9A', '\u0DB1' },	/* 0D9A-0DB1 */
+    new char[] { '\u0DB3', '\u0DBB' },	/* 0DB3-0DBB */
+    new char[] { '\u0DBD' },	/* 0DBD */
+    new char[] { '\u0DC0', '\u0DC6' },	/* 0DC0-0DC6 */
+    new char[] { '\u0DCF', '\u0DD1' },	/* 0DCF-0DD1 */
+    new char[] { '\u0DD8', '\u0DDF' },	/* 0DD8-0DDF */
+    new char[] { '\u0DF2', '\u0DF4' },	/* 0DF2-0DF4 */
+    new char[] { '\u0E01', '\u0E30' },	/* 0E01-0E30 */
+    new char[] { '\u0E32', '\u0E33' },	/* 0E32-0E33 */
+    new char[] { '\u0E40', '\u0E46' },	/* 0E40-0E46 */
+    new char[] { '\u0E4F', '\u0E5B' },	/* 0E4F-0E5B */
+    new char[] { '\u0E81', '\u0E82' },	/* 0E81-0E82 */
+    new char[] { '\u0E84' },	/* 0E84 */
+    new char[] { '\u0E87', '\u0E88' },	/* 0E87-0E88 */
+    new char[] { '\u0E8A' },	/* 0E8A */
+    new char[] { '\u0E8D' },	/* 0E8D */
+    new char[] { '\u0E94', '\u0E97' },	/* 0E94-0E97 */
+    new char[] { '\u0E99', '\u0E9F' },	/* 0E99-0E9F */
+    new char[] { '\u0EA1', '\u0EA3' },	/* 0EA1-0EA3 */
+    new char[] { '\u0EA5' },	/* 0EA5 */
+    new char[] { '\u0EA7' },	/* 0EA7 */
+    new char[] { '\u0EAA', '\u0EAB' },	/* 0EAA-0EAB */
+    new char[] { '\u0EAD', '\u0EB0' },	/* 0EAD-0EB0 */
+    new char[] { '\u0EB2', '\u0EB3' },	/* 0EB2-0EB3 */
+    new char[] { '\u0EBD' },	/* 0EBD */
+    new char[] { '\u0EC0', '\u0EC4' },	/* 0EC0-0EC4 */
+    new char[] { '\u0EC6' },	/* 0EC6 */
+    new char[] { '\u0ED0', '\u0ED9' },	/* 0ED0-0ED9 */
+    new char[] { '\u0EDC', '\u0EDD' },	/* 0EDC-0EDD */
+    new char[] { '\u0F00', '\u0F17' },	/* 0F00-0F17 */
+    new char[] { '\u0F1A', '\u0F34' },	/* 0F1A-0F34 */
+    new char[] { '\u0F36' },	/* 0F36 */
+    new char[] { '\u0F38' },	/* 0F38 */
+    new char[] { '\u0F3E', '\u0F47' },	/* 0F3E-0F47 */
+    new char[] { '\u0F49', '\u0F6A' },	/* 0F49-0F6A */
+    new char[] { '\u0F7F' },	/* 0F7F */
+    new char[] { '\u0F85' },	/* 0F85 */
+    new char[] { '\u0F88', '\u0F8B' },	/* 0F88-0F8B */
+    new char[] { '\u0FBE', '\u0FC5' },	/* 0FBE-0FC5 */
+    new char[] { '\u0FC7', '\u0FCC' },	/* 0FC7-0FCC */
+    new char[] { '\u0FCF' },	/* 0FCF */
+    new char[] { '\u1000', '\u1021' },	/* 1000-1021 */
+    new char[] { '\u1023', '\u1027' },	/* 1023-1027 */
+    new char[] { '\u1029', '\u102A' },	/* 1029-102A */
+    new char[] { '\u102C' },	/* 102C */
+    new char[] { '\u1031' },	/* 1031 */
+    new char[] { '\u1038' },	/* 1038 */
+    new char[] { '\u1040', '\u1057' },	/* 1040-1057 */
+    new char[] { '\u10A0', '\u10C5' },	/* 10A0-10C5 */
+    new char[] { '\u10D0', '\u10F8' },	/* 10D0-10F8 */
+    new char[] { '\u10FB' },	/* 10FB */
+    new char[] { '\u1100', '\u1159' },	/* 1100-1159 */
+    new char[] { '\u115F', '\u11A2' },	/* 115F-11A2 */
+    new char[] { '\u11A8', '\u11F9' },	/* 11A8-11F9 */
+    new char[] { '\u1200', '\u1206' },	/* 1200-1206 */
+    new char[] { '\u1208', '\u1246' },	/* 1208-1246 */
+    new char[] { '\u1248' },	/* 1248 */
+    new char[] { '\u124A', '\u124D' },	/* 124A-124D */
+    new char[] { '\u1250', '\u1256' },	/* 1250-1256 */
+    new char[] { '\u1258' },	/* 1258 */
+    new char[] { '\u125A', '\u125D' },	/* 125A-125D */
+    new char[] { '\u1260', '\u1286' },	/* 1260-1286 */
+    new char[] { '\u1288' },	/* 1288 */
+    new char[] { '\u128A', '\u128D' },	/* 128A-128D */
+    new char[] { '\u1290', '\u12AE' },	/* 1290-12AE */
+    new char[] { '\u12B0' },	/* 12B0 */
+    new char[] { '\u12B2', '\u12B5' },	/* 12B2-12B5 */
+    new char[] { '\u12B8', '\u12BE' },	/* 12B8-12BE */
+    new char[] { '\u12C0' },	/* 12C0 */
+    new char[] { '\u12C2', '\u12C5' },	/* 12C2-12C5 */
+    new char[] { '\u12C8', '\u12CE' },	/* 12C8-12CE */
+    new char[] { '\u12D0', '\u12D6' },	/* 12D0-12D6 */
+    new char[] { '\u12D8', '\u12EE' },	/* 12D8-12EE */
+    new char[] { '\u12F0', '\u130E' },	/* 12F0-130E */
+    new char[] { '\u1310' },	/* 1310 */
+    new char[] { '\u1312', '\u1315' },	/* 1312-1315 */
+    new char[] { '\u1318', '\u131E' },	/* 1318-131E */
+    new char[] { '\u1320', '\u1346' },	/* 1320-1346 */
+    new char[] { '\u1348', '\u135A' },	/* 1348-135A */
+    new char[] { '\u1361', '\u137C' },	/* 1361-137C */
+    new char[] { '\u13A0', '\u13F4' },	/* 13A0-13F4 */
+    new char[] { '\u1401', '\u1676' },	/* 1401-1676 */
+    new char[] { '\u1681', '\u169A' },	/* 1681-169A */
+    new char[] { '\u16A0', '\u16F0' },	/* 16A0-16F0 */
+    new char[] { '\u1700', '\u170C' },	/* 1700-170C */
+    new char[] { '\u170E', '\u1711' },	/* 170E-1711 */
+    new char[] { '\u1720', '\u1731' },	/* 1720-1731 */
+    new char[] { '\u1735', '\u1736' },	/* 1735-1736 */
+    new char[] { '\u1740', '\u1751' },	/* 1740-1751 */
+    new char[] { '\u1760', '\u176C' },	/* 1760-176C */
+    new char[] { '\u176E', '\u1770' },	/* 176E-1770 */
+    new char[] { '\u1780', '\u17B6' },	/* 1780-17B6 */
+    new char[] { '\u17BE', '\u17C5' },	/* 17BE-17C5 */
+    new char[] { '\u17C7', '\u17C8' },	/* 17C7-17C8 */
+    new char[] { '\u17D4', '\u17DA' },	/* 17D4-17DA */
+    new char[] { '\u17DC' },	/* 17DC */
+    new char[] { '\u17E0', '\u17E9' },	/* 17E0-17E9 */
+    new char[] { '\u1810', '\u1819' },	/* 1810-1819 */
+    new char[] { '\u1820', '\u1877' },	/* 1820-1877 */
+    new char[] { '\u1880', '\u18A8' },	/* 1880-18A8 */
+    new char[] { '\u1E00', '\u1E9B' },	/* 1E00-1E9B */
+    new char[] { '\u1EA0', '\u1EF9' },	/* 1EA0-1EF9 */
+    new char[] { '\u1F00', '\u1F15' },	/* 1F00-1F15 */
+    new char[] { '\u1F18', '\u1F1D' },	/* 1F18-1F1D */
+    new char[] { '\u1F20', '\u1F45' },	/* 1F20-1F45 */
+    new char[] { '\u1F48', '\u1F4D' },	/* 1F48-1F4D */
+    new char[] { '\u1F50', '\u1F57' },	/* 1F50-1F57 */
+    new char[] { '\u1F59' },	/* 1F59 */
+    new char[] { '\u1F5B' },	/* 1F5B */
+    new char[] { '\u1F5D' },	/* 1F5D */
+    new char[] { '\u1F5F', '\u1F7D' },	/* 1F5F-1F7D */
+    new char[] { '\u1F80', '\u1FB4' },	/* 1F80-1FB4 */
+    new char[] { '\u1FB6', '\u1FBC' },	/* 1FB6-1FBC */
+    new char[] { '\u1FBE' },	/* 1FBE */
+    new char[] { '\u1FC2', '\u1FC4' },	/* 1FC2-1FC4 */
+    new char[] { '\u1FC6', '\u1FCC' },	/* 1FC6-1FCC */
+    new char[] { '\u1FD0', '\u1FD3' },	/* 1FD0-1FD3 */
+    new char[] { '\u1FD6', '\u1FDB' },	/* 1FD6-1FDB */
+    new char[] { '\u1FE0', '\u1FEC' },	/* 1FE0-1FEC */
+    new char[] { '\u1FF2', '\u1FF4' },	/* 1FF2-1FF4 */
+    new char[] { '\u1FF6', '\u1FFC' },	/* 1FF6-1FFC */
+    new char[] { '\u200E' },	/* 200E */
+    new char[] { '\u2071' },	/* 2071 */
+    new char[] { '\u207F' },	/* 207F */
+    new char[] { '\u2102' },	/* 2102 */
+    new char[] { '\u2107' },	/* 2107 */
+    new char[] { '\u210A', '\u2113' },	/* 210A-2113 */
+    new char[] { '\u2115' },	/* 2115 */
+    new char[] { '\u2119', '\u211D' },	/* 2119-211D */
+    new char[] { '\u2124' },	/* 2124 */
+    new char[] { '\u2126' },	/* 2126 */
+    new char[] { '\u2128' },	/* 2128 */
+    new char[] { '\u212A', '\u212D' },	/* 212A-212D */
+    new char[] { '\u212F', '\u2131' },	/* 212F-2131 */
+    new char[] { '\u2133', '\u2139' },	/* 2133-2139 */
+    new char[] { '\u213D', '\u213F' },	/* 213D-213F */
+    new char[] { '\u2145', '\u2149' },	/* 2145-2149 */
+    new char[] { '\u2160', '\u2183' },	/* 2160-2183 */
+    new char[] { '\u2336', '\u237A' },	/* 2336-237A */
+    new char[] { '\u2395' },	/* 2395 */
+    new char[] { '\u249C', '\u24E9' },	/* 249C-24E9 */
+    new char[] { '\u3005', '\u3007' },	/* 3005-3007 */
+    new char[] { '\u3021', '\u3029' },	/* 3021-3029 */
+    new char[] { '\u3031', '\u3035' },	/* 3031-3035 */
+    new char[] { '\u3038', '\u303C' },	/* 3038-303C */
+    new char[] { '\u3041', '\u3096' },	/* 3041-3096 */
+    new char[] { '\u309D', '\u309F' },	/* 309D-309F */
+    new char[] { '\u30A1', '\u30FA' },	/* 30A1-30FA */
+    new char[] { '\u30FC', '\u30FF' },	/* 30FC-30FF */
+    new char[] { '\u3105', '\u312C' },	/* 3105-312C */
+    new char[] { '\u3131', '\u318E' },	/* 3131-318E */
+    new char[] { '\u3190', '\u31B7' },	/* 3190-31B7 */
+    new char[] { '\u31F0', '\u321C' },	/* 31F0-321C */
+    new char[] { '\u3220', '\u3243' },	/* 3220-3243 */
+    new char[] { '\u3260', '\u327B' },	/* 3260-327B */
+    new char[] { '\u327F', '\u32B0' },	/* 327F-32B0 */
+    new char[] { '\u32C0', '\u32CB' },	/* 32C0-32CB */
+    new char[] { '\u32D0', '\u32FE' },	/* 32D0-32FE */
+    new char[] { '\u3300', '\u3376' },	/* 3300-3376 */
+    new char[] { '\u337B', '\u33DD' },	/* 337B-33DD */
+    new char[] { '\u33E0', '\u33FE' },	/* 33E0-33FE */
+    new char[] { '\u3400', '\u4DB5' },	/* 3400-4DB5 */
+    new char[] { '\u4E00', '\u9FA5' },	/* 4E00-9FA5 */
+    new char[] { '\uA000', '\uA48C' },	/* A000-A48C */
+    new char[] { '\uAC00', '\uD7A3' },	/* AC00-D7A3 */
+    new char[] { '\uD800', '\uFA2D' },	/* D800-FA2D */
+    new char[] { '\uFA30', '\uFA6A' },	/* FA30-FA6A */
+    new char[] { '\uFB00', '\uFB06' },	/* FB00-FB06 */
+    new char[] { '\uFB13', '\uFB17' },	/* FB13-FB17 */
+    new char[] { '\uFF21', '\uFF3A' },	/* FF21-FF3A */
+    new char[] { '\uFF41', '\uFF5A' },	/* FF41-FF5A */
+    new char[] { '\uFF66', '\uFFBE' },	/* FF66-FFBE */
+    new char[] { '\uFFC2', '\uFFC7' },	/* FFC2-FFC7 */
+    new char[] { '\uFFCA', '\uFFCF' },	/* FFCA-FFCF */
+    new char[] { '\uFFD2', '\uFFD7' },	/* FFD2-FFD7 */
+    new char[] { '\uFFDA', '\uFFDC' },	/* FFDA-FFDC */
+  };
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/Stringprep.cs b/lib/agsxmpp/agsxmpp/Idn/Stringprep.cs
new file mode 100644
index 0000000..2335614
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/Stringprep.cs
@@ -0,0 +1,463 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Idn
+{	
+	/// <summary> This class offers static methods for preparing internationalized
+	/// strings. It supports the following stringprep profiles:
+	/// <ul>
+	/// <li>RFC3491 nameprep
+	/// <li>RFC3920 XMPP nodeprep and resourceprep
+	/// </ul>
+	/// Note that this implementation only supports 16-bit Unicode code
+	/// points.
+	/// </summary>
+	public class Stringprep
+	{
+		/// <summary> Preps a name according to the Stringprep profile defined in
+		/// RFC3491. Unassigned code points are not allowed.
+		/// *
+		/// </summary>
+		/// <param name="input">the name to prep.
+		/// </param>
+		/// <returns> the prepped name.
+		/// @throws StringprepException If the name cannot be prepped with
+		/// this profile.
+		/// @throws NullPointerException If the name is null.
+		/// 
+		/// </returns>
+		public static string NamePrep(string input)
+		{
+			return NamePrep(input, false);
+		}
+		
+		/// <summary> Preps a name according to the Stringprep profile defined in
+		/// RFC3491.
+		/// *
+		/// </summary>
+		/// <param name="input">the name to prep.
+		/// </param>
+		/// <param name="allowUnassigned">true if the name may contain unassigned
+		/// code points.
+		/// </param>
+		/// <returns> the prepped name.
+		/// @throws StringprepException If the name cannot be prepped with
+		/// this profile.
+		/// @throws NullPointerException If the name is null.
+		/// 
+		/// </returns>
+		public static string NamePrep(string input, bool allowUnassigned)
+		{
+			if (input == null)
+			{
+				throw new System.NullReferenceException();
+			}
+			
+			StringBuilder s = new StringBuilder(input);
+			
+			if (!allowUnassigned && Contains(s, RFC3454.A1))
+			{
+				throw new StringprepException(StringprepException.CONTAINS_UNASSIGNED);
+			}
+			
+			Filter(s, RFC3454.B1);
+			Map(s, RFC3454.B2search, RFC3454.B2replace);
+			
+			s = new StringBuilder(NFKC.NormalizeNFKC(s.ToString()));
+			// B.3 is only needed if NFKC is not used, right?
+			// map(s, RFC3454.B3search, RFC3454.B3replace);
+			
+			if (Contains(s, RFC3454.C12) || Contains(s, RFC3454.C22) || Contains(s, RFC3454.C3) || Contains(s, RFC3454.C4) || Contains(s, RFC3454.C5) || Contains(s, RFC3454.C6) || Contains(s, RFC3454.C7) || Contains(s, RFC3454.C8))
+			{
+				// Table C.9 only contains code points > 0xFFFF which Java
+				// doesn't handle
+				throw new StringprepException(StringprepException.CONTAINS_PROHIBITED);
+			}
+			
+			// Bidi handling
+			bool r = Contains(s, RFC3454.D1);
+			bool l = Contains(s, RFC3454.D2);
+			
+			// RFC 3454, section 6, requirement 1: already handled above (table C.8)
+			
+			// RFC 3454, section 6, requirement 2
+			if (r && l)
+			{
+				throw new StringprepException(StringprepException.BIDI_BOTHRAL);
+			}
+			
+			// RFC 3454, section 6, requirement 3
+			if (r)
+			{
+				if (!Contains(s[0], RFC3454.D1) || !Contains(s[s.Length - 1], RFC3454.D1))
+				{
+					throw new StringprepException(StringprepException.BIDI_LTRAL);
+				}
+			}
+			
+			return s.ToString();
+		}
+		
+		/**
+		* Characters prohibited by RFC3920 nodeprep that aren't defined as
+		* part of the RFC3454 tables.
+		*/
+		private static char [] RFC3920_NODEPREP_PROHIBIT = new char [] {
+				 '\u0022', '\u0026', '\'',     '\u002F',
+				 '\u003A', '\u003C', '\u003E', '\u0040'
+		 };
+		
+		/// <summary> Preps a node name according to the Stringprep profile defined in
+		/// RFC3920. Unassigned code points are not allowed.
+		/// *
+		/// </summary>
+		/// <param name="input">the node name to prep.
+		/// </param>
+		/// <returns> the prepped node name.
+		/// @throws StringprepException If the node name cannot be prepped
+		/// with this profile.
+		/// @throws NullPointerException If the node name is null.
+		/// 
+		/// </returns>
+		public static string NodePrep(string input)
+		{
+			return NodePrep(input, false);
+		}
+		
+		/// <summary>
+        /// Preps a node name according to the Stringprep profile defined in RFC3920.
+		/// </summary>
+		/// <param name="input">the node name to prep.
+		/// </param>
+		/// <param name="allowUnassigned">true if the node name may contain
+		/// unassigned code points.
+		/// </param>
+		/// <returns> the prepped node name.
+		/// @throws StringprepException If the node name cannot be prepped
+		/// with this profile.
+		/// @throws NullPointerException If the node name is null.
+		/// 
+		/// </returns>
+		public static string NodePrep(string input, bool allowUnassigned)
+		{
+			if (input == null)
+			{
+				throw new System.NullReferenceException();
+			}
+			
+			StringBuilder s = new StringBuilder(input);
+			
+			if (!allowUnassigned && Contains(s, RFC3454.A1))
+			{
+				throw new StringprepException(StringprepException.CONTAINS_UNASSIGNED);
+			}
+			
+			Filter(s, RFC3454.B1);
+			Map(s, RFC3454.B2search, RFC3454.B2replace);
+			
+			s = new StringBuilder(NFKC.NormalizeNFKC(s.ToString()));
+			
+			if (Contains(s, RFC3454.C11) || Contains(s, RFC3454.C12) || Contains(s, RFC3454.C21) || Contains(s, RFC3454.C22) || Contains(s, RFC3454.C3) || Contains(s, RFC3454.C4) || Contains(s, RFC3454.C5) || Contains(s, RFC3454.C6) || Contains(s, RFC3454.C7) || Contains(s, RFC3454.C8) || Contains(s, RFC3920_NODEPREP_PROHIBIT))
+			{
+				// Table C.9 only contains code points > 0xFFFF which Java
+				// doesn't handle
+				throw new StringprepException(StringprepException.CONTAINS_PROHIBITED);
+			}
+			
+			// Bidi handling
+			bool r = Contains(s, RFC3454.D1);
+			bool l = Contains(s, RFC3454.D2);
+			
+			// RFC 3454, section 6, requirement 1: already handled above (table C.8)
+			
+			// RFC 3454, section 6, requirement 2
+			if (r && l)
+			{
+				throw new StringprepException(StringprepException.BIDI_BOTHRAL);
+			}
+			
+			// RFC 3454, section 6, requirement 3
+			if (r)
+			{
+				if (!Contains(s[0], RFC3454.D1) || !Contains(s[s.Length - 1], RFC3454.D1))
+				{
+					throw new StringprepException(StringprepException.BIDI_LTRAL);
+				}
+			}
+			
+			return s.ToString();
+		}
+		
+		/// <summary>
+        /// Preps a resource name according to the Stringprep profile defined
+		/// in RFC3920. Unassigned code points are not allowed.
+		/// </summary>
+		/// <param name="input">the resource name to prep.
+		/// </param>
+		/// <returns> the prepped node name.
+		/// @throws StringprepException If the resource name cannot be prepped
+		/// with this profile.
+		/// @throws NullPointerException If the resource name is null.
+		/// 
+		/// </returns>
+		public static string ResourcePrep(string input)
+		{
+			return ResourcePrep(input, false);
+		}
+		
+		/// <summary>
+        /// Preps a resource name according to the Stringprep profile defined
+		/// in RFC3920.
+		/// </summary>
+		/// <param name="input">the resource name to prep.
+		/// </param>
+		/// <param name="allowUnassigned">true if the resource name may contain
+		/// unassigned code points.
+		/// </param>
+		/// <returns>
+        /// the prepped node name.
+		/// @throws StringprepException If the resource name cannot be prepped
+		/// with this profile.
+		/// @throws NullPointerException If the resource name is null.
+		/// 
+		/// </returns>        
+		public static string ResourcePrep(string input, bool allowUnassigned)
+		{
+			if (input == null)
+			{
+				throw new System.NullReferenceException();
+			}
+			
+			StringBuilder s = new StringBuilder(input);
+			
+			if (!allowUnassigned && Contains(s, RFC3454.A1))
+			{
+				throw new StringprepException(StringprepException.CONTAINS_UNASSIGNED);
+			}
+			
+			Filter(s, RFC3454.B1);
+			
+			s = new StringBuilder(NFKC.NormalizeNFKC(s.ToString()));
+			
+			if (Contains(s, RFC3454.C12) || Contains(s, RFC3454.C21) || Contains(s, RFC3454.C22) || Contains(s, RFC3454.C3) || Contains(s, RFC3454.C4) || Contains(s, RFC3454.C5) || Contains(s, RFC3454.C6) || Contains(s, RFC3454.C7) || Contains(s, RFC3454.C8))
+			{
+				// Table C.9 only contains code points > 0xFFFF which Java
+				// doesn't handle
+				throw new StringprepException(StringprepException.CONTAINS_PROHIBITED);
+			}
+			
+			// Bidi handling
+			bool r = Contains(s, RFC3454.D1);
+			bool l = Contains(s, RFC3454.D2);
+			
+			// RFC 3454, section 6, requirement 1: already handled above (table C.8)
+			
+			// RFC 3454, section 6, requirement 2
+			if (r && l)
+			{
+				throw new StringprepException(StringprepException.BIDI_BOTHRAL);
+			}
+			
+			// RFC 3454, section 6, requirement 3
+			if (r)
+			{
+				if (!Contains(s[0], RFC3454.D1) || !Contains(s[s.Length - 1], RFC3454.D1))
+				{
+					throw new StringprepException(StringprepException.BIDI_LTRAL);
+				}
+			}
+			
+			return s.ToString();
+		}
+		
+		internal static bool Contains(StringBuilder s, char[] p)
+		{
+			for (int i = 0; i < p.Length; i++)
+			{
+				char c = p[i];
+				for (int j = 0; j < s.Length; j++)
+				{
+					if (c == s[j])
+					{
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+		
+		internal static bool Contains(StringBuilder s, char[][] p)
+		{
+			for (int i = 0; i < p.Length; i++)
+			{
+				char[] r = p[i];
+				if (1 == r.Length)
+				{
+					char c = r[0];
+					for (int j = 0; j < s.Length; j++)
+					{
+						if (c == s[j])
+						{
+							return true;
+						}
+					}
+				}
+				else if (2 == r.Length)
+				{
+					char f = r[0];
+					char t = r[1];
+					for (int j = 0; j < s.Length; j++)
+					{
+						if (f <= s[j] && t >= s[j])
+						{
+							return true;
+						}
+					}
+				}
+			}
+			return false;
+		}
+		
+		internal static bool Contains(char c, char[][] p)
+		{
+			for (int i = 0; i < p.Length; i++)
+			{
+				char[] r = p[i];
+				if (1 == r.Length)
+				{
+					if (c == r[0])
+					{
+						return true;
+					}
+				}
+				else if (2 == r.Length)
+				{
+					char f = r[0];
+					char t = r[1];
+					if (f <= c && t >= c)
+					{
+						return true;
+					}
+				}
+			}
+			return false;
+		}
+		
+		internal static void Filter(StringBuilder s, char[] f)
+		{
+			for (int i = 0; i < f.Length; i++)
+			{
+				char c = f[i];
+				
+				int j = 0;
+				while (j < s.Length)
+				{
+					if (c == s[j])
+					{
+						//s.deleteCharAt(j);
+						s.Remove(j, 1);
+					}
+					else
+					{
+						j++;
+					}
+				}
+			}
+		}
+		
+		internal static void Filter(StringBuilder s, char[][] f)
+		{
+			for (int i = 0; i < f.Length; i++)
+			{
+				char[] r = f[i];
+				
+				if (1 == r.Length)
+				{
+					char c = r[0];
+					
+					int j = 0;
+					while (j < s.Length)
+					{
+						if (c == s[j])
+						{
+							//s.deleteCharAt(j);
+							s.Remove(j, 1);
+						}
+						else
+						{
+							j++;
+						}
+					}
+				}
+				else if (2 == r.Length)
+				{
+					char from = r[0];
+					char to = r[1];
+					
+					int j = 0;
+					while (j < s.Length)
+					{
+						if (from <= s[j] && to >= s[j])
+						{
+							//s.deleteCharAt(j);
+							s.Remove(j, 1);
+						}
+						else
+						{
+							j++;
+						}
+					}
+				}
+			}
+		}
+		
+		internal static void Map(StringBuilder s, char[] search, string[] replace)
+		{
+			for (int i = 0; i < search.Length; i++)
+			{
+				char c = search[i];
+				
+				int j = 0;
+				while (j < s.Length)
+				{
+					if (c == s[j])
+					{
+						//s.deleteCharAt(j);
+						s.Remove(j, 1);
+						if (null != replace[i])
+						{
+							s.Insert(j, replace[i]);
+							j += replace[i].Length - 1;
+						}
+					}
+					else
+					{
+						j++;
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Idn/StringprepException.cs b/lib/agsxmpp/agsxmpp/Idn/StringprepException.cs
new file mode 100644
index 0000000..5b94a44
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Idn/StringprepException.cs
@@ -0,0 +1,38 @@
+/// <summary> Copyright (C) 2004  Free Software Foundation, Inc.
+/// *
+/// Author: Alexander Gnauck AG-Software, mailto:gnauck at ag-software.de
+/// *
+/// This file is part of GNU Libidn.
+/// *
+/// This library is free software; you can redistribute it and/or
+/// modify it under the terms of the GNU Lesser General Public License
+/// as published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+/// *
+/// This library is distributed in the hope that it will be useful, but
+/// WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+/// Lesser General Public License for more details.
+/// *
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with this library; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+/// USA
+/// </summary>
+
+using System;
+
+namespace agsXMPP.Idn
+{	
+	public class StringprepException : Exception
+	{
+		public static string CONTAINS_UNASSIGNED    = "Contains unassigned code points.";
+		public static string CONTAINS_PROHIBITED    = "Contains prohibited code points.";
+		public static string BIDI_BOTHRAL           = "Contains both R and AL code points.";
+		public static string BIDI_LTRAL             = "Leading and trailing code points not both R or AL.";
+
+        public StringprepException(string message) : base(message)
+		{
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/IqGrabber.cs b/lib/agsxmpp/agsxmpp/IqGrabber.cs
new file mode 100644
index 0000000..5b9f4bc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/IqGrabber.cs
@@ -0,0 +1,194 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+using System.Threading;
+
+using agsXMPP.protocol.client;
+
+//using agsXMPP.protocol.component;
+
+using agsXMPP.Xml;
+
+namespace agsXMPP
+{
+    public delegate void IqCB(object sender, IQ iq, object data);
+	
+	public class IqGrabber : PacketGrabber
+	{
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="conn"></param>
+		public IqGrabber(XmppClientConnection conn)
+		{
+			m_connection		= conn;
+			conn.OnIq	+= new IqHandler(OnIq);
+		}
+
+        public IqGrabber(XmppComponentConnection conn)
+        {
+            m_connection = conn;
+			conn.OnIq += new agsXMPP.protocol.component.IqHandler(OnIq);
+
+        }        
+        
+#if !CF
+        private IQ  synchronousResponse     = null;
+
+        private int m_SynchronousTimeout    = 5000;
+
+        /// <summary>
+        /// Timeout for synchronous requests, default value is 5000 (5 seconds)
+        /// </summary>
+        public int SynchronousTimeout
+        {
+            get { return m_SynchronousTimeout; }
+            set { m_SynchronousTimeout = value; }
+        }
+#endif 
+
+		/// <summary>
+		/// An IQ Element is received. Now check if its one we are looking for and
+		/// raise the event in this case.
+		/// </summary>
+		/// <param name="sender"></param>
+		/// <param name="e"></param>
+		public void OnIq(object sender, agsXMPP.protocol.client.IQ iq)
+		{			
+			if (iq == null)
+				return;
+
+            // the tracker handles on iq responses, which are either result or error
+            if (iq.Type != IqType.error && iq.Type != IqType.result)
+                return;
+
+			string id = iq.Id;
+			if(id == null)
+				return;
+		    
+            TrackerData td;
+
+			lock (m_grabbing)
+			{
+				td = (TrackerData) m_grabbing[id];
+
+				if (td == null)
+				{
+					return;
+				}
+				m_grabbing.Remove(id);
+			}
+                       
+            td.cb(this, iq, td.data);           
+		}
+
+        /// <summary>
+        /// Send an IQ Request and store the object with callback in the Hashtable
+        /// </summary>
+        /// <param name="iq">The iq to send</param>
+        /// <param name="cb">the callback function which gets raised for the response</param>
+        public void SendIq(IQ iq, IqCB cb)
+        {
+            SendIq(iq, cb, null);
+        }
+
+        /// <summary>
+        /// Send an IQ Request and store the object with callback in the Hashtable
+        /// </summary>
+        /// <param name="iq">The iq to send</param>
+        /// <param name="cb">the callback function which gets raised for the response</param>
+        /// <param name="cbArg">additional object for arguments</param>
+		public void SendIq(IQ iq, IqCB cb, object cbArg)
+		{
+            // check if the callback is null, in case of wrong usage of this class
+            if (cb != null)
+            {
+                TrackerData td = new TrackerData();
+                td.cb = cb;
+                td.data = cbArg;
+
+                m_grabbing[iq.Id] = td;
+            }
+			m_connection.Send(iq);
+		}
+
+#if !CF
+        /// <summary>
+        /// Sends an Iq synchronous and return the response or null on timeout
+        /// </summary>
+        /// <param name="iq">The IQ to send</param>
+        /// <param name="timeout"></param>
+        /// <returns>The response IQ or null on timeout</returns>
+        public IQ SendIq(agsXMPP.protocol.client.IQ iq, int timeout)
+        {
+            synchronousResponse = null;
+            AutoResetEvent are = new AutoResetEvent(false);
+
+            SendIq(iq, new IqCB(SynchronousIqResult), are);
+
+            if (!are.WaitOne(timeout, true))
+            {
+                // Timed out
+                lock (m_grabbing)
+                {       
+                    if (m_grabbing.ContainsKey(iq.Id))
+                        m_grabbing.Remove(iq.Id);
+                }                
+                return null;
+            }
+            
+            return synchronousResponse;
+		}
+
+        /// <summary>
+        /// Sends an Iq synchronous and return the response or null on timeout.
+        /// Timeout time used is <see cref="SynchronousTimeout"/>
+        /// </summary>
+        /// <param name="iq">The IQ to send</param>        
+        /// <returns>The response IQ or null on timeout</returns>
+        public IQ SendIq(IQ iq)
+        {
+            return SendIq(iq, m_SynchronousTimeout);
+        }
+
+        /// <summary>
+        /// Callback for synchronous iq grabbing
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="iq"></param>
+        /// <param name="data"></param>
+        private void SynchronousIqResult(object sender, IQ iq, object data)
+        {
+            synchronousResponse = iq;
+            
+            AutoResetEvent are = data as AutoResetEvent;
+            are.Set();
+        }		
+#endif
+		private class TrackerData
+		{
+			public IqCB  cb;
+			public object data;
+		}		
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Jid.cs b/lib/agsxmpp/agsxmpp/Jid.cs
new file mode 100644
index 0000000..677b206
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Jid.cs
@@ -0,0 +1,548 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+using System.Collections;
+
+using agsXMPP.Exceptions;
+using agsXMPP.Collections;
+#if STRINGPREP
+using agsXMPP.Idn;
+#endif
+
+namespace agsXMPP
+{	
+	/// <summary>
+	/// Class for building and handling XMPP Id's (JID's)
+	/// </summary>  
+    public class Jid : IComparable, IEquatable<Jid>
+
+	{
+        /*		
+        14 possible invalid forms of JIDs and some variations on valid JIDs with invalid lengths, viz:
+
+        jidforms = [
+            "",
+            "@",
+            "@/resource",
+            "@domain",
+            "@domain/",
+            "@domain/resource",
+            "nodename@",
+            "/",
+            "nodename at domain/",
+            "nodename@/",
+            "@/",
+            "nodename/",
+            "/resource",
+            "nodename@/resource",
+        ]
+        
+
+        TODO
+        Each allowable portion of a JID (node identifier, domain identifier, and resource identifier) MUST NOT
+        be more than 1023 bytes in length, resulting in a maximum total size
+        (including the '@' and '/' separators) of 3071 bytes.
+            
+        stringprep with libIDN        
+        m_User      ==> nodeprep
+        m_Server    ==> nameprep
+        m_Resource  ==> resourceprep
+        */
+        
+        // !!! 
+        // use this internal variables only if you know what you are doing
+        // !!!
+        internal string m_Jid      = null;
+		internal string m_User     = null;
+		internal string m_Server   = null;
+		internal string m_Resource = null;
+
+		/// <summary>
+		/// Create a new JID object from a string. The input string must be a valid jabberId and already prepared with stringprep.
+        /// Otherwise use one of the other constructors with escapes the node and prepares the gives balues with the stringprep
+        /// profiles
+		/// </summary>
+		/// <param name="jid">XMPP ID, in string form examples: user at server/Resource, user at server</param>
+		public Jid(string jid)
+		{			
+			m_Jid = jid;
+			Parse(jid);
+		}
+
+        /// <summary>
+        /// builds a new Jid object
+        /// </summary>
+        /// <param name="user">XMPP User part</param>
+        /// <param name="server">XMPP Domain part</param>
+        /// <param name="resource">XMPP Resource part</param>        
+        public Jid(string user, string server, string resource)
+        {
+#if !STRINGPREP
+            if (user != null)
+            {
+                user = EscapeNode(user);
+                
+                m_User = user.ToLower();
+            }
+
+            if (server != null)
+                m_Server = server.ToLower();
+
+            if (resource != null)
+                m_Resource = resource;
+#else
+            if (user != null)
+            {             
+                user = EscapeNode(user);
+
+                m_User = Stringprep.NodePrep(user);
+            }
+
+            if (server != null)
+                m_Server = Stringprep.NamePrep(server);
+
+            if (resource != null)
+                m_Resource = Stringprep.ResourcePrep(resource);
+#endif
+            BuildJid();            
+        }
+                
+        /// <summary>
+        /// Parses a JabberId from a string. If we parse a jid we assume it's correct and already prepared via stringprep.
+        /// </summary>
+        /// <param name="fullJid">jis to parse as string</param>
+        /// <returns>true if the jid could be parsed, false if an error occured</returns>
+		public bool Parse(string fullJid)
+		{
+			string user		= null;
+			string server	= null;
+			string resource = null;
+
+            try
+            {
+                if (fullJid == null || fullJid.Length == 0)
+                {
+                    return false;
+                }
+
+                m_Jid = fullJid;
+
+                int atPos = m_Jid.IndexOf('@');
+                int slashPos = m_Jid.IndexOf('/');
+
+                // some more validations
+                // @... or /...
+                if (atPos == 0 || slashPos == 0)
+                    return false;
+
+                // nodename@
+                if (atPos + 1 == fullJid.Length)
+                    return false;
+
+                // @/ at followed by resource separator
+                if (atPos + 1 == slashPos)
+                    return false;
+
+                if (atPos == -1)
+                {
+                    user = null;
+                    if (slashPos == -1)
+                    {
+                        // JID Contains only the Server
+                        server = m_Jid;
+                    }
+                    else
+                    {
+                        // JID Contains only the Server and Resource
+                        server = m_Jid.Substring(0, slashPos);
+                        resource = m_Jid.Substring(slashPos + 1);
+                    }
+                }
+                else
+                {
+                    if (slashPos == -1)
+                    {
+                        // We have no resource
+                        // Devide User and Server (user at server)
+                        server = m_Jid.Substring(atPos + 1);
+                        user = m_Jid.Substring(0, atPos);
+                    }
+                    else
+                    {
+                        // We have all
+                        user = m_Jid.Substring(0, atPos);
+                        server = m_Jid.Substring(atPos + 1, slashPos - atPos - 1);
+                        resource = m_Jid.Substring(slashPos + 1);
+                    }
+                }
+
+                if (user != null)
+                    this.m_User = user;
+                if (server != null)
+                    this.m_Server = server;
+                if (resource != null)
+                    this.m_Resource = resource;
+
+                return true;
+            }
+            catch (Exception)
+            {
+                return false;
+            }
+		}               
+        
+        internal void BuildJid()
+        {
+            m_Jid = BuildJid(m_User, m_Server, m_Resource);
+        }
+
+        private string BuildJid(string user, string server, string resource)
+		{			
+			StringBuilder sb = new StringBuilder();
+			if (user != null)
+			{
+				sb.Append(user);
+				sb.Append("@");
+			}
+			sb.Append(server);
+			if (resource != null)
+			{
+				sb.Append("/");
+				sb.Append(resource);
+			}
+			return sb.ToString();
+		}
+        
+		public override string ToString()
+		{
+			return m_Jid;
+		}
+				
+		/// <summary>
+		/// the user part of the JabberId.
+		/// </summary>
+        public string User
+		{
+			get
+			{				
+				return m_User;
+			}
+			set
+			{
+                // first Encode the user/node
+                string tmpUser = EscapeNode(value);
+#if !STRINGPREP
+                if (value != null)
+				    m_User = tmpUser.ToLower();
+                else
+                    m_User = null;
+#else
+                if (value != null)
+                    m_User = Stringprep.NodePrep(tmpUser);
+                else
+                    m_User = null;
+#endif
+                BuildJid();				
+			}
+		}
+
+		/// <summary>
+		/// Only Server
+		/// </summary>
+        public string Server
+		{
+			get
+			{
+				return m_Server;
+			}
+			set 
+			{			
+#if !STRINGPREP
+                if (value != null)
+				    m_Server = value.ToLower();
+                else
+                    m_Server = null;
+#else
+                if (value != null)
+                    m_Server = Stringprep.NamePrep(value);
+                else
+                    m_Server = null;
+#endif
+                BuildJid();                
+			}
+		}
+
+		/// <summary>
+		/// Only the Resource field.
+		/// null for none
+		/// </summary>        
+        public string Resource
+		{
+			get
+			{				
+				return m_Resource;
+			}
+			set 
+			{			
+#if !STRINGPREP
+                if (value != null)
+				    m_Resource = value;
+                else
+                    m_Resource = null;
+#else
+                if (value != null)
+                    m_Resource = Stringprep.ResourcePrep(value);
+                else
+                    m_Resource = null;
+#endif
+                BuildJid();				
+			}
+		}
+
+		/// <summary>
+		/// The Bare Jid only (user at server).
+		/// </summary>		
+        public string Bare
+		{
+			get
+			{				
+				return BuildJid(m_User, m_Server, null);
+			}
+        }
+
+        #region << Overrides >>
+        /// <summary>
+        /// This compares the full Jid by default
+        /// </summary>
+        /// <param name="obj"></param>
+        /// <returns></returns>
+        public override bool Equals(object obj)
+        {
+            return Equals(obj, new FullJidComparer());
+        }
+
+        public override int GetHashCode()
+        {
+            int hcode = 0;
+            if (m_User  !=null)
+                hcode ^= m_User.GetHashCode();
+
+            if (m_Server != null)
+                hcode ^= m_Server.GetHashCode();
+
+            if (m_Resource != null)
+                hcode ^= m_Resource.GetHashCode();
+            
+            return hcode;
+        }
+        #endregion
+
+        public bool Equals(object other, System.Collections.IComparer comparer)
+		{
+			if (comparer.Compare(other, this) == 0) 
+				return true;
+			else
+				return false;
+        }
+
+        /*
+        public static bool operator !=(Jid jid1, Jid jid2)
+        {
+            return !jid1.Equals(jid2, new FullJidComparer());
+        }
+
+        public static bool operator ==(Jid jid1, Jid jid2)
+        {
+            return jid1.Equals(jid2, new FullJidComparer());
+        }
+        */
+
+        #region << implicit operators >>
+        static public implicit operator Jid(string value)
+        {
+            return new Jid(value);
+        }
+
+        static public implicit operator string(Jid jid)
+        {
+            return jid.ToString();
+        }
+        #endregion
+
+        #region IComparable Members
+        public int CompareTo(object obj)
+        {
+            if (obj is Jid)
+            {
+                Jid jid = obj as Jid;
+                FullJidComparer comparer = new FullJidComparer();
+                return comparer.Compare(obj, this);                 
+            }
+            throw new ArgumentException("object is not a Jid");    
+        }
+        #endregion
+   
+
+        #region IEquatable<Jid> Members
+        public bool Equals(Jid other)
+        {
+            FullJidComparer comparer = new FullJidComparer();
+            if (comparer.Compare(other, this) == 0)
+                return true;
+            else
+                return false;            
+        }
+        #endregion
+
+
+        #region << XEP-0106: JID Escaping >>
+        /// <summary>
+        /// <para>
+        /// Escape a node according to XEP-0106
+        /// </para>
+        /// <para>
+        /// <a href="http://www.xmpp.org/extensions/xep-0106.html">http://www.xmpp.org/extensions/xep-0106.html</a>
+        /// </para>        
+        /// </summary>
+        /// <param name="node"></param>
+        /// <returns></returns>
+        public static string EscapeNode(string node)
+        {
+            if (node == null)
+                return null;
+
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < node.Length; i++)
+            {
+                /*
+                <space> \20
+                " 	    \22
+                & 	    \26
+                ' 	    \27
+                / 	    \2f
+                : 	    \3a
+                < 	    \3c
+                > 	    \3e
+                @ 	    \40
+                \ 	    \5c
+                */
+                char c = node[i];
+                switch (c)
+                {
+                    case ' ': sb.Append(@"\20"); break;
+                    case '"': sb.Append(@"\22"); break;
+                    case '&': sb.Append(@"\26"); break;
+                    case '\'': sb.Append(@"\27"); break;
+                    case '/': sb.Append(@"\2f"); break;
+                    case ':': sb.Append(@"\3a"); break;
+                    case '<': sb.Append(@"\3c"); break;
+                    case '>': sb.Append(@"\3e"); break;
+                    case '@': sb.Append(@"\40"); break;
+                    case '\\': sb.Append(@"\5c"); break;
+                    default: sb.Append(c); break;
+                }
+            }
+            return sb.ToString();
+        }
+
+        /// <summary>
+        /// <para>
+        /// unescape a node according to XEP-0106
+        /// </para>
+        /// <para>
+        /// <a href="http://www.xmpp.org/extensions/xep-0106.html">http://www.xmpp.org/extensions/xep-0106.html</a>
+        /// </para>        
+        /// </summary>
+        /// <param name="node"></param>
+        /// <returns></returns>
+        public static string UnescapeNode(string node)
+        {
+            if (node == null)
+                return null;
+
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < node.Length; i++)
+            {
+                char c1 = node[i];
+                if (c1 == '\\' && i + 2 < node.Length)
+                {
+                    i += 1;
+                    char c2 = node[i];
+                    i += 1;
+                    char c3 = node[i];
+                    if (c2 == '2')
+                    {
+                        switch (c3)
+                        {
+                            case '0':
+                                sb.Append(' ');
+                                break;
+                            case '2':
+                                sb.Append('"');
+                                break;
+                            case '6':
+                                sb.Append('&');
+                                break;
+                            case '7':
+                                sb.Append('\'');
+                                break;
+                            case 'f':
+                                sb.Append('/');
+                                break;
+                        }
+                    }
+                    else if (c2 == '3')
+                    {
+                        switch (c3)
+                        {
+                            case 'a':
+                                sb.Append(':');
+                                break;
+                            case 'c':
+                                sb.Append('<');
+                                break;
+                            case 'e':
+                                sb.Append('>');
+                                break;
+                        }
+                    }
+                    else if (c2 == '4')
+                    {
+                        if (c3 == '0')
+                            sb.Append("@");
+                    }
+                    else if (c2 == '5')
+                    {
+                        if (c3 == 'c')
+                            sb.Append("\\");
+                    }
+                }
+                else
+                    sb.Append(c1);
+            }
+            return sb.ToString();
+        }
+
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/MessageGrabber.cs b/lib/agsxmpp/agsxmpp/MessageGrabber.cs
new file mode 100644
index 0000000..030c854
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/MessageGrabber.cs
@@ -0,0 +1,133 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+using agsXMPP.Collections;
+
+namespace agsXMPP
+{	
+	public delegate void MessageCB(object sender, Message msg, object data);
+	
+	public class MessageGrabber : PacketGrabber
+	{				
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="conn"></param>
+		public MessageGrabber(XmppClientConnection conn)
+		{
+			m_connection		= conn;
+			conn.OnMessage += new MessageHandler(m_connection_OnMessage);			
+		}
+        
+		public void Add(Jid jid, MessageCB cb, object cbArg)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    return;
+            }
+
+			TrackerData td = new TrackerData();
+			td.cb		= cb;
+			td.data		= cbArg;
+			td.comparer = new BareJidComparer();
+
+            lock (m_grabbing)
+            {
+                m_grabbing.Add(jid.ToString(), td);
+            }
+		}
+
+		public void Add(Jid jid, IComparer comparer, MessageCB cb, object cbArg)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    return;
+            }
+
+			TrackerData td = new TrackerData();
+			td.cb		= cb;
+			td.data		= cbArg;
+			td.comparer = comparer;
+
+            lock (m_grabbing)
+            {
+                m_grabbing.Add(jid.ToString(), td);
+            }
+		}
+
+		/// <summary>
+		/// Pending request can be removed.
+		/// This is useful when a ressource for the callback is destroyed and
+		/// we are not interested anymore at the result.
+		/// </summary>
+		/// <param name="id">ID of the Iq we are not interested anymore</param>
+		public void Remove(Jid jid)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    m_grabbing.Remove(jid.ToString());
+            }
+		}
+
+		private class TrackerData
+		{
+			public MessageCB	cb;
+			public object		data;
+			// by default the Bare Jid is compared
+			public IComparer	comparer;				
+		}
+
+		/// <summary>
+		/// A Message is received. Now check if its from a Jid we are looking for and
+		/// raise the event in this case.
+		/// </summary>
+		/// <param name="sender"></param>
+		/// <param name="msg"></param>
+		private void m_connection_OnMessage(object sender, Message msg)
+		{            
+			if (msg == null)
+				return;
+
+            lock (m_grabbing)
+            {
+				IDictionaryEnumerator myEnum = m_grabbing.GetEnumerator();
+
+				while(myEnum.MoveNext())
+				{
+					TrackerData t = myEnum.Value as TrackerData;
+					if (t.comparer.Compare(new Jid((string)myEnum.Key), msg.From) == 0)
+					{
+						// Execute the callback
+						t.cb(this, msg, t.data);
+					}
+				}
+            }
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/BaseSocket.cs b/lib/agsxmpp/agsxmpp/Net/BaseSocket.cs
new file mode 100644
index 0000000..0e12747
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/BaseSocket.cs
@@ -0,0 +1,233 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+#if SSL
+using System.Net.Security;
+#endif
+using System.Security.Cryptography.X509Certificates;
+
+namespace agsXMPP.Net
+{
+	/// <summary>
+	/// Base Socket class
+	/// </summary>
+	public abstract class BaseSocket
+	{
+		public delegate void OnSocketDataHandler(object sender, byte[] data, int count);
+
+        //public delegate void OnSocketCompressionDebugHandler(object sender, byte[] CompData, int CompCount, byte[] UncompData, int UncompCount);
+        
+        /*
+        // for compression debug statistics
+        public event OnSocketCompressionDebugHandler OnIncomingCompressionDebug;
+        public event OnSocketCompressionDebugHandler OnOutgoingCompressionDebug;
+        
+        protected void FireOnInComingCompressionDebug(object sender, byte[] CompData, int CompCount, byte[] UncompData, int UncompCount)
+        {
+            if (OnIncomingCompressionDebug != null)
+                OnIncomingCompressionDebug(sender, CompData, CompCount, UncompData, UncompCount);
+        }
+        
+        protected void FireOnOutgoingCompressionDebug(object sender, byte[] CompData, int CompCount, byte[] UncompData, int UncompCount)
+        {
+            if (OnOutgoingCompressionDebug != null)
+                OnOutgoingCompressionDebug(sender, CompData, CompCount, UncompData, UncompCount);
+        }
+        */
+		
+#if SSL
+        public event RemoteCertificateValidationCallback    OnValidateCertificate;
+#endif
+//#if CF_2
+//        public delegate bool CertificateValidationCallback(X509Certificate cert);
+//        public event CertificateValidationCallback OnValidateCertificate;
+//#endif
+#if BCCRYPTO
+        public delegate bool CertificateValidationCallback(Org.BouncyCastle.Asn1.X509.X509CertificateStructure[] certs);
+        public event CertificateValidationCallback OnValidateCertificate;
+#endif
+		public event OnSocketDataHandler			        OnReceive;
+		public event OnSocketDataHandler			        OnSend;
+		public event ObjectHandler					        OnConnect;
+		public event ObjectHandler					        OnDisconnect;
+		public event ErrorHandler					        OnError;
+
+		private string	m_Address		    = null;
+		private int		m_Port			    = 0;
+        private long    m_ConnectTimeout    = 10000; // 10 seconds is default
+
+        internal XmppConnection  m_XmppCon = null;
+        
+		public BaseSocket()
+		{
+		
+		}
+
+		public string Address
+		{
+			get { return m_Address; }
+			set { m_Address = value; }
+		}
+
+		public int Port
+		{
+			get { return m_Port; }
+			set { m_Port = value; }
+		}
+
+		protected void FireOnConnect()
+		{
+			if (OnConnect != null)
+				OnConnect(this);
+		} 
+
+		protected void FireOnDisconnect()
+		{
+			if (OnDisconnect != null)
+				OnDisconnect(this);
+		} 
+
+		protected void FireOnReceive(byte[] b, int length)
+		{
+			if (OnReceive != null)
+				OnReceive(this, b, length);
+		} 
+	
+		protected void FireOnSend(byte[] b, int length)
+		{
+			if (OnSend != null)
+				OnSend(this, b, length);
+		}
+
+		protected void FireOnError(Exception ex)
+		{
+			if (OnError != null)
+				OnError(this, ex);
+		}
+
+#if SSL
+        // The following method is invoked by the RemoteCertificateValidationDelegate.
+        protected bool FireOnValidateCertificate(
+              object sender,
+              X509Certificate certificate,
+              X509Chain chain,
+              SslPolicyErrors sslPolicyErrors)
+        {
+            if (OnValidateCertificate != null)
+                return OnValidateCertificate(sender, certificate, chain, sslPolicyErrors);
+            else
+                return true;
+
+            //if (sslPolicyErrors == SslPolicyErrors.None)
+            //    return true;
+
+            //Console.WriteLine("Certificate error: {0}", sslPolicyErrors);
+
+            // Do not allow this client to communicate with unauthenticated servers.
+            //return false;
+        }
+#endif
+#if BCCRYPTO
+        protected bool FireOnValidateCertificate(Org.BouncyCastle.Asn1.X509.X509CertificateStructure[] certs)
+        {
+            if (OnValidateCertificate != null)
+                return OnValidateCertificate(certs);
+            else
+                return true;
+
+        }
+#endif
+
+//#if CF_2
+//        protected bool FireOnValidateCertificate(X509Certificate cert)
+//        {
+//            if (OnValidateCertificate != null)
+//                return OnValidateCertificate(cert);
+//            else
+//                return true;
+//        }
+//#endif
+		public virtual bool Connected
+		{
+			get { return false; }
+		}
+
+		public virtual bool SupportsStartTls
+		{
+			get { return false; }
+		}
+
+        public virtual long ConnectTimeout
+        {
+            get { return m_ConnectTimeout; }
+            set { m_ConnectTimeout = value; }
+        }
+
+		#region << Methods >>
+		public virtual void Connect()
+		{
+
+		}
+
+		public virtual void Disconnect()
+		{
+
+		}
+
+		public virtual bool StartTls()
+		{
+		    return true;
+		}
+
+        public virtual void StartCompression()
+        {
+
+        }
+
+        /// <summary>
+        /// Added for Bosh because we have to tell the BoshClientSocket when to reset the stream
+        /// </summary>
+        public virtual void Reset()
+        {
+
+        }
+
+        /// <summary>
+		/// 
+		/// </summary>
+		/// <param name="data"></param>
+		public virtual void Send(string data)
+		{			
+			
+		}
+
+		/// <summary>
+		/// Send data to the server.
+		/// </summary>
+		public virtual void Send(byte[] bData)
+		{		
+			
+		}
+		#endregion       
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/BoshClientSocket.cs b/lib/agsxmpp/agsxmpp/Net/BoshClientSocket.cs
new file mode 100644
index 0000000..1a6e73d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/BoshClientSocket.cs
@@ -0,0 +1,935 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading;
+using System.Collections;
+using System.Security.Cryptography;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.extensions.bosh;
+
+namespace agsXMPP.Net
+{
+
+    public class WebRequestState
+    {
+        public WebRequestState(WebRequest request)
+        {
+            m_WebRequest = request;
+        }
+
+        DateTime m_Started;
+
+        
+        WebRequest m_WebRequest = null;
+        Stream m_RequestStream = null;
+        string m_Output = null;
+        bool m_IsSessionRequest = false;
+        Timer m_TimeOutTimer = null;
+        private bool m_Aborted = false;
+
+        public int WebRequestId;
+
+        /// <summary>
+        /// when was this request started (timestamp)?
+        /// </summary>
+        public DateTime Started
+        {
+            get { return m_Started; }
+            set { m_Started = value; }
+        }
+
+        public bool IsSessionRequest
+        {
+            get { return m_IsSessionRequest; }
+            set { m_IsSessionRequest = value; }
+        }
+
+        public string Output
+        {
+            get { return m_Output; }
+            set { m_Output = value; }
+        }
+
+        public WebRequest WebRequest
+        {
+            get { return m_WebRequest; }
+            set { m_WebRequest = value; }
+        }
+
+        public Stream RequestStream
+        {
+            get { return m_RequestStream; }
+            set { m_RequestStream = value; }
+        }
+
+        public Timer TimeOutTimer
+        {
+            get { return m_TimeOutTimer; }
+            set { m_TimeOutTimer = value; }
+        }
+
+        public bool Aborted
+        {
+            get { return m_Aborted; }
+            set { m_Aborted = value; }
+        }
+    } 
+
+    public class BoshClientSocket : BaseSocket
+    {
+        private const string    CONTENT_TYPE        = "text/xml; charset=utf-8";
+        private const string    METHOD              = "POST";
+        private const string    BOSH_VERSION        = "1.6";
+        private const int       WEBREQUEST_TIMEOUT  = 5000;
+        private const int       OFFSET_WAIT         = 5000; 
+        
+        private string[]        Keys;                                   // Array of keys
+        private int             activeRequests = 0;                    // currently active (waiting) WebRequests
+        private int             CurrentKeyIdx;                          // index of the currect key
+        private Queue           m_SendQueue     = new Queue();          // Queue for stanzas to send
+        private bool            streamStarted   = false;                // is the stream started? received stream header?
+        private int             polling         = 0;
+        private bool            terminate       = false;
+        private bool            terminated      = false;
+        private DateTime        lastSend        = DateTime.MinValue;    // DateTime of the last activity/response
+             
+        private bool            m_KeepAlive     = true;
+                
+        private long            rid;
+        private bool            restart         = false;                // stream state, are we currently restarting the stream?
+        private string          sid;
+        private bool            requestIsTerminating = false;
+
+        private int webRequestId = 1;
+        
+        public BoshClientSocket(XmppConnection con)
+        {
+            base.m_XmppCon = con;
+        }
+        
+        private void Init()
+        {         
+            Keys          = null;
+            streamStarted   = false;
+            terminate       = false;
+            terminated      = false;
+        }
+
+        #region << Properties >>
+        private Jid             m_To;
+        private int             m_Wait          = 300;  // 5 minutes by default, if you think this is to long change it over the public property
+        private int             m_Requests      = 2;
+        
+#if !CF && !CF_2
+        private int             m_MinCountKeys  = 1000;
+        private int             m_MaxCountKeys  = 9999;        
+#else
+		// set this lower on embedded devices because the key generation is slow there		
+        private int             m_MinCountKeys  = 10;
+        private int             m_MaxCountKeys  = 99;
+#endif
+        private int             m_Hold          = 1;    // should be 1
+        private int             m_MaxPause      = 0;
+        private WebProxy        m_Proxy         = null;
+                
+        public Jid To
+        {
+            get { return m_To; }
+            set { m_To = value; }
+        }
+
+        /// <summary>
+        /// The longest time (in seconds) that the connection manager is allowed to wait before responding to any request during the session.
+        /// This enables the client to prevent its TCP connection from expiring due to inactivity, as well as to limit the delay before 
+        /// it discovers any network failure.
+        /// </summary>
+        public int Wait
+        {
+            get { return m_Wait; }
+            set { m_Wait = value; }
+        }
+
+        public int Requests
+        {
+            get { return m_Requests; }
+            set { m_Requests = value; }
+        }
+ 
+        public int MaxCountKeys
+        {
+            get { return m_MaxCountKeys; }
+            set { m_MaxCountKeys = value; }
+        }
+
+        public int MinCountKeys
+        {
+            get { return m_MinCountKeys; }
+            set { m_MinCountKeys = value; }
+        }
+        
+        /// <summary>
+        /// This attribute specifies the maximum number of requests the connection manager is allowed to keep waiting 
+        /// at any one time during the session. If the client is not able to use HTTP Pipelining then this SHOULD be set to "1".
+        /// </summary>
+        public int Hold
+        {
+            get { return m_Hold; }
+            set { m_Hold = value; }
+        }
+
+        /// <summary>
+        /// Keep Alive for HTTP Webrequests, its disables by default because not many BOSH implementations support Keep Alives
+        /// </summary>
+        public bool KeepAlive
+        {
+            get { return m_KeepAlive; }
+            set { m_KeepAlive = value; }
+        }
+
+        /// <summary>
+        /// If the connection manager supports session pausing (see Inactivity) then it SHOULD advertise that to the client 
+        /// by including a 'maxpause' attribute in the session creation response element. 
+        /// The value of the attribute indicates the maximum length of a temporary session pause (in seconds) that a client MAY request.
+        /// 0 is the default value and indicated that the connection manager supports no session pausing.
+        /// </summary>
+        public int MaxPause
+        {
+            get { return m_MaxPause; }
+            set { m_MaxPause = value; }
+        }
+
+        public bool SupportsSessionPausing
+        {
+            get { return !(m_MaxPause == 0); }
+        }
+
+        public WebProxy Proxy
+        {
+            get { return m_Proxy; }
+            set { m_Proxy = value; }
+        }
+        #endregion
+
+        private string DummyStreamHeader
+        {
+            get
+            {
+                // <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1075705237'>
+                // create dummy stream header
+                StringBuilder sb = new StringBuilder();
+
+                sb.Append("<stream:stream");
+
+                sb.Append(" xmlns='");
+                sb.Append(Uri.CLIENT);
+
+                sb.Append("' xmlns:stream='");
+                sb.Append(Uri.STREAM);
+
+                sb.Append("' id='");
+                sb.Append(sid);
+
+                sb.Append("' version='");
+                sb.Append("1.0");
+
+                sb.Append("'>");
+
+                return sb.ToString();
+            }
+        }
+
+        /// <summary>
+        /// Generates a bunch of keys
+        /// </summary>
+        private void GenerateKeys()
+        {           
+            /*
+            13.3 Generating the Key Sequence
+
+            Prior to requesting a new session, the client MUST select an unpredictable counter ("n") and an unpredictable value ("seed").
+            The client then processes the "seed" through a cryptographic hash and converts the resulting 160 bits to a hexadecimal string K(1).
+            It does this "n" times to arrive at the initial key K(n). The hashing algorithm MUST be SHA-1 as defined in RFC 3174.
+
+            Example 25. Creating the key sequence
+
+                    K(1) = hex(SHA-1(seed))
+                    K(2) = hex(SHA-1(K(1)))
+                    ...
+                    K(n) = hex(SHA-1(K(n-1)))
+
+            */
+            int countKeys = GetRandomNumber(m_MinCountKeys, m_MaxCountKeys);
+
+            Keys = new string[countKeys];
+            string prev = GenerateSeed();
+
+            for (int i = 0; i < countKeys; i++)
+            {
+                Keys[i] = Util.Hash.Sha1Hash(prev);
+                prev = Keys[i];
+            }
+            CurrentKeyIdx = countKeys - 1;
+        }
+
+        private string GenerateSeed()
+        {
+            int m_lenght = 10;
+
+#if CF
+            util.RandomNumberGenerator rng = util.RandomNumberGenerator.Create();
+#else
+            RandomNumberGenerator rng = RandomNumberGenerator.Create();
+#endif
+            byte[] buf = new byte[m_lenght];
+            rng.GetBytes(buf);
+
+            return Util.Hash.HexToString(buf);
+        }
+
+        private int GenerateRid()
+        {
+            int min = 1;
+            int max = int.MaxValue;
+            
+            Random rnd = new Random();
+            
+            return rnd.Next(min, max);
+        }
+
+        private int GetRandomNumber(int min, int max)
+        {
+            Random rnd = new Random();
+            return rnd.Next(min, max);
+        }
+
+        public override void Reset()
+        {
+            base.Reset();
+
+            streamStarted   = false;
+            restart         = true;
+        }
+
+        public void RequestBoshSession()
+        {
+            /*
+            Example 1. Requesting a BOSH session
+
+            POST /webclient HTTP/1.1
+            Host: httpcm.jabber.org
+            Accept-Encoding: gzip, deflate
+            Content-Type: text/xml; charset=utf-8
+            Content-Length: 104
+
+            <body content='text/xml; charset=utf-8'
+                  hold='1'
+                  rid='1573741820'
+                  to='jabber.org'
+                  route='xmpp:jabber.org:9999'
+                  secure='true'
+                  ver='1.6'
+                  wait='60'
+                  ack='1'
+                  xml:lang='en'
+                  xmlns='http://jabber.org/protocol/httpbind'/>
+             */
+
+            lastSend = DateTime.Now;
+
+            // Generate the keys
+            GenerateKeys();
+            rid = GenerateRid();
+            Body body = new Body();
+            /*
+             * <body hold='1' xmlns='http://jabber.org/protocol/httpbind' 
+             *  to='vm-2k' 
+             *  wait='300' 
+             *  rid='782052' 
+             *  newkey='8e7d6cec12004e2bfcf7fc000310fda87bc8337c' 
+             *  ver='1.6' 
+             *  xmpp:xmlns='urn:xmpp:xbosh' 
+             *  xmpp:version='1.0'/>
+             */
+            //window='5' content='text/xml; charset=utf-8'
+            //body.SetAttribute("window", "5");
+            //body.SetAttribute("content", "text/xml; charset=utf-8");
+
+            body.Version        = BOSH_VERSION;
+            body.XmppVersion    = "1.0";
+            body.Hold           = m_Hold;
+            body.Wait           = m_Wait;
+            body.Rid            = rid;
+            body.Polling        = 0;
+            body.Requests       = m_Requests;
+            body.To             = new Jid(m_XmppCon.Server);           
+           
+            body.NewKey         = Keys[CurrentKeyIdx];
+
+            body.SetAttribute("xmpp:xmlns", "urn:xmpp:xbosh");            
+
+            activeRequests++;
+
+            HttpWebRequest req = (HttpWebRequest) CreateWebrequest(Address);
+            
+            WebRequestState state = new WebRequestState(req);
+            state.Started           = DateTime.Now;
+            state.Output            = body.ToString();
+            state.IsSessionRequest  = true;            
+
+            req.Method          = METHOD;
+            req.ContentType     = CONTENT_TYPE;
+            req.Timeout         = m_Wait * 1000;
+            req.KeepAlive       = m_KeepAlive;
+            req.ContentLength   = Encoding.UTF8.GetBytes(state.Output).Length; // state.Output.Length;
+
+            try
+            {
+                IAsyncResult result = req.BeginGetRequestStream(new AsyncCallback(this.OnGetSessionRequestStream), state);
+            }
+            catch (Exception)
+            {                
+            }
+        }
+
+        private void OnGetSessionRequestStream(IAsyncResult ar)
+        {
+            try
+            {
+                WebRequestState state = ar.AsyncState as WebRequestState;
+                HttpWebRequest req = state.WebRequest as HttpWebRequest;
+
+                Stream outputStream = req.EndGetRequestStream(ar);
+
+                byte[] bytes = Encoding.UTF8.GetBytes(state.Output);
+
+                state.RequestStream = outputStream;
+                IAsyncResult result = outputStream.BeginWrite(bytes, 0, bytes.Length, OnEndWrite, state);
+            }
+            catch (WebException ex)
+            {
+                FireOnError(ex);
+                Disconnect();
+            }
+        }
+
+        private void OnGetSessionRequestResponse(IAsyncResult result)
+        {
+            // grab the custom state object
+            WebRequestState state = (WebRequestState)result.AsyncState;
+            HttpWebRequest request = (HttpWebRequest)state.WebRequest;
+
+            //state.TimeOutTimer.Dispose();
+
+            // get the Response
+            HttpWebResponse resp = (HttpWebResponse)request.EndGetResponse(result);
+
+            // The server must always return a 200 response code,
+            // sending any session errors as specially-formatted identifiers.
+            if (resp.StatusCode != HttpStatusCode.OK)
+            {
+                return;
+            }
+
+            Stream rs = resp.GetResponseStream();
+
+            int readlen;
+            byte[] readbuf = new byte[1024];
+            MemoryStream ms = new MemoryStream();
+            while ((readlen = rs.Read(readbuf, 0, readbuf.Length)) > 0)
+            {
+                ms.Write(readbuf, 0, readlen);
+            }
+
+            byte[] recv = ms.ToArray();
+
+            if (recv.Length > 0)
+            {
+                string body = null;
+                string stanzas = null;
+
+                string res = Encoding.UTF8.GetString(recv, 0, recv.Length);
+
+                ParseResponse(res, ref body, ref stanzas);
+              
+                Document doc = new Document();
+                doc.LoadXml(body);
+                Body boshBody = doc.RootElement as Body;
+
+                sid         = boshBody.Sid;
+                polling     = boshBody.Polling;
+                m_MaxPause  = boshBody.MaxPause;
+
+                byte[] bin = Encoding.UTF8.GetBytes(DummyStreamHeader + stanzas);
+                
+                base.FireOnReceive(bin, bin.Length);
+
+                // cleanup webrequest resources
+                ms.Close();
+                rs.Close();
+                resp.Close();
+
+                activeRequests--;
+
+                if (activeRequests == 0)
+                    StartWebRequest();                
+            }
+        }
+
+        /// <summary>
+        /// This is ugly code, but currently all BOSH server implementaions are not namespace correct,
+        /// which means we can't use the XML parser here and have to spit it with string functions.
+        /// </summary>
+        /// <param name="res"></param>
+        /// <param name="body"></param>
+        /// <param name="stanzas"></param>
+        private void ParseResponse(string res, ref string body, ref string stanzas)
+        {
+            res = res.Trim();
+            if (res.EndsWith("/>"))
+            {
+                // <body ..../>
+                // empty response
+                body = res;
+                stanzas = null;
+            }
+            else
+            {
+                /* 
+                 * <body .....>
+                 *  <message/>
+                 *  <presence/>
+                 * </body>  
+                 */
+
+                // find position of the first closing angle bracket
+                int startPos = res.IndexOf(">");
+                // find position of the last opening angle bracket
+                int endPos = res.LastIndexOf("<");
+
+                body = res.Substring(0, startPos) + "/>";
+                stanzas = res.Substring(startPos + 1, endPos - startPos - 1);
+            }
+        }
+        
+        #region << Public Methods and Functions >>
+        public override void Connect()
+        {            
+            base.Connect();
+
+            Init();
+            FireOnConnect();
+
+            RequestBoshSession();            
+        }
+
+        public override void Disconnect()
+        {
+            base.Disconnect();
+
+            FireOnDisconnect();            
+            //m_Connected = false;
+        }
+
+        public override void Send(byte[] bData)
+        {
+            base.Send(bData);
+
+            Send(Encoding.UTF8.GetString(bData, 0, bData.Length));
+        }
+
+
+        public override void Send(string data)
+        {
+            base.Send(data);
+
+            // This are hacks because we send no stream headers and footer in Bosh
+            if (data.StartsWith("<stream:stream"))
+            {
+                if (!streamStarted && !restart)
+                    streamStarted = true;
+                else
+                {
+                    byte[] bin = Encoding.UTF8.GetBytes(DummyStreamHeader);
+                    base.FireOnReceive(bin, bin.Length);
+                }
+                return;
+            }
+            
+            if (data.EndsWith("</stream:stream>"))
+            {
+                protocol.client.Presence pres = new protocol.client.Presence();
+                pres.Type = agsXMPP.protocol.client.PresenceType.unavailable;
+                data = pres.ToString(); //= "<presence type='unavailable' xmlns='jabber:client'/>";
+                terminate = true;
+            }
+            //    return;
+
+            lock (m_SendQueue)
+            {
+                m_SendQueue.Enqueue(data);
+            }
+
+            CheckDoRequest();
+            return;
+        }
+        #endregion
+
+        private void CheckDoRequest()
+        {
+            /*
+             * requestIsTerminating is true when a webrequest is ending
+             * when the requests ends a new request gets started immedialtely,
+             * so we don't have to create another request in the case
+             */
+            if (!requestIsTerminating)
+                Request();
+        }
+
+        private void Request()
+        {
+            if (activeRequests < 2)
+                StartWebRequest();
+        }
+
+        private string BuildPostData()
+        {
+            CurrentKeyIdx--;
+            rid++;
+
+            StringBuilder sb = new StringBuilder();
+            
+            Body body = new Body();
+            
+            body.Rid        = rid;            
+            body.Key        = Keys[CurrentKeyIdx];
+
+            if (CurrentKeyIdx == 0)
+            {
+                // this is our last key
+                // Generate a new key sequence
+                GenerateKeys();
+                body.NewKey = Keys[CurrentKeyIdx];
+            }
+
+            body.Sid        = sid;
+            //body.Polling    = 0;
+            body.To = new Jid(m_XmppCon.Server);
+
+            if (restart)
+            {
+                body.XmppRestart = true;
+                restart = false;               
+            }
+
+            lock (m_SendQueue)
+            {
+                if (terminate && m_SendQueue.Count == 1)
+                    body.Type = BoshType.terminate;
+            
+                if (m_SendQueue.Count > 0)
+                {
+                    sb.Append(body.StartTag());
+
+                    while (m_SendQueue.Count > 0)
+                    {
+                        string data = m_SendQueue.Dequeue() as string;
+                        sb.Append(data);
+                    }
+
+                    sb.Append(body.EndTag());
+
+                    return sb.ToString();
+                }
+                else
+                    return body.ToString();
+            }
+        }
+
+        private void StartWebRequest()
+        {
+            StartWebRequest(false, null);
+        }
+
+        private void StartWebRequest(bool retry, string content)
+        {
+            lock (this)
+            {
+                webRequestId++;
+            }           
+                      
+            activeRequests++;
+
+            lastSend = DateTime.Now;
+
+            HttpWebRequest req = (HttpWebRequest) CreateWebrequest(Address);;
+
+            WebRequestState state = new WebRequestState(req);
+            state.Started = DateTime.Now;
+            state.WebRequestId = webRequestId;
+
+            if (!retry)
+                state.Output = BuildPostData();
+            else
+                state.Output = content;
+
+            req.Method          = METHOD;
+            req.ContentType     = CONTENT_TYPE;
+            req.Timeout         = m_Wait * 1000;
+            req.KeepAlive       = m_KeepAlive;       
+            req.ContentLength   = Encoding.UTF8.GetBytes(state.Output).Length;
+            
+            // Create the delegate that invokes methods for the timer.            
+            TimerCallback timerDelegate = TimeOutGetRequestStream;
+            Timer timeoutTimer = new Timer(timerDelegate, state, WEBREQUEST_TIMEOUT, WEBREQUEST_TIMEOUT);
+            state.TimeOutTimer = timeoutTimer;
+            
+            try
+            {
+                req.BeginGetRequestStream(OnGetRequestStream, state);                
+            }
+            catch(Exception ex)
+            {
+                //Console.WriteLine(ex.Message);
+            }
+        }
+
+        public void TimeOutGetRequestStream(Object stateObj)
+        {
+
+            //Console.WriteLine("Web Request timed out");
+
+            WebRequestState state = stateObj as WebRequestState;
+            state.TimeOutTimer.Dispose();
+            state.Aborted = true;
+            state.WebRequest.Abort();
+        }
+
+        private void OnGetRequestStream(IAsyncResult ar)
+        {
+            try
+            {
+                WebRequestState state = ar.AsyncState as WebRequestState;
+
+                if (state.Aborted)
+                {
+                    activeRequests--;
+                    StartWebRequest(true, state.Output);
+                }
+                else
+                {
+                    state.TimeOutTimer.Dispose();
+                    HttpWebRequest req = state.WebRequest as HttpWebRequest;
+
+                    Stream requestStream = req.EndGetRequestStream(ar);
+                    state.RequestStream = requestStream;
+                    byte[] bytes = Encoding.UTF8.GetBytes(state.Output);
+                    requestStream.BeginWrite(bytes, 0, bytes.Length, OnEndWrite, state);
+                }
+            }
+            catch (Exception ex)
+            {
+                activeRequests--;
+
+                WebRequestState state = ar.AsyncState as WebRequestState;
+                StartWebRequest(true, state.Output);
+            }
+        }
+
+        private void OnEndWrite(IAsyncResult ar)
+        {
+            WebRequestState state = ar.AsyncState as WebRequestState;
+
+            HttpWebRequest req      = state.WebRequest as HttpWebRequest;
+            Stream requestStream    = state.RequestStream;
+
+            requestStream.EndWrite(ar);
+            requestStream.Close();
+            
+            IAsyncResult result;
+            
+            try
+            {
+                if (state.IsSessionRequest)
+                    req.BeginGetResponse(OnGetSessionRequestResponse, state);            
+                else
+                    req.BeginGetResponse(OnGetResponse, state);     
+               
+            }
+            catch (Exception ex)
+            {
+                //Console.WriteLine(ex.Message);
+            }
+        }
+
+        private void OnGetResponse(IAsyncResult ar)
+        {
+            try
+            {
+                requestIsTerminating = true;
+                // grab the custom state object
+                WebRequestState state = (WebRequestState)ar.AsyncState;
+                HttpWebRequest request = (HttpWebRequest)state.WebRequest;               
+                HttpWebResponse resp = null;
+
+                if (request.HaveResponse)
+                {                   
+                    // TODO, its crashing mostly here
+                    // get the Response
+                    try
+                    {
+                        resp = (HttpWebResponse) request.EndGetResponse(ar);
+                    }
+                    catch (WebException ex)
+                    {
+                        activeRequests--;
+                        requestIsTerminating = false;
+                        if (ex.Response == null)
+                        {
+                            StartWebRequest();
+                        }
+                        else
+                        {
+                            HttpWebResponse res = ex.Response as HttpWebResponse;
+                            if (res.StatusCode == HttpStatusCode.NotFound)
+                            {
+                                TerminateBoshSession();
+                            }
+                        }
+                        return;
+                    }
+
+                    // The server must always return a 200 response code,
+                    // sending any session errors as specially-formatted identifiers.
+                    if (resp.StatusCode != HttpStatusCode.OK)
+                    {
+                        activeRequests--;
+                        requestIsTerminating = false;
+                        if (resp.StatusCode == HttpStatusCode.NotFound)
+                        {
+                            //Console.WriteLine("Not Found");
+                            TerminateBoshSession();
+                        }
+                        return;
+                    }
+                }
+                else
+                {
+                    //Console.WriteLine("No response");
+                }
+
+                Stream rs = resp.GetResponseStream();
+
+                int readlen;
+                byte[] readbuf = new byte[1024];
+                MemoryStream ms = new MemoryStream();
+                while ((readlen = rs.Read(readbuf, 0, readbuf.Length)) > 0)
+                {
+                    ms.Write(readbuf, 0, readlen);
+                }
+
+                byte[] recv = ms.ToArray();
+
+                if (recv.Length > 0)
+                {
+                    string sbody = null;
+                    string stanzas = null;
+
+                    ParseResponse(Encoding.UTF8.GetString(recv, 0, recv.Length), ref sbody, ref stanzas);
+
+                    if (stanzas != null)
+                    {
+                        byte[] bStanzas = Encoding.UTF8.GetBytes(stanzas);
+                        base.FireOnReceive(bStanzas, bStanzas.Length);
+                    }
+                    else
+                    {
+                        if (sbody != null)
+                        {
+                            var doc = new Document();
+                            doc.LoadXml(sbody);
+                            if (doc.RootElement != null)
+                            {
+                                var body = doc.RootElement as Body;
+                                if (body.Type == BoshType.terminate)
+                                    TerminateBoshSession();
+                            }
+                        }
+
+                        if (terminate && !terminated)
+                        {
+                            // empty teminate response
+                            TerminateBoshSession();
+                        }
+                    }
+                }
+
+                // cleanup webrequest resources
+                ms.Close();
+                rs.Close();
+                resp.Close();
+
+                activeRequests--;
+                requestIsTerminating = false;
+
+                //if (activeRequests == 0 && !terminated)
+                if ( (activeRequests == 0 && !terminated)
+                    || (activeRequests == 1 && m_SendQueue.Count > 0) )
+                {                    
+                    StartWebRequest();
+                }
+            }
+            catch (Exception ex)
+            {
+                
+            }
+        }
+
+        private WebRequest CreateWebrequest(string address)
+        {
+            WebRequest webReq = WebRequest.Create(address);
+#if !CF_2
+            if (m_Proxy != null)
+                webReq.Proxy = m_Proxy;
+            else
+            {
+                if (webReq.Proxy != null)
+                    webReq.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
+            }
+            
+#endif
+            return webReq;
+        } 
+
+        private void TerminateBoshSession()
+        {
+            // empty teminate response
+            byte[] bStanzas = Encoding.UTF8.GetBytes("</stream:stream>");
+            base.FireOnReceive(bStanzas, bStanzas.Length);
+            terminated = true;
+        }
+    }    
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/CertificateVerifier.cs b/lib/agsxmpp/agsxmpp/Net/CertificateVerifier.cs
new file mode 100644
index 0000000..3b75084
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/CertificateVerifier.cs
@@ -0,0 +1,45 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2008 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#if BCCRYPTO
+using System;
+
+using Org.BouncyCastle.Crypto.Tls;
+
+namespace agsXMPP.net
+{
+    internal class CertificateVerifier : ICertificateVerifyer
+    {
+        internal event BaseSocket.CertificateValidationCallback OnVerifyCertificate;
+        #region ICertificateVerifyer Members
+        
+        public bool IsValid(Org.BouncyCastle.Asn1.X509.X509CertificateStructure[] certs)
+        {
+            if (OnVerifyCertificate != null)
+                return OnVerifyCertificate(certs);
+            else           
+                return true;
+        }
+
+        #endregion
+    }
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/ClientSocket.cs b/lib/agsxmpp/agsxmpp/Net/ClientSocket.cs
new file mode 100644
index 0000000..bc43919
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/ClientSocket.cs
@@ -0,0 +1,613 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using System.IO;
+using System.Text;
+using System.Configuration;
+using System.Collections;
+using System.Diagnostics;
+
+using Starksoft.Net.Proxy;
+
+#if SSL
+using System.Net.Security;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+#endif
+
+#if BCCRYPTO
+using Org.BouncyCastle.Crypto.Tls;
+#endif
+
+using agsXMPP.IO.Compression;
+
+using agsXMPP;
+
+namespace agsXMPP.Net
+{
+    public class ConnectTimeoutException : Exception
+    {
+        public ConnectTimeoutException(string message)
+            : base(message)
+        {
+        }
+    }
+
+    /// <summary>
+    /// Use async sockets to connect, send and receive data over TCP sockets.
+    /// </summary>
+    public class ClientSocket : BaseSocket
+    {
+        TcpClient _socket;
+#if SSL	
+        SslStream           m_SSLStream;
+#endif
+        NetworkStream m_Stream;
+        Stream m_NetworkStream = null;
+
+
+        const int BUFFERSIZE = 1024;
+        private byte[] m_ReadBuffer = null;
+
+        private bool m_SSL = false;
+
+        private bool m_PendingSend = false;
+        private Queue m_SendQueue = new Queue();
+
+        /// <summary>
+        /// is compression used for this connection
+        /// </summary>
+        private bool m_Compressed = false;
+
+        /// <summary>
+        /// is used to compress data
+        /// </summary>
+        private Deflater deflater = null;
+        /// <summary>
+        /// is used to decompress data
+        /// </summary>
+        private Inflater inflater = null;
+  
+        public IProxyClient Proxy { get; set; }
+
+        #region << Constructor >>
+        public ClientSocket()
+        {
+
+        }
+        #endregion
+
+        #region << Properties >>
+        public bool SSL
+        {
+            get { return m_SSL; }
+#if SSL
+			set	{ m_SSL = value; }
+#endif
+        }
+
+        public override bool SupportsStartTls
+        {
+#if SSL
+			get
+			{
+				return true;
+			}
+#else
+            get
+            {
+                return false;
+            }
+#endif
+        }
+
+        /// <summary>
+        /// Returns true if the socket is connected to the server. The property 
+        /// Socket.Connected does not always indicate if the socket is currently 
+        /// connected, this polls the socket to determine the latest connection state.
+        /// </summary>
+        public override bool Connected
+        {
+            get
+            {
+                // return right away if have not created socket
+                if (_socket == null)
+                    return false;
+
+                return _socket.Connected;
+
+                // commented this out because it caused problems on some machines.
+                // return the connected property of the socket now
+
+                //the socket is not connected if the Connected property is false
+                //if (!_socket.Connected)
+                //    return false;
+
+                //// there is no guarantee that the socket is connected even if the
+                //// Connected property is true
+                //try
+                //{
+                //    // poll for error to see if socket is connected
+                //    return !_socket.Poll(1, SelectMode.SelectError);
+                //}
+                //catch
+                //{
+                //    return false;
+                //}
+            }
+        }
+
+        public bool Compressed
+        {
+            get { return m_Compressed; }
+            set { m_Compressed = value; }
+        }
+        #endregion
+
+        /// <summary>
+        /// Connect to the specified address and port number.
+        /// </summary>
+        public void Connect(string address, int port)
+        {
+            Address = address;
+            Port = port;
+
+            Connect();
+        }
+
+        public override void Connect()
+        {
+            base.Connect();
+
+            // Socket is never compressed at startup
+            m_Compressed = false;
+
+            m_ReadBuffer = null;
+            m_ReadBuffer = new byte[BUFFERSIZE];
+
+            try
+            {
+                _socket = new TcpClient();
+                _socket.NoDelay = true;
+                _socket.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1);
+                // set timeout, after this the connection will be aborted
+                _socket.ReceiveTimeout = 600 * 1000;
+                _socket.SendTimeout = 600 * 1000;
+                if (Proxy != null) {
+                    _socket.Connect(Proxy.ProxyHost, Proxy.ProxyPort);
+                    Proxy.TcpClient = _socket;
+                    Proxy.CreateConnection(Address, Port);
+                } else {
+                    _socket.Connect(Address, Port);
+                }
+                m_Stream = _socket.GetStream();
+
+                m_NetworkStream = m_Stream;
+
+#if SSL
+                if (m_SSL)
+                    InitSSL();
+#endif
+
+                FireOnConnect();
+
+                // Setup Receive Callback
+                this.Receive();
+            }
+            catch (Exception ex)
+            {
+                base.FireOnError(ex);
+            }
+        }
+
+#if SSL
+		/// <summary>
+		/// Starts TLS on a "normal" connection
+		/// </summary>
+		public override bool StartTls()
+		{
+			base.StartTls();
+			
+            SslProtocols protocol = SslProtocols.Tls;
+			return InitSSL(protocol);
+		}           
+
+		
+		private bool InitSSL()
+		{
+            return InitSSL(SslProtocols.Default);
+		}        
+        
+        /// <summary>
+		/// 
+		/// </summary>
+		/// <param name="protocol"></param>		
+        private bool InitSSL(SslProtocols protocol)
+		{            
+			m_SSLStream = new SslStream(
+                m_Stream,
+                false,
+                new RemoteCertificateValidationCallback(ValidateCertificate),
+                null
+                );			
+            try
+            {
+                m_SSLStream.AuthenticateAsClient(base.Address, null, protocol, true);
+                // Display the properties and settings for the authenticated stream.
+                //DisplaySecurityLevel(m_SSLStream);
+                //DisplaySecurityServices(m_SSLStream);
+                //DisplayCertificateInformation(m_SSLStream);
+                //DisplayStreamProperties(m_SSLStream);
+
+            } 
+            catch (AuthenticationException e)
+            {
+                
+                if (e.InnerException != null)
+                {
+                    //Console.WriteLine("Inner exception: {0}", e.InnerException.Message);
+                }
+                //Console.WriteLine ("Authentication failed - closing the connection.");
+                //client.Close();
+                Disconnect();
+                return false;
+            }
+
+            m_NetworkStream = m_SSLStream;
+			m_SSL = true;
+            
+            return true;
+		}
+
+
+        #region << SSL Properties Display stuff >>
+
+        private void DisplaySecurityLevel(SslStream stream)
+        {
+            Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength);
+            Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength);
+            Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength);
+            Console.WriteLine("Protocol: {0}", stream.SslProtocol);
+        }
+
+        private void DisplaySecurityServices(SslStream stream)
+        {
+            Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
+            Console.WriteLine("IsSigned: {0}", stream.IsSigned);
+            Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
+        }
+        
+        private void DisplayStreamProperties(SslStream stream)
+        {
+            Console.WriteLine("Can read: {0}, write {1}", stream.CanRead, stream.CanWrite);
+            Console.WriteLine("Can timeout: {0}", stream.CanTimeout);
+        }
+
+        private void DisplayCertificateInformation(SslStream stream)
+        {
+            //Console.WriteLine("Certificate revocation list checked: {0}", stream.CheckCertRevocationStatus);
+            // Display the properties of the client's certificate.
+            X509Certificate remoteCertificate = stream.RemoteCertificate;
+            if (stream.RemoteCertificate != null)
+            {
+                Console.WriteLine("Remote cert was issued to {0} and is valid from {1} until {2}.",
+                    remoteCertificate.Subject,
+                    remoteCertificate.GetEffectiveDateString(),
+                    remoteCertificate.GetExpirationDateString());
+            }
+            else
+            {
+                Console.WriteLine("Remote certificate is null.");
+            }
+        }
+               
+        #endregion
+
+        /// <summary>
+		/// Validate the SSL certificate here
+		/// for now we dont stop the SSL connection an return always true
+		/// </summary>
+		/// <param name="certificate"></param>
+		/// <param name="certificateErrors"></param>
+		/// <returns></returns>
+		//private bool ValidateCertificate (X509Certificate certificate, int[] certificateErrors) 
+        private bool ValidateCertificate (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
+		{
+			return base.FireOnValidateCertificate(sender, certificate, chain, sslPolicyErrors);
+		}
+#endif
+#if BCCRYPTO
+        /// <summary>
+        /// Starts TLS on a "normal" connection
+        /// </summary>
+        public override void StartTls()
+        {
+            base.StartTls();
+
+            //TlsProtocolHandler protocolHandler = new TlsProtocolHandler(m_NetworkStream, m_NetworkStream);
+            //Stream st = new NetworkStream(_socket, false);
+            TlsProtocolHandler protocolHandler = new TlsProtocolHandler(m_Stream, m_Stream);
+            //TlsProtocolHandler protocolHandler = new TlsProtocolHandler(st, st);
+
+            CertificateVerifier certVerify = new CertificateVerifier();
+            certVerify.OnVerifyCertificate += new CertificateValidationCallback(certVerify_OnVerifyCertificate);
+
+            protocolHandler.Connect(certVerify);
+
+            m_NetworkStream = new SslStream(protocolHandler.InputStream, protocolHandler.OutputStream);
+            m_SSL = true;
+        }
+
+        internal bool certVerify_OnVerifyCertificate(Org.BouncyCastle.Asn1.X509.X509CertificateStructure[] certs)
+        {
+            return base.FireOnValidateCertificate(certs);
+        }
+#endif
+
+        /// <summary>
+        /// Start Compression on the socket
+        /// </summary>
+        public override void StartCompression()
+        {
+            InitCompression();
+        }
+
+        /// <summary>
+        /// Initialize compression stuff (Inflater, Deflater)
+        /// </summary>
+        private void InitCompression()
+        {
+            base.StartCompression();
+
+            inflater = new Inflater();
+            deflater = new Deflater();
+
+            // Set the compressed flag to true when we init compression
+            m_Compressed = true;
+        }
+
+        /// <summary>
+        /// Disconnect from the server.
+        /// </summary>
+        public override void Disconnect()
+        {
+            base.Disconnect();
+
+            lock (this)
+            {
+                // TODO maybe we should notify the user which packets were not sent.
+                m_PendingSend = false;
+                m_SendQueue.Clear();
+            }
+
+            // return right away if have not created socket
+            if (_socket == null)
+                return;
+
+            try
+            {
+                // close the socket which terminates any pending
+                // async operations
+                _socket.Close();
+            }
+            catch { }
+
+            FireOnDisconnect();
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="data"></param>
+        public override void Send(string data)
+        {
+            Send(Encoding.UTF8.GetBytes(data));
+        }
+
+        /// <summary>
+        /// Send data to the server.
+        /// </summary>
+        public override void Send(byte[] bData)
+        {
+            lock (this)
+            {
+                try
+                {
+                    base.FireOnSend(bData, bData.Length);
+
+                    //Console.WriteLine("Socket OnSend: " + System.Text.Encoding.UTF8.GetString(bData, 0, bData.Length));
+
+                    // compress bytes if we are on a compressed socket
+                    if (m_Compressed)
+                    {
+                        byte[] tmpData = new byte[bData.Length];
+                        bData.CopyTo(tmpData, 0);
+
+                        bData = Compress(bData);
+
+                        // for compression debug statistics
+                        // base.FireOnOutgoingCompressionDebug(this, bData, bData.Length, tmpData, tmpData.Length);
+                    }
+
+                    // .NET 2.0 SSL Stream issues when sending multiple async packets
+                    // http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124213&SiteID=1
+                    if (m_PendingSend)
+                    {
+                        m_SendQueue.Enqueue(bData);
+                    }
+                    else
+                    {
+                        m_PendingSend = true;
+                        try
+                        {
+                            m_NetworkStream.BeginWrite(bData, 0, bData.Length, new AsyncCallback(EndSend), null);
+                        }
+                        catch (Exception)
+                        {
+                            Disconnect();
+                        }
+                    }
+                }
+                catch (Exception)
+                {
+
+                }
+            }
+        }
+
+        /// <summary>
+        /// Read data from server.
+        /// </summary>
+        private void Receive()
+        {
+            m_NetworkStream.BeginRead(m_ReadBuffer, 0, BUFFERSIZE, new AsyncCallback(EndReceive), null);
+        }
+
+        private void EndReceive(IAsyncResult ar)
+        {
+            try
+            {
+                int nBytes;
+                nBytes = m_NetworkStream.EndRead(ar);
+                if (nBytes > 0)
+                {
+                    // uncompress Data if we are on a compressed socket
+                    if (m_Compressed)
+                    {
+                        byte[] buf = Decompress(m_ReadBuffer, nBytes);
+                        base.FireOnReceive(buf, buf.Length);
+                        // for compression debug statistics
+                        //base.FireOnInComingCompressionDebug(this, m_ReadBuffer, nBytes, buf, buf.Length);
+                    }
+                    else
+                    {
+                        //Console.WriteLine("Socket OnReceive: " + System.Text.Encoding.UTF8.GetString(m_ReadBuffer, 0, nBytes));                        
+                        // Raise the receive event
+                        base.FireOnReceive(m_ReadBuffer, nBytes);
+                    }
+                    // Setup next Receive Callback
+                    if (this.Connected)
+                        this.Receive();
+                }
+                else
+                {
+                    Disconnect();
+                }
+            }
+            catch (ObjectDisposedException)
+            {
+                //object already disposed, just exit
+                return;
+            }
+            catch (System.IO.IOException ex)
+            {
+                //Console.WriteLine("\nSocket Exception: " + ex.Message);
+                Disconnect();
+            }
+        }
+
+        private void EndSend(IAsyncResult ar)
+        {
+            lock (this)
+            {
+                try
+                {
+                    m_NetworkStream.EndWrite(ar);
+                    if (m_SendQueue.Count > 0)
+                    {
+                        byte[] bData = (byte[])m_SendQueue.Dequeue();
+                        m_NetworkStream.BeginWrite(bData, 0, bData.Length, new AsyncCallback(EndSend), null);
+                    }
+                    else
+                    {
+                        m_PendingSend = false;
+                    }
+                }
+                catch (Exception)
+                {
+                    Disconnect();
+                }
+            }
+        }
+
+        #region << compression functions >>
+        /// <summary>
+        /// Compress bytes
+        /// </summary>
+        /// <param name="bIn"></param>
+        /// <returns></returns>
+        private byte[] Compress(byte[] bIn)
+        {
+            int ret;
+
+            // The Flush SHOULD be after each STANZA
+            // The libds sends always one complete XML Element/stanza,
+            // it doesn't cache stanza and send them in groups, and also doesnt send partial
+            // stanzas. So everything should be ok here.
+            deflater.SetInput(bIn);
+            deflater.Flush();
+
+            MemoryStream ms = new MemoryStream();
+            do
+            {
+                byte[] buf = new byte[BUFFERSIZE];
+                ret = deflater.Deflate(buf);
+                if (ret > 0)
+                    ms.Write(buf, 0, ret);
+
+            } while (ret > 0);
+
+            return ms.ToArray();
+
+        }
+
+        /// <summary>
+        /// Decompress bytes
+        /// </summary>
+        /// <param name="bIn"></param>
+        /// <param name="length"></param>
+        /// <returns></returns>
+        private byte[] Decompress(byte[] bIn, int length)
+        {
+            int ret;
+
+            inflater.SetInput(bIn, 0, length);
+
+            MemoryStream ms = new MemoryStream();
+            do
+            {
+                byte[] buf = new byte[BUFFERSIZE];
+                ret = inflater.Inflate(buf);
+                if (ret > 0)
+                    ms.Write(buf, 0, ret);
+
+            } while (ret > 0);
+
+            return ms.ToArray();
+        }
+
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Enums.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Enums.cs
new file mode 100644
index 0000000..2fb0ee5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Enums.cs
@@ -0,0 +1,148 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// The DNS TYPE (RFC1035 3.2.2/3).  Not all are supported
+	/// </summary>
+	public enum DnsType
+	{
+		None = 0,
+        /// <summary>
+        /// a host address
+        /// </summary>
+        ANAME = 1,
+
+        /// <summary>
+        /// an authoritative name server
+        /// </summary>
+        NS = 2,
+        //	MD    = 3,  Obsolete
+        //	MF    = 5,  Obsolete
+
+        /// <summary>
+        /// the canonical name for an alias
+        /// </summary>
+        CNAME = 5,
+
+        /// <summary>
+        /// marks the start of a zone of authority
+        /// </summary>
+        SOA = 6,
+        //	MB    = 7,  EXPERIMENTAL
+        //	MG    = 8,  EXPERIMENTAL
+        //  MR    = 9,  EXPERIMENTAL
+        //	NULL  = 10, EXPERIMENTAL
+        /// <summary>
+        /// a well known service description
+        /// </summary>
+        WKS = 11,
+
+        /// <summary>
+        /// a domain name pointer
+        /// </summary>
+        PTR = 12,
+
+        /// <summary>
+        /// host information
+        /// </summary>
+        HINFO = 13,
+
+        /// <summary>
+        /// mailbox or mail list information
+        /// </summary>
+        MINFO = 14,
+
+        /// <summary>
+        /// mail exchange
+        /// </summary>
+        MX = 15,
+
+        /// <summary>
+        /// text strings
+        /// </summary>
+        TXT = 16,
+
+        /// <summary>
+        /// SRV Records
+        /// </summary>
+        SRV = 33,
+	}
+
+	/// <summary>
+	/// The DNS CLASS (RFC1035 3.2.4/5)
+	/// Internet will be the one we'll be using (IN), the others are for completeness
+	/// </summary>
+	public enum DnsClass
+	{
+		None = 0,
+        IN = 1,
+        CS = 2,
+        CH = 3,
+        HS = 4
+	}
+
+	/// <summary>
+	/// (RFC1035 4.1.1) These are the return codes the server can send back
+	/// </summary>
+	public enum ReturnCode
+	{
+		Success = 0,
+		FormatError = 1,
+		ServerFailure = 2,
+		NameError = 3,
+		NotImplemented = 4,
+		Refused = 5,
+		Other = 6
+	}
+
+	/// <summary>
+	/// (RFC1035 4.1.1) These are the Query Types which apply to all questions in a request
+	/// </summary>
+	public enum Opcode
+	{
+		StandardQuery = 0,
+		InverseQuery = 1,
+		StatusRequest = 2,
+		Reserved3 = 3,
+		Reserved4 = 4,
+		Reserved5 = 5,
+		Reserved6 = 6,
+		Reserved7 = 7,
+		Reserved8 = 8,
+		Reserved9 = 9,
+		Reserved10 = 10,
+		Reserved11 = 11,
+		Reserved12 = 12,
+		Reserved13 = 13,
+		Reserved14 = 14,
+		Reserved15 = 15,
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/IPConfigurationInformation.cs b/lib/agsxmpp/agsxmpp/Net/Dns/IPConfigurationInformation.cs
new file mode 100644
index 0000000..67a1b25
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/IPConfigurationInformation.cs
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+using System.Collections.Generic;
+using System.Net;
+using System.Net.NetworkInformation;
+
+namespace agsXMPP.Net.Dns
+{
+    /// <summary>
+    /// Summary description for IPConfigurationInformation.
+    /// </summary>
+    public class IPConfigurationInformation
+    {
+        public static List<IPAddress> DnsServers
+        {
+            get
+            {
+                var dnsServers = new List<IPAddress>();
+                var interfaces = NetworkInterface.GetAllNetworkInterfaces();
+                foreach (var eth in interfaces)
+                {
+                    if (eth.OperationalStatus == OperationalStatus.Up)
+                    {
+                        var ethProperties = eth.GetIPProperties();
+                        var dnsHosts = ethProperties.DnsAddresses;
+                        dnsServers.AddRange(dnsHosts);
+                    }
+                }
+                return dnsServers;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/InvalidResponseException.cs b/lib/agsxmpp/agsxmpp/Net/Dns/InvalidResponseException.cs
new file mode 100644
index 0000000..3180e1d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/InvalidResponseException.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Thrown when the server delivers a response we are not expecting to hear
+	/// </summary>	
+	public class InvalidResponseException : SystemException
+	{
+		public InvalidResponseException()
+		{
+			// no implementation
+		}
+
+		public InvalidResponseException(Exception innerException) :  base(null, innerException) 
+		{
+			// no implementation
+		}
+
+		public InvalidResponseException(string message, Exception innerException) : base (message, innerException)
+		{
+			// no implementation
+		}
+        
+        //protected InvalidResponseException(SerializationInfo info, StreamingContext context) : base(info, context)
+        //{
+        //    // no implementation
+        //}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/NoResponseException.cs b/lib/agsxmpp/agsxmpp/Net/Dns/NoResponseException.cs
new file mode 100644
index 0000000..635eb91
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/NoResponseException.cs
@@ -0,0 +1,52 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Thrown when the server does not respond
+	/// </summary>	
+	public class NoResponseException : SystemException
+	{
+		public NoResponseException()
+		{
+			// no implementation
+		}
+
+		public NoResponseException(Exception innerException) :  base(null, innerException) 
+		{
+			// no implementation
+		}
+
+		public NoResponseException(string message, Exception innerException) : base (message, innerException)
+		{
+			// no implementation
+		}
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Pointer.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Pointer.cs
new file mode 100644
index 0000000..ea564b5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Pointer.cs
@@ -0,0 +1,184 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Logical representation of a pointer, but in fact a byte array reference and a position in it. This
+	/// is used to read logical units (bytes, shorts, integers, domain names etc.) from a byte array, keeping
+	/// the pointer updated and pointing to the next record. This type of Pointer can be considered the logical
+	/// equivalent of an (unsigned char*) in C++
+	/// </summary>
+	internal class Pointer
+	{
+		// a pointer is a reference to the message and an index
+		private byte[]		_message;
+        private int         _position;
+              
+
+		// pointers can only be created by passing on an existing message
+		public Pointer(byte[] message, int position)
+		{
+			_message = message;
+			_position = position;
+		}
+        
+        public int Position
+        {
+            get { return _position; }
+            set { _position = value; }
+        }
+
+		/// <summary>
+		/// Shallow copy function
+		/// </summary>
+		/// <returns></returns>
+		public Pointer Copy()
+		{
+			return new Pointer(_message, _position);
+		}
+
+		/// <summary>
+		/// Adjust the pointers position within the message
+		/// </summary>
+		/// <param name="position">new position in the message</param>
+		public void SetPosition(int position)
+		{
+			_position = position;
+		}
+
+		/// <summary>
+		/// Overloads the + operator to allow advancing the pointer by so many bytes
+		/// </summary>
+		/// <param name="pointer">the initial pointer</param>
+		/// <param name="offset">the offset to add to the pointer in bytes</param>
+		/// <returns>a reference to a new pointer moved forward by offset bytes</returns>
+		public static Pointer operator+(Pointer pointer, int offset)
+		{
+			return new Pointer(pointer._message, pointer._position + offset);
+		}
+
+		/// <summary>
+		/// Reads a single byte at the current pointer, does not advance pointer
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public byte Peek()
+		{
+			return _message[_position];
+		}
+
+		/// <summary>
+		/// Reads a single byte at the current pointer, advancing pointer
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public byte ReadByte()
+		{
+			return _message[_position++];
+		}
+
+		/// <summary>
+		/// Reads two bytes to form a short at the current pointer, advancing pointer
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public short ReadShort()
+		{
+			return (short)(ReadByte()<<8 | ReadByte());
+		}
+
+		/// <summary>
+		/// Reads four bytes to form a int at the current pointer, advancing pointer
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public int ReadInt()
+		{
+			return (ushort)ReadShort()<<16 | (ushort)ReadShort();
+		}
+        
+		/// <summary>
+		/// Reads a single byte as a char at the current pointer, advancing pointer
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public char ReadChar()
+		{
+			return (char)ReadByte();
+		}
+
+		/// <summary>
+		/// Reads a domain name from the byte array. The method by which this works is described
+		/// in RFC1035 - 4.1.4. Essentially to minimise the size of the message, if part of a domain
+		/// name already been seen in the message, rather than repeating it, a pointer to the existing
+		/// definition is used. Each word in a domain name is a label, and is preceded by its length
+		/// 
+		/// eg. bigdevelopments.co.uk
+		/// 
+		/// is [15] (size of bigdevelopments) + "bigdevelopments"
+		///    [2]  "co"
+		///    [2]  "uk"
+		///    [1]  0 (NULL)
+		/// </summary>
+		/// <returns>the byte at the pointer</returns>
+		public string ReadDomain()
+		{
+			StringBuilder domain = new StringBuilder();
+			int length = 0;
+		
+			// get  the length of the first label
+			while ((length = ReadByte()) != 0)
+			{
+				// top 2 bits set denotes domain name compression and to reference elsewhere
+				if ((length & 0xc0) == 0xc0)
+				{
+					// work out the existing domain name, copy this pointer
+					Pointer newPointer = Copy();
+						
+					// and move it to where specified here
+					newPointer.SetPosition((length & 0x3f)<<8 | ReadByte());
+
+					// repeat call recursively
+					domain.Append(newPointer.ReadDomain());
+					return domain.ToString();
+				}
+
+				// if not using compression, copy a char at a time to the domain name
+				while (length > 0)
+				{
+					domain.Append(ReadChar());
+					length--;
+				}
+
+				// if size of next label isn't null (end of domain name) add a period ready for next label
+				if (Peek() != 0) domain.Append('.');
+			}
+
+			// and return
+			return domain.ToString();
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Question.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Question.cs
new file mode 100644
index 0000000..35f136f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Question.cs
@@ -0,0 +1,100 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+using System.Text.RegularExpressions;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Represents a DNS Question, comprising of a domain to query, the type of query (QTYPE) and the class
+	/// of query (QCLASS). This class is an encapsulation of these three things, and extensive argument checking
+	/// in the constructor as this may well be created outside the assembly (public protection)
+	/// </summary>	
+	public class Question
+	{
+		// A question is these three things combined
+		private readonly string		_domain;
+		private readonly DnsType	_dnsType;
+		private readonly DnsClass	_dnsClass;
+
+		// expose them read/only to the world
+		public string	Domain		{ get { return _domain;		}}
+		public DnsType	Type		{ get { return _dnsType;	}}
+		public DnsClass	Class		{ get { return _dnsClass;	}}
+
+		/// <summary>
+		/// Construct the question from parameters, checking for safety
+		/// </summary>
+		/// <param name="domain">the domain name to query eg. bigdevelopments.co.uk</param>
+		/// <param name="dnsType">the QTYPE of query eg. DnsType.MX</param>
+		/// <param name="dnsClass">the CLASS of query, invariably DnsClass.IN</param>
+		public Question(string domain, DnsType dnsType, DnsClass dnsClass)
+		{
+			// check the input parameters
+			if (domain == null) 
+                throw new ArgumentNullException("domain");
+
+			// do a sanity check on the domain name to make sure its legal
+			if (domain.Length ==0 || domain.Length>255 || !Regex.IsMatch(domain, @"^[a-z|A-Z|0-9|\-|_]{1,63}(\.[a-z|A-Z|0-9|\-|_]{1,63})+$"))
+			{
+				// domain names can't be bigger tan 255 chars, and individal labels can't be bigger than 63 chars
+				throw new ArgumentException("The supplied domain name was not in the correct form", "domain");
+			}
+
+			// sanity check the DnsType parameter
+			if (!Enum.IsDefined(typeof(DnsType), dnsType) || dnsType == DnsType.None)
+			{
+				throw new ArgumentOutOfRangeException("dnsType");
+			}
+
+			// sanity check the DnsClass parameter
+			if (!Enum.IsDefined(typeof(DnsClass), dnsClass) || dnsClass == DnsClass.None)
+			{                
+				throw new ArgumentOutOfRangeException("dnsClass");
+			}
+
+			// just remember the values
+			_domain = domain;
+			_dnsType = dnsType;
+			_dnsClass = dnsClass;
+		}
+
+		/// <summary>
+		/// Construct the question reading from a DNS Server response. Consult RFC1035 4.1.2
+		/// for byte-wise details of this structure in byte array form
+		/// </summary>
+		/// <param name="pointer">a logical pointer to the Question in byte array form</param>
+		internal Question(Pointer pointer)
+		{
+			// extract from the message
+			_domain = pointer.ReadDomain();
+			_dnsType = (DnsType)pointer.ReadShort();
+			_dnsClass = (DnsClass)pointer.ReadShort();
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/RecordBase.cs b/lib/agsxmpp/agsxmpp/Net/Dns/RecordBase.cs
new file mode 100644
index 0000000..ee30006
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/RecordBase.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// A simple base class for the different ResourceRecords, ANAME, MX, SOA, NS etc.
+	/// </summary>
+	public abstract class RecordBase
+	{
+		// no implementation
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Request.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Request.cs
new file mode 100644
index 0000000..8bc81a5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Request.cs
@@ -0,0 +1,176 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+using System.Net;
+using System.Net.Sockets;
+using System.Collections;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// A Request logically consists of a number of questions to ask the DNS Server. Create a request and
+	/// add questions to it, then pass the request to Resolver.Lookup to query the DNS Server. It is important
+	/// to note that many DNS Servers DO NOT SUPPORT MORE THAN 1 QUESTION PER REQUEST, and it is advised that
+	/// you only add one question to a request. If not ensure you check Response.ReturnCode to see what the
+	/// server has to say about it.
+	/// </summary>
+	public class Request
+	{
+		// A request is a series of questions, an 'opcode' (RFC1035 4.1.1) and a flag to denote
+		// whether recursion is required (don't ask..., just assume it is)
+		private ArrayList	_questions;
+		private bool		_recursionDesired;
+		private Opcode		_opCode;
+
+		public bool RecursionDesired
+		{
+			get { return _recursionDesired;		}
+			set { _recursionDesired = value;	}
+		}
+
+		public Opcode Opcode
+		{
+			get { return _opCode;				}
+			set { _opCode = value;				}
+		}
+
+		/// <summary>
+		/// Construct this object with the default values and create an ArrayList to hold
+		/// the questions as they are added
+		/// </summary>
+		public Request()
+		{
+			// default for a request is that recursion is desired and using standard query
+			_recursionDesired = true;
+			_opCode = Opcode.StandardQuery;
+
+			// create an expandable list of questions
+			_questions = new ArrayList();
+
+		}
+		
+		/// <summary>
+		/// Adds a question to the request to be sent to the DNS server.
+		/// </summary>
+		/// <param name="question">The question to add to the request</param>
+		public void AddQuestion(Question question)
+		{
+			// abandon if null
+			if (question == null) throw new ArgumentNullException("question");
+
+			// add this question to our collection
+			_questions.Add(question);
+		}
+
+		/// <summary>
+		/// Convert this request into a byte array ready to send direct to the DNS server
+		/// </summary>
+		/// <returns></returns>
+		public byte[] GetMessage()
+		{
+			// construct a message for this request. This will be a byte array but we're using
+			// an arraylist as we don't know how big it will be
+			ArrayList data = new ArrayList();
+			
+			// the id of this message - this will be filled in by the resolver
+			data.Add((byte)0);
+			data.Add((byte)0);
+			
+			// write the bitfields
+			data.Add((byte)(((byte)_opCode<<3)  | (_recursionDesired?0x01:0)));
+			data.Add((byte)0);
+
+			// tell it how many questions
+			unchecked
+			{
+				data.Add((byte)(_questions.Count >> 8));
+				data.Add((byte)_questions.Count);
+			}
+			
+			// the are no requests, name servers or additional records in a request
+			data.Add((byte)0); data.Add((byte)0);
+			data.Add((byte)0); data.Add((byte)0);
+			data.Add((byte)0); data.Add((byte)0);
+
+			// that's the header done - now add the questions
+			foreach (Question question in _questions)
+			{
+				AddDomain(data, question.Domain);
+				unchecked
+				{
+					data.Add((byte)0);
+					data.Add((byte)question.Type);
+					data.Add((byte)0);
+					data.Add((byte)question.Class);
+				}
+			}
+
+			// and convert that to an array
+			byte[] message = new byte[data.Count];
+			data.CopyTo(message);
+			return message;
+		}
+
+		/// <summary>
+		/// Adds a domain name to the ArrayList of bytes. This implementation does not use
+		/// the domain name compression used in the class Pointer - maybe it should.
+		/// </summary>
+		/// <param name="data">The ArrayList representing the byte array message</param>
+		/// <param name="domainName">the domain name to encode and add to the array</param>
+		private static void AddDomain(ArrayList data, string domainName)
+		{
+			int position = 0;
+			int length = 0;
+
+			// start from the beginning and go to the end
+			while (position < domainName.Length)
+			{
+				// look for a period, after where we are
+				length = domainName.IndexOf('.', position) - position;
+				
+				// if there isn't one then this labels length is to the end of the string
+				if (length < 0) length = domainName.Length - position;
+				
+				// add the length
+				data.Add((byte)length);
+
+				// copy a char at a time to the array
+				while (length-- > 0)
+				{
+					data.Add((byte)domainName[position++]);
+				}
+
+				// step over '.'
+				position++;
+			}
+				
+			// end of domain names
+			data.Add((byte)0);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Resolver.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Resolver.cs
new file mode 100644
index 0000000..d64c56e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Resolver.cs
@@ -0,0 +1,197 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+using System.Collections;
+using System.Net;
+using System.Net.Sockets;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Summary description for Dns.
+	/// </summary>
+	public sealed class Resolver
+	{
+		const   int		_dnsPort            = 53;
+		const   int		_udpRetryAttempts   = 2;
+		static  int		_uniqueId;
+        const   int     _udpTimeout         = 1000;
+
+		/// <summary>
+		/// Private constructor - this static class should never be instantiated
+		/// </summary>
+        private Resolver()
+        {
+            // no implementation
+        }		
+
+        /// <summary>
+        /// Shorthand form to make SRV querying easier, essentially wraps up the retreival
+        /// of the SRV records, and sorts them by preference
+        /// </summary>
+        /// <param name="domain">domain name to retreive SRV RRs for</param>
+        /// <param name="dnsServer">the server we're going to ask</param>
+        /// <returns>An array of SRVRecords</returns>
+        public static SRVRecord[] SRVLookup(string domain, IPAddress dnsServer)
+        {
+            // check the inputs
+            if (domain == null) throw new ArgumentNullException("domain");
+            if (dnsServer == null)  throw new ArgumentNullException("dnsServer");
+
+            // create a request for this
+            Request request = new Request();
+
+            // add one question - the SRV IN lookup for the supplied domain
+            request.AddQuestion(new Question(domain, DnsType.SRV, DnsClass.IN));
+
+            // fire it off
+            Response response = Lookup(request, dnsServer);
+
+            // if we didn't get a response, then return null
+            if (response == null) return null;
+            	
+            // create a growable array of SRV records
+            ArrayList resourceRecords = new ArrayList();
+
+            // add each of the answers to the array
+            foreach (Answer answer in response.Answers)
+            {
+                // if the answer is an SRV record
+                if (answer.Type == DnsType.SRV)
+                {
+                   // add it to our array
+                   resourceRecords.Add(answer.Record);
+                }
+            }
+
+            // create array of MX records
+            SRVRecord[] srvRecords = new SRVRecord[resourceRecords.Count];
+
+            // copy from the array list
+            resourceRecords.CopyTo(srvRecords);
+
+            // sort into lowest preference order
+            Array.Sort(srvRecords);
+
+            // and return
+            return srvRecords;
+        }
+
+        /// <summary>
+		/// The principal look up function, which sends a request message to the given
+		/// DNS server and collects a response. This implementation re-sends the message
+		/// via UDP up to two times in the event of no response/packet loss
+		/// </summary>
+		/// <param name="request">The logical request to send to the server</param>
+		/// <param name="dnsServer">The IP address of the DNS server we are querying</param>
+		/// <returns>The logical response from the DNS server or null if no response</returns>
+		public static Response Lookup(Request request, IPAddress dnsServer)
+		{
+			// check the inputs
+			if (request == null) throw new ArgumentNullException("request");
+			if (dnsServer == null) throw new ArgumentNullException("dnsServer");
+			
+			// We will not catch exceptions here, rather just refer them to the caller
+
+			// create an end point to communicate with
+			IPEndPoint server = new IPEndPoint(dnsServer, _dnsPort);
+		
+			// get the message
+			byte[] requestMessage = request.GetMessage();
+
+			// send the request and get the response
+			byte[] responseMessage = UdpTransfer(server, requestMessage);
+
+			// and populate a response object from that and return it
+			return new Response(responseMessage);
+		}
+
+		private static byte[] UdpTransfer(IPEndPoint server, byte[] requestMessage)
+		{
+			// UDP can fail - if it does try again keeping track of how many attempts we've made
+			int attempts = 0;
+
+			// try repeatedly in case of failure
+			while (attempts <= _udpRetryAttempts)
+			{
+				// firstly, uniquely mark this request with an id
+				unchecked
+				{
+					// substitute in an id unique to this lookup, the request has no idea about this
+					requestMessage[0] = (byte)(_uniqueId >> 8);
+					requestMessage[1] = (byte)_uniqueId;
+				}
+
+				// we'll be send and receiving a UDP packet
+				Socket socket;
+                if (Socket.OSSupportsIPv6 && (server.AddressFamily == AddressFamily.InterNetworkV6))
+                    socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp); // V6
+                else
+                    socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
+			
+				// we will wait at most 1 second for a dns reply
+				socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, _udpTimeout);
+
+				// send it off to the server
+				socket.SendTo(requestMessage, requestMessage.Length, SocketFlags.None, server);
+		
+				// RFC1035 states that the maximum size of a UDP datagram is 512 octets (bytes)
+				byte[] responseMessage = new byte[512];              
+           
+				try
+				{                    
+					// wait for a response upto 1 second
+					socket.Receive(responseMessage);
+
+					// make sure the message returned is ours
+					if (responseMessage[0] == requestMessage[0] && responseMessage[1] == requestMessage[1])
+					{
+						// its a valid response - return it, this is our successful exit point
+						return responseMessage;
+					}
+				}
+				catch (SocketException)
+				{
+					// failure - we better try again, but remember how many attempts
+					attempts++;
+				}
+				finally
+				{
+					// increase the unique id
+					_uniqueId++;
+
+					// close the socket
+					socket.Close();
+				}
+			}
+		
+			// the operation has failed, this is our unsuccessful exit point
+			throw new NoResponseException();
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/ResourceRecord.cs b/lib/agsxmpp/agsxmpp/Net/Dns/ResourceRecord.cs
new file mode 100644
index 0000000..790ffc8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/ResourceRecord.cs
@@ -0,0 +1,117 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Represents a Resource Record as detailed in RFC1035 4.1.3
+	/// </summary>	
+	public class ResourceRecord
+	{
+		// private, constructor initialised fields
+		private readonly string		_domain;
+		private readonly DnsType	_dnsType;
+		private readonly DnsClass	_dnsClass;
+		private readonly int		_Ttl;
+		private readonly RecordBase	_record;
+
+		// read only properties applicable for all records
+		public string Domain
+        { 
+            get { return _domain; }
+        }
+		
+        public DnsType Type
+        {
+            get { return _dnsType; }
+        }
+
+		public DnsClass	Class		   
+        { 
+            get { return _dnsClass;	}
+        }
+		
+        public int Ttl
+        { 
+            get { return _Ttl; }
+        }
+
+		public RecordBase Record
+        { 
+            get { return _record; }
+        }
+
+		/// <summary>
+		/// Construct a resource record from a pointer to a byte array
+		/// </summary>
+		/// <param name="pointer">the position in the byte array of the record</param>
+		internal ResourceRecord(Pointer pointer)
+		{
+			// extract the domain, question type, question class and Ttl
+			_domain     = pointer.ReadDomain();
+			_dnsType    = (DnsType) pointer.ReadShort();
+			_dnsClass   = (DnsClass) pointer.ReadShort();
+			_Ttl        = pointer.ReadInt();
+
+			// the next short is the record length, we only use it for unrecognised record types
+			int recordLength = pointer.ReadShort();
+
+			// and create the appropriate RDATA record based on the dnsType
+			switch (_dnsType)
+			{
+                case DnsType.SRV:
+                    _record = new SRVRecord(pointer);
+                    break;
+				
+                default:
+				{
+					// move the pointer over this unrecognised record
+					pointer.Position += recordLength;
+					break;
+				}
+			}
+		}
+	}
+
+	// Answers, Name Servers and Additional Records all share the same RR format	
+	public class Answer : ResourceRecord
+	{
+		internal Answer(Pointer pointer) : base(pointer) {}
+	}
+    	
+	public class NameServer : ResourceRecord
+	{
+		internal NameServer(Pointer pointer) : base(pointer) {}
+	}
+    	
+	public class AdditionalRecord : ResourceRecord
+	{
+		internal AdditionalRecord(Pointer pointer) : base(pointer) {}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/Response.cs b/lib/agsxmpp/agsxmpp/Net/Dns/Response.cs
new file mode 100644
index 0000000..63068bd
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/Response.cs
@@ -0,0 +1,129 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+//
+// Bdev.Net.Dns by Rob Philpott, Big Developments Ltd. Please send all bugs/enhancements to
+// rob at bigdevelopments.co.uk  This file and the code contained within is freeware and may be
+// distributed and edited without restriction.
+// 
+
+using System;
+using System.Net;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// A Response is a logical representation of the byte data returned from a DNS query
+	/// </summary>
+	public class Response
+	{
+		// these are fields we're interested in from the message
+		private readonly ReturnCode			_returnCode;
+		private readonly bool				_authoritativeAnswer;
+		private readonly bool				_recursionAvailable;
+		private readonly bool				_truncated;
+		private readonly Question[]			_questions;
+		private readonly Answer[]			_answers;
+		private readonly NameServer[]		_nameServers;
+		private readonly AdditionalRecord[]	_additionalRecords;
+
+		// these fields are readonly outside the assembly - use r/o properties
+		public ReturnCode ReturnCode				{ get { return _returnCode;					}}
+		public bool AuthoritativeAnswer				{ get { return _authoritativeAnswer;		}}
+		public bool RecursionAvailable				{ get { return _recursionAvailable;			}}
+		public bool MessageTruncated				{ get { return _truncated;					}}
+		public Question[] Questions					{ get { return _questions;					}}
+		public Answer[] Answers						{ get { return _answers;					}}
+		public NameServer[] NameServers				{ get { return _nameServers;				}}
+		public AdditionalRecord[] AdditionalRecords	{ get { return _additionalRecords;			}}
+
+		/// <summary>
+		/// Construct a Response object from the supplied byte array
+		/// </summary>
+		/// <param name="message">a byte array returned from a DNS server query</param>
+		internal Response(byte[] message)
+		{
+			// the bit flags are in bytes 2 and 3
+			byte flags1 = message[2];
+			byte flags2 = message[3];
+
+			// get return code from lowest 4 bits of byte 3
+			int returnCode = flags2 & 15;
+				
+			// if its in the reserved section, set to other
+			if (returnCode > 6) returnCode = 6;
+			_returnCode = (ReturnCode)returnCode;
+
+			// other bit flags
+			_authoritativeAnswer = ((flags1 & 4) != 0);
+			_recursionAvailable = ((flags2 & 128) != 0);
+			_truncated = ((flags1 & 2) != 0);
+
+			// create the arrays of response objects
+			_questions = new Question[GetShort(message, 4)];
+			_answers = new Answer[GetShort(message, 6)];
+			_nameServers = new NameServer[GetShort(message, 8)];
+			_additionalRecords = new AdditionalRecord[GetShort(message, 10)];
+
+			// need a pointer to do this, position just after the header
+			Pointer pointer = new Pointer(message, 12);
+
+			// and now populate them, they always follow this order
+			for (int index = 0; index < _questions.Length; index++)
+			{
+				try
+				{
+					// try to build a quesion from the response
+					_questions[index] = new Question(pointer);
+				}
+				catch (Exception ex)
+				{
+					// something grim has happened, we can't continue
+					throw new InvalidResponseException(ex);
+				}
+			}
+			for (int index = 0; index < _answers.Length; index++)
+			{
+				_answers[index] = new Answer(pointer);
+			}
+			for (int index = 0; index < _nameServers.Length; index++)
+			{
+				_nameServers[index] = new NameServer(pointer);
+			}
+			for (int index = 0; index < _additionalRecords.Length; index++)
+			{
+				_additionalRecords[index] = new AdditionalRecord(pointer);
+			}
+		}
+	
+		/// <summary>
+		/// Convert 2 bytes to a short. It would have been nice to use BitConverter for this,
+		/// it however reads the bytes in the wrong order (at least on Windows)
+		/// </summary>
+		/// <param name="message">byte array to look in</param>
+		/// <param name="position">position to look at</param>
+		/// <returns>short representation of the two bytes</returns>
+		private static short GetShort(byte[] message, int position)
+		{
+			return (short)(message[position]<<8 | message[position+1]);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/Dns/SRVRecord.cs b/lib/agsxmpp/agsxmpp/Net/Dns/SRVRecord.cs
new file mode 100644
index 0000000..afcce8a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/Dns/SRVRecord.cs
@@ -0,0 +1,100 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Net.Dns
+{
+	/// <summary>
+	/// Summary description for SRVRecord.
+	/// </summary>
+   public class SRVRecord : RecordBase, IComparable
+   {
+       /// <summary>
+       /// Constructs a NS record by reading bytes from a return message
+       /// </summary>
+       /// <param name="pointer">A logical pointer to the bytes holding the record</param>
+       internal SRVRecord(Pointer pointer)
+       {
+           m_Priority = pointer.ReadShort();
+           m_Weight = pointer.ReadShort();
+           m_Port = pointer.ReadShort();
+           m_Target = pointer.ReadDomain();
+       }
+           
+        // the fields exposed outside the assembly
+        private int     m_Priority;
+        private int     m_Weight;
+        private int     m_Port;
+        private string  m_Target;
+
+        public int Priority	
+        { 
+          get { return m_Priority; } 
+        }
+
+        public int Weight	
+        { 
+          get { return m_Weight; } 
+        }
+
+        public int Port
+        { 
+          get { return m_Port; } 
+        }
+      
+        public string Target	
+        { 
+            get { return m_Target; } 
+        }
+				
+        public override string ToString()
+        {
+			return string.Format("\n   priority   = {0}\n   weight     = {1}\n   port       = {2}\n   target     = {3}",
+            m_Priority,
+            m_Weight,
+            m_Port,
+            m_Target);
+        }
+
+        /// <summary>
+        /// Implements the IComparable interface so that we can sort the SRV records by their
+        /// lowest priority
+        /// </summary>
+        /// <param name="other">the other SRVRecord to compare against</param>
+        /// <returns>1, 0, -1</returns>
+        public int CompareTo(object obj)
+        {
+            SRVRecord srvOther = (SRVRecord)obj;
+
+            // we want to be able to sort them by priority from lowest to highest.
+            if (m_Priority < srvOther.m_Priority) return -1;
+            if (m_Priority > srvOther.m_Priority) return 1;
+
+            // if the priority is the same, sort by highest weight to lowest (higher
+            // weighting means that server should get more of the requests)
+            if (m_Weight > srvOther.m_Weight) return -1;
+            if (m_Weight < srvOther.m_Weight) return 1;
+
+            return 0;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/PollClientSocket.cs b/lib/agsxmpp/agsxmpp/Net/PollClientSocket.cs
new file mode 100644
index 0000000..b7f8c5b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/PollClientSocket.cs
@@ -0,0 +1,442 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Threading;
+using System.Collections;
+using System.Security.Cryptography;
+
+#if CF
+using agsXMPP.util;
+#endif
+
+namespace agsXMPP.Net
+{
+	/// <summary>
+	/// JEP-0025 Jabber HTTP Polling Socket
+	/// </summary>
+	public class PollClientSocket : BaseSocket
+	{
+		private const	string	CONTENT_TYPE	= "application/x-www-form-urlencoded";
+		private const	string	METHOD			= "POST";
+		
+		private string[]		m_Keys;		
+		private int				m_CurrentKeyIdx;
+		private	string			m_ID			= null;		
+		private Queue			m_SendQueue		= new Queue();
+
+        /// <summary>
+        /// Object for synchronizing threads
+        /// </summary>
+		private Object			m_Lock			= new Object();
+#if CF || CF_2
+		private DateTime		m_WaitUntil;
+#endif
+		
+		public PollClientSocket()
+		{            
+		}
+
+		#region << Properties and Members >>
+		private bool			m_Connected		= false;
+		private int				m_Interval		= 10000;
+#if !CF
+		private int				m_CountKeys		= 256;
+#else
+		// set this lower on embedded devices because the key generation is slow there
+		private int				m_CountKeys		= 32;
+#endif
+		private WebProxy		m_Proxy			= null;
+
+		/// <summary>
+		/// because the client socket is no presintant socket we return always true
+		/// </summary>
+		public override bool Connected
+		{
+			get { return true; }
+		}
+
+		/// <summary>
+		/// Poll interval in milliseconds.	
+		/// The maximum interval recommended for clients between requests is two minutes (120000);
+		/// Default is 10 seconds (10000)
+		/// </summary>
+		public int Interval
+		{
+			get { return m_Interval; }
+			set { m_Interval = value;}
+		}
+
+		/// <summary>
+		/// count of keys to generate each time. Keys are generated with the Sha1 algoritm.
+		/// You can reduce the num,ber of keys to gemerate each time if your device is to slow on generating the keys
+		/// or you want to save memory.
+		/// 256 is the default value, 32 on CF
+		/// </summary>
+		public int CountKeys
+		{
+			get { return m_CountKeys; }
+			set { m_CountKeys = value;}
+		}
+
+		public WebProxy Proxy
+		{
+			get { return m_Proxy; }
+			set { m_Proxy = value; }
+		}
+		#endregion
+
+		#region << Public Methods and Functions >>
+		public override void Connect()
+		{			
+			base.Connect();
+
+			FireOnConnect();
+
+			Init();
+
+			m_Connected		= true;
+
+			// Start a new Thread for polling
+			Thread m_thread = new Thread(new ThreadStart(PollThread));
+#if !CF
+			// useful in debug
+			m_thread.Name			= "HTTP Polling Thread";
+#endif
+			m_thread.Start();
+		}
+
+		public override void Disconnect()
+		{
+			base.Disconnect();
+
+			FireOnDisconnect();
+
+			m_Connected = false;
+		}
+
+		public override void Send(byte[] bData)
+		{
+			base.Send (bData);
+
+			Send(Encoding.UTF8.GetString(bData, 0, bData.Length));
+		}
+
+
+		public override void Send(string data)
+		{
+			base.Send (data);
+#if CF || CF_2
+            lock (m_Lock)
+            {
+                m_SendQueue.Enqueue(data);
+            }		
+#else			
+            lock(m_Lock)
+			{
+				m_SendQueue.Enqueue(data);
+				Monitor.Pulse(m_Lock);
+			}
+#endif
+        }
+		#endregion
+
+		private void Init()
+		{
+			m_ID			= null;
+			m_Keys			= null;
+			m_CurrentKeyIdx	= 0;
+		}
+
+		/// <summary>
+		/// Simple algotithm for generating a random key
+		/// </summary>
+		/// <returns></returns>
+		private string GenerateRandomKey()
+		{
+			// Lenght of the Session ID on bytes,
+			// 16 bytes equaly 32 chars
+			// This should be unique enough
+			int m_lenght = 16;		
+
+			RandomNumberGenerator RNG = RandomNumberGenerator.Create();
+
+			byte[] buf = new byte[m_lenght];
+			RNG.GetBytes(buf);
+			
+			return Util.Hash.HexToString(buf).ToLower();
+		}
+
+		/// <summary>
+		/// Generates a bunch of keys
+		/// </summary>
+		private void GenerateKeys()
+		{			
+			string prev = GenerateRandomKey();		
+			m_Keys = new string[m_CountKeys];
+			
+			for (int i=0; i < m_CountKeys; i++)
+			{
+				byte[] hash = Util.Hash.Sha1HashBytes(prev);
+				m_Keys[i] = Convert.ToBase64String(hash, 0, hash.Length);
+				prev = m_Keys[i];
+			}
+			m_CurrentKeyIdx = m_CountKeys - 1;
+		}
+
+		private void PollThread()
+		{
+			/*
+			Example 7. Initial request (with keys)
+
+			POST /wc12/webclient HTTP/1.1
+			Content-Type: application/x-www-form-urlencoded
+			Host: webim.jabber.com
+
+			0;VvxEk07IFy6hUmG/PPBlTLE2fiA=,<stream:stream to="jabber.com"
+			xmlns="jabber:client"
+			xmlns:stream="http://etherx.jabber.org/streams">
+			
+			
+			POST /wc12/webclient HTTP/1.1
+			Content-Type: application/x-www-form-urlencoded
+			Host: webim.jabber.com
+
+			7776:2054;moPFsvHytDGiJQOjp186AMXAeP0=,<iq type="get" id="WEBCLIENT3">
+			<query xmlns="jabber:iq:auth">
+				<username>hildjj</username>
+			</query>
+			</iq>
+			*/		
+			
+			while(m_Connected)
+			{
+				string content;
+				string data;
+
+				//				lock(m_lock)
+				//				{
+				if (m_SendQueue.Count > 0)
+					data = m_SendQueue.Dequeue() as string;
+				else
+					data = "";
+				//				}
+			
+				if (m_ID == null)
+				{
+					GenerateKeys();
+					content = string.Format("{0};{1},{2}", "0", m_Keys[m_CurrentKeyIdx], data);
+				}
+				else
+				{
+					if (m_CurrentKeyIdx == 0)
+					{
+						// only 1 Key left
+						string key = m_Keys[0];
+						// generate new keys
+						GenerateKeys();
+						/*
+						Example 9. Changing key
+
+						POST /wc12/webclient HTTP/1.1
+						Content-Type: application/x-www-form-urlencoded
+						Host: webim.jabber.com
+
+						7776:2054;C+7Hteo/D9vJXQ3UfzxbwnXaijM=;Tr697Eff02+32FZp38Xaq2+3Bv4=,<presence/>    
+						*/
+						content = string.Format("{0};{1};{2},{3}", m_ID, key, m_Keys[m_CurrentKeyIdx], data);
+
+					}
+					else
+					{
+						// m_CurrentKey = CreateNextKey(m_CurrentKey);
+						content = string.Format("{0};{1},{2}", m_ID, m_Keys[m_CurrentKeyIdx], data);
+					}
+				}
+				//Console.WriteLine("used Key index: " + m_CurrentKeyIdx.ToString());
+				m_CurrentKeyIdx--;				
+
+				byte[] bytes = Encoding.UTF8.GetBytes(content);
+
+				FireOnSend(bytes, bytes.Length);
+			
+				HttpWebRequest req	= (HttpWebRequest) WebRequest.Create(Address);
+				
+				// Set Proxy Information
+				if (m_Proxy != null)
+					req.Proxy = m_Proxy;
+		
+				req.Method          = METHOD;
+				//req.KeepAlive		= true;
+				req.ContentType     = CONTENT_TYPE;
+				req.ContentLength	= bytes.Length;
+				req.Timeout         = 5000;
+
+                Stream outputStream;
+                try
+                {
+                    outputStream = req.GetRequestStream();
+                }
+                catch (Exception ex)
+                {
+                    base.FireOnError(ex);
+                    Disconnect();
+                    return;
+                }
+				
+
+				outputStream.Write (bytes, 0, bytes.Length);
+		
+				outputStream.Close ();			
+		
+				// This does the Webrequest. So catch errors here
+				HttpWebResponse resp;
+				try
+				{
+					 resp = (HttpWebResponse) req.GetResponse();
+				}
+				catch(Exception ex)
+				{
+					FireOnError(ex);
+					return;
+				}
+
+				// The server must always return a 200 response code,
+				// sending any session errors as specially-formatted identifiers.
+				if (resp.StatusCode != HttpStatusCode.OK)
+				{
+					FireOnError(new PollSocketException("unexpected status code " + resp.StatusCode.ToString()));
+					return;
+				}
+
+				Stream rs = resp.GetResponseStream();
+
+				int readlen;
+				byte[] readbuf = new byte[1024];
+				MemoryStream ms = new MemoryStream();
+				while ((readlen = rs.Read(readbuf, 0, readbuf.Length)) > 0)
+				{
+					ms.Write(readbuf, 0, readlen);
+				}
+		
+				byte[] recv = ms.ToArray();
+
+				// Read Cookies from Header
+				// Set-Cookie: ID=7776:2054; path=/webclient/; expires=-1
+				WebHeaderCollection headers = resp.Headers;
+            
+				// Check for any cookies
+				// Didnt get the .NET CookieCollection classes working correct
+				// So read it by hand, i cookie is only another simple header
+				if (headers["Set-Cookie"] != null)
+				{
+					string header = headers["Set-Cookie"];
+					string[] cookies = header.Split( (char) ';');
+			
+					Hashtable htCookies = new Hashtable();
+					foreach(string cookie in cookies)
+					{
+						string[] vals = cookie.Split( (char) '=');
+						if (vals.Length == 2)					
+							htCookies.Add(vals[0], vals[1]);				
+					}
+
+					if (htCookies.ContainsKey("ID"))
+					{
+						string id = htCookies["ID"] as string;
+						// if ID ends with its an error message
+						if ( !id.EndsWith(":0"))
+						{
+							// if me dont have the ID yet cache it
+							if (m_ID == null)
+								m_ID = id;
+						}
+						else
+						{
+							// Handle Errors
+							switch (id)
+							{
+								case "0:0":
+									// 3.1.1 Unknown Error
+									// Server returns ID=0:0.
+									// The response body can contain a textual error message.									
+									return;
+								case "-1:0":
+									// 3.1.2 Server Error
+									// Server returns ID=-1:0
+									return;
+								case "-2:0":
+									// 3.1.3 Bad Request
+									// Server returns ID=-2:0
+									return;
+								case "-3:0":
+									// 3.1.4 Key Sequence Error
+									// Server returns ID=-3:0
+									return;
+							}
+						}
+					}
+				}
+
+                // cleanup webrequest resources
+                ms.Close();
+                rs.Close();
+                resp.Close();
+
+				if (recv.Length > 0)
+				{
+					//Console.WriteLine("RECV: " + Encoding.UTF8.GetString(recv));
+					FireOnReceive(recv, recv.Length);
+				}
+				else
+				{
+					// We received nothing in the response, 
+					// so sleep until next poll
+#if CF || CF_2
+					if (m_SendQueue.Count == 0)
+					{							
+						m_WaitUntil = DateTime.Now.AddMilliseconds(m_Interval);
+						while (m_SendQueue.Count == 0 && DateTime.Compare(m_WaitUntil, DateTime.Now) > 0)
+						{							
+							Thread.Sleep(100);
+						}
+					}					
+#else
+					lock(m_Lock)
+					{
+						if (m_SendQueue.Count == 0)
+						{
+                            // Left for debugging
+							//Console.WriteLine("Start Wait: " + m_Interval.ToString());							
+							Monitor.Wait(m_Lock, m_Interval);							
+							//Console.WriteLine("End Wait:");
+						}
+					}
+#endif
+				}
+								
+			}			
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/PollingSocketException.cs b/lib/agsxmpp/agsxmpp/Net/PollingSocketException.cs
new file mode 100644
index 0000000..7d97254
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/PollingSocketException.cs
@@ -0,0 +1,35 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Net
+{
+	/// <summary>
+	/// Summary description for PollingSocketException.
+	/// </summary>
+	public class PollSocketException : Exception
+	{
+		public PollSocketException(string msg) : base(msg)
+		{			
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/SocketConnectionType.cs b/lib/agsxmpp/agsxmpp/Net/SocketConnectionType.cs
new file mode 100644
index 0000000..6062672
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/SocketConnectionType.cs
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.Net
+{
+	/// <summary>
+	/// Summary description for SocketType.
+	/// </summary>
+	public enum SocketConnectionType
+	{
+#if !SL
+		/// <summary>
+		/// Direct TCP/IP Connection
+		/// </summary>
+		Direct,
+#endif	
+		/// <summary>
+		/// A HTTP Polling Socket connection (JEP-0025)
+		/// </summary>
+		HttpPolling,
+
+        /// <summary>
+        /// <para>XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)</para>
+        /// <para>http://www.xmpp.org/extensions/xep-0124.html</para>
+        /// </summary>
+        Bosh
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Net/SslStream.cs b/lib/agsxmpp/agsxmpp/Net/SslStream.cs
new file mode 100644
index 0000000..a13697d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/SslStream.cs
@@ -0,0 +1,214 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2008 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#if BCCRYPTO
+using System;
+using System.IO;
+
+using System.Threading;
+
+namespace agsXMPP.net
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class SslStream : Stream
+    {
+        Stream inStream;
+        Stream outStream;
+
+        public SslStream(Stream inputStream, Stream outputStream)
+        {
+            inStream    = inputStream;
+            outStream   = outputStream;
+        }
+
+        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
+        {
+            //return inStream.BeginRead(buffer, offset, count, callback, state);
+
+            //if (!this.CanRead)
+            //{
+            //   // __Error.ReadNotSupported();
+            //}
+            SynchronousAsyncResult ar = new SynchronousAsyncResult(state, false);
+            try
+            {
+                //int num = Read(buffer, offset, count);
+                int num = inStream.Read(buffer, offset, count);
+                ar.m_NumRead = num;
+                ar.m_IsCompleted = true;
+                //ar._waitHandle.Set();
+            }
+            catch (IOException exception)
+            {
+                //ar._exception = exception;
+            }
+            if (callback != null)
+            {
+                callback(ar);
+            }
+            return ar;
+
+        }
+
+        public override int EndRead(IAsyncResult asyncResult)
+        {
+            //return inStream.EndRead(asyncResult);
+
+            if (asyncResult == null)
+            {
+                throw new ArgumentNullException("asyncResult");
+            }
+            SynchronousAsyncResult result = asyncResult as SynchronousAsyncResult;
+            if ((result == null) || result.IsWrite)
+            {
+                //__Error.WrongAsyncResult();
+            }
+            //if (result._EndXxxCalled)
+            //{
+            //    //__Error.EndReadCalledTwice();
+            //}
+            //result._EndXxxCalled = true;
+            //if (result._exception != null)
+            //{
+            //    throw result._exception;
+            //}
+            return result.m_NumRead;
+
+        }
+       
+        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
+        {            
+            SynchronousAsyncResult ar = new SynchronousAsyncResult(state, true);
+            try
+            {
+                //Write(buffer, offset, count);
+                outStream.Write(buffer, offset, count);
+                ar.m_IsCompleted = true;
+                //ar._waitHandle.Set();
+           
+            }
+            catch (IOException exception)
+            {
+                //ar._exception = exception;
+            }
+            if (callback != null)
+            {
+                callback(ar);
+                //callback.BeginInvoke(ar, null, null);
+            }
+            return ar;
+
+        }
+
+        public override void EndWrite(IAsyncResult asyncResult)
+        {
+            //outStream.EndWrite(asyncResult);
+            if (asyncResult == null)
+            {
+                throw new ArgumentNullException("asyncResult");
+            }
+            SynchronousAsyncResult result = asyncResult as SynchronousAsyncResult;
+            if ((result == null) || !result.IsWrite)
+            {
+                //__Error.WrongAsyncResult();
+            }
+            //if (result._EndXxxCalled)
+            //{
+            //    //__Error.EndWriteCalledTwice();
+            //}
+            //result._EndXxxCalled = true;
+            //if (result._exception != null)
+            //{
+            //    throw result._exception;
+            //}
+        }
+
+        public override bool CanSeek
+        {
+            get { throw new Exception("The method or operation is not implemented."); }
+        }
+
+        public override bool CanRead
+        {
+            get { return inStream.CanRead; }
+        }
+
+        public override bool CanWrite
+        {
+            get { return outStream.CanWrite; }
+        }
+
+        public override int Read(byte[] buffer, int offset, int count)
+        {
+            return inStream.Read(buffer, offset, count);
+        }
+
+        public override int ReadByte()
+        {
+            return inStream.ReadByte();
+        }
+
+        public override void Write(byte[] buffer, int offset, int count)
+        {
+            outStream.Write(buffer, offset, count);
+        }
+
+        public override void WriteByte(byte value)
+        {
+            outStream.WriteByte(value);
+        }
+
+        public override long Length
+        {
+            get { throw new Exception("The method or operation is not implemented."); }
+        }
+
+        public override void Flush()
+        {
+            throw new Exception("The method or operation is not implemented.");
+        }
+
+        public override long Position
+        {
+            get
+            {
+                throw new Exception("The method or operation is not implemented.");
+            }
+            set
+            {
+                throw new Exception("The method or operation is not implemented.");
+            }
+        }
+
+        public override long Seek(long offset, SeekOrigin origin)
+        {
+            throw new Exception("The method or operation is not implemented.");
+        }
+
+        public override void SetLength(long value)
+        {
+            throw new Exception("The method or operation is not implemented.");
+        }
+    }
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Net/SynchronousAsyncResult.cs b/lib/agsxmpp/agsxmpp/Net/SynchronousAsyncResult.cs
new file mode 100644
index 0000000..236b49c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Net/SynchronousAsyncResult.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2008 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Threading;
+
+namespace agsXMPP.net
+{
+    internal class SynchronousAsyncResult : IAsyncResult
+    {
+        /*   
+        object AsyncState { get; }      
+        WaitHandle AsyncWaitHandle { get; }       
+        bool CompletedSynchronously { get; }    
+        bool IsCompleted { get; }         
+        */
+
+        // Fields        
+        //internal Exception          _exception;
+        internal bool               m_IsCompleted;
+        internal bool               m_IsWrite;
+        internal int                m_NumRead;
+        internal object             m_StateObject;
+        internal ManualResetEvent   m_WaitHandle;
+
+        // Methods
+        internal SynchronousAsyncResult(object asyncStateObject, bool isWrite)
+        {
+            m_StateObject = asyncStateObject;
+            m_IsWrite = isWrite;
+            m_WaitHandle = new ManualResetEvent(false);
+        }
+
+        // Properties
+        public object AsyncState
+        {
+            get { return m_StateObject; }
+        }
+
+        public WaitHandle AsyncWaitHandle
+        {
+            get { return this.m_WaitHandle; }
+        }
+
+        public bool CompletedSynchronously
+        {
+            get { return true; }
+        }
+
+        public bool IsCompleted
+        {
+            get { return this.m_IsCompleted; }
+        }
+
+        internal bool IsWrite
+        {
+            get { return m_IsWrite; }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/PacketGrabber.cs b/lib/agsxmpp/agsxmpp/PacketGrabber.cs
new file mode 100644
index 0000000..f47a2aa
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/PacketGrabber.cs
@@ -0,0 +1,61 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+namespace agsXMPP
+{
+	/// <summary>
+	/// Summary description for Grabber.
+	/// </summary>
+	public class PacketGrabber
+	{
+		internal Hashtable				m_grabbing		= new Hashtable();		
+		internal XmppConnection	        m_connection	= null;
+
+		public PacketGrabber()
+		{
+		}
+
+		public void Clear()
+		{
+			// need locking here to make sure that we dont acces the Hashtable
+			// from another thread
+			lock(this)
+			{
+				m_grabbing.Clear();
+			}
+		}
+
+        /// <summary>
+        /// Pending request can be removed.
+        /// This is useful when a ressource for the callback is destroyed and
+        /// we are not interested anymore at the result.
+        /// </summary>
+        /// <param name="id">ID of the Iq we are not interested anymore</param>
+        public void Remove(string id)
+        {
+            if (m_grabbing.ContainsKey(id))
+                m_grabbing.Remove(id);
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/PresenceGrabber.cs b/lib/agsxmpp/agsxmpp/PresenceGrabber.cs
new file mode 100644
index 0000000..6437a21
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/PresenceGrabber.cs
@@ -0,0 +1,141 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+using agsXMPP.Collections;
+
+namespace agsXMPP
+{	
+	public delegate void PresenceCB(object sender, Presence pres, object data);
+	
+	public class PresenceGrabber : PacketGrabber
+	{
+        /// <summary>
+        /// Initializes a new instance of the <see cref="PresenceGrabber"/> class.
+        /// </summary>
+        /// <param name="conn">The conn.</param>
+		public PresenceGrabber(XmppClientConnection conn)
+		{
+			m_connection		= conn;			
+			conn.OnPresence += new PresenceHandler(m_connection_OnPresence);
+		}
+        
+		public void Add(Jid jid, PresenceCB cb, object cbArg)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    return;
+            }
+
+			TrackerData td = new TrackerData();
+			td.cb		= cb;
+			td.data		= cbArg;
+			td.comparer = new BareJidComparer();
+
+            lock (m_grabbing)
+            {
+                m_grabbing.Add(jid.ToString(), td);
+            }
+		}
+
+        /// <summary>
+        /// Adds the specified jid.
+        /// </summary>
+        /// <param name="jid">The jid.</param>
+        /// <param name="comparer">The comparer.</param>
+        /// <param name="cb">The callback.</param>
+        /// <param name="cbArg">The callback Arguments.</param>
+		public void Add(Jid jid, IComparer comparer, PresenceCB cb, object cbArg)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    return;
+            }
+
+			TrackerData td = new TrackerData();
+			td.cb		= cb;
+			td.data		= cbArg;
+			td.comparer = comparer;
+
+            lock (m_grabbing)
+            {
+                m_grabbing.Add(jid.ToString(), td);
+            }
+		}
+
+		/// <summary>
+		/// Pending request can be removed.
+		/// This is useful when a ressource for the callback is destroyed and
+		/// we are not interested anymore at the result.
+		/// </summary>
+		/// <param name="id">ID of the Iq we are not interested anymore</param>
+		public void Remove(Jid jid)
+		{
+            lock (m_grabbing)
+            {
+                if (m_grabbing.ContainsKey(jid.ToString()))
+                    m_grabbing.Remove(jid.ToString());
+            }
+		}
+
+		private class TrackerData
+		{
+			public PresenceCB	cb;
+			public object		data;
+			// by default the Bare Jid is compared
+			public IComparer	comparer;
+				
+		}
+		
+		/// <summary>
+		/// A presence is received. Now check if its from a Jid we are looking for and
+		/// raise the event in this case.
+		/// </summary>
+		/// <param name="sender"></param>
+		/// <param name="pres"></param>
+		private void m_connection_OnPresence(object sender, Presence pres)
+		{
+			if (pres == null)
+				return;
+			
+			lock (m_grabbing)
+			{
+				IDictionaryEnumerator myEnum = m_grabbing.GetEnumerator();
+
+				while(myEnum.MoveNext())
+				{
+					TrackerData t = myEnum.Value as TrackerData;
+					if (t.comparer.Compare(new Jid((string)myEnum.Key), pres.From) == 0)
+					{
+						// Execute the callback
+						t.cb(this, pres, t.data);
+					}
+				}				
+			}			
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Properties/AssemblyInfo.cs b/lib/agsxmpp/agsxmpp/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..49140f8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Properties/AssemblyInfo.cs
@@ -0,0 +1,80 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+
+[assembly: AssemblyTitle("agsXMPP")]
+[assembly: AssemblyDescription("agsXMPP Library")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("AG-Software")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("AG-Software")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.3.0")]
+[assembly: CLSCompliant(true)]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified - the assembly cannot be signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. 
+//   (*) If the key file and a key name attributes are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP - that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the file is installed into the CSP and used.
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
+
+#if CF
+[assembly: AssemblyKeyFile(@"..\..\key.snk")]
+#endif
+//[assembly: AssemblyKeyName("")]
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Anonymous/AnonymousMechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Anonymous/AnonymousMechanism.cs
new file mode 100644
index 0000000..5317aa2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Anonymous/AnonymousMechanism.cs
@@ -0,0 +1,83 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.Anonymous
+{
+    /// <summary>
+    /// SALS ANONYMOUS Mechanism, this allows anonymous logins to a xmpp server.
+    /// </summary>
+    public class AnonymousMechanism : Mechanism
+    {
+        /*
+            S: <stream:features>
+                    <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+                        <mechanism>DIGEST-MD5<mechanism>
+                        <mechanism>ANONYMOUS<mechanism>
+                    </mechanisms>
+               </stream:features>
+            
+            * So, the proper exchange for this ANONYMOUS mechanism would be:
+
+            C: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>
+            S: <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
+
+            or, in case of the optional trace information:
+
+            C: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'>
+                    c2lyaGM=
+               </auth>
+            S: <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
+
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public AnonymousMechanism()
+        {
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="con"></param>
+        public override void Init(XmppClientConnection con)
+        {            
+            con.Send(new Auth(MechanismType.ANONYMOUS));
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="e"></param>
+        public override void Parse(Node e)
+        {
+            // *No Challenges* in SASL ANONYMOUS
+        }
+    }
+    
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/DigestMD5Mechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/DigestMD5Mechanism.cs
new file mode 100644
index 0000000..38ebfa7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/DigestMD5Mechanism.cs
@@ -0,0 +1,67 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.DigestMD5
+{
+	/// <summary>
+	/// Handels the SASL Digest MD5 authentication
+	/// </summary>
+	public class DigestMD5Mechanism : Mechanism
+	{
+        public DigestMD5Mechanism()
+		{			
+		}
+	
+		public override void Init(XmppClientConnection con)
+		{
+			base.XmppClientConnection = con;
+            base.XmppClientConnection.Send(new protocol.sasl.Auth(protocol.sasl.MechanismType.DIGEST_MD5));			
+		}
+
+		public override void Parse(Node e)
+		{
+			if (e is protocol.sasl.Challenge)
+			{
+				protocol.sasl.Challenge c = e as protocol.sasl.Challenge;
+				
+				Step1 step1 = new Step1(c.TextBase64);
+				if (step1.Rspauth == null)
+				{
+					//response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9ImduYXVjayIscmVhbG09IiIsbm9uY2U9IjM4MDQzMjI1MSIsY25vbmNlPSIxNDE4N2MxMDUyODk3N2RiMjZjOWJhNDE2ZDgwNDI4MSIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9qYWJiZXIucnUiLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9NDcwMTI5NDU4Y2EwOGVjYjhhYTIxY2UzMDhhM2U5Nzc
+					Step2 s2 = new Step2(step1, base.Username, base.Password, base.Server);
+					protocol.sasl.Response r = new agsXMPP.protocol.sasl.Response(s2.ToString());
+                    base.XmppClientConnection.Send(r);
+				}
+				else
+				{
+					// SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
+                    base.XmppClientConnection.Send(new protocol.sasl.Response());
+				}						
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step1.cs b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step1.cs
new file mode 100644
index 0000000..0667490
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step1.cs
@@ -0,0 +1,197 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+//encoded challenge to client: 
+//
+//<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//cmVhbG09InNvbWVyZWFsbSIsbm9uY2U9Ik9BNk1HOXRFUUdtMmhoIixxb3A9ImF1dGgi
+//LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNzCg==
+//</challenge>The decoded challenge is: 
+//
+//realm="somerealm",nonce="OA6MG9tEQGm2hh",qop="auth",charset=utf-8,algorithm=md5-sess
+
+
+namespace agsXMPP.Sasl.DigestMD5
+{
+	/// <summary>
+	/// Summary description for Step1.
+	/// </summary>
+	public class Step1 : DigestMD5Mechanism // Mechanism 
+	{
+        /// <summary>
+        /// Exception occurs when we were unable to parse the challenge
+        /// </summary>
+        public class ChallengeParseException : Exception
+        {
+            public ChallengeParseException(string message) : base(message)
+            {
+            }
+        }
+
+		#region << Constructors >>
+		public Step1()
+		{
+			
+		}
+
+		public Step1(string message)
+		{
+			m_Message = message;
+			Parse(message);
+		}
+		#endregion
+		
+		#region << Properties >>
+		private string	m_Realm;		
+		private string	m_Nonce;		
+		private string	m_Qop;//			= "auth";		
+		private string	m_Charset		= "utf-8";		
+		private string	m_Algorithm;
+		
+		private string	m_Rspauth		= null;
+
+		private string	m_Message;
+
+		public string Realm
+		{
+			get { return m_Realm; }
+			set { m_Realm = value; }
+		}
+
+		public string Nonce
+		{
+			get { return m_Nonce; }
+			set { m_Nonce = value; }
+		}
+
+		public string Qop
+		{
+			get { return m_Qop; }
+			set { m_Qop = value; }
+		}
+
+		public string Charset
+		{
+			get { return m_Charset; }
+			set { m_Charset = value; }
+		}
+
+		public string Algorithm
+		{
+			get { return m_Algorithm; }
+			set { m_Algorithm = value; }
+		}
+		
+		public string Rspauth
+		{
+			get { return m_Rspauth; }
+			set { m_Rspauth = value; }
+		}
+		#endregion
+
+        /*
+            nonce="deqOGux/N6hDPtf9vkGMU5Vzae+zfrqpBIvh6LovbBM=",
+            realm="amessage.de",
+            qop="auth,auth-int,auth-conf",
+            cipher="rc4-40,rc4-56,rc4,des,3des",
+            maxbuf=1024,
+            charset=utf-8,
+            algorithm=md5-sess
+        */
+        private void Parse(string message)
+        {
+            try
+            {
+                int start = 0;
+                int end = 0;
+                while (start < message.Length)
+                {
+                    int equalPos = message.IndexOf('=', start);
+                    if (equalPos > 0)
+                    {
+                        // look if the next char is a quote
+                        if (message.Substring(equalPos + 1, 1) == "\"")
+                        {
+                            // quoted value, find the end now
+                            end = message.IndexOf('"', equalPos + 2);
+                            ParsePair(message.Substring(start, end - start + 1));
+                            start = end + 2;
+                        }
+                        else
+                        {
+                            // value is not quoted, ends at the next comma or end of string   
+                            end = message.IndexOf(',', equalPos + 1);
+                            if (end == -1)
+                                end = message.Length;
+                            
+                            ParsePair(message.Substring(start, end - start));
+
+                            start = end + 1;
+                        }
+                    }
+                }
+            }
+            catch
+            {
+                throw new ChallengeParseException("Unable to parse challenge");
+            }
+        }
+
+        private void ParsePair(string pair)
+        {
+            int equalPos = pair.IndexOf("=");
+            if (equalPos > 0)
+            {
+                string key = pair.Substring(0, equalPos);
+                string data;
+                // is the value quoted?
+                if (pair.Substring(equalPos + 1, 1) == "\"")
+                    data = pair.Substring(equalPos + 2, pair.Length - equalPos - 3);
+                else
+                    data = pair.Substring(equalPos + 1);
+
+                switch (key)
+                {
+                    case "realm":
+                        m_Realm = data;
+                        break;
+                    case "nonce":
+                        m_Nonce = data;
+                        break;
+                    case "qop":
+                        m_Qop = data;
+                        break;
+                    case "charset":
+                        m_Charset = data;
+                        break;
+                    case "algorithm":
+                        m_Algorithm = data;
+                        break;
+                    case "rspauth":
+                        m_Rspauth = data;
+                        break;
+                }
+            }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step2.cs b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step2.cs
new file mode 100644
index 0000000..0ff8f28
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/DigestMD5/Step2.cs
@@ -0,0 +1,335 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.IO;
+using System.Text;
+
+#if CF
+using agsXMPP.util;
+#endif
+using System.Security.Cryptography;
+
+namespace agsXMPP.Sasl.DigestMD5
+{
+	/// <summary>
+	/// Summary description for Step2.
+	/// </summary>
+	public class Step2 : Step1
+	{
+		public Step2()
+		{
+			
+		}
+
+		/// <summary>
+		/// builds a step2 message reply to the given step1 message
+		/// </summary>
+		/// <param name="step1"></param>
+		public Step2(Step1 step1, string username, string password, string server)
+		{
+            this.Nonce		= step1.Nonce;
+            
+            // fixed for SASL n amessage servers (jabberd 1.x)
+            if (SupportsAuth(step1.Qop))
+                this.Qop        = "auth";
+			
+            this.Realm		= step1.Realm;
+			this.Charset	= step1.Charset;
+			this.Algorithm	= step1.Algorithm;
+
+			this.Username	= username;
+			this.Password	= password;
+			this.Server		= server;
+
+			GenerateCnonce();
+			GenerateNc();
+			GenerateDigestUri();
+			GenerateResponse();
+		}
+        
+        /// <summary>
+        /// Does the server support Auth?
+        /// </summary>
+        /// <param name="qop"></param>
+        /// <returns></returns>
+        private bool SupportsAuth(string qop)
+        {
+            string[] auth = qop.Split(',');
+            // This overload was not available in the CF, so updated this to the following
+            //bool ret = Array.IndexOf(auth, "auth") < 0 ? false : true;
+            bool ret = Array.IndexOf(auth, "auth", auth.GetLowerBound(0), auth.Length) < 0 ? false : true;            
+            return ret;
+        }
+        
+        /// <summary>
+		/// parses a message and returns the step2 object
+		/// </summary>
+		/// <param name="message"></param>
+		public Step2(string message)
+		{
+			// TODO, important for server stuff
+		}
+
+		#region << Properties and member variables >>
+		private string m_Cnonce;
+		private string m_Nc;
+		private string m_DigestUri;
+		private string m_Response;
+		private string m_Authzid;
+
+		public string Cnonce
+		{
+			get { return m_Cnonce; }
+			set { m_Cnonce = value; }
+		}
+
+		public string Nc
+		{
+			get { return m_Nc; }
+			set { m_Nc = value; }
+		}
+		
+		public string DigestUri
+		{
+			get { return m_DigestUri; }
+			set { m_DigestUri = value; }
+		}
+
+		public string Response
+		{
+			get { return m_Response; }
+			set { m_Response = value; }
+		}
+
+		public string Authzid
+		{
+			get { return m_Authzid; }
+			set { m_Authzid = value; }
+		}		
+		#endregion
+
+
+		public override string ToString()
+		{
+			return GenerateMessage();
+		}
+	
+
+		private void GenerateCnonce()
+		{
+			// Lenght of the Session ID on bytes,
+			// 32 bytes equaly 64 chars
+			// 16^64 possibilites for the session IDs (4.294.967.296)
+			// This should be unique enough
+			int m_lenght = 32;		
+
+			RandomNumberGenerator RNG = RandomNumberGenerator.Create();
+
+			byte[] buf = new byte[m_lenght];
+			RNG.GetBytes(buf);
+			
+			m_Cnonce = Util.Hash.HexToString(buf).ToLower();
+
+//			m_Cnonce = "e163ceed6cfbf8c1559a9ff373b292c2f926b65719a67a67c69f7f034c50aba3";
+		}
+
+		private void GenerateNc()
+		{
+			int nc = 1;
+			m_Nc = nc.ToString().PadLeft(8,'0');
+		}
+
+		private void GenerateDigestUri()
+		{
+			m_DigestUri = "xmpp/" + base.Server;
+		}
+
+		
+		//	HEX( KD ( HEX(H(A1)),
+		//	{
+		//		nonce-value, ":" nc-value, ":",
+		//		cnonce-value, ":", qop-value, ":", HEX(H(A2)) }))
+		//
+		//	If authzid is specified, then A1 is
+		//
+		//	A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
+		//	":", nonce-value, ":", cnonce-value, ":", authzid-value }
+		//
+		//	If authzid is not specified, then A1 is
+		//
+		//	A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
+		//	":", nonce-value, ":", cnonce-value }
+		//
+		//	where
+		//
+		//	passwd   = *OCTET
+		public void GenerateResponse()
+		{
+			byte[] H1;
+			byte[] H2;
+			byte[] H3;
+			//byte[] temp;
+			string A1;
+			string A2;
+			string A3;
+			string p1;
+			string p2;			
+
+			StringBuilder sb = new StringBuilder();
+			sb.Append(this.Username);
+			sb.Append(":");
+			sb.Append(this.Realm);
+			sb.Append(":");
+			sb.Append(this.Password);
+			
+#if !CF
+			H1 =  new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes(sb.ToString()));
+#else
+			//H1 = Encoding.Default.GetBytes(util.Hash.MD5Hash(sb.ToString()));
+			H1 = util.Hash.MD5Hash(Encoding.UTF8.GetBytes(sb.ToString()));
+#endif
+
+			sb.Remove(0, sb.Length);
+			sb.Append(":");
+			sb.Append(this.Nonce);
+			sb.Append(":");
+			sb.Append(this.Cnonce);
+
+			if (m_Authzid != null)
+			{				
+				sb.Append(":");
+				sb.Append(m_Authzid);
+			}
+			A1 = sb.ToString();
+
+
+//			sb.Remove(0, sb.Length);			
+//			sb.Append(Encoding.Default.GetChars(H1));
+//			//sb.Append(Encoding.ASCII.GetChars(H1));
+//			
+//			sb.Append(A1);			
+			byte[] bA1 = Encoding.ASCII.GetBytes(A1);
+			byte[] bH1A1 = new byte[H1.Length + bA1.Length];
+			
+			//Array.Copy(H1, bH1A1, H1.Length);
+			Array.Copy(H1, 0, bH1A1, 0, H1.Length);
+			Array.Copy(bA1, 0, bH1A1, H1.Length, bA1.Length);
+#if !CF
+			H1 =  new MD5CryptoServiceProvider().ComputeHash(bH1A1);			
+			//Console.WriteLine(util.Hash.HexToString(H1));
+#else
+			//H1 = Encoding.Default.GetBytes(util.Hash.MD5Hash(sb.ToString()));
+			//H1 =util.Hash.MD5Hash(Encoding.Default.GetBytes(sb.ToString()));
+			H1 =util.Hash.MD5Hash(bH1A1);
+#endif
+			sb.Remove(0,sb.Length);
+			sb.Append("AUTHENTICATE:");
+			sb.Append(m_DigestUri);
+			if (this.Qop.CompareTo("auth") != 0)
+			{
+				sb.Append(":00000000000000000000000000000000");
+			}
+			A2 = sb.ToString();
+			H2 = Encoding.ASCII.GetBytes(A2);
+			
+#if !CF
+			H2 = new MD5CryptoServiceProvider().ComputeHash(H2);
+#else
+			//H2 = Encoding.Default.GetBytes(util.Hash.MD5Hash(H2));
+			H2 =util.Hash.MD5Hash(H2);
+#endif            
+			// create p1 and p2 as the hex representation of H1 and H2
+			p1 = Util.Hash.HexToString(H1).ToLower();
+			p2 = Util.Hash.HexToString(H2).ToLower();
+            
+			sb.Remove(0, sb.Length);
+			sb.Append(p1);
+			sb.Append(":");
+			sb.Append(this.Nonce);
+			sb.Append(":");
+			sb.Append(m_Nc);
+			sb.Append(":");
+			sb.Append(this.m_Cnonce);
+			sb.Append(":");
+			sb.Append(base.Qop);
+			sb.Append(":");
+			sb.Append(p2);
+            
+			A3 = sb.ToString();
+#if !CF
+			H3 = new MD5CryptoServiceProvider().ComputeHash(Encoding.ASCII.GetBytes(A3));
+#else
+			//H3 = Encoding.Default.GetBytes(util.Hash.MD5Hash(A3));
+			H3 =util.Hash.MD5Hash(Encoding.ASCII.GetBytes(A3));
+#endif
+			m_Response = Util.Hash.HexToString(H3).ToLower(); 
+		}
+
+		private string GenerateMessage()
+		{			
+			StringBuilder sb = new StringBuilder();
+			sb.Append("username=");
+			sb.Append(AddQuotes(this.Username));
+			sb.Append(",");
+			sb.Append("realm=");
+			sb.Append(AddQuotes(this.Realm));
+			sb.Append(",");
+			sb.Append("nonce=");
+			sb.Append(AddQuotes(this.Nonce));
+			sb.Append(",");
+			sb.Append("cnonce=");
+			sb.Append(AddQuotes(this.Cnonce));
+			sb.Append(",");
+			sb.Append("nc=");
+			sb.Append(this.Nc);
+			sb.Append(",");
+			sb.Append("qop=");
+			sb.Append(base.Qop);
+			sb.Append(",");
+			sb.Append("digest-uri=");
+			sb.Append(AddQuotes(this.DigestUri));			
+			sb.Append(",");
+			sb.Append("charset=");
+			sb.Append(this.Charset);
+			sb.Append(",");
+			sb.Append("response=");
+			sb.Append(this.Response);
+			
+			return sb.ToString();			
+		}
+
+		/// <summary>
+		/// return the given string with quotes
+		/// </summary>
+		/// <param name="s"></param>
+		/// <returns></returns>
+		private string AddQuotes(string s)
+		{
+            // fixed, s can be null (eg. for realm in ejabberd)
+            if (s != null && s.Length > 0)
+                s = s.Replace(@"\", @"\\");
+			
+            string quote = "\"";
+			return quote + s + quote;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/ExtendedData.cs b/lib/agsxmpp/agsxmpp/Sasl/ExtendedData.cs
new file mode 100644
index 0000000..9c064da
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/ExtendedData.cs
@@ -0,0 +1,26 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2009 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+namespace agsXMPP.Sasl
+{
+    public abstract class ExtendedData
+    {
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookExtendedData.cs b/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookExtendedData.cs
new file mode 100644
index 0000000..cab4a41
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookExtendedData.cs
@@ -0,0 +1,28 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2009 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+namespace agsXMPP.Sasl.Facebook
+{
+    public class FacebookExtendedData : ExtendedData
+    {
+        public string ApiKey        {get; set;}
+        public string AccessToken   {get; set;}
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookMechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookMechanism.cs
new file mode 100644
index 0000000..91b7179
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Facebook/FacebookMechanism.cs
@@ -0,0 +1,127 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2009 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.Facebook
+{
+    public class FacebookMechanism : Mechanism
+    {
+        private readonly string callId = new Random().Next().ToString();
+        private const string VERSION = "1.0";
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="con"></param>
+        public override void Init(XmppClientConnection con)
+        {
+            con.Send(new Auth(MechanismType.X_FACEBOOK_PLATFORM));
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="e"></param>
+        public override void Parse(Node e)
+        {
+            if (e is Challenge)
+            {
+                var c = e as Challenge;
+                
+                byte[] bytes = Convert.FromBase64String(c.Value);
+                string msg = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
+                var pairs = ParseMessage(msg);
+                string res = BuildResponse(pairs);
+
+                XmppClientConnection.Send(new Response(ToB64String(res)));
+            }
+        }
+
+        static string ToB64String(string sin)
+        {
+            byte[] msg = Encoding.UTF8.GetBytes(sin);
+            return Convert.ToBase64String(msg, 0, msg.Length);
+        }
+
+        private static Dictionary<string, string> ParseMessage(string msg)
+        {
+            // example:
+            // version=1&method=auth.xmpp_login&nonce=4346B9BFC5A160D46AF25732ACFC7CC3
+            var str = msg.Split('&');
+
+            var dict = new Dictionary<string, string>();
+            foreach (string s in str)
+            {
+                int equalPos = s.IndexOf('=');
+
+                var key = s.Substring(0, equalPos - 0);
+                var val = s.Substring(equalPos + 1);
+                val = System.Uri.UnescapeDataString(val);
+                if (!dict.ContainsKey(key))
+                    dict.Add(key, val);
+            }
+            return dict;
+        }
+
+        private string BuildResponse(Dictionary<string, string> pairs)
+        {
+            /*
+                * string method: Should be the same as the method specified by the server.
+                * string api_key: The application key associated with the calling application.
+                * string session_key: The session key of the logged in user.
+                * float call_id: The request's sequence number.
+                * string sig: An MD5 hash of the current request and your secret key.
+                * string v: This must be set to 1.0 to use this version of the API.
+                * string format: Optional - Ignored.
+                * string cnonce: Optional - Client-selected nonce. Ignored.
+                * string nonce: Should be the same as the nonce specified by the server.
+    
+                creates the response array, new, without session_key and sig
+                http://developers.facebook.com/blog/post/555/
+                https://developers.facebook.com/docs/chat/
+                $resp_array = array(
+                    'method' => $challenge_array['method'],
+                    'nonce' => $challenge_array['nonce'],
+                    'access_token' => $access_token,
+                    'api_key' => $options['app_id'],
+                    'call_id' => 0,
+                    'v' => '1.0',
+                );
+            */
+
+            var extData = ExtentedData as FacebookExtendedData;
+
+            string res = "";
+            res = res + "method=" + System.Uri.EscapeDataString(pairs["method"]);
+            res = res + "&api_key=" + System.Uri.EscapeDataString(extData.ApiKey);
+            res = res + "&access_token=" + System.Uri.EscapeDataString(extData.AccessToken);
+            res = res + "&v=" + System.Uri.EscapeDataString(VERSION);
+            res = res + "&call_id=" + System.Uri.EscapeDataString(callId);
+            res = res + "&nonce=" + System.Uri.EscapeDataString(pairs["nonce"]);
+
+            return res;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Gssapi/GssapiMechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Gssapi/GssapiMechanism.cs
new file mode 100644
index 0000000..b0e5f09
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Gssapi/GssapiMechanism.cs
@@ -0,0 +1,111 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2009 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#if !MONO
+using System;
+using System.Security.Principal;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.Gssapi
+{
+    /// <summary>
+    /// Handels the SASL Digest MD5 authentication
+    /// </summary>
+    public class GssapiMechanism : Mechanism
+    {
+        SSPIHelper sspiHelper;
+        
+        public GssapiMechanism()
+        {
+        }
+
+        public override void Init(XmppClientConnection con)
+        {
+            XmppClientConnection = con;
+
+            string kerbPrinc = XmppClientConnection.KerberosPrincipal;
+            
+            /*
+             * try to build the kerberos principal if none is sent by the server or provided by the user.
+             * XCP send the kerberos pricipal, Openfire doesnt.
+             */
+            if (kerbPrinc == null)
+                kerbPrinc = string.Format("xmpp/{0}@{1}", XmppClientConnection.Server, GetNtDomain());   
+            
+            //if (XmppClientConnection.KerberosPrincipal != null)
+            //    sspiHelper = new SSPIHelper(XmppClientConnection.KerberosPrincipal);
+            //else
+            //    sspiHelper = new SSPIHelper();
+
+            sspiHelper = new SSPIHelper(kerbPrinc);
+
+            Auth auth = new Auth(MechanismType.GSSAPI);
+            
+            byte[]  clientToken;
+
+            sspiHelper.Process(null, out clientToken);
+           
+            auth.Value = Convert.ToBase64String(clientToken);
+            
+            XmppClientConnection.Send(auth);
+        }
+
+        public override void Parse(Node e)
+        {
+            if (e is Challenge)
+            {
+                Challenge c = e as Challenge;
+                Response resp;
+
+                byte[] outBytes;
+                byte[] inBytes = Convert.FromBase64String(c.Value);
+               
+                sspiHelper.Process(inBytes, out outBytes);
+
+                if (outBytes == null)
+                {
+                    resp = new Response();
+                }
+                else
+                {
+                    resp = new Response();
+                    resp.Value = Convert.ToBase64String(outBytes);
+                }
+
+                XmppClientConnection.Send(resp);
+            }
+        }
+
+
+        /// <summary>
+        /// returns the NT domain, tis is used for building the kerberos principal when none is provided.
+        /// </summary>
+        /// <returns></returns>
+        internal string GetNtDomain()
+        {
+            var curName = WindowsIdentity.GetCurrent().Name;
+            var domain = curName.Substring(0, curName.IndexOf('\\'));
+
+            return domain.ToUpper();
+        }
+    }
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Gssapi/SSPIHelper.cs b/lib/agsxmpp/agsxmpp/Sasl/Gssapi/SSPIHelper.cs
new file mode 100644
index 0000000..315640d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Gssapi/SSPIHelper.cs
@@ -0,0 +1,618 @@
+#if !MONO
+using System;
+using System.Runtime.InteropServices;
+using System.Security.Principal;
+
+namespace agsXMPP.Sasl.Gssapi
+{
+    internal enum SecBufferType
+    {
+        SECBUFFER_VERSION = 0,
+        SECBUFFER_EMPTY = 0,
+        SECBUFFER_DATA = 1,
+        SECBUFFER_TOKEN = 2,
+        SECBUFFER_PADDING = 9,
+        SECBUFFER_STREAM = 10
+    }
+   
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SecBuffer : IDisposable
+    {
+        public int cbBuffer;
+        public int BufferType;
+        public IntPtr pvBuffer;
+
+
+        public SecBuffer(int bufferSize)
+        {
+            cbBuffer = bufferSize;
+            BufferType = (int)SecBufferType.SECBUFFER_TOKEN;
+            pvBuffer = Marshal.AllocHGlobal(bufferSize);
+        }
+
+        public SecBuffer(byte[] secBufferBytes)
+        {
+            cbBuffer = secBufferBytes.Length;
+            BufferType = (int)SecBufferType.SECBUFFER_TOKEN;
+            pvBuffer = Marshal.AllocHGlobal(cbBuffer);
+            Marshal.Copy(secBufferBytes, 0, pvBuffer, cbBuffer);
+        }
+
+        public SecBuffer(byte[] secBufferBytes, SecBufferType bufferType)
+        {
+            BufferType = (int)bufferType;
+
+            if (secBufferBytes != null && secBufferBytes.Length != 0)
+            {
+                cbBuffer = secBufferBytes.Length;
+                pvBuffer = Marshal.AllocHGlobal(cbBuffer);
+                Marshal.Copy(secBufferBytes, 0, pvBuffer, cbBuffer);
+            }
+            else
+            {
+                cbBuffer = 0;
+                pvBuffer = IntPtr.Zero;
+            }
+        }
+
+        public void Dispose()
+        {
+            if (pvBuffer != IntPtr.Zero)
+            {
+                Marshal.FreeHGlobal(pvBuffer);
+                pvBuffer = IntPtr.Zero;
+            }
+        }
+    }
+
+    internal struct MultipleSecBufferHelper
+    {
+        public byte[] Buffer;
+        public SecBufferType BufferType;
+
+        public MultipleSecBufferHelper(byte[] buffer, SecBufferType bufferType)
+        {
+            Buffer = buffer;
+            BufferType = bufferType;
+        }
+    };
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SecBufferDesc : IDisposable
+    {
+
+        public int ulVersion;
+        public int cBuffers;
+        public IntPtr pBuffers; //Point to SecBuffer
+
+        public SecBufferDesc(int bufferSize)
+        {
+            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
+            cBuffers = 1;
+            SecBuffer ThisSecBuffer = new SecBuffer(bufferSize);
+            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(ThisSecBuffer));
+            Marshal.StructureToPtr(ThisSecBuffer, pBuffers, false);
+        }
+
+        public SecBufferDesc(byte[] secBufferBytes)
+        {
+            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
+            cBuffers = 1;
+            SecBuffer ThisSecBuffer = new SecBuffer(secBufferBytes);
+            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(ThisSecBuffer));
+            Marshal.StructureToPtr(ThisSecBuffer, pBuffers, false);
+        }
+
+        internal SecBufferDesc(MultipleSecBufferHelper[] secBufferBytesArray)
+        {
+            if (secBufferBytesArray == null || secBufferBytesArray.Length == 0)
+            {
+                throw new ArgumentException("secBufferBytesArray cannot be null or 0 length");
+            }
+
+            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
+            cBuffers = secBufferBytesArray.Length;
+
+            //Allocate memory for SecBuffer Array....
+            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(SecBuffer)) * cBuffers);
+
+            for (int Index = 0; Index < secBufferBytesArray.Length; Index++)
+            {
+                //Super hack: Now allocate memory for the individual SecBuffers
+                //and just copy the bit values to the SecBuffer array!!!
+                SecBuffer ThisSecBuffer = new SecBuffer(secBufferBytesArray[Index].Buffer,
+                    secBufferBytesArray[Index].BufferType);
+
+                //We will write out bits in the following order:
+                //int cbBuffer;
+                //int BufferType;
+                //pvBuffer;
+                //Note: that we won't be releasing the memory allocated by ThisSecBuffer until we
+                //are disposed...
+                int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
+                Marshal.WriteInt32(pBuffers, CurrentOffset, ThisSecBuffer.cbBuffer);
+
+                int length = CurrentOffset + Marshal.SizeOf(ThisSecBuffer.cbBuffer);
+                Marshal.WriteInt32(pBuffers, length, ThisSecBuffer.BufferType);
+
+                length = CurrentOffset + Marshal.SizeOf(ThisSecBuffer.cbBuffer) +
+                         Marshal.SizeOf(ThisSecBuffer.BufferType);
+                Marshal.WriteIntPtr(pBuffers, length, ThisSecBuffer.pvBuffer);
+            }
+        }
+
+        public void Dispose()
+        {
+            if (pBuffers != IntPtr.Zero)
+            {
+                if (cBuffers == 1)
+                {
+                    SecBuffer ThisSecBuffer =
+                        (SecBuffer)Marshal.PtrToStructure(pBuffers, typeof(SecBuffer));
+                    ThisSecBuffer.Dispose();
+                }
+                else
+                {
+                    // Since we aren't sending any messages using the kerberos encrypt/decrypt.
+                    // The 1st buffer is going to be empty. We can skip it.
+                    for (int Index = 1; Index < cBuffers; Index++)
+                    {
+                        //The bits were written out the following order:
+                        //int cbBuffer;
+                        //int BufferType;
+                        //pvBuffer;
+                        //What we need to do here is to grab a hold of the pvBuffer allocate by the individual
+                        //SecBuffer and release it...
+                        int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
+
+                        int totalLength = CurrentOffset + Marshal.SizeOf(typeof(int)) +
+                                          Marshal.SizeOf(typeof(int));
+                        IntPtr SecBufferpvBuffer = Marshal.ReadIntPtr(pBuffers, totalLength);
+                        Marshal.FreeHGlobal(SecBufferpvBuffer);
+                    }
+                }
+
+                Marshal.FreeHGlobal(pBuffers);
+                pBuffers = IntPtr.Zero;
+            }
+        }
+
+        public byte[] GetSecBufferByteArray()
+        {
+            byte[] Buffer = null;
+
+            if (pBuffers == IntPtr.Zero)
+            {
+                throw new InvalidOperationException("Object has already been disposed!!!");
+            }
+
+            if (cBuffers == 1)
+            {
+                SecBuffer ThisSecBuffer = (SecBuffer)Marshal.PtrToStructure(pBuffers, typeof(SecBuffer));
+
+                if (ThisSecBuffer.cbBuffer > 0)
+                {
+                    Buffer = new byte[ThisSecBuffer.cbBuffer];
+                    Marshal.Copy(ThisSecBuffer.pvBuffer, Buffer, 0, ThisSecBuffer.cbBuffer);
+                }
+            }
+            else
+            {
+                int BytesToAllocate = 0;
+
+                for (int Index = 0; Index < cBuffers; Index++)
+                {
+                    //The bits were written out the following order:
+                    //int cbBuffer;
+                    //int BufferType;
+                    //pvBuffer;
+                    //What we need to do here calculate the total number of bytes we need to copy...
+                    int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
+                    BytesToAllocate += Marshal.ReadInt32(pBuffers, CurrentOffset);
+                }
+
+                Buffer = new byte[BytesToAllocate];
+
+                for (int Index = 0, BufferIndex = 0; Index < cBuffers; Index++)
+                {
+                    //The bits were written out the following order:
+                    //int cbBuffer;
+                    //int BufferType;
+                    //pvBuffer;
+                    //Now iterate over the individual buffers and put them together into a
+                    //byte array...
+                    int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
+                    int BytesToCopy = Marshal.ReadInt32(pBuffers, CurrentOffset);
+                    int length = CurrentOffset + Marshal.SizeOf(typeof(int)) + Marshal.SizeOf(typeof(int));
+                    IntPtr SecBufferpvBuffer = Marshal.ReadIntPtr(pBuffers, length);
+                    Marshal.Copy(SecBufferpvBuffer, Buffer, BufferIndex, BytesToCopy);
+                    BufferIndex += BytesToCopy;
+                }
+            }
+
+            return (Buffer);
+        }
+    }
+
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SECURITY_INTEGER
+    {
+        public uint LowPart;
+        public int HighPart;
+        public SECURITY_INTEGER(int dummy)
+        {
+            LowPart = 0;
+            HighPart = 0;
+        }
+    };
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SECURITY_HANDLE
+    {
+        //both changed from uint - crucial for 64 bit platforms
+        public IntPtr LowPart;
+        public IntPtr HighPart;
+        public SECURITY_HANDLE(int dummy)
+        {
+            LowPart = HighPart = IntPtr.Zero;
+        }
+    };
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SecPkgContext_Sizes
+    {
+        public uint cbMaxToken;
+        public uint cbMaxSignature;
+        public uint cbBlockSize;
+        public uint cbSecurityTrailer;
+    };
+
+    [StructLayout(LayoutKind.Sequential)]
+    internal struct SEC_WINNT_AUTH_IDENTITY
+    {
+        public string User;
+        public int UserLength;
+        public string Domain;
+        public int DomainLength;
+        public string Password;
+        public int PasswordLength;
+        public int Flags;
+    }
+
+    internal class SSPIHelper
+    {
+        public const int TOKEN_QUERY = 0x00008;
+        public const uint SEC_E_OK = 0;
+        public const uint SEC_E_INVALID_HANDLE = 0x80090301;
+        public const uint SEC_E_LOGON_DENIED = 0x8009030C;
+        public const uint SEC_I_CONTINUE_NEEDED = 0x90312;
+        public const uint SEC_I_COMPLETE_NEEDED = 0x90313;
+        public const uint SEC_I_COMPLETE_AND_CONTINUE = 0x90314;
+
+        public const uint SECQOP_WRAP_NO_ENCRYPT = 0x80000001;
+
+        const int SECPKG_CRED_OUTBOUND = 2;
+        private const int SECURITY_NETWORK_DREP = 0x0;
+        const int MAX_TOKEN_SIZE = 12288;
+        //For AcquireCredentialsHandle in 3er Parameter "fCredentialUse"
+
+        SECURITY_HANDLE _hOutboundCred = new SECURITY_HANDLE(0);
+        public SECURITY_HANDLE _hClientContext = new SECURITY_HANDLE(0);
+
+        public const int ISC_REQ_DELEGATE = 0x00000001;
+        public const int ISC_REQ_MUTUAL_AUTH = 0x00000002;
+        public const int ISC_REQ_REPLAY_DETECT = 0x00000004;
+        public const int ISC_REQ_SEQUENCE_DETECT = 0x00000008;
+        public const int ISC_REQ_CONFIDENTIALITY = 0x00000010;
+        public const int ISC_REQ_USE_SESSION_KEY = 0x00000020;
+        public const int ISC_REQ_PROMPT_FOR_CREDS = 0x00000040;
+        public const int ISC_REQ_USE_SUPPLIED_CREDS = 0x00000080;
+        public const int ISC_REQ_ALLOCATE_MEMORY = 0x00000100;
+        public const int ISC_REQ_USE_DCE_STYLE = 0x00000200;
+        public const int ISC_REQ_DATAGRAM = 0x00000400;
+        public const int ISC_REQ_CONNECTION = 0x00000800;
+        public const int ISC_REQ_CALL_LEVEL = 0x00001000;
+        public const int ISC_REQ_FRAGMENT_SUPPLIED = 0x00002000;
+        public const int ISC_REQ_EXTENDED_ERROR = 0x00004000;
+        public const int ISC_REQ_STREAM = 0x00008000;
+        public const int ISC_REQ_INTEGRITY = 0x00010000;
+        public const int ISC_REQ_IDENTIFY = 0x00020000;
+        public const int ISC_REQ_NULL_SESSION = 0x00040000;
+        public const int ISC_REQ_MANUAL_CRED_VALIDATION = 0x00080000;
+        public const int ISC_REQ_RESERVED1 = 0x00100000;
+        public const int ISC_REQ_FRAGMENT_TO_FIT = 0x00200000;
+
+        public const int SECPKG_ATTR_SIZES = 0;
+
+        public const int STANDARD_CONTEXT_ATTRIBUTES = ISC_REQ_MUTUAL_AUTH;
+
+        bool _bGotClientCredentials;
+
+
+        #region << dll imports >>
+        #region << AcquireCredentialsHandle >>
+        // http://msdn.microsoft.com/en-us/library/aa374712%28VS.85%29.aspx
+        [DllImport("secur32", CharSet = CharSet.Auto)]
+        static extern uint AcquireCredentialsHandle(
+            string pszPrincipal, //SEC_CHAR*
+            string pszPackage, //SEC_CHAR* //"Kerberos","NTLM","Negotiative"
+            int fCredentialUse,
+            IntPtr PAuthenticationID,//_LUID AuthenticationID,//pvLogonID, //PLUID
+            IntPtr pAuthData,//PVOID
+            IntPtr pGetKeyFn, //SEC_GET_KEY_FN
+            IntPtr pvGetKeyArgument, //PVOID
+            ref SECURITY_HANDLE phCredential, //SecHandle //PCtxtHandle ref
+            ref SECURITY_INTEGER ptsExpiry); //PTimeStamp //TimeStamp ref
+        
+        #endregion
+
+        #region << InitializeSecurityContext >>
+        // http://msdn.microsoft.com/en-us/library/aa375506%28VS.85%29.aspx
+        [DllImport("secur32", CharSet = CharSet.Auto, SetLastError = true)]
+        static extern uint InitializeSecurityContext(
+            ref SECURITY_HANDLE phCredential,//PCredHandle
+            IntPtr phContext, //PCtxtHandle
+            string pszTargetName,
+            int fContextReq,
+            int Reserved1,
+            int TargetDataRep,
+            IntPtr pInput, //PSecBufferDesc SecBufferDesc
+            int Reserved2,
+            out SECURITY_HANDLE phNewContext, //PCtxtHandle
+            out SecBufferDesc pOutput, //PSecBufferDesc SecBufferDesc
+            out uint pfContextAttr, //managed ulong == 64 bits!!!
+            out SECURITY_INTEGER ptsExpiry); //PTimeStamp
+
+        [DllImport("secur32", CharSet = CharSet.Auto, SetLastError = true)]
+        static extern uint InitializeSecurityContext(
+            ref SECURITY_HANDLE phCredential,//PCredHandle
+            ref SECURITY_HANDLE phContext, //PCtxtHandle
+            string pszTargetName,
+            int fContextReq,
+            int Reserved1,
+            int TargetDataRep,
+            ref SecBufferDesc SecBufferDesc, //PSecBufferDesc SecBufferDesc
+            int Reserved2,
+            out SECURITY_HANDLE phNewContext, //PCtxtHandle
+            out SecBufferDesc pOutput, //PSecBufferDesc SecBufferDesc
+            out uint pfContextAttr, //managed ulong == 64 bits!!!
+            out SECURITY_INTEGER ptsExpiry); //PTimeStamp
+        
+        #endregion
+
+        #region << QueryContextAttributes >>
+        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
+        public static extern int QueryContextAttributes(ref SECURITY_HANDLE phContext,
+                                                        uint ulAttribute,
+                                                        out SecPkgContext_Sizes pContextAttributes);
+        #endregion
+
+        #region << EncryptMessage >>
+        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
+        public static extern int EncryptMessage(ref SECURITY_HANDLE phContext,
+                                                uint fQOP,        //managed ulong == 64 bits!!!
+                                                ref SecBufferDesc pMessage,
+                                                uint MessageSeqNo);    //managed ulong == 64 bits!!!
+        #endregion
+
+        #region << DecryptMessage >>
+        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
+        public static extern int DecryptMessage(ref SECURITY_HANDLE phContext,
+                                                 ref SecBufferDesc pMessage,
+                                                 uint MessageSeqNo,
+                                                 out uint pfQOP);
+        #endregion
+        #endregion
+        
+        readonly string _sRemotePrincipal = WindowsIdentity.GetCurrent().Name;
+
+        #region << Constructors >>
+        public SSPIHelper()
+        {
+        }
+
+        public SSPIHelper(string sRemotePrincipal)
+        {
+            _sRemotePrincipal = sRemotePrincipal;
+        }
+        #endregion
+        
+        public void Process(byte[] inToken, out byte[] outToken)
+        {
+            if (InitializeKerberosStage)
+            {
+                InitializeClient(inToken, out outToken);
+            }
+            else
+            {
+                if (inToken == null)
+                {
+                    throw new Exception("Kerberos failure: Incoming bytes can't be null.");
+                }
+
+                DecryptMessage(0, inToken, out outToken);
+
+                inToken = new byte[] { 0x01, 0x00, 0x00, 0x00 };
+                EncryptMessage(inToken, out outToken);
+            }
+        }
+
+        private void InitializeClient(byte[] serverToken, out byte[] clientToken)
+        {
+            clientToken = null;
+
+            SECURITY_INTEGER ClientLifeTime = new SECURITY_INTEGER(0);
+
+            if (!_bGotClientCredentials)
+            {
+                uint returnValue = AcquireCredentialsHandle(null, "Kerberos", SECPKG_CRED_OUTBOUND,
+                                                            IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero,
+                                                            ref _hOutboundCred, ref ClientLifeTime);
+                
+                if (returnValue != SEC_E_OK)
+                {
+                    throw new Exception("Couldn't acquire client credentials");
+                }
+
+                _bGotClientCredentials = true;
+            }
+
+            uint ss;
+
+            SecBufferDesc ClientToken = new SecBufferDesc(MAX_TOKEN_SIZE);
+
+            try
+            {
+                uint ContextAttributes;
+
+                if (serverToken == null)
+                {
+                    ss = InitializeSecurityContext(ref _hOutboundCred,
+                        IntPtr.Zero,
+                        _sRemotePrincipal,
+                        STANDARD_CONTEXT_ATTRIBUTES,
+                        0,
+                        SECURITY_NETWORK_DREP,
+                        IntPtr.Zero,
+                        0,
+                        out _hClientContext,
+                        out ClientToken,
+                        out ContextAttributes,
+                        out ClientLifeTime);
+                    
+                }
+                else
+                {
+                    SecBufferDesc ServerToken = new SecBufferDesc(serverToken);
+
+                    try
+                    {
+                        ss = InitializeSecurityContext(ref _hOutboundCred,
+                            ref _hClientContext,
+                            _sRemotePrincipal,
+                            STANDARD_CONTEXT_ATTRIBUTES,
+                            0,
+                            SECURITY_NETWORK_DREP,
+                            ref ServerToken,
+                            0,
+                            out _hClientContext,
+                            out ClientToken,
+                            out ContextAttributes,
+                            out ClientLifeTime);
+                        
+                    }
+                    finally
+                    {
+                        ServerToken.Dispose();
+                    }
+                }
+
+                if (ss == SEC_E_LOGON_DENIED)
+                {
+                    throw new Exception("Bad username, password or domain.");
+                }
+                else if (ss != SEC_E_OK && ss != SEC_I_CONTINUE_NEEDED)
+                {
+                    throw new Exception("InitializeSecurityContext() failed!!!");
+                }
+
+                clientToken = ClientToken.GetSecBufferByteArray();
+            }
+            finally
+            {
+                ClientToken.Dispose();
+            }
+
+            InitializeKerberosStage = ss != SEC_E_OK;
+        }
+
+        private bool bInitializeKerberosStage = true;
+        private bool InitializeKerberosStage
+        {
+            get { return bInitializeKerberosStage; }
+            set { bInitializeKerberosStage = value; }
+        }
+
+        public void EncryptMessage(byte[] message, out byte[] encryptedBuffer)
+        {
+            encryptedBuffer = null;
+
+            SECURITY_HANDLE EncryptionContext = _hClientContext;
+
+            SecPkgContext_Sizes ContextSizes;
+
+            if (QueryContextAttributes(ref EncryptionContext,
+                   SECPKG_ATTR_SIZES, out ContextSizes) != SEC_E_OK)
+            {
+                throw new Exception("QueryContextAttribute() failed!!!");
+            }
+
+            MultipleSecBufferHelper[] ThisSecHelper = new MultipleSecBufferHelper[]
+                    {
+                        new MultipleSecBufferHelper(new byte[ContextSizes.cbSecurityTrailer],
+                                                    SecBufferType.SECBUFFER_TOKEN),
+                        new MultipleSecBufferHelper(message, SecBufferType.SECBUFFER_DATA),
+                        new MultipleSecBufferHelper(new byte[ContextSizes.cbBlockSize],
+                                                    SecBufferType.SECBUFFER_PADDING)
+                    };
+
+            SecBufferDesc DescBuffer = new SecBufferDesc(ThisSecHelper);
+
+            try
+            {
+                if (EncryptMessage(ref EncryptionContext,
+                        SECQOP_WRAP_NO_ENCRYPT, ref DescBuffer, 0) != SEC_E_OK)
+                {
+                    throw new Exception("EncryptMessage() failed!!!");
+                }
+
+                encryptedBuffer = DescBuffer.GetSecBufferByteArray();
+            }
+            finally
+            {
+                DescBuffer.Dispose();
+            }
+        }
+
+        public void DecryptMessage(int messageLength, byte[] encryptedBuffer, out byte[] decryptedBuffer)
+        {
+            decryptedBuffer = null;
+
+            SECURITY_HANDLE DecryptionContext = _hClientContext;
+
+            byte[] EncryptedMessage = new byte[messageLength];
+            Array.Copy(encryptedBuffer, 0, EncryptedMessage, 0, messageLength);
+
+            int SecurityTrailerLength = encryptedBuffer.Length - messageLength;
+
+            byte[] SecurityTrailer = new byte[SecurityTrailerLength];
+            Array.Copy(encryptedBuffer, messageLength, SecurityTrailer, 0, SecurityTrailerLength);
+
+            MultipleSecBufferHelper[] ThisSecHelper = new MultipleSecBufferHelper[]
+                    {
+                        new MultipleSecBufferHelper(EncryptedMessage, SecBufferType.SECBUFFER_DATA),
+                        new MultipleSecBufferHelper(SecurityTrailer, SecBufferType.SECBUFFER_STREAM)
+                    };
+
+            SecBufferDesc DescBuffer = new SecBufferDesc(ThisSecHelper);
+            try
+            {
+                uint EncryptionQuality;
+
+                if (DecryptMessage(ref DecryptionContext, ref DescBuffer, 0, out EncryptionQuality) != SEC_E_OK)
+                {
+                    throw new Exception("DecryptMessage() failed!!!");
+                }
+
+                decryptedBuffer = new byte[messageLength];
+                Array.Copy(DescBuffer.GetSecBufferByteArray(), 0, decryptedBuffer, 0, messageLength);
+            }
+            finally
+            {
+                DescBuffer.Dispose();
+            }
+        }
+    }
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Mechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Mechanism.cs
new file mode 100644
index 0000000..45d8e78
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Mechanism.cs
@@ -0,0 +1,89 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.Sasl
+{
+	/// <summary>
+	/// Summary description for Mechanism.
+	/// </summary>
+	public abstract class Mechanism
+	{
+		#region << Properties and member variables >>
+        private XmppClientConnection m_XmppClientConnection;                
+		private string m_Username;
+		private string m_Password;
+		private string m_Server;
+
+        public XmppClientConnection XmppClientConnection
+        {
+            get { return m_XmppClientConnection; }
+            set { m_XmppClientConnection = value; }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+		public string Username
+		{
+            // lower case that until i implement our c# port of libIDN
+			get { return m_Username; }
+			set { m_Username = value != null ? value.ToLower() : null; }
+		}
+		
+        /// <summary>
+        /// 
+        /// </summary>
+		public string Password
+		{
+			get { return m_Password; }
+			set { m_Password = value; }
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+		public string Server
+		{
+			get { return m_Server; }
+			set { m_Server = value.ToLower(); }
+		}
+
+        /// <summary>
+        /// Extra data for special Sasl mechanisms
+        /// </summary>
+        public ExtendedData ExtentedData { get; set; }
+		#endregion
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="con"></param>
+		public abstract void	Init(XmppClientConnection con);
+		
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="e"></param>
+        public abstract void	Parse(Node e);                
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Plain/PlainMechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Plain/PlainMechanism.cs
new file mode 100644
index 0000000..da4846f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Plain/PlainMechanism.cs
@@ -0,0 +1,74 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.IO;
+using System.Text;
+
+using agsXMPP;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.Plain
+{
+	/// <summary>
+	/// Summary description for PlainMechanism.
+	/// </summary>
+	public class PlainMechanism : Mechanism
+	{
+		private XmppClientConnection m_XmppClient	= null;
+
+		public PlainMechanism()
+		{			
+		}
+
+		public override void Init(XmppClientConnection con)
+		{
+			m_XmppClient = con;
+			
+			// <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">$Message</auth>
+			m_XmppClient.Send(new protocol.sasl.Auth(protocol.sasl.MechanismType.PLAIN, Message()));
+		}
+
+		public override void Parse(Node e)
+		{
+			// not needed here in PLAIN mechanism
+		}
+
+
+		private string Message()
+		{	  
+			// NULL Username NULL Password
+			StringBuilder sb = new StringBuilder();
+			
+			//sb.Append( (char) 0 );
+			//sb.Append(this.m_XmppClient.MyJID.Bare);
+			
+			sb.Append( (char) 0 );
+			sb.Append(this.Username);
+			sb.Append( (char) 0 );
+			sb.Append(this.Password);
+			
+			byte[] msg = Encoding.UTF8.GetBytes(sb.ToString());
+			return Convert.ToBase64String(msg, 0, msg.Length);
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/SaslEventArgs.cs b/lib/agsxmpp/agsxmpp/Sasl/SaslEventArgs.cs
new file mode 100644
index 0000000..7ab6aea
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/SaslEventArgs.cs
@@ -0,0 +1,70 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.sasl;
+using agsXMPP.protocol.stream;
+
+namespace agsXMPP.Sasl
+{
+	public delegate void SaslEventHandler	(object sender, SaslEventArgs args);
+
+	public class SaslEventArgs
+	{
+		#region << Constructors >>
+		public SaslEventArgs()
+		{
+
+		}
+		
+		public SaslEventArgs(Mechanisms mechanisms)
+		{
+			Mechanisms = mechanisms;
+		}
+		#endregion
+
+		// by default the library chooses the auth method
+		private bool						m_Auto			= true;
+
+	    /// <summary>
+		/// Set Auto to true if the library should choose the mechanism
+		/// Set it to false for choosing the authentication method yourself
+		/// </summary>
+		public bool Auto
+		{
+			get { return m_Auto; }
+			set { m_Auto = value; }
+		}
+
+	    /// <summary>
+	    /// SASL Mechanism for authentication as string
+	    /// </summary>
+	    public string Mechanism { get; set; }
+
+	    public Mechanisms Mechanisms { get; set; }
+        
+        /// <summary>
+        /// Extra Data for special Sasl mechanisms
+        /// </summary>
+        public ExtendedData ExtentedData { get; set; }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/SaslHandler.cs b/lib/agsxmpp/agsxmpp/Sasl/SaslHandler.cs
new file mode 100644
index 0000000..b45ab20
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/SaslHandler.cs
@@ -0,0 +1,301 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.iq.bind;
+using agsXMPP.protocol.iq.session;
+using agsXMPP.protocol.sasl;
+using agsXMPP.protocol.stream;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.Sasl
+{
+	/// <summary>
+	/// Summary description for SaslHandler.
+	/// </summary>
+	internal class SaslHandler : IDisposable
+	{		
+		public event SaslEventHandler	OnSaslStart;
+		public event ObjectHandler		OnSaslEnd;
+
+		private XmppClientConnection	m_XmppClient;		
+		private Mechanism	m_Mechanism;
+		// Track whether Dispose has been called.
+		private bool					m_Disposed;
+
+		public SaslHandler(XmppClientConnection conn)
+		{
+			m_XmppClient = conn;		
+		
+			m_XmppClient.StreamParser.OnStreamElement += OnStreamElement;
+		}
+
+		// Use C# destructor syntax for finalization code.
+		// This destructor will run only if the Dispose method 
+		// does not get called.
+		// It gives your base class the opportunity to finalize.
+		// Do not provide destructors in types derived from this class.
+		~SaslHandler()      
+		{
+			// Do not re-create Dispose clean-up code here.
+			// Calling Dispose(false) is optimal in terms of
+			// readability and maintainability.
+			Dispose(false);
+		}
+		
+		internal void OnStreamElement(object sender, Node e)
+		{
+            if (m_XmppClient == null) return;
+            if ( m_XmppClient.XmppConnectionState == XmppConnectionState.Securing
+                || m_XmppClient.XmppConnectionState == XmppConnectionState.StartCompression)
+                return;
+
+			if (e is Features)
+			{
+				Features f = e as Features;
+				if (!m_XmppClient.Authenticated)
+				{
+					// RECV: <stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+					//			<mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism>
+					//			</mechanisms>
+					//			<register xmlns='http://jabber.org/features/iq-register'/>
+					//		</stream:features>
+					// SENT: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>				
+					// Select a SASL mechanism
+					
+					SaslEventArgs args = new SaslEventArgs(f.Mechanisms);
+				
+					if (OnSaslStart != null)				
+						OnSaslStart(this, args);
+				
+					if (args.Auto)
+					{	
+						// Library handles the Sasl stuff
+						if (f.Mechanisms!=null)
+						{
+                            if (m_XmppClient.UseStartTLS == false && m_XmppClient.UseSSL == false
+                                && f.Mechanisms.SupportsMechanism(MechanismType.X_GOOGLE_TOKEN) )
+                            {
+                                // This is the only way to connect to GTalk on a unsecure Socket for now
+                                // Secure authentication is done over https requests to pass the
+                                // authentication credentials on a secure connection
+                                args.Mechanism = protocol.sasl.Mechanism.GetMechanismName(MechanismType.X_GOOGLE_TOKEN);
+                            }
+#if !(CF || CF_2)
+                            else if (m_XmppClient.UseSso && f.Mechanisms.SupportsMechanism(MechanismType.GSSAPI))
+                            {
+                                args.Mechanism = protocol.sasl.Mechanism.GetMechanismName(MechanismType.GSSAPI);
+                                
+                                string kerbPrinc = f.Mechanisms.GetMechanism(MechanismType.GSSAPI).KerberosPrincipal;
+                                if (kerbPrinc != null)
+                                m_XmppClient.KerberosPrincipal =
+                                    f.Mechanisms.GetMechanism(MechanismType.GSSAPI).KerberosPrincipal;
+                            }
+#endif
+                            else if (f.Mechanisms.SupportsMechanism(MechanismType.SCRAM_SHA_1))
+                            {
+                                args.Mechanism = protocol.sasl.Mechanism.GetMechanismName(MechanismType.SCRAM_SHA_1);
+                            }
+							else if (f.Mechanisms.SupportsMechanism(MechanismType.DIGEST_MD5))
+							{
+								args.Mechanism = protocol.sasl.Mechanism.GetMechanismName(MechanismType.DIGEST_MD5);
+							}
+							else if (f.Mechanisms.SupportsMechanism(MechanismType.PLAIN))							
+							{
+								args.Mechanism = protocol.sasl.Mechanism.GetMechanismName(MechanismType.PLAIN);
+							}
+							else
+							{								
+								args.Mechanism = null;
+							}
+						}
+						else
+						{
+							// Hack for Google
+                            // TODO: i don't think we need this anymore. This was in an very early version of the gtalk server.
+							args.Mechanism = null;
+							//args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.PLAIN);
+						}
+					}
+					if (args.Mechanism != null)
+					{
+						m_Mechanism = Factory.SaslFactory.GetMechanism(args.Mechanism);
+						// Set properties for the SASL mechanism
+						m_Mechanism.Username = m_XmppClient.Username;
+						m_Mechanism.Password = m_XmppClient.Password;
+						m_Mechanism.Server = m_XmppClient.Server;
+
+                        m_Mechanism.ExtentedData = args.ExtentedData;
+						// Call Init Method on the mechanism
+						m_Mechanism.Init(m_XmppClient);
+					}
+					else
+					{
+						m_XmppClient.RequestLoginInfo();												
+					}
+				}
+				else if(!m_XmppClient.Binded)
+				{
+					if (f.SupportsBind)
+					{
+						m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.Binding);
+
+					    BindIq bIq = string.IsNullOrEmpty(m_XmppClient.Resource) ? new BindIq(IqType.set) : new BindIq(IqType.set, m_XmppClient.Resource);						
+						
+                        m_XmppClient.IqGrabber.SendIq(bIq, BindResult, null);					
+					}
+				}
+								
+			}
+			else if (e is Challenge)
+			{
+				if (m_Mechanism != null && !m_XmppClient.Authenticated)
+				{
+					m_Mechanism.Parse(e);
+				}			
+			}
+			else if (e is Success)
+			{
+				// SASL authentication was successfull
+				if (OnSaslEnd!=null)
+					OnSaslEnd(this);
+								
+				m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.Authenticated);
+								
+				m_Mechanism = null;
+
+				m_XmppClient.Reset();				
+			}
+			else if (e is Failure)
+			{
+				// Authentication failure
+				m_XmppClient.FireOnAuthError(e as Element);
+			}
+		}
+
+        internal void DoBind()
+        {
+            m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.Binding);
+
+            BindIq bIq = string.IsNullOrEmpty(m_XmppClient.Resource) ? new BindIq(IqType.set) : new BindIq(IqType.set, m_XmppClient.Resource);
+
+            m_XmppClient.IqGrabber.SendIq(bIq, BindResult, null);	
+        }
+
+		private void BindResult(object sender, IQ iq, object data)
+		{	
+			// Once the server has generated a resource identifier for the client or accepted the resource 
+			// identifier provided by the client, it MUST return an IQ stanza of type "result" 
+			// to the client, which MUST include a <jid/> child element that specifies the full JID for 
+			// the connected resource as determined by the server:
+
+			// Server informs client of successful resource binding: 
+			// <iq type='result' id='bind_2'>
+			//  <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
+			//    <jid>somenode at example.com/someresource</jid>
+			//  </bind>
+			// </iq>
+			if (iq.Type == IqType.result)
+			{				
+				// i assume the server could assign another resource here to the client
+				// so grep the resource assigned by the server now
+				Element bind = iq.SelectSingleElement(typeof(Bind));
+                if (bind != null)
+                {
+                    Jid jid = ((Bind)bind).Jid;
+                    m_XmppClient.Resource = jid.Resource;
+                    m_XmppClient.Username = jid.User;
+                }
+				
+				m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.Binded);
+				m_XmppClient.m_Binded = true;
+				
+				m_XmppClient.DoRaiseEventBinded();
+				
+				// success, so start the session now
+				m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.StartSession);
+				SessionIq sIq = new SessionIq(IqType.set, new Jid(m_XmppClient.Server));
+				m_XmppClient.IqGrabber.SendIq(sIq, SessionResult, null);
+
+			}
+			else if (iq.Type == IqType.error)
+			{
+				// TODO, handle bind errors
+			    m_XmppClient.DoRaiseEventBindError(iq);
+			}			
+		}
+
+		private void SessionResult(object sender, IQ iq, object data)
+		{
+			if (iq.Type == IqType.result)
+			{
+				m_XmppClient.DoChangeXmppConnectionState(XmppConnectionState.SessionStarted);
+				m_XmppClient.RaiseOnLogin();
+
+			}
+			else if (iq.Type == IqType.error)
+			{
+
+			}
+		}
+
+		#region IDisposable Members
+
+		public void Dispose()
+		{
+			Dispose(true);
+		}
+
+		// Dispose(bool disposing) executes in two distinct scenarios.
+		// If disposing equals true, the method has been called directly
+		// or indirectly by a user's code. Managed and unmanaged resources
+		// can be disposed.
+		// If disposing equals false, the method has been called by the 
+		// runtime from inside the finalizer and you should not reference 
+		// other objects. Only unmanaged resources can be disposed.
+		private void Dispose(bool disposing)
+		{
+			// Check to see if Dispose has already been called.
+			if(!m_Disposed)
+			{
+				// If disposing equals true, dispose all managed 
+				// and unmanaged resources.
+				if(disposing)
+				{
+					// Dispose managed resources.
+					// Remove the event handler or we will be in trouble with too many events
+					m_XmppClient.StreamParser.OnStreamElement -= OnStreamElement;
+					m_XmppClient	= null;		
+					m_Mechanism		= null;
+				}
+             
+				// Call the appropriate methods to clean up 
+				// unmanaged resources here.
+				// If disposing is false, 
+				// only the following code is executed.
+				        
+			}
+			m_Disposed = true;         
+		}
+		#endregion
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/Scram/ScramSha1Mechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/Scram/ScramSha1Mechanism.cs
new file mode 100644
index 0000000..4c4d770
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/Scram/ScramSha1Mechanism.cs
@@ -0,0 +1,205 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Text;
+using agsXMPP.protocol.sasl;
+using agsXMPP.Util;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.Sasl.Scram
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class ScramSha1Mechanism : Mechanism
+    {
+        private const int LENGHT_CLIENT_NONE = 24;
+        private string firstClientMessage;
+        private byte[] clientNonce;
+        private string clientNonceB64;
+        private string password;
+        private string username;
+
+        public ScramSha1Mechanism()
+        {
+            GenerateClientNonce();
+        }
+
+        public override void Init(XmppClientConnection con)
+        {
+            XmppClientConnection = con;
+
+            // Todo SASLPrep
+            username = Username;
+            password = Password;
+
+            firstClientMessage = GenerateFirstClientMessage();
+            string msg = ToB64String(firstClientMessage);
+            con.Send(new Auth(MechanismType.SCRAM_SHA_1, msg));
+        }
+
+        public override void Parse(Node e)
+        {
+            if (e is Challenge)
+            {
+                Challenge ch = e as Challenge;
+                string msg = ch.TextBase64;
+                string content = GenerateFinalClientMessage(msg);
+                XmppClientConnection.Send(new Response(content));
+            }
+        }
+
+        /// <summary>
+        /// Generate a random client nonce
+        /// </summary>
+        private void GenerateClientNonce()
+        {
+            var random = new Byte[LENGHT_CLIENT_NONE];
+
+            var rng = new RNGCryptoServiceProvider();
+            rng.GetBytes(random);
+
+            clientNonce = random;
+            clientNonceB64 = Convert.ToBase64String(random);
+        }
+
+        private static Dictionary<string, string> ParseMessage(string msg)
+        {
+            var str = msg.Split(',');
+
+            var dict = new Dictionary<string, string>();
+            foreach (string s in str)
+            {
+                int equalPos = s.IndexOf('=');
+
+                var key = s.Substring(0, equalPos - 0);
+                var val = s.Substring(equalPos + 1);
+
+                if (!dict.ContainsKey(key))
+                    dict.Add(key, val);
+            }
+            return dict;
+        }
+
+        internal string GenerateFinalClientMessage(string sMessage)
+        {
+            var pairs = ParseMessage(sMessage);
+
+            //string clientServerNonce = pairs["r"];
+            string serverNonce = pairs["r"].Substring(clientNonceB64.Length);
+
+
+            var salt = pairs["s"];   // the user's salt - (base64 encoded)
+            var iteration = pairs["i"];  // iteation count
+
+            // the bare of our first message
+            var clientFirstMessageBare = firstClientMessage.Substring(3);
+
+            var sb = new StringBuilder();
+            sb.Append("c=biws,");
+            // Client/Server nonce
+            sb.Append("r=");
+            sb.Append(clientNonceB64);
+            sb.Append(serverNonce);
+
+            string clientFinalMessageWithoutProof = sb.ToString();
+
+            string authMessage = clientFirstMessageBare + "," + sMessage + "," + clientFinalMessageWithoutProof;
+
+            var saltedPassword = Hi(password, Convert.FromBase64String(salt), Convert.ToInt32(iteration));
+
+            var clientKey = Hash.HMAC(saltedPassword, "Client Key");
+            var storedKey = Hash.Sha1HashBytes(clientKey);
+
+
+            var clientSignature = Hash.HMAC(storedKey, authMessage);
+
+            var clientProof = new byte[clientKey.Length];
+            for (var i = 0; i < clientKey.Length; ++i)
+                clientProof[i] = (byte)(clientKey[i] ^ clientSignature[i]);
+
+
+            //var serverKey = Hash.HMAC(saltedPassword, "Server Key");
+            //var serverSignature = Hash.HMAC(serverKey, authMessage);
+
+            string clientFinalMessage = clientFinalMessageWithoutProof;
+            clientFinalMessage += ",p=";
+            clientFinalMessage += Convert.ToBase64String(clientProof);
+
+            return clientFinalMessage;
+        }
+
+        private string GenerateFirstClientMessage()
+        {
+            var sb = new StringBuilder();
+
+            // no channel bindings supported
+            sb.Append("n,,");
+
+            // username
+            sb.Append("n=");
+            sb.Append(EscapeUsername(username));
+            sb.Append(",");
+
+            // client nonce
+            sb.Append("r=");
+            sb.Append(clientNonceB64);
+
+            return sb.ToString();
+        }
+
+        private static string EscapeUsername(string user)
+        {
+            /*
+            The characters ',' or '=' in usernames are sent as '=2C' and
+            '=3D' respectively.  If the server receives a username that
+            contains '=' not followed by either '2C' or '3D', then the
+            server MUST fail the authentication.
+            */
+
+            var ret = user.Replace(",", "=2C");
+            ret = ret.Replace("=", "=3D");
+
+            return ret;
+        }
+
+        private static string ToB64String(string sin)
+        {
+            byte[] msg = Encoding.UTF8.GetBytes(sin);
+            return Convert.ToBase64String(msg, 0, msg.Length);
+        }
+
+        private string FromB64String(string sin)
+        {
+            var b = Convert.FromBase64String(sin);
+            return Encoding.UTF8.GetString(b);
+        }
+
+        private byte[] Hi(string pass, byte[] salt, int iterations)
+        {
+            var pdb = new Rfc2898DeriveBytes(pass, salt, iterations);
+            return pdb.GetBytes(20);
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Sasl/XGoogleToken/XGoogleTokenMechanism.cs b/lib/agsxmpp/agsxmpp/Sasl/XGoogleToken/XGoogleTokenMechanism.cs
new file mode 100644
index 0000000..d3152ea
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Sasl/XGoogleToken/XGoogleTokenMechanism.cs
@@ -0,0 +1,172 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.IO;
+using System.Text;
+using System.Net;
+
+using agsXMPP;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.sasl;
+
+namespace agsXMPP.Sasl.XGoogleToken
+{
+	/// <summary>
+	/// X-GOOGLE-TOKEN Authentication
+	/// </summary>
+	public class XGoogleTokenMechanism : Mechanism
+	{
+
+        /*
+        
+        see Google API documentation at:
+        http://code.google.com/apis/accounts/AuthForInstalledApps.html
+        http://code.google.com/apis/accounts/AuthForWebApps.html
+        
+        */
+
+        private         string                  _Auth                   = null;
+        private         string                  _Sid                    = null;
+        private         string                  _Lsid                   = null;
+        private         string                  _Base64Token            = null;
+
+        private const   string                  METHOD                  = "POST";
+        private const   string                  CONTENT_TYPE            = "application/x-www-form-urlencoded";
+        private const   string                  URL_ISSUE_AUTH_TOKEN    = "https://www.google.com/accounts/IssueAuthToken";
+        private const   string                  URL_CLIENT_AUTH         = "https://www.google.com/accounts/ClientAuth";        
+        
+		public override void Init(XmppClientConnection con)
+		{
+            base.XmppClientConnection = con;			
+
+            DoClientAuth();
+            
+		}
+
+		public override void Parse(Node e)
+		{
+			// not needed here in X-GOOGLE-TOKEN mechanism
+		}
+
+        private void DoSaslAuth()
+        {
+            // <auth xmlns=�urn:ietf:params:xml:ns:xmpp-sasl� mechanism=�X-GOOGLE-TOKEN�>Base 64 Token goes here</auth>            
+            Auth auth = new Auth(MechanismType.X_GOOGLE_TOKEN, _Base64Token);           
+            base.XmppClientConnection.Send(auth);
+        }
+       
+        private void DoClientAuth()
+        {
+            HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(URL_CLIENT_AUTH);
+                        
+            request.Method          = METHOD;
+            request.ContentType     = CONTENT_TYPE;
+
+#if CF || CF_2
+            //required for bug workaround
+            request.AllowWriteStreamBuffering = true; 
+#endif
+
+            request.BeginGetRequestStream(new AsyncCallback(OnGetClientAuthRequestStream), request);
+        }
+
+        private void OnGetClientAuthRequestStream(IAsyncResult result)
+        {
+            WebRequest request = (System.Net.WebRequest)result.AsyncState;
+            Stream outputStream = request.EndGetRequestStream(result);
+
+            string data = null;
+            data += "Email=" + base.XmppClientConnection.MyJID.Bare;
+            data += "&Passwd=" + base.Password;
+            data += "&PersistentCookie=false";
+            //data += "&source=googletalk";
+            data += "&source=" + base.XmppClientConnection.Resource;
+            data += "&service=mail";
+            
+            
+            byte[] bytes = Encoding.UTF8.GetBytes(data);
+            outputStream.Write(bytes, 0, bytes.Length);
+            outputStream.Close();
+
+            request.BeginGetResponse(new AsyncCallback(OnGetClientAuthResponse), request);
+        }
+
+        private void OnGetClientAuthResponse(IAsyncResult result)
+        {
+            try
+            {
+                WebRequest request = (WebRequest)result.AsyncState;
+                HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
+
+                if (response.StatusCode == HttpStatusCode.OK)
+                {
+                    Stream dataStream = response.GetResponseStream();
+
+                    ParseClientAuthResponse(dataStream);
+
+                    dataStream.Close();
+                    response.Close();
+
+                    _Base64Token = GetToken(_Auth);
+
+                    DoSaslAuth();
+                }
+                else
+                    base.XmppClientConnection.Close();
+            }
+            catch (WebException we)
+            {
+                if (we.Response is HttpWebResponse // this is also false when Response is null
+                    && ((HttpWebResponse)we.Response).StatusCode == HttpStatusCode.Forbidden)
+                {
+                    base.XmppClientConnection.FireOnAuthError(null);
+                }
+                base.XmppClientConnection.Close();
+            }
+        }             
+
+        private void ParseClientAuthResponse(Stream responseStream)
+        {            
+            StreamReader reader = new StreamReader(responseStream);
+            
+            string line;
+            while ((line = reader.ReadLine()) != null)
+            {
+                if (line.StartsWith("SID="))
+                    _Sid = line.Substring(4);
+                else if(line.StartsWith("LSID="))
+                    _Lsid = line.Substring(5);
+                else if (line.StartsWith("Auth="))
+                    _Auth = line.Substring(5);
+            }
+
+            reader.Close();            
+        }
+        
+        private string GetToken(string line)
+        {
+            string temp = "\0" + base.XmppClientConnection.MyJID.Bare + "\0" + line;
+            byte[] b = Encoding.UTF8.GetBytes(temp);
+            return Convert.ToBase64String(b, 0, b.Length);
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Uri.cs b/lib/agsxmpp/agsxmpp/Uri.cs
new file mode 100644
index 0000000..956232c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Uri.cs
@@ -0,0 +1,267 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP
+{
+	
+	public class Uri
+	{
+		public const string STREAM			= "http://etherx.jabber.org/streams";
+		public const string CLIENT			= "jabber:client";		
+		public const string SERVER			= "jabber:server"; 
+		
+		public const string IQ_AGENTS		= "jabber:iq:agents";
+		public const string IQ_ROSTER		= "jabber:iq:roster";
+		public const string IQ_AUTH			= "jabber:iq:auth";
+		public const string IQ_REGISTER		= "jabber:iq:register";
+		public const string IQ_OOB			= "jabber:iq:oob";
+		public const string IQ_LAST			= "jabber:iq:last";
+		public const string IQ_TIME			= "jabber:iq:time";
+		public const string IQ_VERSION		= "jabber:iq:version";
+		public const string IQ_BROWSE		= "jabber:iq:browse";
+		public const string IQ_SEARCH		= "jabber:iq:search";
+		public const string IQ_AVATAR		= "jabber:iq:avatar";
+		public const string IQ_PRIVATE		= "jabber:iq:private";
+        public const string IQ_PRIVACY      = "jabber:iq:privacy";
+
+
+        
+        /// <summary>
+        /// JEP-0009: Jabber-RPC
+        /// </summary>
+        public const string IQ_RPC          = "jabber:iq:rpc";
+        
+		
+		public const string X_DELAY			= "jabber:x:delay";
+		public const string X_EVENT			= "jabber:x:event";
+		public const string X_AVATAR		= "jabber:x:avatar";
+		
+        
+		public const string X_CONFERENCE	= "jabber:x:conference";
+		
+        /// <summary>
+        /// jabber:x:data
+		/// </summary>
+        public const string X_DATA			= "jabber:x:data";
+		
+		/// <summary>
+		/// JEP-0144 Roster Item Exchange
+		/// </summary>
+		public const string X_ROSTERX		= "http://jabber.org/protocol/rosterx";
+		
+
+		/// <summary>
+        /// Multi User Chat (MUC) JEP-0045
+        /// http://jabber.org/protocol/muc
+		/// </summary>
+		public const string MUC				= "http://jabber.org/protocol/muc";
+		/// <summary>
+		/// http://jabber.org/protocol/muc#user
+		/// </summary>
+		public const string MUC_USER		= "http://jabber.org/protocol/muc#user";
+		/// <summary>
+		/// "http://jabber.org/protocol/muc#admin
+		/// </summary>
+		public const string MUC_ADMIN		= "http://jabber.org/protocol/muc#admin";
+		/// <summary>
+		/// http://jabber.org/protocol/muc#owner
+		/// </summary>
+		public const string MUC_OWNER		= "http://jabber.org/protocol/muc#owner";
+
+		// Service Disovery
+		public const string DISCO_ITEMS		= "http://jabber.org/protocol/disco#items";		
+		public const string DISCO_INFO		= "http://jabber.org/protocol/disco#info";
+
+		public const string STORAGE_AVATAR	= "storage:client:avatar";
+
+		public const string VCARD			= "vcard-temp";
+
+		// New XMPP Stuff
+        /// <summary>
+        /// urn:ietf:params:xml:ns:xmpp-streams
+        /// </summary>
+        public const string STREAMS         = "urn:ietf:params:xml:ns:xmpp-streams";
+        public const string STANZAS			= "urn:ietf:params:xml:ns:xmpp-stanzas";
+		public const string TLS				= "urn:ietf:params:xml:ns:xmpp-tls";		
+		public const string SASL			= "urn:ietf:params:xml:ns:xmpp-sasl";		
+		public const string SESSION			= "urn:ietf:params:xml:ns:xmpp-session";		
+		public const string BIND			= "urn:ietf:params:xml:ns:xmpp-bind";
+        
+
+        /// <summary>
+        /// jabber:component:accept
+        /// </summary>
+		public const string ACCEPT			= "jabber:component:accept";
+
+		// Features
+		//<register xmlns='http://jabber.org/features/iq-register'/>
+		public const string FEATURE_IQ_REGISTER	= "http://jabber.org/features/iq-register";
+        /// <summary>
+        /// Stream Compression http://jabber.org/features/compress
+        /// </summary>
+        public const string FEATURE_COMPRESS    = "http://jabber.org/features/compress";
+
+		// Extensions (JEPs)
+		public const string SHIM				= "http://jabber.org/protocol/shim";
+		public const string PRIMARY				= "http://jabber.org/protocol/primary";
+        /// <summary>
+        /// JEP-0172 User nickname
+        /// http://jabber.org/protocol/nick
+        /// </summary>
+        public const string NICK                = "http://jabber.org/protocol/nick";
+                
+        /// <summary>
+        /// JEP-0085 Chat State Notifications
+        /// http://jabber.org/protocol/chatstates
+        /// </summary>
+        public const string CHATSTATES          = "http://jabber.org/protocol/chatstates";
+
+        /// <summary>
+        /// JEP-0138: Stream Compression
+        /// </summary>
+        public const string COMPRESS            = "http://jabber.org/protocol/compress";
+		
+		/// <summary>
+		/// JEP-0020: Feature Negotiation http://jabber.org/protocol/feature-neg
+		/// </summary>
+		public const string FEATURE_NEG			= "http://jabber.org/protocol/feature-neg";
+
+		/// <summary>
+		/// JEO-0095 http://jabber.org/protocol/si
+		/// </summary>
+		public const string SI					= "http://jabber.org/protocol/si";
+		/// <summary>
+		/// JEO-0096 http://jabber.org/protocol/si/profile/file-transfer
+		/// </summary>
+		public const string SI_FILE_TRANSFER	= "http://jabber.org/protocol/si/profile/file-transfer";
+
+        /// <summary>
+        /// JEP-0065 SOCKS5 bytestreams
+        /// http://jabber.org/protocol/bytestreams
+        /// </summary>
+        public const string BYTESTREAMS         = "http://jabber.org/protocol/bytestreams";
+
+		// JEP-0083
+		public const string ROSTER_DELIMITER	= "roster:delimiter";
+
+        // Jive Software Namespaces
+
+        /// <summary>
+        /// Jivesoftware asterisk-im extension (http://jivesoftware.com/xmlns/phone);
+        /// </summary>
+        public const string JIVESOFTWARE_PHONE  = "http://jivesoftware.com/xmlns/phone";
+
+        /// <summary>
+        /// JEP-0071: XHTML-IM (http://jivesoftware.com/xmlns/phone)
+        /// </summary>
+        public const string XHTML_IM            = "http://jabber.org/protocol/xhtml-im";
+        public const string XHTML			    = "http://www.w3.org/1999/xhtml";
+
+        
+        /// <summary>
+        /// XEP-0115: Entity Capabilities (http://jabber.org/protocol/caps)
+        /// </summary>
+        public const string CAPS                = "http://jabber.org/protocol/caps";
+
+        /// <summary>
+        /// Jingle http://jabber.org/protocol/jingle
+        /// </summary>
+        public const string JINGLE                  = "http://jabber.org/protocol/jingle";
+
+        /// <summary>
+        /// Jingle audio format description http://jabber.org/protocol/jingle/description/audio
+        /// </summary>
+        public const string JINGLE_AUDIO_DESCRIPTION = "http://jabber.org/protocol/jingle/description/audio";
+
+        /// <summary>
+        /// Jingle Info audio http://jabber.org/protocol/jingle/info/audio;
+        /// </summary>
+        public const string JINGLE_AUDIO_INFO        = "http://jabber.org/protocol/jingle/info/audio";
+
+
+        public const string JINGLE_VIDEO_DESCRIPTION = "http://jabber.org/protocol/jingle/description/video";
+
+        /// <summary>
+        /// GeoLoc (http://jabber.org/protocol/geoloc)
+        /// </summary>
+        public const string GEOLOC              = "http://jabber.org/protocol/geoloc";
+
+        /// <summary>
+        /// <para>XMPP ping</para>
+        /// <para>Namespace: urn:xmpp:ping</para>
+        /// <para><seealso cref="http://www.xmpp.org/extensions/xep-0199.html">http://www.xmpp.org/extensions/xep-0199.html</seealso></para>
+        /// </summary>
+        public const string PING                = "urn:xmpp:ping";
+                
+        /// <summary>
+        /// Ad-Hoc Commands (http://jabber.org/protocol/commands)
+        /// </summary>
+        public const string COMMANDS            = "http://jabber.org/protocol/commands";
+
+        // Pubsub stuff
+        public const string PUBSUB              = "http://jabber.org/protocol/pubsub";
+        public const string PUBSUB_EVENT        = "http://jabber.org/protocol/pubsub#event";        
+        public const string PUBSUB_OWNER        = "http://jabber.org/protocol/pubsub#owner";
+
+        // Http-Binding XEP-0124
+        public const string HTTP_BIND           = "http://jabber.org/protocol/httpbind";
+        
+        /// <summary>
+        /// <para>XEP-0184: Message Receipts</para>
+        /// <para>urn:xmpp:receipts</para>        
+        /// </summary>
+        public const string MSG_RECEIPT         = "urn:xmpp:receipts";
+
+        /// <summary>
+        /// <para>XEP-0048: Bookmark Storage</para>
+        /// <para>storage:bookmarks</para>
+        /// </summary>
+        public const string STORAGE_BOOKMARKS   = "storage:bookmarks";
+
+        /// <summary>
+        /// <para>XEP-0047: In-Band Bytestreams (IBB)</para>
+        /// <para>http://jabber.org/protocol/ibb</para>
+        /// </summary>
+        public const string IBB                 = "http://jabber.org/protocol/ibb";
+
+        /// <summary>
+        /// <para></para>
+        /// <para>http://jabber.org/protocol/amp</para>
+        /// </summary>
+        public const string AMP                 = "http://jabber.org/protocol/amp";
+
+        /// <summary>
+        /// <para>XEP-0153: vCard-Based Avatars</para>
+        /// <para>vcard-temp:x:update</para>
+        /// </summary>
+        public const string VCARD_UPDATE        = "vcard-temp:x:update";
+
+        public const string URN_TIME            = "urn:xmpp:time";
+
+        /// <summary>
+        /// <para>XEP-0145 Annotations</para>
+        /// <para>storage:rosternotes</para>
+        /// </summary>
+        public const string STORAGE_ROSTERNOTES = "storage:rosternotes";
+	}	
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/Date.cs b/lib/agsxmpp/agsxmpp/Util/Date.cs
new file mode 100644
index 0000000..d91aeb0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/Date.cs
@@ -0,0 +1,112 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.Util
+{
+	/// <summary>
+	/// Class handles the XMPP time format
+	/// </summary>
+	public class Time
+	{
+        /*
+            <x xmlns="jabber:x:delay" from="cachet at conference.cachet.myjabber.net/dan" stamp="20060303T15:43:08" />         
+        */
+		/// <summary>
+        /// 
+		/// </summary>
+		/// <param name="date"></param>
+		/// <returns></returns>
+		public static DateTime Date(string date)
+		{
+			// better put here a try catch in case a client sends a wrong formatted date
+			try
+			{
+				DateTime dt = new DateTime( int.Parse(date.Substring(0, 4)),
+					                        int.Parse(date.Substring(4, 2)),
+					                        int.Parse(date.Substring(6, 2)),
+					                        int.Parse(date.Substring(9, 2)),
+					                        int.Parse(date.Substring(12, 2)),
+					                        int.Parse(date.Substring(15, 2))
+                                          );
+                
+                return dt.ToLocalTime();
+			}
+			catch
+			{
+				return DateTime.MinValue;
+			}
+		}
+		
+		/// <summary>
+		/// Get a XMPP string representation of a Date        
+		/// </summary>
+		/// <param name="date">DateTime</param>
+		/// <returns>XMPP string representation of a DateTime value</returns>
+		public static string Date(DateTime date)
+		{			
+			return date.ToString("yyyyMMddTHH:mm:ss");
+		}
+
+        /// <summary>
+        /// The new standard used by XMPP in JEP-82 (ISO-8601)
+        /// <example>1970-01-01T00:00Z</example>
+        /// </summary>
+        /// <param name="date"></param>
+        /// <returns></returns>
+		public static DateTime ISO_8601Date(string date)
+		{
+			// .NET does a great Job parsing this Date profile
+			try
+			{
+				return DateTime.Parse(date);
+			}
+			catch
+			{
+				return DateTime.MinValue;
+			}
+		}
+
+        /// <summary>
+        /// The new standard used by XMPP in JEP-82 (ISO-8601)
+        /// converts a local DateTime to a ISO-8601 formatted date in UTC format.
+        /// <example>1970-01-01T00:00Z</example>
+        /// </summary>
+		/// <param name="date">local Datetime</param>
+		/// <returns></returns>
+        public static string ISO_8601Date(DateTime date)
+		{
+            return date.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ");                                
+            //return date.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");	
+            //return date.ToString("yyyy-MM-ddTHH:mm:ssZ");	
+
+            //("yyyy'-'MM'-'dd HH':'mm':'ss'Z'") 			
+		}
+        
+        public static TimeSpan UtcOffset()
+        {
+            var localZone = TimeZone.CurrentTimeZone;
+            var currentDate = DateTime.Now;
+            return localZone.GetUtcOffset(currentDate);
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/Enum.cs b/lib/agsxmpp/agsxmpp/Util/Enum.cs
new file mode 100644
index 0000000..4bca9b1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/Enum.cs
@@ -0,0 +1,142 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Reflection;
+
+namespace agsXMPP.Util
+{
+	/// <summary>
+	/// Provides helper functions for Enumerations.
+	/// </summary>
+	/// <remarks>Extends the <see cref="T:System.Enum">System.Enum Class</see>.</remarks>
+	/// <seealso cref="T:System.Enum">System.Enum Class</seealso>
+	public class Enum
+	{
+#if CF
+		#region << Enum.Parse() for CF, credits to OpenNetCF.net for this function>>
+		/// <summary>
+		/// Use this on CF 1.0, CF 2 includes Enum.Parse() now
+		/// </summary>
+		/// <param name="enumType"></param>
+		/// <param name="value"></param>
+		/// <param name="ignoreCase"></param>
+		/// <returns></returns>        
+        public static object Parse(System.Type enumType, string value, bool ignoreCase)
+		{
+			//throw an exception on null value
+			if(value.TrimEnd(' ')=="")
+			{
+				throw new ArgumentException("value is either an empty string (\"\") or only contains white space.");
+			}
+			else
+			{
+				//type must be a derivative of enum
+				if(enumType.BaseType==Type.GetType("System.Enum"))
+				{
+					//remove all spaces
+					string[] memberNames = value.Replace(" ","").Split(',');
+					
+					//collect the results
+					//we are cheating and using a long regardless of the underlying type of the enum
+					//this is so we can use ordinary operators to add up each value
+					//I suspect there is a more efficient way of doing this - I will update the code if there is
+					long returnVal = 0;
+
+					//for each of the members, add numerical value to returnVal
+					foreach(string thisMember in memberNames)
+					{
+						//skip this string segment if blank
+						if(thisMember!="")
+						{
+							try
+							{
+								if(ignoreCase)
+								{
+									returnVal += (long)Convert.ChangeType(enumType.GetField(thisMember, BindingFlags.Public | BindingFlags.Static | BindingFlags.IgnoreCase).GetValue(null),returnVal.GetType(), null);
+								}
+								else
+								{
+									returnVal += (long)Convert.ChangeType(enumType.GetField(thisMember, BindingFlags.Public | BindingFlags.Static).GetValue(null),returnVal.GetType(), null);
+								}
+							}
+							catch
+							{
+								try
+								{
+									//try getting the numeric value supplied and converting it
+									returnVal += (long)Convert.ChangeType(System.Enum.ToObject(enumType, Convert.ChangeType(thisMember, System.Enum.GetUnderlyingType(enumType), null)),typeof(long),null);
+								}
+								catch
+								{
+									throw new ArgumentException("value is a name, but not one of the named constants defined for the enumeration.");
+								}
+								//
+							}
+						}
+					}
+
+
+					//return the total converted back to the correct enum type
+					return System.Enum.ToObject(enumType, returnVal);
+				}
+				else
+				{
+					//the type supplied does not derive from enum
+					throw new ArgumentException("enumType parameter is not an System.Enum");
+				}				
+			}
+		}
+		#endregion
+#endif
+
+#if CF || CF_2 || SL
+		public static string[] GetNames(System.Type enumType)
+		{
+			if(enumType.BaseType==Type.GetType("System.Enum"))
+			{
+				//get the public static fields (members of the enum)
+				System.Reflection.FieldInfo[] fi = enumType.GetFields(BindingFlags.Static | BindingFlags.Public);
+			
+				//create a new enum array
+				string[] names = new string[fi.Length];
+
+				//populate with the values
+				for(int iEnum = 0; iEnum < fi.Length; iEnum++)
+				{
+					names[iEnum] = fi[iEnum].Name;
+				}
+
+				//return the array
+				return names;
+			}
+			else
+			{
+				//the type supplied does not derive from enum
+				throw new ArgumentException("enumType parameter is not an System.Enum");
+			}
+		}
+#endif
+		
+
+	}
+	
+}
diff --git a/lib/agsxmpp/agsxmpp/Util/Exceptions.cs b/lib/agsxmpp/agsxmpp/Util/Exceptions.cs
new file mode 100644
index 0000000..3e1125c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/Exceptions.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace agsXMPP.util
+{
+	/// <summary>
+	/// Summary description for Exceptions.
+	/// </summary>
+	public class NotImplementedException : Exception
+	{
+		public NotImplementedException()
+		{			
+		}
+		
+		public NotImplementedException(string message) : base(message)
+		{			
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Util/Hash.cs b/lib/agsxmpp/agsxmpp/Util/Hash.cs
new file mode 100644
index 0000000..c1c226c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/Hash.cs
@@ -0,0 +1,180 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System.Text;
+#if !CF
+using System.Security.Cryptography;
+#endif
+
+namespace agsXMPP.Util
+{
+	/// <summary>
+	/// Helper class for hashing.
+	/// </summary>
+	public class Hash
+	{		
+
+		#region << SHA1 Hash Desktop Framework and Mono >>		
+#if !CF
+		public static string Sha1Hash(string pass)
+		{			
+			SHA1 sha = SHA1.Create();
+			byte[] hash = sha.ComputeHash(Encoding.UTF8.GetBytes(pass));            
+			return HexToString(hash);
+		}
+
+		public static byte[] Sha1HashBytes(string pass)
+		{			
+			SHA1 sha = SHA1.Create();
+			return sha.ComputeHash(Encoding.UTF8.GetBytes(pass));
+		}
+
+        public static byte[] Sha1HashBytes(byte[] pass)
+        {
+            using (var sha = new SHA1Managed())
+            {
+                return sha.ComputeHash(pass);
+            }
+        }
+#endif
+
+		/// <summary>
+		/// Converts all bytes in the Array to a string representation.
+		/// </summary>
+		/// <param name="buf"></param>
+		/// <returns>string representation</returns>
+		public static string HexToString(byte[] buf)
+		{			
+			StringBuilder sb = new StringBuilder();
+			foreach (byte b in buf)
+			{
+				sb.Append(b.ToString("x2"));
+			}
+			return sb.ToString();            
+		}
+		
+		#endregion
+
+
+		#region << SHA1 Hash Compact Framework >>
+#if CF
+		
+
+		/// <summary>
+		/// return a SHA1 Hash on PPC and Smartphone
+		/// </summary>
+		/// <param name="pass"></param>
+		/// <returns></returns>
+		public static byte[] Sha1Hash(byte[] pass)
+		{
+			IntPtr hProv;
+			bool retVal = WinCeApi.CryptAcquireContext( out hProv, null, null, (int) WinCeApi.SecurityProviderType.RSA_FULL, 0 );
+			IntPtr hHash;
+			retVal = WinCeApi.CryptCreateHash( hProv, (int) WinCeApi.SecurityProviderType.CALG_SHA1, IntPtr.Zero, 0, out hHash );
+			
+			byte [] publicKey = pass;
+			int publicKeyLen = publicKey.Length;
+			retVal = WinCeApi.CryptHashData( hHash, publicKey, publicKeyLen, 0 );
+			int bufferLen = 20; //SHA1 size
+			byte [] buffer = new byte[bufferLen];
+			retVal = WinCeApi.CryptGetHashParam( hHash, (int) WinCeApi.SecurityProviderType.HP_HASHVAL, buffer, ref bufferLen, 0 );
+			retVal = WinCeApi.CryptDestroyHash( hHash );
+			retVal = WinCeApi.CryptReleaseContext( hProv, 0 );
+			
+			return buffer;
+		}
+
+		/// <summary>
+		/// return a SHA1 Hash on PPC and Smartphone
+		/// </summary>
+		/// <param name="pass"></param>
+		/// <returns></returns>
+		public static string Sha1Hash(string pass)
+		{
+			return HexToString(Sha1Hash(System.Text.Encoding.ASCII.GetBytes(pass)));		
+		}
+
+		/// <summary>
+		/// return a SHA1 Hash on PPC and Smartphone
+		/// </summary>
+		/// <param name="pass"></param>
+		/// <returns></returns>
+		public static byte[] Sha1HashBytes(string pass)
+		{
+			return Sha1Hash(System.Text.Encoding.UTF8.GetBytes(pass));
+		}
+
+		/// <summary>
+		/// omputes the MD5 hash value for the specified byte array.		
+		/// </summary>
+		/// <param name="pass">The input for which to compute the hash code.</param>
+		/// <returns>The computed hash code.</returns>
+		public static byte[] MD5Hash(byte[] pass)
+		{
+			IntPtr hProv;
+			bool retVal = WinCeApi.CryptAcquireContext( out hProv, null, null, (int) WinCeApi.SecurityProviderType.RSA_FULL, 0 );
+			IntPtr hHash;
+			retVal = WinCeApi.CryptCreateHash( hProv, (int) WinCeApi.SecurityProviderType.CALG_MD5, IntPtr.Zero, 0, out hHash );
+			
+			byte [] publicKey = pass;
+			int publicKeyLen = publicKey.Length;
+			retVal = WinCeApi.CryptHashData( hHash, publicKey, publicKeyLen, 0 );
+			int bufferLen = 16; //SHA1 size
+			byte [] buffer = new byte[bufferLen];
+			retVal = WinCeApi.CryptGetHashParam( hHash, (int) WinCeApi.SecurityProviderType.HP_HASHVAL, buffer, ref bufferLen, 0 );
+			retVal = WinCeApi.CryptDestroyHash( hHash );
+			retVal = WinCeApi.CryptReleaseContext( hProv, 0 );
+
+			return buffer;
+		}
+
+		#endif
+		#endregion
+
+#if !(CF || CF_2)
+        public static byte[] HMAC(byte[] key, byte[] data)
+        {
+            using (var hmacsha1 = new HMACSHA1(key, true))
+            {
+                byte[] bytes = hmacsha1.ComputeHash(data);
+                return bytes;
+            }
+        }
+
+        public static byte[] HMAC(string key, byte[] data)
+        {
+            return HMAC(Encoding.UTF8.GetBytes(key), data);
+        }
+
+        public static byte[] HMAC(byte[] key, string data)
+        {
+            return HMAC(key, Encoding.UTF8.GetBytes(data));
+        }
+
+        public static byte[] HMAC(string key, string data)
+        {
+            return HMAC(Encoding.UTF8.GetBytes(key), Encoding.UTF8.GetBytes(data));
+        }
+
+#endif
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/RNGCryptoServiceProvider.cs b/lib/agsxmpp/agsxmpp/Util/RNGCryptoServiceProvider.cs
new file mode 100644
index 0000000..a943dbe
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/RNGCryptoServiceProvider.cs
@@ -0,0 +1,90 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2007 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#if CF
+using System;
+
+namespace agsXMPP.util
+{
+	/// <summary>
+	/// Implements a cryptographic Random Number Generator (RNG) using the implementation 
+	/// provided by the cryptographic service provider (CSP).
+	/// Its a replacement for System.Security.Cryptography.RandomNumberGenerator which
+	/// is not available in the compact framework.
+	/// </summary>
+	public class RNGCryptoServiceProvider : RandomNumberGenerator
+	{
+		public RNGCryptoServiceProvider()
+		{
+
+		}
+
+		/// <summary>
+		/// Fills an array of bytes with a cryptographically strong random sequence of values.
+		/// </summary>
+		/// <param name="seed">The array to fill with cryptographically strong random bytes.</param>
+		public override void GetBytes(byte[] seed)
+		{
+			seed = _GetRandomBytes(seed);
+		}
+
+		/// <summary>
+		/// Fills an array of bytes with a cryptographically strong random sequence of nonzero values.
+		/// </summary>
+		/// <param name="seed">The array to fill with cryptographically strong random nonzero bytes.</param>
+		public override void GetNonZeroBytes(byte[] seed)
+		{
+			seed = _GetNonZeroBytes(seed);
+		}
+		
+		#region << private functions >>
+		private byte [] _GetRandomBytes(byte[] seed)
+		{			
+			IntPtr prov;
+			bool retVal = WinCeApi.CryptAcquireContext(out prov, null, null, (int) WinCeApi.SecurityProviderType.RSA_FULL, 0);
+			retVal = _CryptGenRandom(prov, seed.Length, seed);			
+			WinCeApi.CryptReleaseContext(prov, 0);
+			return seed;
+		}
+
+		private bool _CryptGenRandom(IntPtr hProv, int dwLen, byte[] pbBuffer)
+		{
+			if(System.Environment.OSVersion.Platform == PlatformID.WinCE)
+				return WinCeApi.CryptGenRandomCe(hProv, dwLen, pbBuffer);
+			else
+				return WinCeApi.CryptGenRandomXp(hProv, dwLen, pbBuffer);
+		}
+
+		private byte [] _GetNonZeroBytes(byte[] seed)
+		{
+			byte [] buf = _GetRandomBytes(seed);
+			for(int i=0; i<buf.Length; i++)
+			{
+				if(buf[i] == 0)
+					buf[i] = 1;
+			}
+			return buf;
+		}
+		#endregion
+
+	}
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/RandomNumberGenerator.cs b/lib/agsxmpp/agsxmpp/Util/RandomNumberGenerator.cs
new file mode 100644
index 0000000..866f0e8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/RandomNumberGenerator.cs
@@ -0,0 +1,61 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2007 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#if CF
+using System;
+
+namespace agsXMPP.util
+{
+	/// <summary>
+	/// Represents the abstract class from which all implementations of cryptographic random number generators derive.
+	/// Its a replacement for System.Security.RandomNumberGenerator
+	/// which is not abailavle on the compact framework
+	/// </summary>
+	public abstract class RandomNumberGenerator
+	{
+		public RandomNumberGenerator()
+		{
+
+		}
+
+		/// <summary>
+		/// Creates an instance of an implementation of a cryptographic random number generator.
+		/// </summary>
+		/// <returns>a new instance of a cryptographic random number generator.</returns>
+		public static RandomNumberGenerator Create()
+		{
+			return new RNGCryptoServiceProvider();	
+		}
+		
+		/// <summary>
+		/// When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of values.
+		/// </summary>
+		/// <param name="data">The array to fill with cryptographically strong random bytes.</param>
+		public abstract void GetBytes(byte[] data);
+
+		/// <summary>
+		/// When overridden in a derived class, fills an array of bytes with a cryptographically strong random sequence of nonzero values.
+		/// </summary>
+		/// <param name="data">The array to fill with cryptographically strong random nonzero bytes.</param>
+		public abstract void GetNonZeroBytes(byte[] data);
+	}
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/Runtime.cs b/lib/agsxmpp/agsxmpp/Util/Runtime.cs
new file mode 100644
index 0000000..5b1ec4d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/Runtime.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace agsXMPP.Util
+{
+    static class Runtime
+    {
+        public static bool IsMono()
+        {
+            Type t = Type.GetType ("Mono.Runtime");
+            if (t != null)
+                 return true;
+            
+            return false;
+        }
+
+        public static bool IsUnix()
+        {
+            int p = (int) Environment.OSVersion.Platform;
+            if ((p == 4) || (p == 6) || (p == 128))
+                return true;
+            
+            return false;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Util/WinCeApi.cs b/lib/agsxmpp/agsxmpp/Util/WinCeApi.cs
new file mode 100644
index 0000000..e695ef7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Util/WinCeApi.cs
@@ -0,0 +1,47 @@
+#if !MONO
+using System;
+using System.Runtime.InteropServices;
+
+namespace agsXMPP.util
+{
+	/// <summary>
+	/// Crypto API for Windows CE, Pocket PC and Smartphone
+	/// will be used for Hashing and the RandomNumberGenerator
+	/// </summary>
+	internal class WinCeApi
+	{
+		public enum SecurityProviderType
+		{
+			RSA_FULL		    = 1,
+			HP_HASHVAL		    = 2,
+			CALG_MD5		    = 32771,
+			CALG_SHA1		    = 32772            
+		}        
+
+		[DllImport("coredll.dll")]
+		public static extern bool CryptAcquireContext(out IntPtr hProv, string pszContainer, string pszProvider, int dwProvType,int dwFlags);
+		
+		[DllImport("coredll.dll")]
+		public static extern bool CryptCreateHash(IntPtr hProv, int Algid, IntPtr hKey, int dwFlags, out IntPtr phHash);
+		
+		[DllImport("coredll.dll")]
+		public static extern bool CryptHashData(IntPtr hHash, byte [] pbData, int dwDataLen, int dwFlags);
+		
+		[DllImport("coredll.dll")]
+		public static extern bool CryptGetHashParam(IntPtr hHash, int dwParam, byte[] pbData, ref int pdwDataLen, int dwFlags);
+		
+		[DllImport("coredll.dll")]
+		public static extern bool CryptDestroyHash(IntPtr hHash);
+		
+		[DllImport("coredll.dll")]
+		public static extern bool CryptReleaseContext(IntPtr hProv, int dwFlags);
+
+		[DllImport("coredll.dll", EntryPoint="CryptGenRandom", SetLastError=true)]
+		public static extern bool CryptGenRandomCe(IntPtr hProv, int dwLen, byte[] pbBuffer);
+		
+		[DllImport("advapi32.dll", EntryPoint="CryptGenRandom", SetLastError=true)]
+		public static extern bool CryptGenRandomXp(IntPtr hProv, int dwLen, byte[] pbBuffer);
+		
+	}
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/CData.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/CData.cs
new file mode 100644
index 0000000..f5404ee
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/CData.cs
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2011 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+namespace agsXMPP.Xml.Dom
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class CData : Node
+    {
+        public CData()
+        {
+            NodeType = NodeType.Cdata;
+        }
+
+        public CData(string data)
+            : this()
+        {
+            Value = data;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/Comment.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/Comment.cs
new file mode 100644
index 0000000..c30815c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/Comment.cs
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+namespace agsXMPP.Xml.Dom
+{
+	/// <summary>
+	/// Summary description for Comment.
+	/// </summary>
+	public class Comment : Node
+	{
+		public Comment()
+		{
+			NodeType = NodeType.Comment;
+		}
+		
+		public Comment(string text) : this()
+		{
+			Value = text;
+		}
+	}
+	
+}
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/Document.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/Document.cs
new file mode 100644
index 0000000..d933f34
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/Document.cs
@@ -0,0 +1,132 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System.IO;
+
+namespace agsXMPP.Xml.Dom
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Document : Node
+	{
+		public Document()
+		{
+			NodeType = NodeType.Document;
+		}
+
+		public Element RootElement
+		{
+			get
+			{
+				foreach (Node n in this.ChildNodes)
+				{
+					if(n.NodeType == NodeType.Element)
+						return n as Element;
+				}
+				return null;
+			}
+		}
+
+		#region << Properties and Member Variables >>
+		private string	m_Encoding	= null;
+		private string	m_Version	= null;
+
+		public string Encoding
+		{
+			get { return m_Encoding; }
+			set { m_Encoding = value; }
+		}
+
+		public string Version
+		{
+			get { return m_Version; }
+			set { m_Version = value; }
+		}
+		#endregion
+
+		/// <summary>
+		/// Clears the Document
+		/// </summary>
+		public void Clear()
+		{
+			this.ChildNodes.Clear();
+		}
+
+		#region << Load functions >>		
+		public void LoadXml(string xml)
+		{
+            if (!string.IsNullOrEmpty(xml))
+            {
+                DomLoader.Load(xml, this);
+            }
+		}
+
+		public bool LoadFile(string filename)
+		{
+		    if (File.Exists(filename))
+			{
+				try
+				{
+					using(var sr = new StreamReader(filename))
+                    {
+					    DomLoader.Load(sr, this);
+					    sr.Close();					
+					    return true;
+                    }
+				}
+				catch
+				{
+					return false;
+				}
+			}
+		    return false;
+		}
+
+	    public bool LoadStream(Stream stream)
+        {
+            try
+            {
+                using(var sr = new StreamReader(stream))
+                {
+                    DomLoader.Load(sr, this);
+                    sr.Close();
+                    return true;
+                }
+            }
+            catch
+            {
+                return false;
+            }
+        }
+		
+		public void Save(string filename)
+		{
+			using (var w = new StreamWriter(filename))
+            {
+			    w.Write(ToString(System.Text.Encoding.UTF8));
+			    w.Flush();
+			    w.Close();
+            }
+		}
+		#endregion
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/DomLoader.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/DomLoader.cs
new file mode 100644
index 0000000..744d8b2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/DomLoader.cs
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System.IO;
+
+namespace agsXMPP.Xml.Dom
+{
+	/// <summary>
+	/// internal class that loads a xml document from a string or stream
+	/// </summary>
+	internal class DomLoader
+	{	
+		public static void Load(string xml, Document doc)
+		{
+            var sp =new StreamParser();
+
+            sp.OnStreamStart += (sender, node) => doc.ChildNodes.Add(node);
+            sp.OnStreamElement += (sender, node) => doc.RootElement.ChildNodes.Add(node);
+            
+            
+			byte[] b = System.Text.Encoding.UTF8.GetBytes(xml);
+			sp.Push(b, 0, b.Length);
+		}
+
+		public static void Load(StreamReader sr, Document doc)
+		{
+		    Load(sr.ReadToEnd(), doc);
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/Element.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/Element.cs
new file mode 100644
index 0000000..492b8fe
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/Element.cs
@@ -0,0 +1,1244 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Globalization;
+using System.Text;
+using System.IO;
+using System.Xml;
+
+namespace agsXMPP.Xml.Dom
+{	
+
+	public class Element : Node
+	{
+		// Member Variables
+		private		string			m_TagName;
+		private		string			m_Prefix;
+        private     ListDictionary  m_Attributes;
+		private		Text			m_Value				= new Text();
+
+		public Element() 
+		{
+			NodeType = NodeType.Element;
+			AddChild(m_Value);
+
+            m_Attributes = new ListDictionary();
+
+            m_TagName	= "";
+			Value		= "";			
+		}
+
+		public Element(string tagName) :this() 
+		{
+            m_TagName = tagName;
+		}
+
+		public Element(string tagName, string tagText) : this(tagName)
+		{
+            Value		= tagText;			
+		}
+
+        public Element(string tagName, bool tagText) : this(tagName, tagText ? "true" : "false")
+		{            
+		}		
+
+		public Element(string tagName, string tagText, string ns) : this(tagName, tagText)
+		{
+           Namespace		= ns;			
+		}
+				
+		/// <summary>
+		/// Is this Element a Rootnode?
+		/// </summary>
+		public bool IsRootElement
+		{
+			get
+			{
+				return (Parent != null ? false : true);
+			}
+		}
+
+		public override string Value
+		{
+			get	{ return m_Value.Value;	}
+			set	{ m_Value.Value = value; }
+		}
+		
+		public string Prefix
+		{
+			get { return m_Prefix; }
+			set { m_Prefix = value; }
+		}
+
+		/// <summary>
+		/// The Full Qualified Name
+		/// </summary>
+		public string TagName 
+		{
+			get	{ return m_TagName;	}
+			set { m_TagName = value; }
+		}
+
+		public string TextBase64
+		{
+			get 
+			{
+				byte[] b = Convert.FromBase64String(Value);
+				return Encoding.ASCII.GetString(b, 0, b.Length);
+			}
+			set 
+			{
+                byte[] b = Encoding.UTF8.GetBytes(value);
+				//byte[] b = Encoding.Default.GetBytes(value);
+				Value = Convert.ToBase64String(b, 0, b.Length);
+			}
+		}
+      
+        public ListDictionary Attributes
+        {
+            get { return m_Attributes; }
+        }
+
+		public object GetAttributeEnum(string name, Type enumType)
+		{
+			string att = GetAttribute(name);
+			if ((att == null))
+				return -1;
+			try
+			{
+#if CF
+				return util.Enum.Parse(enumType, att, true);
+#else
+				return Enum.Parse(enumType, att, true);
+#endif
+			}
+			catch (Exception)
+			{
+				return -1;
+			}
+		}
+
+		public string GetAttribute(string name)
+		{
+		    if (HasAttribute(name))
+				return (string) m_Attributes[name];
+		    return null;
+		}
+
+	    public int GetAttributeInt(string name)
+	    {
+	        if (HasAttribute(name))
+			{				
+				return int.Parse((string) m_Attributes[name]);
+			}
+	        return 0;
+	    }
+
+	    public long GetAttributeLong(string name)
+	    {
+	        if (HasAttribute(name))
+			{				
+				return long.Parse((string) m_Attributes[name]);
+			}
+	        return 0;
+	    }
+
+	    /// <summary>
+        /// Reads a boolean Attribute, if the attrib is absent it returns also false.
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public bool GetAttributeBool(string name)
+	    {
+	        if (HasAttribute(name))
+            {
+                string tmp = (string) m_Attributes[name];
+                if (tmp.ToLower() == "true")
+                    return true;
+                return false;
+            }
+	        return false;
+	    }
+
+	    public Jid GetAttributeJid(string name)
+	    {
+	        if (HasAttribute(name))
+                return new Jid(this.GetAttribute(name));
+	        return null;
+	    }
+
+	    /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="ifp"></param>
+        /// <returns></returns>
+        public double GetAttributeDouble(string name, IFormatProvider ifp)
+	    {
+	        if (HasAttribute(name))
+            {
+                try
+                {
+                    return double.Parse((string)m_Attributes[name], ifp);
+                }
+                catch
+                {
+                    return double.NaN;
+                }
+            }
+	        return double.NaN;
+	    }
+
+	    /// <summary>
+        /// Get a Attribute of type double (Decimal seperator = ".")
+        /// </summary>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public double GetAttributeDouble(string name)
+        {
+            // Parse the double always in english format ==> "." = Decimal seperator
+            NumberFormatInfo nfi = new NumberFormatInfo();
+            nfi.NumberGroupSeparator = ".";
+            return GetAttributeDouble(name, nfi); 
+        }
+
+		public bool HasAttribute(string name)
+		{
+			return Attributes.Contains(name);
+		}
+		
+		/// <summary>
+		/// Return the Text of the first Tag with a specified Name.
+		/// It doesnt traverse the while tree and checks only the unerlying childnodes
+		/// </summary>
+		/// <param name="TagName">Name of Tag to find as string</param>
+		/// <returns></returns>
+		public string GetTag(string TagName)
+		{
+			Element tag = this._SelectElement(this, TagName);
+			if ( tag != null)
+				return tag.Value;
+		    return null;
+		}
+
+		public string GetTag(string TagName, bool traverseChildren)
+		{
+			Element tag = this._SelectElement(this, TagName, traverseChildren);
+			if ( tag != null)
+				return tag.Value;
+		    return null;
+		}
+
+		public string GetTag(System.Type type)
+		{
+			Element tag = this._SelectElement(this, type);
+			if ( tag != null)
+				return tag.Value;
+		    return null;
+		}
+
+		public string GetTagBase64(string TagName)
+		{
+			byte[] b = Convert.FromBase64String(GetTag(TagName));
+			return Encoding.ASCII.GetString(b, 0, b.Length);
+		}
+		
+		/// <summary>
+		/// Adds a Tag and encodes the Data to BASE64
+		/// </summary>
+		/// <param name="argTagname"></param>
+		/// <param name="argText"></param>
+		public void SetTagBase64(string argTagname, string argText)
+		{
+			byte[] b = Encoding.Unicode.GetBytes(argText);
+			SetTag(argTagname, Convert.ToBase64String(b, 0, b.Length));
+		}
+
+		/// <summary>
+		/// Adds a Tag end decodes the byte buffer to BASE64
+		/// </summary>
+		/// <param name="argTagname"></param>
+		/// <param name="buffer"></param>
+		public void SetTagBase64(string argTagname, byte[] buffer)
+		{
+			SetTag(argTagname, Convert.ToBase64String(buffer, 0, buffer.Length));
+		}
+		
+		public void SetTag(string argTagname, string argText)
+		{
+			if (HasTag(argTagname) == false)
+				AddChild(new Element(argTagname, argText));
+			else
+				SelectSingleElement(argTagname).Value = argText;
+		}
+
+		public void SetTag(Type type, string argText)
+		{
+			if (HasTag(type) == false)
+			{
+				Element newel;
+				newel		= (Element) Activator.CreateInstance(type);
+				newel.Value = argText;
+				AddChild(newel);
+			}
+			else
+				SelectSingleElement(type).Value = argText;
+		}
+
+		public void SetTag(Type type)
+		{
+			if (HasTag(type))			
+				RemoveTag(type);
+			
+			AddChild( (Element) Activator.CreateInstance(type) );
+		}
+
+		public void SetTag(string argTagname)
+		{
+			SetTag(argTagname, "");
+		}
+                
+		public void SetTag(string argTagname, string argText, string argNS)
+		{
+			if (HasTag(argTagname) == false)				
+				AddChild(new Element(argTagname, argText, argNS));			
+			else
+			{
+				Element e = SelectSingleElement(argTagname);
+				e.Value		= argText;
+				e.Namespace = argNS;
+			}
+		}
+
+        public void SetTag(string argTagname, double dbl, IFormatProvider ifp)
+        {
+            SetTag(argTagname, dbl.ToString(ifp));
+        }
+
+        public void SetTag(string argTagname, double dbl)
+        {
+            NumberFormatInfo nfi = new NumberFormatInfo();
+            nfi.NumberGroupSeparator = ".";
+            SetTag(argTagname, dbl, nfi);
+        }
+
+        public void SetTag(string argTagname, bool val)
+        {
+            SetTag(argTagname, val ? "true" : "false");
+        }
+
+        public void SetTag(string argTagname, int val)
+        {
+            SetTag(argTagname, val.ToString());
+        }
+
+        public void SetTag(string argTagname, Jid jid)
+        {
+            SetTag(argTagname, jid.ToString());
+        }
+
+		public void AddTag(string argTagname, string argText)
+		{			
+			AddChild(new Element(argTagname, argText));			
+		}
+
+		public void AddTag(string argTagname)
+		{			
+			AddChild(new Element(argTagname));			
+		}
+
+		public object GetTagEnum(string name, System.Type enumType)
+		{			
+			string tag = this.GetTag(name);
+			if ( (tag == null) || (tag.Length == 0) )
+				return -1;
+			try
+			{
+#if CF
+				return util.Enum.Parse(enumType, tag, true);
+#else
+				return Enum.Parse(enumType, tag, true);
+#endif
+			}
+			catch (Exception)
+			{
+				return -1;
+			}
+		}
+
+		/// <summary>
+		/// Return the Text of the first Tag with a specified Name in all childnodes as boolean
+		/// </summary>
+		/// <param name="TagName">name of Tag to findas string</param>
+		/// <returns></returns>
+		public bool GetTagBool(string TagName)
+		{
+			Element tag = this._SelectElement(this, TagName);
+			if ( tag != null)
+			{
+			    if (tag.Value.ToLower() == "false" || tag.Value.ToLower() == "0")
+				{
+					return false;
+				}
+			    if(tag.Value.ToLower() == "true" ||	tag.Value.ToLower() == "1")
+			    {
+			        return true;
+			    }
+			    return false;
+			}
+		    return false;
+		}
+
+		public int GetTagInt(string TagName)
+		{
+			Element tag = _SelectElement(this, TagName);
+			if ( tag != null)
+				return int.Parse(tag.Value);
+		    return 0;
+		}
+
+
+        public Jid GetTagJid(string TagName)
+        {
+            string jid = GetTag(TagName);
+            
+            if (jid != null)
+                return new Jid(jid);
+            return null;
+        }         
+         
+        
+        /// <summary>
+        /// Get a Tag of type double (Decimal seperator = ".")
+        /// </summary>
+        /// <param name="TagName"></param>
+        /// <returns></returns>
+        public double GetTagDouble(string argTagName)
+        {
+            // Parse the double always in english format ==> "." = Decimal seperator
+            NumberFormatInfo nfi = new NumberFormatInfo();
+            nfi.NumberGroupSeparator = ".";
+            
+            return GetTagDouble(argTagName, nfi);
+        }
+
+        /// <summary>
+        /// Get a Tag of type double with the given iFormatProvider
+        /// </summary>
+        /// <param name="TagName"></param>
+        /// <param name="nfi"></param>
+        /// <returns></returns>
+        public double GetTagDouble(string argTagName, IFormatProvider ifp)
+        {           
+            string val = GetTag(argTagName);
+            if (val != null)
+                return Double.Parse(val, ifp);
+            return Double.NaN;
+        }
+
+		public bool HasTag(string name)
+		{
+			Element tag = _SelectElement(this, name);
+			if ( tag != null)
+				return true;
+		    return false;
+		}
+
+		public bool HasTag(string name, bool traverseChildren)
+		{
+			Element tag = _SelectElement(this, name, traverseChildren);
+			if ( tag != null)
+				return true;
+		    return false;
+		}		
+
+		public bool HasTag(Type type)
+		{
+			Element tag = _SelectElement(this, type);
+			if ( tag != null)
+				return true;
+		    return false;
+		}
+
+        public bool HasTag<T>() where T : Element
+        {
+            return SelectSingleElement<T>() != null;
+        }
+
+        public bool HasTagt<T>(bool traverseChildren) where T : Element
+        {
+            return SelectSingleElement<T>(traverseChildren) != null;
+        }
+
+
+		public bool HasTag(Type type, bool traverseChildren)
+		{
+			Element tag = this._SelectElement(this, type, traverseChildren);
+			if ( tag != null)
+				return true;
+		    return false;
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="enumType"></param>
+		/// <returns></returns>		
+        public object HasTagEnum(Type enumType)
+		{			
+#if CF || CF_2            
+			string[] members = Util.Enum.GetNames(enumType);	
+#else
+			string[] members = Enum.GetNames(enumType);
+#endif
+			foreach (string member in members)
+			{
+				if (HasTag(member))
+#if CF
+					return util.Enum.Parse(enumType, member, false);
+#else
+					return Enum.Parse(enumType, member, false);
+#endif
+			}
+			return -1;			
+		}
+
+		/// <summary>
+		/// Remove a Tag when it exists
+		/// </summary>
+		/// <param name="TagName">Tagname to remove</param>
+		/// <returns>true when existing and removed, false when not existing</returns>
+		public bool RemoveTag(string TagName)
+		{
+			Element tag = _SelectElement(this, TagName);
+			if ( tag != null)
+			{
+				tag.Remove();
+				return true;
+			}
+		    return false;
+		}
+
+		/// <summary>
+		/// Remove a Tag when it exists
+		/// </summary>
+		/// <param name="type">Type of the tag that should be removed</param>
+		/// <returns>true when existing and removed, false when not existing</returns>
+		public bool RemoveTag(Type type)
+		{
+			Element tag = _SelectElement(this, type);
+			if (tag != null)
+			{
+				tag.Remove();
+				return true;
+			}
+			
+            return false;
+		}
+
+        public bool RemoveTag<T>() where T : Element
+        {
+            Element tag = SelectSingleElement<T>();
+            if (tag != null)
+            {
+                tag.Remove();
+                return true;
+            }
+            
+            return false;
+        }
+
+        /// <summary>
+        /// Removes all Tags of the given type. Doesnt traverse the tree
+        /// </summary>
+        /// <param name="type">Type of the tags that should be removed</param>
+        /// <returns>true when tags were removed, false when no tags were found and removed</returns>
+        public bool RemoveTags(Type type)
+        {
+            bool ret = false;
+
+            ElementList list = SelectElements(type);
+            
+            if (list.Count > 0)
+                ret = true;
+
+            foreach (Element e in list)
+                e.Remove();
+
+            return ret;
+        }
+
+        /// <summary>
+        /// Removes all Tags of the given type. Doesnt traverse the tree
+        /// </summary>
+        /// <typeparam name="T">Type of the tags that should be removed</typeparam>
+        /// <returns>true when tags were removed, false when no tags were found and removed</returns>
+        public bool RemoveTags<T>() where T : Element
+        {
+            return RemoveTags(typeof (T));
+        }
+
+		/// <summary>
+		/// Same as AddChild, but Replaces the childelement when it exists
+		/// </summary>
+		/// <param name="e"></param>
+		public void ReplaceChild(Element e)
+		{
+			if (HasTag(e.TagName))
+				RemoveTag(e.TagName);
+			
+			AddChild(e);
+		}
+
+		public string Attribute(string name) 
+		{
+			return (string) m_Attributes[name];
+		}
+
+		/// <summary>
+		/// Removes a Attribute
+		/// </summary>
+		/// <param name="name">Attribute as string to remove</param>
+		public void RemoveAttribute(string name)
+		{
+			if (HasAttribute(name))
+			{
+				Attributes.Remove(name);
+			}
+		}
+
+		/// <summary>
+		/// Adds a new Attribue or changes a Attriv when already exists
+		/// </summary>
+		/// <param name="name">name of Attribute to add/change</param>
+		/// <param name="value">value of teh Attribute to add/change</param>
+		public void SetAttribute(string name, string val) 
+		{
+			// When the attrib already exists then we overweite it
+			// So we must remove it first and add it again then
+			if (HasAttribute(name))
+			{
+				Attributes.Remove(name);
+			}
+			m_Attributes.Add(name, val);
+			
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+		public void SetAttribute(string name, int value)
+		{
+			SetAttribute(name, value.ToString());
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        public void SetAttribute(string name, long value)
+        {
+            SetAttribute(name, value.ToString());
+        }
+
+        /// <summary>
+        /// Writes a boolean attribute, the value is either 'true' or 'false'
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="val"></param>
+        public void SetAttribute(string name, bool val)
+        {
+            // When the attrib already exists then we overweite it
+            // So we must remove it first and add it again then
+            if (HasAttribute(name))
+            {
+                Attributes.Remove(name);
+            }
+            m_Attributes.Add(name, val ? "true" : "false");
+        }
+
+        /// <summary>
+        /// Set a attribute of type Jid
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        public void SetAttribute(string name, Jid value)
+        {
+             if (value != null)
+                    SetAttribute(name, value.ToString());
+                else
+                    RemoveAttribute(name);
+        }
+
+        /// <summary>
+        /// Set a attribute from a double in english number format
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        public void SetAttribute(string name, double value)
+        {
+            NumberFormatInfo nfi = new NumberFormatInfo();
+            nfi.NumberGroupSeparator = ".";
+            SetAttribute(name, value, nfi);
+        }
+
+        /// <summary>
+        /// Set a attribute from a double with the given Format provider
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="value"></param>
+        /// <param name="ifp"></param>
+        public void SetAttribute(string name, double value, IFormatProvider ifp)
+        {
+            SetAttribute(name, value.ToString(ifp));
+        }
+
+
+		public void SetNamespace(string value) 
+		{
+			SetAttribute("xmlns", value);	
+		}
+
+        private CData GetFirstCDataNode()
+        {
+            foreach (Node ch in ChildNodes)
+            {
+                if (ch.NodeType == NodeType.Cdata)
+                    return ch as CData;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Has this Element some CDATA?
+        /// </summary>
+        /// <returns></returns>
+        public bool HasData()
+        {
+            return GetFirstCDataNode() != null;
+        }
+
+        /// <summary>
+        /// Get the CDATA
+        /// </summary>
+        /// <returns></returns>
+	    public string GetData()
+	    {
+	        var data = GetFirstCDataNode();
+	        return data == null ? null : data.Value;
+	    }
+
+        /// <summary>
+        /// Set the CDATA
+        /// </summary>
+        /// <param name="cdata"></param>
+        public void SetData(string cdata)
+        {
+            var data = GetFirstCDataNode();
+            if (data == null)
+            {
+                data = new CData();
+                AddChild(data);
+            }
+            data.Value = cdata;
+        }
+
+	    public string InnerXml
+		{
+			get
+			{
+			    if (ChildNodes.Count > 0)
+				{
+					string xml = "";
+					try
+					{						
+						for (int i = 0; i < ChildNodes.Count; i++)
+						{
+							if (ChildNodes.Item(i).NodeType == NodeType.Element)
+								xml += ChildNodes.Item(i).ToString();
+							else if (ChildNodes.Item(i).NodeType == NodeType.Text)
+								xml += ChildNodes.Item(i).Value;
+						
+						}
+					}
+					catch (Exception)
+					{
+					}
+					return xml;
+
+				}
+			    return null;
+			}
+		    set
+            {
+                Document doc = new Document();
+                doc.LoadXml(value);
+                Element root = doc.RootElement;
+                if (root != null)
+                {
+                    ChildNodes.Clear();
+                    AddChild(root);
+                }
+                
+            }
+		}
+
+        /// <summary>
+        /// returns whether the current element has child elements or not.
+        /// cares only about element, not text nodes etc...
+        /// </summary>
+        public bool HasChildElements
+        {
+	        get
+	        {
+                foreach (Node e in ChildNodes)
+                {
+                    if (e.NodeType == NodeType.Element)
+                        return true;
+                }
+		        return false;	     
+	        }
+        }
+
+		/// <summary>
+		/// returns the first child element (no textNodes)
+		/// </summary>
+		public Element FirstChild
+		{
+			get
+			{
+			    if (ChildNodes.Count > 0)
+                {
+                    foreach (Node e in ChildNodes)
+                    {
+                        if (e.NodeType == NodeType.Element)
+                            return e as Element;
+                    }
+                    return null;
+	            }
+			    return null;
+			}
+		}
+
+		/// <summary>
+		/// Returns the first ChildNode, doesnt matter of which type it is
+		/// </summary>
+		public Node FirstNode
+		{
+			get
+			{
+			    if(ChildNodes.Count > 0)
+					return ChildNodes.Item(0) as Node;
+			    return null;
+			}
+		}
+
+		/// <summary>
+		/// Returns the last ChildNode, doesnt matter of which type it is
+		/// </summary>
+		public Node LastNode
+		{
+			get
+			{
+			    if(ChildNodes.Count > 0)
+					return ChildNodes.Item(ChildNodes.Count -1) as Node;
+			    return null;
+			}
+		}
+
+        internal string StartTag()
+        {
+            using (StringWriter sw = new StringWriter())
+            {
+                using (XmlTextWriter tw = new XmlTextWriter(sw))
+                {
+                    tw.Formatting = Formatting.None;
+
+                    if (Prefix == null)
+                        tw.WriteStartElement(TagName);
+                    else
+                        tw.WriteStartElement(Prefix + ":" + TagName);
+
+                    // Write Namespace
+                    if (Namespace != null
+                        && Namespace.Length != 0
+                        )
+                    {
+                        if (Prefix == null)
+                            tw.WriteAttributeString("xmlns", Namespace);
+                        else
+                            tw.WriteAttributeString("xmlns:" + Prefix, Namespace);
+                    }
+
+                    foreach (string attName in this.Attributes.Keys)
+                    {
+                        tw.WriteAttributeString(attName, Attribute(attName));
+                    }
+
+                    tw.Flush();
+                    tw.Close();
+
+                    return sw.ToString().Replace("/>", ">");
+                }
+            }
+        }
+
+	    internal string EndTag()
+	    {
+	        if (Prefix == null)
+                return "</" + TagName + ">";
+	        return "</" + Prefix + ":" + TagName + ">";
+	    }
+
+	    #region << Xml Select Functions >>
+        /// <summary>
+        /// Find a Element by type
+        /// </summary>
+        /// <param name="type"></param>
+        /// <returns></returns>
+		public Element SelectSingleElement(System.Type type)
+		{
+			return _SelectElement(this, type);
+		}
+
+        /// <summary>
+        /// find a Element by type and loop thru all children
+        /// </summary>
+        /// <param name="type"></param>
+        /// <param name="loopChildren"></param>
+        /// <returns></returns>
+        public Element SelectSingleElement(System.Type type, bool loopChildren)
+        {
+            return _SelectElement(this, type, true);
+        }
+
+		public Element SelectSingleElement(string TagName)
+		{
+			return _SelectElement(this, TagName);
+		}
+
+        public Element SelectSingleElement(string TagName, bool traverseChildren)
+        {
+            return _SelectElement(this, TagName, true);
+        }
+
+		public Element SelectSingleElement(string TagName, string AttribName, string AttribValue)
+		{
+			return _SelectElement(this, TagName, AttribName, AttribValue);
+		}
+
+		public Element SelectSingleElement(string TagName, string ns)
+		{
+            return _SelectElement(this, TagName, ns, true);
+		}
+
+        public Element SelectSingleElement(string TagName, string ns, bool traverseChildren)
+        {            
+            return _SelectElement(this, TagName, ns, traverseChildren);
+        }
+        
+        public T SelectSingleElement<T>() where T : Element
+        {
+            return (T)_SelectElement(this, typeof(T));
+        }
+
+        public T SelectSingleElement<T>(bool traverseChildren) where T : Element
+        {
+            return (T)_SelectElement(this, typeof(T), traverseChildren);
+        } 
+
+		/// <summary>
+		/// Returns all childNodes with the given Tagname,
+		/// this function doesn't traverse the whole tree!!!
+		/// </summary>
+		/// <param name="TagName"></param>
+		/// <returns></returns>
+		public ElementList SelectElements(string TagName)
+		{
+            ElementList es = new ElementList();
+			//return this._SelectElements(this, TagName, es);
+			return _SelectElements(this, TagName, es, false);
+		}
+
+        public ElementList SelectElements(string TagName, bool traverseChildren)
+        {
+            ElementList es = new ElementList();
+            //return this._SelectElements(this, TagName, es);
+            return _SelectElements(this, TagName, es, traverseChildren);
+        }
+
+        public ElementList SelectElements(System.Type type)
+		{
+            ElementList es = new ElementList();
+			return _SelectElements(this, type, es);
+		}
+
+		/// <summary>
+		/// returns a nodelist of all found nodes of the given Type
+		/// </summary>
+		/// <param name="e"></param>
+		/// <param name="type"></param>
+		/// <param name="es"></param>
+		/// <returns></returns>
+        private ElementList _SelectElements(Element e, Type type, ElementList es)
+		{			
+			return _SelectElements(e, type, es, false);	
+		}
+
+        private ElementList _SelectElements(Element e, Type type, ElementList es, bool traverseChildren)
+		{						
+			if (e.ChildNodes.Count > 0) 
+			{		
+				foreach(Node n in e.ChildNodes) 
+				{
+					if (n.NodeType == NodeType.Element)
+					{
+                        if (n.GetType() == type)                        
+						{
+							es.Add(n);
+						}
+						if (traverseChildren)
+							_SelectElements((Element) n, type, es, true);
+					}						            
+				}
+			}								
+			return es;
+		}
+
+		/// <summary>
+		/// Select a single element.
+		/// This function doesnt traverse the whole tree and checks only the underlying childnodes
+		/// </summary>
+		/// <param name="se"></param>
+		/// <param name="tagname"></param>
+		/// <returns></returns>
+		private Element _SelectElement(Node se, string tagname) 
+		{
+			return _SelectElement(se, tagname, false);
+		}
+
+		/// <summary>
+		/// Select a single element
+		/// </summary>
+		/// <param name="se"></param>
+		/// <param name="tagname"></param>
+		/// <param name="traverseChildren">when set to true then the function traverses the whole tree</param>
+		/// <returns></returns>
+		private Element _SelectElement(Node se, string tagname, bool traverseChildren) 
+		{
+			Element rElement = null;			
+					
+			if (se.ChildNodes.Count > 0) 
+			{
+				foreach(Node ch in se.ChildNodes) 
+				{
+					if (ch.NodeType == NodeType.Element)
+					{
+						if ( ((Element) ch).TagName == tagname )
+						{
+							rElement = (Element) ch;
+							return rElement;
+						}
+						else
+						{
+							if( traverseChildren)
+							{
+								rElement = _SelectElement(ch, tagname, true);
+								if (rElement != null)
+									break;
+							}
+						}
+					}
+				}				
+			}    
+						
+			return rElement;
+		}
+
+
+		private Element _SelectElement(Node se, System.Type type)
+		{
+			return _SelectElement(se, type, false);
+		}
+
+		private Element _SelectElement(Node se, System.Type type, bool traverseChildren)
+		{
+			Element rElement = null;			
+					
+			if (se.ChildNodes.Count > 0) 
+			{
+				foreach(Node ch in se.ChildNodes) 
+				{                    
+					if (ch.NodeType == NodeType.Element)
+					{                        
+						if ( ch.GetType() == type )
+						{
+							rElement = (Element) ch;
+							return rElement;
+						}
+						else
+						{
+							if( traverseChildren)
+							{
+								rElement = _SelectElement(ch, type, true);
+								if (rElement != null)
+									break;
+							}
+						}
+					}
+				}				
+			}    						
+			return rElement;
+		}
+
+		private Element _SelectElement(Node se, string tagname, string AttribName, string AttribValue) 
+		{
+			Element rElement = null;
+						
+			if (se.NodeType == NodeType.Element)
+			{
+				Element e = se as Element;
+				if (e.m_TagName == tagname)
+				{
+					if (e.HasAttribute(AttribName))
+					{
+						if (e.GetAttribute(AttribName) == AttribValue)
+						{
+							rElement = e;
+							return rElement;
+						}
+					}
+				}
+			}		
+	
+			if (se.ChildNodes.Count > 0) 
+			{
+				foreach(Node ch in se.ChildNodes) 
+				{
+					rElement = _SelectElement(ch, tagname, AttribName, AttribValue);            
+					if (rElement != null)
+						break;
+				}				
+			}    		
+			
+			return rElement;
+		}
+
+        /// <summary>
+        /// Find Element by Namespace
+        /// </summary>
+        /// <param name="se">The se.</param>
+        /// <param name="tagname">The tagname.</param>
+        /// <param name="nameSpace">The name space.</param>
+        /// <param name="traverseChildren">if set to <c>true</c> [traverse children].</param>
+        /// <returns></returns>
+        private Element _SelectElement(Node se, string tagname, string nameSpace, bool traverseChildren)
+        {
+            Element rElement = null;
+
+            if (se.ChildNodes.Count > 0)
+            {
+                foreach (Node ch in se.ChildNodes)
+                {
+                    if (ch.NodeType == NodeType.Element)
+                    {
+                        Element e = ch as Element;
+                        if (e.TagName == tagname && e.Namespace == nameSpace)
+                        {
+                            rElement = (Element)ch;
+                            return rElement;
+                        }
+                        else
+                        {
+                            if (traverseChildren)
+                            {
+                                rElement = _SelectElement(ch, tagname, nameSpace, traverseChildren);
+                                if (rElement != null)
+                                    break;
+                            }
+                        }
+                    }
+                }
+            }
+            return rElement;
+        }
+
+        private ElementList _SelectElements(Element e, string tagname, ElementList es, bool traverseChildren) 
+		{
+			if (e.ChildNodes.Count > 0) 
+			{		
+				foreach(Node n in e.ChildNodes) 
+				{
+					if (n.NodeType == NodeType.Element)
+					{
+						if ( ((Element) n).m_TagName == tagname)
+						{
+							es.Add(n);
+						}
+						if (traverseChildren)
+							_SelectElements((Element) n, tagname, es, true);
+					}
+									
+				}
+			}
+			return es;
+        }
+
+
+        public List<T> SelectElements<T>() where T : Element
+        {
+            return SelectElements<T>(false);
+        }
+
+        public List<T> SelectElements<T>(bool traverseChildren) where T : Element
+        {
+            List<T> list = new List<T>();
+            return this._SelectElements<T>(this, list, traverseChildren);
+        }
+
+        private List<T> _SelectElements<T>(Element e, List<T> list, bool traverseChildren) where T : Element
+        {
+            if (e.ChildNodes.Count > 0)
+            {
+                foreach (Node n in e.ChildNodes)
+                {
+                    if (n.NodeType == NodeType.Element)
+                    {
+                        if (n.GetType() == typeof(T))
+                        {
+                            list.Add(n as T);
+                        }
+                        if (traverseChildren)
+                            _SelectElements((Element)n, list, true);
+                    }
+                }
+            }
+            return list;
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/ElementList.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/ElementList.cs
new file mode 100644
index 0000000..b911b4b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/ElementList.cs
@@ -0,0 +1,62 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Collections;
+
+namespace agsXMPP.Xml.Dom
+{
+    public class ElementList : CollectionBase
+    {
+        public void Add(Node e) 
+		{
+            // can't add a empty node, so return immediately
+            // Some people tried dthis which caused an error
+            if (e == null)
+                return;
+            
+            List.Add(e);
+		}
+	
+		// Method implementation from the CollectionBase class
+		public void Remove(int index)
+		{
+			if (index > Count - 1 || index < 0) 
+			{
+				// Handle the error that occurs if the valid page index is       
+				// not supplied.    
+				// This exception will be written to the calling function             
+				throw new Exception("Index out of bounds");            
+			}        
+			List.RemoveAt(index);			
+		}
+	
+		public void Remove(Element e)
+		{			
+			List.Remove(e);			
+		}
+	
+		public Element Item(int index) 
+		{
+			return (Element) List[index];
+		}
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/Node.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/Node.cs
new file mode 100644
index 0000000..eac6a38
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/Node.cs
@@ -0,0 +1,269 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System.IO;
+using System.Xml;
+using System.Text;
+
+using agsXMPP.IO;
+
+namespace agsXMPP.Xml.Dom
+{
+	public enum NodeType
+	{
+		Document,	// xmlDocument
+		Element,	// normal Element
+		Text,		// Textnode
+		Cdata,		// CDATA Section
+		Comment,	// comment
+		Declaration	// processing instruction
+	}
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public abstract class Node
+	{
+		internal	Node			Parent;
+
+		private		NodeType		    m_NodeType;
+		private		string			    m_Value;
+		private		string			    m_Namespace;
+		internal	int				    m_Index;
+		private     readonly NodeList   m_ChildNodes;
+
+	    protected Node()
+		{	
+			m_ChildNodes = new NodeList(this);
+		}
+
+		public NodeType NodeType
+		{
+			get { return m_NodeType; }
+			set { m_NodeType = value; }
+		}
+
+		public virtual string Value
+		{
+			get { return m_Value; }
+			set { m_Value = value; }
+		}
+		
+		public string Namespace
+		{
+			get { return m_Namespace; }
+			set { m_Namespace = value; }			
+		}
+
+		public int Index
+		{
+			get { return m_Index; }
+		}
+
+		public NodeList ChildNodes
+		{
+			get
+			{
+				return this.m_ChildNodes;
+			}
+		}
+
+		public void Remove()
+		{
+			if ( Parent!=null )
+			{
+				int idx = m_Index;
+				Parent.ChildNodes.RemoveAt(idx);
+				Parent.ChildNodes.RebuildIndex(idx);
+			}			
+		}
+
+		public void RemoveAllChildNodes()
+		{
+			m_ChildNodes.Clear();
+		}
+
+		/// <summary>
+		/// Appends the given Element as child element
+		/// </summary>
+		/// <param name="e"></param>
+		public virtual void AddChild(Node e)
+		{
+			m_ChildNodes.Add(e);
+		}
+		
+		/// <summary>
+		/// Returns the Xml of the current Element (Node) as string
+		/// </summary>
+		public override string ToString()
+		{
+			return BuildXml(this, Formatting.None, 0, ' ');
+		}
+
+		public string ToString(Encoding enc)
+		{
+            using (var tw = new StringWriterWithEncoding(enc))
+            {
+                //System.IO.StringWriter tw = new StringWriter();
+                using (var w = new XmlTextWriter(tw))
+                {
+                    // Format the Output. So its human readable in notepad
+                    // Without that everyting is in one line
+                    w.Formatting = Formatting.Indented;
+                    w.Indentation = 3;
+
+                    WriteTree(this, w, null);
+
+                    return tw.ToString();
+                }
+            }
+		}
+
+	    /// <summary>
+		/// returns the Xml, difference to the Xml property is that you can set formatting porperties
+		/// </summary>
+		/// <param name="format"></param>
+		/// <returns></returns>
+		public string ToString(Formatting format)
+		{
+			return BuildXml(this, format, 3, ' ');
+		}
+
+		/// <summary>
+		/// returns the Xml, difference to the Xml property is that you can set formatting properties
+		/// </summary>
+		/// <param name="format"></param>
+		/// <param name="indent"></param>
+		/// <returns></returns>
+		public string ToString(Formatting format, int indent)
+		{			
+			return BuildXml(this, format, indent, ' ');
+		}
+
+		#region << Xml Serializer Functions >>
+		
+		private string BuildXml(Node e, Formatting format, int indent, char indentchar)
+		{
+		    if ( e != null )
+			{
+				using(var tw = new StringWriter())
+                {
+				    using(var w = new XmlTextWriter(tw))
+                    {
+				        w.Formatting	= format;
+				        w.Indentation	= indent;
+				        w.IndentChar	= indentchar;
+
+				        WriteTree(this, w, null);
+
+				        return tw.ToString();
+                    }
+                }
+			}
+		    return "";
+		}
+
+	    private void WriteTree(Node e, XmlTextWriter tw, Node parent) 
+		{		
+			if (e.NodeType == NodeType.Document)
+			{
+				//Write the ProcessingInstruction node.
+				// <?xml version="1.0" encoding="windows-1252"?> ...
+				Document doc = e as Document;
+				string pi = null;
+				
+				if (doc.Version != null)
+					pi += "version='" + doc.Version + "'";
+
+				if (doc.Encoding != null)
+				{
+					if (pi != null)
+						pi += " ";
+						
+					pi += "encoding='" + doc.Encoding + "'";
+				}
+				
+				if (pi != null)
+					tw.WriteProcessingInstruction("xml", pi);
+
+				foreach(Node n in e.ChildNodes) 
+				{						
+					WriteTree(n, tw, e);            
+				}				
+			}
+			else if (e.NodeType == NodeType.Text)
+			{
+				tw.WriteString(e.Value);
+			}
+			else if (e.NodeType == NodeType.Comment)
+			{
+				tw.WriteComment(e.Value);
+			}
+            else if (e.NodeType == NodeType.Cdata)
+            {
+                tw.WriteCData(e.Value);
+            }
+			else if (e.NodeType == NodeType.Element)
+			{
+				Element el = e as Element;
+
+				if (el.Prefix==null)
+					tw.WriteStartElement( el.TagName );
+				else
+					tw.WriteStartElement( el.Prefix + ":" + el.TagName );
+
+				// Write Namespace
+				if ( (parent == null || parent.Namespace != el.Namespace)
+					&& el.Namespace != null
+					&& el.Namespace.Length !=0
+					)
+				{
+					if (el.Prefix==null)
+						tw.WriteAttributeString("xmlns", el.Namespace);
+					else
+						tw.WriteAttributeString("xmlns:" + el.Prefix , el.Namespace);
+				}	
+
+				foreach (string attName in el.Attributes.Keys) 
+				{				
+					tw.WriteAttributeString(attName, el.Attribute(attName));				
+				}
+			
+				//tw.WriteString(el.Value);
+		
+				if (el.ChildNodes.Count > 0) 
+				{
+					foreach(Node n in el.ChildNodes) 
+					{						
+						WriteTree(n, tw, e);            
+					}
+					tw.WriteEndElement();
+				}    
+				else 
+				{
+					tw.WriteEndElement();
+				}
+			}
+		}
+		#endregion
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/NodeList.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/NodeList.cs
new file mode 100644
index 0000000..9673da1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/NodeList.cs
@@ -0,0 +1,114 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Collections;
+namespace agsXMPP.Xml.Dom
+{
+	/// <summary>
+	/// 
+	/// </summary>	
+	public class NodeList : CollectionBase
+    {
+		/// <summary>
+		/// Owner (Parent) of the ChildElement Collection
+		/// </summary>
+		private Node m_Owner		= null;
+
+		public NodeList()
+		{			
+		}
+
+		public NodeList(Node owner) 
+		{
+			m_Owner = owner;            
+		}
+
+        public void Add(Node e)
+        {
+            // can't add a empty node, so return immediately
+            // Some people tried this which caused an error
+            if (e == null)
+                return;
+
+            if (m_Owner != null)
+            {
+                e.Parent = m_Owner;
+                if (e.Namespace == null)
+                    e.Namespace = m_Owner.Namespace;
+            }
+
+            e.m_Index = Count;
+
+            List.Add(e);
+        }
+	
+		// Method implementation from the CollectionBase class
+		public void Remove(int index)
+		{				
+			if (index > Count - 1 || index < 0) 
+			{
+				// Handle the error that occurs if the valid page index is       
+				// not supplied.    
+				// This exception will be written to the calling function             
+				throw new Exception("Index out of bounds");            
+			}        
+			List.RemoveAt(index);
+			RebuildIndex(index);
+		}
+	
+		public void Remove(Element e)
+		{
+			int idx = e.Index;
+			List.Remove(e);
+			RebuildIndex(idx);
+		}
+	
+		public Node Item(int index) 
+		{
+			return (Node) this.List[index];
+		}
+
+        public object[] ToArray()
+        {
+            object[] ar = new object[this.List.Count];
+            for (int i = 0; i < this.List.Count; i++)
+            {
+                ar[i] = this.List[i];
+            }
+            return ar;
+        }
+
+		internal void RebuildIndex()
+		{
+            RebuildIndex(0);
+		}
+
+		internal void RebuildIndex(int start)
+		{
+			for (int i = start; i < Count; i++)
+			{
+                Node node = (Node) List[i];
+				node.m_Index = i;
+			}			
+		}       
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Dom/Text.cs b/lib/agsxmpp/agsxmpp/Xml/Dom/Text.cs
new file mode 100644
index 0000000..ddb8f02
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Dom/Text.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+namespace agsXMPP.Xml.Dom
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Text : Node
+	{
+		public Text()
+		{
+			NodeType = NodeType.Text;
+		}
+		
+		public Text(string text) : this()
+		{
+			Value = text;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/Xml/StreamParser.cs b/lib/agsxmpp/agsxmpp/Xml/StreamParser.cs
new file mode 100644
index 0000000..688336a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/StreamParser.cs
@@ -0,0 +1,483 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Collections;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.Factory;
+
+using agsXMPP.Xml.Xpnet;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.Xml
+{	
+	public delegate void StreamError		(object sender, Exception ex);
+	public delegate void StreamHandler		(object sender, Node e);
+    		
+	/// <summary>
+	/// Stream Parser is a lighweight Streaming XML Parser.
+	/// </summary>
+	public class StreamParser 
+	{		
+		// Stream Event Handlers
+		public event StreamHandler		OnStreamStart;
+		public event StreamHandler		OnStreamEnd;
+		public event StreamHandler		OnStreamElement;
+		
+        /// <summary>
+        /// Event for XML-Stream errors
+        /// </summary>
+        public event StreamError		OnStreamError;
+        
+        /// <summary>
+        /// Event for general errors
+        /// </summary>
+        public event ErrorHandler       OnError;
+			
+		private int						m_Depth;
+		private Node					m_root;
+	    private Element                 current;
+		
+		private static System.Text.Encoding utf = System.Text.Encoding.UTF8;
+		private Encoding        m_enc               = new UTF8Encoding();
+		private BufferAggregate m_buf               = new BufferAggregate();
+		private NamespaceStack  m_NamespaceStack    = new NamespaceStack();        
+		private bool            m_cdata;
+
+		public StreamParser()
+		{
+		}
+	
+		/// <summary>
+		/// Reset the XML Stream
+		/// </summary>
+		public void Reset()
+		{
+			m_Depth		= 0;
+			m_root		= null;			
+			current		= null;
+			m_cdata		= false;
+		
+			m_buf   = null;
+			m_buf	= new BufferAggregate();
+			
+			//m_buf.Clear(0);
+			m_NamespaceStack.Clear();		
+		}
+
+		/// <summary>
+		/// Reset the XML Stream
+		/// </summary>
+		/// <param name="sr">new Stream that is used for parsing</param>
+		public long Depth
+		{
+			get { return m_Depth; }
+		}
+
+        private Object thisLock = new Object();
+
+		/// <summary>
+		/// Put bytes into the parser.
+		/// </summary>
+		/// <param name="buf">The bytes to put into the parse stream</param>
+		/// <param name="offset">Offset into buf to start at</param>
+		/// <param name="length">Number of bytes to write</param>
+		public void Push(byte[] buf, int offset, int length)
+		{
+            
+            // or assert, really, but this is a little nicer.
+            if (length == 0)
+                return;
+
+            // No locking is required.  Read() won't get called again
+            // until this method returns.
+
+            // TODO: only do this copy if we have a partial token at the
+            // end of parsing.
+            byte[] copy = new byte[length];
+            System.Buffer.BlockCopy(buf, offset, copy, 0, length);
+            m_buf.Write(copy);
+
+            byte[] b = m_buf.GetBuffer();
+            int off = 0;
+            TOK tok = TOK.END_TAG;
+            ContentToken ct = new ContentToken();
+            try
+            {
+                while (off < b.Length)
+                {
+                    if (m_cdata)
+                        tok = m_enc.tokenizeCdataSection(b, off, b.Length, ct);
+                    else
+                        tok = m_enc.tokenizeContent(b, off, b.Length, ct);
+
+                    switch (tok)
+                    {
+                        case TOK.EMPTY_ELEMENT_NO_ATTS:
+                        case TOK.EMPTY_ELEMENT_WITH_ATTS:
+                            StartTag(b, off, ct, tok);
+                            EndTag(b, off, ct, tok);
+                            break;
+                        case TOK.START_TAG_NO_ATTS:
+                        case TOK.START_TAG_WITH_ATTS:
+                            StartTag(b, off, ct, tok);
+                            break;
+                        case TOK.END_TAG:
+                            EndTag(b, off, ct, tok);
+                            break;
+                        case TOK.DATA_CHARS:
+                        case TOK.DATA_NEWLINE:
+                            AddText(utf.GetString(b, off, ct.TokenEnd - off));
+                            break;
+                        case TOK.CHAR_REF:
+                        case TOK.MAGIC_ENTITY_REF:
+                            AddText(new string(new char[] { ct.RefChar1 }));
+                            break;
+                        case TOK.CHAR_PAIR_REF:
+                            AddText(new string(new char[] {ct.RefChar1,
+															ct.RefChar2}));
+                            break;
+                        case TOK.COMMENT:
+                            if (current != null)
+                            {
+                                // <!-- 4
+                                //  --> 3
+                                int start = off + 4 * m_enc.MinBytesPerChar;
+                                int end = ct.TokenEnd - off -
+                                    7 * m_enc.MinBytesPerChar;
+                                string text = utf.GetString(b, start, end);
+                                current.AddChild(new Comment(text));
+                            }
+                            break;
+                        case TOK.CDATA_SECT_OPEN:
+                            m_cdata = true;
+                            break;
+                        case TOK.CDATA_SECT_CLOSE:
+                            m_cdata = false;
+                            break;
+                        case TOK.XML_DECL:
+                            // thou shalt use UTF8, and XML version 1.
+                            // i shall ignore evidence to the contrary...
+
+                            // TODO: Throw an exception if these assuptions are
+                            // wrong
+                            break;
+                        case TOK.ENTITY_REF:
+                        case TOK.PI:
+#if CF
+					    throw new util.NotImplementedException("Token type not implemented: " + tok);
+#else
+                        throw new System.NotImplementedException("Token type not implemented: " + tok);
+#endif                            
+                    }                    
+                    off = ct.TokenEnd;
+                }
+            }
+            catch (PartialTokenException)
+            {
+                // ignored;
+            }
+            catch (ExtensibleTokenException)
+            {
+                // ignored;
+            }
+            catch (Exception ex)
+            {
+                if (OnStreamError != null)
+                    OnStreamError(this, ex);
+            }
+            finally
+            {
+                m_buf.Clear(off);
+            }            
+		}		
+		
+		private void StartTag(byte[] buf, int offset,
+			ContentToken ct, TOK tok)
+		{
+			m_Depth++;
+			int colon;
+			string name;
+			string prefix;
+			Hashtable ht = new Hashtable();
+            
+			m_NamespaceStack.Push();
+            
+			// if i have attributes
+			if ((tok == TOK.START_TAG_WITH_ATTS) ||
+				(tok == TOK.EMPTY_ELEMENT_WITH_ATTS))
+			{
+				int start;
+				int end;
+				string val;
+				for (int i=0; i<ct.getAttributeSpecifiedCount(); i++)
+				{                    
+					start =  ct.getAttributeNameStart(i);
+					end = ct.getAttributeNameEnd(i);
+					name = utf.GetString(buf, start, end - start);
+                    
+					start = ct.getAttributeValueStart(i);
+					end =  ct.getAttributeValueEnd(i);
+					//val = utf.GetString(buf, start, end - start);
+
+                    val = NormalizeAttributeValue(buf, start, end - start);
+                    // <foo b='&'/>
+					// <foo b='&amp;'
+					// TODO: if val includes &, it gets double-escaped
+					if (name.StartsWith("xmlns:"))
+					{
+						colon = name.IndexOf(':');
+						prefix = name.Substring(colon+1);
+						m_NamespaceStack.AddNamespace(prefix, val);
+					}
+					else if (name == "xmlns")
+					{
+                        m_NamespaceStack.AddNamespace(string.Empty, val);						
+					}
+					else
+					{
+						ht.Add(name, val);
+					}
+				}
+			}
+
+			name = utf.GetString(buf,
+				offset + m_enc.MinBytesPerChar,
+				ct.NameEnd - offset - m_enc.MinBytesPerChar);
+			
+            colon = name.IndexOf(':');
+			string ns = "";
+			prefix = null;
+			if (colon > 0)
+			{
+				prefix = name.Substring(0, colon);
+				name = name.Substring(colon + 1);
+				ns = m_NamespaceStack.LookupNamespace(prefix);
+			}
+			else
+			{
+				ns = m_NamespaceStack.DefaultNamespace;
+			}
+            			
+			Element newel = ElementFactory.GetElement(prefix, name, ns);
+			
+			foreach (string attrname in ht.Keys)
+			{
+				newel.SetAttribute(attrname, (string)ht[attrname]);                
+			}
+            
+			if (m_root == null)
+			{
+				m_root = newel;
+				//FireOnDocumentStart(m_root);
+				if (OnStreamStart!=null)
+					OnStreamStart(this, m_root);
+			}
+			else
+			{
+				if (current != null)
+					current.AddChild(newel);
+				current = newel;
+			}
+		}
+
+		private void EndTag(byte[] buf, int offset,	ContentToken ct, TOK tok)
+		{
+			m_Depth--;
+			m_NamespaceStack.Pop();
+
+			if (current == null)
+			{// end of doc
+				if (OnStreamEnd!=null)
+					OnStreamEnd(this, m_root);
+//				FireOnDocumentEnd();
+				return;
+			}
+
+			string name = null;
+
+			if ((tok == TOK.EMPTY_ELEMENT_WITH_ATTS) ||
+				(tok == TOK.EMPTY_ELEMENT_NO_ATTS))
+				name = utf.GetString(buf,
+					offset + m_enc.MinBytesPerChar,
+					ct.NameEnd - offset -
+					m_enc.MinBytesPerChar);
+			else
+				name = utf.GetString(buf,
+					offset + m_enc.MinBytesPerChar*2,
+					ct.NameEnd - offset -
+					m_enc.MinBytesPerChar*2);
+                
+
+//			if (current.Name != name)
+//				throw new Exception("Invalid end tag: " + name +
+//					" != " + current.Name);
+
+			Element parent = (Element) current.Parent;
+			if (parent == null)
+            {               
+                DoRaiseOnStreamElement(current);
+                //if (OnStreamElement!=null)
+                //    OnStreamElement(this, current);
+				//FireOnElement(current);
+			}
+			current = parent;
+		}
+
+        /// <summary>
+        /// If users didnt use the library correctly and had no local error handles
+        /// it always crashed here and disconencted the socket.
+        /// Catch this errors here now and foreward them.
+        /// </summary>
+        /// <param name="el"></param>
+        internal void DoRaiseOnStreamElement(Element el)
+        {
+            try
+            {
+                if (OnStreamElement != null)
+                    OnStreamElement(this, el);
+            }
+            catch (Exception ex)
+            {
+                if (OnError != null)
+                    OnError(this, ex);                
+            }
+        }
+
+        private string NormalizeAttributeValue(byte[] buf, int offset, int length)
+        {            
+            if (length == 0)
+                return null;
+
+            string val = null;
+            BufferAggregate buffer = new BufferAggregate();
+            byte[] copy = new byte[length];
+            System.Buffer.BlockCopy(buf, offset, copy, 0, length);
+            buffer.Write(copy);
+            byte[] b = buffer.GetBuffer();
+            int off = 0;
+            TOK tok = TOK.END_TAG;
+            ContentToken ct = new ContentToken();
+            try
+            {
+                while (off < b.Length)
+                {                  
+                    //tok = m_enc.tokenizeContent(b, off, b.Length, ct);
+                    tok = m_enc.tokenizeAttributeValue(b, off, b.Length, ct);
+
+                    switch (tok)
+                    {
+                        case TOK.ATTRIBUTE_VALUE_S:
+                        case TOK.DATA_CHARS:
+                        case TOK.DATA_NEWLINE:                            
+                            val += (utf.GetString(b, off, ct.TokenEnd - off));
+                            break;
+                        case TOK.CHAR_REF:
+                        case TOK.MAGIC_ENTITY_REF:                        
+                            val += new string(new char[] { ct.RefChar1 });
+                            break;
+                        case TOK.CHAR_PAIR_REF:                            
+                            val += new string(new char[] {ct.RefChar1, ct.RefChar2});
+                            break;                        
+                        case TOK.ENTITY_REF:      
+#if CF
+						    throw new util.NotImplementedException("Token type not implemented: " + tok);
+#else
+                            throw new System.NotImplementedException("Token type not implemented: " + tok);
+#endif
+                    }
+                    off = ct.TokenEnd;
+                }
+            }
+            catch (PartialTokenException)
+            {
+                // ignored;
+            }
+            catch (ExtensibleTokenException)
+            {
+                // ignored;
+            }
+            catch (Exception ex)
+            {
+                if (OnStreamError != null)
+                    OnStreamError(this, ex);
+            }
+            finally
+            {
+                buffer.Clear(off);               
+            }
+            return val;
+        }
+
+		private void AddText(string text)
+		{
+			if (text == "")
+				return;
+
+            //Console.WriteLine("AddText:" + text);
+            //Console.WriteLine(lastTOK);
+
+			if (current != null)
+			{		
+                if (m_cdata)
+                {
+                    Node last = current.LastNode;
+                    if (last != null && last.NodeType == NodeType.Cdata)
+                        last.Value = last.Value + text;
+                    else
+                        current.AddChild(new CData(text));
+                }
+                else
+                {
+				    Node last = current.LastNode;
+				    if (last != null && last.NodeType == NodeType.Text)
+					    last.Value = last.Value + text;
+				    else
+					    current.AddChild(new Text(text));
+                }
+			}
+            else
+			{
+			    // text in root element
+                Node last = ((Element)m_root).LastNode;
+                if (m_cdata)
+                {
+                    if (last != null && last.NodeType == NodeType.Cdata)
+                        last.Value = last.Value + text;
+                    else
+                        m_root.AddChild(new CData(text));
+                } else
+                {
+                    if (last != null && last.NodeType == NodeType.Text)
+                        last.Value = last.Value + text;
+                    else
+                        m_root.AddChild(new Text(text));
+                }
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/BufferAggregate.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/BufferAggregate.cs
new file mode 100644
index 0000000..badf123
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/BufferAggregate.cs
@@ -0,0 +1,140 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+using System.IO;
+
+namespace agsXMPP.Xml.Xpnet
+{
+	/// <summary>
+	/// Aggregate byte arrays together, so we can parse across IP packet boundaries
+	/// </summary>
+    public class BufferAggregate
+    { // RingBuffer of the Nieblung
+        private class BufNode
+        {
+            public byte[] buf;
+            public BufNode next = null;
+        }
+        
+        private MemoryStream m_stream = new MemoryStream();
+        private BufNode m_head = null;
+        private BufNode m_tail = null;
+        
+		/// <summary>
+		/// Create an empty buffer
+		/// </summary>
+        public BufferAggregate()
+        {
+        }
+
+		/// <summary>
+		/// Write to the buffer.  Please make sure that you won't use this memory any more after you hand it in.  
+		/// It will get mangled.
+		/// </summary>
+		/// <param name="buf"></param>
+        public void Write(byte[] buf)
+        {
+            m_stream.Write(buf, 0, buf.Length);
+            if (m_tail == null)
+            {
+                m_head = m_tail = new BufNode();
+                m_head.buf = buf;
+            }
+            else
+            {
+                BufNode n = new BufNode();
+                n.buf = buf;
+                m_tail.next = n;
+                m_tail = n;
+            }
+        }
+
+		/// <summary>
+		/// Get the current aggregate contents of the buffer.
+		/// </summary>
+		/// <returns></returns>
+        public byte[] GetBuffer()
+        {
+            return m_stream.ToArray();
+        }
+
+		/// <summary>
+		/// Clear the first "offset" bytes of the buffer, so they won't be parsed again.
+		/// </summary>
+		/// <param name="offset"></param>
+        public void Clear(int offset)
+        {
+            int s = 0;
+            int save = -1;
+
+            BufNode bn = null;
+            for (bn = m_head; bn != null; bn = bn.next)
+            {
+                if (s + bn.buf.Length <= offset)
+                {
+                    if (s + bn.buf.Length == offset)
+                    {
+                        bn = bn.next;
+                        break;
+                    }
+                    s += bn.buf.Length;
+                }
+                else
+                {
+                    save = s + bn.buf.Length - offset;
+                    break;
+                }
+            }
+
+            m_head = bn;
+            if (m_head == null)
+                m_tail = null;
+            
+            if (save > 0)
+            {
+                byte[] buf = new byte[save];
+                System.Buffer.BlockCopy(m_head.buf,
+                                        m_head.buf.Length - save,
+                                        buf, 0, save);
+                m_head.buf = buf;
+            }
+            
+            m_stream.SetLength(0);
+            for (bn = m_head; bn != null; bn = bn.next)
+            {
+                m_stream.Write(bn.buf, 0, bn.buf.Length);
+            }
+        }
+
+		/// <summary>
+		/// UTF8 encode the current contents of the buffer.  Just for prettiness in the debugger.
+		/// </summary>
+		/// <returns></returns>
+        public override string ToString()
+        {
+            byte[] b = GetBuffer();
+            return System.Text.Encoding.UTF8.GetString(b, 0, b.Length);
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/ContentToken.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/ContentToken.cs
new file mode 100644
index 0000000..7c7a7e4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/ContentToken.cs
@@ -0,0 +1,191 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+using System;
+
+namespace agsXMPP.Xml.Xpnet
+{
+	/// <summary>
+	/// Represents information returned by <code>Encoding.tokenizeContent</code>.
+	/// @see Encoding#tokenizeContent
+	/// </summary>
+	public class ContentToken : Token
+	{
+		private const int INIT_ATT_COUNT = 8;
+		private int attCount = 0;
+		private int[] attNameStart = new int[INIT_ATT_COUNT];
+		private int[] attNameEnd = new int[INIT_ATT_COUNT];
+		private int[] attValueStart = new int[INIT_ATT_COUNT];
+		private int[] attValueEnd = new int[INIT_ATT_COUNT];
+		private bool[] attNormalized = new bool[INIT_ATT_COUNT];
+
+		
+		/// <summary>
+		/// Returns the number of attributes specified in the start-tag or empty element tag.
+		/// </summary>
+		/// <returns></returns>
+		public int getAttributeSpecifiedCount() 
+		{
+			return attCount;
+		}
+
+		/// <summary>
+		/// Returns the index of the first character of the name of the
+		/// attribute index <code>i</code>.
+		/// </summary>
+		/// <param name="i"></param>
+		/// <returns></returns>
+		public int getAttributeNameStart(int i) 
+		{
+			if (i >= attCount)
+				throw new System.IndexOutOfRangeException();
+			return attNameStart[i];
+		}
+
+		/**
+		 * Returns the index following the last character of the name of the
+		 * attribute index <code>i</code>.
+		 */
+		public int getAttributeNameEnd(int i) 
+		{
+			if (i >= attCount)
+				throw new System.IndexOutOfRangeException();
+			return attNameEnd[i];
+		}
+
+		/**
+		 * Returns the index of the character following the opening quote of
+		 * attribute index <code>i</code>.
+		 */
+		public int getAttributeValueStart(int i) 
+		{
+			if (i >= attCount)
+				throw new System.IndexOutOfRangeException();
+			return attValueStart[i];
+		}
+
+		/**
+		 * Returns the index of the closing quote attribute index <code>i</code>.
+		 */
+		public int getAttributeValueEnd(int i) 
+		{
+			if (i >= attCount)
+				throw new System.IndexOutOfRangeException();
+			return attValueEnd[i];
+		}
+
+		/**
+		 * Returns true if attribute index <code>i</code> does not need to
+		 * be normalized.  This is an optimization that allows further processing
+		 * of the attribute to be avoided when it is known that normalization
+		 * cannot change the value of the attribute.
+		 */
+		public bool isAttributeNormalized(int i) 
+		{
+			if (i >= attCount)
+				throw new System.IndexOutOfRangeException();
+			return attNormalized[i];
+		}
+
+
+		/// <summary>
+		/// Clear out all of the current attributes
+		/// </summary>
+		public void clearAttributes() 
+		{
+			attCount = 0;
+		}
+  
+		/// <summary>
+		/// Add a new attribute
+		/// </summary>
+		/// <param name="nameStart"></param>
+		/// <param name="nameEnd"></param>
+		/// <param name="valueStart"></param>
+		/// <param name="valueEnd"></param>
+		/// <param name="normalized"></param>
+		public void appendAttribute(int nameStart, int nameEnd,
+			int valueStart, int valueEnd,
+			bool normalized) 
+		{
+			if (attCount == attNameStart.Length) 
+			{
+				attNameStart = grow(attNameStart);
+				attNameEnd = grow(attNameEnd);
+				attValueStart = grow(attValueStart);
+				attValueEnd = grow(attValueEnd);
+				attNormalized = grow(attNormalized);
+			}
+			attNameStart[attCount] = nameStart;
+			attNameEnd[attCount] = nameEnd;
+			attValueStart[attCount] = valueStart;
+			attValueEnd[attCount] = valueEnd;
+			attNormalized[attCount] = normalized;
+			++attCount;
+		}
+
+		/// <summary>
+		/// Is the current attribute unique?
+		/// </summary>
+		/// <param name="buf"></param>
+		public void checkAttributeUniqueness(byte[] buf)
+		{
+			for (int i = 1; i < attCount; i++) 
+			{
+				int len = attNameEnd[i] - attNameStart[i];
+				for (int j = 0; j < i; j++) 
+				{
+					if (attNameEnd[j] - attNameStart[j] == len) 
+					{
+						int n = len;
+						int s1 = attNameStart[i];
+						int s2 = attNameStart[j];
+						do 
+						{
+							if (--n < 0)
+								throw new InvalidTokenException(attNameStart[i],
+									InvalidTokenException.DUPLICATE_ATTRIBUTE);
+						} while (buf[s1++] == buf[s2++]);
+					}
+				}
+			}
+		}
+
+		private static int[] grow(int[] v) 
+		{
+			int[] tem = v;
+			v = new int[tem.Length << 1];
+            Array.Copy(tem, 0, v, 0, tem.Length);
+			return v;
+		}
+
+		private static bool[] grow(bool[] v) 
+		{
+			bool[] tem = v;
+			v = new bool[tem.Length << 1];
+            Array.Copy(tem, 0, v, 0, tem.Length);			
+			return v;
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/Encoding.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Encoding.cs
new file mode 100644
index 0000000..e0328f4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Encoding.cs
@@ -0,0 +1,3120 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+namespace agsXMPP.Xml.Xpnet
+{
+	/// <summary>
+	/// Tokens that might have been found
+	/// </summary>
+    public enum TOK
+    {
+        /**
+         * Represents one or more characters of data.
+         */
+        DATA_CHARS,
+
+        /**
+         * Represents a newline (CR, LF or CR followed by LF) in data.
+         */
+        DATA_NEWLINE,
+
+        /**
+         * Represents a complete start-tag <code><name></code>,
+         * that doesn't have any attribute specifications.
+         */
+        START_TAG_NO_ATTS,
+
+        /**
+         * Represents a complete start-tag <code><name
+         * att="val"></code>, that contains one or more
+         * attribute specifications.
+         */
+        START_TAG_WITH_ATTS,
+
+        /**
+         * Represents an empty element tag <code><name/></code>,
+         * that doesn't have any attribute specifications.
+         */
+        EMPTY_ELEMENT_NO_ATTS,
+
+        /**
+         * Represents an empty element tag <code><name
+         * att="val"/></code>, that contains one or more
+         * attribute specifications.
+         */
+        EMPTY_ELEMENT_WITH_ATTS,
+
+        /**
+         * Represents a complete end-tag <code></name></code>.
+         */
+        END_TAG,
+
+        /**
+         * Represents the start of a CDATA section
+         * <code><![CDATA[</code>.
+         */
+        CDATA_SECT_OPEN,
+
+        /**
+         * Represents the end of a CDATA section <code>]]></code>.
+         */
+        CDATA_SECT_CLOSE,
+
+        /**
+         * Represents a general entity reference.
+         */
+        ENTITY_REF,
+
+        /**
+         * Represents a general entity reference to a one of the 5
+         * predefined entities <code>amp</code>, <code>lt</code>,
+         * <code>gt</code>, <code>quot</code>, <code>apos</code>.
+         */
+        MAGIC_ENTITY_REF,
+
+        /**
+         * Represents a numeric character reference (decimal or
+         * hexadecimal), when the referenced character is less
+         * than or equal to 0xFFFF and so is represented by a
+         * single char.
+         */
+        CHAR_REF,
+
+        /**
+         * Represents a numeric character reference (decimal or
+         * hexadecimal), when the referenced character is greater
+         * than 0xFFFF and so is represented by a pair of chars.
+         */
+        CHAR_PAIR_REF,
+
+        /**
+         * Represents a processing instruction.
+         */
+        PI,
+
+        /**
+         * Represents an XML declaration or text declaration (a
+         * processing instruction whose target is
+         * <code>xml</code>).
+         */
+        XML_DECL,
+
+        /**
+         * Represents a comment <code><!-- comment --></code>.
+         * This can occur both in the prolog and in content.
+         */
+        COMMENT,
+
+        /**
+         * Represents a white space character in an attribute
+         * value, excluding white space characters that are part
+         * of line boundaries.
+         */
+        ATTRIBUTE_VALUE_S,
+
+        /**
+         * Represents a parameter entity reference in the prolog.
+         */
+        PARAM_ENTITY_REF,
+
+        /**
+         * Represents whitespace in the prolog.
+         * The token contains one or more whitespace characters.
+         */
+        PROLOG_S,
+
+        /**
+         * Represents <code><!NAME</code> in the prolog.
+         */
+        DECL_OPEN,
+
+        /**
+         * Represents <code>></code> in the prolog.
+         */
+        DECL_CLOSE,
+
+        /**
+         * Represents a name in the prolog.
+         */
+        NAME,
+
+        /**
+         * Represents a name token in the prolog that is not a name.
+         */
+        NMTOKEN,
+
+        /**
+         * Represents <code>#NAME</code> in the prolog.
+         */
+        POUND_NAME,
+
+        /**
+         * Represents <code>|</code> in the prolog.
+         */
+        OR,
+
+        /**
+         * Represents a <code>%</code> in the prolog that does not start
+         * a parameter entity reference.
+         * This can occur in an entity declaration.
+         */
+        PERCENT,
+
+        /**
+         * Represents a <code>(</code> in the prolog.
+         */
+        OPEN_PAREN,
+
+        /**
+         * Represents a <code>)</code> in the prolog that is not
+         * followed immediately by any of
+         *  <code>*</code>, <code>+</code> or <code>?</code>.
+         */
+        CLOSE_PAREN,
+
+        /**
+         * Represents <code>[</code> in the prolog.
+         */
+        OPEN_BRACKET,
+
+        /**
+         * Represents <code>]</code> in the prolog.
+         */
+        CLOSE_BRACKET,
+
+        /**
+         * Represents a literal (EntityValue, AttValue, SystemLiteral or
+         * PubidLiteral).
+         */
+        LITERAL,
+
+        /**
+         * Represents a name followed immediately by <code>?</code>.
+         */
+        NAME_QUESTION,
+
+        /**
+         * Represents a name followed immediately by <code>*</code>.
+         */
+        NAME_ASTERISK,
+
+        /**
+         * Represents a name followed immediately by <code>+</code>.
+         */
+        NAME_PLUS,
+
+        /**
+         * Represents <code><![</code> in the prolog.
+         */
+        COND_SECT_OPEN,
+
+        /**
+         * Represents <code>]]></code> in the prolog.
+         */
+        COND_SECT_CLOSE,
+
+        /**
+         * Represents <code>)?</code> in the prolog.
+         */
+        CLOSE_PAREN_QUESTION,
+
+        /**
+         * Represents <code>)*</code> in the prolog.
+         */
+        CLOSE_PAREN_ASTERISK,
+
+        /**
+         * Represents <code>)+</code> in the prolog.
+         */
+        CLOSE_PAREN_PLUS,
+
+        /**
+         * Represents <code>,</code> in the prolog.
+         */
+        COMMA,
+    };
+     
+	/// <summary>
+	/// Base tokenizer class
+	/// </summary>
+    public abstract class Encoding
+    {
+        // Bytes with type < 0 may not be data in content.
+        // The negation of the lead byte type gives the total number of bytes.
+
+		/// <summary>
+		/// Need more bytes
+		/// </summary>
+        protected const int BT_LEAD2 = -2;
+		/// <summary>
+		/// Need more bytes
+		/// </summary>
+        protected const int BT_LEAD3 = -3;
+		/// <summary>
+		/// Need more bytes
+		/// </summary>
+        protected const int BT_LEAD4 = -4;
+		/// <summary>
+		/// Not XML
+		/// </summary>
+        protected const int BT_NONXML = BT_LEAD4 - 1;
+		/// <summary>
+		/// Malformed XML
+		/// </summary>
+        protected const int BT_MALFORM = BT_NONXML - 1;
+		/// <summary>
+		/// Less than
+		/// </summary>
+        protected const int BT_LT = BT_MALFORM - 1;
+		/// <summary>
+		/// Ampersand
+		/// </summary>
+        protected const int BT_AMP = BT_LT - 1;
+		/// <summary>
+		/// right square bracket
+		/// </summary>
+        protected const int BT_RSQB = BT_AMP - 1;
+		/// <summary>
+		/// carriage return
+		/// </summary>
+        protected const int BT_CR = BT_RSQB - 1;
+		/// <summary>
+		/// line feed
+		/// </summary>
+        protected const int BT_LF = BT_CR - 1;
+
+        // Bytes with type >= 0 are treated as data in content.
+
+		/// <summary>
+		/// greater than
+		/// </summary>
+        protected const int BT_GT = 0;
+		/// <summary>
+		/// Quote
+		/// </summary>
+        protected const int BT_QUOT = BT_GT + 1;
+		/// <summary>
+		/// Apostrophe
+		/// </summary>
+        protected const int BT_APOS = BT_QUOT + 1;
+		/// <summary>
+		/// Equal sign
+		/// </summary>
+        protected const int BT_EQUALS = BT_APOS + 1;
+		/// <summary>
+		/// Question mark
+		/// </summary>
+        protected const int BT_QUEST = BT_EQUALS + 1;
+		/// <summary>
+		/// Exclamation point
+		/// </summary>
+        protected const int BT_EXCL = BT_QUEST + 1;
+		/// <summary>
+		/// Solidus (/)
+		/// </summary>
+        protected const int BT_SOL = BT_EXCL + 1;
+		/// <summary>
+		/// Semicolon
+		/// </summary>
+        protected const int BT_SEMI = BT_SOL + 1;
+		/// <summary>
+		/// Hash
+		/// </summary>
+        protected const int BT_NUM = BT_SEMI + 1;
+		/// <summary>
+		/// Left square bracket
+		/// </summary>
+        protected const int BT_LSQB = BT_NUM + 1;
+		/// <summary>
+		/// space
+		/// </summary>
+        protected const int BT_S = BT_LSQB + 1;
+		/// <summary>
+		/// 
+		/// </summary>
+        protected const int BT_NMSTRT = BT_S + 1;
+		/// <summary>
+		/// 
+		/// </summary>
+        protected const int BT_NAME = BT_NMSTRT + 1;
+		/// <summary>
+		/// Minus
+		/// </summary>
+        protected const int BT_MINUS = BT_NAME + 1;
+		/// <summary>
+		/// Other
+		/// </summary>
+        protected const int BT_OTHER = BT_MINUS + 1;
+		/// <summary>
+		/// Percent
+		/// </summary>
+        protected const int BT_PERCNT = BT_OTHER + 1;
+		/// <summary>
+		/// Left paren
+		/// </summary>
+        protected const int BT_LPAR = BT_PERCNT + 1;
+		/// <summary>
+		/// Right paren
+		/// </summary>
+        protected const int BT_RPAR = BT_LPAR + 1;
+		/// <summary>
+		/// 
+		/// </summary>
+        protected const int BT_AST = BT_RPAR + 1;
+		/// <summary>
+		/// +
+		/// </summary>
+        protected const int BT_PLUS = BT_AST + 1;
+		/// <summary>
+		/// ,
+		/// </summary>
+        protected const int BT_COMMA = BT_PLUS + 1;
+		/// <summary>
+		/// Pipe
+		/// </summary>
+        protected const int BT_VERBAR = BT_COMMA + 1;
+
+		/// <summary>
+		/// What syntax do each of the ASCII7 characters have?
+		/// </summary>
+        protected static readonly int [] asciiTypeTable = new int[]
+        {
+            /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
+            /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
+            /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
+            /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
+            /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
+            /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
+            /* 0x30 */ BT_NAME, BT_NAME, BT_NAME, BT_NAME,
+            /* 0x34 */ BT_NAME, BT_NAME, BT_NAME, BT_NAME,
+            /* 0x38 */ BT_NAME, BT_NAME, BT_NMSTRT, BT_SEMI,
+            /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
+            /* 0x40 */ BT_OTHER, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x44 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
+            /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
+            /* 0x60 */ BT_OTHER, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x64 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
+            /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
+            /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
+        };
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="sourceBuf"></param>
+		/// <param name="sourceStart"></param>
+		/// <param name="sourceEnd"></param>
+		/// <param name="targetBuf"></param>
+		/// <param name="targetStart"></param>
+		/// <returns></returns>
+        protected abstract int convert(byte[] sourceBuf,
+									   int sourceStart, int sourceEnd,
+                                       char[] targetBuf, int targetStart);
+
+
+        private static Encoding utf8Encoding;
+
+        private const byte UTF8_ENCODING = 0;
+        private const byte UTF16_LITTLE_ENDIAN_ENCODING = 1;
+        private const byte UTF16_BIG_ENDIAN_ENCODING = 2;
+        private const byte INTERNAL_ENCODING = 3;
+        private const byte ISO8859_1_ENCODING = 4;
+        private const byte ASCII_ENCODING = 5;
+
+		private static Encoding getEncoding(byte enc)
+        {
+            switch (enc)
+            {
+            case UTF8_ENCODING:
+                if (utf8Encoding == null)
+                    utf8Encoding = new UTF8Encoding();
+                return utf8Encoding;
+                /*
+            case UTF16_LITTLE_ENDIAN_ENCODING:
+                if (utf16LittleEndianEncoding == null)
+                    utf16LittleEndianEncoding = new UTF16LittleEndianEncoding();
+                return utf16LittleEndianEncoding;
+            case UTF16_BIG_ENDIAN_ENCODING:
+                if (utf16BigEndianEncoding == null)
+                    utf16BigEndianEncoding = new UTF16BigEndianEncoding();
+                return utf16BigEndianEncoding;
+            case INTERNAL_ENCODING:
+                if (internalEncoding == null)
+                    internalEncoding = new InternalEncoding();
+                return internalEncoding;
+            case ISO8859_1_ENCODING:
+                if (iso8859_1Encoding == null)
+                    iso8859_1Encoding = new ISO8859_1Encoding();
+                return iso8859_1Encoding;
+            case ASCII_ENCODING:
+                if (asciiEncoding == null)
+                    asciiEncoding = new ASCIIEncoding();
+                return asciiEncoding;
+                */
+            }
+            return null;
+        }
+        
+        private int minBPC;
+
+        /// <summary>
+        /// Constructor called by subclasses to set the minimum bytes per character
+        /// </summary>
+        /// <param name="minBPC"></param>
+        protected Encoding(int minBPC)
+        {
+            this.minBPC = minBPC;
+        }
+
+        /// <summary>
+        /// Get the byte type of the next byte.  There are guaranteed to be minBPC available bytes starting at off.
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected abstract int byteType(byte[] buf, int off);
+
+        /// <summary>
+        /// Really only works for ASCII7.
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected abstract char byteToAscii(byte[] buf, int off);
+
+        /// <summary>
+        /// This must only be called when c is an (XML significant)
+        /// ASCII character.
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <param name="c"></param>
+        /// <returns></returns>
+        protected abstract bool charMatches(byte[] buf, int off, char c);
+
+        /// <summary>
+        /// Called only when byteType(buf, off) == BT_LEAD2
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected virtual int byteType2(byte[] buf, int off) {
+            return BT_OTHER;
+        }
+        
+        /// <summary>
+        /// Called only when byteType(buf, off) == BT_LEAD3
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        int byteType3(byte[] buf, int off) {
+            return BT_OTHER;
+        }
+        
+        /// <summary>
+        /// Called only when byteType(buf, off) == BT_LEAD4
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        int byteType4(byte[] buf, int off) {
+            return BT_OTHER;
+        }
+
+        void check2(byte[] buf, int off) { }
+        void check3(byte[] buf, int off) { }
+        void check4(byte[] buf, int off) { }
+        
+        /**
+         * Moves a position forward.  On entry, <code>pos</code> gives
+         * the position of the byte at index <code>off</code> in
+         * <code>buf</code>.  On exit, it <code>pos</code> will give
+         * the position of the byte at index <code>end</code>, which
+         * must be greater than or equal to <code>off</code>.  The
+         * bytes between <code>off</code> and <code>end</code> must
+         * encode one or more complete characters.  A carriage return
+         * followed by a line feed will be treated as a single line
+         * delimiter provided that they are given to
+         * <code>movePosition</code> together.
+         */
+        protected abstract void movePosition(byte[] buf, int off, int end, Position pos);
+        
+        private void checkCharMatches(byte[] buf, int off, char c)
+        {
+            if (!charMatches(buf, off, c))
+                throw new InvalidTokenException(off);
+        }
+
+        /* off points to character following "<!-" */
+        private TOK scanComment(byte[] buf, int off, int end, Token token)
+        {
+            if (off != end) {
+                checkCharMatches(buf, off, '-');
+                off += minBPC;
+                while (off != end) {
+                    switch (byteType(buf, off)) {
+                    case BT_LEAD2:
+                        if (end - off < 2)
+                            throw new PartialCharException(off);
+                        check2(buf, off);
+                        off += 2;
+                        break;
+                    case BT_LEAD3:
+                        if (end - off < 3)
+                            throw new PartialCharException(off);
+                        check3(buf, off);
+                        off += 3;
+                        break;
+                    case BT_LEAD4:
+                        if (end - off < 4)
+                            throw new PartialCharException(off);
+                        check4(buf, off);
+                        off += 4;
+                        break;
+                    case BT_NONXML:
+                    case BT_MALFORM:
+                        throw new InvalidTokenException(off);
+                    case BT_MINUS:
+                        if ((off += minBPC) == end)
+                            throw new PartialTokenException();
+                        if (charMatches(buf, off, '-')) {
+                            if ((off += minBPC) == end)
+                                throw new PartialTokenException();
+                            checkCharMatches(buf, off, '>');
+                            token.TokenEnd = off + minBPC;
+                            return TOK.COMMENT;
+                        }
+                        break;
+                    default:
+                        off += minBPC;
+                        break;
+                    }
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following "<!" */
+        private TOK scanDecl(byte[] buf, int off, int end, Token token)
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off)) {
+            case BT_MINUS:
+                return scanComment(buf, off + minBPC, end, token);
+            case BT_LSQB:
+                token.TokenEnd = off + minBPC;
+                return TOK.COND_SECT_OPEN;
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_PERCNT:
+                    if (off + minBPC == end)
+                        throw new PartialTokenException();
+                    /* don't allow <!ENTITY% foo "whatever"> */
+                    switch (byteType(buf, off + minBPC)) {
+                    case BT_S:
+                    case BT_CR:
+                    case BT_LF:
+                    case BT_PERCNT:
+                        throw new InvalidTokenException(off);
+                    }
+                    /* fall through */
+                    goto case BT_S;
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    token.TokenEnd = off;
+                    return TOK.DECL_OPEN;
+                case BT_NMSTRT:
+                    off += minBPC;
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        private bool targetIsXml(byte[] buf, int off, int end)
+        {
+            bool upper = false;
+            if (end - off != minBPC*3)
+                return false;
+            switch (byteToAscii(buf, off)) {
+            case 'x':
+                break;
+            case 'X':
+                upper = true;
+                break;
+            default:
+                return false;
+            }
+            off += minBPC;
+            switch (byteToAscii(buf, off)) {
+            case 'm':
+                break;
+            case 'M':
+                upper = true;
+                break;
+            default:
+                return false;
+            }
+            off += minBPC;
+            switch (byteToAscii(buf, off)) {
+            case 'l':
+                break;
+            case 'L':
+                upper = true;
+                break;
+            default:
+                return false;
+            }
+            if (upper)
+                throw new InvalidTokenException(off, InvalidTokenException.XML_TARGET);
+            return true;
+        }
+
+        /* off points to character following "<?" */
+
+        private TOK scanPi(byte[] buf, int off, int end, Token token)
+        {
+            int target = off;
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off)) {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    bool isXml = targetIsXml(buf, target, off);
+                    token.NameEnd = off;
+                    off += minBPC;
+                    while (off != end) {
+                        switch (byteType(buf, off)) {
+                        case BT_LEAD2:
+                            if (end - off < 2)
+                                throw new PartialCharException(off);
+                            check2(buf, off);
+                            off += 2;
+                            break;
+                        case BT_LEAD3:
+                            if (end - off < 3)
+                                throw new PartialCharException(off);
+                            check3(buf, off);
+                            off += 3;
+                            break;
+                        case BT_LEAD4:
+                            if (end - off < 4)
+                                throw new PartialCharException(off);
+                            check4(buf, off);
+                            off += 4;
+                            break;
+                        case BT_NONXML:
+                        case BT_MALFORM:
+                            throw new InvalidTokenException(off);
+                        case BT_QUEST:
+                            off += minBPC;
+                            if (off == end)
+                                throw new PartialTokenException();
+                            if (charMatches(buf, off, '>')) {
+                                token.TokenEnd = off + minBPC;
+                                if (isXml)
+                                    return TOK.XML_DECL;
+                                else
+                                    return TOK.PI;
+                            }
+                            break;
+                        default:
+                            off += minBPC;
+                            break;
+                        }
+                    }
+                    throw new PartialTokenException();
+                case BT_QUEST:
+                    token.NameEnd = off;
+                    off += minBPC;
+                    if (off == end)
+                        throw new PartialTokenException();
+                    checkCharMatches(buf, off, '>');
+                    token.TokenEnd = off + minBPC;
+                    return (targetIsXml(buf, target, token.NameEnd)
+                            ? TOK.XML_DECL
+                            : TOK.PI);
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following "<![" */
+        private const string CDATA = "CDATA[";
+
+        private TOK scanCdataSection(byte[] buf, int off, int end, Token token)
+        {
+            /* "CDATA[".length() == 6 */
+            if (end - off < 6 * minBPC)
+                throw new PartialTokenException();
+            for (int i = 0; i < CDATA.Length; i++, off += minBPC)
+                checkCharMatches(buf, off, CDATA[i]);
+            token.TokenEnd = off;
+            return TOK.CDATA_SECT_OPEN;
+        }
+
+        /**
+         * Scans the first token of a byte subarrary that starts with the
+         * content of a CDATA section.
+         * Returns one of the following integers according to the type of token
+         * that the subarray starts with:
+         * <ul>
+         * <li><code>TOK.DATA_CHARS</code></li>
+         * <li><code>TOK.DATA_NEWLINE</code></li>
+         * <li><code>TOK.CDATA_SECT_CLOSE</code></li>
+         * </ul>
+         * <p>
+         * Information about the token is stored in <code>token</code>.
+         * </p>
+         * After <code>TOK.CDATA_SECT_CLOSE</code> is returned, the application
+         * should use <code>tokenizeContent</code>.
+         *
+         * @exception EmptyTokenException if the subarray is empty
+         * @exception PartialTokenException if the subarray contains only part of
+         * a legal token
+         * @exception InvalidTokenException if the subarrary does not start
+         * with a legal token or part of one
+         * @exception ExtensibleTokenException if the subarray encodes just a carriage
+         * return ('\r')
+         *
+         * @see #TOK.DATA_CHARS
+         * @see #TOK.DATA_NEWLINE
+         * @see #TOK.CDATA_SECT_CLOSE
+         * @see Token
+         * @see EmptyTokenException
+         * @see PartialTokenException
+         * @see InvalidTokenException
+         * @see ExtensibleTokenException
+         * @see #tokenizeContent
+         */
+        public TOK tokenizeCdataSection(byte[] buf, int off, int end,
+                                        Token token)
+        {
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            if (off == end)
+                throw new EmptyTokenException();
+            switch (byteType(buf, off))
+            {
+            case BT_RSQB:
+                off += minBPC;
+                if (off == end)
+                    throw new PartialTokenException();
+                if (!charMatches(buf, off, ']'))
+                    break;
+                off += minBPC;
+                if (off == end)
+                    throw new PartialTokenException();
+                if (!charMatches(buf, off, '>')) {
+                    off -= minBPC;
+                    break;
+                }
+                token.TokenEnd = off + minBPC;
+                return TOK.CDATA_SECT_CLOSE;
+            case BT_CR:
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
+                if (byteType(buf, off) == BT_LF)
+                    off += minBPC;
+                token.TokenEnd = off;
+                return TOK.DATA_NEWLINE;
+            case BT_LF:
+                token.TokenEnd = off + minBPC;
+                return TOK.DATA_NEWLINE;
+            case BT_NONXML:
+            case BT_MALFORM:
+                throw new InvalidTokenException(off);
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                check2(buf, off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                check3(buf, off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                check4(buf, off);
+                off += 4;
+                break;
+            default:
+                off += minBPC;
+                break;
+            }
+            token.TokenEnd = extendCdata(buf, off, end);
+            return TOK.DATA_CHARS;
+        }
+
+        int extendCdata(byte[] buf, int off, int end)
+        {
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        return off;
+                    check2(buf, off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        return off;
+                    check3(buf, off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        return off;
+                    check4(buf, off);
+                    off += 4;
+                    break;
+                case BT_RSQB:
+                case BT_NONXML:
+                case BT_MALFORM:
+                case BT_CR:
+                case BT_LF:
+                    return off;
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+            return off;
+        }
+
+
+        /* off points to character following "</" */
+        private TOK scanEndTag(byte[] buf, int off, int end, Token token)
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off)) {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    token.NameEnd = off;
+                    for (off += minBPC; off != end; off += minBPC) {
+                        switch (byteType(buf, off)) {
+                        case BT_S:
+                        case BT_CR:
+                        case BT_LF:
+                            break;
+                        case BT_GT:
+                            token.TokenEnd = off + minBPC;
+                            return TOK.END_TAG;
+                        default:
+                            throw new InvalidTokenException(off);
+                        }
+                    }
+                    throw new PartialTokenException();
+                case BT_GT:
+                    token.NameEnd = off;
+                    token.TokenEnd = off + minBPC;
+                    return TOK.END_TAG;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following "&#X" */
+        private TOK scanHexCharRef(byte[] buf, int off, int end, Token token)
+        {
+            if (off != end)
+            {
+                int c = byteToAscii(buf, off);
+                int num;
+                switch (c)
+                {
+                case '0': case '1': case '2': case '3': case '4':
+                case '5': case '6': case '7': case '8': case '9':
+                    num = c - '0';
+                    break;
+                case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+                    num = c - ('A' - 10);
+                    break;
+                case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': 
+                    num = c - ('a' - 10);
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+                for (off += minBPC; off != end; off += minBPC)
+                {
+                    c = byteToAscii(buf, off);
+                    switch (c) {
+                    case '0': case '1': case '2': case '3': case '4':
+                    case '5': case '6': case '7': case '8': case '9':
+                        num = (num << 4) + c - '0';
+                        break;
+                    case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+                        num = (num << 4) + c - ('A' - 10);
+                        break;
+                    case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': 
+                        num = (num << 4) + c - ('a' - 10);
+                        break;
+                    case ';':
+                        token.TokenEnd = off + minBPC;
+                        return setRefChar(num, token);
+                    default:
+                        throw new InvalidTokenException(off);
+                    }
+                    if (num >= 0x110000)
+                        throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following "&#" */
+        private TOK scanCharRef(byte[] buf, int off, int end, Token token)
+        {
+            if (off != end)
+            {
+                int c = byteToAscii(buf, off);
+                switch (c)
+                {
+                case 'x':
+                    return scanHexCharRef(buf, off + minBPC, end, token);
+                case '0':
+                case '1':
+                case '2':
+                case '3':
+                case '4':
+                case '5':
+                case '6':
+                case '7':
+                case '8':
+                case '9':
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+                
+                int num = c - '0';
+                for (off += minBPC; off != end; off += minBPC) {
+                    c = byteToAscii(buf, off);
+                    switch (c) {
+                    case '0':
+                    case '1':
+                    case '2':
+                    case '3':
+                    case '4':
+                    case '5':
+                    case '6':
+                    case '7':
+                    case '8':
+                    case '9':
+                        num = num * 10 + (c - '0');
+                        if (num < 0x110000)
+                            break;
+                        /* fall through */
+                        goto default;
+                    default:
+                        throw new InvalidTokenException(off);
+                    case ';':
+                        token.TokenEnd = off + minBPC;
+                        return setRefChar(num, token);
+                    }
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* num is known to be < 0x110000; return the token code */
+        private TOK setRefChar(int num, Token token) 
+        {
+            if (num < 0x10000)
+            {
+                switch (charTypeTable[num >> 8][num & 0xFF])
+                {
+                case BT_NONXML:
+                case BT_LEAD4:
+                case BT_MALFORM:
+                    throw new InvalidTokenException(token.TokenEnd - minBPC);
+                }
+                token.RefChar1 = (char)num;
+                return TOK.CHAR_REF;
+            }
+            else
+            {
+                num -= 0x10000;
+                token.RefChar1 = (char)((num >> 10) + 0xD800);
+                token.RefChar2 = (char)((num & ((1 << 10) - 1)) + 0xDC00);
+                return TOK.CHAR_PAIR_REF;
+            }
+        }
+
+        private bool isMagicEntityRef(byte[] buf, int off, int end, Token token)
+        {
+            switch (byteToAscii(buf, off))
+            {
+            case 'a':
+                if (end - off < minBPC*4)
+                    break;
+                switch (byteToAscii(buf, off + minBPC))
+                {
+                case 'm':
+                    if (charMatches(buf, off + minBPC*2, 'p')
+                        && charMatches(buf, off + minBPC*3, ';'))
+                    {
+                        token.TokenEnd = off + minBPC*4;
+                        token.RefChar1 = '&';
+                        return true;
+                    }
+                    break;
+                case 'p':
+                    if (end - off >= minBPC*5
+                        && charMatches(buf, off + minBPC*2, 'o')
+                        && charMatches(buf, off + minBPC*3, 's')
+                        && charMatches(buf, off + minBPC*4, ';'))
+                    {
+                        token.TokenEnd = off + minBPC*5;
+                        token.RefChar1 = '\'';
+                        return true;
+                    }
+                    break;
+                }
+                break;
+            case 'l':
+                if (end - off >= minBPC*3
+                    && charMatches(buf, off + minBPC, 't')
+                    && charMatches(buf, off + minBPC*2, ';'))
+                {
+                    token.TokenEnd = off + minBPC*3;
+                    token.RefChar1 = '<';
+                    return true;
+                }
+                break;
+            case 'g':
+                if (end - off >= minBPC*3
+                    && charMatches(buf, off + minBPC, 't')
+                    && charMatches(buf, off + minBPC*2, ';'))
+                {
+                    token.TokenEnd = off + minBPC*3;
+                    token.RefChar1 = '>';
+                    return true;
+                }
+                break;
+            case 'q':
+                if (end - off >= minBPC*5
+                    && charMatches(buf, off + minBPC, 'u')
+                    && charMatches(buf, off + minBPC*2, 'o')
+                    && charMatches(buf, off + minBPC*3, 't')
+                    && charMatches(buf, off + minBPC*4, ';'))
+                {
+                    token.TokenEnd = off + minBPC*5;
+                    token.RefChar1 = '"';
+                    return true;
+                }
+                break;
+            }
+            return false;
+        }
+        
+        /* off points to character following "&" */
+        private TOK scanRef(byte[] buf, int off, int end, Token token)
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            if (isMagicEntityRef(buf, off, end, token))
+                return TOK.MAGIC_ENTITY_REF;
+            switch (byteType(buf, off)) {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            case BT_NUM:
+                return scanCharRef(buf, off + minBPC, end, token);
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_SEMI:
+                    token.NameEnd = off;
+                    token.TokenEnd = off + minBPC;
+                    return TOK.ENTITY_REF;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following first character of
+           attribute name */
+        private TOK scanAtts(int nameStart, byte[] buf, int off, int end,
+                             ContentToken token)
+        {
+            int NameEnd = -1;
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    NameEnd = off;
+                    for (;;)
+                    {
+                        off += minBPC;
+                        if (off == end)
+                            throw new PartialTokenException();
+                        switch (byteType(buf, off))
+                        {
+                        case BT_EQUALS:
+                            goto loop;
+                        case BT_S:
+                        case BT_LF:
+                        case BT_CR:
+                            break;
+                        default:
+                            throw new InvalidTokenException(off);
+                        }
+                    }
+                    loop: ;
+                    /* fall through */
+                    goto case BT_EQUALS;
+                case BT_EQUALS:
+                    {
+                        if (NameEnd < 0)
+                            NameEnd = off;
+                        int open;
+                        for (;;) {
+          
+                            off += minBPC;
+                            if (off == end)
+                                throw new PartialTokenException();
+                            open = byteType(buf, off);
+                            if (open == BT_QUOT || open == BT_APOS)
+                                break;
+                            switch (open) {
+                            case BT_S:
+                            case BT_LF:
+                            case BT_CR:
+                                break;
+                            default:
+                                throw new InvalidTokenException(off);
+                            }
+                        }
+                        off += minBPC;
+                        int valueStart = off;
+                        bool normalized = true;
+                        int t;
+                        /* in attribute value */
+                        for (;;)
+                        {
+                            if (off == end)
+                                throw new PartialTokenException();
+                            t = byteType(buf, off);
+                            if (t == open)
+                                break;
+                            switch (t) {
+                            case BT_NONXML:
+                            case BT_MALFORM:
+                                throw new InvalidTokenException(off);
+                            case BT_LEAD2:
+                                if (end - off < 2)
+                                    throw new PartialCharException(off);
+                                check2(buf, off);
+                                off += 2;
+                                break;
+                            case BT_LEAD3:
+                                if (end - off < 3)
+                                    throw new PartialCharException(off);
+                                check3(buf, off);
+                                off += 3;
+                                break;
+                            case BT_LEAD4:
+                                if (end - off < 4)
+                                    throw new PartialCharException(off);
+                                check4(buf, off);
+                                off += 4;
+                                break;
+                            case BT_AMP:
+                                {
+                                    normalized = false;
+                                    int saveNameEnd = token.NameEnd;
+                                    scanRef(buf, off + minBPC, end, token);
+                                    token.NameEnd = saveNameEnd;
+                                    off = token.TokenEnd;
+                                    break;
+                                }
+                            case BT_S:
+                                if (normalized
+                                    && (off == valueStart
+                                        || byteToAscii(buf, off) != ' '
+                                        || (off + minBPC != end
+                                            && (byteToAscii(buf, off + minBPC) == ' '
+                                                || byteType(buf, off + minBPC) == open))))
+                                    normalized = false;
+                                off += minBPC;
+                                break;
+                            case BT_LT:
+                                throw new InvalidTokenException(off);
+                            case BT_LF:
+                            case BT_CR:
+                                normalized = false;
+                                /* fall through */
+                                goto default;
+                            default:
+                                off += minBPC;
+                                break;
+                            }
+                        }
+                        token.appendAttribute(nameStart, NameEnd, valueStart,
+                                              off,
+                                              normalized);
+                        off += minBPC;
+                        if (off == end)
+                            throw new PartialTokenException();
+                        t = byteType(buf, off);
+                        switch (t) {
+                        case BT_S:
+                        case BT_CR:
+                        case BT_LF:
+                            off += minBPC;
+                            if (off == end)
+                                throw new PartialTokenException();
+                            t = byteType(buf, off);
+                            break;
+                        case BT_GT:
+                        case BT_SOL:
+                            break;
+                        default:
+                            throw new InvalidTokenException(off);
+                        }
+                        /* off points to closing quote */
+                        for (;;)
+                        {
+                            switch (t) {
+                            case BT_NMSTRT:
+                                nameStart = off;
+                                off += minBPC;
+                                goto skipToName;
+                            case BT_LEAD2:
+                                if (end - off < 2)
+                                    throw new PartialCharException(off);
+                                if (byteType2(buf, off) != BT_NMSTRT)
+                                    throw new InvalidTokenException(off);
+                                nameStart = off;
+                                off += 2;
+                                goto skipToName;
+                            case BT_LEAD3:
+                                if (end - off < 3)
+                                    throw new PartialCharException(off);
+                                if (byteType3(buf, off) != BT_NMSTRT)
+                                    throw new InvalidTokenException(off);
+                                nameStart = off;
+                                off += 3;
+                                goto skipToName;
+                            case BT_LEAD4:
+                                if (end - off < 4)
+                                    throw new PartialCharException(off);
+                                if (byteType4(buf, off) != BT_NMSTRT)
+                                    throw new InvalidTokenException(off);
+                                nameStart = off;
+                                off += 4;
+                                goto skipToName;
+                            case BT_S:
+                            case BT_CR:
+                            case BT_LF:
+                                break;
+                            case BT_GT:
+                                token.checkAttributeUniqueness(buf);
+                                token.TokenEnd = off + minBPC;
+                                return TOK.START_TAG_WITH_ATTS;
+                            case BT_SOL:
+                                off += minBPC;
+                                if (off == end)
+                                    throw new PartialTokenException();
+                                checkCharMatches(buf, off, '>');
+                                token.checkAttributeUniqueness(buf);
+                                token.TokenEnd = off + minBPC;
+                                return TOK.EMPTY_ELEMENT_WITH_ATTS;
+                            default:
+                                throw new InvalidTokenException(off);
+                            }
+                            off += minBPC;
+                            if (off == end)
+                                throw new PartialTokenException();
+                            t = byteType(buf, off);
+                        }
+                        
+                        skipToName:
+                        NameEnd = -1;
+                        break;
+                    }
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /* off points to character following "<" */
+        private TOK scanLt(byte[] buf, int off, int end, ContentToken token)
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off))
+            {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            case BT_EXCL:
+                if ((off += minBPC) == end)
+                    throw new PartialTokenException();
+                switch (byteType(buf, off))
+                {
+                case BT_MINUS:
+                    return scanComment(buf, off + minBPC, end, token);
+                case BT_LSQB:
+                    return scanCdataSection(buf, off + minBPC, end, token);
+                }
+                throw new InvalidTokenException(off);
+            case BT_QUEST:
+                return scanPi(buf, off + minBPC, end, token);
+            case BT_SOL:
+                return scanEndTag(buf, off + minBPC, end, token);
+            default:
+                throw new InvalidTokenException(off);
+            }
+            /* we have a start-tag */
+            token.NameEnd = -1;
+            token.clearAttributes();
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    token.NameEnd = off;
+                    off += minBPC;
+                    for (;;)
+                    {
+                        if (off == end)
+                            throw new PartialTokenException();
+                        switch (byteType(buf, off))
+                        {
+                        case BT_NMSTRT:
+                            return scanAtts(off, buf, off + minBPC, end, token);
+                        case BT_LEAD2:
+                            if (end - off < 2)
+                                throw new PartialCharException(off);
+                            if (byteType2(buf, off) != BT_NMSTRT)
+                                throw new InvalidTokenException(off);
+                            return scanAtts(off, buf, off + 2, end, token);
+                        case BT_LEAD3:
+                            if (end - off < 3)
+                                throw new PartialCharException(off);
+                            if (byteType3(buf, off) != BT_NMSTRT)
+                                throw new InvalidTokenException(off);
+                            return scanAtts(off, buf, off + 3, end, token);
+                        case BT_LEAD4:
+                            if (end - off < 4)
+                                throw new PartialCharException(off);
+                            if (byteType4(buf, off) != BT_NMSTRT)
+                                throw new InvalidTokenException(off);
+                            return scanAtts(off, buf, off + 4, end, token);
+                        case BT_GT:
+                        case BT_SOL:
+                            goto loop;
+                        case BT_S:
+                        case BT_CR:
+                        case BT_LF:
+                            off += minBPC;
+                            break;
+                        default:
+                            throw new InvalidTokenException(off);
+                        }
+                    }
+                    loop:
+                    break;
+                case BT_GT:
+                    if (token.NameEnd < 0)
+                        token.NameEnd = off;
+                    token.TokenEnd = off + minBPC;
+                    return TOK.START_TAG_NO_ATTS;
+                case BT_SOL:
+                    if (token.NameEnd < 0)
+                        token.NameEnd = off;
+                    off += minBPC;
+                    if (off == end)
+                        throw new PartialTokenException();
+                    checkCharMatches(buf, off, '>');
+                    token.TokenEnd = off + minBPC;
+                    return TOK.EMPTY_ELEMENT_NO_ATTS;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        // Ensure that we always scan a multiple of minBPC bytes.
+        private int adjustEnd(int off, int end)
+        {
+            int n = end - off;
+            if ((n & (minBPC - 1)) != 0)
+            {
+                n &= ~(minBPC - 1);
+                if (n == 0)
+                    throw new PartialCharException(off);
+                return off + n;
+            }
+            else
+                return end;
+        }
+
+        /**
+         * Scans the first token of a byte subarrary that contains content.
+         * Returns one of the following integers according to the type of token
+         * that the subarray starts with:
+         * <ul>
+         * <li><code>TOK.START_TAG_NO_ATTS</code></li>
+         * <li><code>TOK.START_TAG_WITH_ATTS</code></li>
+         * <li><code>TOK.EMPTY_ELEMENT_NO_ATTS</code></li>
+         * <li><code>TOK.EMPTY_ELEMENT_WITH_ATTS</code></li>
+         * <li><code>TOK.END_TAG</code></li>
+         * <li><code>TOK.DATA_CHARS</code></li>
+         * <li><code>TOK.DATA_NEWLINE</code></li>
+         * <li><code>TOK.CDATA_SECT_OPEN</code></li>
+         * <li><code>TOK.ENTITY_REF</code></li>
+         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
+         * <li><code>TOK.CHAR_REF</code></li>
+         * <li><code>TOK.CHAR_PAIR_REF</code></li>
+         * <li><code>TOK.PI</code></li>
+         * <li><code>TOK.XML_DECL</code></li>
+         * <li><code>TOK.COMMENT</code></li>
+         * </ul>
+         * <p>
+         * Information about the token is stored in <code>token</code>.
+         * </p>
+         * When <code>TOK.CDATA_SECT_OPEN</code> is returned,
+         * <code>tokenizeCdataSection</code> should be called until
+         * it returns <code>TOK.CDATA_SECT</code>.
+         *
+         * @exception EmptyTokenException if the subarray is empty
+         * @exception PartialTokenException if the subarray contains only part of
+         * a legal token
+         * @exception InvalidTokenException if the subarrary does not start
+         * with a legal token or part of one
+         * @exception ExtensibleTokenException if the subarray encodes just a carriage
+         * return ('\r')
+         *
+         * @see #TOK.START_TAG_NO_ATTS
+         * @see #TOK.START_TAG_WITH_ATTS
+         * @see #TOK.EMPTY_ELEMENT_NO_ATTS
+         * @see #TOK.EMPTY_ELEMENT_WITH_ATTS
+         * @see #TOK.END_TAG
+         * @see #TOK.DATA_CHARS
+         * @see #TOK.DATA_NEWLINE
+         * @see #TOK.CDATA_SECT_OPEN
+         * @see #TOK.ENTITY_REF
+         * @see #TOK.MAGIC_ENTITY_REF
+         * @see #TOK.CHAR_REF
+         * @see #TOK.CHAR_PAIR_REF
+         * @see #TOK.PI
+         * @see #TOK.XML_DECL
+         * @see #TOK.COMMENT
+         * @see ContentToken
+         * @see EmptyTokenException
+         * @see PartialTokenException
+         * @see InvalidTokenException
+         * @see ExtensibleTokenException
+         * @see #tokenizeCdataSection
+         */
+        public TOK tokenizeContent(byte[] buf, int off, int end,
+                                   ContentToken token)
+        {
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            if (off == end)
+                throw new EmptyTokenException();
+            switch (byteType(buf, off))
+            {
+            case BT_LT:
+                return scanLt(buf, off + minBPC, end, token);
+            case BT_AMP:
+                return scanRef(buf, off + minBPC, end, token);
+            case BT_CR:
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
+                if (byteType(buf, off) == BT_LF)
+                    off += minBPC;
+                token.TokenEnd = off;
+                return TOK.DATA_NEWLINE;
+            case BT_LF:
+                token.TokenEnd = off + minBPC;
+                return TOK.DATA_NEWLINE;
+            case BT_RSQB:
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.DATA_CHARS);
+                if (!charMatches(buf, off, ']'))
+                    break;
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.DATA_CHARS);
+                if (!charMatches(buf, off, '>')) {
+                    off -= minBPC;
+                    break;
+                }
+                throw new InvalidTokenException(off);
+            case BT_NONXML:
+            case BT_MALFORM:
+                throw new InvalidTokenException(off);
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                check2(buf, off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                check3(buf, off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                check4(buf, off);
+                off += 4;
+                break;
+            default:
+                off += minBPC;
+                break;
+            }
+            token.TokenEnd = extendData(buf, off, end);
+            return TOK.DATA_CHARS;
+        }
+
+        int extendData(byte[] buf, int off, int end)
+        {
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        return off;
+                    check2(buf, off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        return off;
+                    check3(buf, off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        return off;
+                    check4(buf, off);
+                    off += 4;
+                    break;
+                case BT_RSQB:
+                case BT_AMP:
+                case BT_LT:
+                case BT_NONXML:
+                case BT_MALFORM:
+                case BT_CR:
+                case BT_LF:
+                    return off;
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+            return off;
+        }
+
+        /* off points to character following "%" */
+        private TOK scanPercent(byte[] buf, int off, int end, Token token)
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off))
+            {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            case BT_S:
+            case BT_LF:
+            case BT_CR:
+            case BT_PERCNT:
+                token.TokenEnd = off;
+                return TOK.PERCENT;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_SEMI:
+                    token.NameEnd = off;
+                    token.TokenEnd = off + minBPC;
+                    return TOK.PARAM_ENTITY_REF;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+
+        private TOK scanPoundName(byte[] buf, int off, int end, Token token) 
+        {
+            if (off == end)
+                throw new PartialTokenException();
+            switch (byteType(buf, off)) {
+            case BT_NMSTRT:
+                off += minBPC;
+                break;
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                if (byteType2(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 2;
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                if (byteType3(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 3;
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                if (byteType4(buf, off) != BT_NMSTRT)
+                    throw new InvalidTokenException(off);
+                off += 4;
+                break;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_CR:
+                case BT_LF:
+                case BT_S:
+                case BT_RPAR:
+                case BT_GT:
+                case BT_PERCNT:
+                case BT_VERBAR:
+                    token.TokenEnd = off;
+                    return TOK.POUND_NAME;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new ExtensibleTokenException(TOK.POUND_NAME);
+        }
+
+        private TOK scanLit(int open, byte[] buf, int off, int end, Token token)
+        {
+            while (off != end)
+            {
+                int t = byteType(buf, off);
+                switch (t)
+                {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialTokenException();
+                    check2(buf, off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialTokenException();
+                    check3(buf, off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialTokenException();
+                    check4(buf, off);
+                    off += 4;
+                    break;
+                case BT_NONXML:
+                case BT_MALFORM:
+                    throw new InvalidTokenException(off);
+                case BT_QUOT:
+                case BT_APOS:
+                    off += minBPC;
+                    if (t != open)
+                        break;
+                    if (off == end)
+                        throw new ExtensibleTokenException(TOK.LITERAL);
+                    switch (byteType(buf, off))
+                    {
+                    case BT_S:
+                    case BT_CR:
+                    case BT_LF:
+                    case BT_GT:
+                    case BT_PERCNT:
+                    case BT_LSQB:
+                        token.TokenEnd = off;
+                        return TOK.LITERAL;
+                    default:
+                        throw new InvalidTokenException(off);
+                    }
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+            throw new PartialTokenException();
+        }
+
+        /**
+         * Returns an encoding object to be used to start parsing an
+         * external entity.  The encoding is chosen based on the
+         * initial 4 bytes of the entity.
+         * 
+         * @param buf the byte array containing the initial bytes of
+         * the entity @param off the index in <code>buf</code> of the
+         * first byte of the entity @param end the index in
+         * <code>buf</code> following the last available byte of the
+         * entity; <code>end - off</code> must be greater than or
+         * equal to 4 unless the entity has fewer that 4 bytes, in
+         * which case it must be equal to the length of the entity
+         * @param token receives information about the presence of a
+         * byte order mark; if the entity starts with a byte order
+         * mark then <code>token.getTokenEnd()</code> will return
+         * <code>off + 2</code>, otherwise it will return
+         * <code>off</code>
+         *
+         * @see TextDecl
+         * @see XmlDecl
+         * @see #TOK.XML_DECL
+         * @see #getEncoding
+         * @see #getInternalEncoding
+         */
+        public static Encoding getInitialEncoding(byte[] buf, int off, int end,
+                                                  Token token)
+        {
+            token.TokenEnd = off;
+            switch (end - off)
+            {
+            case 0:
+                break;
+            case 1:
+                if (buf[off] > 127)
+                    return null;
+                break;
+            default:
+                int b0 = buf[off] & 0xFF;
+                int b1 = buf[off + 1] & 0xFF;
+                switch ((b0 << 8) | b1)
+                {
+                case 0xFEFF:
+                    token.TokenEnd = off + 2;
+                    /* fall through */
+                    goto case '<';
+                case '<': /* not legal; but not a fatal error */
+                    return getEncoding(UTF16_BIG_ENDIAN_ENCODING);
+                case 0xFFFE:
+                    token.TokenEnd = off + 2;
+                    /* fall through */
+                    goto case '<' << 8;
+                case '<' << 8:  /* not legal; but not a fatal error */
+                    return getEncoding(UTF16_LITTLE_ENDIAN_ENCODING);
+                }
+                break;
+            }
+            return getEncoding(UTF8_ENCODING);
+        }
+
+        /**
+         * Returns an <code>Encoding</code> corresponding to the
+         * specified IANA character set name.  Returns this
+         * <code>Encoding</code> if the name is null.  Returns null if
+         * the specified encoding is not supported.  Note that there
+         * are two distinct <code>Encoding</code> objects associated
+         * with the name <code>UTF-16</code>, one for each possible
+         * byte order; if this <code>Encoding</code> is UTF-16 with
+         * little-endian byte ordering, then
+         * <code>getEncoding("UTF-16")</code> will return this,
+         * otherwise it will return an <code>Encoding</code> for
+         * UTF-16 with big-endian byte ordering.  @param name a string
+         * specifying the IANA name of the encoding; this is case
+         * insensitive
+         */
+        public Encoding getEncoding(string name)
+        {
+            if (name == null)
+                return this;
+
+            switch (name.ToUpper())
+            {
+            case "UTF-8":
+                return getEncoding(UTF8_ENCODING);
+                /*
+            case "UTF-16":
+                return getUTF16Encoding();
+            case "ISO-8859-1":
+                return getEncoding(ISO8859_1_ENCODING);
+            case "US-ASCII":
+                return getEncoding(ASCII_ENCODING);
+                */
+            }
+            return null;
+        }
+
+        /**
+         * Returns an <code>Encoding</code> for entities encoded with
+         * a single-byte encoding (an encoding in which each byte
+         * represents exactly one character).  @param map a string
+         * specifying the character represented by each byte; the
+         * string must have a length of 256;
+         * <code>map.charAt(b)</code> specifies the character encoded
+         * by byte <code>b</code>; bytes that do not represent any
+         * character should be mapped to <code>\uFFFD</code>
+         */
+        public Encoding getSingleByteEncoding(string map)
+        {
+            //return new SingleByteEncoding(map);
+#if CF
+			throw new util.NotImplementedException();
+#else
+			throw new System.NotImplementedException();
+#endif
+        }
+
+        /**
+         * Returns an <code>Encoding</code> object for use with
+         * internal entities.  This is a UTF-16 big endian encoding,
+         * except that newlines are assumed to have been normalized
+         * into line feed, so carriage return is treated like a space.
+         */
+        public static Encoding getInternalEncoding()
+        {
+            return getEncoding(INTERNAL_ENCODING);
+        }
+
+        /**
+         * Scans the first token of a byte subarray that contains part of a
+         * prolog.
+         * Returns one of the following integers according to the type of token
+         * that the subarray starts with:
+         * <ul>
+         * <li><code>TOK.PI</code></li>
+         * <li><code>TOK.XML_DECL</code></li>
+         * <li><code>TOK.COMMENT</code></li>
+         * <li><code>TOK.PARAM_ENTITY_REF</code></li>
+         * <li><code>TOK.PROLOG_S</code></li>
+         * <li><code>TOK.DECL_OPEN</code></li>
+         * <li><code>TOK.DECL_CLOSE</code></li>
+         * <li><code>TOK.NAME</code></li>
+         * <li><code>TOK.NMTOKEN</code></li>
+         * <li><code>TOK.POUND_NAME</code></li>
+         * <li><code>TOK.OR</code></li>
+         * <li><code>TOK.PERCENT</code></li>
+         * <li><code>TOK.OPEN_PAREN</code></li>
+         * <li><code>TOK.CLOSE_PAREN</code></li>
+         * <li><code>TOK.OPEN_BRACKET</code></li>
+         * <li><code>TOK.CLOSE_BRACKET</code></li>
+         * <li><code>TOK.LITERAL</code></li>
+         * <li><code>TOK.NAME_QUESTION</code></li>
+         * <li><code>TOK.NAME_ASTERISK</code></li>
+         * <li><code>TOK.NAME_PLUS</code></li>
+         * <li><code>TOK.COND_SECT_OPEN</code></li>
+         * <li><code>TOK.COND_SECT_CLOSE</code></li>
+         * <li><code>TOK.CLOSE_PAREN_QUESTION</code></li>
+         * <li><code>TOK.CLOSE_PAREN_ASTERISK</code></li>
+         * <li><code>TOK.CLOSE_PAREN_PLUS</code></li>
+         * <li><code>TOK.COMMA</code></li>
+         * </ul>
+         * @exception EmptyTokenException if the subarray is empty
+         * @exception PartialTokenException if the subarray contains only part of
+         * a legal token
+         * @exception InvalidTokenException if the subarrary does not start
+         * with a legal token or part of one
+         * @exception EndOfPrologException if the subarray starts with the document
+         * element; <code>tokenizeContent</code> should be used on the remainder
+         * of the entity
+         * @exception ExtensibleTokenException if the subarray is a legal token
+         * but subsequent bytes in the same entity could be part of the token
+         * @see #TOK.PI
+         * @see #TOK.XML_DECL
+         * @see #TOK.COMMENT
+         * @see #TOK.PARAM_ENTITY_REF
+         * @see #TOK.PROLOG_S
+         * @see #TOK.DECL_OPEN
+         * @see #TOK.DECL_CLOSE
+         * @see #TOK.NAME
+         * @see #TOK.NMTOKEN
+         * @see #TOK.POUND_NAME
+         * @see #TOK.OR
+         * @see #TOK.PERCENT
+         * @see #TOK.OPEN_PAREN
+         * @see #TOK.CLOSE_PAREN
+         * @see #TOK.OPEN_BRACKET
+         * @see #TOK.CLOSE_BRACKET
+         * @see #TOK.LITERAL
+         * @see #TOK.NAME_QUESTION
+         * @see #TOK.NAME_ASTERISK
+         * @see #TOK.NAME_PLUS
+         * @see #TOK.COND_SECT_OPEN
+         * @see #TOK.COND_SECT_CLOSE
+         * @see #TOK.CLOSE_PAREN_QUESTION
+         * @see #TOK.CLOSE_PAREN_ASTERISK
+         * @see #TOK.CLOSE_PAREN_PLUS
+         * @see #TOK.COMMA
+         * @see ContentToken
+         * @see EmptyTokenException
+         * @see PartialTokenException
+         * @see InvalidTokenException
+         * @see ExtensibleTokenException
+         * @see EndOfPrologException
+         */
+        public TOK tokenizeProlog(byte[] buf, int off, int end, Token token)
+        {
+            TOK tok;
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            if (off == end)
+                throw new EmptyTokenException();
+            switch (byteType(buf, off)) {
+            case BT_QUOT:
+                return scanLit(BT_QUOT, buf, off + minBPC, end, token);
+            case BT_APOS:
+                return scanLit(BT_APOS, buf, off + minBPC, end, token);
+            case BT_LT:
+                {
+                    off += minBPC;
+                    if (off == end)
+                        throw new PartialTokenException();
+                    switch (byteType(buf, off)) {
+                    case BT_EXCL:
+                        return scanDecl(buf, off + minBPC, end, token);
+                    case BT_QUEST:
+                        return scanPi(buf, off + minBPC, end, token);
+                    case BT_NMSTRT:
+                    case BT_LEAD2:
+                    case BT_LEAD3:
+                    case BT_LEAD4:
+                        token.TokenEnd = off - minBPC;
+                        throw new EndOfPrologException();
+                    }
+                    throw new InvalidTokenException(off);
+                }
+            case BT_CR:
+                if (off + minBPC == end)
+                    throw new ExtensibleTokenException(TOK.PROLOG_S);
+                /* fall through */
+                goto case BT_S;
+            case BT_S:
+            case BT_LF:
+                for (;;) {
+                    off += minBPC;
+                    if (off == end)
+                        break;
+                    switch (byteType(buf, off)) {
+                    case BT_S:
+                    case BT_LF:
+                        break;
+                    case BT_CR:
+                        /* don't split CR/LF pair */
+                        if (off + minBPC != end)
+                            break;
+                        /* fall through */
+                        goto default;
+                    default:
+                        token.TokenEnd = off;
+                        return TOK.PROLOG_S;
+                    }
+                }
+                token.TokenEnd = off;
+                return TOK.PROLOG_S;
+            case BT_PERCNT:
+                return scanPercent(buf, off + minBPC, end, token);
+            case BT_COMMA:
+                token.TokenEnd = off + minBPC;
+                return TOK.COMMA;
+            case BT_LSQB:
+                token.TokenEnd = off + minBPC;
+                return TOK.OPEN_BRACKET;
+            case BT_RSQB:
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.CLOSE_BRACKET);
+                if (charMatches(buf, off, ']')) {
+                    if (off + minBPC == end)
+                        throw new PartialTokenException();
+                    if (charMatches(buf, off + minBPC, '>')) {
+                        token.TokenEnd = off + 2*minBPC;
+                        return TOK.COND_SECT_CLOSE;
+                    }
+                }
+                token.TokenEnd = off;
+                return TOK.CLOSE_BRACKET;
+            case BT_LPAR:
+                token.TokenEnd = off + minBPC;
+                return TOK.OPEN_PAREN;
+            case BT_RPAR:
+                off += minBPC;
+                if (off == end)
+                    throw new ExtensibleTokenException(TOK.CLOSE_PAREN);
+                switch (byteType(buf, off)) {
+                case BT_AST:
+                    token.TokenEnd = off + minBPC;
+                    return TOK.CLOSE_PAREN_ASTERISK;
+                case BT_QUEST:
+                    token.TokenEnd = off + minBPC;
+                    return TOK.CLOSE_PAREN_QUESTION;
+                case BT_PLUS:
+                    token.TokenEnd = off + minBPC;
+                    return TOK.CLOSE_PAREN_PLUS;
+                case BT_CR:
+                case BT_LF:
+                case BT_S:
+                case BT_GT:
+                case BT_COMMA:
+                case BT_VERBAR:
+                case BT_RPAR:
+                    token.TokenEnd = off;
+                    return TOK.CLOSE_PAREN;
+                }
+                throw new InvalidTokenException(off);
+            case BT_VERBAR:
+                token.TokenEnd = off + minBPC;
+                return TOK.OR;
+            case BT_GT:
+                token.TokenEnd = off + minBPC;
+                return TOK.DECL_CLOSE;
+            case BT_NUM:
+                return scanPoundName(buf, off + minBPC, end, token);
+            case BT_LEAD2:
+                if (end - off < 2)
+                    throw new PartialCharException(off);
+                switch (byteType2(buf, off)) {
+                case BT_NMSTRT:
+                    off += 2;
+                    tok = TOK.NAME;
+                    break;
+                case BT_NAME:
+                    off += 2;
+                    tok = TOK.NMTOKEN;
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+                break;
+            case BT_LEAD3:
+                if (end - off < 3)
+                    throw new PartialCharException(off);
+                switch (byteType3(buf, off)) {
+                case BT_NMSTRT:
+                    off += 3;
+                    tok = TOK.NAME;
+                    break;
+                case BT_NAME:
+                    off += 3;
+                    tok = TOK.NMTOKEN;
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+                break;
+            case BT_LEAD4:
+                if (end - off < 4)
+                    throw new PartialCharException(off);
+                switch (byteType4(buf, off)) {
+                case BT_NMSTRT:
+                    off += 4;
+                    tok = TOK.NAME;
+                    break;
+                case BT_NAME:
+                    off += 4;
+                    tok = TOK.NMTOKEN;
+                    break;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+                break;
+            case BT_NMSTRT:
+                tok = TOK.NAME;
+                off += minBPC;
+                break;
+            case BT_NAME:
+            case BT_MINUS:
+                tok = TOK.NMTOKEN;
+                off += minBPC;
+                break;
+            default:
+                throw new InvalidTokenException(off);
+            }
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_NMSTRT:
+                case BT_NAME:
+                case BT_MINUS:
+                    off += minBPC;
+                    break;
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    if (!isNameChar2(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    if (!isNameChar3(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    if (!isNameChar4(buf, off))
+                        throw new InvalidTokenException(off);
+                    off += 4;
+                    break;
+                case BT_GT:
+                case BT_RPAR:
+                case BT_COMMA:
+                case BT_VERBAR:
+                case BT_LSQB:
+                case BT_PERCNT:
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    token.TokenEnd = off;
+                    return tok;
+                case BT_PLUS:
+                    if (tok != TOK.NAME)
+                        throw new InvalidTokenException(off);
+                    token.TokenEnd = off + minBPC;
+                    return TOK.NAME_PLUS;
+                case BT_AST:
+                    if (tok != TOK.NAME)
+                        throw new InvalidTokenException(off);
+                    token.TokenEnd = off + minBPC;
+                    return TOK.NAME_ASTERISK;
+                case BT_QUEST:
+                    if (tok != TOK.NAME)
+                        throw new InvalidTokenException(off);
+                    token.TokenEnd = off + minBPC;
+                    return TOK.NAME_QUESTION;
+                default:
+                    throw new InvalidTokenException(off);
+                }
+            }
+            throw new ExtensibleTokenException(tok);
+        }
+
+        /**
+         * Scans the first token of a byte subarrary that contains part of
+         * literal attribute value.  The opening and closing delimiters
+         * are not included in the subarrary.
+         * Returns one of the following integers according to the type of
+         * token that the subarray starts with:
+         * <ul>
+         * <li><code>TOK.DATA_CHARS</code></li>
+         * <li><code>TOK.DATA_NEWLINE</code></li>
+         * <li><code>TOK.ATTRIBUTE_VALUE_S</code></li>
+         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
+         * <li><code>TOK.ENTITY_REF</code></li>
+         * <li><code>TOK.CHAR_REF</code></li>
+         * <li><code>TOK.CHAR_PAIR_REF</code></li>
+         * </ul>
+         * @exception EmptyTokenException if the subarray is empty
+         * @exception PartialTokenException if the subarray contains only part of
+         * a legal token
+         * @exception InvalidTokenException if the subarrary does not start
+         * with a legal token or part of one
+         * @exception ExtensibleTokenException if the subarray encodes just a carriage
+         * return ('\r')
+         * @see #TOK.DATA_CHARS
+         * @see #TOK.DATA_NEWLINE
+         * @see #TOK.ATTRIBUTE_VALUE_S
+         * @see #TOK.MAGIC_ENTITY_REF
+         * @see #TOK.ENTITY_REF
+         * @see #TOK.CHAR_REF
+         * @see #TOK.CHAR_PAIR_REF
+         * @see Token
+         * @see EmptyTokenException
+         * @see PartialTokenException
+         * @see InvalidTokenException
+         * @see ExtensibleTokenException
+         */
+        public TOK tokenizeAttributeValue(byte[] buf, int off, int end, Token token)
+        {
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            if (off == end)
+                throw new EmptyTokenException();
+            int start = off;
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    off += 4;
+                    break;
+                case BT_AMP:
+                    if (off == start)
+                        return scanRef(buf, off + minBPC, end, token);
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_LT:
+                    /* this is for inside entity references */
+                    throw new InvalidTokenException(off);
+                case BT_S:
+                    if (off == start)
+                    {
+                        token.TokenEnd = off + minBPC;
+                        return TOK.ATTRIBUTE_VALUE_S;
+                    }
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_LF:
+                    if (off == start)
+                    {
+                        token.TokenEnd = off + minBPC;
+                        return TOK.DATA_NEWLINE;
+                    }
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_CR:
+                    if (off == start)
+                    {
+                        off += minBPC;
+                        if (off == end)
+                            throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
+                        if (byteType(buf, off) == BT_LF)
+                            off += minBPC;
+                        token.TokenEnd = off;
+                        return TOK.DATA_NEWLINE;
+                    }
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+            token.TokenEnd = off;
+            return TOK.DATA_CHARS;
+        }
+
+        /**
+         * Scans the first token of a byte subarrary that contains part of
+         * literal entity value.  The opening and closing delimiters
+         * are not included in the subarrary.
+         * Returns one of the following integers according to the type of
+         * token that the subarray starts with:
+         * <ul>
+         * <li><code>TOK.DATA_CHARS</code></li>
+         * <li><code>TOK.DATA_NEWLINE</code></li>
+         * <li><code>TOK.PARAM_ENTITY_REF</code></li>
+         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
+         * <li><code>TOK.ENTITY_REF</code></li>
+         * <li><code>TOK.CHAR_REF</code></li>
+         * <li><code>TOK.CHAR_PAIR_REF</code></li>
+         * </ul>
+         * @exception EmptyTokenException if the subarray is empty
+         * @exception PartialTokenException if the subarray contains only part of
+         * a legal token
+         * @exception InvalidTokenException if the subarrary does not start
+         * with a legal token or part of one
+         * @exception ExtensibleTokenException if the subarray encodes just a carriage
+         * return ('\r')
+         * @see #TOK.DATA_CHARS
+         * @see #TOK.DATA_NEWLINE
+         * @see #TOK.MAGIC_ENTITY_REF
+         * @see #TOK.ENTITY_REF
+         * @see #TOK.PARAM_ENTITY_REF
+         * @see #TOK.CHAR_REF
+         * @see #TOK.CHAR_PAIR_REF
+         * @see Token
+         * @see EmptyTokenException
+         * @see PartialTokenException
+         * @see InvalidTokenException
+         * @see ExtensibleTokenException
+         */
+        public TOK tokenizeEntityValue(byte[] buf, int off, int end,
+                                       Token token)
+        {
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            if (off == end)
+                throw new EmptyTokenException();
+            int start = off;
+            while (off != end) {
+                switch (byteType(buf, off)) {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    off += 4;
+                    break;
+                case BT_AMP:
+                    if (off == start)
+                        return scanRef(buf, off + minBPC, end, token);
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_PERCNT:
+                    if (off == start)
+                        return scanPercent(buf, off + minBPC, end, token);
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_LF:
+                    if (off == start) {
+                        token.TokenEnd = off + minBPC;
+                        return TOK.DATA_NEWLINE;
+                    }
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                case BT_CR:
+                    if (off == start) {
+                        off += minBPC;
+                        if (off == end)
+                            throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
+                        if (byteType(buf, off) == BT_LF)
+                            off += minBPC;
+                        token.TokenEnd = off;
+                        return TOK.DATA_NEWLINE;
+                    }
+                    token.TokenEnd = off;
+                    return TOK.DATA_CHARS;
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+            token.TokenEnd = off;
+            return TOK.DATA_CHARS;
+        }
+
+        /**
+         * Skips over an ignored conditional section.
+         * The subarray starts following the <code><![ IGNORE [</code>.
+         *
+         * @return the index of the character following the closing
+         * <code>]]></code>
+         *
+         * @exception PartialTokenException if the subarray does not contain the
+         * complete ignored conditional section
+         * @exception InvalidTokenException if the ignored conditional section
+         * contains illegal characters
+         */
+        public int skipIgnoreSect(byte[] buf, int off, int end)
+        {
+            if (minBPC > 1)
+                end = adjustEnd(off, end);
+            int level = 0;
+            while (off != end)
+            {
+                switch (byteType(buf, off))
+                {
+                case BT_LEAD2:
+                    if (end - off < 2)
+                        throw new PartialCharException(off);
+                    check2(buf, off);
+                    off += 2;
+                    break;
+                case BT_LEAD3:
+                    if (end - off < 3)
+                        throw new PartialCharException(off);
+                    check3(buf, off);
+                    off += 3;
+                    break;
+                case BT_LEAD4:
+                    if (end - off < 4)
+                        throw new PartialCharException(off);
+                    check4(buf, off);
+                    off += 4;
+                    break;
+                case BT_NONXML:
+                case BT_MALFORM:
+                    throw new InvalidTokenException(off);
+                case BT_LT:
+                    off += minBPC;
+                    if (off == end)
+                        goto loop;
+                    if (!charMatches(buf, off, '!'))
+                        break;
+                    off += minBPC;
+                    if (off == end)
+                        goto loop;
+                    if (!charMatches(buf, off, '['))
+                        break;
+                    level++;
+                    off += minBPC;
+                    break;
+                case BT_RSQB:
+                    off += minBPC;
+                    if (off == end)
+                        goto loop;
+                    if (!charMatches(buf, off, ']'))
+                        break;
+                    off += minBPC;
+                    if (off == end)
+                        goto loop;
+                    if (charMatches(buf, off, '>')) {
+                        if (level == 0)
+                            return off + minBPC;
+                        level--;
+                    }
+                    else if (charMatches(buf, off, ']'))
+                        break;
+                    off += minBPC;
+                    break;
+                default:
+                    off += minBPC;
+                    break;
+                }
+            }
+        loop:
+            throw new PartialTokenException();
+        }
+
+        /**
+         * Checks that a literal contained in the specified byte subarray
+         * is a legal public identifier and returns a string with
+         * the normalized content of the public id.
+         * The subarray includes the opening and closing quotes.
+         * @exception InvalidTokenException if it is not a legal public identifier
+         */
+        public string getPublicId(byte[] buf, int off, int end)
+        {
+            System.Text.StringBuilder sbuf = new System.Text.StringBuilder();
+            off += minBPC;
+            end -= minBPC;
+            for (; off != end; off += minBPC)
+            {
+                char c = (char)byteToAscii(buf, off);
+                switch (byteType(buf, off))
+                {
+                case BT_MINUS:
+                case BT_APOS:
+                case BT_LPAR:
+                case BT_RPAR:
+                case BT_PLUS:
+                case BT_COMMA:
+                case BT_SOL:
+                case BT_EQUALS:
+                case BT_QUEST:
+                case BT_SEMI:
+                case BT_EXCL:
+                case BT_AST:
+                case BT_PERCNT:
+                case BT_NUM:
+                    sbuf.Append(c);
+                    break;
+                case BT_S:
+                    if (charMatches(buf, off, '\t'))
+                        throw new InvalidTokenException(off);
+                    /* fall through */
+                    goto case BT_CR;
+                case BT_CR:
+                case BT_LF:
+                    if ((sbuf.Length > 0) && (sbuf[sbuf.Length - 1] != ' '))
+                        sbuf.Append(' ');
+                    break;
+                case BT_NAME:
+                case BT_NMSTRT:
+                    if ((c & ~0x7f) == 0) {
+                        sbuf.Append(c);
+                        break;
+                    }
+                    // fall through
+                    goto default;
+                default:
+                    switch (c) {
+                    case '$':
+                    case '@':
+                        break;
+                    default:
+                        throw new InvalidTokenException(off);
+                    }
+                    break;
+                }
+            }
+            if (sbuf.Length > 0 && sbuf[sbuf.Length - 1] == ' ')
+                sbuf.Length = sbuf.Length - 1;
+            return sbuf.ToString();
+        }
+
+        /**
+         * Returns true if the specified byte subarray is equal to the string.
+         * The string must contain only XML significant characters.
+         */
+        public bool matchesXMLstring(byte[] buf, int off, int end, string str)
+        {
+            int len = str.Length;
+            if (len*minBPC != end - off)
+                return false;
+            for (int i = 0; i < len; off += minBPC, i++) {
+                if (!charMatches(buf, off, str[i]))
+                    return false;
+            }
+            return true;
+        }
+
+        /**
+         * Skips over XML whitespace characters at the start of the specified
+         * subarray.
+         *
+         * @return the index of the first non-whitespace character,
+         * <code>end</code> if there is the subarray is all whitespace
+         */
+        public int skipS(byte[] buf, int off, int end)
+        {
+            while (off < end) {
+                switch (byteType(buf, off)) {
+                case BT_S:
+                case BT_CR:
+                case BT_LF:
+                    off += minBPC;
+                    break;
+                default:
+                    goto loop;
+                }
+            }
+        loop:
+            return off;
+        }
+
+        private bool isNameChar2(byte[] buf, int off)
+        {
+            int bt = byteType2(buf, off);
+            return bt == BT_NAME || bt == BT_NMSTRT;
+        }
+        
+        private bool isNameChar3(byte[] buf, int off)
+        {
+            int bt = byteType3(buf, off);
+            return bt == BT_NAME || bt == BT_NMSTRT;
+        }
+        
+        private bool isNameChar4(byte[] buf, int off)
+        {
+            int bt = byteType4(buf, off);
+            return bt == BT_NAME || bt == BT_NMSTRT;
+        }
+
+        private const string nameStartSingles =
+  "\u003a\u005f\u0386\u038c\u03da\u03dc\u03de\u03e0\u0559\u06d5\u093d\u09b2" +
+  "\u0a5e\u0a8d\u0abd\u0ae0\u0b3d\u0b9c\u0cde\u0e30\u0e84\u0e8a\u0e8d\u0ea5" +
+  "\u0ea7\u0eb0\u0ebd\u1100\u1109\u113c\u113e\u1140\u114c\u114e\u1150\u1159" +
+  "\u1163\u1165\u1167\u1169\u1175\u119e\u11a8\u11ab\u11ba\u11eb\u11f0\u11f9" +
+  "\u1f59\u1f5b\u1f5d\u1fbe\u2126\u212e\u3007";
+        
+        private const string nameStartRanges =
+  "\u0041\u005a\u0061\u007a\u00c0\u00d6\u00d8\u00f6\u00f8\u00ff\u0100\u0131" +
+  "\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5" +
+  "\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0388\u038a\u038e\u03a1\u03a3\u03ce" +
+  "\u03d0\u03d6\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481" +
+  "\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9" +
+  "\u0531\u0556\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a" +
+  "\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06e5\u06e6\u0905\u0939" +
+  "\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b6\u09b9" +
+  "\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28" +
+  "\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a72\u0a74" +
+  "\u0a85\u0a8b\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9" +
+  "\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39" +
+  "\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a" +
+  "\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c" +
+  "\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c" +
+  "\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0ce0\u0ce1\u0d05\u0d0c" +
+  "\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e32\u0e33" +
+  "\u0e40\u0e45\u0e81\u0e82\u0e87\u0e88\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3" +
+  "\u0eaa\u0eab\u0ead\u0eae\u0eb2\u0eb3\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69" +
+  "\u10a0\u10c5\u10d0\u10f6\u1102\u1103\u1105\u1107\u110b\u110c\u110e\u1112" +
+  "\u1154\u1155\u115f\u1161\u116d\u116e\u1172\u1173\u11ae\u11af\u11b7\u11b8" +
+  "\u11bc\u11c2\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45" +
+  "\u1f48\u1f4d\u1f50\u1f57\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fc2\u1fc4" +
+  "\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc" +
+  "\u212a\u212b\u2180\u2182\u3041\u3094\u30a1\u30fa\u3105\u312c\uac00\ud7a3" +
+  "\u4e00\u9fa5\u3021\u3029";
+        
+        private const string nameSingles =
+  "\u002d\u002e\u05bf\u05c4\u0670\u093c\u094d\u09bc\u09be\u09bf\u09d7\u0a02" +
+  "\u0a3c\u0a3e\u0a3f\u0abc\u0b3c\u0bd7\u0d57\u0e31\u0eb1\u0f35\u0f37\u0f39" +
+  "\u0f3e\u0f3f\u0f97\u0fb9\u20e1\u3099\u309a\u00b7\u02d0\u02d1\u0387\u0640" +
+  "\u0e46\u0ec6\u3005";
+        
+        private const string nameRanges =
+  "\u0300\u0345\u0360\u0361\u0483\u0486\u0591\u05a1\u05a3\u05b9\u05bb\u05bd" +
+  "\u05c1\u05c2\u064b\u0652\u06d6\u06dc\u06dd\u06df\u06e0\u06e4\u06e7\u06e8" +
+  "\u06ea\u06ed\u0901\u0903\u093e\u094c\u0951\u0954\u0962\u0963\u0981\u0983" +
+  "\u09c0\u09c4\u09c7\u09c8\u09cb\u09cd\u09e2\u09e3\u0a40\u0a42\u0a47\u0a48" +
+  "\u0a4b\u0a4d\u0a70\u0a71\u0a81\u0a83\u0abe\u0ac5\u0ac7\u0ac9\u0acb\u0acd" +
+  "\u0b01\u0b03\u0b3e\u0b43\u0b47\u0b48\u0b4b\u0b4d\u0b56\u0b57\u0b82\u0b83" +
+  "\u0bbe\u0bc2\u0bc6\u0bc8\u0bca\u0bcd\u0c01\u0c03\u0c3e\u0c44\u0c46\u0c48" +
+  "\u0c4a\u0c4d\u0c55\u0c56\u0c82\u0c83\u0cbe\u0cc4\u0cc6\u0cc8\u0cca\u0ccd" +
+  "\u0cd5\u0cd6\u0d02\u0d03\u0d3e\u0d43\u0d46\u0d48\u0d4a\u0d4d\u0e34\u0e3a" +
+  "\u0e47\u0e4e\u0eb4\u0eb9\u0ebb\u0ebc\u0ec8\u0ecd\u0f18\u0f19\u0f71\u0f84" +
+  "\u0f86\u0f8b\u0f90\u0f95\u0f99\u0fad\u0fb1\u0fb7\u20d0\u20dc\u302a\u302f" +
+  "\u0030\u0039\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f" +
+  "\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f" +
+  "\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29\u3031\u3035\u309d\u309e\u30fc\u30fe";
+
+        /// <summary>
+        /// 
+        /// </summary>
+        protected static int[][] charTypeTable;
+        private static void setCharType(char c, int type)
+        {
+            if (c < 0x80)
+                return;
+            int hi = c >> 8;
+            if (charTypeTable[hi] == null) {
+                charTypeTable[hi] = new int[256];
+                for (int i = 0; i < 256; i++)
+                    charTypeTable[hi][i] = BT_OTHER;
+            }
+            charTypeTable[hi][c & 0xFF] = type;
+        }
+
+        private static void setCharType(char min, char max, int type)
+        {
+            int[] shared = null;
+            do
+            {
+                if ((min & 0xFF) == 0)
+                {
+                    for (; min + (char)0xFF <= max; min += (char)0x100)
+                    {
+                        if (shared == null)
+                        {
+                            shared = new int[256];
+                            for (int i = 0; i < 256; i++)
+                                shared[i] = type;
+                        }
+                        charTypeTable[min >> 8] = shared;
+                        if (min + 0xFF == max)
+                            return;
+                    }
+                }
+                setCharType(min, type);
+            } while (min++ != max);
+        }
+
+        static Encoding()
+        {
+            charTypeTable = new int[256][];
+            foreach (char c in nameSingles)
+                setCharType(c, BT_NAME);
+            for (int i = 0; i < nameRanges.Length; i += 2)
+                setCharType(nameRanges[i], nameRanges[i + 1], BT_NAME);
+            for (int i = 0; i < nameStartSingles.Length; i++)
+                setCharType(nameStartSingles[i], BT_NMSTRT);
+            for (int i = 0; i < nameStartRanges.Length; i += 2)
+                setCharType(nameStartRanges[i], nameStartRanges[i + 1],
+                            BT_NMSTRT);
+            setCharType('\uD800', '\uDBFF', BT_LEAD4);
+            setCharType('\uDC00', '\uDFFF', BT_MALFORM);
+            setCharType('\uFFFE', '\uFFFF', BT_NONXML);
+            int[] other = new int[256];
+            for (int i = 0; i < 256; i++)
+                other[i] = BT_OTHER;
+            for (int i = 0; i < 256; i++)
+                if (charTypeTable[i] == null)
+                    charTypeTable[i] = other;
+            System.Array.Copy(asciiTypeTable, 0, charTypeTable[0], 0, 128);
+        }
+
+        /**
+         * Returns the minimum number of bytes required to represent a single
+         * character in this encoding.  The value will be 1, 2 or 4.
+         */
+        public int MinBytesPerChar
+        {
+            get { return minBPC; }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/Exceptions.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Exceptions.cs
new file mode 100644
index 0000000..0329d10
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Exceptions.cs
@@ -0,0 +1,171 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+namespace agsXMPP.Xml.Xpnet
+{
+    /// <summary>
+    /// Base class for other exceptions
+    /// </summary>
+    public class TokenException : System.Exception
+    {
+    }
+
+    /// <summary>
+    /// An empty token was detected.  This only happens with a buffer of length 0 is passed in
+    /// to the parser.
+    /// </summary>
+    public class EmptyTokenException : TokenException
+    {
+    }
+
+    /// <summary>
+    /// End of prolog.
+    /// </summary>
+    public class EndOfPrologException : TokenException
+    {
+    }
+    /**
+     * Thrown to indicate that the byte subarray being tokenized is a legal XML
+     * token, but that subsequent bytes in the same entity could be part of
+     * the token.  For example, <code>Encoding.tokenizeProlog</code>
+     * would throw this if the byte subarray consists of a legal XML name.
+     * @version $Revision: 1.3 $ $Date: 1998/02/17 04:24:06 $
+     */
+    public class ExtensibleTokenException : TokenException
+    {
+        private TOK tokType;
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="tokType"></param>
+        public ExtensibleTokenException(TOK tokType)
+        {
+            this.tokType = tokType;
+        }
+
+        /**
+         * Returns the type of token in the byte subarrary.
+         */
+        public TOK TokenType
+        {
+            get { return tokType; }
+        }
+    }
+
+    /// <summary>
+    /// Several kinds of token problems.
+    /// </summary>
+    public class InvalidTokenException : TokenException
+    {
+        private int offset;
+        private byte type;
+
+        /// <summary>
+        /// An illegal character
+        /// </summary>
+        public const byte ILLEGAL_CHAR = 0;
+        /// <summary>
+        /// Doc prefix wasn't XML
+        /// </summary>
+        public const byte XML_TARGET = 1;
+        /// <summary>
+        /// More than one attribute with the same name on the same element
+        /// </summary>
+        public const byte DUPLICATE_ATTRIBUTE = 2;
+
+        /// <summary>
+        /// Some other type of bad token detected
+        /// </summary>
+        /// <param name="offset"></param>
+        /// <param name="type"></param>
+        public InvalidTokenException(int offset, byte type)
+        {
+            this.offset = offset;
+            this.type = type;
+        }
+
+        /// <summary>
+        /// Illegal character detected
+        /// </summary>
+        /// <param name="offset"></param>
+        public InvalidTokenException(int offset)
+        {
+            this.offset = offset;
+            this.type = ILLEGAL_CHAR;
+        }
+
+        /// <summary>
+        /// Offset into the buffer where the problem ocurred.
+        /// </summary>
+        public int Offset
+        {
+            get { return this.offset; }
+        }
+        
+        /// <summary>
+        /// Type of exception
+        /// </summary>
+        public int Type
+        {
+            get { return this.type; }
+        }
+    }
+
+    /**
+     * Thrown to indicate that the subarray being tokenized is not the
+     * complete encoding of one or more characters, but might be if
+     * more bytes were added.
+     * @version $Revision: 1.2 $ $Date: 1998/02/17 04:24:11 $
+     */
+    public class PartialCharException : PartialTokenException
+    {
+        private int leadByteIndex;
+  
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="leadByteIndex"></param>
+        public PartialCharException(int leadByteIndex) 
+        {
+            this.leadByteIndex = leadByteIndex;
+        }
+
+        /**
+         * Returns the index of the first byte that is not part of the complete
+         * encoding of a character.
+         */
+        public int LeadByteIndex 
+        {
+            get { return leadByteIndex; }
+        }
+    }
+
+    /// <summary>
+    /// A partial token was received.  Try again, after you add more bytes to the buffer.
+    /// </summary>
+    public class PartialTokenException : TokenException
+    {
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/NS.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/NS.cs
new file mode 100644
index 0000000..1abb0d8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/NS.cs
@@ -0,0 +1,134 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2010 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* --------------------------------------------------------------------------
+ * Copyrights
+ * 
+ * Portions created by or assigned to Cursive Systems, Inc. are 
+ * Copyright (c) 2002-2005 Cursive Systems, Inc.  All Rights Reserved.  Contact
+ * information for Cursive Systems, Inc. is available at
+ * http://www.cursive.net/.
+ *
+ * License
+ * 
+ * Jabber-Net can be used under either JOSL or the GPL.  
+ * See LICENSE.txt for details.
+ * --------------------------------------------------------------------------*/
+using System.Collections;
+
+namespace agsXMPP.Xml.xpnet
+{
+    /// <summary>
+    /// Namespace stack.
+    /// </summary>
+    public class NS
+    {
+        private Stack m_stack = new Stack();
+        
+        /// <summary>
+        /// Create a new stack, primed with xmlns and xml as prefixes.
+        /// </summary>
+        public NS()
+        {
+            PushScope();
+            AddNamespace("xmlns", "http://www.w3.org/2000/xmlns/");
+            AddNamespace("xml", "http://www.w3.org/XML/1998/namespace");
+        }
+        
+        /// <summary>
+        /// Declare a new scope, typically at the start of each element
+        /// </summary>
+        public void PushScope()
+        {
+            m_stack.Push(new Hashtable());
+        }
+
+        /// <summary>
+        /// Pop the current scope off the stack.  Typically at the end of each element.
+        /// </summary>
+        public void PopScope()
+        {
+            m_stack.Pop();
+        }
+
+        /// <summary>
+        /// Add a namespace to the current scope.
+        /// </summary>
+        /// <param name="prefix"></param>
+        /// <param name="uri"></param>
+        public void AddNamespace(string prefix, string uri)
+        {
+            ((Hashtable)m_stack.Peek()).Add(prefix, uri);
+        }
+
+        /// <summary>
+        /// Lookup a prefix to find a namespace.  Searches down the stack, starting at the current scope.
+        /// </summary>
+        /// <param name="prefix"></param>
+        /// <returns></returns>
+        public string LookupNamespace(string prefix)
+        {
+            foreach (Hashtable ht in m_stack)
+            {
+				if ((ht.Count > 0) && (ht.ContainsKey(prefix)))
+                    return (string)ht[prefix];
+            }
+            return "";
+        }
+
+        /// <summary>
+        /// The current default namespace.
+        /// </summary>
+        public string DefaultNamespace
+        {
+            get { return LookupNamespace(string.Empty); }
+        }
+		        
+        /// <summary>
+        /// Debug output only.
+        /// </summary>
+        /// <returns></returns>
+        public override string ToString()
+        {
+            System.Text.StringBuilder sb = new System.Text.StringBuilder();
+            
+            foreach (Hashtable ht in m_stack)
+            {
+                sb.Append("---\n");
+                foreach (string k in ht.Keys)
+                {
+                    sb.Append(string.Format("{0}={1}\n", k, ht[k]));
+                }
+            }
+            return sb.ToString();
+        }
+
+		public void Clear()
+		{			
+#if !CF
+		    m_stack.Clear();
+#else
+			while (m_stack.Count > 0)
+			    m_stack.Pop();
+#endif
+		}
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/NamespaceStack.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/NamespaceStack.cs
new file mode 100644
index 0000000..22e6840
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/NamespaceStack.cs
@@ -0,0 +1,108 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+using System.Collections.Generic;
+
+namespace agsXMPP.Xml.Xpnet
+{
+    /// <summary>
+    /// Namespace stack.
+    /// </summary>
+    public class NamespaceStack
+    {
+        private readonly Stack<Dictionary<string, string>> stack = new Stack<Dictionary<string, string>>();
+        
+        /// <summary>
+        /// Create a new stack, primed with xmlns and xml as prefixes.
+        /// </summary>
+        public NamespaceStack()
+        {
+            Push();
+            AddNamespace("xmlns", "http://www.w3.org/2000/xmlns/");
+            AddNamespace("xml", "http://www.w3.org/XML/1998/namespace");
+        }
+        
+        /// <summary>
+        /// Declare a new scope, typically at the start of each element
+        /// </summary>
+        public void Push()
+        {
+            stack.Push(new Dictionary<string, string>());
+        }
+
+        /// <summary>
+        /// Pop the current scope off the stack.  Typically at the end of each element.
+        /// </summary>
+        public void Pop()
+        {
+            stack.Pop();
+        }
+
+        /// <summary>
+        /// Add a namespace to the current scope.
+        /// </summary>
+        /// <param name="prefix"></param>
+        /// <param name="uri"></param>
+        public void AddNamespace(string prefix, string uri)
+        {
+            stack.Peek().Add(prefix, uri);
+        }
+
+        /// <summary>
+        /// Lookup a prefix to find a namespace.  Searches down the stack, starting at the current scope.
+        /// </summary>
+        /// <param name="prefix"></param>
+        /// <returns></returns>
+        public string LookupNamespace(string prefix)
+        {
+            foreach (Dictionary<string, string> ht in stack)
+            {
+                if ((ht.Count > 0) && (ht.ContainsKey(prefix)))
+                    return ht[prefix];
+            }
+            return "";
+        }
+
+        /// <summary>
+        /// The current default namespace.
+        /// </summary>
+        public string DefaultNamespace
+        {
+            get { return LookupNamespace(string.Empty); }
+        }
+
+        /// <summary>
+        /// Clears this instance.
+        /// </summary>
+		public void Clear()
+		{			
+#if !CF
+		    stack.Clear();
+#else
+			while (m_stack.Count > 0)
+			    m_stack.Pop();
+#endif
+		}
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/Position.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Position.cs
new file mode 100644
index 0000000..db9885a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Position.cs
@@ -0,0 +1,78 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+namespace agsXMPP.Xml.Xpnet
+{
+
+/**
+ * Represents a position in an entity.
+ * A position can be modified by <code>Encoding.movePosition</code>.
+ * @see Encoding#movePosition
+ * @version $Revision: 1.2 $ $Date: 1998/02/17 04:24:15 $
+ */
+    public class Position : System.ICloneable
+{
+    private int lineNumber;
+    private int columnNumber;
+
+  /**
+   * Creates a position for the start of an entity: the line number is
+   * 1 and the column number is 0.
+   */
+  public Position() {
+    lineNumber = 1;
+    columnNumber = 0;
+  }
+
+  /**
+   * Returns the line number.
+   * The first line number is 1.
+   */
+  public int LineNumber {
+      get {return lineNumber;}
+      set {lineNumber = value;}
+  }
+
+  /**
+   * Returns the column number.
+   * The first column number is 0.
+   * A tab character is not treated specially.
+   */
+  public int ColumnNumber {
+      get { return columnNumber; }
+      set { columnNumber = value; }
+  }
+
+  /**
+   * Returns a copy of this position.
+   */
+  public object Clone() {
+#if CF
+	  throw new util.NotImplementedException();
+#else
+	  throw new System.NotImplementedException();
+#endif
+  }
+}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/Token.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Token.cs
new file mode 100644
index 0000000..a9ed88a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/Token.cs
@@ -0,0 +1,81 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+namespace agsXMPP.Xml.Xpnet
+{
+	/// <summary>
+	/// A token that was parsed.
+	/// </summary>
+    public class Token
+    {
+        private int tokenEnd = -1;
+        private int nameEnd = -1;
+        private char refChar1 = (char)0;
+        private char refChar2 = (char)0;
+
+		/// <summary>
+		/// The end of the current token, in relation to the beginning of the buffer.
+		/// </summary>
+        public int TokenEnd {
+            get {return tokenEnd;}
+            set {tokenEnd = value; }
+        }
+
+		/// <summary>
+		/// The end of the current token's name, in relation to the beginning of the buffer.
+		/// </summary>
+		public int NameEnd 
+		{
+            get {return nameEnd;}
+            set {nameEnd = value;}
+        }
+
+        //public char RefChar
+        //{
+        //    get {return refChar1;}
+        //}
+
+		/// <summary>
+		/// The parsed-out character. & for &amp;
+		/// </summary>
+        public char RefChar1 {
+            get {return refChar1;}
+            set {refChar1 = value; }
+        }
+		/// <summary>
+		/// The second of two parsed-out characters.  TODO: find example.
+		/// </summary>
+        public char RefChar2 {
+            get {return refChar2;}
+            set {refChar2 = value; }
+        }
+
+		/*
+        public void getRefCharPair(char[] ch, int off) {
+            ch[off] = refChar1;
+            ch[off + 1] = refChar2;
+        }
+        */
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/Xml/Xpnet/UTF8Encoding.cs b/lib/agsxmpp/agsxmpp/Xml/Xpnet/UTF8Encoding.cs
new file mode 100644
index 0000000..de8e99b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/Xml/Xpnet/UTF8Encoding.cs
@@ -0,0 +1,299 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * xpnet is a deriviative of James Clark's XP parser.
+ * See copying.txt for more info.
+ */
+namespace agsXMPP.Xml.Xpnet
+{
+	/// <summary>
+	/// UTF-8 specific tokenizer.
+	/// </summary>
+    public class UTF8Encoding : Encoding
+    {
+        private static readonly int[] utf8HiTypeTable = new int[]
+        {
+            /* 0x80 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x84 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x88 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x8C */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x90 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x94 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x98 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0x9C */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xA0 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xA4 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xA8 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xAC */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xB0 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xB4 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xB8 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xBC */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
+            /* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
+            /* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
+            /* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
+            /* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
+            /* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
+            /* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
+            /* 0xF4 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
+            /* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
+            /* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM
+        };
+
+        private static int[] utf8TypeTable = new int[256];
+
+        static UTF8Encoding() {
+            System.Array.Copy(asciiTypeTable,  0, utf8TypeTable,   0, 128);
+            System.Array.Copy(utf8HiTypeTable, 0, utf8TypeTable, 128, 128);
+        }
+
+        /// <summary>
+        /// New tokenizer
+        /// </summary>
+        public UTF8Encoding() : base(1)
+        {
+        }
+
+        /// <summary>
+        /// What is the type of the current byte?
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected override int byteType(byte[] buf, int off) {
+            return utf8TypeTable[buf[off] & 0xFF];
+        }
+
+        /// <summary>
+        /// Current byte to ASCII char
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected override char byteToAscii(byte[] buf, int off) {
+            return (char)buf[off];
+        }
+
+        /// <summary>
+        /// c is a significant ASCII character
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <param name="c"></param>
+        /// <returns></returns>
+        protected override bool charMatches(byte[] buf, int off, char c) {
+            return ((char)buf[off]) == c;
+        }
+
+        /// <summary>
+        /// A 2 byte UTF-8 representation splits the characters 11 bits
+        /// between the bottom 5 and 6 bits of the bytes.
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <returns></returns>
+        protected override int byteType2(byte[] buf, int off)
+        {
+            int[] page = charTypeTable[(buf[off] >> 2) & 0x7];
+            return page[((buf[off] & 3) << 6) | (buf[off + 1] & 0x3F)];
+        }
+
+        /* A 3 byte UTF-8 representation splits the characters 16 bits
+           between the bottom 4, 6 and 6 bits of the bytes. */
+
+        /* This will (incorrectly) return BT_LEAD4 for surrogates, but that
+           doesn't matter. */
+        int byteType3(byte[] buf, int off) {
+            int[] page = charTypeTable[((buf[off] & 0xF) << 4)
+                                      | ((buf[off + 1] >> 2) & 0xF)];
+            return page[((buf[off + 1] & 3) << 6) | (buf[off + 2] & 0x3F)];
+        }
+
+        void check3(byte[] buf, int off)
+        {
+            switch (buf[off])
+            {
+            case 0xEF:
+                /* 0xFFFF 0xFFFE */
+                if ((buf[off + 1] == 0xBF) &&
+                    ((buf[off + 2] == 0xBF) ||
+                     (buf[off + 2] == 0xBE)))
+                    throw new InvalidTokenException(off);
+                return;
+            case 0xED:
+                /* 0xD800..0xDFFF <=> top 5 bits are 11011 */
+                if ((buf[off + 1] & 0x20) != 0)
+                    throw new InvalidTokenException(off);
+                return;
+            default:
+                return;
+            }
+        }
+
+        void check4(byte[] buf, int off) {
+            switch (buf[off] & 0x7) {
+            default:
+                return;
+            case 5: case 6: case 7:
+                break;
+            case 4:
+                if ((buf[off + 1] & 0x30) == 0)
+                    return;
+                break;
+            }
+            throw new InvalidTokenException(off);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="sourceBuf"></param>
+        /// <param name="sourceStart"></param>
+        /// <param name="sourceEnd"></param>
+        /// <param name="targetBuf"></param>
+        /// <param name="targetStart"></param>
+        /// <returns></returns>
+        protected override int convert(byte[] sourceBuf,
+					                   int sourceStart, int sourceEnd,
+						               char[] targetBuf, int targetStart)
+        {
+            int initTargetStart = targetStart;
+            int c;
+            while (sourceStart != sourceEnd) {
+                byte b = sourceBuf[sourceStart++];
+                if (b >= 0)
+                    targetBuf[targetStart++] = (char)b;
+                else {
+                    switch (utf8TypeTable[b & 0xFF]) {
+                    case BT_LEAD2:
+                        /* 5, 6 */
+                        targetBuf[targetStart++]
+                            = (char)(((b & 0x1F) << 6) | (sourceBuf[sourceStart++] & 0x3F));
+                        break;
+                    case BT_LEAD3:
+                        /* 4, 6, 6 */
+                        c = (b & 0xF) << 12;
+                        c |= (sourceBuf[sourceStart++] & 0x3F) << 6;
+                        c |= (sourceBuf[sourceStart++] & 0x3F);
+                        targetBuf[targetStart++] = (char)c;
+                        break;
+                    case BT_LEAD4:
+                        /* 3, 6, 6, 6 */
+                        c = (b & 0x7) << 18;
+                        c |= (sourceBuf[sourceStart++] & 0x3F) << 12;
+                        c |= (sourceBuf[sourceStart++] & 0x3F) << 6;
+                        c |= (sourceBuf[sourceStart++] & 0x3F);
+                        c -= 0x10000;
+                        targetBuf[targetStart++] = (char)((c >> 10) | 0xD800);
+                        targetBuf[targetStart++] = (char)((c & ((1 << 10) - 1)) | 0xDC00);
+                        break;
+                    }
+                }
+            }
+            return targetStart - initTargetStart;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="buf"></param>
+        /// <param name="off"></param>
+        /// <param name="end"></param>
+        /// <param name="pos"></param>
+        protected override void movePosition(byte[] buf, int off, int end, Position pos) {
+            /* Maintain the invariant: off - colDiff == colNumber. */
+            int colDiff = off - pos.ColumnNumber;
+            int lineNumber = pos.LineNumber;
+            while (off != end) {
+                byte b = buf[off];
+                if (b >= 0) {
+                    ++off;
+                    switch (b) {
+                    case (byte)'\n':
+                        lineNumber += 1;
+                        colDiff = off;
+                        break;
+                    case (byte)'\r':
+                        lineNumber += 1;
+                        if (off != end && buf[off] == '\n')
+                            off++;
+                        colDiff = off;
+                        break;
+                    }
+                }
+                else {
+                    switch (utf8TypeTable[b & 0xFF]) {
+                    default:
+                        off += 1;
+                        break;
+                    case BT_LEAD2:
+                        off += 2;
+                        colDiff++;
+                        break;
+                    case BT_LEAD3:
+                        off += 3;
+                        colDiff += 2;
+                        break;
+                    case BT_LEAD4:
+                        off += 4;
+                        colDiff += 3;
+                        break;
+                    }
+                }
+            }
+            pos.ColumnNumber = off - colDiff;
+            pos.LineNumber = lineNumber;
+        }
+
+        int extendData(byte[] buf, int off, int end)
+        {
+            while (off != end) {
+                int type = utf8TypeTable[buf[off] & 0xFF];
+                if (type >= 0)
+                    off++;
+                else if (type < BT_LEAD4)
+                    break;
+                else {
+                    if (end - off + type < 0)
+                        break;
+                    switch (type) {
+                    case BT_LEAD3:
+                        check3(buf, off);
+                        break;
+                    case BT_LEAD4:
+                        check4(buf, off);
+                        break;
+                    }
+
+                    off -= (int)type; // this is an ugly hack, James
+                }
+            }
+            return off;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/XmppClientConnection.cs b/lib/agsxmpp/agsxmpp/XmppClientConnection.cs
new file mode 100644
index 0000000..29f2e92
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/XmppClientConnection.cs
@@ -0,0 +1,1602 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Threading;
+using System.Net;
+using System.Net.Sockets;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.protocol;
+using agsXMPP.protocol.iq;
+using agsXMPP.protocol.iq.auth;
+using agsXMPP.protocol.iq.agent;
+using agsXMPP.protocol.iq.disco;
+using agsXMPP.protocol.iq.roster;
+using agsXMPP.protocol.iq.register;
+using agsXMPP.protocol.iq.version;
+using agsXMPP.protocol.stream;
+using agsXMPP.protocol.stream.feature.compression;
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.tls;
+
+using agsXMPP.protocol.extensions.caps;
+using agsXMPP.protocol.extensions.compression;
+
+using agsXMPP.Exceptions;
+
+using agsXMPP.Sasl;
+using agsXMPP.Net;
+using agsXMPP.Net.Dns;
+
+
+using agsXMPP.Idn;
+
+namespace agsXMPP
+{
+	public delegate void ObjectHandler		(object sender);	
+	public delegate void XmppElementHandler	(object sender, Element e);
+	
+	/// <summary>
+	/// Summary description for XmppClient.
+	/// </summary>
+	public class XmppClientConnection : XmppConnection
+	{       
+        
+        const string SRV_RECORD_PREFIX = "_xmpp-client._tcp.";
+
+		// Delegates		
+		public delegate void RosterHandler				(object sender, RosterItem item);
+		public delegate void AgentHandler				(object sender, Agent agent);     
+               
+		private SaslHandler					m_SaslHandler		= null;
+	
+		private bool						m_CleanUpDone;
+        private bool                        m_StreamStarted;
+        
+        private SRVRecord[]                 _SRVRecords;
+        private SRVRecord                   _currentSRVRecord;
+       
+        
+		#region << Properties and Member Variables >>
+        private     string                  m_ClientLanguage    = "en";
+        private     string                  m_ServerLanguage    = null;
+		private		string					m_Username			= "";
+		private		string					m_Password			= "";        
+		private		string					m_Resource			= "agsXMPP";		
+		private		string					m_Status			= "";
+		private		int						m_Priority			= 5;
+		private		ShowType				m_Show				= ShowType.NONE;
+		private		bool					m_AutoRoster		= true;
+		private		bool					m_AutoAgents		= true;
+        private     bool                    m_AutoPresence      = true;
+#if !(CF || CF_2)
+        private     bool                    m_UseSso            = false;
+        internal    string                  m_KerberosPrincipal;
+#endif
+	  
+		private		bool					m_UseSSL			= false;
+#if (CF || CF_2) && !BCCRYPTO
+        private     bool                    m_UseStartTLS       = false;
+#else
+        private		bool					m_UseStartTLS		= true;
+#endif
+        private     bool                    m_UseCompression    = false;
+		internal	bool					m_Binded			= false;
+		private		bool					m_Authenticated		= false;
+		
+		private		IqGrabber				m_IqGrabber			= null;
+		private		MessageGrabber			m_MessageGrabber	= null;
+        private     PresenceGrabber         m_PresenceGrabber   = null;
+		private		bool					m_RegisterAccount	= false;
+		private		PresenceManager			m_PresenceManager;
+		private		RosterManager			m_RosterManager;
+               
+
+        private     Capabilities            m_Capabilities          = new Capabilities();
+        private     string                  m_ClientVersion         = "1.0";
+        private     bool                    m_EnableCapabilities    = false;
+
+        private     DiscoInfo               m_DiscoInfo             = new DiscoInfo();
+                     
+
+        /// <summary>
+        /// The prefered Client Language Attribute
+        /// </summary>
+        /// <seealso cref="agsXMPP.protocol.Base.XmppPacket.Language"/>
+        public string ClientLanguage
+        {
+            get { return m_ClientLanguage; }
+            set { m_ClientLanguage = value; }
+        }
+
+        /// <summary>
+        /// The language which the server decided to use.
+        /// </summary>
+        /// <seealso cref="agsXMPP.protocol.Base.XmppPacket.Language"/>
+        public string ServerLanguage
+        {
+            get { return m_ServerLanguage; }            
+        }
+
+		/// <summary>
+		/// the username that is used to authenticate to the xmpp server
+		/// </summary>
+		public string Username
+		{
+			get { return m_Username; }
+			set
+            {
+                // first Encode the user/node
+                m_Username = value;
+
+                string tmpUser = Jid.EscapeNode(value);
+#if !STRINGPREP
+                if (value != null)
+				    m_Username = tmpUser.ToLower();
+                else
+                    m_Username = null;
+#else
+                if (value != null)
+                    m_Username = Stringprep.NodePrep(tmpUser);
+                else
+                    m_Username = null;
+#endif
+                
+            }                
+		}
+
+		/// <summary>
+		/// the password that is used to authenticate to the xmpp server
+		/// </summary>
+		public string Password
+		{
+			get { return m_Password; }
+			set	{ m_Password = value; }
+		}
+                
+		/// <summary>
+		/// the resource for this connection each connection to the server with the same jid needs a unique resource.
+        /// You can also set <code>Resource = null</code> and the server will assign a random Resource for you.
+		/// </summary>
+		public string Resource
+		{
+			get { return m_Resource;  }
+			set { m_Resource = value; }
+		}
+		
+		/// <summary>
+		/// our XMPP id build from Username, Server and Resource Property (user at server/resourcee)
+		/// </summary>
+		public Jid MyJID
+		{
+			get	
+			{ 
+				return BuildMyJid();               
+			}
+		}
+
+        /// <summary>
+        /// The status message of this connection which is sent with the presence packets.
+        /// </summary>
+        /// <remarks>
+        /// you have to call the method <b>SendMyPresence</b> to send your updated presence to the server.        
+        /// </remarks>
+		public string Status
+		{
+			get
+			{
+				return m_Status;
+			}
+			set
+			{
+				m_Status = value;
+			}
+		}
+
+		/// <summary>
+		/// The priority of this connection send with the presence packets.
+        /// The OPTIONAL priority element contains non-human-readable XML character data that specifies the priority level 
+        /// of the resource. The value MUST be an integer between -128 and +127. If no priority is provided, a server 
+        /// SHOULD consider the priority to be zero.        
+		/// </summary>
+        /// <remarks>you have to call the method <b>SendMyPresence</b> to send your updated presence to the server.</remarks>
+		public int Priority
+		{
+			get { return m_Priority; }
+			set
+            {
+                if ((value < -127) || (value > 127))
+                    throw new ArgumentException("The value MUST be an integer between -128 and +127");
+                
+                m_Priority = value;
+			}
+		}
+
+        /// <summary>
+        /// change the showtype. 
+        /// </summary>
+        /// <remarks>you have to call the method <b>SendMyPresence</b> to send your updated presence to the server.</remarks>
+		public ShowType Show
+		{
+			get { return m_Show; }
+			set { m_Show = value; }
+		}
+
+        /// <summary>
+        /// If set to true then the Roster (contact list) is requested automatically after sucessful login. 
+        /// Set this property to false if you don't want to receive your contact list, or request it manual. 
+        /// To save bandwidth is makes sense to cache the contact list and don't receive it on each login.
+        /// </summary>
+        /// <remarks>default value is <b>true</b></remarks>
+		public bool AutoRoster
+		{
+			get	{ return m_AutoRoster; }
+			set	{ m_AutoRoster = value;	}
+		}
+
+        /// <summary>
+        /// Sends the presence Automatically after successful login.
+        /// This property works only in combination with AutoRoster (AutoRoster = true).
+        /// </summary>
+        public bool AutoPresence
+        {
+            get { return m_AutoPresence; }
+            set { m_AutoPresence = value; }
+        }
+        
+		/// <summary>
+        /// If set to true then the Agents are requested automatically after sucessful login. 
+        /// Set this property to false if you don't use agents at all, or if you request them manual.
+		/// </summary>
+        /// <remarks>default value is <b>true</b></remarks>
+		public bool AutoAgents
+		{
+			get	{ return m_AutoAgents; }
+			set	{ m_AutoAgents = value;	}
+        }
+
+#if !(CF || CF_2)
+        /// <summary>
+        /// Use Single sign on (GSSAPI/KERBEROS)
+        /// </summary>
+        public bool UseSso
+        {
+            get { return m_UseSso; }
+            set
+            {
+                if (Util.Runtime.IsMono() && Util.Runtime.IsUnix())
+                    throw new NotImplementedException();
+                
+                m_UseSso = value;
+            }
+        }
+
+        /// <summary>
+        /// Gets the kerberos principal.
+        /// </summary>
+        /// <value>The kerberos principal.</value>
+        public string KerberosPrincipal
+        {
+            get { return m_KerberosPrincipal; }
+            set { m_KerberosPrincipal = value; }
+        }
+#endif
+	    
+
+        /// <summary>
+		/// use "old style" ssl for this connection (Port 5223).
+		/// </summary>
+		public bool UseSSL
+		{
+			get	{ return m_UseSSL; }
+
+#if SSL
+			set
+			{
+                // Only one of both can be true
+				m_UseSSL = value;
+                if (value == true)
+                    m_UseStartTLS = false;
+			}
+#endif
+		}
+
+		/// <summary>
+		/// use Start-TLS on this connection when the server supports it. Make sure UseSSL is false when 
+		/// you want to use this feature.
+		/// </summary>
+		public bool UseStartTLS
+		{
+			get { return m_UseStartTLS; }
+
+#if SSL || BCCRYPTO || CF_2
+			set
+			{
+                // Only one of both can be true
+				m_UseStartTLS = value;
+                if (value == true)
+                    m_UseSSL = false;
+			}
+#endif
+		}
+
+        /// <summary>
+        /// Use Stream compression to save bandwidth?
+        /// This should not be used in combination with StartTLS,
+        /// because TLS has build in compression (see RFC 2246, http://www.ietf.org/rfc/rfc2246.txt)
+        /// </summary>
+        public bool UseCompression
+        {
+            get { return m_UseCompression; }
+			set	{ m_UseCompression = value;	}
+        }
+
+		/// <summary>
+		/// Are we Authenticated to the server? This is readonly and set by the library
+		/// </summary>
+		public bool Authenticated
+		{
+			get { return m_Authenticated; }				
+		}
+
+		/// <summary>
+		/// is the resource binded? This is readonly and set by the library
+		/// </summary>
+		public bool Binded
+		{
+			get { return m_Binded; }				
+		}
+
+		/// <summary>
+		/// Should the library register a new account on the server
+		/// </summary>
+		public bool RegisterAccount
+		{
+			get { return m_RegisterAccount; }
+			set { m_RegisterAccount = value; }
+		}
+	
+		public IqGrabber IqGrabber
+		{
+			get { return m_IqGrabber; }
+		}
+
+        public MessageGrabber MessageGrabber
+		{
+			get { return m_MessageGrabber; }
+		}
+
+        public PresenceGrabber PresenceGrabber
+        {
+            get { return m_PresenceGrabber; }
+        }
+		
+		public RosterManager RosterManager
+		{
+			get { return m_RosterManager; }
+		}
+
+		public PresenceManager PresenceManager
+		{
+			get { return m_PresenceManager; }
+		}       
+       
+        public bool EnableCapabilities
+        {
+            get { return m_EnableCapabilities; }
+            set { m_EnableCapabilities = value; }
+        }
+
+        public string ClientVersion
+        {
+            get { return m_ClientVersion; }
+            set { m_ClientVersion = value; }
+        }
+
+        public Capabilities Capabilities
+        {
+            get { return m_Capabilities; }
+            set { m_Capabilities = value; }
+        }
+        
+        public Capabilities ServerCapabilities { get; set; }
+
+        /// <summary>
+        /// The DiscoInfo object is used to respond to DiscoInfo request if AutoAnswerDiscoInfoRequests == true in DisoManager objects,
+        /// it's also used to build the Caps version when EnableCapabilities is set to true.
+        /// <remarks>
+        /// When EnableCapailities == true call UpdateCapsVersion after each update of the DiscoInfo object
+        /// </remarks>
+        /// </summary>
+        public DiscoInfo DiscoInfo
+        {
+            get { return m_DiscoInfo; }
+            set { m_DiscoInfo = value; }
+        }
+		#endregion
+		
+		#region << Events >>			
+		
+		/// <summary>
+		/// We are authenticated to the server now.
+		/// </summary>	
+		public event ObjectHandler				OnLogin;
+		/// <summary>
+		/// This event occurs after the resource was binded
+		/// </summary>
+		public event ObjectHandler				OnBinded;
+
+        /// <summary>
+        /// Event that occurs on bind errors
+        /// </summary>
+        public event XmppElementHandler         OnBindError;
+
+        /// <summary>
+        /// This event is fired when we get register information.
+        /// You ca use this event for custom registrations.
+        /// </summary>
+        public event RegisterEventHandler       OnRegisterInformation;
+		
+        /// <summary>
+		/// This event gets fired after a new account is registered
+		/// </summary>
+		public event ObjectHandler				OnRegistered;
+
+		/// <summary>
+		/// This event ets fired after a ChangePassword Request was successful
+		/// </summary>
+		public event ObjectHandler				OnPasswordChanged;
+
+		/*
+        was never used, comment ot until we need it
+		public event XmppElementHandler			OnXmppError;
+		*/
+         
+		/// <summary>
+		/// Event that occurs on registration errors
+		/// </summary>
+		public event XmppElementHandler			OnRegisterError;
+
+        /// <summary>
+        /// Event occurs on Xmpp Stream error elements
+        /// </summary>
+        public event XmppElementHandler         OnStreamError;
+                		
+		/// <summary>
+		/// Event that occurs on authentication errors
+		/// e.g. wrong password, user doesnt exist etc...
+		/// </summary>
+		public event XmppElementHandler			OnAuthError;
+
+        /// <summary>
+        /// Event occurs on Socket Errors
+        /// </summary>
+        public event ErrorHandler               OnSocketError;
+        		
+		public event ObjectHandler				OnClose;
+
+
+        /// <summary>
+        /// This event is raised when a response to a roster query is received. The roster query contains the contact list.
+        /// This lost could be very large and could contain hundreds of contacts. The are all send in a single XML element from 
+        /// the server. Normally you show the contact list in a GUI control in you application (treeview, listview). 
+        /// When this event occurs you couls Suspend the GUI for faster drawing and show change the mousepointer to the hourglass
+        /// </summary>
+        /// <remarks>see also OnRosterItem and OnRosterEnd</remarks>
+        public event ObjectHandler				OnRosterStart;
+
+        /// <summary>
+        /// This event is raised when a response to a roster query is received. It notifies you that all RosterItems (contacts) are
+        /// received now.
+        /// When this event occurs you could Resume the GUI and show the normal mousepointer again.
+        /// </summary>
+        /// <remarks>see also OnRosterStart and OnRosterItem</remarks>
+        public event ObjectHandler				OnRosterEnd;
+
+        /// <summary>
+        /// This event is raised when a response to a roster query is received. This event always contains a single RosterItem. 
+        /// e.g. you have 150 friends on your contact list, then this event is called 150 times.
+        /// </summary>
+        /// <remarks>see also OnRosterItem and OnRosterEnd</remarks>
+        public event RosterHandler              OnRosterItem;
+
+        /// <summary>
+        /// This event is raised when a response to an agents query which could contain multiple agentitems.
+        /// Normally you show the items in a GUI. This event could be used to suspend the UI for faster drawing.
+        /// </summary>
+        /// <remarks>see also OnAgentItem and OnAgentEnd</remarks>
+		public event ObjectHandler				OnAgentStart;
+
+        /// <summary>
+        /// This event is raised when a response to an agents query which could contain multiple agentitems.
+        /// Normally you show the items in a GUI. This event could be used to resume the suspended userinterface.
+        /// </summary>
+        /// <remarks>see also OnAgentStart and OnAgentItem</remarks>
+        public event ObjectHandler				OnAgentEnd;
+
+        /// <summary>
+        /// This event returns always a single AgentItem from a agents query result.
+        /// This is from the old jabber protocol. Instead of agents Disco (Service Discovery) should be used in modern
+        /// application. But still lots of servers use Agents.
+        /// <seealso cref=""/>
+        /// </summary>
+        /// <remarks>see also OnAgentStart and OnAgentEnd</remarks>
+        public event AgentHandler				OnAgentItem;
+
+        /// <summary>
+        /// 
+        /// </summary>        
+        public event IqHandler                  OnIq;	
+
+		/// <summary>
+		/// We received a message. This could be a chat message, headline, normal message or a groupchat message. 
+        /// There are also XMPP extension which are embedded in messages. 
+        /// e.g. X-Data forms.
+		/// </summary>
+		public event MessageHandler				OnMessage;
+		
+        /// <summary>
+        /// We received a presence from a contact or chatroom.
+        /// Also subscriptions is handles in this event.
+        /// </summary>
+        public event PresenceHandler			OnPresence;
+		
+        //public event ErrorHandler				OnError;
+
+		public event SaslEventHandler			OnSaslStart;
+		public event ObjectHandler				OnSaslEnd;
+
+
+		#endregion
+
+		#region << Constructors >>
+		public XmppClientConnection() : base()
+		{			
+			m_IqGrabber			= new IqGrabber(this);
+			m_MessageGrabber	= new MessageGrabber(this);
+            m_PresenceGrabber   = new PresenceGrabber(this);
+			m_PresenceManager	= new PresenceManager(this);
+			m_RosterManager		= new RosterManager(this);            
+		}
+
+		public XmppClientConnection(SocketConnectionType type) : this()
+		{
+			base.SocketConnectionType = type;
+		}
+
+        /// <summary>
+        /// create a new XmppClientConnection with the given JabberId and password
+        /// </summary>
+        /// <param name="jid">JabberId (user at example.com)</param>
+        /// <param name="pass">password</param>
+        public XmppClientConnection(Jid jid, string pass)
+            : this()
+        {
+            base.Server     = jid.Server;
+            this.Username   = jid.User;
+            this.Password   = pass;
+        }
+
+        /// <summary>
+        /// create a new XmppClientConnection with the given server
+        /// Username and Password gets set later
+        /// </summary>
+        /// <param name="server"></param>
+		public XmppClientConnection(string server) : this()
+		{
+			base.Server = server;
+		}
+
+        /// <summary>
+        /// create a new XmppClientConnection with the given server and port number
+        /// Username and Password gets set later
+        /// </summary>
+        /// <param name="server"></param>
+		public XmppClientConnection(string server, int port) : this(server)
+		{
+			base.Port = port;
+		}
+		#endregion
+                
+        /// <summary>
+        /// This method open the connections to the xmpp server and authenticates you to ther server.
+        /// This method is async, don't assume you are already connected when it returns. You have to wait for the OnLogin Event
+        /// </summary>
+		public void Open()
+		{
+			_Open();            
+		}       
+
+        /// <summary>
+        /// This method open the connections to the xmpp server and authenticates you to ther server.
+        /// This method is async, don't assume you are already connected when it returns. You have to wait for the OnLogin Event
+        /// </summary>
+        /// <param name="username">your username</param>
+        /// <param name="password">your password</param>
+		public void Open(string username, string password)
+		{            
+            this.Username   = username;
+            this.Password   = password;
+
+			_Open();
+		}
+
+        /// <summary>
+        /// This method open the connections to the xmpp server and authenticates you to ther server.
+        /// This method is async, don't assume you are already connected when it returns. You have to wait for the OnLogin Event
+        /// </summary>
+        /// <param name="username">your username</param>
+        /// <param name="password">your passowrd</param>
+        /// <param name="resource">resource for this connection</param>
+		public void Open(string username, string password, string resource)
+		{
+			this.m_Username = username;
+			this.m_Password	= password;
+			this.m_Resource	= resource;
+			_Open();
+		}
+
+        /// <summary>
+        /// This method open the connections to the xmpp server and authenticates you to ther server.
+        /// This method is async, don't assume you are already connected when it returns. You have to wait for the OnLogin Event
+        /// </summary>
+        /// <param name="username">your username</param>
+        /// <param name="password">your password</param>
+        /// <param name="resource">resource for this connection</param>
+        /// <param name="priority">priority which will be sent with presence packets</param>
+		public void Open(string username, string password, string resource, int priority)
+		{
+			this.m_Username = username;
+			this.m_Password	= password;
+			this.m_Resource	= resource;
+			this.m_Priority	= priority;
+			_Open();
+		}
+
+        /// <summary>
+        /// This method open the connections to the xmpp server and authenticates you to ther server.
+        /// This method is async, don't assume you are already connected when it returns. You have to wait for the OnLogin Event
+        /// </summary>
+        /// <param name="username">your username</param>
+        /// <param name="password">your password</param>
+        /// <param name="priority">priority which will be sent with presence packets</param>
+		public void Open(string username, string password, int priority)
+		{
+			this.m_Username = username;
+			this.m_Password	= password;			
+			this.m_Priority	= priority;
+			_Open();
+		}
+            
+		#region << Socket handers >>
+		public override void SocketOnConnect(object sender)
+		{
+			base.SocketOnConnect(sender);
+
+            SendStreamHeader(true);
+		}
+
+		public override void SocketOnDisconnect(object sender)
+		{	
+			base.SocketOnDisconnect(sender);
+
+			if(!m_CleanUpDone)
+				CleanupSession();
+		}
+
+        public override void SocketOnError(object sender, Exception ex)
+        {
+            base.SocketOnError(sender, ex);
+
+            if ((ex.GetType() == typeof(ConnectTimeoutException) 
+                || (ex.GetType() == typeof(SocketException) && ((SocketException)ex).ErrorCode == 10061))
+                && _SRVRecords != null
+                && _SRVRecords.Length > 1)
+            {         
+                // connect failed. We are using SRV records and have multiple results.
+                // remove the current record
+                RemoveSrvRecord(_currentSRVRecord);
+                // find and set a new record
+                SetConnectServerFromSRVRecords();
+                // connect again
+                OpenSocket();
+            }
+            else
+            {
+                // Fires the socket error
+                if (OnSocketError != null)
+                    OnSocketError(this, ex);
+
+                // Only cleaneUp Session and raise on close if the stream already has started
+                // if teh stream gets closed because of a socket error we have to raise both errors fo course
+                if (m_StreamStarted && !m_CleanUpDone)
+                    CleanupSession();                
+            }
+        }		
+		#endregion
+               
+		private void _Open()
+		{
+            m_CleanUpDone   = false;
+            m_StreamStarted = false;
+
+			StreamParser.Reset();
+#if SSL
+			if (ClientSocket.GetType() == typeof(ClientSocket))
+				((ClientSocket) ClientSocket).SSL = m_UseSSL;
+#endif		
+            // this should start later
+            //if (m_KeepAlive)
+            //    CreateKeepAliveTimer();
+            
+            if (SocketConnectionType == SocketConnectionType.Direct && AutoResolveConnectServer)
+                ResolveSrv();
+
+            OpenSocket();          
+		}
+
+        private void OpenSocket()
+        {
+            if (ConnectServer == null)
+                SocketConnect(base.Server, base.Port);
+            else
+                SocketConnect(this.ConnectServer, base.Port);
+        }
+
+        #region << SRV functions >>
+        /// <summary>
+        /// Resolves the connection host of a xmpp domain when SRV records are set
+        /// </summary>
+        private void ResolveSrv()
+        {
+#if !(CF || CF_2)
+            try
+            {
+                // get the machine's default DNS servers
+                var dnsServers = IPConfigurationInformation.DnsServers;
+
+                if (dnsServers.Count > 0)
+                {
+                    // Take the 1st DNS Server for our query
+                    IPAddress dnsServer = dnsServers[0];
+                    
+                    string queryDomain = SRV_RECORD_PREFIX + Server;
+                    
+                    _SRVRecords = Resolver.SRVLookup(queryDomain, dnsServer);
+
+                    SetConnectServerFromSRVRecords();   
+                }
+            }
+            catch (Exception ex)
+            {
+                FireOnError(this, ex);                
+            }
+#endif
+        }
+
+        private void SetConnectServerFromSRVRecords()
+        {
+            // check we have a response
+            if (_SRVRecords != null && _SRVRecords.Length > 0)
+            {
+                //SRVRecord srv = _SRVRecords[0];
+                _currentSRVRecord = PickSRVRecord();
+
+                this.Port           = _currentSRVRecord.Port;
+                this.ConnectServer  = _currentSRVRecord.Target;
+            }
+            else
+            {
+                // no SRV-Records set
+                _currentSRVRecord = null;
+                this.ConnectServer = null;
+            }
+        }
+
+        private void RemoveSrvRecord(SRVRecord rec)
+        {
+            int i = 0;
+            SRVRecord[] recs = new SRVRecord[_SRVRecords.Length - 1];
+            foreach (SRVRecord srv in _SRVRecords)
+            {
+                if (!srv.Equals(rec))
+                {
+                    recs[i] = srv;
+                    i++;
+                }
+            }
+            _SRVRecords = recs;
+        }
+
+        /// <summary>
+        /// Picks one of the SRV records.
+        /// priority and weight are evaluated by the following algorithm.
+        /// </summary>
+        /// <returns>SRVRecord</returns>
+        private SRVRecord PickSRVRecord()
+        {
+            SRVRecord ret = null;
+
+            // total weight of all servers with the same priority
+            int totalWeight = 0;
+            
+            // ArrayList for the servers with the lowest priority
+            ArrayList lowServers = new ArrayList();
+            // check we have a response
+            if (_SRVRecords != null && _SRVRecords.Length > 0)
+            {
+                // Find server(s) with the highest priority (could be multiple)
+                foreach (SRVRecord srv in _SRVRecords)
+                {
+                    if (ret == null)
+                    {
+                        ret = srv;
+                        lowServers.Add(ret);
+                        totalWeight = ret.Weight;
+                    }
+                    else
+                    {
+                        if (srv.Priority == ret.Priority)
+                        {
+                            lowServers.Add(srv);
+                            totalWeight += srv.Weight;
+                        }
+                        else if (srv.Priority < ret.Priority)
+                        {
+                            // found a servr with a lower priority
+                            // clear the lowServers Array and start with this server
+                            lowServers.Clear();
+                            lowServers.Add(ret);
+                            ret = srv;
+                            totalWeight = ret.Weight;
+                        }
+                        else if (srv.Priority > ret.Priority)
+                        {
+                            // exit the loop, because servers are already sorted by priority
+                            break;
+                        }
+                    }
+                }
+            }
+
+            // if we have multiple lowServers then we have to pick a random one
+            // BUT we have too involve the weight which can be used for "Load Balancing" here
+            if (lowServers.Count > 1)
+            {
+                if (totalWeight > 0)
+                {
+                    // Create a random value between 1 - total Weight
+                    int rnd = new Random().Next(1, totalWeight);
+                    int i = 0;
+                    foreach (SRVRecord sr in lowServers)
+                    {
+                        if (rnd > i && rnd <= (i + sr.Weight))
+                        {
+                            ret = sr;
+                            break;
+                        }
+                        else
+                        {
+                            i += sr.Weight;
+                        }
+                    }
+                }
+                else
+                {
+                    // Servers have no weight, they are all equal, pick a random server
+                    int rnd = new Random().Next(lowServers.Count);                    
+                    ret = (SRVRecord) lowServers[rnd];                    
+                }
+            }
+
+            return ret;
+        }
+
+        #endregion
+
+        private void SendStreamHeader(bool startParser)
+        {
+            StringBuilder sb = new StringBuilder();
+
+
+            sb.Append("<stream:stream");
+            sb.Append(" to='" + base.Server + "'");
+            sb.Append(" xmlns='jabber:client'");
+            sb.Append(" xmlns:stream='http://etherx.jabber.org/streams'");
+
+            if (StreamVersion != null)
+                sb.Append(" version='" + StreamVersion + "'");
+
+            if (m_ClientLanguage != null)
+                sb.Append(" xml:lang='" + m_ClientLanguage + "'");
+
+            // xml:lang="en"<stream:stream to="coversant.net" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"  xml:lang="en" version="1.0" >
+            // sb.Append(" xml:lang='" + "en" + "' ");
+
+
+            sb.Append(">");
+
+            Open(sb.ToString());
+        }	
+               
+
+		/// <summary>
+		/// Sends our Presence, the packet is built of Status, Show and Priority
+		/// </summary>
+		public void SendMyPresence()
+		{
+            Presence pres = new Presence(m_Show, m_Status, m_Priority);
+
+            // Add client caps when enabled
+            if (m_EnableCapabilities)
+            {
+                if (m_Capabilities.Version == null)
+                    UpdateCapsVersion();
+
+                pres.AddChild(m_Capabilities);
+            }
+
+            this.Send(pres);
+		}
+
+        /// <summary>
+        /// Sets the caps version automatically from the DiscoInfo object.
+        /// Call this member after each change of the DiscoInfo object
+        /// </summary>
+        public void UpdateCapsVersion()
+        {
+            m_Capabilities.SetVersion(m_DiscoInfo);
+        }
+
+		internal void RequestLoginInfo()
+		{			
+			AuthIq iq = new AuthIq(IqType.get, new Jid(base.Server));
+			iq.Query.Username = this.m_Username;
+
+			IqGrabber.SendIq(iq, new IqCB(OnGetAuthInfo), null);
+		}
+
+		/// <summary>
+		/// Changing the Password. You should use this function only when connected with SSL or TLS
+		/// because the password is sent in plain text over the connection.		
+		/// </summary>
+		/// /// <remarks>
+		///		<para>
+		///			After this request was successful the new password is set automatically in the Username Property
+		///		</para>
+		/// </remarks>		
+		/// <param name="newPass">value of the new password</param>
+		public void ChangePassword(string newPass)
+		{
+			/*
+			
+			Example 10. Password Change
+			<iq type='set' to='somehost' id='change1'>
+			<query xmlns='jabber:iq:register'>
+				<username>bill</username>
+				<password>newpass</password>
+			</query>
+			</iq>			    
+
+			Because the password change request contains the password in plain text,
+			a client SHOULD NOT send such a request unless the underlying stream is encrypted 
+			(using SSL or TLS) and the client has verified that the server certificate is signed 
+			by a trusted certificate authority. A given domain MAY choose to disable password 
+			changes if the stream is not properly encrypted, or to disable in-band password 
+			changes entirely.
+
+			If the user provides an empty password element or a password element that contains 
+			no XML character data (i.e., either <password/> or <password></password>),
+			the server or service MUST NOT change the password to a null value, 
+			but instead MUST maintain the existing password.
+
+			Example 11. Host Informs Client of Successful Password Change
+
+			<iq type='result' id='change1'/>			
+			*/
+
+			RegisterIq regIq  = new RegisterIq(IqType.set, new Jid(base.Server));			
+			regIq.Query.Username = this.m_Username;
+			regIq.Query.Password = newPass;
+			
+			IqGrabber.SendIq(regIq, new IqCB(OnChangePasswordResult), newPass);
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="sender"></param>
+		/// <param name="iq"></param>
+		/// <param name="data">contains the new password</param>
+		private void OnChangePasswordResult(object sender, IQ iq, object data)
+		{
+			if (iq.Type == IqType.result)
+			{
+				if(OnPasswordChanged!=null)
+					OnPasswordChanged(this);
+				
+				// Set the new password in the Password property on sucess
+				m_Password = (string) data;
+			}
+			else if (iq.Type == IqType.error)
+			{
+				/*
+				The server or service SHOULD NOT return the original XML sent in 
+				IQ error stanzas related to password changes.
+
+				Example 12. Host Informs Client of Failed Password Change (Bad Request)
+
+				<iq type='error' from='somehost' to='user at host/resource' id='change1'>
+				<error code='400' type='modify'>
+					<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+				</error>
+				</iq>
+				    
+
+				Example 13. Host Informs Client of Failed Password Change (Not Authorized)
+
+				<iq type='error' from='somehost' to='user at host/resource' id='change1'>
+				<error code='401' type='cancel'>
+					<not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+				</error>
+				</iq>
+				    
+
+				Example 14. Server Informs Client of Failed Password Change (Not Allowed)
+
+				<iq type='error' from='somehost' to='user at host/resource' id='change1'>
+				<error code='405' type='cancel'>
+					<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+				</error>
+				</iq>
+								  
+				*/
+
+				if(OnRegisterError!=null)
+					OnRegisterError(this, iq);
+			}
+        }
+
+        #region << Register new Account >>
+        
+
+        /// <summary>
+        /// requests the registration fields
+        /// </summary>
+        /// <param name="obj">object which contains the features node which we need later for login again</param>
+        private void GetRegistrationFields(object data)
+        {
+            // <iq type='get' id='reg1'>
+            //  <query xmlns='jabber:iq:register'/>
+            // </iq>
+
+            RegisterIq regIq = new RegisterIq(IqType.get, new Jid(base.Server));
+            IqGrabber.SendIq(regIq, new IqCB(OnRegistrationFieldsResult), data);
+        }
+
+        private void OnRegistrationFieldsResult(object sender, IQ iq, object data)
+        {
+            if (iq.Type != IqType.error)
+            {
+                if (iq.Query is Register)
+                {
+                    RegisterEventArgs args = new RegisterEventArgs(iq.Query as Register);
+                    if (OnRegisterInformation != null)
+                        OnRegisterInformation(this, args);
+
+                    DoChangeXmppConnectionState(XmppConnectionState.Registering);
+
+                    IQ regIq = new IQ(IqType.set);
+                    regIq.GenerateId();
+                    regIq.To = new Jid(base.Server);
+
+                    //RegisterIq regIq = new RegisterIq(IqType.set, new Jid(base.Server));
+                    if (args.Auto)
+                    {
+                        Register reg = new Register(this.m_Username, this.m_Password);
+                        regIq.Query = reg;
+                    }
+                    else
+                    {
+                        regIq.Query = args.Register;
+                    }
+                    IqGrabber.SendIq(regIq, new IqCB(OnRegisterResult), data);
+                }
+            }
+            else
+            {
+                if (OnRegisterError != null)
+                    OnRegisterError(this, iq);
+            }
+        }
+        
+        private void OnRegisterResult(object sender, IQ iq, object data)
+		{
+			/*
+			Example 6. Host Informs Entity of Failed Registration (Username Conflict)
+
+			<iq type='error' id='reg2'>
+			<query xmlns='jabber:iq:register'>
+				<username>bill</username>
+				<password>m1cro$oft</password>
+				<email>billg at bigcompany.com</email>
+			</query>
+			<error code='409' type='cancel'>
+				<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+			</error>
+			</iq>
+    
+
+			Example 7. Host Informs Entity of Failed Registration (Some Required Information Not Provided)
+
+			<iq type='error' id='reg2'>
+			<query xmlns='jabber:iq:register'>
+				<username>bill</username>
+				<password>Calliope</password>
+			</query>
+			<error code='406' type='modify'>
+				<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+			</error>
+			</iq>
+			*/
+            if (iq.Type == IqType.result)
+            {
+                DoChangeXmppConnectionState(XmppConnectionState.Registered);
+                if (OnRegistered != null)
+                    OnRegistered(this);
+
+                if (this.StreamVersion != null && this.StreamVersion.StartsWith("1."))
+                { 
+                    // init sasl login
+                    InitSaslHandler();
+                    m_SaslHandler.OnStreamElement(this, data as Node);
+                }
+                else
+                {
+                    // old jabber style login
+                    RequestLoginInfo();
+                }
+            }
+            else if (iq.Type == IqType.error)
+            {
+                if (OnRegisterError != null)
+                    OnRegisterError(this, iq);
+            }
+        }
+        #endregion
+
+        private void OnGetAuthInfo(object sender, IQ iq, object data)
+		{
+			// We get smth like this and should add password (digest) and ressource
+			// Recv:<iq type="result" id="MX_7"><query xmlns="jabber:iq:auth"><username>gnauck</username><password/><digest/><resource/></query></iq>
+			// Send:<iq type='set' id='mx_login'>
+			//			<query xmlns='jabber:iq:auth'><username>gnauck</username><digest>27c05d464e3f908db3b2ca1729674bfddb28daf2</digest><resource>Office</resource></query>
+			//		</iq>
+			// Recv:<iq id="mx_login" type="result"/> 
+			
+			iq.GenerateId();
+			iq.SwitchDirection();
+			iq.Type = IqType.set;
+
+			Auth auth = (Auth) iq.Query;
+			
+			auth.Resource = this.m_Resource;
+			auth.SetAuth(this.m_Username, this.m_Password, this.StreamId);
+			
+			IqGrabber.SendIq(iq, new IqCB(OnAuthenticate), null);
+		}
+
+		/// <summary>
+		/// Refreshes the myJid Member Variable
+		/// </summary>
+		private Jid BuildMyJid()
+		{
+            Jid jid = new Jid(null);
+            
+            jid.m_User = m_Username;
+            jid.m_Server = Server;
+            jid.m_Resource = m_Resource;
+            
+            jid.BuildJid();
+
+            return jid;			
+		}
+
+		#region << RequestAgents >>
+		public void RequestAgents()
+		{			
+			AgentsIq iq = new AgentsIq(IqType.get, new Jid(base.Server));
+			IqGrabber.SendIq(iq, new IqCB(OnAgents), null);
+		}
+
+		private void OnAgents(object sender, IQ iq, object data)
+		{	
+			if (OnAgentStart != null)
+				OnAgentStart(this);
+						
+			Agents agents = iq.Query as Agents;
+			if (agents != null)
+			{
+				foreach (Agent a in agents.GetAgents())
+				{
+					if (OnAgentItem != null)
+						OnAgentItem(this, a);				
+				}
+			}
+
+			if (OnAgentEnd != null)
+				OnAgentEnd(this);			
+		}
+		#endregion
+
+		#region << RequestRoster >>
+		public void RequestRoster()
+		{		
+			RosterIq iq = new RosterIq(IqType.get);
+			Send(iq);
+		}
+		
+		private void OnRosterIQ(IQ iq)
+		{			
+			// if type == result then it must be the "FullRoster" we requested
+			// in this case we raise OnRosterStart and OnRosterEnd
+			// 
+			// if type == set its a new added r updated rosteritem. Here we dont raise
+			// OnRosterStart and OnRosterEnd
+			if (iq.Type == IqType.result && OnRosterStart != null)
+				OnRosterStart(this);
+
+			Roster r = iq.Query as Roster;
+			if (r != null)
+			{
+				foreach (RosterItem i in r.GetRoster())
+				{
+					if (OnRosterItem != null)
+						OnRosterItem(this, i);
+				}
+			}
+
+            if (iq.Type == IqType.result && OnRosterEnd != null)            
+                OnRosterEnd(this);
+            
+            if (m_AutoPresence && iq.Type == IqType.result)
+                SendMyPresence();
+		}
+		#endregion       
+
+		private void OnAuthenticate(object sender, IQ iq, object data)
+		{			
+			if (iq.Type == IqType.result)
+			{
+                m_Authenticated = true;
+                RaiseOnLogin();                
+			}
+			else if(iq.Type == IqType.error)
+			{
+				/* 
+				 * <iq xmlns="jabber:client" id="agsXMPP_2" type="error">
+				 *		<query xmlns="jabber:iq:auth">
+				 *			<username>test</username>
+				 *			<digest sid="842070264">dc7e472abb95b65c2b75129ade607170be478b16</digest>
+				 *			<resource>MiniClient</resource>
+				 *		</query>
+				 *		<error code="401">Unauthorized</error>
+				 * </iq>
+				 * 
+				 */
+                if (OnAuthError!=null)
+					OnAuthError(this, iq);
+			}
+			
+		}
+
+		internal void FireOnAuthError(Element e)
+		{
+			if (OnAuthError!=null)
+				OnAuthError(this, e);
+		}
+        
+		#region << StreamParser Events >>
+		public override void StreamParserOnStreamStart(object sender, Node e)
+		{
+			base.StreamParserOnStreamStart(this, e);
+
+            m_StreamStarted = true;
+
+			//m_CleanUpDone = false; moved that to _Open();
+                            
+            protocol.Stream st = (protocol.Stream)e;
+            if (st == null)
+                return;
+
+            // Read the server language string
+            m_ServerLanguage = st.Language;               
+        
+
+			// Auth stuff
+			if (!RegisterAccount)
+			{
+				if (this.StreamVersion != null && this.StreamVersion.StartsWith("1."))
+				{
+					if (!Authenticated)
+					{
+						// we assume server supports SASL here, because it advertised a StreamVersion 1.X
+						// and wait for the stream features and initialize the SASL Handler
+                        InitSaslHandler();						
+					}				
+				}
+				else
+				{
+					// old auth stuff
+					RequestLoginInfo();
+				}
+			}
+			else
+			{
+                // Register on "old" jabber servers without stream features
+                if (this.StreamVersion == null)
+                    GetRegistrationFields(null);
+			}
+			
+		}
+
+        private void InitSaslHandler()
+        {
+            if (m_SaslHandler == null)
+            {
+                m_SaslHandler = new SaslHandler(this);
+                m_SaslHandler.OnSaslStart += new SaslEventHandler(m_SaslHandler_OnSaslStart);
+                m_SaslHandler.OnSaslEnd += new ObjectHandler(m_SaslHandler_OnSaslEnd);
+            }
+        }
+
+		public override void StreamParserOnStreamEnd(object sender, Node e)
+		{
+			base.StreamParserOnStreamEnd(sender, e);			
+			
+			if (!m_CleanUpDone)
+				CleanupSession();
+		}
+
+		public override void StreamParserOnStreamElement(object sender, Node e)
+		{
+			base.StreamParserOnStreamElement(sender, e);
+
+			if (e is IQ)
+			{
+				if (OnIq != null)
+					OnIq(this, e as IQ);
+					
+				IQ iq = e as IQ;
+				if ( iq != null && iq.Query != null)
+				{
+					// Roster
+                    if (iq.Query is Roster)
+                        OnRosterIQ(iq);                   
+				}	
+			}
+			else if (e is Message)
+			{
+				if (OnMessage != null)
+					OnMessage(this, e as Message);
+			}
+			else if (e is Presence)
+			{
+				if (OnPresence != null)
+					OnPresence(this, e as Presence);
+			}
+			else if (e is protocol.stream.Features)
+			{
+				// Stream Features
+				// StartTLS stuff
+				protocol.stream.Features f = e as protocol.stream.Features;
+#if SSL || BCCRYPTO || CF_2
+				if (f.SupportsStartTls && m_UseStartTLS)
+				{
+					DoChangeXmppConnectionState(XmppConnectionState.Securing);
+					Send(new StartTls());
+				}
+                else
+#endif
+                if (m_UseCompression &&
+                    f.SupportsCompression &&
+                    f.Compression.SupportsMethod(CompressionMethod.zlib))
+                {
+                    // Check for Stream Compression
+                    // we support only ZLIB because its a free algorithm without patents
+                    // yes ePatents suck                                       
+                    DoChangeXmppConnectionState(XmppConnectionState.StartCompression);
+                    Send(new Compress(CompressionMethod.zlib));                    
+                }
+
+                else if (m_RegisterAccount)
+                {
+                    // Do registration after TLS when possible
+                    if (f.SupportsRegistration)
+                        GetRegistrationFields(e);
+                    else
+                    {
+                        // registration is not enabled on this server                        
+                        FireOnError(this, new RegisterException("Registration is not allowed on this server"));
+                        Close();
+                        // Close the stream
+                    }
+                }
+                ServerCapabilities = f.Capabilities;
+            }
+#if SSL || BCCRYPTO || CF_2
+            else if (e is Proceed)
+			{	
+				StreamParser.Reset();	
+		        if (ClientSocket.StartTls())
+                {
+				    SendStreamHeader(false);
+				    DoChangeXmppConnectionState(XmppConnectionState.Authenticating);
+                }
+            }
+#endif
+            else if (e is Compressed)
+			{
+                //DoChangeXmppConnectionState(XmppConnectionState.StartCompression);
+				StreamParser.Reset();
+                ClientSocket.StartCompression();                
+                // Start new Stream Header compressed.
+                SendStreamHeader(false);
+
+                DoChangeXmppConnectionState(XmppConnectionState.Compressed);
+			}
+            else if (e is agsXMPP.protocol.Error)
+            {
+                if (OnStreamError != null)
+                    OnStreamError(this, e as Element);
+            }
+
+		}
+
+		public override void StreamParserOnStreamError(object sender, Exception ex)
+		{
+			base.StreamParserOnStreamError(sender, ex);
+
+			SocketDisconnect();
+			CleanupSession();
+			
+			//this._NetworkStream.Close();
+			
+			FireOnError(this, ex);
+
+            if (!m_CleanUpDone)
+                CleanupSession();           
+		}                
+        #endregion
+
+       
+
+        public override void Send(Element e)
+        {
+            if (!(ClientSocket is BoshClientSocket))
+            {
+                // this is a hack to not send the xmlns="jabber:client" with all packets
+                Element dummyEl = new Element("a");
+                dummyEl.Namespace = Uri.CLIENT;
+
+                dummyEl.AddChild(e);
+                string toSend = dummyEl.ToString();
+
+                Send(toSend.Substring(25, toSend.Length - 25 - 4));
+            }
+            else
+                base.Send(e);
+        }
+		
+		/// <summary>
+		/// Does the Clieanup of the Session and sends the OnClose Event
+		/// </summary>
+		private void CleanupSession()
+		{		
+			m_CleanUpDone = true;
+           
+            // TODO, check if this is always OK
+            if (ClientSocket.Connected)
+			    ClientSocket.Disconnect();
+			
+            DoChangeXmppConnectionState(XmppConnectionState.Disconnected);
+			
+			StreamParser.Reset();
+			
+			m_IqGrabber.Clear();
+			m_MessageGrabber.Clear();
+
+			if (m_SaslHandler != null)
+			{
+				m_SaslHandler.Dispose();
+				m_SaslHandler = null;
+			}
+
+			m_Authenticated		= false;
+			m_Binded			= false;
+
+			DestroyKeepAliveTimer();
+			
+			if (OnClose!=null)
+				OnClose(this);			
+		}
+
+		internal void Reset()
+		{
+            // tell also the socket that we need to reset the stream, this is needed for BOSH
+            ClientSocket.Reset();
+
+            StreamParser.Reset();
+            SendStreamHeader(false);        
+		}
+		
+		internal void DoRaiseEventBinded()
+		{
+			if (OnBinded!=null)
+				OnBinded(this);
+		}
+
+        internal void DoRaiseEventBindError(Element iq)
+        {
+            if (OnBindError != null)
+                OnBindError(this, iq);
+        }
+        
+		#region << SASL Handler Events >>
+		private void m_SaslHandler_OnSaslStart(object sender, SaslEventArgs args)
+		{
+			// This acts only as a tunnel to the client
+			if (OnSaslStart!=null)
+				OnSaslStart(this, args);
+		}
+
+		internal void RaiseOnLogin()
+		{
+            if (KeepAlive)
+                CreateKeepAliveTimer();
+                       
+			if (OnLogin!=null)
+				OnLogin(this);
+				
+			if(m_AutoAgents)
+				RequestAgents();
+				
+			if (m_AutoRoster)
+				RequestRoster();
+		}
+
+		private void m_SaslHandler_OnSaslEnd(object sender)
+		{
+			if (OnSaslEnd!=null)
+				OnSaslEnd(this);
+					
+			m_Authenticated = true;
+		}
+		#endregion        
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/XmppClientConnectionState.cs b/lib/agsxmpp/agsxmpp/XmppClientConnectionState.cs
new file mode 100644
index 0000000..35ffe6c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/XmppClientConnectionState.cs
@@ -0,0 +1,93 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP
+{
+    /// <summary>
+    /// Represents the current state of a XMPPConnection
+    /// </summary>
+    public enum XmppConnectionState
+    {
+        /// <summary>
+        /// Session is Disconnected
+        /// </summary>
+        Disconnected,
+
+        /// <summary>
+        /// The Socket is Connecting
+        /// </summary>
+        Connecting,
+
+        /// <summary>
+        /// The Socket is Connected
+        /// </summary>
+        Connected,
+        /// <summary>
+        /// The XMPP Session is authenticating
+        /// </summary>
+        Authenticating,
+        /// <summary>
+        /// The XMPP session is autrhenticated
+        /// </summary>
+        Authenticated,
+
+        /// <summary>
+        /// Resource Binding gets started
+        /// </summary>
+        Binding,
+
+        /// <summary>
+        /// Resource Binded with sucess
+        /// </summary>
+        Binded,
+
+        StartSession,
+
+        /// <summary>
+        /// Initialize Stream Compression
+        /// </summary>
+        StartCompression,
+        
+        /// <summary>
+        /// Stream is compressed now
+        /// </summary>
+        Compressed,
+
+        SessionStarted,
+
+        /// <summary>
+        /// We are switching from a normal connection to a secure SSL connection (StartTLS)
+        /// </summary>
+        Securing,
+
+        /// <summary>
+        /// started the progress to register a new account
+        /// </summary>
+        Registering,
+
+        /// <summary>
+        /// Account was registered successful
+        /// </summary>
+        Registered
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/XmppComponentConnection.cs b/lib/agsxmpp/agsxmpp/XmppComponentConnection.cs
new file mode 100644
index 0000000..8b2d274
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/XmppComponentConnection.cs
@@ -0,0 +1,362 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+using agsXMPP.Net;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol;
+using agsXMPP.protocol.component;
+
+
+namespace agsXMPP
+{
+	/// <summary>
+    /// <para>
+	/// use this class to write components that connect to a Jabebr/XMPP server
+    /// </para>
+    /// <para>
+    /// http://www.xmpp.org/extensions/xep-0114.html
+    /// </para>
+	/// </summary>
+	public class XmppComponentConnection : XmppConnection
+	{
+        // This route stuff is old undocumented jabberd(2) stuff. hopefully we can get rid of this one day
+        // or somebody writes up and XEP
+		public delegate void RouteHandler	(object sender, Route r);
+
+		private bool						m_CleanUpDone;
+        private bool						m_StreamStarted;
+        
+		#region << Constructors >>
+		/// <summary>
+		/// Creates a new Component Connection to a given server and port
+		/// </summary>
+		public XmppComponentConnection()
+		{
+            m_IqGrabber = new IqGrabber(this);
+		}
+
+		/// <summary>
+		/// Creates a new Component Connection to a given server and port
+		/// </summary>
+		/// <param name="server">host/ip of the listening server</param>
+		/// <param name="port">port the server listens for the connection</param>
+		public XmppComponentConnection(string server, int port) : this()
+		{		
+			base.Server		= server;
+			base.Port		= port;
+		}
+		
+		/// <summary>
+		/// Creates a new Component Connection to a given server, port and password (secret)
+		/// </summary>
+		/// <param name="server">host/ip of the listening server</param>
+		/// <param name="port">port the server listens for the connection</param>
+		/// <param name="password">password</param>
+		public XmppComponentConnection(string server, int port, string password) : this(server,port)
+		{		
+			this.Password	= password;
+		}
+		#endregion
+
+		#region << Properties and Member Variables >>
+		
+		private		string			m_Password			= null;		
+		private		bool			m_Authenticated		= false;		
+		private		Jid				m_ComponentJid		= null;
+        private     IqGrabber       m_IqGrabber         = null;        
+				
+		public string Password
+		{
+			get { return m_Password; }
+			set { m_Password = value; }
+		}
+		
+		/// <summary>
+		/// Are we Authenticated to the server? This is readonly and set by the library
+		/// </summary>
+		public bool Authenticated
+		{
+			get { return m_Authenticated; }				
+		}
+
+		/// <summary>
+		/// The Domain of the component.
+		/// <para>
+		/// eg: <c>jabber.ag-software.de</c>
+		/// </para>
+		/// </summary>		
+		public Jid ComponentJid
+		{
+			get { return m_ComponentJid; }
+			set { m_ComponentJid = value; }
+		}
+
+        public IqGrabber IqGrabber
+        {
+            get { return m_IqGrabber; }
+            set { m_IqGrabber = value; }
+        }
+		#endregion
+
+		#region << Events >>
+		// public event ErrorHandler			OnError;
+		
+		/// <summary>
+		/// connection is authenticated now and ready for receiving Route, Log and Xdb Packets
+		/// </summary>
+		public event ObjectHandler			OnLogin;
+
+		public event ObjectHandler			OnClose;
+		
+		/// <summary>
+		/// handler for incoming routet packtes from the server
+		/// </summary>
+		public event RouteHandler			OnRoute;
+        
+        /// <summary>
+        /// Event that occurs on authentication errors
+        /// e.g. wrong password, user doesnt exist etc...
+        /// </summary>
+        public event XmppElementHandler     OnAuthError;
+        
+        /// <summary>
+        /// Stream errors <stream:error/>
+        /// </summary>
+        public event XmppElementHandler     OnStreamError;
+
+        /// <summary>
+        /// Event occurs on Socket Errors
+        /// </summary>
+        public event ErrorHandler           OnSocketError;
+
+        /// <summary>
+        /// 
+        /// </summary>        
+        public event IqHandler              OnIq;
+
+        /// <summary>
+        /// We received a message. This could be a chat message, headline, normal message or a groupchat message. 
+        /// There are also XMPP extension which are embedded in messages. 
+        /// e.g. X-Data forms.
+        /// </summary>
+        public event MessageHandler         OnMessage;
+
+        /// <summary>
+        /// We received a presence from a contact or chatroom.
+        /// Also subscriptions is handles in this event.
+        /// </summary>
+        public event PresenceHandler        OnPresence;
+
+		#endregion
+
+		public void Open()
+		{
+			_Open();
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="server"></param>
+		/// <param name="port"></param>
+		public void Open(string server, int port)
+		{
+			this.Server	= server;
+			this.Port	= port;			
+			_Open();
+		}
+
+		private void _Open()
+		{
+            m_CleanUpDone   = false;
+            m_StreamStarted = false;
+
+            if (ConnectServer == null)
+                SocketConnect(base.Server, base.Port);
+            else
+                SocketConnect(this.ConnectServer, base.Port);	
+		}
+
+		private void SendOpenStream()
+		{	
+			// <stream:stream
+			// xmlns='jabber:component:accept'
+			// xmlns:stream='http://etherx.jabber.org/streams'
+			// to='shakespeare.lit'>
+			StringBuilder sb = new StringBuilder();
+			
+			//sb.Append("<?xml version='1.0'?>");
+			sb.Append("<stream:stream");			
+			
+			if (m_ComponentJid!=null)
+				sb.Append(" to='" + m_ComponentJid.ToString() + "'");
+			
+			sb.Append(" xmlns='" + Uri.ACCEPT + "'");
+			sb.Append(" xmlns:stream='" + Uri.STREAM + "'");			
+			
+			sb.Append(">");			
+			
+			Open(sb.ToString());
+		}
+
+		private void Login()
+		{			
+			// Send Handshake
+			Send( new Handshake(this.m_Password, this.StreamId) );
+		}
+
+		#region << Stream Parser events >>
+		public override void StreamParserOnStreamStart(object sender, Node e)
+		{
+			base.StreamParserOnStreamStart (sender, e);
+            
+            m_StreamStarted = true;
+			
+            Login();
+		}
+
+		public override void StreamParserOnStreamEnd(object sender, Node e)
+		{
+			base.StreamParserOnStreamEnd (sender, e);
+
+			if(!m_CleanUpDone)
+				CleanupSession();
+		}
+
+		public override void StreamParserOnStreamElement(object sender, Node e)
+		{
+			base.StreamParserOnStreamElement (sender, e);
+
+			if (e is Handshake)
+			{
+				m_Authenticated = true;
+                
+				if (OnLogin != null)
+					OnLogin(this);
+
+                if (KeepAlive)
+                    CreateKeepAliveTimer();
+			}
+			else if (e is Route)
+			{
+				if (OnRoute != null)
+					OnRoute(this, e as Route);
+			}
+            else if (e is protocol.Error)
+            {
+                protocol.Error streamErr = e as protocol.Error;
+                switch (streamErr.Condition)
+                {
+                    // Auth errors are important for the users here, so throw catch auth errors
+                    // in a separate event here
+                    case agsXMPP.protocol.StreamErrorCondition.NotAuthorized:
+                        // Authentication Error
+                        if (OnAuthError != null)
+                            OnAuthError(this, e as Element);
+                        break;
+                    default:
+                        if (OnStreamError != null)
+                            OnStreamError(this, e as Element);
+                        break;
+                }                
+            }
+            else if (e is Message)
+            {
+                if (OnMessage != null)
+                    OnMessage(this, e as Message);
+            }
+            else if (e is Presence)
+            {
+                if (OnPresence != null)
+                    OnPresence(this, e as Presence);
+            }
+            else if (e is IQ)
+            {
+                if (OnIq != null)
+                    OnIq(this, e as IQ);
+            }
+		
+		}
+               
+		private void m_StreamParser_OnStreamError(object sender, Exception ex)
+		{
+			if(!m_CleanUpDone)
+				CleanupSession();
+		}
+		#endregion
+
+		#region << ClientSocket Events >>
+		public override void SocketOnConnect(object sender)
+		{
+			base.SocketOnConnect (sender);
+
+			SendOpenStream();
+		}
+
+		public override void SocketOnDisconnect(object sender)
+		{
+			base.SocketOnDisconnect (sender);
+
+			if(!m_CleanUpDone)
+				CleanupSession();
+		}
+
+        public override void SocketOnError(object sender, Exception ex)
+        {
+            base.SocketOnError(sender, ex);
+        
+            if (m_StreamStarted && !m_CleanUpDone)
+                CleanupSession();            
+
+            if (OnSocketError != null)
+                OnSocketError(this, ex);
+                   
+        }
+		#endregion
+
+        public override void Send(Element e)
+        {
+            // this is a hack to not send the xmlns="jabber:component:accept" with all packets                
+            Element dummyEl = new Element("a");
+            dummyEl.Namespace = Uri.ACCEPT;
+
+            dummyEl.AddChild(e);
+            string toSend = dummyEl.ToString();
+                       
+            Send(toSend.Substring(35, toSend.Length - 35 - 4));
+        }
+
+		private void CleanupSession()
+		{
+            // This cleanup has only to be done if we were able to connect and teh XMPP Stream was started
+            DestroyKeepAliveTimer();			
+			m_CleanUpDone = true;
+			StreamParser.Reset();
+
+            m_IqGrabber.Clear();
+            
+			if (OnClose!=null)
+				OnClose(this);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/XmppConnection.cs b/lib/agsxmpp/agsxmpp/XmppConnection.cs
new file mode 100644
index 0000000..57cdf79
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/XmppConnection.cs
@@ -0,0 +1,455 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+using System.Threading;
+
+using agsXMPP.Net;
+using agsXMPP.protocol.extensions.bosh;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+using agsXMPP.Idn;
+
+namespace agsXMPP
+{
+	public delegate void XmlHandler			(object sender, string xml);
+    public delegate void ErrorHandler       (object sender, Exception ex);
+
+    public delegate void XmppConnectionStateHandler	(object sender, XmppConnectionState state);
+	/// <summary>
+	/// abstract base class XmppConnection.
+	/// </summary>
+	public abstract class XmppConnection
+	{	
+
+        private Timer m_KeepaliveTimer = null;
+
+		#region << Events >>
+		/// <summary>
+		/// This event just informs about the current state of the XmppConnection
+		/// </summary>
+		public event XmppConnectionStateHandler OnXmppConnectionStateChanged;
+		
+		/// <summary>
+		/// a XML packet or text is received. 
+		/// This are no winsock events. The Events get generated from the XML parser
+		/// </summary>
+		public event XmlHandler					OnReadXml;		
+		/// <summary>
+		/// XML or Text is written to the Socket this includes also the keep alive packages (a single space)		
+		/// </summary>
+		public event XmlHandler					OnWriteXml;
+
+        public event ErrorHandler               OnError;
+
+        /// <summary>
+        /// Data received from the Socket
+        /// </summary>
+        public event BaseSocket.OnSocketDataHandler OnReadSocketData;
+        
+        /// <summary>
+        /// Data was sent to the socket for sending
+        /// </summary>
+        public event BaseSocket.OnSocketDataHandler OnWriteSocketData;                      
+        
+		#endregion
+
+		#region << Constructors >>
+		public XmppConnection()
+		{
+			InitSocket();
+			// Streamparser stuff
+			m_StreamParser = new StreamParser();
+			
+            m_StreamParser.OnStreamStart		+= new StreamHandler(StreamParserOnStreamStart);
+			m_StreamParser.OnStreamEnd			+= new StreamHandler(StreamParserOnStreamEnd);
+			m_StreamParser.OnStreamElement		+= new StreamHandler(StreamParserOnStreamElement);
+			m_StreamParser.OnStreamError		+= new StreamError	(StreamParserOnStreamError);
+            m_StreamParser.OnError              += new ErrorHandler (StreamParserOnError);            
+		}
+        
+		public XmppConnection(agsXMPP.Net.SocketConnectionType type) : this()
+		{
+			m_SocketConnectionType = agsXMPP.Net.SocketConnectionType.Direct;
+		}
+		#endregion
+
+		#region << Properties and Member Variables >>
+		private		int						m_Port					    = 5222;
+		private		string					m_Server				    = null;
+		private		string					m_ConnectServer			    = null;
+		private		string					m_StreamId				    = "";
+		private		string					m_StreamVersion			    = "1.0";
+		private		XmppConnectionState		m_ConnectionState		    = XmppConnectionState.Disconnected;		
+		private		BaseSocket				m_ClientSocket			    = null;
+		private		StreamParser			m_StreamParser			    = null;
+		private		SocketConnectionType	m_SocketConnectionType	    = SocketConnectionType.Direct;
+        private     bool                    m_AutoResolveConnectServer  = true;
+        private     int                     m_KeepAliveInterval         = 120;
+        private     bool                    m_KeepAlive                 = true;
+		/// <summary>
+		/// The Port of the remote server for the connection
+		/// </summary>
+		public int Port
+		{
+			get	{ return m_Port; }
+			set { m_Port = value; }
+		}
+
+		/// <summary>
+		/// domain or ip-address of the remote server for the connection
+		/// </summary>
+		public string Server
+		{
+			get { return m_Server; }
+            set
+            {
+#if !STRINGPREP
+                if (value != null)
+				    m_Server = value.ToLower();
+                else
+                    m_Server = null;
+#else
+                if (value != null)
+                    m_Server = Stringprep.NamePrep(value);
+                else
+                    m_Server = null;
+#endif
+            }
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public string ConnectServer
+		{
+			get { return m_ConnectServer; }
+			set { m_ConnectServer = value; }		
+		}
+		
+		/// <summary>
+		/// the id of the current xmpp xml-stream
+		/// </summary>
+		public string StreamId
+		{
+			get { return m_StreamId;  }	
+			set { m_StreamId = value; }
+		}
+
+		/// <summary>
+		/// Set to null for old Jabber Protocol without SASL andstream features
+		/// </summary>
+		public string StreamVersion
+		{
+			get { return m_StreamVersion; }
+			set { m_StreamVersion = value; }
+		}
+
+		public XmppConnectionState XmppConnectionState
+		{
+			get { return m_ConnectionState; }
+		}
+		
+		/// <summary>
+		/// Read Online Property ClientSocket
+		/// returns the SOcket object used for this connection
+		/// </summary>
+		public BaseSocket ClientSocket
+		{
+			get { return m_ClientSocket; }
+		}
+
+        /// <summary>
+        /// the underlaying XMPP StreamParser. Normally you don't need it, but we make it accessible for
+        /// low level access to the stream
+        /// </summary>
+		public StreamParser StreamParser
+		{
+			get { return m_StreamParser; }
+		}
+
+		public SocketConnectionType SocketConnectionType
+		{
+			get { return m_SocketConnectionType; }
+			set 
+			{
+				m_SocketConnectionType = value;
+				InitSocket();
+			}
+		}
+
+        public bool AutoResolveConnectServer
+        {
+            get { return m_AutoResolveConnectServer; }
+            set { m_AutoResolveConnectServer = value; }
+        }
+
+        /// <summary>
+        /// <para>
+        /// the keep alive interval in seconds.
+        /// Default value is 120
+        /// </para>
+        /// <para>
+        /// Keep alive packets prevent disconenct on NAT and broadband connections which often
+        /// disconnect if they are idle.
+        /// </para>
+        /// </summary>
+        public int KeepAliveInterval
+        {
+            get
+            {
+                return m_KeepAliveInterval;
+            }
+            set
+            {
+                m_KeepAliveInterval = value;
+            }
+        }
+        /// <summary>
+        /// Send Keep Alives (for NAT)
+        /// </summary>
+        public bool KeepAlive
+        {
+            get
+            {
+                return m_KeepAlive;
+            }
+            set
+            {
+                m_KeepAlive = value;
+            }
+        }
+		#endregion
+
+		#region << Socket handers >>
+		public virtual void SocketOnConnect(object sender)
+		{
+			DoChangeXmppConnectionState(XmppConnectionState.Connected);
+		}
+
+		public virtual void SocketOnDisconnect(object sender)
+		{
+			
+		}
+        
+		public virtual void SocketOnReceive(object sender, byte[] data, int count)
+		{
+            
+            if (OnReadSocketData != null)
+                OnReadSocketData(sender, data, count);         
+			
+            // put the received bytes to the parser
+            lock (this)
+            {
+                StreamParser.Push(data, 0, count);
+			}
+		}
+
+        public virtual void SocketOnError(object sender, Exception ex)
+        {
+   
+        }
+		#endregion
+
+		#region << StreamParser Events >>
+		public virtual void StreamParserOnStreamStart		(object sender, Node e)
+		{            
+            string xml = e.ToString().Trim();
+            xml = xml.Substring(0, xml.Length - 2) + ">";
+
+            this.FireOnReadXml(this, xml);
+
+            protocol.Stream st = (protocol.Stream)e;
+            if (st != null)
+            {
+                m_StreamId = st.StreamId;
+                m_StreamVersion = st.Version;
+            }        
+		}
+
+		public virtual void StreamParserOnStreamEnd			(object sender, Node e)
+		{
+            Element tag = e as Element;
+			
+			string qName;
+			if (tag.Prefix == null)
+				qName = tag.TagName;
+			else
+				qName = tag.Prefix + ":" + tag.TagName;
+
+			string xml = "</" + qName + ">";
+
+			this.FireOnReadXml(this, xml);
+		}
+
+		public virtual  void StreamParserOnStreamElement	(object sender, Node e)
+		{
+			this.FireOnReadXml(this, e.ToString());
+		}
+		public virtual void StreamParserOnStreamError		(object sender, Exception ex)
+		{
+		}
+        public virtual void StreamParserOnError             (object sender, Exception ex)
+        {
+            FireOnError(sender, ex);
+        }
+		#endregion
+
+		internal void DoChangeXmppConnectionState(XmppConnectionState state)
+		{
+			m_ConnectionState = state;
+			
+			if (OnXmppConnectionStateChanged!=null)
+				OnXmppConnectionStateChanged(this, state);
+		}
+
+		private void InitSocket()
+		{
+            if (m_ClientSocket != null) {
+                m_ClientSocket.OnConnect    -= SocketOnConnect;
+                m_ClientSocket.OnDisconnect -= SocketOnDisconnect;
+                m_ClientSocket.OnReceive    -= SocketOnReceive;
+                m_ClientSocket.OnError      -= SocketOnError;
+            }
+			m_ClientSocket = null;
+
+			// Socket Stuff
+			if (m_SocketConnectionType == agsXMPP.Net.SocketConnectionType.HttpPolling)
+				m_ClientSocket= new PollClientSocket();            
+            else if (m_SocketConnectionType == agsXMPP.Net.SocketConnectionType.Bosh)
+                m_ClientSocket = new BoshClientSocket(this);
+            else
+                m_ClientSocket = new ClientSocket();
+		
+            m_ClientSocket.OnConnect    += SocketOnConnect;
+            m_ClientSocket.OnDisconnect += SocketOnDisconnect;
+            m_ClientSocket.OnReceive    += SocketOnReceive;
+            m_ClientSocket.OnError      += SocketOnError;
+		}        
+
+		/// <summary>
+		/// Starts connecting of the socket
+		/// </summary>
+		public virtual void SocketConnect()
+		{
+			DoChangeXmppConnectionState(XmppConnectionState.Connecting);
+			ClientSocket.Connect();
+		}
+		
+		public void SocketConnect(string server, int port)
+		{	
+			ClientSocket.Address	= server;
+			ClientSocket.Port		= port;
+			SocketConnect();				
+		}
+
+		public void SocketDisconnect()
+		{
+			m_ClientSocket.Disconnect();
+		}
+
+		/// <summary>
+		/// Send a xml string over the XmppConnection
+		/// </summary>
+		/// <param name="xml"></param>
+		public void Send(string xml)
+		{
+            FireOnWriteXml(this, xml);
+			m_ClientSocket.Send(xml);
+
+            if (OnWriteSocketData != null)
+                OnWriteSocketData(this, Encoding.UTF8.GetBytes(xml), xml.Length);
+
+            // reset keep alive timer if active to make sure the interval is always idle time from the last 
+            // outgoing packet
+            if (m_KeepAlive && m_KeepaliveTimer != null)
+                m_KeepaliveTimer.Change(m_KeepAliveInterval * 1000, m_KeepAliveInterval * 1000);
+		}
+
+		/// <summary>
+		/// Send a xml element over the XmppConnection
+		/// </summary>
+		/// <param name="e"></param>
+		public virtual void Send(Element e)
+		{
+			Send(e.ToString());
+		}
+
+		public void Open(string xml)
+		{
+			Send(xml);			
+		}
+
+		/// <summary>
+		/// Send the end of stream
+		/// </summary>
+		public virtual void Close()
+		{
+			Send("</stream:stream>");
+		}
+        		
+		protected void FireOnReadXml(object sender, string xml)
+		{
+			if (OnReadXml != null)
+				OnReadXml(sender, xml);
+		} 
+
+		protected void FireOnWriteXml(object sender, string xml)
+		{
+			if (OnWriteXml != null)
+				OnWriteXml(sender, xml);
+		}
+
+        protected void FireOnError(object sender, Exception ex)
+        {
+            if (OnError != null)
+                OnError(sender, ex);
+        }
+
+        #region << Keepalive Timer functions >>
+        protected void CreateKeepAliveTimer()
+        {
+            // Create the delegate that invokes methods for the timer.
+            TimerCallback timerDelegate = new TimerCallback(KeepAliveTick);
+            int interval = m_KeepAliveInterval * 1000;
+            // Create a timer that waits x seconds, then invokes every x seconds.
+            m_KeepaliveTimer = new Timer(timerDelegate, null, interval, interval);
+        }
+
+        protected void DestroyKeepAliveTimer()
+        {
+            if (m_KeepaliveTimer == null)
+                return;
+
+            m_KeepaliveTimer.Dispose();
+            m_KeepaliveTimer = null;
+        }
+
+        private void KeepAliveTick(Object state)
+        {
+            // Send a Space for Keep Alive
+            Send(" ");
+        }
+        #endregion
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/agsxmpp.csproj b/lib/agsxmpp/agsxmpp/agsxmpp.csproj
new file mode 100644
index 0000000..aeb1956
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/agsxmpp.csproj
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C6379274-C5DE-41A2-AE3E-753F85A557BA}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>agsxmpp</RootNamespace>
+    <AssemblyName>agsxmpp</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>TRACE;DEBUG;SSL;STRINGPREP</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <DefineConstants>TRACE;DEBUG;SSL;STRINGPREP</DefineConstants>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Sasl\ExtendedData.cs" />
+    <Compile Include="Sasl\Mechanism.cs" />
+    <Compile Include="Sasl\SaslEventArgs.cs" />
+    <Compile Include="Sasl\SaslHandler.cs" />
+    <Compile Include="Sasl\Anonymous\AnonymousMechanism.cs" />
+    <Compile Include="Sasl\DigestMD5\DigestMD5Mechanism.cs" />
+    <Compile Include="Sasl\DigestMD5\Step1.cs" />
+    <Compile Include="Sasl\DigestMD5\Step2.cs" />
+    <Compile Include="Sasl\Facebook\FacebookExtendedData.cs" />
+    <Compile Include="Sasl\Facebook\FacebookMechanism.cs" />
+    <Compile Include="Sasl\Gssapi\GssapiMechanism.cs" />
+    <Compile Include="Sasl\Gssapi\SSPIHelper.cs" />
+    <Compile Include="Sasl\Plain\PlainMechanism.cs" />
+    <Compile Include="Sasl\Scram\ScramSha1Mechanism.cs" />
+    <Compile Include="Sasl\XGoogleToken\XGoogleTokenMechanism.cs" />
+    <Compile Include="Collections\BareJidComparer.cs" />
+    <Compile Include="Collections\FullJidComparer.cs" />
+    <Compile Include="Exceptions\JidException.cs" />
+    <Compile Include="Exceptions\RegisterException.cs" />
+    <Compile Include="Exceptions\XmlRpcException.cs" />
+    <Compile Include="Factory\ElementFactory.cs" />
+    <Compile Include="Factory\ElementType.cs" />
+    <Compile Include="Factory\SaslFactory.cs" />
+    <Compile Include="Idn\CombiningClass.cs" />
+    <Compile Include="Idn\Composition.cs" />
+    <Compile Include="Idn\DecompositionKeys.cs" />
+    <Compile Include="Idn\DecompositionMappings.cs" />
+    <Compile Include="Idn\IDNA.cs" />
+    <Compile Include="Idn\IDNAException.cs" />
+    <Compile Include="Idn\NFKC.cs" />
+    <Compile Include="Idn\Punycode.cs" />
+    <Compile Include="Idn\PunycodeException.cs" />
+    <Compile Include="Idn\RFC3454.cs" />
+    <Compile Include="Idn\Stringprep.cs" />
+    <Compile Include="Idn\StringprepException.cs" />
+    <Compile Include="IO\StringWriterWithEncoding.cs" />
+    <Compile Include="IO\Compression\Deflater.cs" />
+    <Compile Include="IO\Compression\DeflaterConstants.cs" />
+    <Compile Include="IO\Compression\DeflaterEngine.cs" />
+    <Compile Include="IO\Compression\DeflaterHuffman.cs" />
+    <Compile Include="IO\Compression\DeflaterPending.cs" />
+    <Compile Include="IO\Compression\Inflater.cs" />
+    <Compile Include="IO\Compression\InflaterDynHeader.cs" />
+    <Compile Include="IO\Compression\InflaterHuffmanTree.cs" />
+    <Compile Include="IO\Compression\PendingBuffer.cs" />
+    <Compile Include="IO\Compression\SharpZipBaseException.cs" />
+    <Compile Include="IO\Compression\Checksums\Adler32.cs" />
+    <Compile Include="IO\Compression\Checksums\IChecksum.cs" />
+    <Compile Include="IO\Compression\Streams\OutputWindow.cs" />
+    <Compile Include="IO\Compression\Streams\StreamManipulator.cs" />
+    <Compile Include="Net\BaseSocket.cs" />
+    <Compile Include="Net\BoshClientSocket.cs" />
+    <Compile Include="Net\CertificateVerifier.cs" />
+    <Compile Include="Net\ClientSocket.cs" />
+    <Compile Include="Net\PollClientSocket.cs" />
+    <Compile Include="Net\PollingSocketException.cs" />
+    <Compile Include="Net\SocketConnectionType.cs" />
+    <Compile Include="Net\SslStream.cs" />
+    <Compile Include="Net\SynchronousAsyncResult.cs" />
+    <Compile Include="Net\Dns\Enums.cs" />
+    <Compile Include="Net\Dns\IPConfigurationInformation.cs" />
+    <Compile Include="Net\Dns\InvalidResponseException.cs" />
+    <Compile Include="Net\Dns\NoResponseException.cs" />
+    <Compile Include="Net\Dns\Pointer.cs" />
+    <Compile Include="Net\Dns\Question.cs" />
+    <Compile Include="Net\Dns\RecordBase.cs" />
+    <Compile Include="Net\Dns\Request.cs" />
+    <Compile Include="Net\Dns\Resolver.cs" />
+    <Compile Include="Net\Dns\ResourceRecord.cs" />
+    <Compile Include="Net\Dns\Response.cs" />
+    <Compile Include="Net\Dns\SRVRecord.cs" />
+    <Compile Include="protocol\Error.cs" />
+    <Compile Include="protocol\Stream.cs" />
+    <Compile Include="protocol\Base\Avatar.cs" />
+    <Compile Include="protocol\Base\DirectionalElement.cs" />
+    <Compile Include="protocol\Base\Group.cs" />
+    <Compile Include="protocol\Base\Item.cs" />
+    <Compile Include="protocol\Base\RosterItem.cs" />
+    <Compile Include="protocol\Base\Stanza.cs" />
+    <Compile Include="protocol\Base\Stream.cs" />
+    <Compile Include="protocol\Time\Time.cs" />
+    <Compile Include="protocol\client\Error.cs" />
+    <Compile Include="protocol\client\Handler.cs" />
+    <Compile Include="protocol\client\IQ.cs" />
+    <Compile Include="protocol\client\Message.cs" />
+    <Compile Include="protocol\client\MessageType.cs" />
+    <Compile Include="protocol\client\Presence.cs" />
+    <Compile Include="protocol\client\PresenceManager.cs" />
+    <Compile Include="protocol\client\PresenceType.cs" />
+    <Compile Include="protocol\client\ShowType.cs" />
+    <Compile Include="protocol\component\Error.cs" />
+    <Compile Include="protocol\component\Handler.cs" />
+    <Compile Include="protocol\component\Handshake.cs" />
+    <Compile Include="protocol\component\IQ.cs" />
+    <Compile Include="protocol\component\Log.cs" />
+    <Compile Include="protocol\component\Message.cs" />
+    <Compile Include="protocol\component\Presence.cs" />
+    <Compile Include="protocol\component\Route.cs" />
+    <Compile Include="protocol\extensions\amp\Action.cs" />
+    <Compile Include="protocol\extensions\amp\Amp.cs" />
+    <Compile Include="protocol\extensions\amp\Condition.cs" />
+    <Compile Include="protocol\extensions\amp\Rule.cs" />
+    <Compile Include="protocol\extensions\bookmarks\BookmarkManager.cs" />
+    <Compile Include="protocol\extensions\bookmarks\Conference.cs" />
+    <Compile Include="protocol\extensions\bookmarks\RosterNote.cs" />
+    <Compile Include="protocol\extensions\bookmarks\RosterNotes.cs" />
+    <Compile Include="protocol\extensions\bookmarks\Storage.cs" />
+    <Compile Include="protocol\extensions\bookmarks\StorageIq.cs" />
+    <Compile Include="protocol\extensions\bookmarks\Url.cs" />
+    <Compile Include="protocol\extensions\bosh\Body.cs" />
+    <Compile Include="protocol\extensions\bosh\BoshType.cs" />
+    <Compile Include="protocol\extensions\bytestreams\Activate.cs" />
+    <Compile Include="protocol\extensions\bytestreams\ByteStream.cs" />
+    <Compile Include="protocol\extensions\bytestreams\ByteStreamIq.cs" />
+    <Compile Include="protocol\extensions\bytestreams\Mode.cs" />
+    <Compile Include="protocol\extensions\bytestreams\StreamHost.cs" />
+    <Compile Include="protocol\extensions\bytestreams\StreamHostUsed.cs" />
+    <Compile Include="protocol\extensions\bytestreams\UdpSuccess.cs" />
+    <Compile Include="protocol\extensions\caps\Capabilities.cs" />
+    <Compile Include="protocol\extensions\chatstates\Active.cs" />
+    <Compile Include="protocol\extensions\chatstates\Chatstate.cs" />
+    <Compile Include="protocol\extensions\chatstates\Composing.cs" />
+    <Compile Include="protocol\extensions\chatstates\Gone.cs" />
+    <Compile Include="protocol\extensions\chatstates\Inactive.cs" />
+    <Compile Include="protocol\extensions\chatstates\Paused.cs" />
+    <Compile Include="protocol\extensions\commands\Action.cs" />
+    <Compile Include="protocol\extensions\commands\Actions.cs" />
+    <Compile Include="protocol\extensions\commands\Command.cs" />
+    <Compile Include="protocol\extensions\commands\Note.cs" />
+    <Compile Include="protocol\extensions\commands\NoteType.cs" />
+    <Compile Include="protocol\extensions\commands\Status.cs" />
+    <Compile Include="protocol\extensions\compression\Compress.cs" />
+    <Compile Include="protocol\extensions\compression\Compressed.cs" />
+    <Compile Include="protocol\extensions\compression\CompressionMethod.cs" />
+    <Compile Include="protocol\extensions\compression\Failure.cs" />
+    <Compile Include="protocol\extensions\featureneg\FeatureNeg.cs" />
+    <Compile Include="protocol\extensions\featureneg\FeatureNegIq.cs" />
+    <Compile Include="protocol\extensions\filetransfer\File.cs" />
+    <Compile Include="protocol\extensions\filetransfer\Range.cs" />
+    <Compile Include="protocol\extensions\geoloc\GeoLoc.cs" />
+    <Compile Include="protocol\extensions\geoloc\GeoLocIq.cs" />
+    <Compile Include="protocol\extensions\html\Body.cs" />
+    <Compile Include="protocol\extensions\html\Html.cs" />
+    <Compile Include="protocol\extensions\ibb\Base.cs" />
+    <Compile Include="protocol\extensions\ibb\Close.cs" />
+    <Compile Include="protocol\extensions\ibb\Data.cs" />
+    <Compile Include="protocol\extensions\ibb\Open.cs" />
+    <Compile Include="protocol\extensions\jivesoftware\phone\ActionType.cs" />
+    <Compile Include="protocol\extensions\jivesoftware\phone\PhoneAction.cs" />
+    <Compile Include="protocol\extensions\jivesoftware\phone\PhoneEvent.cs" />
+    <Compile Include="protocol\extensions\jivesoftware\phone\PhoneStatus.cs" />
+    <Compile Include="protocol\extensions\jivesoftware\phone\PhoneStatusType.cs" />
+    <Compile Include="protocol\extensions\msgreceipts\Received.cs" />
+    <Compile Include="protocol\extensions\msgreceipts\Request.cs" />
+    <Compile Include="protocol\extensions\nickname\Nickname.cs" />
+    <Compile Include="protocol\extensions\ping\Ping.cs" />
+    <Compile Include="protocol\extensions\ping\PingIq.cs" />
+    <Compile Include="protocol\extensions\primary\Primary.cs" />
+    <Compile Include="protocol\extensions\pubsub\Access.cs" />
+    <Compile Include="protocol\extensions\pubsub\Affiliation.cs" />
+    <Compile Include="protocol\extensions\pubsub\AffiliationType.cs" />
+    <Compile Include="protocol\extensions\pubsub\Affiliations.cs" />
+    <Compile Include="protocol\extensions\pubsub\Configure.cs" />
+    <Compile Include="protocol\extensions\pubsub\Create.cs" />
+    <Compile Include="protocol\extensions\pubsub\Item.cs" />
+    <Compile Include="protocol\extensions\pubsub\Items.cs" />
+    <Compile Include="protocol\extensions\pubsub\Options.cs" />
+    <Compile Include="protocol\extensions\pubsub\PubSub.cs" />
+    <Compile Include="protocol\extensions\pubsub\PubSubAction.cs" />
+    <Compile Include="protocol\extensions\pubsub\PubSubIq.cs" />
+    <Compile Include="protocol\extensions\pubsub\PubSubManager.cs" />
+    <Compile Include="protocol\extensions\pubsub\Publish.cs" />
+    <Compile Include="protocol\extensions\pubsub\Retract.cs" />
+    <Compile Include="protocol\extensions\pubsub\Subscribe.cs" />
+    <Compile Include="protocol\extensions\pubsub\SubscribeOptions.cs" />
+    <Compile Include="protocol\extensions\pubsub\Subscription.cs" />
+    <Compile Include="protocol\extensions\pubsub\SubscriptionState.cs" />
+    <Compile Include="protocol\extensions\pubsub\Subscriptions.cs" />
+    <Compile Include="protocol\extensions\pubsub\Type.cs" />
+    <Compile Include="protocol\extensions\pubsub\Unsubscribe.cs" />
+    <Compile Include="protocol\extensions\pubsub\event\Delete.cs" />
+    <Compile Include="protocol\extensions\pubsub\event\Event.cs" />
+    <Compile Include="protocol\extensions\pubsub\event\Item.cs" />
+    <Compile Include="protocol\extensions\pubsub\event\Items.cs" />
+    <Compile Include="protocol\extensions\pubsub\event\Purge.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Affiliate.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Affiliates.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Configure.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Delete.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Pending.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\PubSub.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\PubSubIq.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Purge.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Subscriber.cs" />
+    <Compile Include="protocol\extensions\pubsub\owner\Subscribers.cs" />
+    <Compile Include="protocol\extensions\shim\Header.cs" />
+    <Compile Include="protocol\extensions\shim\Headers.cs" />
+    <Compile Include="protocol\extensions\si\SI.cs" />
+    <Compile Include="protocol\extensions\si\SIIq.cs" />
+    <Compile Include="protocol\iq\agent\Agent.cs" />
+    <Compile Include="protocol\iq\agent\Agents.cs" />
+    <Compile Include="protocol\iq\agent\AgentsIq.cs" />
+    <Compile Include="protocol\iq\auth\Auth.cs" />
+    <Compile Include="protocol\iq\auth\AuthIq.cs" />
+    <Compile Include="protocol\iq\avatar\Avatar.cs" />
+    <Compile Include="protocol\iq\avatar\AvatarIq.cs" />
+    <Compile Include="protocol\iq\bind\Bind.cs" />
+    <Compile Include="protocol\iq\bind\BindIq.cs" />
+    <Compile Include="protocol\iq\browse\Browse.cs" />
+    <Compile Include="protocol\iq\browse\BrowseIq.cs" />
+    <Compile Include="protocol\iq\browse\BrowseItem.cs" />
+    <Compile Include="protocol\iq\browse\Service.cs" />
+    <Compile Include="protocol\iq\disco\DiscoFeature.cs" />
+    <Compile Include="protocol\iq\disco\DiscoIdentity.cs" />
+    <Compile Include="protocol\iq\disco\DiscoInfo.cs" />
+    <Compile Include="protocol\iq\disco\DiscoInfoIq.cs" />
+    <Compile Include="protocol\iq\disco\DiscoItem.cs" />
+    <Compile Include="protocol\iq\disco\DiscoItems.cs" />
+    <Compile Include="protocol\iq\disco\DiscoItemsIq.cs" />
+    <Compile Include="protocol\iq\disco\DiscoManager.cs" />
+    <Compile Include="protocol\iq\disco\Features.cs" />
+    <Compile Include="protocol\iq\last\Last.cs" />
+    <Compile Include="protocol\iq\last\LastIq.cs" />
+    <Compile Include="protocol\iq\oob\Oob.cs" />
+    <Compile Include="protocol\iq\oob\OobIq.cs" />
+    <Compile Include="protocol\iq\privacy\Action.cs" />
+    <Compile Include="protocol\iq\privacy\Active.cs" />
+    <Compile Include="protocol\iq\privacy\Default.cs" />
+    <Compile Include="protocol\iq\privacy\Item.cs" />
+    <Compile Include="protocol\iq\privacy\List.cs" />
+    <Compile Include="protocol\iq\privacy\Privacy.cs" />
+    <Compile Include="protocol\iq\privacy\PrivacyIq.cs" />
+    <Compile Include="protocol\iq\privacy\PrivacyManager.cs" />
+    <Compile Include="protocol\iq\privacy\RuleManager.cs" />
+    <Compile Include="protocol\iq\privacy\Stanza.cs" />
+    <Compile Include="protocol\iq\privacy\Type.cs" />
+    <Compile Include="protocol\iq\private\Private.cs" />
+    <Compile Include="protocol\iq\private\PrivateIq.cs" />
+    <Compile Include="protocol\iq\register\Register.cs" />
+    <Compile Include="protocol\iq\register\RegisterEventArgs.cs" />
+    <Compile Include="protocol\iq\register\RegisterIq.cs" />
+    <Compile Include="protocol\iq\roster\Delimiter.cs" />
+    <Compile Include="protocol\iq\roster\Roster.cs" />
+    <Compile Include="protocol\iq\roster\RosterIq.cs" />
+    <Compile Include="protocol\iq\roster\RosterItem.cs" />
+    <Compile Include="protocol\iq\roster\RosterManager.cs" />
+    <Compile Include="protocol\iq\rpc\MethodCall.cs" />
+    <Compile Include="protocol\iq\rpc\MethodResponse.cs" />
+    <Compile Include="protocol\iq\rpc\Rpc.cs" />
+    <Compile Include="protocol\iq\rpc\RpcHelper.cs" />
+    <Compile Include="protocol\iq\rpc\RpcIq.cs" />
+    <Compile Include="protocol\iq\search\Search.cs" />
+    <Compile Include="protocol\iq\search\SearchIq.cs" />
+    <Compile Include="protocol\iq\search\SearchItem.cs" />
+    <Compile Include="protocol\iq\session\Session.cs" />
+    <Compile Include="protocol\iq\session\SessionIq.cs" />
+    <Compile Include="protocol\iq\time\Time.cs" />
+    <Compile Include="protocol\iq\time\TimeIq.cs" />
+    <Compile Include="protocol\iq\vcard\Address.cs" />
+    <Compile Include="protocol\iq\vcard\Email.cs" />
+    <Compile Include="protocol\iq\vcard\Name.cs" />
+    <Compile Include="protocol\iq\vcard\Organization.cs" />
+    <Compile Include="protocol\iq\vcard\Photo.cs" />
+    <Compile Include="protocol\iq\vcard\Telephone.cs" />
+    <Compile Include="protocol\iq\vcard\Vcard.cs" />
+    <Compile Include="protocol\iq\vcard\VcardIq.cs" />
+    <Compile Include="protocol\iq\version\Version.cs" />
+    <Compile Include="protocol\iq\version\VersionIq.cs" />
+    <Compile Include="protocol\sasl\Abort.cs" />
+    <Compile Include="protocol\sasl\Auth.cs" />
+    <Compile Include="protocol\sasl\Challenge.cs" />
+    <Compile Include="protocol\sasl\Failure.cs" />
+    <Compile Include="protocol\sasl\FailureCondition.cs" />
+    <Compile Include="protocol\sasl\Mechanism.cs" />
+    <Compile Include="protocol\sasl\Mechanisms.cs" />
+    <Compile Include="protocol\sasl\Response.cs" />
+    <Compile Include="protocol\sasl\Success.cs" />
+    <Compile Include="protocol\server\Presence.cs" />
+    <Compile Include="protocol\storage\Avatar.cs" />
+    <Compile Include="protocol\storage\AvatarIq.cs" />
+    <Compile Include="protocol\stream\Features.cs" />
+    <Compile Include="protocol\stream\feature\Register.cs" />
+    <Compile Include="protocol\stream\feature\compression\Compression.cs" />
+    <Compile Include="protocol\stream\feature\compression\Method.cs" />
+    <Compile Include="protocol\tls\Failure.cs" />
+    <Compile Include="protocol\tls\Proceed.cs" />
+    <Compile Include="protocol\tls\StartTls.cs" />
+    <Compile Include="protocol\x\Avatar.cs" />
+    <Compile Include="protocol\x\Conference.cs" />
+    <Compile Include="protocol\x\Delay.cs" />
+    <Compile Include="protocol\x\Event.cs" />
+    <Compile Include="protocol\x\data\Data.cs" />
+    <Compile Include="protocol\x\data\Field.cs" />
+    <Compile Include="protocol\x\data\FieldContainer.cs" />
+    <Compile Include="protocol\x\data\FieldTypes.cs" />
+    <Compile Include="protocol\x\data\Item.cs" />
+    <Compile Include="protocol\x\data\Option.cs" />
+    <Compile Include="protocol\x\data\Reported.cs" />
+    <Compile Include="protocol\x\data\Value.cs" />
+    <Compile Include="protocol\x\muc\Actor.cs" />
+    <Compile Include="protocol\x\muc\Affiliation.cs" />
+    <Compile Include="protocol\x\muc\Decline.cs" />
+    <Compile Include="protocol\x\muc\Destroy.cs" />
+    <Compile Include="protocol\x\muc\History.cs" />
+    <Compile Include="protocol\x\muc\Invitation.cs" />
+    <Compile Include="protocol\x\muc\Invite.cs" />
+    <Compile Include="protocol\x\muc\Item.cs" />
+    <Compile Include="protocol\x\muc\Muc.cs" />
+    <Compile Include="protocol\x\muc\MucManager.cs" />
+    <Compile Include="protocol\x\muc\Role.cs" />
+    <Compile Include="protocol\x\muc\Status.cs" />
+    <Compile Include="protocol\x\muc\StatusCode.cs" />
+    <Compile Include="protocol\x\muc\User.cs" />
+    <Compile Include="protocol\x\muc\iq\admin\Admin.cs" />
+    <Compile Include="protocol\x\muc\iq\admin\AdminIq.cs" />
+    <Compile Include="protocol\x\muc\iq\admin\Item.cs" />
+    <Compile Include="protocol\x\muc\iq\owner\Owner.cs" />
+    <Compile Include="protocol\x\muc\iq\owner\OwnerIq.cs" />
+    <Compile Include="protocol\x\muc\owner\Destroy.cs" />
+    <Compile Include="protocol\x\muc\user\Destroy.cs" />
+    <Compile Include="protocol\x\rosterx\RosterItem.cs" />
+    <Compile Include="protocol\x\rosterx\RosterX.cs" />
+    <Compile Include="protocol\x\vcard_update\VcardUpdate.cs" />
+    <Compile Include="Xml\StreamParser.cs" />
+    <Compile Include="Xml\Dom\CData.cs" />
+    <Compile Include="Xml\Dom\Comment.cs" />
+    <Compile Include="Xml\Dom\Document.cs" />
+    <Compile Include="Xml\Dom\DomLoader.cs" />
+    <Compile Include="Xml\Dom\Element.cs" />
+    <Compile Include="Xml\Dom\ElementList.cs" />
+    <Compile Include="Xml\Dom\Node.cs" />
+    <Compile Include="Xml\Dom\NodeList.cs" />
+    <Compile Include="Xml\Dom\Text.cs" />
+    <Compile Include="Xml\Xpnet\BufferAggregate.cs" />
+    <Compile Include="Xml\Xpnet\ContentToken.cs" />
+    <Compile Include="Xml\Xpnet\Encoding.cs" />
+    <Compile Include="Xml\Xpnet\Exceptions.cs" />
+    <Compile Include="Xml\Xpnet\NS.cs" />
+    <Compile Include="Xml\Xpnet\NamespaceStack.cs" />
+    <Compile Include="Xml\Xpnet\Position.cs" />
+    <Compile Include="Xml\Xpnet\Token.cs" />
+    <Compile Include="Xml\Xpnet\UTF8Encoding.cs" />
+    <Compile Include="Util\Date.cs" />
+    <Compile Include="Util\Enum.cs" />
+    <Compile Include="Util\Exceptions.cs" />
+    <Compile Include="Util\Hash.cs" />
+    <Compile Include="Util\RNGCryptoServiceProvider.cs" />
+    <Compile Include="Util\RandomNumberGenerator.cs" />
+    <Compile Include="Util\Runtime.cs" />
+    <Compile Include="Util\WinCeApi.cs" />
+    <Compile Include="Id.cs" />
+    <Compile Include="IqGrabber.cs" />
+    <Compile Include="Jid.cs" />
+    <Compile Include="MessageGrabber.cs" />
+    <Compile Include="PacketGrabber.cs" />
+    <Compile Include="PresenceGrabber.cs" />
+    <Compile Include="Uri.cs" />
+    <Compile Include="XmppClientConnection.cs" />
+    <Compile Include="XmppClientConnectionState.cs" />
+    <Compile Include="XmppComponentConnection.cs" />
+    <Compile Include="XmppConnection.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Xml\Xpnet\copying.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\StarkSoftProxy\StarkSoftProxy.csproj">
+      <Project>{3F8CF2C1-EA37-444F-8693-A3A00B1131D2}</Project>
+      <Name>StarkSoftProxy</Name>
+    </ProjectReference>
+    <ProjectReference Include="starksoftproxy\StarkSoftProxy.csproj">
+      <Project>{3F8CF2C1-EA37-444F-8693-A3A00B1131D2}</Project>
+      <Name>StarkSoftProxy</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/Avatar.cs b/lib/agsxmpp/agsxmpp/protocol/Base/Avatar.cs
new file mode 100644
index 0000000..8cf5ecc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/Avatar.cs
@@ -0,0 +1,73 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.Base
+{
+	// Avatar is in multiple Namespaces. So better to work with a Base class
+
+	/// <summary>
+	/// Summary description for Avatar.
+	/// </summary>
+	public class Avatar : Element
+	{		
+		public Avatar()
+		{
+			this.TagName	= "query";				
+		}
+
+		public byte[] Data
+		{
+			get
+			{
+				if ( HasTag("data") )
+					return Convert.FromBase64String(GetTag("data"));
+				else
+					return null;
+			}
+			set
+			{
+				SetTag("data", Convert.ToBase64String(value, 0, value.Length));
+			}
+		}
+
+		public string MimeType
+		{
+			get
+			{
+				Element data = SelectSingleElement("data");
+				if (data != null)
+					return GetAttribute("mimetype");
+				else
+					return null;
+			}
+			set
+			{
+				Element data = SelectSingleElement("data");
+				if (data != null)
+					SetAttribute("mimetype", value);
+			}
+		}
+	}
+	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/DirectionalElement.cs b/lib/agsxmpp/agsxmpp/protocol/Base/DirectionalElement.cs
new file mode 100644
index 0000000..c564746
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/DirectionalElement.cs
@@ -0,0 +1,116 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.Base
+{
+    /// <summary>
+    /// Base XMPP Element
+    /// This must ne used to build all other new packets
+    /// </summary>
+    public abstract class DirectionalElement : Element
+    {
+        public DirectionalElement()
+            : base()
+        {
+        }
+
+        public DirectionalElement(string tag)
+            : base(tag)
+        {
+        }
+
+        public DirectionalElement(string tag, string ns)
+            : base(tag)
+        {
+            this.Namespace = ns;
+        }
+
+        public DirectionalElement(string tag, string text, string ns)
+            : base(tag, text)
+        {
+            this.Namespace = ns;
+        }
+
+        public Jid From
+        {
+            get
+            {
+                if (HasAttribute("from"))
+                    return new Jid(this.GetAttribute("from"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("from", value.ToString());
+                else
+                    RemoveAttribute("from");
+            }
+        }
+
+        public Jid To
+        {
+            get
+            {
+                if (HasAttribute("to"))
+                    return new Jid(this.GetAttribute("to"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("to", value.ToString());
+                else
+                    RemoveAttribute("to");
+            }
+        }
+
+        /// <summary>
+        /// Switches the from and to attributes when existing
+        /// </summary>
+        public void SwitchDirection()
+        {
+            Jid from = From;
+            Jid to = To;
+
+            // Remove from and to now
+            RemoveAttribute("from");
+            RemoveAttribute("to");
+
+            Jid helper = null;
+
+            helper = from;
+            from = to;
+            to = helper;
+
+            From = from;
+            To = to;
+        } 
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/Group.cs b/lib/agsxmpp/agsxmpp/protocol/Base/Group.cs
new file mode 100644
index 0000000..7ba7980
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/Group.cs
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.Base
+{
+	/// <summary>
+	/// Summary description for Group.
+	/// </summary>
+	public class Group : Element
+	{
+		public Group()
+		{
+			this.TagName = "group";
+		}
+
+		public Group(string groupname) : this()
+		{
+			this.Name	= groupname;
+		}
+
+		/// <summary>
+		/// gets or sets the Name of the contact group
+		/// </summary>
+		public string Name
+		{
+			set	{ this.Value = value; }
+			get	{ return this.Value; }
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/Item.cs b/lib/agsxmpp/agsxmpp/protocol/Base/Item.cs
new file mode 100644
index 0000000..c4ffa0f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/Item.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.Base
+{
+	/// <summary>
+	/// Summary description for Item.
+	/// </summary>
+	public class Item : Element
+	{
+		public Item()
+		{
+			this.TagName	= "item";
+		}
+        		
+
+        public Jid Jid
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+            }
+        }
+
+
+		public string Name
+		{
+			get	{ return GetAttribute("name"); }
+			set	{ SetAttribute("name", value); }
+
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/RosterItem.cs b/lib/agsxmpp/agsxmpp/protocol/Base/RosterItem.cs
new file mode 100644
index 0000000..07ae04f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/RosterItem.cs
@@ -0,0 +1,94 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.Base
+{
+	// jabber:iq:roster
+	// <iq from="gnauck at myjabber.net/Office" id="doroster_1" type="result">
+	//		<query xmlns="jabber:iq:roster">
+	//			<item subscription="both" name="Nachtkrapp" jid="50198521 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="czerkasov" jid="62764180 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="Poacher" jid="92179686 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="Diabolo" jid="102840558 at icq.myjabber.net"><group>ICQ</group></item>
+	//		</query>
+	// </iq> 
+
+	// # "none" -- the user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information
+	// # "to" -- the user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information
+	// # "from" -- the contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information
+	// # "both" -- both the user and the contact have subscriptions to each other's presence information
+
+	/// <summary>
+	/// Item is used in jabber:iq:roster, x roster
+	/// </summary>
+	public class RosterItem : Item
+	{
+		public RosterItem() : base()
+		{
+		}
+
+		/// <summary>
+		/// Groups a roster Item is assigned to
+		/// </summary>
+        public ElementList GetGroups()
+		{
+			return this.SelectElements("group");			
+		}
+
+		/// <summary>
+		/// Add a new group to the Rosteritem
+		/// </summary>
+		/// <param name="groupname"></param>
+		public void AddGroup(string groupname)
+		{
+			Group g = new Group(groupname);
+			this.AddChild(g);
+		}
+
+		public bool HasGroup(string groupname)
+		{
+            ElementList groups = GetGroups();
+			foreach (Group g in groups)
+			{
+				if (g.Name == groupname)
+					return true;
+			}
+			return false;
+		}
+
+		public void RemoveGroup(string groupname)
+		{
+            ElementList groups = GetGroups();
+			foreach (Group g in groups)
+			{
+				if (g.Name == groupname)
+				{
+					g.Remove();
+					return;
+				}
+			}
+		}		
+	}	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/Stanza.cs b/lib/agsxmpp/agsxmpp/protocol/Base/Stanza.cs
new file mode 100644
index 0000000..c2feb2d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/Stanza.cs
@@ -0,0 +1,117 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.Base
+{
+	/// <summary>
+	/// Base XMPP Element
+	/// This must ne used to build all other new packets
+	/// </summary>
+	public abstract class Stanza : DirectionalElement
+	{
+		public Stanza() : base()
+		{
+		}
+
+		public Stanza(string tag) : base(tag)
+		{			
+		}
+
+		public Stanza(string tag, string ns) : base(tag)
+		{			
+			this.Namespace = ns;
+		}
+
+		public Stanza(string tag, string text, string ns) : base(tag, text)
+		{
+			this.Namespace = ns;
+		}
+
+		public string Id
+		{
+			get 
+			{ 
+				return this.GetAttribute("id");
+			}
+			set
+			{ 
+				this.SetAttribute("id", value); 
+			}
+		}
+
+		/// <summary>
+		/// Generates a automatic id for the packet.
+		/// !!! Overwrites existing Ids
+		/// </summary>
+		/// <returns></returns>
+		public void GenerateId()
+		{
+			string sId = agsXMPP.Id.GetNextId();
+			this.Id = sId;			
+		}
+
+        /// <summary>        
+        /// XML Language attribute
+        /// </summary>
+        /// <remarks>
+        /// The language 'xml:lang' attribute  SHOULD be included by the initiating entity on the header for the initial stream 
+        /// to specify the default language of any human-readable XML character data it sends over that stream. 
+        /// If the attribute is included, the receiving entity SHOULD remember that value as the default for both the 
+        /// initial stream and the response stream; if the attribute is not included, the receiving entity SHOULD use 
+        /// a configurable default value for both streams, which it MUST communicate in the header for the response stream. 
+        /// For all stanzas sent over the initial stream, if the initiating entity does not include an 'xml:lang' attribute, 
+        /// the receiving entity SHOULD apply the default value; if the initiating entity does include an 'xml:lang' attribute, 
+        /// the receiving entity MUST NOT modify or delete it (see also xml:langxml:lang). 
+        /// The value of the 'xml:lang' attribute MUST conform to the format defined in RFC 3066 (Tags for the Identification of Languages, January 2001.[LANGTAGS]).
+        /// </remarks>
+        public string Language
+        {
+            get { return GetAttribute("xml:lang"); }
+            set { SetAttribute("xml:lang", value); }
+        }
+        		
+        ///// <summary>
+        ///// Error Child Element
+        ///// </summary>
+        //public agsXMPP.protocol.client.Error Error
+        //{
+        //    get
+        //    {
+        //        return SelectSingleElement(typeof(agsXMPP.protocol.client.Error)) as agsXMPP.protocol.client.Error;
+
+        //    }
+        //    set
+        //    {
+        //        if (HasTag(typeof(agsXMPP.protocol.client.Error)))
+        //            RemoveTag(typeof(agsXMPP.protocol.client.Error));
+                
+        //        if (value != null)
+        //            this.AddChild(value);
+        //    }
+        //}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/Base/Stream.cs b/lib/agsxmpp/agsxmpp/protocol/Base/Stream.cs
new file mode 100644
index 0000000..0ae8fd3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Base/Stream.cs
@@ -0,0 +1,67 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.Base
+{
+	/// <summary>
+	/// Summary description for Stream.
+	/// </summary>
+	public class Stream : Stanza
+	{
+		public Stream()
+		{
+			this.TagName = "stream";
+		}
+
+		/// <summary>
+		/// The StreamID of the current JabberSession.
+		/// Returns null when none available.
+		/// </summary>
+		public string StreamId
+		{
+			get
+			{				
+				return GetAttribute("id");			
+			}
+			set
+			{
+				SetAttribute("id", value);
+			}
+		}
+
+		/// <summary>
+		/// See XMPP-Core 4.4.1 "Version Support"
+		/// </summary>
+		public string Version
+		{
+			get
+			{
+				return GetAttribute("version");
+			}
+			set
+			{
+				SetAttribute("version", value);
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Error.cs b/lib/agsxmpp/agsxmpp/protocol/Error.cs
new file mode 100644
index 0000000..25c2be9
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Error.cs
@@ -0,0 +1,396 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol
+{
+    /*
+        <stream:error>
+          <defined-condition xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
+          <text xmlns='urn:ietf:params:xml:ns:xmpp-streams'
+                xml:lang='langcode'>
+            OPTIONAL descriptive text
+          </text>
+          [OPTIONAL application-specific condition element]
+        </stream:error>
+    */
+
+    /*
+        RFC 4.7.3.  Defined Conditions
+
+        The following stream-level error conditions are defined:
+
+        * <bad-format/> -- the entity has sent XML that cannot be processed; this error MAY be used instead of the more specific XML-related errors, such as <bad-namespace-prefix/>, <invalid-xml/>, <restricted-xml/>, <unsupported-encoding/>, and <xml-not-well-formed/>, although the more specific errors are preferred.
+        * <bad-namespace-prefix/> -- the entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix (see XML Namespace Names and Prefixes (XML Namespace Names and Prefixes)).
+        * <conflict/> -- the server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.
+        * <connection-timeout/> -- the entity has not generated any traffic over the stream for some period of time (configurable according to a local service policy).
+        * <host-gone/> -- the value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.
+        * <host-unknown/> -- the value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.
+        * <improper-addressing/> -- a stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value).
+        * <internal-server-error/> -- the server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.
+        * <invalid-from/> -- the JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding.
+        * <invalid-id/> -- the stream ID or dialback ID is invalid or does not match an ID previously provided.
+        * <invalid-namespace/> -- the streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback" (see XML Namespace Names and Prefixes (XML Namespace Names and Prefixes)).
+        * <invalid-xml/> -- the entity has sent invalid XML over the stream to a server that performs validation (see Validation (Validation)).
+        * <not-authorized/> -- the entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation; the receiving entity MUST NOT process the offending stanza before sending the stream error.
+        * <policy-violation/> -- the entity has violated some local service policy; the server MAY choose to specify the policy in the <text/> element or an application-specific condition element.
+        * <remote-connection-failed/> -- the server is unable to properly connect to a remote entity that is required for authentication or authorization.
+        * <resource-constraint/> -- the server lacks the system resources necessary to service the stream.
+        * <restricted-xml/> -- the entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character (see Restrictions (Restrictions)).
+        * <see-other-host/> -- the server will not provide service to the initiating entity but is redirecting traffic to another host; the server SHOULD specify the alternate hostname or IP address (which MUST be a valid domain identifier) as the XML character data of the <see-other-host/> element.
+        * <system-shutdown/> -- the server is being shut down and all active streams are being closed.
+        * <undefined-condition/> -- the error condition is not one of those defined by the other conditions in this list; this error condition SHOULD be used only in conjunction with an application-specific condition.
+        * <unsupported-encoding/> -- the initiating entity has encoded the stream in an encoding that is not supported by the server (see Character Encoding (Character Encoding)).
+        * <unsupported-stanza-type/> -- the initiating entity has sent a first-level child of the stream that is not supported by the server.
+        * <unsupported-version/> -- the value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server; the server MAY specify the version(s) it supports in the <text/> element.
+        * <xml-not-well-formed/> -- the initiating entity has sent XML that is not well-formed as defined by [XML] (Bray, T., Paoli, J., Sperberg-McQueen, C., and E. Maler, �Extensible Markup Language (XML) 1.0 (2nd ed),� October 2000.).
+
+    */
+
+    public enum StreamErrorCondition
+    {
+        /// <summary>
+        /// unknown error condition
+        /// </summary>
+        UnknownCondition        = -1,
+
+
+        /// <summary>
+        /// the entity has sent XML that cannot be processed; this error MAY be used instead of the more specific XML-related errors, such as <bad-namespace-prefix/>, <invalid-xml/>, <restricted-xml/>, <unsupported-encoding/>, and <xml-not-well-formed/>, although the more specific errors are preferred.
+        /// </summary>
+        BadFormat,
+        
+        /// <summary>
+        /// the entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix (see XML Namespace Names and Prefixes (XML Namespace Names and Prefixes)).
+        /// </summary>
+        BadNamespacePrefix,
+
+        /// <summary>
+        /// the server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.
+        /// </summary>
+        Conflict,
+        
+        /// <summary>
+        /// the entity has not generated any traffic over the stream for some period of time (configurable according to a local service policy).
+        /// </summary>
+        ConnectionTimeout,
+        
+        /// <summary>
+        /// the value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.
+        /// </summary>
+        HostGone,
+        
+        /// <summary>
+        /// the value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.
+        /// </summary>
+        HostUnknown,
+        
+        /// <summary>
+        /// a stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value).
+        /// </summary>
+        ImproperAddressing,
+
+        /// <summary>
+        /// the server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.
+        /// </summary>
+        InternalServerError,
+
+        /// <summary>
+        /// the JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding.
+        /// </summary>
+        InvalidFrom,
+        
+        /// <summary>
+        /// the stream ID or dialback ID is invalid or does not match an ID previously provided.
+        /// </summary>
+        InvalidId,
+
+        /// <summary>
+        /// the streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback" (see XML Namespace Names and Prefixes (XML Namespace Names and Prefixes)).
+        /// </summary>
+        InvalidNamespace,
+        
+        /// <summary>
+        /// the entity has sent invalid XML over the stream to a server that performs validation.
+        /// </summary>
+        InvalidXml,
+        
+        /// <summary>
+        /// the entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation; the receiving entity MUST NOT process the offending stanza before sending the stream error.
+        /// </summary>
+        NotAuthorized,
+
+        /// <summary>
+        /// the entity has violated some local service policy; the server MAY choose to specify the policy in the <text/> element or an application-specific condition element.
+        /// </summary>
+        PolicyViolation,
+
+        /// <summary>
+        /// the server is unable to properly connect to a remote entity that is required for authentication or authorization.
+        /// </summary>
+        RemoteConnectionFailed,
+        
+        /// <summary>
+        /// the server lacks the system resources necessary to service the stream.
+        /// </summary>
+        ResourceConstraint,
+
+        /// <summary>
+        /// the entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character (see Restrictions (Restrictions)).
+        /// </summary>
+        RestrictedXml,
+        
+        /// <summary>
+        /// the server will not provide service to the initiating entity but is redirecting traffic to another host; the server SHOULD specify the alternate hostname or IP address (which MUST be a valid domain identifier) as the XML character data of the <see-other-host/> element.
+        /// </summary>
+        SeeOtherHost,
+        
+        /// <summary>
+        /// the server is being shut down and all active streams are being closed.
+        /// </summary>
+        SystemShutdown,
+        
+        /// <summary>
+        /// the error condition is not one of those defined by the other conditions in this list; this error condition SHOULD be used only in conjunction with an application-specific condition.
+        /// </summary>
+        UndefinedCondition,
+        
+        /// <summary>
+        /// the initiating entity has encoded the stream in an encoding that is not supported by the server.
+        /// </summary>
+        UnsupportedEncoding,
+        
+        /// <summary>
+        /// the initiating entity has sent a first-level child of the stream that is not supported by the server.
+        /// </summary>
+        UnsupportedStanzaType,
+        
+        /// <summary>
+        /// the value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server; the server MAY specify the version(s) it supports in the <text/> element.
+        /// </summary>
+        UnsupportedVersion,
+        
+        /// <summary>
+        /// the initiating entity has sent XML that is not well-formed as defined by the XML specs.
+        /// </summary>
+        XmlNotWellFormed      
+    }
+
+ 
+	// <stream:error>Invalid handshake</stream:error>
+	// <stream:error>Socket override by another connection.</stream:error>
+
+	/// <summary>
+	/// Stream Errors <stream:error>
+	/// </summary>
+	public class Error : Element
+	{
+		public Error()
+		{
+			this.TagName	= "error";
+			this.Namespace	= Uri.STREAM;			
+		}
+
+        public Error(StreamErrorCondition condition) : this()
+        {
+            this.Condition = condition;
+        }        
+        
+        /*
+		public Error(string msg) : this()
+		{
+			Message = msg;
+		}
+
+		/// <summary>
+		/// The error Description
+		/// </summary>
+		public string Message
+		{
+			get	{ return this.Value;  }
+			set	{ this.Value = value; }
+		}
+        */
+
+        public StreamErrorCondition Condition
+        {
+            get
+            {
+                if (HasTag("bad-format"))
+                    return StreamErrorCondition.BadFormat;
+                else if (HasTag("bad-namespace-prefix"))
+                    return StreamErrorCondition.BadNamespacePrefix;
+                else if (HasTag("conflict"))
+                    return StreamErrorCondition.Conflict;
+                else if (HasTag("connection-timeout"))
+                    return StreamErrorCondition.ConnectionTimeout;
+                else if (HasTag("host-gone"))
+                    return StreamErrorCondition.HostGone;
+                else if (HasTag("host-unknown"))
+                    return StreamErrorCondition.HostUnknown;
+                else if (HasTag("improper-addressing"))
+                    return StreamErrorCondition.ImproperAddressing;
+                else if (HasTag("internal-server-error"))
+                    return StreamErrorCondition.InternalServerError;
+                else if (HasTag("invalid-from"))
+                    return StreamErrorCondition.InvalidFrom;
+                else if (HasTag("invalid-id"))
+                    return StreamErrorCondition.InvalidId;
+                else if (HasTag("invalid-namespace"))
+                    return StreamErrorCondition.InvalidNamespace;
+                else if (HasTag("invalid-xml"))
+                    return StreamErrorCondition.InvalidXml;
+                else if (HasTag("not-authorized"))
+                    return StreamErrorCondition.NotAuthorized;
+                else if (HasTag("policy-violation"))
+                    return StreamErrorCondition.PolicyViolation;
+                else if (HasTag("remote-connection-failed"))
+                    return StreamErrorCondition.RemoteConnectionFailed;
+                else if (HasTag("resource-constraint"))
+                    return StreamErrorCondition.ResourceConstraint;
+                else if (HasTag("restricted-xml"))
+                    return StreamErrorCondition.RestrictedXml;
+                else if (HasTag("see-other-host"))
+                    return StreamErrorCondition.SeeOtherHost;
+                else if (HasTag("system-shutdown"))
+                    return StreamErrorCondition.SystemShutdown;
+                else if (HasTag("undefined-condition"))
+                    return StreamErrorCondition.UndefinedCondition;
+                else if (HasTag("unsupported-encoding"))
+                    return StreamErrorCondition.UnsupportedEncoding;
+                else if (HasTag("unsupported-stanza-type"))
+                    return StreamErrorCondition.UnsupportedStanzaType;
+                else if (HasTag("unsupported-version"))
+                    return StreamErrorCondition.UnsupportedVersion;
+                else if (HasTag("xml-not-well-formed"))
+                    return StreamErrorCondition.XmlNotWellFormed;
+                else
+                    return StreamErrorCondition.UnknownCondition;
+            }
+
+            set
+            {
+                switch (value)
+                {
+                    case StreamErrorCondition.BadFormat:
+                        SetTag("bad-format", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.BadNamespacePrefix:
+                        SetTag("bad-namespace-prefix", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.Conflict:
+                        SetTag("conflict", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.ConnectionTimeout:
+                        SetTag("connection-timeout", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.HostGone:
+                        SetTag("host-gone", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.HostUnknown:
+                        SetTag("host-unknown", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.ImproperAddressing:
+                        SetTag("improper-addressing", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.InternalServerError:
+                        SetTag("internal-server-error", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.InvalidFrom:
+                        SetTag("invalid-from", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.InvalidId:
+                        SetTag("invalid-id", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.InvalidNamespace:
+                        SetTag("invalid-namespace", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.InvalidXml:
+                        SetTag("invalid-xml", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.NotAuthorized:
+                        SetTag("not-authorized", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.PolicyViolation:
+                        SetTag("policy-violation", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.RemoteConnectionFailed:
+                        SetTag("remote-connection-failed", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.ResourceConstraint:
+                        SetTag("resource-constraint", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.RestrictedXml:
+                        SetTag("restricted-xml", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.SeeOtherHost:
+                        SetTag("see-other-host", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.SystemShutdown:
+                        SetTag("system-shutdown", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.UndefinedCondition:
+                        SetTag("undefined-condition", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.UnsupportedEncoding:
+                        SetTag("unsupported-encoding", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.UnsupportedStanzaType:
+                        SetTag("unsupported-stanza-type", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.UnsupportedVersion:
+                        SetTag("unsupported-version", "", Uri.STREAMS);
+                        break;
+                    case StreamErrorCondition.XmlNotWellFormed:
+                        SetTag("xml-not-well-formed", "", Uri.STREAMS);
+                        break;
+                    default:
+                        return;
+
+                }
+            }
+        }
+
+        /// <summary>
+        /// <para>
+        /// The <text/> element is OPTIONAL. If included, it SHOULD be used only to provide descriptive or diagnostic information
+        /// that supplements the meaning of a defined condition or application-specific condition. 
+        /// </para>
+        /// <para>
+        /// It SHOULD NOT be interpreted programmatically by an application.
+        /// It SHOULD NOT be used as the error message presented to a user, but MAY be shown in addition to the error message 
+        /// associated with the included condition element (or elements).
+        /// </para>
+        /// </summary>
+        public string Text
+        {
+            get { return GetTag("text"); }
+            set
+            {
+                SetTag("text", value, Uri.STREAMS);
+            }
+        }
+    
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Stream.cs b/lib/agsxmpp/agsxmpp/protocol/Stream.cs
new file mode 100644
index 0000000..365a5ca
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Stream.cs
@@ -0,0 +1,38 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol
+{
+	/// <summary>
+	/// stream:stream Element
+	/// This is the first Element we receive from the server.
+	/// It encloses our whole xmpp session.
+	/// </summary>
+	public class Stream : Base.Stream
+	{
+		public Stream()
+		{			
+			this.Namespace	= Uri.STREAM;
+		}		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/Time/Time.cs b/lib/agsxmpp/agsxmpp/protocol/Time/Time.cs
new file mode 100644
index 0000000..9bd8419
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/Time/Time.cs
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.time
+{
+    public class Time : Element
+    {
+        /// <summary>
+        /// XEP-0202: Entity Time
+        /// </summary>
+        public Time()
+        {
+            TagName = "time";
+            Namespace = Uri.URN_TIME;
+        }
+
+        /// <summary>
+        /// Gets or sets the UTC offset.
+        /// </summary>
+        /// <value>The UTC offset.</value>
+        public TimeSpan UtcOffset
+        {
+            get
+            {
+                var tzo = GetTag("tzo");
+                if (tzo == null)
+                    return TimeSpan.Zero;
+
+                /* .NET is not able to parse the following format: "-03:30"
+                    so we append the minutes and .NET is happy.
+                    
+                    -10:00 len:6
+                     10:00 len:5
+                 */
+                if (tzo.Length == 5 || tzo.Length == 6)
+                    tzo += ":00";
+
+                return TimeSpan.Parse(tzo);
+            }
+            set { SetTag("tzo", FormatOffset(value)); }
+        }
+
+        /// <summary>
+        /// Gets or sets the date time.
+        /// </summary>
+        /// <value>The date time.</value>
+        public DateTime DateTime
+        {
+            get { return  Util.Time.ISO_8601Date(GetTag("utc")); }
+            set { SetTag("utc", Util.Time.ISO_8601Date(value)); }
+        }
+
+        /// <summary>
+        /// Sets the utc offset and time automatically.
+        /// </summary>
+        public void SetDateTimeNow()
+        {
+            UtcOffset = Util.Time.UtcOffset();
+            DateTime = DateTime.Now;
+        }
+
+        static string FormatOffset(TimeSpan ts)
+        {
+            return String.Format("{0:00}:{1:00}", ts.Hours, Math.Abs(ts.Minutes));
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/Error.cs b/lib/agsxmpp/agsxmpp/protocol/client/Error.cs
new file mode 100644
index 0000000..f2f9bcc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/Error.cs
@@ -0,0 +1,593 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+using System;
+
+using agsXMPP.Xml.Dom;
+
+// JEP-0086: Error Condition Mappings
+
+// <stanza-kind to='sender' type='error'>
+// [RECOMMENDED to include sender XML here]
+// <error type='error-type'>
+// <defined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+// <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
+// xml:lang='langcode'>
+// OPTIONAL descriptive text
+// </text>
+// [OPTIONAL application-specific condition element]
+// </error>
+// </stanza-kind>
+
+// Legacy Error
+// <error code="501">Not Implemented</error>
+
+// XMPP Style Error
+// <error code='404' type='cancel'>
+//		<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+// </error>
+
+namespace agsXMPP.protocol.client
+{
+	// XMPP error condition  		XMPP error type  	Legacy error code
+	// <bad-request/> 				modify 				400
+	// <conflict/> 					cancel 				409
+	// <feature-not-implemented/> 	cancel 				501
+	// <forbidden/> 				auth 				403
+	// <gone/> 						modify 				302 (permanent)
+	// <internal-server-error/> 	wait 				500
+	// <item-not-found/> 			cancel 				404
+	// <jid-malformed/> 			modify 				400
+	// <not-acceptable/> 			modify 				406
+	// <not-allowed/> 				cancel 				405
+	// <not-authorized/> 			auth 				401
+	// <payment-required/> 			auth 				402
+	// <recipient-unavailable/> 	wait 				404
+	// <redirect/> 					modify 				302 (temporary)
+	// <registration-required/> 	auth 				407
+	// <remote-server-not-found/> 	cancel 				404
+	// <remote-server-timeout/> 	wait 				504
+	// <resource-constraint/> 		wait 				500
+	// <service-unavailable/> 		cancel 				503
+	// <subscription-required/> 	auth 				407
+	// <undefined-condition/> 		[any] 				500
+	// <unexpected-request/> 		wait 				400
+
+    /// <summary>
+    /// stanza error condition as defined in RFC 3920 9.3
+    /// </summary>
+    public enum ErrorCondition
+    {
+        /// <summary>
+        /// The sender has sent a stanza containing XML that does not conform to the appropriate schema or that 
+        /// cannot be processed (e.g., an IQ stanza that includes an unrecognized value of the 'type' attribute);
+        /// the associated error type SHOULD be "modify".
+        /// </summary>
+        BadRequest,
+
+        /// <summary>
+        /// Access cannot be granted because an existing resource exists with the same name or address; 
+        /// the associated error type SHOULD be "cancel". 
+        /// </summary>
+        Conflict,
+
+        /// <summary>
+        /// The feature represented in the XML stanza is not implemented by the intended recipient or 
+        /// an intermediate server and therefore the stanza cannot be processed; the associated error type SHOULD 
+        /// be "cancel" or "modify".
+        /// </summary>
+        FeatureNotImplemented,
+
+        /// <summary>
+        /// The requesting entity does not possess the required permissions to perform the action; 
+        /// the associated error type SHOULD be "auth".
+        /// </summary>
+        Forbidden,
+
+        /// <summary>
+        /// The recipient or server can no longer be contacted at this address 
+        /// (the error stanza MAY contain a new address in the XML character data of the <gone/> element); 
+        /// the associated error type SHOULD be "cancel" or "modify".
+        /// </summary>
+        Gone,
+
+        /// <summary>
+        /// The server could not process the stanza because of a misconfiguration or an otherwise-undefined 
+        /// internal server error; the associated error type SHOULD be "wait" or "cancel".
+        /// </summary>
+        InternalServerError,
+
+        /// <summary>
+        /// The addressed JID or item requested cannot be found; the associated error type SHOULD be "cancel" or "modify".
+        /// </summary>
+        /// <remarks>        
+        /// An application MUST NOT return this error if doing so would provide information about the intended 
+        /// recipient's network availability to an entity that is not authorized to know such information; 
+        /// instead it SHOULD return a <service-unavailable/> error.
+        /// </remarks>        
+        ItemNotFound,
+
+        /// <summary>
+        /// The sending entity has provided or communicated an XMPP address 
+        /// (e.g., a value of the 'to' attribute) or aspect thereof (e.g., an XMPP resource identifier) 
+        /// that does not adhere to the syntax defined under RFC3920 Section 3 (Addresses); 
+        /// the associated error type SHOULD be "modify".
+        /// </summary>
+        JidMalformed,
+
+        /// <summary>
+        /// The recipient or server understands the request but is refusing to process it because it does not
+        /// meet criteria defined by the recipient or server (e.g., a local policy regarding stanza size 
+        /// limits or acceptable words in messages); the associated error type SHOULD be "modify".
+        /// </summary>
+        NotAcceptable,
+
+        /// <summary>
+        /// The recipient or server does not allow any entity to perform the action (e.g., sending to entities at 
+        /// a blacklisted domain); the associated error type SHOULD be "cancel".
+        /// </summary>
+        NotAllowed,
+
+        /// <summary>
+        /// The sender must provide proper credentials before being allowed to perform the action, or has provided 
+        /// improper credentials; the associated error type SHOULD be "auth".
+        /// </summary>
+        NotAuthorized,
+
+        /// <summary>
+        /// The item requested has not changed since it was last requested; the associated error type SHOULD be "continue".
+        /// </summary>
+        NotModified,
+
+        /// <summary>
+        /// The requesting entity is not authorized to access the requested service because payment is required; 
+        /// the associated error type SHOULD be "auth".
+        /// </summary>        
+        PaymentRequired,
+
+        /// <summary>
+        /// The intended recipient is temporarily unavailable; the associated error type SHOULD be "wait".
+        /// </summary>
+        /// <remarks>
+        /// An application MUST NOT return this error if doing so would provide information about the 
+        /// intended recipient's network availability to an entity that is not authorized to know such 
+        /// information; instead it SHOULD return a <service-unavailable/> error.
+        /// </remarks>
+        RecipientUnavailable,
+
+        /// <summary>
+        /// The recipient or server is redirecting requests for this information to another entity, 
+        /// typically in a temporary fashion; the associated error type SHOULD be "modify" and the error stanza
+        /// SHOULD contain the alternate address (which SHOULD be a valid JID) in the XML character data 
+        /// of the <redirect/> element.
+        /// </summary>
+        Redirect,
+
+        /// <summary>
+        /// The requesting entity is not authorized to access the requested service because prior 
+        /// registration is required; the associated error type SHOULD be "auth".
+        /// </summary>
+        RegistrationRequired,
+
+        /// <summary>
+        /// A remote server or service specified as part or all of the JID of the intended recipient 
+        /// does not exist; the associated error type SHOULD be "cancel".
+        /// </summary>
+        RemoteServerNotFound,
+
+        /// <summary>
+        /// A remote server or service specified as part or all of the JID of the intended recipient 
+        /// (or required to fulfill a request) could not be contacted within a reasonable amount 
+        /// of time; the associated error type SHOULD be "wait".
+        /// </summary>
+        RemoteServerTimeout,
+
+        /// <summary>
+        /// The server or recipient lacks the system resources necessary to service the request; 
+        /// the associated error type SHOULD be "wait".
+        /// </summary>
+        ResourceConstraint,
+
+        /// <summary>
+        /// The server or recipient does not currently provide the requested service; 
+        /// the associated error type SHOULD be "cancel".
+        /// </summary>
+        /// <remarks>
+        /// An application SHOULD return a <service-unavailable/> error instead of 
+        /// <item-not-found/> or <recipient-unavailable/> if sending one of the latter 
+        /// errors would provide information about the intended recipient's network 
+        /// availability to an entity that is not authorized to know such information.
+        /// </remarks>
+        ServiceUnavailable,
+
+        /// <summary>
+        /// The requesting entity is not authorized to access the requested service 
+        /// because a prior subscription is required; the associated error type SHOULD be "auth".
+        /// </summary>
+        SubscriptionRequired,
+
+        /// <summary>
+        /// The error condition is not one of those defined by the other conditions in this list; 
+        /// any error type may be associated with this condition, and it SHOULD be used only in conjunction 
+        /// with an application-specific condition.
+        /// </summary>
+        UndefinedCondition,
+
+        /// <summary>
+        /// The recipient or server understood the request but was not expecting it at this time 
+        /// (e.g., the request was out of order); the associated error type SHOULD be "wait" or "modify".
+        /// </summary>
+        UnexpectedRequest
+    }
+
+	// The value of the <error/> element's 'type' attribute MUST be one of the following:
+	// * cancel -- do not retry (the error is unrecoverable)
+	// * continue -- proceed (the condition was only a warning)
+	// * modify -- retry after changing the data sent
+	// * auth -- retry after providing credentials
+	// * wait -- retry after waiting (the error is temporary)
+	public enum ErrorType
+	{
+		cancel,
+		@continue,
+		modify,
+		auth,
+		wait
+	}
+
+
+	/// <summary>
+	/// The legacy Error Code
+	/// </summary>
+	public enum ErrorCode
+	{		
+		/// <summary>
+		/// Bad request
+		/// </summary>
+		BadRequest				= 400,
+		/// <summary>
+		/// Unauthorized
+		/// </summary>
+		Unauthorized			= 401,
+		/// <summary>
+		/// Payment required
+		/// </summary>
+		PaymentRequired			= 402,
+		/// <summary>
+		/// Forbidden
+		/// </summary>
+		Forbidden				= 403,
+		/// <summary>
+		/// Not found
+		/// </summary>
+		NotFound				= 404,
+		/// <summary>
+		/// Not allowed
+		/// </summary>
+		NotAllowed				= 405,
+		/// <summary>
+		/// Not acceptable
+		/// </summary>
+		NotAcceptable			= 406,
+		/// <summary>
+		/// Registration required 
+		/// </summary>
+		RegistrationRequired	= 407,
+		/// <summary>
+		/// Request timeout
+		/// </summary>
+		RequestTimeout			= 408,
+		/// <summary>
+		/// Conflict
+		/// </summary>
+		Conflict                = 409,
+		/// <summary>
+		/// Internal server error
+		/// </summary>
+		InternalServerError		= 500,
+		/// <summary>
+		/// Not implemented
+		/// </summary>
+		NotImplemented			= 501,
+		/// <summary>
+		/// Remote server error
+		/// </summary>
+		RemoteServerError		= 502,
+		/// <summary>
+		/// Service unavailable
+		/// </summary>
+		ServiceUnavailable		= 503,
+		/// <summary>
+		/// Remote server timeout
+		/// </summary>
+		RemoteServerTimeout		= 504,
+		/// <summary>
+		/// Disconnected
+		/// </summary>
+		Disconnected            = 510
+	}
+
+	
+	/// <summary>
+	/// Summary description for Error.
+	/// </summary>
+	public class Error : Element
+	{
+
+		#region << Constructors >>
+		public Error()
+		{
+            this.Namespace  = Uri.CLIENT;
+			this.TagName    = "error";
+        }
+
+        #region << Obsolete Constructors >>
+        [Obsolete("Please don't use old Jabber style errors. Use XMPP ErrorCondition instead")]
+		public Error(int code) : this()
+		{			
+			this.SetAttribute("code", code.ToString());
+		}
+
+        [Obsolete("Please don't use old Jabber style errors. Use XMPP ErrorCondition instead")]
+        public Error(ErrorCode code) : this()
+        {
+            this.SetAttribute("code", (int)code);
+        }
+        #endregion
+
+        /// <summary>
+		/// Creates an error Element according the the condition
+		/// The type attrib as added automatically as decribed in the XMPP specs
+		/// This is the prefered way to create error Elements
+		/// </summary>
+		/// <param name="condition"></param>
+		public Error(ErrorCondition condition) : this()
+		{			
+			this.Condition	= condition;
+		}
+
+        public Error(ErrorCondition condition, string text) : this(condition)
+        {
+            ErrorText = text;
+        }
+
+        public Error(ErrorType type)
+            : this()
+        {
+            Type = type;
+        }
+
+        public Error(ErrorType type, ErrorCondition condition) : this(type)
+        {
+            this.Condition = condition;
+        }
+		#endregion
+
+		/// <summary>
+		/// The error Description
+		/// </summary>
+        [Obsolete("Use ErrorText Property instead")]
+		public string Message
+		{
+			get
+			{
+				return this.Value;
+			}
+			set
+			{
+				this.Value = value;
+			}
+		}
+
+        /// <summary>
+        /// The optional error text
+        /// </summary>
+        public string ErrorText
+        {
+            get
+            {
+                return GetTag("text");
+            }
+            set
+            {
+                SetTag("text", value, Uri.STANZAS);
+            }
+        }
+
+		public ErrorCode Code
+		{
+			get
+			{
+				return (ErrorCode) GetAttributeInt("code");
+			}
+			set
+			{
+				SetAttribute("code", (int) value);
+			}
+		}
+       
+		public ErrorType Type
+		{
+			get
+			{
+				return (ErrorType) GetAttributeEnum("type", typeof(ErrorType));
+			}
+			set
+			{
+				SetAttribute("type", value.ToString());
+			}
+		}
+
+		public ErrorCondition Condition
+		{
+			get
+			{
+				if (HasTag("bad-request"))					// <bad-request/> 
+					return ErrorCondition.BadRequest;
+				else if (HasTag("conflict"))				// <conflict/> 
+					return ErrorCondition.Conflict;
+				else if  (HasTag("feature-not-implemented"))// <feature-not-implemented/>
+					return ErrorCondition.FeatureNotImplemented;
+				else if (HasTag("forbidden"))				// <forbidden/> 
+					return ErrorCondition.Forbidden;
+				else if (HasTag("gone"))					// <gone/>
+					return ErrorCondition.Gone;
+				else if (HasTag("internal-server-error"))	// <internal-server-error/>
+					return ErrorCondition.InternalServerError;
+				else if (HasTag("item-not-found"))			// <item-not-found/> 
+					return ErrorCondition.ItemNotFound;
+				else if (HasTag("jid-malformed"))			// <jid-malformed/>
+					return ErrorCondition.JidMalformed;
+				else if (HasTag("not-acceptable"))			// <not-acceptable/> 
+					return ErrorCondition.NotAcceptable;
+                else if (HasTag("not-allowed"))             // <not-allowed/>
+                    return ErrorCondition.NotAllowed;
+				else if (HasTag("not-authorized"))			// <not-authorized/>
+					return ErrorCondition.NotAuthorized;
+				else if (HasTag("not-modified"))            // <not-modified/>
+                    return ErrorCondition.NotModified;                
+                else if (HasTag("payment-required"))		// <payment-required/>
+					return ErrorCondition.PaymentRequired;
+				else if (HasTag("recipient-unavailable"))	// <recipient-unavailable/>
+					return ErrorCondition.RecipientUnavailable;
+				else if (HasTag("redirect"))				// <redirect/>
+					return ErrorCondition.Redirect;
+				else if (HasTag("registration-required"))	// <registration-required/>
+					return ErrorCondition.RegistrationRequired;
+				else if (HasTag("remote-server-not-found"))	// <remote-server-not-found/> 
+					return ErrorCondition.RemoteServerNotFound;
+				else if (HasTag("remote-server-timeout"))	// <remote-server-timeout/> 
+					return ErrorCondition.RemoteServerTimeout;	
+				else if (HasTag("resource-constraint"))		// <resource-constraint/>
+					return ErrorCondition.ResourceConstraint;	
+				else if (HasTag("service-unavailable"))		// <service-unavailable/> 
+					return ErrorCondition.ServiceUnavailable;
+				else if (HasTag("subscription-required"))	// <subscription-required/> 
+					return ErrorCondition.SubscriptionRequired;
+				else if (HasTag("undefined-condition"))		// <undefined-condition/> 
+					return ErrorCondition.UndefinedCondition;
+				else if (HasTag("unexpected-request"))		// <unexpected-request/> 
+					return ErrorCondition.UnexpectedRequest;
+				else
+ 					return ErrorCondition.UndefinedCondition;
+					
+			}
+			set
+			{
+				switch (value)
+				{
+					case ErrorCondition.BadRequest:
+						SetTag("bad-request",				"", Uri.STANZAS);
+						Type = ErrorType.modify;
+						break;
+					case ErrorCondition.Conflict:
+						SetTag("conflict",					"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.FeatureNotImplemented:
+						SetTag("feature-not-implemented",	"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.Forbidden:
+						SetTag("forbidden",					"", Uri.STANZAS);
+						Type = ErrorType.auth;
+						break;
+					case ErrorCondition.Gone:
+						SetTag("gone",						"", Uri.STANZAS);
+						Type = ErrorType.modify;
+						break;
+					case ErrorCondition.InternalServerError:
+						SetTag("internal-server-error",		"", Uri.STANZAS);
+						Type = ErrorType.wait;
+						break;
+					case ErrorCondition.ItemNotFound:
+						SetTag("item-not-found",			"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.JidMalformed:
+						SetTag("jid-malformed",				"", Uri.STANZAS);
+						Type = ErrorType.modify;
+						break;
+					case ErrorCondition.NotAcceptable:
+						SetTag("not-acceptable",			"", Uri.STANZAS);
+						Type = ErrorType.modify;
+						break;
+					case ErrorCondition.NotAllowed:
+						SetTag("not-allowed",				"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.NotAuthorized:
+						SetTag("not-authorized",			"", Uri.STANZAS);
+						Type = ErrorType.auth;
+						break;
+                    case ErrorCondition.NotModified:
+                        SetTag("not-modified",			    "", Uri.STANZAS);
+                        Type = ErrorType.modify;
+                        break;
+					case ErrorCondition.PaymentRequired:
+						SetTag("payment-required",			"", Uri.STANZAS);
+						Type = ErrorType.auth;
+						break;
+					case ErrorCondition.RecipientUnavailable:
+						SetTag("recipient-unavailable",		"", Uri.STANZAS);
+						Type = ErrorType.wait;
+						break;
+					case ErrorCondition.Redirect:
+						SetTag("redirect",					"", Uri.STANZAS);
+						Type = ErrorType.modify;
+						break;
+					case ErrorCondition.RegistrationRequired:
+						SetTag("registration-required",		"", Uri.STANZAS);
+						Type = ErrorType.auth;
+						break;
+					case ErrorCondition.RemoteServerNotFound:
+						SetTag("remote-server-not-found",	"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.RemoteServerTimeout:
+						SetTag("remote-server-timeout",		"", Uri.STANZAS);
+						Type = ErrorType.wait;
+						break;
+					case ErrorCondition.ResourceConstraint:	
+						SetTag("resource-constraint",		"", Uri.STANZAS);
+						Type = ErrorType.wait;
+						break;
+					case ErrorCondition.ServiceUnavailable:
+						SetTag("service-unavailable",		"", Uri.STANZAS);
+						Type = ErrorType.cancel;
+						break;
+					case ErrorCondition.SubscriptionRequired:
+						SetTag("subscription-required",		"", Uri.STANZAS);
+						Type = ErrorType.auth;
+						break;
+					case ErrorCondition.UndefinedCondition:
+						SetTag("undefined-condition",		"", Uri.STANZAS);
+						// could be any
+						break;
+					case ErrorCondition.UnexpectedRequest:
+						SetTag("unexpected-request",		"", Uri.STANZAS);
+						Type = ErrorType.wait;
+						break;
+
+				}
+			}
+		}		
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/Handler.cs b/lib/agsxmpp/agsxmpp/protocol/client/Handler.cs
new file mode 100644
index 0000000..7510acc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/Handler.cs
@@ -0,0 +1,29 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.client
+{
+    public delegate void MessageHandler (object sender, Message msg);
+    public delegate void PresenceHandler(object sender, Presence pres);
+    public delegate void IqHandler      (object sender, IQ iq);
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/IQ.cs b/lib/agsxmpp/agsxmpp/protocol/client/IQ.cs
new file mode 100644
index 0000000..6124cbe
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/IQ.cs
@@ -0,0 +1,181 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.protocol.iq;
+using agsXMPP.protocol.iq.vcard;
+using agsXMPP.protocol.iq.bind;
+using agsXMPP.protocol.iq.session;
+
+namespace agsXMPP.protocol.client
+{
+	// a i know that i shouldnt use keywords for Enums. But its much easier this way
+	// because of enum.ToString() and enum.Parse() Members
+	public enum IqType
+	{
+		get,
+		set,
+		result,
+		error
+	}
+
+	/// <summary>
+	/// Iq Stanza.
+	/// </summary>
+	public class IQ : Base.Stanza
+	{        
+        #region << Constructors >>
+        public IQ()
+		{
+			this.TagName	= "iq";
+			this.Namespace	= Uri.CLIENT;
+		}
+
+        public IQ(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public IQ(Jid from, Jid to) : this()
+        {
+            this.From   = from;
+            this.To     = to;
+        }
+
+        public IQ(IqType type, Jid from, Jid to) : this()
+        {
+            this.Type   = type;
+            this.From   = from;
+            this.To     = to;
+        }		
+        #endregion
+
+        public IqType Type
+		{
+			set
+			{
+				SetAttribute("type", value.ToString());				
+			}
+			get
+			{
+				return (IqType) GetAttributeEnum("type", typeof(IqType));
+			}
+		}
+
+		/// <summary>
+		/// The query Element. Value can also be null which removes the Query tag when existing
+		/// </summary>
+		public Element Query
+		{
+			get
+			{ 				
+				return this.SelectSingleElement("query");
+			}
+			set
+			{
+				if (value != null)
+					ReplaceChild(value);
+				else
+					RemoveTag("query");				
+			}
+		}
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public agsXMPP.protocol.client.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.client.Error)) as agsXMPP.protocol.client.Error;
+
+            }
+            set
+            {
+                // set type automatically to error
+                Type = IqType.error;
+
+                if (HasTag(typeof(agsXMPP.protocol.client.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.client.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+		/// <summary>
+		/// Get or Set the VCard if it is a Vcard IQ
+		/// </summary>
+		public virtual Vcard Vcard
+		{
+			get
+			{ 				
+				return this.SelectSingleElement("vCard") as Vcard;
+			}
+			set
+			{
+				if (value != null)
+					ReplaceChild(value);
+				else
+					RemoveTag("vCard");
+			}
+		}
+
+        /// <summary>
+        /// Get or Set the Bind ELement if it is a BingIq
+        /// </summary>
+        public virtual Bind Bind
+        {
+            get
+            {
+                return this.SelectSingleElement(typeof(Bind)) as Bind;
+            }
+            set
+            {
+                RemoveTag(typeof(Bind));
+                if (value != null)
+                    AddChild(value);                
+            }
+        }
+
+
+        /// <summary>
+        /// Get or Set the Session Element if it is a SessionIq
+        /// </summary>
+        public virtual Session Session
+        {
+            get
+            {
+                return this.SelectSingleElement(typeof(Session)) as Session;
+            }
+            set
+            {
+                RemoveTag(typeof(Session));
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/Message.cs b/lib/agsxmpp/agsxmpp/protocol/client/Message.cs
new file mode 100644
index 0000000..4dd0142
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/Message.cs
@@ -0,0 +1,445 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.x;
+using agsXMPP.protocol.extensions.html;
+using agsXMPP.protocol.extensions.chatstates;
+using agsXMPP.protocol.extensions.nickname;
+using agsXMPP.protocol.extensions.shim;
+
+namespace agsXMPP.protocol.client
+{
+	/// <summary>
+	/// This class represents a XMPP message.
+	/// </summary>
+	public class Message : Base.Stanza
+	{
+		#region << Constructors >>
+		public Message()
+		{
+			this.TagName	= "message";
+			this.Namespace	= Uri.CLIENT;
+		}
+
+        public Message(Jid to) : this()
+        {
+            To      = to;
+        }
+		public Message(Jid to, string body) : this(to)
+		{			
+			Body	= body;
+		}
+
+        public Message(Jid to, Jid from) : this()
+        {
+            To      = to;
+            From    = from;
+        }
+
+		public Message(string to, string body) : this()
+		{
+			To		= new Jid(to);
+			Body	= body;
+		}
+
+		public Message(Jid to, string body, string subject) : this()
+		{
+			To		= to;
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(string to, string body, string subject) : this()
+		{
+			To		= new Jid(to);
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(string to, string body, string subject, string thread) : this()
+		{
+			To		= new Jid(to);
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		}
+
+		public Message(Jid to, string body, string subject, string thread) : this()
+		{
+			To		= to;
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		}
+
+		public Message(string to, MessageType type, string body) : this()
+		{
+			To		= new Jid(to);
+			Type	= type;
+			Body	= body;
+		}
+
+		public Message(Jid to, MessageType type, string body) : this()
+		{
+			To		= to;
+			Type	= type;
+			Body	= body;
+		}
+
+		public Message(string to, MessageType type, string body, string subject) : this()
+		{
+			To		= new Jid(to);
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(Jid to, MessageType type, string body, string subject) : this()
+		{
+			To		= to;
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(string to, MessageType type, string body, string subject, string thread) : this()
+		{
+			To		= new Jid(to);
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		}
+
+		public Message(Jid to, MessageType type, string body, string subject, string thread) : this()
+		{
+			To		= to;
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		}
+	
+		public Message(Jid to, Jid from, string body) : this()
+		{
+			To		= to;
+			From	= from;
+			Body	= body;
+		}
+
+		public Message(Jid to, Jid from, string body, string subject) : this()
+		{
+			To		= to;
+			From	= from;
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(Jid to, Jid from, string body, string subject, string thread) : this()
+		{
+			To		= to;
+			From	= from;
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		}
+
+		public Message(Jid to, Jid from, MessageType type, string body) : this()
+		{
+			To		= to;
+			From	= from;
+			Type	= type;
+			Body	= body;
+		}
+
+		public Message(Jid to, Jid from, MessageType type, string body, string subject) : this()
+		{
+			To		= to;
+			From	= from;
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+		}
+
+		public Message(Jid to, Jid from, MessageType type, string body, string subject, string thread) : this()
+		{
+			To = to;
+			From	= from;
+			Type	= type;
+			Body	= body;
+			Subject	= subject;
+			Thread	= thread;
+		} 
+
+		#endregion
+
+		#region << Properties >>
+		/// <summary>
+		/// The body of the message. This contains the message text.
+		/// </summary>
+        public string Body
+		{
+			set	{ SetTag("body", value); }
+			get { return GetTag("body"); }
+		}
+
+        /// <summary>
+        /// subject of this message. Its like a subject in a email. The Subject is optional.
+        /// </summary>
+		public string Subject
+		{
+			set	{ SetTag("subject", value);	}
+			get	{ return GetTag("subject");	}
+		}
+
+        /// <summary>
+        /// messages and conversations could be threaded. You can compare this with threads in newsgroups or forums.
+        /// Threads are optional.
+        /// </summary>
+		public string Thread
+		{
+			set	{ SetTag("thread", value); }
+			get	{ return GetTag("thread"); }
+		}
+
+        /// <summary>
+        /// message type (chat, groupchat, normal, headline or error).
+        /// </summary>
+		public MessageType Type
+		{
+			get 
+			{ 
+				return (MessageType) GetAttributeEnum("type", typeof(MessageType)); 
+			}
+			set 
+			{ 
+				if (value == MessageType.normal)
+					RemoveAttribute("type");
+				else
+					SetAttribute("type", value.ToString()); 
+			}
+		}
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public agsXMPP.protocol.client.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.client.Error)) as agsXMPP.protocol.client.Error;
+
+            }
+            set
+            {
+                // set type automatically to error
+                Type = MessageType.error;
+
+                if (HasTag(typeof(agsXMPP.protocol.client.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.client.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The html part of the message if you want to support the html-im Jep. This part of the message is optional.
+        /// </summary>
+        public Html Html
+        {
+            get { return (Html) SelectSingleElement(typeof(Html)); }
+            set
+            {
+                RemoveTag(typeof(Html));
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The event Element for JEP-0022 Message events
+        /// </summary>
+        public Event XEvent
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Event)) as Event;
+            }
+            set
+            {
+                if (HasTag(typeof(Event)))
+                    RemoveTag(typeof(Event));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+
+        /// <summary>
+        /// The event Element for JEP-0022 Message events
+        /// </summary>
+        public Delay XDelay
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Delay)) as Delay;
+            }
+            set
+            {
+                if (HasTag(typeof(Delay)))
+                    RemoveTag(typeof(Delay));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+
+        /// <summary>
+        /// Stanza Headers and Internet Metadata
+        /// </summary>
+        public Headers Headers
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Headers)) as Headers;
+            }
+            set
+            {
+                if (HasTag(typeof(Headers)))
+                    RemoveTag(typeof(Headers));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// Nickname Element
+        /// </summary>
+        public Nickname Nickname
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Nickname)) as Nickname;
+            }
+            set
+            {
+                if (HasTag(typeof(Nickname)))
+                    RemoveTag(typeof(Nickname));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+        /// <summary>
+        ///
+        /// </summary>
+        public x.muc.User MucUser
+        {
+            get { return SelectSingleElement(typeof(x.muc.User)) as x.muc.User; }
+            set
+            {
+                if (HasTag(typeof(x.muc.User)))
+                    RemoveTag(typeof(x.muc.User));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+        #region << Chatstate Properties >>   
+
+        public Chatstate Chatstate
+        {
+            get
+            {
+                if (HasTag(typeof(Active)))
+                    return Chatstate.active;
+                else if (HasTag(typeof(Inactive)))
+                    return Chatstate.inactive;
+                else if (HasTag(typeof(Composing)))
+                    return Chatstate.composing;
+                else if (HasTag(typeof(Paused)))
+                    return Chatstate.paused;
+                else if (HasTag(typeof(Gone)))
+                    return Chatstate.gone;
+                else
+                    return Chatstate.None;
+            }
+            set
+            {
+                RemoveChatstate();
+                switch (value)
+                {                    
+                    case Chatstate.active:
+                        AddChild(new Active());
+                        break;
+                    case Chatstate.inactive:
+                        AddChild(new Inactive());
+                        break;
+                    case Chatstate.composing:
+                        AddChild(new Composing());
+                        break;
+                    case Chatstate.paused:
+                        AddChild(new Paused());
+                        break;
+                    case Chatstate.gone:
+                        AddChild(new Gone());
+                        break;
+                }
+            }
+        }
+
+        private void RemoveChatstate()
+        {
+            RemoveTag(typeof(Active));
+            RemoveTag(typeof(Inactive));
+            RemoveTag(typeof(Composing));
+            RemoveTag(typeof(Paused));
+            RemoveTag(typeof(Gone));
+        }      
+        #endregion
+
+        #endregion
+
+        #region << Methods and Functions >>
+#if !CF
+        /// <summary>
+        /// Create a new unique Thread indendifier
+        /// </summary>
+        /// <returns></returns>
+        public string CreateNewThread()
+        {
+            string guid = Guid.NewGuid().ToString().ToLower();
+            Thread = guid;
+            
+            return guid;            
+        }
+#endif        
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/MessageType.cs b/lib/agsxmpp/agsxmpp/protocol/client/MessageType.cs
new file mode 100644
index 0000000..fb47efe
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/MessageType.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.client
+{
+	/// <summary>
+	/// Enumeration that represents the type of a message
+	/// </summary>
+	public enum MessageType
+	{	
+		/// <summary>
+		/// This in a normal message, much like an email. You dont expect a fast
+		/// </summary>
+		normal = -1, 	
+		
+		/// <summary>
+		/// a error messages
+		/// </summary>
+		error,
+ 		
+		/// <summary>
+		/// is for chat like messages, person to person. Send this if you expect a fast reply. reply or no reply at all.
+		/// </summary>
+		chat,
+
+		/// <summary>
+		/// is used for sending/receiving messages from/to a chatroom (IRC style chats) 
+		/// </summary>
+		/// 
+		groupchat,
+		
+        /// <summary>
+		/// Think of this as a news broadcast, or RRS Feed, the message will normally have a URL and Description Associated with it.
+		/// </summary>
+		headline
+	}	
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/Presence.cs b/lib/agsxmpp/agsxmpp/protocol/client/Presence.cs
new file mode 100644
index 0000000..acb9a3c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/Presence.cs
@@ -0,0 +1,263 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.extensions.primary;
+using agsXMPP.protocol.extensions.nickname;
+using agsXMPP.protocol.extensions.caps;
+
+namespace agsXMPP.protocol.client
+{
+	/// <summary>
+	/// Zusammenfassung f�r Presence.
+	/// </summary>
+	public class Presence : Base.Stanza
+    {
+        #region << Constructors >>
+        public Presence()
+		{
+			this.TagName	= "presence";
+			this.Namespace	= Uri.CLIENT;
+		}
+
+		public Presence(ShowType show, string status) : this()
+		{			
+			this.Show		= show;
+			this.Status		= status;
+		}
+
+		public Presence(ShowType show, string status, int priority) : this(show, status)
+		{
+			this.Priority	= priority;
+        }
+        #endregion
+
+        /// <summary>
+        /// The OPTIONAL statuc contains a natural-language description of availability status. 
+        /// It is normally used in conjunction with the show element to provide a detailed description of an availability state 
+        /// (e.g., "In a meeting").
+        /// </summary>
+		public string Status
+		{
+			get { return GetTag("status"); }
+			set { SetTag("status", value); }
+		}
+
+        /// <summary>
+        /// The type of a presence stanza is OPTIONAL. 
+        /// A presence stanza that does not possess a type attribute is used to signal to the server that the sender is online and available 
+        /// for communication. If included, the type attribute specifies a lack of availability, a request to manage a subscription 
+        /// to another entity's presence, a request for another entity's current presence, or an error related to a previously-sent 
+        /// presence stanza.
+        /// </summary>
+		public PresenceType Type
+		{
+			get	
+			{
+				return (PresenceType) GetAttributeEnum("type", typeof(PresenceType));
+			}
+			set
+			{
+				// dont add type="available"
+				if (value == PresenceType.available)
+					RemoveAttribute("type");
+				else
+					SetAttribute("type", value.ToString()); 
+			}
+
+		}
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public agsXMPP.protocol.client.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.client.Error)) as agsXMPP.protocol.client.Error;
+
+            }
+            set
+            {
+                // set type automatically to error
+                Type = PresenceType.error;
+
+                if (HasTag(typeof(agsXMPP.protocol.client.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.client.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The OPTIONAL show element contains non-human-readable XML character data that specifies the particular availability
+        /// status of an entity or specific resource.
+        /// </summary>
+		public ShowType Show
+		{
+			get { return (ShowType) GetTagEnum("show", typeof(ShowType)); }
+			set 
+			{
+                if (value != ShowType.NONE)
+                    SetTag("show", value.ToString());
+                else
+                    RemoveAttribute("show");
+			}
+		}
+		
+		/// <summary>
+        /// The priority level of the resource. The value MUST be an integer between -128 and +127. 
+        /// If no priority is provided, a server SHOULD consider the priority to be zero.         
+		/// </summary>
+        /// <remarks>
+        /// For information regarding the semantics of priority values in stanza routing 
+        /// within instant messaging and presence applications, refer to Server Rules 
+        /// for Handling XML StanzasServer Rules for Handling XML Stanzas.
+        /// </remarks>
+		public int Priority
+		{
+			get 
+			{ 
+				try
+				{
+					return int.Parse(GetTag("priority")); 
+				}
+				catch
+				{
+					return 0;
+				}
+			}
+			set { SetTag("priority", value.ToString()); }
+		}
+
+		public x.Delay XDelay
+		{
+			get	{ return SelectSingleElement(typeof(x.Delay)) as x.Delay; }
+			set	
+            {
+                if (HasTag(typeof(x.Delay)))
+                    RemoveTag(typeof(x.Delay));
+
+                if (value != null)
+                    this.AddChild(value);            
+            }
+		}
+		
+		public bool IsPrimary
+		{
+			get
+			{
+				return GetTag(typeof(Primary)) == null ? false : true;
+			}
+			set
+			{
+				if (value)
+					SetTag(typeof(Primary));
+				else
+					RemoveTag(typeof(Primary));
+			}
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public x.muc.User MucUser
+        {
+            get { return SelectSingleElement(typeof(x.muc.User)) as x.muc.User; }
+            set
+            {
+                if (HasTag(typeof(x.muc.User)))
+                    RemoveTag(typeof(x.muc.User));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+        /// <summary>
+        /// The muc element. Doesn't have much use
+        /// </summary>
+        public x.muc.Muc Muc
+        {
+            get { return SelectSingleElement(typeof(x.muc.Muc)) as x.muc.Muc; }
+            set
+            {
+                if (HasTag(typeof(x.muc.Muc)))
+                    RemoveTag(typeof(x.muc.Muc));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+        /// <summary>
+        /// in case of away, says how long the user was idle
+        /// </summary>
+        public iq.last.Last Last
+        {
+            get { return SelectSingleElement(typeof(iq.last.Last)) as iq.last.Last; }
+            set
+            {
+                if (HasTag(typeof(iq.last.Last)))
+                    RemoveTag(typeof(iq.last.Last));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// Nickname Element
+        /// </summary>
+        public Nickname Nickname
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Nickname)) as Nickname;
+            }
+            set
+            {
+                if (HasTag(typeof(Nickname)))
+                    RemoveTag(typeof(Nickname));
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+              
+        public Capabilities Capabilities
+        {
+            get
+            {
+                return SelectSingleElement<Capabilities>();
+            }
+            set
+            {
+                RemoveTag<Capabilities>();
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/PresenceManager.cs b/lib/agsxmpp/agsxmpp/protocol/client/PresenceManager.cs
new file mode 100644
index 0000000..1b9c10d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/PresenceManager.cs
@@ -0,0 +1,117 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.client
+{
+	/// <summary>
+	/// Helper class for managing presence and subscriptions
+	/// </summary>
+	public class PresenceManager
+	{
+		private XmppClientConnection	m_connection	= null;
+
+		public PresenceManager(XmppClientConnection con)
+		{
+            m_connection = con;			
+		}
+		        
+		/// <summary>
+        /// Subscribe to a contact
+		/// </summary>
+		/// <param name="to">Bare Jid of the rosteritem we want to subscribe</param>
+		public void Subscribe(Jid to)
+		{
+			// <presence to='contact at example.org' type='subscribe'/>
+			Presence pres = new Presence();
+			pres.Type = PresenceType.subscribe;
+			pres.To = to;
+
+			m_connection.Send(pres);
+		}
+        
+        /// <summary>        
+        /// Subscribe to a contact
+        /// </summary>        
+        /// <param name="to">Bare Jid of the rosteritem we want to subscribe</param>
+        /// <param name="message">a message which normally contains the reason why we want to subscibe to this contact</param>
+        public void Subscribe(Jid to, string message)
+        {
+            Presence pres = new Presence();
+            pres.Type = PresenceType.subscribe;
+            pres.To = to;
+            pres.Status = message;
+
+            m_connection.Send(pres);
+        }
+        
+        /// <summary>
+        /// Unsubscribe from a contact
+        /// </summary>
+        /// <param name="to">Bare Jid of the rosteritem we want to unsubscribe</param>
+		public void Unsubscribe(Jid to)
+		{
+			// <presence to='contact at example.org' type='subscribe'/>
+			Presence pres = new Presence();
+			pres.Type = PresenceType.unsubscribe;
+			pres.To = to;
+
+			m_connection.Send(pres);
+		}
+
+		//Example: Approving a subscription request:
+		//<presence to='romeo at example.net' type='subscribed'/>
+		
+        /// <summary>
+        /// Approve a subscription request
+        /// </summary>
+        /// <param name="to">Bare Jid to approve</param>
+        public void ApproveSubscriptionRequest(Jid to)
+		{
+			// <presence to='contact at example.org' type='subscribe'/>
+			Presence pres = new Presence();
+			pres.Type = PresenceType.subscribed;
+			pres.To = to;
+
+			m_connection.Send(pres);
+		}
+
+		//Example: Refusing a presence subscription request:
+		//<presence to='romeo at example.net' type='unsubscribed'/>
+		
+        /// <summary>
+        /// Refuse  subscription request
+        /// </summary>
+        /// <param name="to">Bare Jid to approve</param>
+        public void RefuseSubscriptionRequest(Jid to)
+		{
+			// <presence to='contact at example.org' type='subscribe'/>
+			Presence pres = new Presence();
+			pres.Type = PresenceType.unsubscribed;
+			pres.To = to;
+
+			m_connection.Send(pres);
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/PresenceType.cs b/lib/agsxmpp/agsxmpp/protocol/client/PresenceType.cs
new file mode 100644
index 0000000..efb56ac
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/PresenceType.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.client
+{
+	
+	/// <summary>
+	/// Enumeration for the Presence Type structure. 
+	/// This enum is used to describe what type of Subscription Type the current subscription is.
+	/// When sending a presence or receiving a subscription this type is used to easily identify the type of subscription it is.
+	/// </summary>
+	public enum PresenceType
+	{		
+		/// <summary>
+		/// Used when one wants to send presence to someone/server/transport that you�re available. 
+		/// </summary>
+		available = -1,		
+		
+		/// <summary>
+		/// Used to send a subscription request to someone.
+		/// </summary>
+		subscribe,		
+		
+		/// <summary>
+		/// Used to accept a subscription request.
+		/// </summary>		
+		subscribed,	
+	
+		/// <summary>
+		/// Used to unsubscribe someone from your presence. 
+		/// </summary>
+		unsubscribe,
+		
+		/// <summary>
+		/// Used to deny a subscription request.
+		/// </summary>
+		unsubscribed,		
+		
+		/// <summary>
+		/// Used when one wants to send presence to someone/server/transport that you�re unavailable.
+		/// </summary>
+		unavailable,		
+		
+		/// <summary>
+		/// Used when you want to see your roster, but don't want anyone on you roster to see you
+		/// </summary>
+		invisible,
+		
+		/// <summary>
+		/// presence error
+		/// </summary>
+		error,
+		
+		/// <summary>
+		/// used in server to server protocol to request presences
+		/// </summary>
+		probe
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/client/ShowType.cs b/lib/agsxmpp/agsxmpp/protocol/client/ShowType.cs
new file mode 100644
index 0000000..4313253
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/client/ShowType.cs
@@ -0,0 +1,61 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.client
+{
+	//	# away -- The entity or resource is temporarily away.
+	//	# chat -- The entity or resource is actively interested in chatting.
+	//	# dnd -- The entity or resource is busy (dnd = "Do Not Disturb").
+	//	# xa -- The entity or resource is away for an extended period (xa = "eXtended Away").
+	
+	/// <summary>
+	/// Enumeration that represents the online state.
+	/// </summary>
+	public enum ShowType
+	{
+		/// <summary>
+		/// 
+		/// </summary>
+		NONE = -1,
+		
+		/// <summary>
+		/// The entity or resource is temporarily away.
+		/// </summary>
+		away,
+		
+		/// <summary>
+		/// The entity or resource is actively interested in chatting.
+		/// </summary>
+		chat,
+		
+		/// <summary>
+		/// The entity or resource is busy (dnd = "Do Not Disturb").
+		/// </summary>
+		dnd,
+		
+		/// <summary>
+		/// The entity or resource is away for an extended period (xa = "eXtended Away").
+		/// </summary>
+		xa,
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Error.cs b/lib/agsxmpp/agsxmpp/protocol/component/Error.cs
new file mode 100644
index 0000000..6b2b7ee
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Error.cs
@@ -0,0 +1,66 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.component
+{
+    /// <summary>
+    /// Summary description for Error.
+    /// </summary>
+    public class Error : agsXMPP.protocol.client.Error
+    {
+        public Error() : base()
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+                
+        public Error(int code)
+            : base(code)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Error(agsXMPP.protocol.client.ErrorCode code)
+            : base(code)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Error(agsXMPP.protocol.client.ErrorType type)
+            : base(type)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        /// <summary>
+        /// Creates an error Element according the the condition
+        /// The type attrib as added automatically as decribed in the XMPP specs
+        /// This is the prefered way to create error Elements
+        /// </summary>
+        /// <param name="condition"></param>
+        public Error(agsXMPP.protocol.client.ErrorCondition condition)
+            : base(condition)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Handler.cs b/lib/agsxmpp/agsxmpp/protocol/component/Handler.cs
new file mode 100644
index 0000000..17d1659
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Handler.cs
@@ -0,0 +1,29 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.component
+{
+    public delegate void MessageHandler     (object sender, Message msg);
+    public delegate void PresenceHandler    (object sender, Presence pres);
+    public delegate void IqHandler          (object sender, IQ iq);
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Handshake.cs b/lib/agsxmpp/agsxmpp/protocol/component/Handshake.cs
new file mode 100644
index 0000000..90c3cfc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Handshake.cs
@@ -0,0 +1,65 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.Base;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.component
+{
+	
+	//<handshake>aaee83c26aeeafcbabeabfcbcd50df997e0a2a1e</handshake>
+
+	/// <summary>
+	/// Handshake Element
+	/// </summary>
+	public class Handshake : Stanza
+	{
+		public Handshake()
+		{
+			this.TagName	= "handshake";
+			this.Namespace	= Uri.ACCEPT;			
+		}
+
+		public Handshake(string password, string streamid) : this()
+		{
+			SetAuth(password, streamid);
+		}
+
+		public void SetAuth(string password, string streamId)
+		{
+			this.Value = Util.Hash.Sha1Hash(streamId + password);
+		}
+
+		/// <summary>
+		/// Digest (Hash) for authentication
+		/// </summary>
+		public string Digest
+		{
+			get { return this.Value; }
+			set { this.Value = value; }
+
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/IQ.cs b/lib/agsxmpp/agsxmpp/protocol/component/IQ.cs
new file mode 100644
index 0000000..2d8c34e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/IQ.cs
@@ -0,0 +1,77 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#region Using directives
+
+using System;
+
+#endregion
+
+namespace agsXMPP.protocol.component
+{
+    /// <summary>
+    /// Summary description for Iq.
+    /// </summary>
+    public class IQ : agsXMPP.protocol.client.IQ
+    {
+        #region << Constructors >>
+        public IQ() : base()
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public IQ(agsXMPP.protocol.client.IqType type) : base(type)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public IQ(Jid from, Jid to) : base(from, to)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public IQ(agsXMPP.protocol.client.IqType type, Jid from, Jid to) : base(type, from, to)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+        #endregion
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public new agsXMPP.protocol.component.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.component.Error)) as agsXMPP.protocol.component.Error;
+
+            }
+            set
+            {
+                if (HasTag(typeof(agsXMPP.protocol.component.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.component.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Log.cs b/lib/agsxmpp/agsxmpp/protocol/component/Log.cs
new file mode 100644
index 0000000..3c6a153
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Log.cs
@@ -0,0 +1,92 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.Base;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.component
+{
+	public enum LogType
+	{
+		NONE = -1,	
+		warn,	
+		info,	
+		verbose,	
+		debug,
+		notice
+	}
+
+	/// <summary>
+	/// Zusammenfassung f�r Log.
+	/// </summary>
+	public class Log : Stanza
+	{
+		public Log()
+		{
+			this.TagName	= "log";
+			this.Namespace	= Uri.ACCEPT;	
+		}
+
+		/// <summary>
+		/// creates a new Log Packet with the given message
+		/// </summary>
+		/// <param name="message"></param>
+		public Log(string message) : this()
+		{
+			this.Value = message;
+		}
+		
+
+		/// <summary>
+		/// Gets or Sets the logtype
+		/// </summary>
+		public LogType Type
+		{
+			get 
+			{ 
+				return (LogType) GetAttributeEnum("type", typeof(LogType));
+			}
+			set 
+			{ 
+				if (value == LogType.NONE)
+					RemoveAttribute("type");
+				else
+					SetAttribute("type", value.ToString()); 
+			}
+		}
+
+		/// <summary>
+		/// The namespace for logging
+		/// </summary>
+		public string LogNamespace
+		{
+			get { return GetAttribute("ns"); }
+			set { SetAttribute("ns", value); }
+		}	
+
+	}
+
+
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Message.cs b/lib/agsxmpp/agsxmpp/protocol/component/Message.cs
new file mode 100644
index 0000000..5908c5e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Message.cs
@@ -0,0 +1,183 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#region Using directives
+
+using System;
+
+#endregion
+
+namespace agsXMPP.protocol.component
+{
+    /// <summary>
+    /// Summary description for Message.
+    /// </summary>
+    public class Message : agsXMPP.protocol.client.Message
+    {
+        #region << Constructors >>
+        public Message()
+            : base()
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to)
+            : base(to)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+        
+        public Message(Jid to, string body) 
+            : base(to, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from) 
+            : base(to, from)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, string body) 
+            : base(to, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, string body, string subject)
+            : base(to, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, string body, string subject) 
+            : base(to, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, string body, string subject, string thread)
+            : base(to, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, string body, string subject, string thread)
+            : base(to, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, agsXMPP.protocol.client.MessageType type, string body)
+            : base(to, type, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, agsXMPP.protocol.client.MessageType type, string body)
+            : base(to, type, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, agsXMPP.protocol.client.MessageType type, string body, string subject)
+            : base(to, type, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, agsXMPP.protocol.client.MessageType type, string body, string subject)
+            : base(to, type, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(string to, agsXMPP.protocol.client.MessageType type, string body, string subject, string thread)
+            : base(to, type, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, agsXMPP.protocol.client.MessageType type, string body, string subject, string thread)
+            : base(to, type, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, string body)
+            : base(to, from, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, string body, string subject)
+            : base(to, from, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, string body, string subject, string thread)
+            : base(to, from, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, agsXMPP.protocol.client.MessageType type, string body)
+            : base(to, from, type, body)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, agsXMPP.protocol.client.MessageType type, string body, string subject)
+            : base(to, from, type, body, subject)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Message(Jid to, Jid from, agsXMPP.protocol.client.MessageType type, string body, string subject, string thread)
+            : base(to, from, type, body, subject, thread)
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+        #endregion
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public new agsXMPP.protocol.component.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.component.Error)) as agsXMPP.protocol.component.Error;
+
+            }
+            set
+            {
+                if (HasTag(typeof(agsXMPP.protocol.component.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.component.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Presence.cs b/lib/agsxmpp/agsxmpp/protocol/component/Presence.cs
new file mode 100644
index 0000000..0f70ffc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Presence.cs
@@ -0,0 +1,73 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#region Using directives
+
+using System;
+
+#endregion
+
+namespace agsXMPP.protocol.component
+{
+    /// <summary>
+    /// Summary description for Presence.
+    /// </summary>
+    public class Presence : agsXMPP.protocol.client.Presence
+    {
+        #region << Constructors >>
+        public Presence() : base()
+        {
+            this.Namespace = Uri.ACCEPT;
+        }
+
+        public Presence(agsXMPP.protocol.client.ShowType show, string status) : this()
+        {
+            this.Show = show;
+            this.Status = status;
+        }
+
+        public Presence(agsXMPP.protocol.client.ShowType show, string status, int priority) : this(show, status)
+        {
+            this.Priority = priority;
+        }
+        #endregion
+
+        /// <summary>
+        /// Error Child Element
+        /// </summary>
+        public new agsXMPP.protocol.component.Error Error
+        {
+            get
+            {
+                return SelectSingleElement(typeof(agsXMPP.protocol.component.Error)) as agsXMPP.protocol.component.Error;
+
+            }
+            set
+            {
+                if (HasTag(typeof(agsXMPP.protocol.component.Error)))
+                    RemoveTag(typeof(agsXMPP.protocol.component.Error));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/component/Route.cs b/lib/agsxmpp/agsxmpp/protocol/component/Route.cs
new file mode 100644
index 0000000..e63880b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/component/Route.cs
@@ -0,0 +1,104 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.Base;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.component
+{
+	public enum RouteType
+	{
+		NONE = -1,
+		error,
+		auth,
+		session
+	}
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Route : Stanza
+	{
+		public Route()
+		{
+			this.TagName	= "route";
+			this.Namespace	= Uri.ACCEPT;	
+		}
+
+		public Route(Element route) : this()
+		{
+			RouteElement = route;
+		}
+
+		public Route(Element route, Jid from, Jid to) : this()
+		{
+			RouteElement	= route;
+			From			= from;
+			To				= to;
+		}
+
+		public Route(Element route, Jid from, Jid to, RouteType type) : this()
+		{
+			RouteElement	= route;
+			From			= from;
+			To				= to;
+			Type			= type;
+		}
+
+		/// <summary>
+		/// Gets or Sets the logtype
+		/// </summary>
+		public RouteType Type
+		{
+			get 
+			{ 
+				return (RouteType) GetAttributeEnum("type", typeof(RouteType));
+			}
+			set 
+			{ 
+				if (value == RouteType.NONE)
+					RemoveAttribute("type");
+				else
+					SetAttribute("type", value.ToString()); 
+			}
+		}
+
+		/// <summary>
+		/// sets or gets the element to route
+		/// </summary>
+		public Element RouteElement
+		{
+			get { return this.FirstChild as Element; }
+			set 
+			{
+				if (this.HasChildElements)
+					this.RemoveAllChildNodes();
+                
+                if (value != null)
+				    this.AddChild(value);					
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Action.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Action.cs
new file mode 100644
index 0000000..3a121b2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Action.cs
@@ -0,0 +1,34 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.amp
+{
+    public enum Action
+    {
+        Unknown = -1,
+        alert,
+        drop,
+        error,
+        notify
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Amp.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Amp.cs
new file mode 100644
index 0000000..9d182ed
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Amp.cs
@@ -0,0 +1,114 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.amp
+{
+    /*
+        <xs:element name='amp'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element ref='rule' minOccurs='1' maxOccurs='unbounded'/>
+              </xs:sequence>
+              <xs:attribute name='from' usage='optional' type='xs:string'/>
+              <xs:attribute name='per-hop' use='optional' type='xs:bool' default='false'/>
+              <xs:attribute name='status' usage='optional' type='xs:NCName'/>
+              <xs:attribute name='to' usage='optional' type='xs:string'/>
+            </xs:complexType>
+        </xs:element>
+    */
+    
+    public class Amp : Base.DirectionalElement
+    {
+        public Amp()
+        {
+            this.TagName = "amp";
+            this.Namespace = Uri.AMP;
+        }
+
+        /// <summary>
+        /// The 'status' attribute specifies the reason for the amp element.
+        /// When specifying semantics to be applied (client to server), this attribute MUST NOT be present. 
+        /// When replying to a sending entity regarding a met condition, this attribute MUST be present and 
+        /// SHOULD be the value of the 'action' attribute for the triggered rule. 
+        /// (Note: Individual action definitions MAY provide their own requirements.)
+        /// </summary>
+        public Action Status
+        {
+            get
+            {
+                return (Action) GetAttributeEnum("status", typeof(Action));
+            }
+            set
+            {
+                if (value == Action.Unknown)
+                    RemoveAttribute("status");
+                else
+                    SetAttribute("status", value.ToString());
+            }
+        }
+
+        /// <summary>
+        /// The 'per-hop' attribute flags the contained ruleset for processing at each server in the route 
+        /// between the original sender and original intended recipient. 
+        /// This attribute MAY be present, and MUST be either "true" or "false". 
+        /// If not present, the default is "false".
+        /// </summary>
+        public bool PerHop
+        {
+            get { return GetAttributeBool("per-hop"); }
+            set { SetAttribute("per-hop", value); }
+        }
+
+        public void AddRule(Rule rule)
+        {
+            AddChild(rule);
+        }
+
+        public Rule AddRule()
+        {
+            Rule rule = new Rule();
+            AddChild(rule);
+
+            return rule;
+        }
+
+        /// <summary>
+        /// Gets a list of all form fields
+        /// </summary>
+        /// <returns></returns>
+        public Rule[] GetRules()
+        {
+            ElementList nl = SelectElements(typeof(Rule));
+            Rule[] items = new Rule[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Rule)e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Condition.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Condition.cs
new file mode 100644
index 0000000..fb70efd
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Condition.cs
@@ -0,0 +1,33 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.amp
+{
+    public enum Condition
+    {
+        Unknown         = -1,
+        Deliver,
+        ExprireAt,
+        MatchResource
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Rule.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Rule.cs
new file mode 100644
index 0000000..07f224f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/amp/Rule.cs
@@ -0,0 +1,114 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.amp
+{
+    public class Rule : Element
+    {
+        public Rule()
+        {
+            this.TagName = "rule";
+            this.Namespace = Uri.AMP;
+        }
+
+        public Rule(Condition condition, string val, Action action)
+            : this()
+        {
+            Condition   = condition;
+            Val         = val;
+            Action      = action;
+        }
+
+        /// <summary>
+        /// The 'value' attribute defines how the condition is matched. 
+        /// This attribute MUST be present, and MUST NOT be an empty string (""). 
+        /// The interpretation of this attribute's value is determined by the 'condition' attribute.
+        /// </summary>
+        public string Val
+        {
+            get { return GetAttribute("value"); }
+            set { SetAttribute("value", value); }
+        }
+
+        /// <summary>
+        /// The 'action' attribute defines the result for this rule. 
+        /// This attribute MUST be present, and MUST be either a value defined in the Defined Actions section, 
+        /// or one registered with the XMPP Registrar.
+        /// </summary>
+        public Action Action
+        {
+            get
+            {
+                return (Action) GetAttributeEnum("action", typeof(Action));
+            }
+            set
+            {
+                if (value ==Action.Unknown)
+                    RemoveAttribute("action");
+                else
+                    SetAttribute("action", value.ToString());
+            }
+        }
+
+        /// <summary>
+        /// The 'condition' attribute defines the overall condition this rule applies to. 
+        /// This attribute MUST be present, and MUST be either a value defined in the Defined Conditions section, 
+        /// or one registered with the XMPP Registrar.
+        /// </summary>
+        public Condition Condition
+        {
+            get
+            {
+                switch (GetAttribute("condition"))
+                {
+                    case "deliver":
+                        return Condition.Deliver;                       
+                    case "expire-at":
+                        return Condition.ExprireAt;                        
+                    case "match-resource":
+                        return Condition.MatchResource;                      
+                    default:
+                        return Condition.Unknown;
+                }
+            }
+
+            set
+            {
+                switch (value)
+                {
+                    case Condition.Deliver:
+                        SetAttribute("condition", "deliver");
+                        break;
+                    case Condition.ExprireAt:
+                        SetAttribute("condition", "expire-at");
+                        break;
+                    case Condition.MatchResource:
+                        SetAttribute("condition", "match-resource");
+                        break;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/BookmarkManager.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/BookmarkManager.cs
new file mode 100644
index 0000000..fc177e8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/BookmarkManager.cs
@@ -0,0 +1,178 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    public class BookmarkManager
+    {
+        private XmppClientConnection	m_connection	= null;
+
+        
+        public BookmarkManager(XmppClientConnection con)
+        {
+            m_connection = con;
+        }
+        
+        #region << Request Bookmarks >>
+        /// <summary>
+        /// Request the bookmarks from the storage on the server
+        /// </summary>
+        public void RequestBookmarks()
+        {
+            RequestBookmarks(null, null);
+        }
+
+        /// <summary>
+        /// Request the bookmarks from the storage on the server
+        /// </summary>
+        /// <param name="cb"></param>
+        public void RequestBookmarks(IqCB cb)
+        {
+            RequestBookmarks(cb, null);
+        }
+
+        /// <summary>
+        /// Request the bookmarks from the storage on the server
+        /// </summary>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void RequestBookmarks(IqCB cb, object cbArgs)
+        {
+            StorageIq siq = new StorageIq(IqType.get);
+                      
+            if (cb == null)
+                m_connection.Send(siq);
+            else
+                m_connection.IqGrabber.SendIq(siq, cb, cbArgs);
+        }
+        #endregion
+
+
+        #region << Store Bookmarks >>
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        public void StoreBookmarks(Url[] urls)
+        {
+            StoreBookmarks(urls, null, null, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        /// <param name="cb"></param>
+        public void StoreBookmarks(Url[] urls, IqCB cb)
+        {
+            StoreBookmarks(urls, null, cb, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void StoreBookmarks(Url[] urls, IqCB cb, object cbArgs)
+        {
+            StoreBookmarks(urls, null, cb, cbArgs);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="conferences"></param>
+        public void StoreBookmarks(Conference[] conferences)
+        {
+            StoreBookmarks(null, conferences, null, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="conferences"></param>
+        /// <param name="cb"></param>
+        public void StoreBookmarks(Conference[] conferences, IqCB cb)
+        {
+            StoreBookmarks(null, conferences, cb, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="conferences"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void StoreBookmarks(Conference[] conferences, IqCB cb, object cbArgs)
+        {
+            StoreBookmarks(null, conferences, cb, cbArgs);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        /// <param name="conferences"></param>
+        public void StoreBookmarks(Url[] urls, Conference[] conferences)
+        {
+            StoreBookmarks(urls, conferences, null, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        /// <param name="conferences"></param>
+        /// <param name="cb"></param>
+        public void StoreBookmarks(Url[] urls, Conference[] conferences, IqCB cb)
+        {
+            StoreBookmarks(urls, conferences, cb, null);
+        }
+
+        /// <summary>
+        /// Send booksmarks to the server storage
+        /// </summary>
+        /// <param name="urls"></param>
+        /// <param name="conferences"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void StoreBookmarks(Url[] urls, Conference[] conferences, IqCB cb, object cbArgs)
+        {
+            StorageIq siq = new StorageIq(IqType.set);
+            
+            if (urls != null)
+                siq.Query.Storage.AddUrls(urls);
+
+            if (conferences != null)
+                siq.Query.Storage.AddConferences(conferences);
+
+            if (cb == null)
+                m_connection.Send(siq);
+            else
+                m_connection.IqGrabber.SendIq(siq, cb, cbArgs);
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Conference.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Conference.cs
new file mode 100644
index 0000000..33946ea
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Conference.cs
@@ -0,0 +1,120 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// One of the most common uses of bookmarks will likely be to bookmark 
+    /// conference rooms on various Jabber servers
+    /// </summary>
+    public class Conference : Element
+    {
+        /*
+             <iq type='result' id='2'>
+               <query xmlns='jabber:iq:private'>
+                 <storage xmlns='storage:bookmarks'>
+                   <conference name='Council of Oberon' 
+                               autojoin='true'
+                               jid='council at conference.underhill.org'>
+                     <nick>Puck</nick>
+                     <password>titania</password>
+                   </conference>
+                 </storage>
+               </query>
+             </iq>   
+         */
+        public Conference()
+        {
+            this.TagName    = "conference";
+            this.Namespace  = Uri.STORAGE_BOOKMARKS;   
+        }
+
+        public Conference(Jid jid, string name) : this()
+        {
+            Jid     = jid;
+            Name    = name;
+        }
+
+        public Conference(Jid jid, string name, string nickname) : this( jid, name)
+        {
+            Nickname = nickname;            
+        }
+
+        public Conference(Jid jid, string name, string nickname, string password) : this(jid, name, nickname)
+        {
+            Password = password;
+        }
+
+        public Conference(Jid jid, string name, string nickname, string password, bool autojoin) : this(jid, name, nickname, password)
+        {
+            AutoJoin = autojoin;
+        }
+
+        /// <summary>
+        /// A name/description for this bookmarked room
+        /// </summary>
+        public string Name
+        {
+            get { return GetAttribute("name"); }
+            set { SetAttribute("name", value); }
+        }
+
+        /// <summary>
+        /// Should the client join this room automatically after successfuil login?
+        /// </summary>
+        public bool AutoJoin
+        {
+            get { return GetAttributeBool("autojoin"); }
+            set { SetAttribute("autojoin", value); }
+        }
+
+        /// <summary>
+        /// The Jid of the bookmarked room
+        /// </summary>
+        public Jid Jid
+        {
+            get { return GetAttributeJid("jid"); }
+            set { SetAttribute("jid", value); }
+        }
+
+        /// <summary>
+        /// The Nickname for this room
+        /// </summary>
+        public string Nickname
+        {
+            get { return GetTag("nick"); }
+            set { SetTag("nick", value); }
+        }
+
+        /// <summary>
+        /// The password for password protected rooms
+        /// </summary>
+        public string Password
+        {
+            get { return GetTag("password"); }
+            set { SetTag("password", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNote.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNote.cs
new file mode 100644
index 0000000..342e720
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNote.cs
@@ -0,0 +1,91 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// Annotations are stored using server-side private XML storage. 
+    /// A storage element contains a collection of one or more notes elements, 
+    /// each representing a note about a given entity.
+    /// </summary>
+    public class RosterNote : Element
+    {
+        /*
+             <iq type='result' id='a2'>
+                <query xmlns='jabber:iq:private'>
+                    <storage xmlns='storage:rosternotes'>
+                        <note jid='hamlet at shakespeare.lit'
+                            cdate='2004-09-24T15:23:21Z'
+                            mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
+                        <note jid='juliet at capulet.com'
+                            cdate='2004-09-27T17:23:14Z'
+                            mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
+                    </storage>
+                </query>
+            </iq> 
+         */
+        public RosterNote()
+        {
+            TagName    = "note";
+            Namespace = Uri.STORAGE_ROSTERNOTES;
+        }
+
+
+        public RosterNote(Jid jid, DateTime cdate, DateTime mdate, string note) : this()
+        {
+            Jid = jid;
+            CreationDate = cdate;
+            ModificationDate = mdate;
+            Value = note;
+        }
+
+        /// <summary>
+        /// Creation date time
+        /// </summary>
+        public DateTime CreationDate
+        {
+            get { return Util.Time.ISO_8601Date(GetAttribute("cdate")); }
+            set { SetAttribute("cdate", Util.Time.ISO_8601Date(value)); }
+        }
+
+        /// <summary>
+        /// Modification date tiime
+        /// </summary>
+        public DateTime ModificationDate
+        {
+            get { return Util.Time.ISO_8601Date(GetAttribute("mdate")); }
+            set { SetAttribute("mdate", Util.Time.ISO_8601Date(value)); }
+        }
+
+        /// <summary>
+        /// The Jid of the bookmarked room
+        /// </summary>
+        public Jid Jid
+        {
+            get { return GetAttributeJid("jid"); }
+            set { SetAttribute("jid", value); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNotes.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNotes.cs
new file mode 100644
index 0000000..6b4f310
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/RosterNotes.cs
@@ -0,0 +1,94 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class RosterNotes : Element
+    {
+        /*
+            <iq type='result' id='a2'>
+                <query xmlns='jabber:iq:private'>
+                    <storage xmlns='storage:rosternotes'>
+                        <note jid='hamlet at shakespeare.lit'
+                            cdate='2004-09-24T15:23:21Z'
+                            mdate='2004-09-24T15:23:21Z'>Seems to be a good writer</note>
+                        <note jid='juliet at capulet.com'
+                            cdate='2004-09-27T17:23:14Z'
+                            mdate='2004-09-28T12:43:12Z'>Oh my sweetest love ...</note>
+                    </storage>
+                </query>
+            </iq> 
+        */
+        public RosterNotes()
+        {
+            TagName    = "storage";
+            Namespace = Uri.STORAGE_ROSTERNOTES;
+        }
+
+        /// <summary>
+        /// Add a note to the storage object
+        /// </summary>
+        /// <param name="note">The note.</param>
+        /// <returns></returns>
+        public RosterNote AddNote(RosterNote note)
+        {
+            AddChild(note);
+            return note;
+        }
+
+        /// <summary>
+        /// Add a note to the storage object
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="cdate"></param>
+        /// <param name="mdate"></param>
+        /// <param name="note"></param>
+        /// <returns></returns>
+        public RosterNote AddNote(Jid jid, DateTime cdate, DateTime mdate, string note)
+        {
+            return AddNote(new RosterNote(jid, cdate, mdate, note));
+        }
+
+        /// <summary>
+        /// get all roster notes
+        /// </summary>
+        /// <returns></returns>
+        public RosterNote[] GetRosterNotes()
+        {
+            ElementList nl = SelectElements(typeof(RosterNote));
+            RosterNote[] items = new RosterNote[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (RosterNote)e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Storage.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Storage.cs
new file mode 100644
index 0000000..a865e09
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Storage.cs
@@ -0,0 +1,188 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Storage : Element
+    {
+        /*
+            <iq type='result' id='2'>
+              <query xmlns='jabber:iq:private'>
+                <storage xmlns='storage:bookmarks'>
+                  <conference name='Council of Oberon' 
+                              autojoin='true'
+                              jid='council at conference.underhill.org'>
+                    <nick>Puck</nick>
+                    <password>titania</password>
+                  </conference>
+                </storage>
+              </query>
+            </iq>   
+        */
+        public Storage()
+        {
+            TagName    = "storage";
+            Namespace  = Uri.STORAGE_BOOKMARKS;
+        }
+        
+        /// <summary>
+        /// Add a conference bookmark to the storage object
+        /// </summary>
+        /// <param name="conf"></param>
+        /// <returns></returns>
+        public Conference AddConference(Conference conf)
+        {
+            AddChild(conf);
+            return conf;
+        }
+
+        /// <summary>
+        /// Add a conference bookmark to the storage object
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public Conference AddConference(Jid jid, string name)
+        {
+            return AddConference(new Conference(jid, name));
+        }
+
+        /// <summary>
+        /// Add a conference bookmark to the storage object
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="name"></param>
+        /// <param name="nickname"></param>
+        /// <returns></returns>
+        public Conference AddConference(Jid jid, string name, string nickname)
+        {
+            return AddConference(new Conference(jid, name, nickname));
+        }
+
+        /// <summary>
+        /// Add a conference bookmark to the storage object
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="name"></param>
+        /// <param name="nickname"></param>
+        /// <param name="password"></param>
+        /// <returns></returns>
+        public Conference AddConference(Jid jid, string name, string nickname, string password)
+        {
+            return AddConference(new Conference(jid, name, nickname, password));
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="name"></param>
+        /// <param name="nickname"></param>
+        /// <param name="password"></param>
+        /// <param name="autojoin"></param>
+        /// <returns></returns>
+        public Conference AddConference(Jid jid, string name, string nickname, string password, bool autojoin)
+        {
+            return AddConference(new Conference(jid, name, nickname, password, autojoin));
+        }
+
+        /// <summary>
+        /// add multiple conference bookmarks
+        /// </summary>
+        /// <param name="confs"></param>
+        public void AddConferences(Conference[] confs)
+        {
+            foreach (Conference conf in confs)
+            {
+                AddConference(conf);
+            }
+        }
+
+        /// <summary>
+        /// get all conference booksmarks
+        /// </summary>
+        /// <returns></returns>
+        public Conference[] GetConferences()
+        {
+            ElementList nl = SelectElements(typeof(Conference));
+            Conference[] items = new Conference[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Conference)e;
+                i++;
+            }
+            return items;
+        }
+
+        /// <summary>
+        /// add a url bookmark
+        /// </summary>
+        /// <param name="url"></param>
+        /// <returns></returns>
+        public Url AddUrl(Url url)
+        {
+            AddChild(url);
+            return url;
+        }
+
+        public Url AddUrl(string address, string name)
+        {
+            return AddUrl(new Url(address, name));            
+        }
+
+        /// <summary>
+        /// add multiple url bookmarks
+        /// </summary>
+        /// <param name="urls"></param>
+        public void AddUrls(Url[] urls)
+        {
+            foreach (Url url in urls)
+            {
+                AddUrl(url);
+            }           
+        }
+
+        /// <summary>
+        /// Get all url bookmarks
+        /// </summary>
+        /// <returns></returns>
+        public Url[] GetUrls()
+        {
+            ElementList nl = SelectElements(typeof(Url));
+            Url[] items = new Url[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Url) e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/StorageIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/StorageIq.cs
new file mode 100644
index 0000000..48e9677
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/StorageIq.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.iq. at private;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class StorageIq : PrivateIq
+    {
+        public StorageIq()
+        {
+            this.Query.AddChild(new Storage());
+        }
+
+        public StorageIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public StorageIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+        public StorageIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Url.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Url.cs
new file mode 100644
index 0000000..4b7807a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bookmarks/Url.cs
@@ -0,0 +1,68 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bookmarks
+{
+    /// <summary>
+    /// URLs are fairly simple, as they only need to store a URL and a title, 
+    /// and the client then can simply launch the appropriate browser.
+    /// </summary>
+    public class Url : Element
+    {
+        /*
+            <url name='Complete Works of Shakespeare'
+         url='http://the-tech.mit.edu/Shakespeare/'/>
+        */
+        public Url()
+        {
+            this.TagName    = "url";
+            this.Namespace  = Uri.STORAGE_BOOKMARKS;   
+        }
+
+        public Url(string address, string name) : this()
+        {
+            Address = address;
+            Name    = name;
+        }
+
+        /// <summary>
+        /// A description/name for this bookmark
+        /// </summary>
+        public string Name
+        {
+            get { return GetAttribute("name"); }
+            set { SetAttribute("name", value); }
+        }
+
+        /// <summary>
+        /// The url address to store e.g. http://www.ag-software,de/
+        /// </summary>
+        public string Address
+        {
+            get { return GetAttribute("url"); }
+            set { SetAttribute("url", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/Body.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/Body.cs
new file mode 100644
index 0000000..7f0525b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/Body.cs
@@ -0,0 +1,223 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bosh
+{
+    
+    public class Body : Element
+    {
+        public Body()
+        {
+            this.TagName = "body";
+            this.Namespace = Uri.HTTP_BIND;
+        }
+
+        /*
+        POST /webclient HTTP/1.1
+        Host: httpcm.jabber.org
+        Accept-Encoding: gzip, deflate
+        Content-Type: text/xml; charset=utf-8
+        Content-Length: 153
+
+        <body rid='1249243564'
+              sid='SomeSID'
+              type='terminate'
+              xmlns='http://jabber.org/protocol/httpbind'>
+          <presence type='unavailable'
+                    xmlns='jabber:client'/>
+        </body>
+        
+        HTTP/1.1 200 OK
+        Content-Type: text/xml; charset=utf-8
+        Content-Length: 128
+
+        <body authid='ServerStreamID'
+              wait='60'
+              inactivity='30'
+              polling='5'
+              requests='2'
+              accept='deflate,gzip'
+              sid='SomeSID'
+              secure='true'
+              stream='firstStreamName'
+              charsets='ISO_8859-1 ISO-2022-JP'
+              xmlns='http://jabber.org/protocol/httpbind'/>
+        */
+        
+        public string Sid
+        {
+            get { return GetAttribute("sid"); }
+            set { SetAttribute("sid", value); }
+        }
+         
+        public long Rid
+        {
+            get { return GetAttributeLong("rid"); }
+            set { SetAttribute("rid", value); }
+        }
+
+        public long Ack
+        {
+            get { return GetAttributeLong("ack"); }
+            set { SetAttribute("ack", value); }
+        }
+
+        public bool Secure
+        {
+            get { return GetAttributeBool("secure"); }
+            set { SetAttribute("secure", value); }
+        }
+
+        /// <summary>
+        /// Specifies the longest time (in seconds) that the connection manager is allowed to wait before responding to any request 
+        /// during the session. This enables the client to limit the delay before it discovers any network failure, 
+        /// and to prevent its HTTP/TCP connection from expiring due to inactivity.
+        /// </summary>
+        public int Wait
+        {
+            get { return GetAttributeInt("wait"); }
+            set { SetAttribute("wait", value); }
+        }
+
+        /// <summary>
+        /// If the connection manager supports session pausing (inactivity) then it SHOULD advertise that to the client by including a 'maxpause'
+        /// attribute in the session creation response element. The value of the attribute indicates the maximum length of a temporary 
+        /// session pause (in seconds) that a client MAY request.
+        /// </summary>
+        public int MaxPause
+        {
+            get { return GetAttributeInt("maxpause"); }
+            set { SetAttribute("maxpause", value); }
+        }
+
+        public int Inactivity
+        {
+            get { return GetAttributeInt("inactivity"); }
+            set { SetAttribute("inactivity", value); }
+        }
+
+        public int Polling
+        {
+            get { return GetAttributeInt("polling"); }
+            set { SetAttribute("polling", value); }
+        }
+
+        public int Requests
+        {
+            get { return GetAttributeInt("requests"); }
+            set { SetAttribute("requests", value); }
+        }
+
+        /// <summary>
+        /// Specifies the target domain of the first stream.
+        /// </summary>
+        public Jid To
+        {
+            get { return GetAttributeJid("to"); }
+            set { SetAttribute("to", value); }
+        }
+
+        public Jid From
+        {
+            get { return GetAttributeJid("from"); }
+            set { SetAttribute("from", value); }
+        }
+
+        /// <summary>
+        /// specifies the maximum number of requests the connection manager is allowed to keep waiting at any one time during the session. 
+        /// If the client is not able to use HTTP Pipelining then this SHOULD be set to "1".
+        /// </summary>
+        public int Hold
+        {
+            get { return GetAttributeInt("hold"); }
+            set { SetAttribute("hold", value); }
+        }             
+        
+        /// <summary>
+        /// <para>
+        /// Specifies the highest version of the BOSH protocol that the client supports. 
+        /// The numbering scheme is "<major>.<minor>" (where the minor number MAY be incremented higher than a single digit, 
+        /// so it MUST be treated as a separate integer).
+        /// </para>
+        /// <remarks>
+        /// The 'ver' attribute should not be confused with the version of any protocol being transported.
+        /// </remarks>
+        /// </summary>
+        public string Version
+        {
+            get { return GetAttribute("ver"); }
+            set { SetAttribute("ver", value); }
+        }
+
+        public string NewKey
+        {
+            get { return GetAttribute("newkey"); }
+            set { SetAttribute("newkey", value); }
+        }
+
+        public string Key
+        {
+            get { return GetAttribute("key"); }
+            set { SetAttribute("key", value); }
+        }
+
+        public BoshType Type
+        {
+            get { return (BoshType) GetAttributeEnum("type", typeof(BoshType)); }
+            set
+            {
+                if (value == BoshType.NONE)
+                    RemoveAttribute("type");
+                else
+                    SetAttribute("type", value.ToString());
+            }
+        }
+
+        public string XmppVersion
+        {
+            get { return GetAttribute("xmpp:version"); }
+            set 
+            {
+                AddBoshNamespace();
+                SetAttribute("xmpp:version", value); 
+            }
+        }
+
+        public bool XmppRestart
+        {
+            get { return GetAttributeBool("xmpp:restart"); }
+            set
+            {
+                AddBoshNamespace();
+                SetAttribute("xmpp:restart", value); 
+            }
+        }
+
+        internal void AddBoshNamespace()
+        {
+            this.SetAttribute("xmlns:xmpp", "urn:xmpp:xbosh"); 
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/BoshType.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/BoshType.cs
new file mode 100644
index 0000000..d306c11
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bosh/BoshType.cs
@@ -0,0 +1,30 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+namespace agsXMPP.protocol.extensions.bosh
+{
+    public enum BoshType
+    {
+        NONE = -1,
+        error,
+        terminate
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Activate.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Activate.cs
new file mode 100644
index 0000000..9199470
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Activate.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    public class Activate : Element
+    {
+        public Activate()
+        {
+            this.TagName    = "activate";
+            this.Namespace  = Uri.BYTESTREAMS;
+        }
+
+        public Activate(Jid jid) : this()
+        {
+            Jid = jid;
+        }
+
+        /// <summary>
+        /// the full JID of the Target to activate
+        /// </summary>
+        public Jid Jid
+        {
+            get
+            {
+                if (Value == null)
+                    return null;
+                else
+                    return new Jid(Value);
+            }
+            set
+            {
+                if (value != null)
+                    Value = value.ToString();
+                else
+                    Value = null;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStream.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStream.cs
new file mode 100644
index 0000000..b2d99e4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStream.cs
@@ -0,0 +1,212 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /*
+        <iq type='set' 
+           from='initiator at host1/foo' 
+           to='proxy.host3' 
+           id='activate'>
+           <query xmlns='http://jabber.org/protocol/bytestreams' sid='mySID'>
+               <activate>target at host2/bar</activate>
+           </query>
+        </iq>
+     
+      
+        <xs:element name='query'>
+           <xs:complexType>
+             <xs:choice>
+               <xs:element ref='streamhost' minOccurs='0' maxOccurs='unbounded'/>
+               <xs:element ref='streamhost-used' minOccurs='0'/>
+               <xs:element name='activate' type='empty' minOccurs='0'/>
+             </xs:choice>
+             <xs:attribute name='sid' type='xs:string' use='optional'/>
+             <xs:attribute name='mode' use='optional' default='tcp'>
+               <xs:simpleType>
+                 <xs:restriction base='xs:NCName'>
+                   <xs:enumeration value='tcp'/>
+                   <xs:enumeration value='udp'/>
+                 </xs:restriction>
+               </xs:simpleType>
+             </xs:attribute>
+           </xs:complexType>
+        </xs:element>
+    */
+
+    /// <summary>
+	/// ByteStreams
+	/// </summary>
+	public class ByteStream : Element
+	{
+		public ByteStream()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.BYTESTREAMS;
+		}
+
+        public string Sid
+        {
+            set
+            {
+                SetAttribute("sid", value);
+            }
+            get
+            {
+                return GetAttribute("sid");
+            }
+        }
+
+        public Mode Mode
+        {
+            get { return (Mode) GetAttributeEnum("mode", typeof(Mode)); }
+            set
+            {
+                if (value != Mode.NONE)
+                    SetAttribute("mode", value.ToString());
+                else
+                    RemoveAttribute("mode");
+            }
+        }
+
+        /// <summary>
+        /// Add a StreamHost
+        /// </summary>
+        /// <returns></returns>
+        public StreamHost AddStreamHost()
+        {
+            StreamHost sh = new StreamHost();
+            AddChild(sh);
+            return sh;
+        }
+
+        /// <summary>
+        /// Add a StreamHost
+        /// </summary>
+        /// <param name="sh"></param>
+        /// <returns></returns>
+        public StreamHost AddStreamHost(StreamHost sh)
+        {            
+            AddChild(sh);
+            return sh;
+        }
+
+        /// <summary>
+        /// Add a StreamHost
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="host"></param>
+        /// <returns></returns>
+        public StreamHost AddStreamHost(Jid jid, string host)
+        {
+            StreamHost sh = new StreamHost(jid, host);
+            AddChild(sh);
+            return sh;
+        }
+
+        /// <summary>
+        /// Add a StreamHost
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="host"></param>
+        /// <param name="port"></param>
+        /// <returns></returns>
+        public StreamHost AddStreamHost(Jid jid, string host, int port)
+        {
+            StreamHost sh = new StreamHost(jid, host, port);
+            AddChild(sh);
+            return sh;
+        }
+
+        /// <summary>
+        /// Add a StreamHost
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="host"></param>
+        /// <param name="port"></param>
+        /// <param name="zeroconf"></param>
+        /// <returns></returns>
+        public StreamHost AddStreamHost(Jid jid, string host, int port, string zeroconf)
+        {
+            StreamHost sh = new StreamHost(jid, host, port, zeroconf);
+            AddChild(sh);
+            return sh;
+        }
+        
+        /// <summary>
+        /// Get the list of streamhosts
+        /// </summary>
+        /// <returns></returns>
+        public StreamHost[] GetStreamHosts()
+        {
+            ElementList nl = SelectElements(typeof(StreamHost));
+            StreamHost[] hosts = new StreamHost[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                hosts[i] = (StreamHost) e;
+                i++;
+            }
+            return hosts;
+        }
+        
+        
+        /// <summary>
+        /// The activate Element
+        /// </summary>
+        public Activate Activate
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Activate)) as Activate;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Activate)))
+                    RemoveTag(typeof(Activate));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public StreamHostUsed StreamHostUsed
+        {
+            get
+            {
+                return SelectSingleElement(typeof(StreamHostUsed)) as StreamHostUsed;
+            }
+            set
+            {
+                if (HasTag(typeof(StreamHostUsed)))
+                    RemoveTag(typeof(StreamHostUsed));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStreamIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStreamIq.cs
new file mode 100644
index 0000000..07f09ea
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/ByteStreamIq.cs
@@ -0,0 +1,71 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /// <summary>
+    /// a Bytestream IQ
+    /// </summary>
+    public class ByteStreamIq : IQ
+    {
+        private ByteStream m_ByteStream = new ByteStream();
+
+        public ByteStreamIq()
+        {
+            base.Query = m_ByteStream;
+            this.GenerateId(); 
+        }
+
+        public ByteStreamIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public ByteStreamIq(IqType type, Jid to)
+            : this(type)
+        {
+            this.To = to;
+        }
+
+        public ByteStreamIq(IqType type, Jid to, Jid from)
+            : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public ByteStreamIq(IqType type, Jid to, Jid from, string Id)
+            : this(type, to, from)
+        {
+            this.Id = Id;
+        }
+
+        public new ByteStream Query
+        {
+            get
+            {
+                return m_ByteStream;
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Mode.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Mode.cs
new file mode 100644
index 0000000..aa99326
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/Mode.cs
@@ -0,0 +1,35 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /// <summary>
+    /// The Mode for the bytestream socket layer (tcp or udp)
+    /// </summary>
+    public enum Mode
+    {
+        NONE = -1,
+        tcp,
+        udp
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHost.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHost.cs
new file mode 100644
index 0000000..39b759c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHost.cs
@@ -0,0 +1,120 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /*
+        <streamhost 
+            jid='proxy.host3' 
+            host='24.24.24.1' 
+            zeroconf='_jabber.bytestreams'/>
+        <xs:element name='streamhost'>
+            <xs:complexType>
+              <xs:simpleContent>
+                <xs:extension base='empty'>
+                  <xs:attribute name='jid' type='xs:string' use='required'/>
+                  <xs:attribute name='host' type='xs:string' use='required'/>
+                  <xs:attribute name='zeroconf' type='xs:string' use='optional'/>
+                  <xs:attribute name='port' type='xs:string' use='optional'/>
+                </xs:extension>
+              </xs:simpleContent>
+            </xs:complexType>
+        </xs:element>
+    */
+    public class StreamHost : Element
+    {
+        public StreamHost()
+        {
+            this.TagName    = "streamhost";
+            this.Namespace  = Uri.BYTESTREAMS;
+        }
+
+        public StreamHost(Jid jid, string host) : this()
+        {
+            Jid     = jid;
+            Host    = host;
+        }
+
+        public StreamHost(Jid jid, string host, int port) : this(jid, host)            
+        {            
+            Port    = port;
+        }
+
+        public StreamHost(Jid jid, string host, int port, string zeroconf) : this(jid, host, port)
+        {
+            Zeroconf = zeroconf;
+        }
+
+        /// <summary>
+        /// a port associated with the hostname or IP address for SOCKS5 communications over TCP
+        /// </summary>
+        public int Port
+        {
+            get { return GetAttributeInt("port"); }
+            set { SetAttribute("port", value); }
+        }
+
+        /// <summary>
+        /// the hostname or IP address of the StreamHost for SOCKS5 communications over TCP
+        /// </summary>
+        public string Host
+        {
+            get { return GetAttribute("host"); }
+            set { SetAttribute("host", value); }
+        }
+        
+        /// <summary>
+        /// The XMPP/Jabber id of the streamhost
+        /// </summary>
+        public Jid Jid
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+                else
+                    RemoveAttribute("jid");
+            }
+        }
+
+        /// <summary>
+        /// a zeroconf [5] identifier to which an entity may connect, for which the service identifier and 
+        /// protocol name SHOULD be "_jabber.bytestreams".
+        /// </summary>
+        public string Zeroconf
+        {
+            get { return GetAttribute("zeroconf"); }
+            set { SetAttribute("zeroconf", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHostUsed.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHostUsed.cs
new file mode 100644
index 0000000..da8a38c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/StreamHostUsed.cs
@@ -0,0 +1,82 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /*
+        <iq type='result' 
+            from='target at host2/bar' 
+            to='initiator at host1/foo' 
+            id='initiate'>
+          <query xmlns='http://jabber.org/protocol/bytestreams'>
+            <streamhost-used jid='proxy.host3'/>
+          </query>
+        </iq>
+    */
+
+    /// <summary>
+    /// The <streamhost-used/> element indicates the StreamHost connected to. 
+    /// This element has a single attribute for the JID of the StreamHost to which the Target connected. 
+    /// This element MUST NOT contain any content node.
+    /// The "jid" attribute specifies the full JID of the StreamHost. 
+    /// This attribute MUST be present, and MUST be a valid JID for use with an <iq/>.
+    /// </summary>
+    public class StreamHostUsed : Element
+    {
+        public StreamHostUsed()
+        {
+            this.TagName    = "streamhost-used";
+            this.Namespace  = Uri.BYTESTREAMS;
+        }
+        
+        public StreamHostUsed(Jid jid) : this()
+        {
+            Jid = jid;
+        }        
+
+        /// <summary>
+        /// Jid of the streamhost
+        /// </summary>
+        public Jid Jid
+		{
+			get 
+			{ 
+				if (HasAttribute("jid"))
+					return new Jid(this.GetAttribute("jid"));
+				else
+					return null;
+			}
+			set 
+			{ 
+				if (value!=null)
+					this.SetAttribute("jid", value.ToString());
+                else
+                    RemoveAttribute("jid");
+			}
+		}
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/UdpSuccess.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/UdpSuccess.cs
new file mode 100644
index 0000000..71b53d4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/bytestreams/UdpSuccess.cs
@@ -0,0 +1,54 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.bytestreams
+{
+    /*
+        <message 
+            from='proxy.host3' 
+            to='target at host2/bar' 
+            id='initiate'>
+            <udpsuccess xmlns='http://jabber.org/protocol/bytestreams' dstaddr='Value of Hash'/>
+        </message>
+    */
+    public class UdpSuccess : Element
+    {
+        public UdpSuccess(string dstaddr)
+        {
+            this.TagName    = "udpsuccess";
+            this.Namespace  = Uri.BYTESTREAMS;
+
+            DestinationAddress = dstaddr;
+        }
+
+        public string DestinationAddress
+        {
+            get { return GetAttribute("dstaddr"); }
+            set { SetAttribute("dstaddr", value); }
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/caps/Capabilities.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/caps/Capabilities.cs
new file mode 100644
index 0000000..d40f231
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/caps/Capabilities.cs
@@ -0,0 +1,259 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Collections;
+using System.Text;
+
+using agsXMPP.protocol.iq.disco;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.caps
+{
+    /*
+        Example 1. Annotated presence sent
+
+        <presence>
+          <c xmlns='http://jabber.org/protocol/caps'
+             node='http://exodus.jabberstudio.org/caps'
+             ver='0.9'/>
+        </presence>
+
+        Example 2. Annotated presence sent, with feature extensions
+
+        <presence>
+          <c xmlns='http://jabber.org/protocol/caps'
+             node='http://exodus.jabberstudio.org/caps'
+             ver='0.9'
+             ext='jingle ftrans xhtml'/>
+        </presence>
+        
+    */
+
+    /// <summary>
+    /// <para>
+    /// It is often desirable for a Jabber/XMPP application (commonly but not necessarily a client) to take different actions 
+    /// depending on the capabilities of another application from which it receives presence information. Examples include: 
+    /// </para> 
+    /// <list type="bullet">
+    /// <item>
+    ///     <term>Showing a different set of icons depending on the capabilities of other clients.</term>
+    /// </item>
+    /// <item>
+    ///     <term>Not sending XHTML-IM content to plaintext clients such as cell phones.</term>
+    /// </item>
+    /// <item>
+    ///     <term>Allowing the initiation of Voice over IP (VoIP) sessions only to clients that support VoIP.</term>
+    /// </item>
+    /// <item>
+    ///     <term>Not showing a "Send a File" button if another user's client does not support File Transfer.</term>
+    /// </item>
+    /// </list>
+    /// <para>
+    /// Recently, some existing Jabber clients have begun sending Software Version requests to each entity from which they 
+    /// receive presence. That solution is impractical on a larger scale, particularly for users or applications with large rosters. 
+    /// This document proposes a more robust and scalable solution: namely, a presence-based mechanism for exchanging information 
+    /// about entity capabilities.
+    /// </para>
+    /// </summary>
+    public class Capabilities : Element
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public Capabilities()
+        {
+            this.TagName    = "c";
+            this.Namespace  = Uri.CAPS;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="version"></param>
+        /// <param name="node"></param>
+        public Capabilities(string version, string node) : this()
+        {
+            Version = version;
+            Node    = node;
+        }
+
+        /// <summary>
+        /// Required node attribute
+        /// </summary>
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// Required version attribute
+        /// </summary>
+        public string Version
+        {
+            get { return GetAttribute("ver"); }
+            set { SetAttribute("ver", value); }
+        }
+
+        /// <summary>
+        /// Required Hash-Type.
+        /// </summary>
+        public string Hash
+        {
+            get { return GetAttribute("hash"); }
+            set { SetAttribute("hash", value); }
+        }
+
+        [Obsolete("This property is deprecated with version 1.4 of XEP-0115. You shouldn't use this propety anymore.")]
+        public string[] Extensions
+        {
+            get 
+            {
+                string ext = GetAttribute("ext");
+                if (ext != null)
+                {
+                    string[] ret = ext.Split(' ');
+                    return ret;
+                }
+                else
+                {
+                    return null;
+                }
+            }
+            set 
+            {
+                if (value != null)
+                {
+                    string temp = null;
+                    for (int i = 0; i < value.Length; i++)
+                    {
+                        temp += value[i];
+                        if (i < value.Length - 1)
+                            temp += " ";                            
+                    }                    
+                    SetAttribute("ext", temp);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Builds and sets the caps ver attribute from a DiscoInfo object
+        /// </summary>
+        /// <param name="di"></param>
+        public void SetVersion(DiscoInfo di)
+        {
+            Hash = "sha-1";
+            Version = BuildCapsVersion(di);
+        }
+
+        private string BuildCapsVersion(DiscoInfo di)
+        {
+            /*
+                1.  Initialize an empty string S.
+                2. Sort the service discovery identities by category and then by type (if it exists), formatted as 'category' '/' 'type'.
+                3. For each identity, append the 'category/type' to S, followed by the '<' character.
+                4. Sort the supported features.
+                5. For each feature, append the feature to S, followed by the '<' character.
+                6. Compute ver by hashing S using the SHA-1 algorithm as specified in RFC 3174 [17] (with binary output) and 
+                   encoding the hash using Base64 as specified in Section 4 of RFC 4648 [18] 
+                   (note: the Base64 output MUST NOT include whitespace and MUST set padding bits to zero). [19]
+             */
+            ArrayList features      = new ArrayList();
+            ArrayList identities    = new ArrayList();
+
+            foreach (DiscoIdentity did in di.GetIdentities())
+                identities.Add(did.Type == null ? did.Category : did.Category + "/" + did.Type);
+
+            foreach (DiscoFeature df in di.GetFeatures())
+                features.Add(df.Var);
+            
+            identities.Sort();
+            features.Sort();            
+
+            StringBuilder S = new StringBuilder();
+
+            foreach (string s in identities)
+                S.Append(s + "<");
+
+            foreach (string s in features)
+                S.Append(s + "<");
+
+            byte[] sha1 = Util.Hash.Sha1HashBytes(S.ToString());
+
+#if CF
+            return Convert.ToBase64String(sha1, 0, sha1.Length);
+#else
+            return Convert.ToBase64String(sha1);
+#endif
+        }
+
+        #region << Extension Helpers >>
+        public void AddExtension(string ext)
+        {
+            string[] extensions = this.Extensions;
+            // check if the extension already exists
+            if (extensions != null && Array.IndexOf(extensions, ext, extensions.GetLowerBound(0), extensions.Length) >= 0)
+                return;
+
+            int size = extensions == null ? 1 : extensions.Length + 1;
+            string[] tmpExtensions = new string[size];
+            if (size > 1)
+                extensions.CopyTo(tmpExtensions, 0);           
+            
+            tmpExtensions[size - 1] = ext;            
+            this.Extensions = tmpExtensions;
+        }
+
+        public void RemoveExtension(string ext)
+        {
+            string[] extensions = this.Extensions;
+            if (extensions != null)
+            {
+                if (Array.IndexOf(extensions, ext, extensions.GetLowerBound(0), extensions.Length) >= 0)
+                {
+                    int i = 0;
+                    string[] tmpExtensions = new string[extensions.Length -1];
+                    foreach (string s in extensions)
+                    {
+                        if (s != ext)
+                            tmpExtensions[i++] = s;
+                    }
+                    this.Extensions = tmpExtensions;
+                }
+            }            
+        }
+
+        public bool ContainsExtension(string ext)
+        {
+            string[] extensions = this.Extensions;
+            if (extensions == null)
+                return false;
+            
+            if (Array.IndexOf(extensions, ext, extensions.GetLowerBound(0), extensions.Length) >= 0)            
+                return true;
+            else
+                return false;
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Active.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Active.cs
new file mode 100644
index 0000000..6b82e17
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Active.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// User is actively participating in the chat session.
+    /// User accepts an initial content message, sends a content message, 
+    /// gives focus to the chat interface, or is otherwise paying attention to the conversation.
+    /// </summary>
+    public class Active : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Active"/> class.
+        /// </summary>
+        public Active()
+        {
+            TagName    = Chatstate.active.ToString();
+            Namespace  = Uri.CHATSTATES;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Chatstate.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Chatstate.cs
new file mode 100644
index 0000000..4ea26a4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Chatstate.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// Enumeration of supported Chatstates (JEP-0085)
+    /// </summary>
+    public enum Chatstate
+    {
+        /// <summary>
+        /// No Chatstate at all
+        /// </summary>
+        None,
+        /// <summary>
+        /// Active Chatstate
+        /// </summary>
+        active,
+        /// <summary>
+        /// Inactive Chatstate
+        /// </summary>
+        inactive,
+        /// <summary>
+        /// Composing Chatstate
+        /// </summary>
+        composing,
+        /// <summary>
+        /// Gone Chatstate
+        /// </summary>
+        gone,
+        /// <summary>
+        /// Paused Chatstate
+        /// </summary>
+        paused
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Composing.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Composing.cs
new file mode 100644
index 0000000..5bb09ba
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Composing.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// User is composing a message.
+    /// User is interacting with a message input interface specific to this chat session 
+    /// (e.g., by typing in the input area of a chat window).
+    /// </summary>
+    public class Composing : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Composing"/> class.
+        /// </summary>
+        public Composing()
+        {
+            TagName    = Chatstate.composing.ToString();
+            Namespace  = Uri.CHATSTATES;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Gone.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Gone.cs
new file mode 100644
index 0000000..ae00dff
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Gone.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// User has effectively ended their participation in the chat session.
+    /// User has not interacted with the chat interface, system, or device for a relatively long period of time 
+    /// (e.g., 2 minutes), or has terminated the chat interface (e.g., by closing the chat window).
+    /// </summary>
+    public class Gone : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Gone"/> class.
+        /// </summary>
+        public Gone()
+        {
+            TagName    = Chatstate.gone.ToString();
+            Namespace  = Uri.CHATSTATES;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Inactive.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Inactive.cs
new file mode 100644
index 0000000..7dbbe8a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Inactive.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// User has not been actively participating in the chat session.
+    /// User has not interacted with the chat interface for an intermediate period of time (e.g., 30 seconds).
+    /// </summary>
+    public class Inactive : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Inactive"/> class.
+        /// </summary>
+        public Inactive()
+        {
+            TagName    = Chatstate.inactive.ToString();
+            Namespace  = Uri.CHATSTATES;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Paused.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Paused.cs
new file mode 100644
index 0000000..a0c7b30
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/chatstates/Paused.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.chatstates
+{
+    /// <summary>
+    /// User had been composing but now has stopped.
+    /// User was composing but has not interacted with the message input interface for a short period of time (e.g., 5 seconds).
+    /// </summary>
+    public class Paused : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Paused"/> class.
+        /// </summary>
+        public Paused()
+        {
+            TagName    = Chatstate.paused.ToString();
+            Namespace  = Uri.CHATSTATES;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Action.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Action.cs
new file mode 100644
index 0000000..c4711ed
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Action.cs
@@ -0,0 +1,49 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    /*
+      <xs:attribute name='action' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='cancel'/>
+            <xs:enumeration value='complete'/>
+            <xs:enumeration value='execute'/>
+            <xs:enumeration value='next'/>
+            <xs:enumeration value='prev'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    */
+    public enum Action
+    {
+        NONE        = -1,
+        next        = 1,
+        prev        = 2,
+        complete    = 4,
+        execute     = 8,
+        cancel      = 16       
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Actions.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Actions.cs
new file mode 100644
index 0000000..fe9f9ab
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Actions.cs
@@ -0,0 +1,157 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    /*
+      <xs:element name='actions'>
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name='prev' type='empty' minOccurs='0'/>
+            <xs:element name='next' type='empty' minOccurs='0'/>
+            <xs:element name='complete' type='empty' minOccurs='0'/>
+          </xs:sequence>
+          <xs:attribute name='execute' use='optional'>
+            <xs:simpleType>
+              <xs:restriction base='xs:NCName'>
+                <xs:enumeration value='complete'/>
+                <xs:enumeration value='next'/>
+                <xs:enumeration value='prev'/>
+              </xs:restriction>
+            </xs:simpleType>
+          </xs:attribute>
+        </xs:complexType>
+      </xs:element>
+     
+      <actions execute='complete'>
+        <prev/>
+        <complete/>
+      </actions>
+    */
+    public class Actions : Element
+    {
+        public Actions()
+        {
+            this.TagName    = "actions";
+            this.Namespace  = Uri.COMMANDS;
+        }
+
+        /// <summary>
+        /// Optional Execute Action, only complete, next and previous is allowed
+        /// </summary>
+        public Action Execute
+        {
+			get 
+			{ 
+				return (Action) GetAttributeEnum("execute", typeof(Action)); 
+			}
+			set 
+			{ 
+				if (value == Action.NONE)
+                    RemoveAttribute("execute");
+				else
+                    SetAttribute("execute", value.ToString());
+			}
+		}
+
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public bool Complete
+        {
+            get { return HasTag("complete"); }
+            set
+            {
+                if (value)
+                    this.SetTag("complete");
+                else
+                    this.RemoveTag("complete");
+            }
+        }
+
+        public bool Next
+        {
+            get { return HasTag("next"); }
+            set
+            {
+                if (value)
+                    this.SetTag("next");
+                else
+                    this.RemoveTag("next");
+            }
+        }
+
+        public bool Previous
+        {
+            get { return HasTag("prev"); }
+            set
+            {
+                if (value)
+                    this.SetTag("prev");
+                else
+                    this.RemoveTag("prev");
+            }
+        }
+
+        /// <summary>
+        /// Actions, only complete, prev and next are allowed here and can be combined
+        /// </summary>
+        public Action Action
+        {
+            get
+            {
+                Action res = 0;
+                
+                if (Complete)
+                    res |= Action.complete;
+                if (Previous)
+                    res |= Action.prev;
+                if (Next)
+                    res |= Action.next;
+
+                if (res == 0)
+                    return Action.NONE;
+                else
+                    return res;
+            }
+            set
+            {
+                if (value == Action.NONE)
+                {                    
+                    Complete    = false;
+                    Previous    = false;                    
+                    Next        = false;
+                }
+                else
+                {
+                    Complete    = ((value & Action.complete) == Action.complete);
+                    Previous    = ((value & Action.prev) == Action.prev);
+                    Next        = ((value & Action.next) == Action.next);                    
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Command.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Command.cs
new file mode 100644
index 0000000..5f3057f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Command.cs
@@ -0,0 +1,178 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.x.data;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    public class Command : Element
+    {
+        #region << Constructors >>
+        public Command()
+        {
+            this.TagName    = "command";
+            this.Namespace  = Uri.COMMANDS;
+        }
+
+        public Command(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Command(Action action) : this()
+        {
+            this.Action = action;
+        }
+
+        public Command(Status status) : this()
+        {
+            this.Status = status;
+        }
+
+        public Command(string node, string sessionId) : this(node)
+        {
+            this.SessionId = sessionId;
+        }
+
+        public Command(string node, string sessionId, Action action) : this(node, sessionId)
+        {
+            this.Action = action;
+        }
+
+        public Command(string node, string sessionId, Status status) : this(node, sessionId)
+        {
+            this.Status = status;
+        }
+
+        public Command(string node, string sessionId, Action action, Status status) : this(node, sessionId, action)
+        {
+            this.Status = status;
+        }
+        #endregion
+
+        public Action Action
+		{
+			get 
+			{ 
+				return (Action) GetAttributeEnum("action", typeof(Action)); 
+			}
+			set
+			{ 
+				if (value == Action.NONE)
+					RemoveAttribute("action");
+				else
+					SetAttribute("action", value.ToString());
+			}
+		}
+
+        public Status Status
+        {
+            get
+            {
+                return (Status) GetAttributeEnum("status", typeof(Status));
+            }
+            set
+            {
+                if (value == Status.NONE)
+                    RemoveAttribute("status");
+                else
+                    SetAttribute("status", value.ToString());
+            }
+        }
+
+
+        // <xs:attribute name='node' type='xs:string' use='required'/>
+        
+        /// <summary>
+        /// Node is Required
+        /// </summary>
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        // <xs:attribute name='sessionid' type='xs:string' use='optional'/>
+        public string SessionId
+        {
+            get { return GetAttribute("sessionid"); }
+            set { SetAttribute("sessionid", value); }
+        }
+      
+        /// <summary>
+        /// The X-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Note Note
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Note)) as Note;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Note)))
+                    RemoveTag(typeof(Note));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Actions Actions
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Actions)) as Actions;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Actions)))
+                    RemoveTag(typeof(Actions));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Note.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Note.cs
new file mode 100644
index 0000000..7ebddcb
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Note.cs
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    /*
+        <note type='info'>Service 'httpd' has been configured.</note>
+        
+        <xs:element name='note'>
+            <xs:complexType>
+              <xs:simpleContent>
+                <xs:extension base='xs:string'>
+                  <xs:attribute name='type' use='required'>
+                    <xs:simpleType>
+                      <xs:restriction base='xs:NCName'>
+                        <xs:enumeration value='error'/>
+                        <xs:enumeration value='info'/>
+                        <xs:enumeration value='warn'/>
+                      </xs:restriction>
+                    </xs:simpleType>
+                  </xs:attribute>
+                </xs:extension>
+              </xs:simpleContent>
+            </xs:complexType>
+        </xs:element>
+    */
+
+    public class Note : Element
+    {
+        /// <summary>
+        /// Default constructor
+        /// </summary>
+        public Note()
+        {
+            this.TagName    = "note";
+            this.Namespace  = Uri.COMMANDS;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="type"></param>
+        public Note(NoteType type) : this()
+        {
+            this.Type = type;   
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="text"></param>
+        /// <param name="type"></param>
+        public Note(string text, NoteType type) : this(type)
+        {
+            this.Value = text;            
+        }
+
+        public NoteType Type
+        {
+            get { return (NoteType)GetAttributeEnum("type", typeof(NoteType)); }
+            set { SetAttribute("type", value.ToString()); }
+        }
+
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/NoteType.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/NoteType.cs
new file mode 100644
index 0000000..4b5aa09
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/NoteType.cs
@@ -0,0 +1,32 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    public enum NoteType
+    {
+        error,
+        info,
+        warn
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Status.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Status.cs
new file mode 100644
index 0000000..b8386b5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/commands/Status.cs
@@ -0,0 +1,44 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.commands
+{
+    /*
+     * <xs:attribute name='status' use='optional'>
+        <xs:simpleType>
+          <xs:restriction base='xs:NCName'>
+            <xs:enumeration value='canceled'/>
+            <xs:enumeration value='completed'/>
+            <xs:enumeration value='executing'/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    */
+    public enum Status
+    {
+        NONE = -1,
+        canceled,
+        completed,
+        executing
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compress.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compress.cs
new file mode 100644
index 0000000..5e8ae88
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compress.cs
@@ -0,0 +1,68 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.compression
+{
+    // <compress xmlns="http://jabber.org/protocol/compress">
+    //      <method>zlib</method>
+    // </compress>
+
+    public class Compress : Element
+    {
+        #region << Constructors >>
+        public Compress()
+        {
+            this.TagName = "compress";
+            this.Namespace = Uri.COMPRESS;
+        }
+
+        /// <summary>
+        /// Constructor with a given method/algorithm for Stream compression
+        /// </summary>
+        /// <param name="method">method/algorithm used to compressing the stream</param>
+        public Compress(CompressionMethod method) : this()
+        {
+            this.Method = method;
+        }
+        #endregion
+
+        /// <summary>
+        /// method/algorithm used to compressing the stream
+        /// </summary>
+        public CompressionMethod Method
+        {
+            set 
+            {
+                if (value != CompressionMethod.Unknown)
+					SetTag("method", value.ToString());  
+            }
+            get 
+            {
+                return (CompressionMethod) GetTagEnum("method", typeof(CompressionMethod));            
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compressed.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compressed.cs
new file mode 100644
index 0000000..14c83fc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Compressed.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.compression
+{
+    /*
+     * Example 5. Receiving Entity Acknowledges Stream Compression
+     * <compressed xmlns='http://jabber.org/protocol/compress'/> 
+     */
+
+    public class Compressed : Element
+    {
+        public Compressed()
+        {            
+            this.TagName    = "compressed";
+            this.Namespace  = Uri.COMPRESS;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/compression/CompressionMethod.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/CompressionMethod.cs
new file mode 100644
index 0000000..9e546e7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/CompressionMethod.cs
@@ -0,0 +1,32 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.extensions.compression
+{
+    public enum CompressionMethod
+    {
+        Unknown = -1,
+        zlib,
+        lzw
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Failure.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Failure.cs
new file mode 100644
index 0000000..3901811
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/compression/Failure.cs
@@ -0,0 +1,58 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.compression
+{
+    /*
+     * 
+     * Note: If the initiating entity did not understand any of the advertised compression methods, 
+     * it SHOULD ignore the compression option and proceed as if no compression methods were advertised.
+     * 
+     * If the initiating entity requests a stream compression method that is not supported by the 
+     * receiving entity, the receiving entity MUST return an <unsupported-method/> error:
+     * 
+     * Example 3. Receiving Entity Reports That Method is Unsupported
+     * <failure xmlns='http://jabber.org/protocol/compress'>
+     *  <unsupported-method/>
+     * </failure>
+     * 
+     * If the receiving entity cannot establish compression using the requested method for any 
+     * other reason, it MUST return a <setup-failed/> error:
+     * 
+     * Example 4. Receiving Entity Reports That Compression Setup Failed
+     * <failure xmlns='http://jabber.org/protocol/compress'>
+     *  <setup-failed/>
+     * </failure>
+     */
+
+    public class Failure : Element
+    {
+        public Failure()
+        {
+            this.TagName    = "failure";
+            this.Namespace  = Uri.COMPRESS;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNeg.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNeg.cs
new file mode 100644
index 0000000..2b5d62a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNeg.cs
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.featureneg
+{
+	/// <summary>
+	/// JEP-0020: Feature Negotiation
+	/// This JEP defines a A protocol that enables two Jabber entities to mutually negotiate feature options.
+	/// </summary>
+	public class FeatureNeg : Element
+	{
+		/*
+		<iq type='get'
+			from='romeo at montague.net/orchard'
+			to='juliet at capulet.com/balcony'
+			id='neg1'>
+			<feature xmlns='http://jabber.org/protocol/feature-neg'>
+				<x xmlns='jabber:x:data' type='form'>
+				<field type='list-single' var='places-to-meet'>
+					<option><value>Lover's Lane</value></option>
+					<option><value>Secret Grotto</value></option>
+					<option><value>Verona Park</value></option>
+				</field>
+				<field type='list-single' var='times-to-meet'>
+					<option><value>22:00</value></option>
+					<option><value>22:30</value></option>
+					<option><value>23:00</value></option>
+					<option><value>23:30</value></option>
+				</field>
+				</x>
+			</feature>
+		</iq>
+		*/
+		
+		public FeatureNeg()
+		{
+			this.TagName	= "feature";
+			this.Namespace	= Uri.FEATURE_NEG;
+		}
+
+		/// <summary>
+		/// data form of type "form" which defines the available options for one or more features.
+		/// Each feature is represented as an x-data "field", which MUST be of type "list-single".
+		/// </summary>
+		public Data Data
+		{
+			get 
+			{  
+				Element data = SelectSingleElement(typeof(Data)); 
+				if (data!=null)
+					return data as Data;
+				else
+					return null;
+			}
+			set 
+			{
+                if (HasTag(typeof(Data)))
+				    RemoveTag(typeof(Data));
+				
+                AddChild(value);
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNegIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNegIq.cs
new file mode 100644
index 0000000..a507a35
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/featureneg/FeatureNegIq.cs
@@ -0,0 +1,80 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.featureneg
+{
+	/// <summary>
+	/// JEP-0020: Feature Negotiation
+	/// This JEP defines a A protocol that enables two Jabber entities to mutually negotiate feature options.
+	/// </summary>
+	public class FeatureNegIq : IQ
+	{
+		/*
+		<iq type='get'
+			from='romeo at montague.net/orchard'
+			to='juliet at capulet.com/balcony'
+			id='neg1'>
+			<feature xmlns='http://jabber.org/protocol/feature-neg'>
+				<x xmlns='jabber:x:data' type='form'>
+					<field type='list-single' var='places-to-meet'>
+						<option><value>Lover's Lane</value></option>
+						<option><value>Secret Grotto</value></option>
+						<option><value>Verona Park</value></option>
+					</field>
+					<field type='list-single' var='times-to-meet'>
+						<option><value>22:00</value></option>
+						<option><value>22:30</value></option>
+						<option><value>23:00</value></option>
+						<option><value>23:30</value></option>
+					</field>
+				</x>
+			</feature>
+		</iq>
+		*/
+
+		private FeatureNeg m_FeatureNeg = new FeatureNeg();
+
+		public FeatureNegIq()
+		{		
+			this.AddChild(m_FeatureNeg);
+			this.GenerateId();
+		}
+
+		public FeatureNegIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}	
+
+		public FeatureNeg FeatureNeg
+		{
+			get
+			{
+				return m_FeatureNeg;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/File.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/File.cs
new file mode 100644
index 0000000..dd9dc62
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/File.cs
@@ -0,0 +1,149 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.filetransfer
+{
+	/// <summary>
+	/// Summary description for File.
+	/// </summary>
+	public class File : Element
+	{
+		/*
+		Example 1:
+		<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
+			name='test.txt' 
+			size='1022'/>
+		
+		Example 2:
+		<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'
+			name='test.txt'
+			size='1022'
+			hash='552da749930852c69ae5d2141d3766b1'
+			date='1969-07-21T02:56:15Z'>
+			
+			<desc>This is a test. If this were a real file...</desc>
+		</file>
+		
+		Example 3:
+		<file xmlns='http://jabber.org/protocol/si/profile/file-transfer'>
+			<range offset='252' length='179'/>
+		</file>
+		  
+		<xs:element name='file'>
+			<xs:complexType>
+			<xs:sequence minOccurs='0'>
+				<xs:element name='desc' type='xs:string'/>
+				<xs:element ref='range'/>
+			</xs:sequence>
+			<xs:attribute name='date' type='xs:dateTime' use='optional'/>
+			<xs:attribute name='hash' type='xs:string' use='optional'/>
+			<xs:attribute name='name' type='xs:string' use='required'/>
+			<xs:attribute name='size' type='xs:integer' use='required'/>
+			</xs:complexType>
+		</xs:element>
+		*/
+		public File()
+		{
+			this.TagName	= "file";
+			this.Namespace	= Uri.SI_FILE_TRANSFER;
+		}
+
+		public File(string name, long size) : this()
+		{
+			Name	= name;
+			Size	= size;
+		}
+
+		/// <summary>
+		/// The file name. Its required
+		/// </summary>
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+
+		/// <summary>
+		/// Size of the file. This is required
+		/// </summary>
+		public long Size
+		{
+			get { return GetAttributeLong("size"); }
+			set { SetAttribute("size", value.ToString()); }
+		}
+
+		/// <summary>
+		/// a Hash checksum of the file
+		/// </summary>
+		public string Hash
+		{
+			get { return GetAttribute("hash"); }
+			set { SetAttribute("hash", value); }
+		}
+
+		/// <summary>
+		/// file date
+		/// </summary>
+		public DateTime Date
+		{
+			get
+			{
+				return Util.Time.ISO_8601Date(GetAttribute("date"));
+			}
+			set
+			{
+				SetAttribute("date", Util.Time.ISO_8601Date(value));
+			}
+		}
+
+		/// <summary>
+		/// is used to provide a sender-generated description of the file so the receiver can better understand what is being sent. 
+		/// It MUST NOT be sent in the result.
+		/// </summary>		 
+		public string Description
+		{
+			get { return GetTag("desc"); }
+			set { SetTag("desc", value);}
+		}
+
+		public Range Range
+		{
+			get 
+			{ 
+				Element range =SelectSingleElement(typeof(Range));
+				if (range != null)				
+					return range as Range;
+				else
+					return null;
+
+			}
+			set 
+			{ 
+				RemoveTag(typeof(Range));
+				AddChild(value);
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/Range.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/Range.cs
new file mode 100644
index 0000000..44fdd73
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/filetransfer/Range.cs
@@ -0,0 +1,71 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.filetransfer
+{
+	/// <summary>
+	/// When range is sent in the offer, it should have no attributes. 
+	/// This signifies that the sender can do ranged transfers.
+	/// When no range element is sent in the Stream Initiation result, the Sender MUST send the complete file starting at offset 0.
+	/// More generally, data is sent over the stream byte for byte starting at the offset position for the length specified.
+	/// </summary>
+	public class Range : Element
+	{
+		/*
+		<range offset='252' length='179'/>		    	
+		*/
+		public Range()
+		{
+			this.TagName	= "range";
+			this.Namespace	= Uri.SI_FILE_TRANSFER;
+		}
+
+		public Range(long offset, long length) : this()
+		{
+			Offset	= offset;
+			Length	= length;
+		}
+
+		/// <summary>
+		/// Specifies the position, in bytes, to start transferring the file data from.
+		/// This defaults to zero (0) if not specified.
+		/// </summary>
+		public long Offset
+		{
+			get { return GetAttributeLong("offset"); }
+			set { SetAttribute("offset", value.ToString());}
+		}
+		
+		/// <summary>
+		/// Specifies the number of bytes to retrieve starting at offset.
+		/// This defaults to the length of the file from offset to the end.
+		/// </summary>
+		public long Length
+		{
+			get { return GetAttributeLong("length"); }
+			set { SetAttribute("length", value.ToString());}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLoc.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLoc.cs
new file mode 100644
index 0000000..fd59d7e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLoc.cs
@@ -0,0 +1,148 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.geoloc
+{
+    /*
+    
+    Element Name  	Inclusion  	Datatype  	    Definition
+    
+    alt 	        MAY 	    xs:decimal 	    Altitude in meters above or below sea level
+    bearing 	    MAY 	    xs:decimal 	    GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north [2]
+    datum 	        MAY 	    xs:string 	    GPS datum [3]
+    description 	MAY 	    xs:string 	    A natural-language description of the location
+    error 	        MAY 	    xs:decimal 	    Horizontal GPS error in arc minutes
+    lat 	        MUST 	    xs:decimal 	    Latitude in decimal degrees North
+    lon 	        MUST 	    xs:decimal 	    Longitude in decimal degrees East
+    timestamp 	    MAY 	    xs:datetime 	UTC timestamp specifying the moment when the reading was taken (MUST conform to the DateTime profile of Jabber Date and Time Profiles [4])
+           
+    */
+
+    /// <summary>
+    /// XEP-0080 Geographical Location (GeoLoc)
+    /// This JEP defines a format for capturing data about an entity's geographical location (geoloc).
+    /// The namespace defined herein is intended to provide a semi-structured format for 
+    /// describing a geographical location that may change fairly frequently, 
+    /// where the geoloc information is provided as Global Positioning System (GPS) coordinates.
+    /// </summary>
+    public class GeoLoc : Element
+    {
+        #region << Constructors >>
+        /// <summary>
+        /// 
+        /// </summary>
+        public GeoLoc()
+        {
+            this.TagName    = "geoloc";
+            this.Namespace  = Uri.GEOLOC;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="Latitude"></param>
+        /// <param name="Longitude"></param>
+        public GeoLoc(double latitude, double longitude) : this()
+        {
+            Latitude    = latitude;
+            Longitude   = longitude;
+        }
+        #endregion
+
+        /// <summary>
+        /// A natural-language description of the location
+        /// </summary>
+        public string Description
+        {
+            get { return GetTag("description"); }
+            set { SetTag("description", value); }
+        }
+
+        /// <summary>
+        /// GPS datum
+        /// </summary>
+        public string Datum
+        {
+            get { return GetTag("datum"); }
+            set { SetTag("datum", value); }
+        }
+
+        /// <summary>
+        /// Latitude in decimal degrees North
+        /// </summary>
+        public double Latitude
+        {
+            get { return GetTagDouble("lat"); }
+            set { SetTag("lat", value); }
+        }
+
+        /// <summary>
+        /// Longitude in decimal degrees East
+        /// </summary>
+        public double Longitude
+        {
+            get { return GetTagDouble("lon"); }
+            set { SetTag("lon", value); }
+        }
+
+        /// <summary>
+        /// Altitude in meters above or below sea level
+        /// </summary>
+        public double Altitude
+        {
+            get { return GetTagDouble("alt"); }
+            set { SetTag("alt", value); }
+        }
+
+        /// <summary>
+        /// GPS bearing (direction in which the entity is heading to reach its next waypoint),
+        /// measured in decimal degrees relative to true north
+        /// </summary>
+        public double Bearing
+        {
+            get { return GetTagDouble("bearing"); }
+            set { SetTag("bearing", value); }
+        }
+
+        /// <summary>
+        /// Horizontal GPS error in arc minutes
+        /// </summary>
+        public double Error
+        {
+            get { return GetTagDouble("error"); }
+            set { SetTag("error", value); }
+        }
+
+        /// <summary>
+        /// UTC timestamp specifying the moment when the reading was taken           
+        /// </summary>
+        public DateTime Timestamp
+        {
+            get { return Util.Time.ISO_8601Date(GetTag("timestamp")); }
+            set { SetTag("timestamp", Util.Time.ISO_8601Date(value)); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLocIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLocIq.cs
new file mode 100644
index 0000000..e8536fb
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/geoloc/GeoLocIq.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.geoloc
+{
+    /// <summary>
+    /// a GeoLoc InfoQuery
+    /// </summary>
+    public class GeoLocIq : IQ
+    {       
+        private GeoLoc m_GeoLoc = new GeoLoc();
+
+        public GeoLocIq()
+        {
+            base.Query = m_GeoLoc;
+            this.GenerateId();
+        }
+
+        public GeoLocIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public GeoLocIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public GeoLocIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public new GeoLoc Query
+        {
+            get
+            {
+                return m_GeoLoc;
+            }
+        }
+    }   
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/html/Body.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/html/Body.cs
new file mode 100644
index 0000000..98759f1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/html/Body.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.html
+{
+    /// <summary>
+    /// The Body Element of a XHTML message
+    /// </summary>
+    public class Body : Element
+    {
+        public Body()
+        {
+            this.TagName    = "body";
+            this.Namespace  = Uri.XHTML;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public string InnerHtml
+        {
+            get
+            {
+                // Thats a HACK
+                string xml = this.ToString();
+                
+                int start   = xml.IndexOf(">");
+                int end     = xml.LastIndexOf("</" + this.TagName + ">");
+
+                return xml.Substring(start + 1, end - start -1);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/html/Html.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/html/Html.cs
new file mode 100644
index 0000000..02e060e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/html/Html.cs
@@ -0,0 +1,68 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.html
+{
+    /*
+     * <message>
+     *      <body>hi!</body>
+     *      <html xmlns='http://jabber.org/protocol/xhtml-im'>
+     *          <body xmlns='http://www.w3.org/1999/xhtml'>
+     *              <p style='font-weight:bold'>hi!</p>
+     *          </body>
+     *      </html>
+     * </message>
+     */
+
+    public class Html : Element
+    {
+        public Html()
+        {
+            this.TagName    = "html";
+            this.Namespace  = Uri.XHTML_IM;
+        }
+        
+        /// <summary>
+        /// The Body Element of the XHTML Message
+        /// </summary>
+        public Body Body
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Body)) as Body;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Body)))
+                    RemoveTag(typeof(Body));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Base.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Base.cs
new file mode 100644
index 0000000..22eabc5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Base.cs
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.ibb
+{
+    /// <summary>
+    /// IBB base class
+    /// </summary>
+    public abstract class Base : Element
+    {
+        public Base()
+        {
+            this.Namespace = Uri.IBB;
+        }
+
+        /// <summary>
+        /// Sid
+        /// </summary>
+        public string Sid
+        {
+            get { return GetAttribute("sid"); }
+            set { SetAttribute("sid", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Close.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Close.cs
new file mode 100644
index 0000000..f78d310
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Close.cs
@@ -0,0 +1,55 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.ibb
+{
+    /*
+         <close xmlns='http://jabber.org/protocol/ibb' sid='mySID'/>      
+    */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Close : Base
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public Close()
+        {
+            this.TagName = "close";           
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="sid"></param>
+        public Close(string sid) : this()
+        {
+            this.Sid = sid;            
+        }       
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Data.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Data.cs
new file mode 100644
index 0000000..0f285dc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Data.cs
@@ -0,0 +1,83 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.ibb
+{
+    /*
+         <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
+            qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
+            WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
+            IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
+            AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
+            kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
+         </data>
+      
+         <xs:element name='data'>
+             <xs:complexType>
+              <xs:simpleContent>
+                <xs:extension base='xs:string'>
+                  <xs:attribute name='sid' type='xs:string' use='required'/>
+                  <xs:attribute name='seq' type='xs:string' use='required'/>
+                </xs:extension>
+              </xs:simpleContent>
+             </xs:complexType>
+           </xs:element>
+    */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Data : Base
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public Data()
+        {
+            this.TagName    = "data";            
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="sid"></param>
+        /// <param name="seq"></param>
+        public Data(string sid, int seq)  : this()
+        {
+            this.Sid        = sid;
+            this.Sequence   = seq;
+        }
+
+        /// <summary>
+        /// the sequence
+        /// </summary>
+        public int Sequence
+        {
+            get { return GetAttributeInt("seq"); }
+            set { SetAttribute("seq", value); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Open.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Open.cs
new file mode 100644
index 0000000..2cbba82
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ibb/Open.cs
@@ -0,0 +1,75 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.ibb
+{
+    /*
+        <open sid='mySID' 
+            block-size='4096'
+            xmlns='http://jabber.org/protocol/ibb'/>
+     
+       <xs:element name='open'>
+         <xs:complexType>
+          <xs:simpleContent>
+            <xs:extension base='empty'>
+              <xs:attribute name='sid' type='xs:string' use='required'/>
+              <xs:attribute name='block-size' type='xs:string' use='required'/>
+            </xs:extension>
+          </xs:simpleContent>
+         </xs:complexType>
+       </xs:element>
+    */
+    public class Open : Base
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public Open()
+        {
+            this.TagName    = "open";            
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="sid"></param>
+        /// <param name="blocksize"></param>
+        public Open(string sid, long blocksize) : this()
+        {
+            this.Sid        = sid;
+            this.BlockSize  = blocksize;
+        }  
+
+        /// <summary>
+        /// Block size
+        /// </summary>
+        public long BlockSize
+        {
+            get { return GetAttributeLong("block-size"); }
+            set { SetAttribute("block-size", value); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/ActionType.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/ActionType.cs
new file mode 100644
index 0000000..d446561
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/ActionType.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.jivesoftware.phone
+{  
+    /// <summary>
+    /// Action type, Currently supported types are DIAL and FORWARD
+    /// </summary>
+    public enum ActionType
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        DIAL,
+        /// <summary>
+        /// 
+        /// </summary>
+        FORWARD
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneAction.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneAction.cs
new file mode 100644
index 0000000..1efa3a1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneAction.cs
@@ -0,0 +1,109 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.jivesoftware.phone
+{
+    public class PhoneAction : Element
+    {
+        /*
+         * Actions are sent by the client to perform tasks such as dialing, checking for messages, etc. Actions are sent as IQ's (type set), as with the following child stanza:
+         * 
+         * <phone-action xmlns="http://jivesoftware.com/xmlns/phone" type="DIAL">
+         *    <extension>5035555555</extension>
+         * </phone-action>
+         *          
+         * Currently supported types are DIAL and FORWARD.
+         * In most implementations, issuing a dial command will cause the user's phone to ring.
+         * Once the user picks up, the specified extension will be dialed.
+         * 
+         * Dialing can also be performed by jid too. The jid must be dialed must be mapped on the server to an extension
+         * 
+         * <phone-action type="DIAL">
+         *  <jid>andrew at jivesoftware.com</jid>
+         * </phone-action>
+         * 
+         * Issuing a action wth a type FORWARD should transfer a call that has already been 
+         * established to a third party. The FORWARD type requires an extension or jid child element
+         *
+         *  <phone-action xmlns="http://jivesoftware.com/xmlns/phone" type="FORWARD">
+         *      <extension>5035555555</extension>
+         *  </phone-action>
+         *
+         */
+
+
+        #region << Constructors >>
+        /// <summary>
+        /// 
+        /// </summary>
+        public PhoneAction()
+        {
+            this.TagName    = "phone-action";
+            this.Namespace  = Uri.JIVESOFTWARE_PHONE;
+        }
+
+        public PhoneAction(ActionType type) : this()
+        {
+            Type = type;
+        }
+
+        public PhoneAction(ActionType type, string extension) : this(type)
+        {            
+            Extension = extension;
+        }
+
+        public PhoneAction(ActionType type, Jid jid) : this(type)
+        {
+            Jid = jid;
+        }
+        #endregion
+
+        public ActionType Type
+        {
+            set
+            {
+                SetAttribute("type", value.ToString());
+            }
+            get
+            {
+                return (ActionType)GetAttributeEnum("type", typeof(ActionType));
+            }
+        }
+
+        public string Extension
+        {
+            get { return GetTag("extension"); }
+            set { SetTag("extension", value); }
+        }
+
+        public Jid Jid
+        {
+            get { return new Jid(GetTag("jid")); }
+            set { SetTag("jid", value.ToString()); }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneEvent.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneEvent.cs
new file mode 100644
index 0000000..c4d778a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneEvent.cs
@@ -0,0 +1,110 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.jivesoftware.phone
+{
+    /* 
+     *
+     *
+     * <message from="x" id="1137178511.247" to="y">
+     *      <phone-event xmlns="http://jivesoftware.com/xmlns/phone" callID="1137178511.247" type="ON_PHONE" device="SIP/3001">
+     *          <callerID></callerID>
+     *      </phone-event>
+     * </message>
+     * 
+     */
+
+    /// <summary>
+    /// Events are sent to the user when their phone is ringing, when a call ends, etc. 
+    /// This packet is send within a message packet (subelement of message)
+    /// </summary>
+    public class PhoneEvent : Element
+    {
+        #region << Constructors >>
+        public PhoneEvent()
+        {
+            this.TagName    = "phone-event";
+            this.Namespace  = Uri.JIVESOFTWARE_PHONE;
+        }
+
+        public PhoneEvent(PhoneStatusType status) : this()
+        {
+            Type = status;
+        }
+
+        public PhoneEvent(PhoneStatusType status, string device) : this(status)            
+        {
+            Device = device;
+        }
+
+        public PhoneEvent(PhoneStatusType status, string device, string id) : this(status, device)
+        {
+            CallId = id;
+        }
+
+        public PhoneEvent(PhoneStatusType status, string device, string id, string callerId): this(status, device, id)
+        {
+            CallerId = callerId;
+        }        
+        #endregion
+
+        public string CallId
+        {
+            get { return GetAttribute("callID"); }
+            set { SetAttribute("callID", value); }
+        }
+
+        public string Device
+        {
+            get { return GetAttribute("device"); }
+            set { SetAttribute("device", value); }
+        }
+
+        public PhoneStatusType Type
+        {
+            set
+            {
+                SetAttribute("type", value.ToString());
+            }
+            get
+            {
+                return (PhoneStatusType)GetAttributeEnum("type", typeof(PhoneStatusType));
+            }
+        }
+
+        public string CallerId
+        {
+            get { return GetTag("callerID"); }
+            set { SetTag("callerID", value); }
+        }
+
+        public string CallerIdName
+        {
+            get { return GetTag("callerIDName"); }
+            set { SetTag("callerIDName", value); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatus.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatus.cs
new file mode 100644
index 0000000..eba1bc3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatus.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.jivesoftware.phone
+{
+    /// <summary>
+    /// A user's presence is updated when on a phone call.
+    /// The Jive Messenger/Asterisk implementation will update the user's presence automatically 
+    /// by adding the following packet extension to the user's presence:
+    /// <phone-status xmlns="http://jivesoftware.com/xmlns/phone" status="ON_PHONE" > 
+    /// Jive Messenger can also be configured to change the user's availability
+    /// to "Away -- on the phone" when the user is on a call (in addition to the packet extension).
+    /// This is useful when interacting with clients that don't understand the extended presence information
+    /// or when using transports to other IM networks where extended presence information is not available.        
+    /// </summary>
+    public class PhoneStatus : Element
+    {
+        /*
+         * <phone-status xmlns="http://jivesoftware.com/xmlns/phone" status="ON_PHONE" >; 
+         * 
+         */ 
+        
+        public PhoneStatus()
+        {
+            this.TagName    = "phone-status";
+            this.Namespace  = Uri.JIVESOFTWARE_PHONE;
+        }
+
+        public PhoneStatusType Status
+        {
+            set
+            {
+                SetAttribute("status", value.ToString());
+            }
+            get
+            {
+                return (PhoneStatusType)GetAttributeEnum("status", typeof(PhoneStatusType));
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatusType.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatusType.cs
new file mode 100644
index 0000000..7bebfc3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/jivesoftware/phone/PhoneStatusType.cs
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.jivesoftware.phone
+{
+    /// <summary>
+    /// Events are sent to the user when their phone is ringing, 
+    /// when a call ends, etc. As with presence, 
+    /// pubsub should probably be the mechanism used for sending this information, 
+    /// but message packets are used to send events for the time being
+    /// </summary>
+    public enum PhoneStatusType
+    {
+        RING, 
+        DIALED, 
+        ON_PHONE,
+        HANG_UP
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Received.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Received.cs
new file mode 100644
index 0000000..77c2639
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Received.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.msgreceipts
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Received : Element
+    {
+        /*         
+         * <received xmlns='http://www.xmpp.org/extensions/xep-0184.html#ns'/>
+         */
+        public Received()
+        {
+            this.TagName    = "received";
+            this.Namespace  = Uri.MSG_RECEIPT;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Request.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Request.cs
new file mode 100644
index 0000000..7ea4b7a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/msgreceipts/Request.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.msgreceipts
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Request : Element
+    {
+        /*
+         * <request xmlns='http://www.xmpp.org/extensions/xep-0184.html#ns'/>         
+         */
+        public Request()
+        {
+            this.TagName    = "request";
+            this.Namespace  = Uri.MSG_RECEIPT;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/nickname/Nickname.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/nickname/Nickname.cs
new file mode 100644
index 0000000..4fecba0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/nickname/Nickname.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.nickname
+{
+    // <nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>
+    public class Nickname : Element
+    {
+        public Nickname()
+        {
+            this.TagName    = "nick";
+            this.Namespace  = Uri.NICK;
+        }
+
+        public Nickname(string nick) : this()
+        {
+            Value = nick;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ping/Ping.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ping/Ping.cs
new file mode 100644
index 0000000..ea90006
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ping/Ping.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.ping
+{
+    /*
+     * <iq from='capulet.com' to='juliet at capulet.com/balcony' id='ping123' type='get'>
+     *   <ping xmlns='urn:xmpp:ping'/>
+     * </iq>
+     */
+    public class Ping : Element
+    {
+        public Ping()
+        {
+            this.TagName    = "ping";
+            this.Namespace  = Uri.PING;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/ping/PingIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/ping/PingIq.cs
new file mode 100644
index 0000000..b729fd2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/ping/PingIq.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.ping
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class PingIq : IQ
+	{
+		private Ping m_Ping = new Ping();
+
+        #region << Constructors >>
+        public PingIq()
+		{		
+			base.Query = m_Ping;
+			this.GenerateId();
+		}
+
+        public PingIq(Jid to) : this()
+        {
+            To = to;
+        }
+
+        public PingIq(Jid to, Jid from) : this()
+        {
+            To      = to;
+            From    = from;
+        }
+        #endregion
+
+    
+        public new Ping Query
+        {
+            get { return m_Ping; }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/primary/Primary.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/primary/Primary.cs
new file mode 100644
index 0000000..09ec7b9
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/primary/Primary.cs
@@ -0,0 +1,46 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.primary
+{
+	/// <summary>
+	/// http://www.jabber.org/jeps/inbox/primary.html
+	/// </summary>
+	public class Primary : Element
+	{
+		/*
+		<presence from='juliet at capulet.com/balcony'>
+			<status>I'm back!</status>
+			<p xmlns='http://jabber.org/protocol/primary'/>
+		</presence>
+		*/
+
+		public Primary()
+		{
+			this.TagName	= "p";
+			this.Namespace	= Uri.PRIMARY;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Access.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Access.cs
new file mode 100644
index 0000000..179707e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Access.cs
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+        <xs:attribute name='access' use='optional' default='open'>
+            <xs:simpleType>
+              <xs:restriction base='xs:NCName'>
+                <xs:enumeration value='authorize'/>
+                <xs:enumeration value='open'/>
+                <xs:enumeration value='presence'/>
+                <xs:enumeration value='roster'/>
+                <xs:enumeration value='whitelist'/>
+              </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
+    */
+    public enum Access
+    {
+        NONE        = -1,
+        open,
+        authorize,
+        presence,
+        roster,
+        whitelist
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliation.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliation.cs
new file mode 100644
index 0000000..b6be6e1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliation.cs
@@ -0,0 +1,86 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+        <affiliation node='node1' jid='francisco at denmark.lit' affiliation='owner'/>
+    */
+    public class Affiliation : Element
+    {
+        #region << Constructors >>
+        public Affiliation()
+        {
+            this.TagName = "affiliation";
+            this.Namespace = Uri.PUBSUB;
+        }
+
+        public Affiliation(Jid jid, AffiliationType affiliation)
+        {
+            this.Jid                = jid;
+            this.AffiliationType    = affiliation;
+        }
+
+        public Affiliation(string node, Jid jid, AffiliationType affiliation) : this(jid, affiliation)
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public Jid Jid
+		{
+			get 
+			{
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+				else
+					return null;
+			}
+			set 
+			{ 
+				if (value!=null)
+                    this.SetAttribute("jid", value.ToString());
+			}
+		}
+        
+        public string Node
+		{
+            get { return GetAttribute("node"); }
+			set	{ SetAttribute("node", value); }			
+		}
+
+        public AffiliationType AffiliationType
+		{
+			get 
+			{
+                return (AffiliationType)GetAttributeEnum("affiliation", typeof(AffiliationType)); 
+			}
+			set 
+			{
+                SetAttribute("affiliation", value.ToString()); 
+			}
+		}
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/AffiliationType.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/AffiliationType.cs
new file mode 100644
index 0000000..d477c80
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/AffiliationType.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public enum AffiliationType
+	{
+		/// <summary>
+		/// the absence of an affiliation
+		/// </summary>
+		none,
+		owner,
+		publisher,
+		outcast
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliations.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliations.cs
new file mode 100644
index 0000000..5f52c42
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Affiliations.cs
@@ -0,0 +1,81 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='francisco at denmark.lit'
+            id='affil1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+            <affiliations>
+              <affiliation node='node1' jid='francisco at denmark.lit' affiliation='owner'/>
+              <affiliation node='node2' jid='francisco at denmark.lit' affiliation='publisher'/>
+              <affiliation node='node5' jid='francisco at denmark.lit' affiliation='outcast'/>
+              <affiliation node='node6' jid='francisco at denmark.lit' affiliation='owner'/>
+            </affiliations>
+          </pubsub>
+        </iq>
+    */
+
+    public class Affiliations : Element
+    {
+        #region << Consrtuctors >>
+        public Affiliations()
+        {
+            this.TagName    = "affiliations";
+            this.Namespace  = Uri.PUBSUB;
+        }
+        #endregion
+
+        public Affiliation AddAffiliation()
+        {
+            Affiliation aff = new Affiliation();
+            AddChild(aff);
+            return aff;
+        }
+
+
+        public Affiliation AddAffiliation(Affiliation aff)
+        {
+            AddChild(aff);
+            return aff;
+        }
+
+        public Affiliation[] GetAffiliations()
+        {
+            ElementList nl = SelectElements(typeof(Affiliation));
+            Affiliation[] items = new Affiliation[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Affiliation) e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Configure.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Configure.cs
new file mode 100644
index 0000000..a98266c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Configure.cs
@@ -0,0 +1,89 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class Configure : PubSubAction
+    {
+        #region << Constructors >>
+        public Configure() : base()
+        {
+            this.TagName = "configure";
+        }
+
+        public Configure(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Configure(Type type) : this()
+        {
+            this.Type = type;            
+        }
+
+        public Configure(string node, Type type) : this(node)
+        {            
+            this.Type = type;
+        }
+        #endregion
+
+        public Access Access
+		{
+			get 
+			{
+                return (Access)GetAttributeEnum("access", typeof(Access)); 
+			}
+			set 
+			{
+                if (value == Access.NONE)
+                    RemoveAttribute("access");
+                else
+                    SetAttribute("access", value.ToString()); 
+			}
+		}
+
+        /// <summary>
+        /// The x-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Create.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Create.cs
new file mode 100644
index 0000000..87b5500
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Create.cs
@@ -0,0 +1,74 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class Create : PubSubAction
+    {
+        /*
+        <iq type="set"
+            from="pgm at jabber.org"
+            to="pubsub.jabber.org"
+            id="create1">
+            <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <create node="generic/pgm-mp3-player"/>
+                <configure/>
+            </pubsub>
+        </iq>
+         
+        ...
+            <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <create node="test"
+	                    type="collection"/>
+            </pubsub>
+        ...
+        
+        */
+
+        #region << Constructors >>
+        public Create() : base()
+        {
+            this.TagName = "create";            
+        }
+
+        public Create(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Create(Type type) : this()
+        {
+            this.Type = type;
+        }
+
+        public Create(string node, Type type) : this(node)
+        {
+            this.Type = type;
+        }
+        #endregion
+
+       
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Item.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Item.cs
new file mode 100644
index 0000000..a8a55e6
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Item.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+      <xs:element name='item'>
+        <xs:complexType>
+          <xs:sequence minOccurs='0'>
+            <xs:any namespace='##other'/>
+          </xs:sequence>
+          <xs:attribute name='id' type='xs:string' use='optional'/>
+        </xs:complexType>
+      </xs:element>
+    */
+    public class Item : Element
+    {
+        public Item()
+        {
+            this.TagName    = "item";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        public Item(string id) : this()
+        {
+            this.Id = id;
+        }
+
+        /// <summary>
+        /// The optional id
+        /// </summary>
+        public string Id
+        {
+            get { return GetAttribute("id"); }
+            set { SetAttribute("id", value); }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Items.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Items.cs
new file mode 100644
index 0000000..0f23646
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Items.cs
@@ -0,0 +1,91 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+        <xs:element name='items'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
+              </xs:sequence>
+              <xs:attribute name='max_items' type='xs:positiveInteger' use='optional'/>
+              <xs:attribute name='node' type='xs:string' use='required'/>
+              <xs:attribute name='subid' type='xs:string' use='optional'/>
+            </xs:complexType>
+        </xs:element>
+     
+        <iq type='get'
+            from='francisco at denmark.lit/barracks'
+            to='pubsub.shakespeare.lit'
+            id='items1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+            <items node='blogs/princely_musings'/>
+          </pubsub>
+        </iq>
+    */
+    public class Items : Publish
+    {
+        #region << Constructors >>
+        public Items() : base()
+        {
+            this.TagName    = "items";            
+        }
+
+        public Items(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Items(string node, string subId) : this(node)
+        {
+            this.SubId = subId;
+        }
+
+        public Items(string node, string subId, int maxItems) : this(node, subId)
+        {
+            this.MaxItems = maxItems;
+        }
+        #endregion
+
+        //public string Node
+        //{
+        //    get { return GetAttribute("node"); }
+        //    set { SetAttribute("node", value); }
+        //}
+
+        public string SubId
+        {
+            get { return GetAttribute("subid"); }
+            set { SetAttribute("subid", value); }
+        }
+
+        public int MaxItems
+        {
+            get { return GetAttributeInt("max_items"); }
+            set { SetAttribute("max_items", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Options.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Options.cs
new file mode 100644
index 0000000..6793316
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Options.cs
@@ -0,0 +1,126 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    
+    /*
+        <xs:element name='options'>
+            <xs:complexType>
+              <xs:sequence minOccurs='0'>
+                <xs:any namespace='jabber:x:data'/>
+              </xs:sequence>
+              <xs:attribute name='jid' type='xs:string' use='required'/>
+              <xs:attribute name='node' type='xs:string' use='optional'/>
+              <xs:attribute name='subid' type='xs:string' use='optional'/>
+            </xs:complexType>
+        </xs:element>
+     
+        <iq type='get'
+            from='francisco at denmark.lit/barracks'
+            to='pubsub.shakespeare.lit'
+            id='options1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+            <options node='blogs/princely_musings' jid='francisco at denmark.lit'/>
+          </pubsub>
+        </iq>
+    */
+
+    public class Options : Element
+    {
+        #region << Constructors >>
+        public Options()
+        {
+            this.TagName    = "options";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        public Options(Jid jid) : this()
+        {
+            this.Jid = jid;
+        }
+
+        public Options(Jid jid, string node) : this(jid)
+        {
+            this.Node = node;
+        }
+
+        public Options(Jid jid, string node, string subId) : this(jid, node)
+        {
+            this.SubId = subId;
+        }        
+        #endregion
+
+        public Jid Jid
+		{
+			get 
+			{ 
+				if (HasAttribute("jid"))
+					return new Jid(this.GetAttribute("jid"));
+				else
+					return null;
+			}
+			set 
+			{ 
+				if (value!=null)
+					this.SetAttribute("jid", value.ToString());
+			}
+		}
+        
+        public string Node
+		{
+            get { return GetAttribute("node"); }
+			set	{ SetAttribute("node", value); }			
+		}
+
+        public string SubId
+        {
+            get { return GetAttribute("subid"); }
+            set { SetAttribute("subid", value); }           
+        }
+        
+        /// <summary>
+        /// The X-Data Element/Form
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSub.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSub.cs
new file mode 100644
index 0000000..90491df
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSub.cs
@@ -0,0 +1,211 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class PubSub : Element
+    {
+        public PubSub()
+        {
+            this.TagName    = "pubsub";
+            this.Namespace  = Uri.PUBSUB;
+        }
+        
+        /// <summary>
+        /// the Create Element of the Pubsub Element 
+        /// </summary>
+        public Create Create
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Create)) as Create;
+            }
+            set
+            {
+                if (HasTag(typeof(Create)))
+                    RemoveTag(typeof(Create));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Publish Publish
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Publish)) as Publish;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Publish)))
+                    RemoveTag(typeof(Publish));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Retract Retract
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Retract)) as Retract;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Retract)))
+                    RemoveTag(typeof(Retract));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Subscribe Subscribe
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Subscribe)) as Subscribe;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Subscribe)))
+                    RemoveTag(typeof(Subscribe));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Unsubscribe Unsubscribe
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Unsubscribe)) as Unsubscribe;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Unsubscribe)))
+                    RemoveTag(typeof(Unsubscribe));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Subscriptions Subscriptions
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Subscriptions)) as Subscriptions;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Subscriptions)))
+                    RemoveTag(typeof(Subscriptions));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Affiliations Affiliations
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Affiliations)) as Affiliations;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Affiliations)))
+                    RemoveTag(typeof(Affiliations));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Options Options
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Options)) as Options;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Options)))
+                    RemoveTag(typeof(Options));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+        public Items Items
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Items)) as Items;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Items)))
+                    RemoveTag(typeof(Items));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The Configure Element of the PunSub Element
+        /// </summary>
+        public Configure Configure
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Configure)) as Configure;
+            }
+            set
+            {
+                if (HasTag(typeof(Configure)))
+                    RemoveTag(typeof(Configure));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubAction.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubAction.cs
new file mode 100644
index 0000000..5f13d5c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubAction.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public abstract class PubSubAction : Element
+    {
+        public PubSubAction()
+        {
+            this.Namespace = Uri.PUBSUB;
+        }
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        public Type Type
+        {
+            get
+            {
+                return (Type)GetAttributeEnum("type", typeof(Type));
+            }
+            set
+            {
+                if (value == Type.NONE)
+                    RemoveAttribute("type");
+                else
+                    SetAttribute("type", value.ToString());
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubIq.cs
new file mode 100644
index 0000000..f69627d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubIq.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class PubSubIq : IQ
+    {
+        /*
+            Example 1. Entity requests a new node with default configuration.
+
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="create1">
+                <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                    <create node="generic/pgm-mp3-player"/>
+                    <configure/>
+                </pubsub>
+            </iq>
+        */
+        private PubSub m_PubSub = new PubSub();
+
+        #region << Constructors >>
+        public PubSubIq()
+        {
+            this.GenerateId();
+            this.AddChild(m_PubSub);            
+        }
+        
+        public PubSubIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public PubSubIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public PubSubIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+        #endregion
+
+        public PubSub PubSub
+        {
+            get
+            {
+                return m_PubSub;
+            }
+        }
+
+        
+    }		
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubManager.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubManager.cs
new file mode 100644
index 0000000..5e60527
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/PubSubManager.cs
@@ -0,0 +1,1192 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class PubSubManager
+    {
+        private XmppClientConnection	m_connection	= null;
+
+        #region << Constructors >>
+        public PubSubManager(XmppClientConnection con)
+        {
+            m_connection = con;
+        }
+        #endregion
+
+        #region << Create Instant Node >>
+        /*
+            Example 6. Client requests an instant node
+
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="create2">
+                <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                    <create/>
+                </pubsub>
+            </iq>
+        */
+        
+        public void CreateInstantNode(Jid to)
+        {
+            CreateInstantNode(to, null, null, null);
+        }
+
+        public void CreateInstantNode(Jid to, Jid from)
+        {
+            CreateInstantNode(to, from, null, null);
+        }
+
+        public void CreateInstantNode(Jid to, Jid from, IqCB cb)
+        {
+            CreateInstantNode(to, from, cb, null);
+        }
+
+        public void CreateInstantNode(Jid to, IqCB cb)
+        {
+            CreateInstantNode(to, null, cb, null);
+        }
+
+        public void CreateInstantNode(Jid to, Jid from, IqCB cb,object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Create = new Create();
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Create Node >>
+        /*
+            Example 1. Entity requests a new node with default configuration.
+
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="create1">
+                <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                    <create node="generic/pgm-mp3-player"/>
+                    <configure/>
+                </pubsub>
+            </iq>
+        */
+        /// <summary>
+        /// Create a Node with default configuration
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="node"></param>
+        public void CreateNode(Jid to, string node)
+        {
+            CreateNode(to, null, node, true, null, null);
+        }
+
+        public void CreateNode(Jid to, Jid from, string node)
+        {
+            CreateNode(to, from, node, true, null, null);
+        }
+
+        /// <summary>
+        /// Create a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="from"></param>
+        /// <param name="defaultConfig"></param>
+        public void CreateNode(Jid to, Jid from, string node, bool defaultConfig)
+        {
+            CreateNode(to, from, node, defaultConfig, null, null);
+        }
+
+        public void CreateNode(Jid to, string node, bool defaultConfig, IqCB cb)
+        {
+            CreateNode(to, null, node, defaultConfig, cb, null);
+        }
+
+        public void CreateNode(Jid to, string node, bool defaultConfig, IqCB cb, object cbArgs)
+        {
+            CreateNode(to, null, node, defaultConfig, cb, cbArgs);
+        }
+
+        public void CreateNode(Jid to, Jid from, string node, bool defaultConfig, IqCB cb)
+        {
+            CreateNode(to, from, node, defaultConfig, cb, null);
+        }
+
+        public void CreateNode(Jid to, Jid from, string node, bool defaultConfig, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Create = new Create(node);
+
+            if (defaultConfig)
+                pubsubIq.PubSub.Configure = new Configure();
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << CreateCollection Node >>
+        /*
+            To create a new collection node, the requesting entity MUST specify a type of "collection" when asking the service to create the node. [20]
+
+            Example 185. Entity requests a new collection node
+
+            <iq type='set'
+                from='bard at shakespeare.lit/globe'
+                to='pubsub.shakespeare.lit'
+                id='create3'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <create node='announcements' type='collection'/>
+              </pubsub>
+            </iq>
+                
+            Example 186. Service responds with success
+
+            <iq type='result'
+                from='pubsub.shakespeare.lit'
+                to='bard at shakespeare.lit/globe'
+                id='create3'/>               
+         
+        */
+        public void CreateCollectionNode(Jid to, string node, bool defaultConfig)
+        {
+            CreateCollectionNode(to, null, node, defaultConfig, null, null);
+        }
+
+        public void CreateCollectionNode(Jid to, string node, bool defaultConfig, IqCB cb)
+        {
+            CreateCollectionNode(to, null, node, defaultConfig, cb, null);
+        }
+
+        public void CreateCollectionNode(Jid to, string node, bool defaultConfig, IqCB cb, object cbArgs)
+        {
+            CreateCollectionNode(to, null, node, defaultConfig, cb, cbArgs);
+        }
+
+
+        public void CreateCollectionNode(Jid to, Jid from, string node, bool defaultConfig)
+        {
+            CreateCollectionNode(to, from, node, defaultConfig, null, null);
+        }
+
+        public void CreateCollectionNode(Jid to, Jid from, string node, bool defaultConfig, IqCB cb)
+        {
+            CreateCollectionNode(to, from, node, defaultConfig, cb, null);
+        }
+
+        public void CreateCollectionNode(Jid to, Jid from, string node, bool defaultConfig, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Create = new Create(node, Type.collection);
+
+            if (defaultConfig)
+                pubsubIq.PubSub.Configure = new Configure();
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Delete Node >>
+        /*
+            Example 133. Owner deletes a node
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='delete1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <delete node='blogs/princely_musings'/>
+              </pubsub>
+            </iq>                
+        */
+
+        public void DeleteNode(Jid to, string node)
+        {
+            DeleteNode(to, null, node, null, null);
+        }
+
+        public void DeleteNode(Jid to, string node, IqCB cb)
+        {
+            DeleteNode(to, null, node, cb, null);
+        }
+        
+        public void DeleteNode(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            DeleteNode(to, null, node, cb, cbArgs);
+        }
+
+        public void DeleteNode(Jid to, Jid from, string node)
+        {
+            DeleteNode(to, from, node, null, null);
+        }
+
+        public void DeleteNode(Jid to, Jid from, string node, IqCB cb)
+        {
+            DeleteNode(to, from, node, cb, null);
+        }
+
+        public void DeleteNode(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Delete = new owner.Delete(node);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Purge Node >>
+        /*
+            Example 139. Owner purges all items from a node
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='purge1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <purge node='blogs/princely_musings'/>
+              </pubsub>
+            </iq>                
+        */
+
+        public void PurgeNode(Jid to, string node)
+        {
+            PurgeNode(to, null, node, null, null);
+        }
+
+        public void PurgeNode(Jid to, string node, IqCB cb)
+        {
+            PurgeNode(to, null, node, cb, null);
+        }
+
+        public void PurgeNode(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            PurgeNode(to, null, node, cb, cbArgs);
+        }
+
+        public void PurgeNode(Jid to, Jid from, string node)
+        {
+            PurgeNode(to, from, node, null, null);
+        }
+
+        public void PurgeNode(Jid to, Jid from, string node, IqCB cb)
+        {
+            PurgeNode(to, from, node, cb, null);
+        }
+
+        public void PurgeNode(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Purge = new owner.Purge(node);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Publish to a Node >>
+        /*
+            Example 9. Entity publishes an item with an ItemID
+
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="publish1">
+              <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <publish node="generic/pgm-mp3-player">
+                  <item id="current">
+                    <tune xmlns="http://jabber.org/protocol/tune">
+                      <artist>Ralph Vaughan Williams</artist>
+                      <title>Concerto in F for Bass Tuba</title>
+                      <source>Golden Brass: The Collector's Edition</source>
+                    </tune>
+                  </item>
+                </publish>
+              </pubsub>
+            </iq>
+        */
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        public void PublishItem(Jid to, string node, Item payload)
+        {
+            PublishItem(to, null, node, payload, null, null);
+        }
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        /// <param name="cb"></param>
+        public void PublishItem(Jid to, string node, Item payload, IqCB cb)
+        {
+            PublishItem(to, null, node, payload, cb, null);
+        }
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void PublishItem(Jid to, string node, Item payload, IqCB cb, object cbArgs)
+        {
+            PublishItem(to, null, node, payload, cb, cbArgs);
+        }
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="from"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        public void PublishItem(Jid to, Jid from, string node, Item payload)
+        {
+            PublishItem(to, from, node, payload, null, null);
+        }
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="from"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        /// <param name="cb"></param>
+        public void PublishItem(Jid to, Jid from, string node, Item payload, IqCB cb)
+        {
+            PublishItem(to, from, node, payload, cb, null);
+        }
+
+        /// <summary>
+        /// Publish a payload to a Node
+        /// </summary>
+        /// <param name="to"></param>
+        /// <param name="from"></param>
+        /// <param name="node"></param>
+        /// <param name="payload"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void PublishItem(Jid to, Jid from, string node, Item payload, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            Publish publish = new Publish(node);
+            publish.AddItem(payload);
+            
+            pubsubIq.PubSub.Publish = publish;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+
+        #endregion
+
+        #region << Retract >>
+        /*
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="deleteitem1">
+              <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <retract node="generic/pgm-mp3-player">
+                  <item id="current"/>
+                </retract>
+              </pubsub>
+            </iq>
+        */
+
+        public void RetractItem(Jid to, string node, string id)
+        {
+            RetractItem(to, null, node, id, null, null);
+        }
+
+        public void RetractItem(Jid to, string node, string id, IqCB cb)
+        {
+            RetractItem(to, null, node, id, cb, null);
+        }
+
+        public void RetractItem(Jid to, string node, string id, IqCB cb, object cbArgs)
+        {
+            RetractItem(to, null, node, id, cb, cbArgs);
+        }
+
+
+        public void RetractItem(Jid to, Jid from, string node, string id)
+        {
+            RetractItem(to, from, node, id, null, null);
+        }
+
+        public void RetractItem(Jid to, Jid from, string node, string id, IqCB cb)
+        {
+            RetractItem(to, from, node, id, cb, null);
+        }
+
+        public void RetractItem(Jid to, Jid from, string node, string id, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+
+            pubsubIq.PubSub.Retract = new Retract(node, id);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Subscribe >>
+        /*
+            <iq type="set"
+                from="sub1 at foo.com/home"
+                to="pubsub.jabber.org"
+                id="sub1">
+              <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <subscribe
+                    node="generic/pgm-mp3-player"
+                    jid="sub1 at foo.com"/>
+              </pubsub>
+            </iq>
+        */
+        
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="to">Jid of the Publish Subscribe Service</param>
+        /// <param name="subscribe">Jid which should be subscribed</param>
+        /// <param name="node">node to which we want to subscribe</param>
+        public void Subscribe(Jid to, Jid subscribe, string node)
+        {
+            Subscribe(to, null, subscribe, node, null, null);
+        }
+
+        public void Subscribe(Jid to, Jid subscribe, string node, IqCB cb)
+        {
+            Subscribe(to, null, subscribe, node, cb, null);
+        }
+
+        public void Subscribe(Jid to, Jid subscribe, string node, IqCB cb, object cbArgs)
+        {
+            Subscribe(to, null, subscribe, node, cb, cbArgs);
+        }
+
+        public void Subscribe(Jid to, Jid from, Jid subscribe, string node)
+        {
+            Subscribe(to, from, subscribe, node, null, null);
+        }
+
+        public void Subscribe(Jid to, Jid from, Jid subscribe, string node, IqCB cb)
+        {
+            Subscribe(to, from, subscribe, node, cb, null);
+        }
+
+        public void Subscribe(Jid to, Jid from, Jid subscribe, string node, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+            
+            pubsubIq.PubSub.Subscribe = new Subscribe(node, subscribe);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+
+        #endregion
+
+        #region << Unsubscribe >>
+        /*
+            Example 38. Entity unsubscribes from a node
+
+            <iq type='set'
+                from='francisco at denmark.lit/barracks'
+                to='pubsub.shakespeare.lit'
+                id='unsub1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                 <unsubscribe
+                     node='blogs/princely_musings'
+                     jid='francisco at denmark.lit'/>
+              </pubsub>
+            </iq>
+    
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="to">Jid of the Publish Subscribe Service</param>
+        /// <param name="subscribe">Jid which should be subscribed</param>
+        /// <param name="node">node to which we want to subscribe</param>
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node)
+        {
+            Unsubscribe(to, null, unsubscribe, node, null, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node, string subid)
+        {
+            Unsubscribe(to, null, unsubscribe, node, subid, null, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node, IqCB cb)
+        {
+            Unsubscribe(to, null, unsubscribe, node, cb, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node, string subid, IqCB cb)
+        {
+            Unsubscribe(to, null, unsubscribe, node, subid, cb, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node, IqCB cb, object cbArgs)
+        {
+            Unsubscribe(to, null, unsubscribe, node, cb, cbArgs);
+        }
+
+        public void Unsubscribe(Jid to, Jid unsubscribe, string node, string subid, IqCB cb, object cbArgs)
+        {
+            Unsubscribe(to, null, unsubscribe, node, subid, cb, cbArgs);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node)
+        {
+            Unsubscribe(to, from, unsubscribe, node, null, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node, string subid)
+        {
+            Unsubscribe(to, from, unsubscribe, node, subid, null, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node, IqCB cb)
+        {
+            Unsubscribe(to, from, unsubscribe, node, cb, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node, string subid, IqCB cb)
+        {
+            Unsubscribe(to, from, unsubscribe, node, subid, cb, null);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node, IqCB cb, object cbArgs)
+        {
+            Unsubscribe(to, from, unsubscribe, node, null, cb, cbArgs);
+        }
+
+        public void Unsubscribe(Jid to, Jid from, Jid unsubscribe, string node, string subid, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            Unsubscribe unsub = new Unsubscribe(node, unsubscribe);
+            if (subid != null)
+                unsub.SubId = subid;
+
+            pubsubIq.PubSub.Unsubscribe = unsub;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+
+        #endregion
+
+        #region << Request Subscriptions >>>
+        /*
+            <iq type='get'
+                from='francisco at denmark.lit/barracks'
+                to='pubsub.shakespeare.lit'
+                id='subscriptions1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <subscriptions/>
+              </pubsub>
+            </iq>
+        */
+        public void RequestSubscriptions(Jid to)
+        {
+            RequestSubscriptions(to, null, null, null);
+        }
+
+        public void RequestSubscriptions(Jid to, IqCB cb)
+        {
+            RequestSubscriptions(to, null, cb, null);
+        }
+
+        public void RequestSubscriptions(Jid to, IqCB cb, object cbArgs)
+        {
+            RequestSubscriptions(to, null, cb, cbArgs);
+        }
+
+        public void RequestSubscriptions(Jid to, Jid from)
+        {
+            RequestSubscriptions(to, from, null, null);
+        }
+
+        public void RequestSubscriptions(Jid to, Jid from, IqCB cb)
+        {
+            RequestSubscriptions(to, from, cb, null);
+        }
+
+        public void RequestSubscriptions(Jid to, Jid from, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.get, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Subscriptions = new Subscriptions();
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Owner Request Affiliations >>
+        /*
+            <iq type='get'
+                from='francisco at denmark.lit/barracks'
+                to='pubsub.shakespeare.lit'
+                id='affil1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <affiliations/>
+              </pubsub>
+            </iq>
+        */
+        public void RequestAffiliations(Jid to)
+        {
+            RequestAffiliations(to, null, null, null);
+        }
+
+        public void RequestAffiliations(Jid to, IqCB cb)
+        {
+            RequestAffiliations(to, null, cb, null);
+        }
+
+        public void RequestAffiliations(Jid to, IqCB cb, object cbArgs)
+        {
+            RequestAffiliations(to, null, cb, cbArgs);
+        }
+
+        public void RequestAffiliations(Jid to, Jid from)
+        {
+            RequestAffiliations(to, from, null, null);
+        }
+
+        public void RequestAffiliations(Jid to, Jid from, IqCB cb)
+        {
+            RequestAffiliations(to, from, cb, null);
+        }
+
+        public void RequestAffiliations(Jid to, Jid from, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.get, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Affiliations = new Affiliations();
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Request Subscription Options >>
+        /*
+            <iq type='get'
+                from='francisco at denmark.lit/barracks'
+                to='pubsub.shakespeare.lit'
+                id='options1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <options node='blogs/princely_musings' jid='francisco at denmark.lit'/>
+              </pubsub>
+            </iq>
+        */
+
+        public void RequestSubscriptionOptions(Jid to, Jid subscribe, string node)
+        {
+            RequestSubscriptionOptions(to, null, subscribe, node, null, null);
+        }
+
+        public void RequestSubscriptionOptions(Jid to, Jid subscribe, string node, IqCB cb)
+        {
+            RequestSubscriptionOptions(to, null, subscribe, node, cb, null);
+        }
+
+        public void RequestSubscriptionOptions(Jid to, Jid subscribe, string node, IqCB cb, object cbArgs)
+        {
+            RequestSubscriptionOptions(to, null, subscribe, node, cb, cbArgs);
+        }
+
+        public void RequestSubscriptionOptions(Jid to, Jid from, Jid subscribe, string node)
+        {
+            RequestSubscriptionOptions(to, from, subscribe, node, null, null);
+        }
+
+        public void RequestSubscriptionOptions(Jid to, Jid from, Jid subscribe, string node, IqCB cb)
+        {
+            RequestSubscriptionOptions(to, from, subscribe, node, cb, null);
+        }
+
+        public void RequestSubscriptionOptions(Jid to, Jid from, Jid subscribe, string node, IqCB cb, object cbArgs)
+        {
+            PubSubIq pubsubIq = new PubSubIq(IqType.get, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Options = new Options(subscribe, node);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Request All Subscribers >>
+        /*
+            <iq type='get'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='subman1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <subscribers node='blogs/princely_musings'/>
+              </pubsub>
+            </iq>
+        */
+
+        public void OwnerRequestSubscribers(Jid to, string node)
+        {
+            OwnerRequestSubscribers(to, null, node, null, null);
+        }
+
+        public void OwnerRequestSubscribers(Jid to, string node, IqCB cb)
+        {
+            OwnerRequestSubscribers(to, null, node, cb, null);
+        }
+
+        public void OwnerRequestSubscribers(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            OwnerRequestSubscribers(to, null, node, cb, cbArgs);
+        }
+
+        public void OwnerRequestSubscribers(Jid to, Jid from, string node)
+        {
+            OwnerRequestSubscribers(to, from, node, null, null);
+        }
+
+        public void OwnerRequestSubscribers(Jid to, Jid from, string node, IqCB cb)
+        {
+            OwnerRequestSubscribers(to, from, node, cb, null);
+        }
+
+        public void OwnerRequestSubscribers(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            pubsubIq.PubSub.Subscribers = new agsXMPP.protocol.extensions.pubsub.owner.Subscribers(node);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Modifying single Subscription State >>
+        /*
+            Upon receiving the subscribers list, the node owner MAY modify subscription states. 
+            The owner MUST send only modified subscription states (i.e., a "delta"), not the complete list.
+            (Note: If the 'subscription' attribute is not specified in a modification request, then the value
+            MUST NOT be changed.)
+
+            Example 163. Owner modifies subscriptions
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='subman3'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <subscribers node='blogs/princely_musings'>
+                  <subscriber jid='polonius at denmark.lit' subscription='none'/>                  
+                </subscribers>
+              </pubsub>
+            </iq>
+    
+        */
+
+        public void OwnerModifySubscriptionState(Jid to, string node, Jid subscriber, SubscriptionState state)
+        {
+            OwnerModifySubscriptionState(to, null, node, subscriber, state, null, null);
+        }
+
+        public void OwnerModifySubscriptionState(Jid to, string node, Jid subscriber, SubscriptionState state, IqCB cb)
+        {
+            OwnerModifySubscriptionState(to, null, node, subscriber, state, cb, null);
+        }
+
+        public void OwnerModifySubscriptionState(Jid to, string node, Jid subscriber, SubscriptionState state, IqCB cb, object cbArgs)
+        {
+            OwnerModifySubscriptionState(to, null, node, subscriber, state, cb, cbArgs);
+        }
+
+
+        public void OwnerModifySubscriptionState(Jid to, Jid from, string node, Jid subscriber, SubscriptionState state)
+        {
+            OwnerModifySubscriptionState(to, from, node, subscriber, state, null, null);
+        }
+
+        public void OwnerModifySubscriptionState(Jid to, Jid from, string node, Jid subscriber, SubscriptionState state, IqCB cb)
+        {
+            OwnerModifySubscriptionState(to, from, node, subscriber, state, cb, null);
+        }
+
+        public void OwnerModifySubscriptionState(Jid to, Jid from, string node, Jid subscriber, SubscriptionState state, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            owner.Subscribers subs = new owner.Subscribers(node);
+            subs.AddSubscriber(new owner.Subscriber(subscriber, state));
+            
+            pubsubIq.PubSub.Subscribers = subs;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Modifying multiple Subscription States >>
+        /*
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='subman3'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <subscribers node='blogs/princely_musings'>
+                    <subscriber jid='polonius at denmark.lit' subscription='none'/>
+                    <subscriber jid='bard at shakespeare.lit' subscription='subscribed'/>                 
+                </subscribers>
+              </pubsub>
+            </iq>
+        */
+
+        public void OwnerModifySubscriptionStates(Jid to, string node, owner.Subscriber[] subscribers)
+        {
+            OwnerModifySubscriptionStates(to, null, node, subscribers, null, null);
+        }
+
+        public void OwnerModifySubscriptionStates(Jid to, string node, owner.Subscriber[] subscribers, IqCB cb)
+        {
+            OwnerModifySubscriptionStates(to, null, node, subscribers, cb, null);
+        }
+
+        public void OwnerModifySubscriptionStates(Jid to, string node, owner.Subscriber[] subscribers, IqCB cb, object cbArgs)
+        {
+            OwnerModifySubscriptionStates(to, null, node, subscribers, cb, cbArgs);
+        }
+
+
+        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, owner.Subscriber[] subscribers)
+        {
+            OwnerModifySubscriptionStates(to, from, node, subscribers, null, null);
+        }
+
+        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, owner.Subscriber[] subscribers, IqCB cb)
+        {
+            OwnerModifySubscriptionStates(to, from, node, subscribers, cb, null);
+        }
+
+        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, owner.Subscriber[] subscribers, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            owner.Subscribers subs = new owner.Subscribers(node);
+            subs.AddSubscribers(subscribers);
+
+            pubsubIq.PubSub.Subscribers = subs;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Owner Request Affiliations >>
+        /*
+            Example 168. Owner requests all affiliated entities
+
+            <iq type='get'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='ent1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <affiliates node='blogs/princely_musings'/>
+              </pubsub>
+            </iq>                
+        */
+
+        public void OwnerRequestAffiliations(Jid to, string node)
+        {
+            OwnerRequestAffiliations(to, null, node, null, null);
+        }
+
+        public void OwnerRequestAffiliations(Jid to, string node, IqCB cb)
+        {
+            OwnerRequestAffiliations(to, null, node, cb, null);
+        }
+
+        public void OwnerRequestAffiliations(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            OwnerRequestAffiliations(to, null, node, cb, cbArgs);
+        }
+
+
+        public void OwnerRequestAffiliations(Jid to, Jid from, string node)
+        {
+            OwnerRequestAffiliations(to, from, node, null, null);
+        }
+
+        public void OwnerRequestAffiliations(Jid to, Jid from, string node, IqCB cb)
+        {
+            OwnerRequestAffiliations(to, from, node, cb, null);
+        }
+
+        public void OwnerRequestAffiliations(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+            
+            pubsubIq.PubSub.Affiliates = new owner.Affiliates(node);
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Owner Set/Modify Affiliation >>
+        /*
+            Owner modifies a single affiliation
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='ent2'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <affiliates node='blogs/princely_musings'/>
+                  <affiliate jid='hamlet at denmark.lit' affiliation='owner'/>                 
+                </affiliates>
+              </pubsub>
+            </iq>
+    
+        */
+        
+        public void OwnerModifyAffiliation(Jid to, string node, Jid affiliate, AffiliationType affiliation)
+        {
+            OwnerModifyAffiliation(to, null, node, affiliate, affiliation, null, null);
+        }
+        
+        public void OwnerModifyAffiliation(Jid to, string node, Jid affiliate, AffiliationType affiliation, IqCB cb)
+        {
+            OwnerModifyAffiliation(to, null, node, affiliate, affiliation, cb, null);
+        }
+
+        public void OwnerModifyAffiliation(Jid to, string node, Jid affiliate, AffiliationType affiliation, IqCB cb, object cbArgs)
+        {
+            OwnerModifyAffiliation(to, null, node, affiliate, affiliation, cb, cbArgs);
+        }
+
+
+        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation)
+        {
+            OwnerModifyAffiliation(to, from, node, affiliate, affiliation, null, null);
+        }
+        
+        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation, IqCB cb)
+        {
+            OwnerModifyAffiliation(to, from, node, affiliate, affiliation, cb, null);
+        }
+        
+        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            owner.Affiliates aff = new owner.Affiliates(node);
+            aff.AddAffiliate(new owner.Affiliate(affiliate, affiliation));
+
+            pubsubIq.PubSub.Affiliates = aff;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Owner Modify Affiliations >>
+        /*
+            Owner modifies a single affiliation
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='ent2'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <affiliates node='blogs/princely_musings'/>
+                  <affiliate jid='hamlet at denmark.lit' affiliation='owner'/>
+                  <affiliate jid='polonius at denmark.lit' affiliation='none'/>
+                  <affiliate jid='bard at shakespeare.lit' affiliation='publisher'/>
+                </affiliates>
+              </pubsub>
+            </iq>
+        */
+
+        public void OwnerModifyAffiliations(Jid to, string node, owner.Affiliate[] affiliates)
+        {
+            OwnerModifyAffiliations(to, null, node, affiliates, null, null);
+        }
+
+        public void OwnerModifyAffiliations(Jid to, string node, owner.Affiliate[] affiliates, IqCB cb)
+        {
+            OwnerModifyAffiliations(to, null, node, affiliates, cb, null);
+        }
+
+        public void OwnerModifyAffiliations(Jid to, string node, owner.Affiliate[] affiliates, IqCB cb, object cbArgs)
+        {
+            OwnerModifyAffiliations(to, null, node, affiliates, cb, cbArgs);
+        }
+
+
+        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates)
+        {
+            OwnerModifyAffiliations(to, from, node, affiliates, null, null);
+        }
+
+        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates, IqCB cb)
+        {
+            OwnerModifyAffiliations(to, from, node, affiliates, cb, null);
+        }
+
+        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates, IqCB cb, object cbArgs)
+        {
+            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);
+
+            if (from != null)
+                pubsubIq.From = from;
+
+            owner.Affiliates affs = new owner.Affiliates(node);
+            affs.AddAffiliates(affiliates);
+
+            pubsubIq.PubSub.Affiliates = affs;
+
+            if (cb == null)
+                m_connection.Send(pubsubIq);
+            else
+                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
+        }
+        #endregion
+    }
+    
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Publish.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Publish.cs
new file mode 100644
index 0000000..4cf5dfc
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Publish.cs
@@ -0,0 +1,123 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+     Example 9. Entity publishes an item with an ItemID of the Payload Type UserTune
+
+        <iq type="set"
+            from="pgm at jabber.org"
+            to="pubsub.jabber.org"
+            id="publish1">
+          <pubsub xmlns="http://jabber.org/protocol/pubsub">
+            <publish node="generic/pgm-mp3-player">
+              <item id="current">
+                <tune xmlns="http://jabber.org/protocol/tune">
+                  <artist>Ralph Vaughan Williams</artist>
+                  <title>Concerto in F for Bass Tuba</title>
+                  <source>Golden Brass: The Collector's Edition</source>
+                </tune>
+              </item>
+            </publish>
+          </pubsub>
+        </iq>
+     
+    */
+
+    public class Publish : Element
+    {
+        #region << Constructors >>
+        public Publish()
+        {
+            this.TagName    = "publish";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        /// <summary>
+        /// Its recommended to use this constructor because a node is required
+        /// </summary>
+        /// <param name="node">Node to publish</param>
+        public Publish(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Publish(string node, Item item) : this(node)
+        {
+            this.AddItem(item);
+        }
+        #endregion
+
+        /// <summary>
+        /// The node to publish to. This Property is required
+        /// </summary>
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// Add a payload Item
+        /// </summary>
+        /// <returns>returns the added Item</returns>
+        public Item AddItem()
+        {
+            Item item = new Item();
+            AddChild(item);
+            return item;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns>returns the added item</returns>
+        public Item AddItem(Item item)
+        {
+            AddChild(item);
+            return item;
+        }
+
+        /// <summary>
+        /// This will return all payload items. Multiple items are possible, but doe the most implementaions one item 
+        /// should be enough
+        /// </summary>
+        /// <returns>returns an Array of Items</returns>
+        public Item[] GetItems()
+        {
+            ElementList nl = SelectElements(typeof(Item));
+            Item[] items = new Item[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Item)e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Retract.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Retract.cs
new file mode 100644
index 0000000..09ad27c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Retract.cs
@@ -0,0 +1,69 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    // Publish and retract looks exactly the same, so inherit from publish here
+    public class Retract : Publish
+    {
+
+        /*
+            A service SHOULD allow a publisher to delete an item once it has been published to a node that 
+            supports persistent items.
+            To delete an item, the publisher sends a retract request as shown in the following examples. 
+            The <retract/> element MUST possess a 'node' attribute and SHOULD contain one <item/> element
+            (but MAY contain more than one <item/> element for Batch Processing of item retractions); 
+            the <item/> element MUST be empty and MUST possess an 'id' attribute.
+            
+            <iq type="set"
+                from="pgm at jabber.org"
+                to="pubsub.jabber.org"
+                id="deleteitem1">
+              <pubsub xmlns="http://jabber.org/protocol/pubsub">
+                <retract node="generic/pgm-mp3-player">
+                  <item id="current"/>
+                </retract>
+              </pubsub>
+            </iq>
+        */
+
+        public Retract() : base()
+        {
+            this.TagName    = "retract";            
+        }
+
+        public Retract(string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Retract(string node, string id) : this(node)
+        {
+            this.AddItem(new Item(id));
+        }
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscribe.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscribe.cs
new file mode 100644
index 0000000..7c9203b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscribe.cs
@@ -0,0 +1,83 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class Subscribe : Element
+    {
+        /*
+        Example 25. Entity subscribes to a node
+
+        <iq type="set"
+            from="sub1 at foo.com/home"
+            to="pubsub.jabber.org"
+            id="sub1">
+          <pubsub xmlns="http://jabber.org/protocol/pubsub">
+            <subscribe
+                node="generic/pgm-mp3-player"
+                jid="sub1 at foo.com"/>
+          </pubsub>
+        </iq>
+        */
+        #region << Constructors >>
+        public Subscribe()
+        {
+            this.TagName    = "subscribe";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        public Subscribe(string node, Jid jid) : this()
+        {
+            this.Node   = node;
+            this.Jid    = jid;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        public Jid Jid
+		{
+			get 
+			{ 
+				if (HasAttribute("jid"))
+					return new Jid(this.GetAttribute("jid"));
+				else
+					return null;
+			}
+			set 
+			{
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+                else
+                    RemoveAttribute("jid");
+			}
+		}
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscribeOptions.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscribeOptions.cs
new file mode 100644
index 0000000..5098bc9
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscribeOptions.cs
@@ -0,0 +1,87 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+
+    /*
+        <xs:element name='subscribe-options'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name='required' type='empty' minOccurs='0'/>
+              </xs:sequence>
+            </xs:complexType>
+        </xs:element>
+     
+        
+        Example 36. Service replies with success and indicates that subscription configuration is required
+
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='francisco at denmark.lit/barracks'
+            id='sub1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+            <subscription 
+                node='blogs/princely_musings'
+                jid='francisco at denmark.lit'
+                subscription='unconfigured'>
+              <subscribe-options>
+                <required/>
+              </subscribe-options>
+            </subscription>
+          </pubsub>
+        </iq>           
+    
+    */
+
+    public class SubscribeOptions : Element
+    {
+        #region << Constructors >>
+        public SubscribeOptions()
+        {
+            this.TagName    = "subscribe-options";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        public SubscribeOptions(bool required)
+        {
+            this.Required = required;
+        }
+        #endregion
+
+        public bool Required
+        {
+            get { return HasTag("required"); }
+            set 
+            {
+                if (value)
+                    SetTag("required");
+                else
+                    RemoveTag("required");       
+            }
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscription.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscription.cs
new file mode 100644
index 0000000..820f0d7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscription.cs
@@ -0,0 +1,209 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class Subscription : Element
+    {
+        /*
+            Example 23. Service replies with success
+
+            <iq type='result'
+                from='pubsub.shakespeare.lit'
+                to='francisco at denmark.lit/barracks'
+                id='sub1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <subscription 
+                    node='blogs/princely_musings'
+                    jid='francisco at denmark.lit'
+                    subid='ba49252aaa4f5d320c24d3766f0bdcade78c78d3'
+                    subscription='subscribed'/>
+              </pubsub>
+            </iq>
+         
+            
+            Example 36. Service replies with success and indicates that subscription configuration is required
+
+            <iq type='result'
+                from='pubsub.shakespeare.lit'
+                to='francisco at denmark.lit/barracks'
+                id='sub1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <subscription 
+                    node='blogs/princely_musings'
+                    jid='francisco at denmark.lit'
+                    subscription='unconfigured'>
+                  <subscribe-options>
+                    <required/>
+                  </subscribe-options>
+                </subscription>
+              </pubsub>
+            </iq>
+                
+    
+            <xs:element name='subscription'>
+                <xs:complexType>
+                  <xs:sequence>
+                    <xs:element ref='subscribe-options' minOccurs='0'/>
+                  </xs:sequence>
+                  <xs:attribute name='jid' type='xs:string' use='required'/>
+                  <xs:attribute name='node' type='xs:string' use='optional'/>
+                  <xs:attribute name='subid' type='xs:string' use='optional'/>
+                  <xs:attribute name='subscription' use='optional'>
+                    <xs:simpleType>
+                      <xs:restriction base='xs:NCName'>
+                        <xs:enumeration value='pending'/>
+                        <xs:enumeration value='subscribed'/>
+                        <xs:enumeration value='unconfigured'/>
+                      </xs:restriction>
+                    </xs:simpleType>
+                  </xs:attribute>
+                </xs:complexType>
+            </xs:element>
+        */
+
+        #region << Constructors >>
+        public Subscription()
+        {
+            this.TagName = "subscription";
+            this.Namespace  = Uri.PUBSUB;
+        }
+
+        public Subscription(Jid jid) : this()
+        {
+            this.Jid = jid;   
+        }
+
+        public Subscription(Jid jid, SubscriptionState subType) : this(jid)
+        {
+            this.SubscriptionState = subType;
+        }
+
+        public Subscription(Jid jid, string node) : this()
+        {
+            this.Node = node;
+        }
+
+        public Subscription(Jid jid, string node, SubscriptionState subType) : this(jid, node)
+        {
+            this.SubscriptionState = subType;
+        }
+
+        public Subscription(Jid jid, string node, string subId) : this(jid, node)
+        {
+            this.SubId = subId;
+        }
+
+        public Subscription(Jid jid, string node, string subId, SubscriptionState subType) : this(jid, node, subId)
+        {
+            this.SubscriptionState = subType;
+        }
+        #endregion
+
+        /// <summary>
+        /// Node (optional)
+        /// </summary>
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        public Jid Jid
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+                else
+                    RemoveAttribute("jid");
+            }
+        }
+
+        /// <summary>
+        /// Subscription ID (optional)
+        /// </summary>
+        public string SubId
+        {
+            get { return GetAttribute("subid"); }
+            set 
+            {
+                if (value != null)
+                    SetAttribute("subid", value);
+                else
+                    RemoveAttribute("subid");
+            }
+        }
+
+        //public Affiliation Affiliation
+        //{
+        //    get 
+        //    {
+        //        return (Affiliation)GetAttributeEnum("affiliation", typeof(Affiliation)); 
+        //    }
+        //    set 
+        //    {
+        //        SetAttribute("affiliation", value.ToString()); 
+        //    }
+        //}
+
+        public SubscriptionState SubscriptionState
+        {
+            get
+            {
+                return (SubscriptionState) GetAttributeEnum("subscription", typeof(SubscriptionState));
+            }
+            set
+            {
+                SetAttribute("subscription", value.ToString());
+            }
+        }
+
+        public SubscribeOptions SubscribeOptions
+        {
+            get
+            {
+                return SelectSingleElement(typeof(SubscribeOptions)) as SubscribeOptions;
+
+            }
+            set
+            {
+                if (HasTag(typeof(SubscribeOptions)))
+                    RemoveTag(typeof(SubscribeOptions));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscriptionState.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscriptionState.cs
new file mode 100644
index 0000000..416b394
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/SubscriptionState.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+    None  	The node MUST NOT send event notifications or payloads to the Entity.
+    Pending 	An entity has requested to subscribe to a node and the request has not yet been approved by a node owner. The node MUST NOT send event notifications or payloads to the entity while it is in this state.
+    Unconfigured 	An entity has subscribed but its subscription options have not yet been configured. The node MAY send event notifications or payloads to the entity while it is in this state. The service MAY timeout unconfigured subscriptions.
+    Subscribed
+    */
+
+    public enum SubscriptionState
+    {
+        /// <summary>
+        /// The node MUST NOT send event notifications or payloads to the Entity.
+        /// </summary>
+        none,
+        
+        /// <summary>
+        /// An entity has requested to subscribe to a node and the request has not yet been approved 
+        /// by a node owner. The node MUST NOT send event notifications or payloads to the entity 
+        /// while it is in this state.
+        /// </summary>
+        pending,
+        
+        /// <summary>
+        /// An entity has subscribed but its subscription options have not yet been configured. 
+        /// The node MAY send event notifications or payloads to the entity while it is in this state. 
+        /// The service MAY timeout unconfigured subscriptions.
+        /// </summary>
+        unconfigured,
+        
+        /// <summary>
+        /// 
+        /// </summary>
+        subscribed
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscriptions.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscriptions.cs
new file mode 100644
index 0000000..5bfd08c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Subscriptions.cs
@@ -0,0 +1,101 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public class Subscriptions : Element
+    {
+        /*
+            Example 14. Entity requests all current subscriptions
+
+            <iq type='get'
+                from='francisco at denmark.lit/barracks'
+                to='pubsub.shakespeare.lit'
+                id='subscriptions1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <subscriptions/>
+              </pubsub>
+            </iq>
+                       
+
+            Example 15. Service returns all current subscriptions
+
+            <iq type='result'
+                from='pubsub.shakespeare.lit'
+                to='francisco at denmark.lit'
+                id='subscriptions1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+                <subscriptions>
+                  <subscription node='node1' jid='francisco at denmark.lit' subscription='subscribed'/>
+                  <subscription node='node2' jid='francisco at denmark.lit' subscription='subscribed'/>
+                  <subscription node='node5' jid='francisco at denmark.lit' subscription='unconfigured'/>
+                  <subscription node='node6' jid='francisco at denmark.lit' subscription='pending'/>
+                </subscriptions>
+              </pubsub>
+            </iq>
+    
+        */
+        public Subscriptions()
+        {
+            this.TagName    = "subscriptions";
+            this.Namespace  = Uri.PUBSUB;
+        }
+               
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Subscription AddSubscription()
+        {
+            Subscription sub = new Subscription();
+            AddChild(sub);
+            return sub;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns></returns>
+        public Subscription AddSubscription(Subscription sub)
+        {
+            AddChild(sub);
+            return sub;
+        }
+        
+        public Subscription[] GetSubscriptions()
+        {
+            ElementList nl = SelectElements(typeof(Subscription));
+            Subscription[] items = new Subscription[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Subscription) e;
+                i++;
+            }
+            return items;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Type.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Type.cs
new file mode 100644
index 0000000..89a3bce
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Type.cs
@@ -0,0 +1,32 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    public enum Type
+    {
+        NONE = -1,
+        collection,
+        leaf        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Unsubscribe.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Unsubscribe.cs
new file mode 100644
index 0000000..385f1c7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/Unsubscribe.cs
@@ -0,0 +1,74 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.extensions.pubsub
+{
+    /*
+        
+        Example 38. Entity unsubscribes from a node
+
+        <iq type='set'
+            from='francisco at denmark.lit/barracks'
+            to='pubsub.shakespeare.lit'
+            id='unsub1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub'>
+             <unsubscribe
+                 node='blogs/princely_musings'
+                 jid='francisco at denmark.lit'/>
+          </pubsub>
+        </iq>
+    
+    */
+
+    // looks exactly the same as subscribe, but has an additional Attribute subid
+
+    public class Unsubscribe : Subscribe
+    {
+        #region << Constructors >>
+        public Unsubscribe() : base()
+        {
+            this.TagName = "unsubscribe";
+        }
+
+        public Unsubscribe(string node, Jid jid) : this()
+        {
+            this.Node   = node;
+            this.Jid    = jid;
+        }
+
+        public Unsubscribe(string node, Jid jid, string subid)
+            : this(node, jid)
+        {
+            SubId = subid;
+        }
+        #endregion
+
+        public string SubId
+        {
+            get { return GetAttribute("subid"); }
+            set { SetAttribute("subid", value); }
+        }        
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Delete.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Delete.cs
new file mode 100644
index 0000000..2440562
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Delete.cs
@@ -0,0 +1,49 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub. at event
+{
+	public class Delete : Element
+    {
+        #region << Constructors >>
+        public Delete()
+        {
+            this.TagName    = "delete";
+            this.Namespace  = Uri.PUBSUB_EVENT;
+        }
+
+        public Delete(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Event.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Event.cs
new file mode 100644
index 0000000..0c06a11
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Event.cs
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub. at event
+{
+    public class Event : Element
+    {
+        public Event()
+        {
+            this.TagName    = "event";
+            this.Namespace  = Uri.PUBSUB_EVENT;
+        }
+
+
+        public Delete Delete
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Delete)) as Delete;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Delete)))
+                    RemoveTag(typeof(Delete));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Purge Purge
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Purge)) as Purge;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Purge)))
+                    RemoveTag(typeof(Purge));
+                
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Items Items
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Items)) as Items;
+            }
+            set
+            {
+                if (HasTag(typeof(Items)))
+                    RemoveTag(typeof(Items));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Item.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Item.cs
new file mode 100644
index 0000000..2360ad1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Item.cs
@@ -0,0 +1,93 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub. at event
+{
+    /*
+        <message from='pubsub.shakespeare.lit' to='francisco at denmark.lit' id='foo'>
+          <event xmlns='http://jabber.org/protocol/pubsub#event'>
+            <items node='blogs/princely_musings'>
+              <item id='ae890ac52d0df67ed7cfdf51b644e901'>
+                <entry xmlns='http://www.w3.org/2005/Atom'>
+                  <title>Soliloquy</title>
+                  <summary>
+                        To be, or not to be: that is the question:
+                        Whether 'tis nobler in the mind to suffer
+                        The slings and arrows of outrageous fortune,
+                        Or to take arms against a sea of troubles,
+                        And by opposing end them?
+                  </summary>
+                  <link rel='alternate' type='text/html' 
+                        href='http://denmark.lit/2003/12/13/atom03'/>
+                  <id>tag:denmark.lit,2003:entry-32397</id>
+                  <published>2003-12-13T18:30:02Z</published>
+                  <updated>2003-12-13T18:30:02Z</updated>
+                </entry>
+              </item>
+            </items>
+          </event>
+        </message>
+     
+        <xs:element name='item'>
+            <xs:complexType>
+              <xs:choice minOccurs='0'>
+                <xs:element name='retract' type='empty'/>
+                <xs:any namespace='##other'/>
+              </xs:choice>
+              <xs:attribute name='id' type='xs:string' use='optional'/>
+            </xs:complexType>
+        </xs:element>
+    */
+
+    // This class is the same as the Item class in the main pubsub namespace,
+    // so inherit it and overwrite some properties and functions
+
+    public class Item : agsXMPP.protocol.extensions.pubsub.Item
+    {
+        #region << Constructors >>
+        public Item() : base()
+        {
+            this.Namespace = Uri.PUBSUB_EVENT;
+        }
+        
+        public Item(string id) : this()
+        {
+            this.Id = id;
+        }
+        #endregion
+
+        private const string RETRACT = "retract";
+
+        public bool Retract
+        {
+            get { return HasTag(RETRACT); }
+            set 
+            {
+                if (value)
+                    SetTag(RETRACT);
+                else
+                    RemoveTag(RETRACT);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Items.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Items.cs
new file mode 100644
index 0000000..0d08e05
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Items.cs
@@ -0,0 +1,124 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub. at event
+{
+    /*
+        <message from='pubsub.shakespeare.lit' to='francisco at denmark.lit' id='foo'>
+          <event xmlns='http://jabber.org/protocol/pubsub#event'>
+            <items node='blogs/princely_musings'>
+              <item id='ae890ac52d0df67ed7cfdf51b644e901'>
+                <entry xmlns='http://www.w3.org/2005/Atom'>
+                  <title>Soliloquy</title>
+                  <summary>
+                        To be, or not to be: that is the question:
+                        Whether 'tis nobler in the mind to suffer
+                        The slings and arrows of outrageous fortune,
+                        Or to take arms against a sea of troubles,
+                        And by opposing end them?
+                  </summary>
+                  <link rel='alternate' type='text/html' 
+                        href='http://denmark.lit/2003/12/13/atom03'/>
+                  <id>tag:denmark.lit,2003:entry-32397</id>
+                  <published>2003-12-13T18:30:02Z</published>
+                  <updated>2003-12-13T18:30:02Z</updated>
+                </entry>
+              </item>
+            </items>
+          </event>
+        </message>
+     
+        <xs:element name='items'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element ref='item' minOccurs='0' maxOccurs='unbounded'/>
+              </xs:sequence>
+              <xs:attribute name='node' type='xs:string' use='required'/>
+            </xs:complexType>
+        </xs:element>
+    */
+
+    public class Items : Element
+    {
+        #region << Constructors >>
+        public Items()
+        {
+            this.TagName    = "items";
+            this.Namespace  = Uri.PUBSUB_EVENT;
+        }
+
+        public Items(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// Add a payload Item
+        /// </summary>
+        /// <returns>returns the added Item</returns>
+        public Item AddItem()
+        {
+            Item item = new Item();
+            AddChild(item);
+            return item;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns>returns the added item</returns>
+        public Item AddItem(Item item)
+        {
+            AddChild(item);
+            return item;
+        }
+
+        /// <summary>
+        /// This will return all payload items. Multiple items are possible, but doe the most implementaions one item 
+        /// should be enough
+        /// </summary>
+        /// <returns>returns an Array of Items</returns>
+        public Item[] GetItems()
+        {
+            ElementList nl = SelectElements(typeof(Item));
+            Item[] items = new Item[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Item)e;
+                i++;
+            }
+            return items;
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Purge.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Purge.cs
new file mode 100644
index 0000000..46689a0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/event/Purge.cs
@@ -0,0 +1,49 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub. at event
+{
+	public class Purge : Element
+    {
+        #region << Constructors >>
+        public Purge()
+        {            
+            this.TagName    = "purge";
+            this.Namespace  = Uri.PUBSUB_EVENT;
+        }
+
+        public Purge(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliate.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliate.cs
new file mode 100644
index 0000000..5e9c85f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliate.cs
@@ -0,0 +1,106 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    /*
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='hamlet at denmark.lit/elsinore'
+            id='ent1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+            <affiliates node='blogs/princely_musings'>
+              <affiliate jid='hamlet at denmark.lit' affiliation='owner'/>
+              <affiliate jid='polonius at denmark.lit' affiliation='outcast'/>
+            </affiliates>
+          </pubsub>
+        </iq>
+        
+        <xs:element name='affiliate'>
+            <xs:complexType>
+              <xs:simpleContent>
+                <xs:extension base='empty'>
+                  <xs:attribute name='affiliation' use='required'>
+                    <xs:simpleType>
+                      <xs:restriction base='xs:NCName'>
+                        <xs:enumeration value='none'/>
+                        <xs:enumeration value='outcast'/>
+                        <xs:enumeration value='owner'/>
+                        <xs:enumeration value='publisher'/>
+                      </xs:restriction>
+                    </xs:simpleType>
+                  </xs:attribute>
+                  <xs:attribute name='jid' type='xs:string' use='required'/>
+                </xs:extension>
+              </xs:simpleContent>
+            </xs:complexType>
+        </xs:element>
+     
+    */
+    public class Affiliate : Element
+    {
+        #region << Constructors >>
+        public Affiliate()
+        {
+            this.TagName    = "affiliate";
+            this.Namespace  = Uri.PUBSUB_OWNER;
+        }
+
+        public Affiliate(Jid jid, AffiliationType affiliation) : this()
+        {
+            this.Jid            = jid;
+            this.Affiliation    = affiliation;
+        }
+        #endregion
+
+        public Jid Jid
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+            }
+        }
+
+        public AffiliationType Affiliation
+		{
+			get 
+			{
+                return (AffiliationType) GetAttributeEnum("affiliation", typeof(AffiliationType)); 
+			}
+			set 
+			{
+                SetAttribute("affiliation", value.ToString());
+			}
+		}
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliates.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliates.cs
new file mode 100644
index 0000000..d2eba08
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Affiliates.cs
@@ -0,0 +1,124 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    /*
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='hamlet at denmark.lit/elsinore'
+            id='ent1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+            <affiliates node='blogs/princely_musings'>
+              <affiliate jid='hamlet at denmark.lit' affiliation='owner'/>
+              <affiliate jid='polonius at denmark.lit' affiliation='outcast'/>
+            </affiliates>
+          </pubsub>
+        </iq>
+     
+     
+        <xs:element name='affiliates'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element ref='affiliate' minOccurs='0' maxOccurs='unbounded'/>
+              </xs:sequence>
+              <xs:attribute name='node' type='xs:string' use='required'/>
+            </xs:complexType>
+          </xs:element>
+    */
+
+    public class Affiliates : Element
+    {
+        #region << Constructors >>
+        public Affiliates()
+        {
+            this.TagName    = "affiliates";
+            this.Namespace  = Uri.PUBSUB_OWNER;
+        }
+                
+        public Affiliates(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Affiliate AddAffiliate()
+        {
+            Affiliate affiliate = new Affiliate();
+            AddChild(affiliate);
+            return affiliate;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliate"></param>
+        /// <returns></returns>
+        public Affiliate AddAffiliate(Affiliate affiliate)
+        {
+            AddChild(affiliate);
+            return affiliate;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliates"></param>
+        public void AddAffiliates(Affiliate[] affiliates)
+        {
+            foreach (Affiliate affiliate in affiliates)
+            {
+                AddAffiliate(affiliate);
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Affiliate[] GetAffiliates()
+        {
+            ElementList nl = SelectElements(typeof(Affiliate));
+            Affiliate[] affiliates = new Affiliate[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                affiliates[i] = (Affiliate)e;
+                i++;
+            }
+            return affiliates;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Configure.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Configure.cs
new file mode 100644
index 0000000..88ee580
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Configure.cs
@@ -0,0 +1,68 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    public class Configure : Element
+    {
+        #region << Constructor >>
+        public Configure()
+        {
+            TagName    = "configure";
+            Namespace  = Uri.PUBSUB_OWNER;
+        }
+
+        public Configure(string node) : this()
+        {
+            Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// The x-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Delete.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Delete.cs
new file mode 100644
index 0000000..a5b89bb
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Delete.cs
@@ -0,0 +1,43 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    // Only the Namespace is different to Delete in the event Namespace
+    
+    public class Delete : @event.Delete
+    {
+        #region << Constructors >>
+        public Delete() : base()    
+        {            
+            this.Namespace = Uri.PUBSUB_OWNER;
+        }
+
+        public Delete(string node)
+        {
+            this.Node = node;
+        }
+        #endregion
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Pending.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Pending.cs
new file mode 100644
index 0000000..0203057
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Pending.cs
@@ -0,0 +1,71 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    public class Pending : Element
+    {
+        #region << Constructors >>
+        public Pending() 
+        {            
+            this.TagName = "pending";
+            this.Namespace = Uri.PUBSUB_OWNER;
+        }
+
+        public Pending(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// The x-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSub.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSub.cs
new file mode 100644
index 0000000..e95ab4d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSub.cs
@@ -0,0 +1,123 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    public class PubSub : Element
+    {
+        public PubSub()
+        {
+            this.TagName    = "pubsub";
+            this.Namespace  = Uri.PUBSUB_OWNER;
+        }
+
+        public Delete Delete
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Delete)) as Delete;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Delete)))
+                    RemoveTag(typeof(Delete));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Purge Purge
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Purge)) as Purge;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Purge)))
+                    RemoveTag(typeof(Purge));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Subscribers Subscribers
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Subscribers)) as Subscribers;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Subscribers)))
+                    RemoveTag(typeof(Subscribers));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Affiliates Affiliates
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Affiliates)) as Affiliates;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Affiliates)))
+                    RemoveTag(typeof(Affiliates));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Configure Configure
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Configure)) as Configure;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Configure)))
+                    RemoveTag(typeof(Configure));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+       
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSubIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSubIq.cs
new file mode 100644
index 0000000..4287f4e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/PubSubIq.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    public class PubSubIq : IQ
+    {
+        /*
+            Example 133. Owner deletes a node
+
+            <iq type='set'
+                from='hamlet at denmark.lit/elsinore'
+                to='pubsub.shakespeare.lit'
+                id='delete1'>
+              <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+                <delete node='blogs/princely_musings'/>
+              </pubsub>
+            </iq>
+                
+        */
+        private PubSub m_PubSub = new PubSub();
+
+        #region << Constructors >>
+        public PubSubIq()
+        {
+            this.GenerateId();
+            this.AddChild(m_PubSub);
+        }
+
+        public PubSubIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public PubSubIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public PubSubIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+        #endregion
+
+        public PubSub PubSub
+        {
+            get
+            {
+                return m_PubSub;
+            }
+        }
+
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Purge.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Purge.cs
new file mode 100644
index 0000000..cbde0e3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Purge.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    // Only the Namespace is different to Purge in the Event Namespace
+    public class Purge : @event.Purge
+    {
+        #region << Constructors >>
+        public Purge() : base()
+        {
+            this.Namespace = Uri.PUBSUB_OWNER;
+        }
+
+        public Purge(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscriber.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscriber.cs
new file mode 100644
index 0000000..30e06ed
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscriber.cs
@@ -0,0 +1,106 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    /*
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='hamlet at denmark.lit/elsinore'
+            id='subman1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+            <subscribers node='blogs/princely_musings'>
+              <subscriber jid='hamlet at denmark.lit' subscription='subscribed'/>
+              <subscriber jid='polonius at denmark.lit' subscription='unconfigured'/>
+            </subscribers>
+          </pubsub>
+        </iq>
+     
+        <xs:element name='subscriber'>
+            <xs:complexType>
+              <xs:simpleContent>
+                <xs:extension base='empty'>
+                  <xs:attribute name='subscription' use='required'>
+                    <xs:simpleType>
+                      <xs:restriction base='xs:NCName'>
+                        <xs:enumeration value='none'/>
+                        <xs:enumeration value='pending'/>
+                        <xs:enumeration value='subscribed'/>
+                        <xs:enumeration value='unconfigured'/>
+                      </xs:restriction>
+                    </xs:simpleType>
+                  </xs:attribute>
+                  <xs:attribute name='jid' type='xs:string' use='required'/>
+                </xs:extension>
+              </xs:simpleContent>
+            </xs:complexType>
+        </xs:element>
+    */
+
+    public class Subscriber : Element
+    {
+        #region << Constructors >>
+        public Subscriber()
+        {
+            this.TagName    = "subscriber";
+            this.Namespace  = Uri.PUBSUB_OWNER;
+        }
+
+        public Subscriber(Jid jid, SubscriptionState sub) : this()
+        {
+            this.Jid                = jid;
+            this.SubscriptionState   = sub;
+        }
+        #endregion
+
+        public SubscriptionState SubscriptionState
+		{
+			get 
+			{
+                return (SubscriptionState)GetAttributeEnum("subscription", typeof(SubscriptionState)); 
+			}
+			set 
+			{
+                SetAttribute("subscription", value.ToString()); 
+			}
+		}
+        
+        public Jid Jid
+		{
+			get 
+			{ 
+				if (HasAttribute("jid"))
+					return new Jid(this.GetAttribute("jid"));
+				else
+					return null;
+			}
+			set 
+			{ 
+				if (value!=null)
+					this.SetAttribute("jid", value.ToString());
+			}
+		}
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscribers.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscribers.cs
new file mode 100644
index 0000000..0cde380
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/pubsub/owner/Subscribers.cs
@@ -0,0 +1,118 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.pubsub.owner
+{
+    /*
+        <iq type='result'
+            from='pubsub.shakespeare.lit'
+            to='hamlet at denmark.lit/elsinore'
+            id='subman1'>
+          <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
+            <subscribers node='blogs/princely_musings'>
+              <subscriber jid='hamlet at denmark.lit' subscription='subscribed'/>
+              <subscriber jid='polonius at denmark.lit' subscription='unconfigured'/>
+            </subscribers>
+          </pubsub>
+        </iq>
+        
+        <xs:element name='subscribers'>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element ref='subscriber' minOccurs='0' maxOccurs='unbounded'/>
+              </xs:sequence>
+              <xs:attribute name='node' type='xs:string' use='required'/>
+            </xs:complexType>
+        </xs:element>
+    */
+    public class Subscribers : Element
+    {
+        #region << Constructors >>
+        public Subscribers()
+        {
+            this.TagName    = "subscribers";
+            this.Namespace  = Uri.PUBSUB_OWNER;
+        }
+
+        public Subscribers(string node) : this()
+        {
+            this.Node = node;
+        }
+        #endregion
+
+        public string Node
+        {
+            get { return GetAttribute("node"); }
+            set { SetAttribute("node", value); }
+        }
+
+        /// <summary>
+        /// Add a Subscriber
+        /// </summary>
+        /// <returns></returns>
+        public Subscriber AddSubscriber()
+        {
+            Subscriber subscriber = new Subscriber();
+            AddChild(subscriber);
+            return subscriber;
+        }
+
+        /// <summary>
+        /// Add a Subscriber
+        /// </summary>
+        /// <param name="subscriber">the Subscriber to add</param>
+        /// <returns></returns>
+        public Subscriber AddSubscriber(Subscriber subscriber)
+        {
+            AddChild(subscriber);
+            return subscriber;
+        }
+
+        public void AddSubscribers(Subscriber[] subscribers)
+        {
+            foreach (Subscriber subscriber in subscribers)
+            {
+                AddSubscriber(subscriber);
+            }           
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Subscriber[] GetSubscribers()
+        {
+            ElementList nl = SelectElements(typeof(Subscriber));
+            Subscriber[] subscribers = new Subscriber[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                subscribers[i] = (Subscriber) e;
+                i++;
+            }
+            return subscribers;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Header.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Header.cs
new file mode 100644
index 0000000..35227ed
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Header.cs
@@ -0,0 +1,58 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.shim
+{
+
+	/// <summary>
+	/// JEP-0131: Stanza Headers and Internet Metadata (SHIM)
+	/// </summary>
+	public class Header : Element
+	{
+		// <headers xmlns='http://jabber.org/protocol/shim'>
+		//	 <header name='In-Reply-To'>123456789 at capulet.com</header>
+		// <header name='Keywords'>shakespeare,<xmpp/></header>
+		// </headers>
+		#region << Constructors >>
+		public Header()
+		{
+			this.TagName	= "header";
+			this.Namespace	= Uri.SHIM;			
+		}
+
+		public Header(string name, string val) : this()
+		{
+			this.Name	= name;
+			this.Value	= val;
+		}
+		#endregion
+
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Headers.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Headers.cs
new file mode 100644
index 0000000..de7a3d7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/shim/Headers.cs
@@ -0,0 +1,109 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.extensions.shim
+{
+	/// <summary>
+	/// JEP-0131: Stanza Headers and Internet Metadata (SHIM)
+	/// </summary>
+	public class Headers : Element
+	{
+		// <headers xmlns='http://jabber.org/protocol/shim'>
+		//	 <header name='In-Reply-To'>123456789 at capulet.com</header>
+		// <header name='Keywords'>shakespeare,<xmpp/></header>
+		// </headers>
+		public Headers()
+		{
+			this.TagName	= "headers";
+			this.Namespace	= Uri.SHIM;			
+		}
+
+		/// <summary>
+		/// Adds a new Header
+		/// </summary>
+		/// <returns></returns>
+		public Header AddHeader()
+		{
+			Header h = new Header();
+			AddChild(h);
+			return h;
+		}
+	
+		/// <summary>
+		/// Adds the given Header
+		/// </summary>
+		/// <param name="header"></param>
+		/// <returns>returns the given Header</returns>
+		public Header AddHeader(Header header)
+		{			
+			AddChild(header);
+			return header;
+		}
+		
+		/// <summary>
+		/// Adds a new Header
+		/// </summary>
+		/// <param name="name">header name</param>
+		/// <param name="val">header value</param>
+		/// <returns>returns the new added header</returns>
+		public Header AddHeader(string name, string val)
+		{	
+			Header header = new Header(name, val);
+			AddChild(header);
+			return header;
+		}
+
+        public void SetHeader(string name, string val)
+        {
+            Header header = GetHeader(name);
+            if (header != null)
+                header.Value = val;
+            else
+                AddHeader(name, val);
+        }
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="name"></param>
+		public Header GetHeader(string name)
+		{
+			return (Header) SelectSingleElement("header", "name", name);
+		}
+
+		public Header[] GetHeaders()
+		{
+            ElementList nl = SelectElements("header");
+			Header[] headers = new Header[nl.Count];
+			
+			int i = 0;
+			foreach (Element e in nl)
+			{				
+				headers[i] = (Header) e;
+				i++;
+			}
+			return headers;
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/si/SI.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/si/SI.cs
new file mode 100644
index 0000000..4f25131
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/si/SI.cs
@@ -0,0 +1,121 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.protocol.extensions.filetransfer;
+using agsXMPP.protocol.extensions.featureneg;
+
+namespace agsXMPP.protocol.extensions.si
+{
+	/// <summary>
+	/// JEP-0095: Stream Initiation.
+	/// This JEP defines a protocol for initiating a stream (with meta information) between any two Jabber entities.
+	/// </summary>
+	public class SI : Element
+	{
+		public SI()
+		{
+			this.TagName	= "si";
+			this.Namespace	= Uri.SI;
+		}
+
+		//id='a0'
+		//mime-type='text/plain'
+
+		/// <summary>
+		/// The "id" attribute is an opaque identifier. 
+		/// This attribute MUST be present on type='set', and MUST be a valid string. 
+		/// This SHOULD NOT be sent back on type='result', since the <iq/> "id" attribute provides the only context needed.
+		/// This value is generated by the Sender, and the same value MUST be used throughout a session when talking to the Receiver.
+		/// </summary>
+		public string Id
+		{
+			get { return GetAttribute("id"); }
+			set { SetAttribute("id", value); }
+		}
+
+		/// <summary>
+		/// The "mime-type" attribute identifies the MIME-type for the data across the stream.
+		/// This attribute MUST be a valid MIME-type as registered with the Internet Assigned Numbers Authority (IANA) [3] 
+		/// (specifically, as listed at "http://www.iana.org/assignments/media-types"). 
+		/// During negotiation, this attribute SHOULD be present, and is otherwise not required. 
+		/// If not included during negotiation, its value is assumed to be "binary/octect-stream".
+		/// </summary>
+		public string MimeType
+		{
+			get { return GetAttribute("mime-type"); }
+			set { SetAttribute("mime-type", value); }
+		}
+
+		/// <summary>
+		/// The "profile" attribute defines the SI profile in use. This value MUST be present during negotiation,
+		/// and is the namespace of the profile to use.
+		/// </summary>
+		public string Profile
+		{
+			get { return GetAttribute("profile"); }
+			set { SetAttribute("profile", value); }
+		}
+
+
+        /// <summary>
+        /// the FeatureNeg Element 
+        /// </summary>
+        public FeatureNeg FeatureNeg
+        {
+            get
+            {
+                return SelectSingleElement(typeof(FeatureNeg)) as FeatureNeg;
+            }
+            set
+            {
+                if (HasTag(typeof(FeatureNeg)))
+                    RemoveTag(typeof(FeatureNeg));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// the File Element
+        /// </summary>
+        public File File
+        {
+            get
+            {
+                return SelectSingleElement(typeof(File)) as File;
+            }
+            set
+            {
+                if (HasTag(typeof(File)))
+                    RemoveTag(typeof(File));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/extensions/si/SIIq.cs b/lib/agsxmpp/agsxmpp/protocol/extensions/si/SIIq.cs
new file mode 100644
index 0000000..2f65aac
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/extensions/si/SIIq.cs
@@ -0,0 +1,81 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.extensions.si
+{
+    /*
+    <iq id="jcl_18" to="xxx" type="result" from="yyy">
+        <si xmlns="http://jabber.org/protocol/si">
+            <feature xmlns="http://jabber.org/protocol/feature-neg">
+                <x xmlns="jabber:x:data" type="submit">
+                    <field var="stream-method">
+                        <value>http://jabber.org/protocol/bytestreams</value>
+                    </field>
+                </x>
+            </feature>
+        </si>
+    </iq>
+ 
+    */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class SIIq : IQ
+    {
+        private SI m_SI = new SI();
+
+        public SIIq()
+        {            
+            this.GenerateId();
+            this.AddChild(m_SI);
+        }
+
+        public SIIq(IqType type)
+            : this()
+        {
+            this.Type = type;
+        }
+
+        public SIIq(IqType type, Jid to)
+            : this(type)
+        {
+            this.To = to;
+        }
+
+        public SIIq(IqType type, Jid to, Jid from)
+            : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public SI SI
+        {
+            get
+            {
+                return m_SI;
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agent.cs b/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agent.cs
new file mode 100644
index 0000000..51df123
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agent.cs
@@ -0,0 +1,131 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.agent
+{
+	//	<agent jid="conference.myjabber.net"><name>Public Conferencing</name><service>public</service></agent>
+	//	<agent jid="aim.myjabber.net"><name>AIM Transport</name><service>aim</service><transport>Enter ID</transport><register/></agent>
+	//	<agent jid="yahoo.myjabber.net"><name>Yahoo! Transport</name><service>yahoo</service><transport>Enter ID</transport><register/></agent>
+	//	<agent jid="icq.myjabber.net"><name>ICQ Transport</name><service>icq</service><transport>Enter ID</transport><register/></agent>
+	//	<agent jid="msn.myjabber.net"><name>MSN Transport</name><service>msn</service><transport>Enter ID</transport><register/></agent>
+
+	/// <summary>
+	/// Zusammenfassung f�r Agent.
+	/// </summary>
+	public class Agent : Element
+	{
+		public Agent()
+		{
+			this.TagName	= "agent";
+			this.Namespace	= Uri.IQ_AGENTS;
+		}
+
+		public Jid Jid
+		{
+			get	{ return new Jid(this.GetAttribute("jid"));	}
+			set { SetAttribute("jid", value.ToString());	}
+		}
+
+		public string Name
+		{
+			get	{ return GetTag("name"); }
+			set { SetTag("name", value); }
+		}
+
+		public string Service
+		{
+			get { return GetTag("service");	}
+			set { SetTag("service", value); }
+		}
+
+		public string Description
+		{
+			get { return GetTag("description"); }
+			set { SetTag("description", value); }
+
+		}
+
+		/// <summary>
+		/// Can we register this agent/transport
+		/// </summary>
+		public bool CanRegister
+		{
+			get	{ return HasTag("register"); }
+			set
+			{
+				if (value == true)
+					SetTag("register");
+				else
+					RemoveTag("register");
+			}
+		}
+
+		/// <summary>
+		/// Can we search thru this agent/transport
+		/// </summary>
+		public bool CanSearch
+		{
+			get	{ return HasTag("search"); }
+			set
+			{
+				if (value == true)
+					SetTag("search");
+				else
+					RemoveTag("search");
+			}
+		}
+		
+		/// <summary>
+		/// Is this agent a transport?
+		/// </summary>
+		public bool IsTransport
+		{
+			get	{ return HasTag("transport"); }
+			set
+			{
+				if (value == true)
+					SetTag("transport");
+				else
+					RemoveTag("transport");
+			}
+		}
+		
+		/// <summary>
+		/// Is this agent for groupchat
+		/// </summary>
+		public bool IsGroupchat
+		{
+			get	{ return HasTag("groupchat"); }
+			set
+			{
+				if (value == true)
+					SetTag("groupchat");
+				else
+					RemoveTag("groupchat");
+			}
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agents.cs b/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agents.cs
new file mode 100644
index 0000000..f0e04ff
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/agent/Agents.cs
@@ -0,0 +1,58 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.agent
+{
+	// Send:<iq id='fullagents' to='myjabber.net' type='get'>
+	//			<query xmlns='jabber:iq:agents'/>
+	//		</iq>
+	// Recv:<iq from="myjabber.net" id="fullagents" to="gnauck at myjabber.net/Office" type="result">
+	//			<query xmlns="jabber:iq:agents">
+	//				<agent jid="conference.myjabber.net"><name>Public Conferencing</name><service>public</service></agent>
+	//				<agent jid="aim.myjabber.net"><name>AIM Transport</name><service>aim</service><transport>Enter ID</transport><register/></agent>
+	//				<agent jid="yahoo.myjabber.net"><name>Yahoo! Transport</name><service>yahoo</service><transport>Enter ID</transport><register/></agent>
+	//				<agent jid="icq.myjabber.net"><name>ICQ Transport</name><service>icq</service><transport>Enter ID</transport><register/></agent>
+	//				<agent jid="msn.myjabber.net"><name>MSN Transport</name><service>msn</service><transport>Enter ID</transport><register/></agent>
+	//			</query>
+	//		</iq> 
+
+	/// <summary>
+	/// Zusammenfassung f�r Agent.
+	/// </summary>
+	public class Agents : Element
+	{
+		public Agents()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_AGENTS;
+		}
+
+
+        public ElementList GetAgents()
+		{
+			return SelectElements("agent");
+		}
+	}	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/agent/AgentsIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/agent/AgentsIq.cs
new file mode 100644
index 0000000..1b8aaf1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/agent/AgentsIq.cs
@@ -0,0 +1,65 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+// Request Agents:
+// <iq id='someid' to='myjabber.net' type='get'>
+//		<query xmlns='jabber:iq:agents'/>
+// </iq>
+
+namespace agsXMPP.protocol.iq.agent
+{
+	/// <summary>
+	/// Summary description for AgentsIq.
+	/// </summary>
+	public class AgentsIq : IQ
+	{
+		private Agents m_Agents = new Agents();
+
+		public AgentsIq()
+		{
+			base.Query = m_Agents;
+			this.GenerateId();
+		}
+
+		public AgentsIq(IqType type) : this()
+		{			
+            this.Type = type;		
+		}
+
+		public AgentsIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public AgentsIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Agents Query
+		{
+			get	{ return m_Agents; }            
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/auth/Auth.cs b/lib/agsxmpp/agsxmpp/protocol/iq/auth/Auth.cs
new file mode 100644
index 0000000..db514e9
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/auth/Auth.cs
@@ -0,0 +1,118 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.auth
+{
+	//	Send:<iq type='get' to='myjabber.net' id='MX_7'>
+	//			<query xmlns='jabber:iq:auth'><username>gnauck</username></query>
+	//		 </iq>
+	//	Recv:<iq type="result" id="MX_7"><query xmlns="jabber:iq:auth"><username>gnauck</username><password/><digest/><resource/></query></iq> 
+	//
+	//	Send:<iq type='set' id='mx_login'><query xmlns='jabber:iq:auth'><username>gnauck</username><digest>27c05d464e3f908db3b2ca1729674bfddb28daf2</digest><resource>Office</resource></query></iq>
+	//	Recv:<iq id="mx_login" type="result"/> 
+
+
+	/// <summary>
+	///
+	/// </summary>
+	public class Auth : Element
+	{
+		#region << Constructors >>
+		public Auth()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_AUTH;
+		}
+		#endregion
+
+		#region << Properties >>
+		public string Username
+		{
+			get	{ return GetTag("username"); }
+			set	{ SetTag("username", value); }
+		}
+
+		public string Password
+		{
+			get	{ return GetTag("password"); }
+			set	{ SetTag("password", value); }
+		}
+
+		public string Resource
+		{
+			get	{ return GetTag("resource"); }
+			set	{ SetTag("resource", value); }
+		}
+
+		public string Digest
+		{
+			get	{ return GetTag("digest"); }
+			set { SetTag("digest", value); }			
+		}
+		#endregion
+
+		#region << Public Methods >>
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="username"></param>
+		/// <param name="password"></param>
+		/// <param name="StreamID"></param>
+		public void SetAuthDigest(string username, string password, string StreamID)
+		{			
+			// Jive Messenger has a problem when we dont remove the password Tag
+			this.RemoveTag("password");
+			this.Username	= username;
+			this.Digest		= Util.Hash.Sha1Hash(StreamID + password);			
+		}
+		
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="username"></param>
+		/// <param name="password"></param>
+		public void SetAuthPlain(string username, string password)
+		{			
+			// remove digest Tag when existing
+			this.RemoveTag("digest");
+			this.Username	= username;
+			this.Password	= password;
+		}
+		
+		/// <summary>
+		/// 
+		/// </summary>
+		public void SetAuth(string username, string password, string streamId)
+		{
+			if(HasTag("digest"))
+				SetAuthDigest(username, password, streamId);
+			else
+				SetAuthPlain(username,password);
+		}
+		#endregion
+
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/auth/AuthIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/auth/AuthIq.cs
new file mode 100644
index 0000000..df59fb8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/auth/AuthIq.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.auth
+{
+	/// <summary>
+	/// Summary description for AuthIq.
+	/// </summary>
+	public class AuthIq : IQ
+	{
+		private Auth m_Auth	= new Auth();
+		
+		public AuthIq()
+		{		
+			base.Query = m_Auth;
+			this.GenerateId();			
+		}
+
+		public AuthIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public AuthIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public AuthIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Auth Query
+		{
+			get
+			{
+				return m_Auth;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/avatar/Avatar.cs b/lib/agsxmpp/agsxmpp/protocol/iq/avatar/Avatar.cs
new file mode 100644
index 0000000..a10c254
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/avatar/Avatar.cs
@@ -0,0 +1,46 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.avatar
+{
+	//	<iq id='2' type='result' to='user at server/resource'>
+	//		<query xmlns='jabber:iq:avatar'>
+	//			<data mimetype='image/jpeg'>
+	//			Base64-Encoded Data
+	//			</data>
+	//		</query>
+	//	</iq>
+
+	/// <summary>
+	/// Summary description for Avatar.
+	/// </summary>
+	public class Avatar : agsXMPP.protocol.Base.Avatar
+	{
+		public Avatar() : base()
+		{
+			this.Namespace	= Uri.IQ_AVATAR;			
+		}	
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/avatar/AvatarIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/avatar/AvatarIq.cs
new file mode 100644
index 0000000..6d55690
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/avatar/AvatarIq.cs
@@ -0,0 +1,65 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.avatar
+{
+	/// <summary>
+	/// Summary description for AvatarIq.
+	/// </summary>
+	public class AvatarIq : IQ
+	{
+		private Avatar m_Avatar = new Avatar();
+
+		public AvatarIq()
+		{			
+			base.Query = m_Avatar;
+			this.GenerateId();	
+		}
+
+		public AvatarIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public AvatarIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public AvatarIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Avatar Query
+		{
+			get
+			{
+				return m_Avatar;
+			}
+		}
+
+		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/bind/Bind.cs b/lib/agsxmpp/agsxmpp/protocol/iq/bind/Bind.cs
new file mode 100644
index 0000000..fcd6a22
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/bind/Bind.cs
@@ -0,0 +1,73 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.bind
+{
+	/// <summary>
+	/// Summary description for Bind.
+	/// </summary>
+	public class Bind : Element
+	{
+		// SENT: <iq id="jcl_1" type="set">
+		//			<bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Exodus</resource></bind>
+		//		 </iq>
+		// RECV: <iq id='jcl_1' type='result'>
+		//			<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>user at server.org/agsxmpp</jid></bind>
+		//		 </iq>
+		public Bind()
+		{
+			this.TagName	= "bind";
+			this.Namespace	= Uri.BIND;
+		}
+
+		public Bind(string resource) : this()
+		{		
+			this.Resource	= resource;
+		}
+
+		public Bind(Jid jid) : this()
+		{			
+			this.Jid		= jid;
+		}
+
+		/// <summary>
+		/// The resource to bind
+		/// </summary>
+		public string Resource
+		{
+			get { return GetTag("resource"); }
+			set { SetTag("resource", value); }
+		}
+
+		/// <summary>
+		/// The jid the server created
+		/// </summary>
+		public Jid Jid
+		{
+			get { return GetTagJid("jid"); }
+			set { SetTag("jid", value.ToString()); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/bind/BindIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/bind/BindIq.cs
new file mode 100644
index 0000000..7cf2db3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/bind/BindIq.cs
@@ -0,0 +1,57 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.bind
+{
+	/// <summary>
+	/// Summary description for BindIq.
+	/// </summary>
+	public class BindIq : IQ
+	{
+		private Bind m_Bind = new Bind();
+		
+		public BindIq()
+		{
+			GenerateId();
+			AddChild(m_Bind);
+		}
+
+		public BindIq(IqType type) : this()
+		{			
+			Type = type;
+		}
+
+		public BindIq(IqType type, string resource) : this(type)
+		{			
+			m_Bind.Resource = resource;
+		}
+
+        public new Bind Query
+        {
+            get
+            {
+                return m_Bind;
+            }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/browse/Browse.cs b/lib/agsxmpp/agsxmpp/protocol/iq/browse/Browse.cs
new file mode 100644
index 0000000..3dc4153
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/browse/Browse.cs
@@ -0,0 +1,94 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+using agsXMPP.Xml.Dom;
+
+// JEP-0011: Jabber Browsing
+//
+// This JEP defines a way to describe information about Jabber entities and the relationships between entities. 
+// Note: This JEP is superseded by JEP-0030: Service Discovery.
+
+// WARNING: This JEP has been deprecated by the Jabber Software Foundation. 
+// Implementation of the protocol described herein is not recommended. Developers desiring similar functionality should 
+// implement the protocol that supersedes this one (if any).
+
+// Most components and gateways still dont implement Service discovery. So we must use jabber:iq:browse for them until everything
+// is replaced with JEP 30 (Service Discovery).
+namespace agsXMPP.protocol.iq.browse
+{
+	/// <summary>
+	/// Summary description for Browse.
+	/// </summary>
+	public class Browse : Element
+	{
+		public Browse()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_BROWSE;
+		}
+
+		public string Category
+		{
+			get { return GetAttribute("category"); }
+			set { SetAttribute("category", value); }
+		}
+		
+		public string Type
+		{
+			get { return GetAttribute("type"); }
+			set { SetAttribute("type", value); }
+		}
+		
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+
+		public string[] GetNamespaces()
+		{
+            ElementList elements = SelectElements("ns");
+			string[] nss = new string[elements.Count];
+			
+			int i=0;
+			foreach (Element ns in elements)
+			{
+				nss[i] = ns.Value;
+				i++;
+			}
+
+			return nss;
+		}
+
+		public BrowseItem[] GetItems()
+		{
+            ElementList nl = SelectElements(typeof(BrowseItem));
+			BrowseItem[] items = new BrowseItem[nl.Count];
+			int i = 0;
+			foreach (Element item in nl)
+			{
+				items[i] = item as BrowseItem;
+				i++;
+			}
+			return items;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseIq.cs
new file mode 100644
index 0000000..ca430a7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseIq.cs
@@ -0,0 +1,62 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.browse
+{
+	/// <summary>
+	/// Summary description for BrowseIq.
+	/// </summary>
+	public class BrowseIq : IQ
+	{
+		private Browse m_Browse	= new Browse();
+		
+		public BrowseIq()
+		{		
+			base.Query = m_Browse;
+			this.GenerateId();			
+		}
+
+		public BrowseIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public BrowseIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public BrowseIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Browse Query
+		{
+			get
+			{
+				return m_Browse;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseItem.cs b/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseItem.cs
new file mode 100644
index 0000000..e760d94
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/browse/BrowseItem.cs
@@ -0,0 +1,80 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.browse
+{
+	/// <summary>
+	/// Summary description for BrowseItem.
+	/// </summary>
+	public class BrowseItem : agsXMPP.protocol.Base.Item
+	{
+		/*
+		<item version="0.6.0" name="Public Conferencing" jid="conference.myjabber.net" type="public" category="conference"> 
+			<ns>http://jabber.org/protocol/muc</ns> 
+		</item>
+		*/
+		public BrowseItem() : base()
+		{
+			this.Namespace	= Uri.IQ_BROWSE;
+		}
+
+		public string Category
+		{
+			get { return GetAttribute("category"); }
+			set { SetAttribute("category", value); }
+		}
+
+		public string Version
+		{
+			get { return GetAttribute("version"); }
+			set { SetAttribute("version", value); }
+		}
+
+		public string Type
+		{
+			get { return GetAttribute("type"); }
+			set { SetAttribute("type", value); }
+		}
+
+		/// <summary>
+		/// Gets all advertised namespaces of this item
+		/// </summary>
+		/// <returns>string array that contains the advertised namespaces</returns>
+		public string[] GetNamespaces()
+		{
+            ElementList elements = SelectElements("ns");
+			string[] nss = new string[elements.Count];
+			
+			int i=0;
+			foreach (Element ns in elements)
+			{
+				nss[i] = ns.Value;
+				i++;
+			}
+
+			return nss;
+		}		
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/browse/Service.cs b/lib/agsxmpp/agsxmpp/protocol/iq/browse/Service.cs
new file mode 100644
index 0000000..c2cdc6b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/browse/Service.cs
@@ -0,0 +1,149 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.browse
+{
+	/// <summary>
+	/// Historically each category was used as the name of an element, 
+	/// and the type was an attribute, such as <service type="aim"/>. 
+	/// The proper expression for all new implementations supporting this specification is to express the type information 
+	/// as attributes on a generic item element: <item category="service" type="aim"/>. 
+	/// When processing returned browse information this new syntax should always be handled first, 
+	/// and the old syntax only used if it is important to be able to access older implementations.
+	/// Additional unofficial categories or types may be specified by prefixing their name with 
+	/// an "x-", such as "service/x-virgeim" or "x-location/gps". 
+	/// Changes to the official categories and subtypes may be defined either by revising this JEP or by activating another JEP.
+	/// Removal of a category or subtype must be noted in this document.
+	/// </summary>
+	public class Service : Element
+	{
+		/*
+		<iq from="myjabber.net" xmlns="jabber:client" id="agsXMPP_5" type="result" to="gnauck at myjabber.net/myJabber v3.5">
+
+			<service name="myJabber Server" jid="myjabber.net" type="jabber" xmlns="jabber:iq:browse"> 
+				
+				<item version="0.6.0" name="Public Conferencing" jid="conference.myjabber.net" type="public" category="conference"> 
+					<ns>http://jabber.org/protocol/muc</ns> 
+				</item> 
+
+				<service name="AIM Transport" jid="aim.myjabber.net" type="aim"> 
+					<ns>jabber:iq:gateway</ns> 
+					<ns>jabber:iq:register</ns> 
+				</service> 
+
+				<service name="Yahoo! Transport" jid="yahoo.myjabber.net" type="yahoo"> 
+					<ns>jabber:iq:gateway</ns> 
+					<ns>jabber:iq:register</ns> 
+				</service> 
+
+				<service name="ICQ Transport" jid="icq.myjabber.net" type="icq"> 
+					<ns>jabber:iq:gateway</ns> 
+					<ns>jabber:iq:register</ns> 
+				</service> 
+
+				<service name="MSN Transport" jid="msn.myjabber.net" type="msn"> 
+					<ns>jabber:iq:gateway</ns> 
+					<ns>jabber:iq:register</ns> 
+				</service> 
+
+				<item name="Online Users" jid="myjabber.net/admin"/>				
+				<ns>jabber:iq:admin</ns>
+			</service>
+		</iq> 
+		*/
+		public Service()
+		{
+			this.TagName	= "service";
+			this.Namespace	= Uri.IQ_BROWSE;
+		}
+
+
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+
+		public Jid Jid
+		{
+			get { return new Jid(GetAttribute("jid")); }
+			set { SetAttribute("jid", value.ToString()); }
+		}
+
+		public string Type
+		{
+			get { return GetAttribute("type"); }
+			set { SetAttribute("type", value); }
+		}
+
+		/// <summary>
+		/// Gets all advertised namespaces of this service
+		/// </summary>
+		/// <returns>string array that contains the advertised namespaces</returns>
+		public string[] GetNamespaces()
+		{
+            ElementList elements = SelectElements("ns");
+			string[] nss = new string[elements.Count];
+			
+			int i=0;
+			foreach (Element ns in elements)
+			{
+				nss[i] = ns.Value;
+				i++;
+			}
+
+			return nss;
+		}
+		
+		public BrowseItem[] GetItems()
+		{
+            ElementList nl = SelectElements(typeof(BrowseItem));
+			BrowseItem[] items = new BrowseItem[nl.Count];
+			int i = 0;
+			foreach (Element item in nl)
+			{
+				items[i] = item as BrowseItem;
+				i++;
+			}
+			return items;
+		}
+
+		/// <summary>
+		/// Gets all "ChilsServices" od this service
+		/// </summary>
+		/// <returns></returns>
+		public Service[] GetServices()
+		{
+            ElementList nl = SelectElements(typeof(Service));
+			Service[] Services = new Service[nl.Count];
+			int i = 0;
+			foreach (Element service in nl)
+			{
+				Services[i] = service as Service;
+				i++;
+			}
+			return Services;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoFeature.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoFeature.cs
new file mode 100644
index 0000000..3bb7bd4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoFeature.cs
@@ -0,0 +1,81 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/// <summary>
+	/// Disco feature
+	/// </summary>
+	/// <remarks>
+	/// see: http://www.jabber.org/registrar/disco-features.html
+	/// </remarks>
+	public class DiscoFeature : Element
+	{
+        /*
+        <iq type='result'
+            from='plays.shakespeare.lit'
+            to='romeo at montague.net/orchard'
+            id='info1'>
+        <query xmlns='http://jabber.org/protocol/disco#info'>
+            <identity
+                category='conference'
+                type='text'
+                name='Play-Specific Chatrooms'/>
+            <identity
+                category='directory'
+                type='chatroom'
+                name='Play-Specific Chatrooms'/>
+            <feature var='http://jabber.org/protocol/disco#info'/>
+            <feature var='http://jabber.org/protocol/disco#items'/>
+            <feature var='http://jabber.org/protocol/muc'/>
+            <feature var='jabber:iq:register'/>
+            <feature var='jabber:iq:search'/>
+            <feature var='jabber:iq:time'/>
+            <feature var='jabber:iq:version'/>
+        </query>
+        </iq>
+        */
+        #region << Constructors >>
+        public DiscoFeature()
+		{
+			this.TagName	= "feature";
+			this.Namespace	= Uri.DISCO_INFO;
+		}
+
+		public DiscoFeature(string var) : this()
+		{
+			Var = var;
+        }
+        #endregion
+
+        /// <summary>
+		/// feature name or namespace
+		/// </summary>
+		public string Var
+		{
+			get { return GetAttribute("var"); }
+			set { SetAttribute("var", value); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoIdentity.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoIdentity.cs
new file mode 100644
index 0000000..47a83a3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoIdentity.cs
@@ -0,0 +1,105 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/*
+	<iq type='result'
+	from='plays.shakespeare.lit'
+	to='romeo at montague.net/orchard'
+	id='info1'>
+	<query xmlns='http://jabber.org/protocol/disco#info'>
+	<identity
+	category='conference'
+	type='text'
+	name='Play-Specific Chatrooms'/>
+	<identity
+	category='directory'
+	type='chatroom'
+	name='Play-Specific Chatrooms'/>
+	<feature var='http://jabber.org/protocol/disco#info'/>
+	<feature var='http://jabber.org/protocol/disco#items'/>
+	<feature var='http://jabber.org/protocol/muc'/>
+	<feature var='jabber:iq:register'/>
+	<feature var='jabber:iq:search'/>
+	<feature var='jabber:iq:time'/>
+	<feature var='jabber:iq:version'/>
+	</query>
+	</iq>
+	*/
+
+	/// <summary>
+	/// Summary description for DiscoIdentity.
+	/// </summary>
+	public class DiscoIdentity : Element
+	{
+		public DiscoIdentity()
+		{
+			this.TagName	= "identity";
+			this.Namespace	= Uri.DISCO_INFO;
+		}
+
+        public DiscoIdentity(string type, string name, string category) : this()
+        {
+            Type        = type;
+            Name        = name;
+            Category    = category;
+        }
+
+        public DiscoIdentity(string type, string category) : this()
+        {
+            Type = type;
+            Category = category;
+        }
+
+        /// <summary>
+        /// type name for the entity
+        /// </summary>
+		public string Type
+		{
+			get { return GetAttribute("type"); }
+			set { SetAttribute("type", value); }
+		}
+
+        /// <summary>
+        /// natural-language name for the entity
+        /// </summary>
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+		
+        /// <summary>
+        /// category name for the entity
+        /// </summary>
+		public string Category
+		{
+			get { return GetAttribute("category"); }
+			set { SetAttribute("category", value); }
+		}
+
+		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfo.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfo.cs
new file mode 100644
index 0000000..803e911
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfo.cs
@@ -0,0 +1,169 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP;
+using agsXMPP.protocol;
+using agsXMPP.Xml.Dom;
+
+/*
+Example 1. Querying for further information
+
+<iq type='get'
+from='romeo at montague.net/orchard'
+to='plays.shakespeare.lit'
+id='info1'>
+<query xmlns='http://jabber.org/protocol/disco#info'/>
+</iq>
+
+
+Example 2. Result-set for information request
+
+<iq type='result'
+    from='plays.shakespeare.lit'
+    to='romeo at montague.net/orchard'
+    id='info1'>
+  <query xmlns='http://jabber.org/protocol/disco#info'>
+    <identity
+        category='conference'
+        type='text'
+        name='Play-Specific Chatrooms'/>
+    <identity
+        category='directory'
+        type='chatroom'
+        name='Play-Specific Chatrooms'/>
+    <feature var='http://jabber.org/protocol/disco#info'/>
+    <feature var='http://jabber.org/protocol/disco#items'/>
+    <feature var='http://jabber.org/protocol/muc'/>
+    <feature var='jabber:iq:register'/>
+    <feature var='jabber:iq:search'/>
+    <feature var='jabber:iq:time'/>
+    <feature var='jabber:iq:version'/>
+  </query>
+</iq>
+    
+
+Example 3. Target entity does not exist
+
+<iq type='error'
+    from='plays.shakespeare.lit'
+    to='romeo at montague.net/orchard'
+    id='info1'>
+  <query xmlns='http://jabber.org/protocol/disco#info'/>
+  <error code='404' type='cancel'>
+    <item-not-found xmlns='urn:ietf:xml:params:ns:xmpp-stanzas'/>
+  </error>
+</iq>
+    
+ */  
+namespace agsXMPP.protocol.iq.disco
+{
+	/// <summary>
+	/// Discovering Information About a Jabber Entity
+	/// </summary>
+	public class DiscoInfo : Element
+	{
+		public DiscoInfo()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.DISCO_INFO;
+		}
+		
+		/// <summary>
+		/// Optional node Attrib
+		/// </summary>
+		public string Node
+		{
+			get { return GetAttribute("node"); }
+			set { SetAttribute("node", value); }
+		}
+
+		public DiscoIdentity AddIdentity()
+		{
+			DiscoIdentity id = new DiscoIdentity();
+			AddChild(id);
+			return id;
+		}
+
+		public void AddIdentity(DiscoIdentity id)
+		{
+			AddChild(id);
+		}
+
+		public DiscoFeature AddFeature()
+		{
+			DiscoFeature f = new DiscoFeature();
+			AddChild(f);
+			return f;
+		}
+
+		public void AddFeature(DiscoFeature f)
+		{
+			AddChild(f);
+		}
+
+		public DiscoIdentity[] GetIdentities()
+		{
+            ElementList nl = SelectElements(typeof(DiscoIdentity));
+			DiscoIdentity[] items = new DiscoIdentity[nl.Count];
+			int i = 0;
+			foreach (Element e in nl)
+			{
+				items[i] = (DiscoIdentity) e;
+				i++;
+			}
+			return items;
+		}
+
+        /// <summary>
+        /// Gets all Features
+        /// </summary>
+        /// <returns></returns>
+		public DiscoFeature[] GetFeatures()
+		{
+            ElementList nl = SelectElements(typeof(DiscoFeature));
+			DiscoFeature[] items = new DiscoFeature[nl.Count];			
+			int i = 0;
+			foreach (Element e in nl)
+			{
+				items[i] = (DiscoFeature) e;
+				i++;
+			}
+			return items;
+		}
+
+        /// <summary>
+        /// Check if a feature is supported
+        /// </summary>
+        /// <param name="var"></param>
+        /// <returns></returns>
+        public bool HasFeature(string var)
+        {
+            DiscoFeature[] features = GetFeatures();
+            foreach (DiscoFeature feat in features)
+            {
+                if (feat.Var == var)
+                    return true;
+            }
+            return false;
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfoIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfoIq.cs
new file mode 100644
index 0000000..dd1b316
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoInfoIq.cs
@@ -0,0 +1,54 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/// <summary>
+	/// Discovering Information About a Jabber Entity
+	/// </summary>
+	public class DiscoInfoIq : IQ
+	{
+		private DiscoInfo m_DiscoInfo = new DiscoInfo();
+		
+		public DiscoInfoIq()
+		{
+			base.Query = m_DiscoInfo;
+			this.GenerateId();
+		}
+
+		public DiscoInfoIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}	
+
+		public new DiscoInfo Query
+		{
+			get
+			{
+				return m_DiscoInfo;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItem.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItem.cs
new file mode 100644
index 0000000..a7b7382
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItem.cs
@@ -0,0 +1,76 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	public enum DiscoAction
+	{		
+		NONE = -1,
+		remove,
+		update
+	}
+
+	/// <summary>
+	///
+	/// </summary>
+	public class DiscoItem : Element
+	{
+		public DiscoItem()
+		{
+			this.TagName	= "item";
+			this.Namespace	= Uri.DISCO_ITEMS;
+		}
+
+		public Jid Jid
+		{
+			get { return new Jid(GetAttribute("jid")); }
+			set { SetAttribute("jid", value.ToString()); }
+		}
+		
+		public string Name
+		{
+			get { return GetAttribute("name"); }
+			set { SetAttribute("name", value); }
+		}
+		
+		public string Node
+		{
+			get { return GetAttribute("node"); }
+			set { SetAttribute("node", value); }
+		}
+
+		public DiscoAction Action
+		{
+			get { return (DiscoAction) GetAttributeEnum("action", typeof(DiscoAction)); }
+			set 
+			{ 
+				if (value == DiscoAction.NONE) 
+					RemoveAttribute("action");
+				else
+					SetAttribute("action", value.ToString()); 
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItems.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItems.cs
new file mode 100644
index 0000000..39415d8
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItems.cs
@@ -0,0 +1,124 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/*
+	Example 10. Requesting all items
+
+	<iq type='get'
+	from='romeo at montague.net/orchard'
+	to='shakespeare.lit'
+	id='items1'>
+	<query xmlns='http://jabber.org/protocol/disco#items'/>
+	</iq>
+	
+	
+	Example 11. Result-set for all items
+
+	<iq type='result'
+		from='shakespeare.lit'
+		to='romeo at montague.net/orchard'
+		id='items1'>
+	<query xmlns='http://jabber.org/protocol/disco#items'>
+		<item jid='people.shakespeare.lit'
+			name='Directory of Characters'/>
+		<item jid='plays.shakespeare.lit'
+			name='Play-Specific Chatrooms'/>
+		<item jid='mim.shakespeare.lit'
+			name='Gateway to Marlowe IM'/>
+		<item jid='words.shakespeare.lit'
+			name='Shakespearean Lexicon'/>
+		<item jid='globe.shakespeare.lit'
+			name='Calendar of Performances'/>
+		<item jid='headlines.shakespeare.lit'
+			name='Latest Shakespearean News'/>
+		<item jid='catalog.shakespeare.lit'
+			name='Buy Shakespeare Stuff!'/>
+		<item jid='en2fr.shakespeare.lit'
+			name='French Translation Service'/>
+	</query>
+	</iq>
+	
+	
+	Example 12. Empty result set
+
+	<iq type='result'
+		from='shakespeare.lit'
+		to='romeo at montague.net/orchard'
+		id='items1'>
+	<query xmlns='http://jabber.org/protocol/disco#items'/>
+	</iq>
+      
+    */
+
+	/// <summary>
+	/// Discovering the Items Associated with a Jabber Entity
+	/// </summary>
+	public class DiscoItems : IQ
+	{
+		public DiscoItems()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.DISCO_ITEMS;
+		}
+
+		/// <summary>
+		/// The node to discover (Optional)
+		/// </summary>
+		public string Node
+		{
+			get { return GetAttribute("node"); }
+			set { SetAttribute("node", value); }
+		}
+
+		public DiscoItem AddDiscoItem()
+		{
+			DiscoItem item = new DiscoItem();
+			AddChild(item);
+			return item;
+		}
+
+		public void AddDiscoItem(DiscoItem item)
+		{
+			AddChild(item);			
+		}
+
+		public DiscoItem[] GetDiscoItems()
+		{
+            ElementList nl = SelectElements(typeof(DiscoItem));
+			DiscoItem[] items = new DiscoItem[nl.Count];
+			int i = 0;
+			foreach (Element e in nl)
+			{
+				items[i] = (DiscoItem) e;
+				i++;
+			}
+			return items;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItemsIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItemsIq.cs
new file mode 100644
index 0000000..e482a5a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoItemsIq.cs
@@ -0,0 +1,94 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/*
+	Example 10. Requesting all items
+
+	<iq type='get'
+	from='romeo at montague.net/orchard'
+	to='shakespeare.lit'
+	id='items1'>
+	<query xmlns='http://jabber.org/protocol/disco#items'/>
+	</iq>
+	
+	
+	Example 11. Result-set for all items
+
+	<iq type='result'
+		from='shakespeare.lit'
+		to='romeo at montague.net/orchard'
+		id='items1'>
+	<query xmlns='http://jabber.org/protocol/disco#items'>
+		<item jid='people.shakespeare.lit'
+			name='Directory of Characters'/>
+		<item jid='plays.shakespeare.lit'
+			name='Play-Specific Chatrooms'/>
+		<item jid='mim.shakespeare.lit'
+			name='Gateway to Marlowe IM'/>
+		<item jid='words.shakespeare.lit'
+			name='Shakespearean Lexicon'/>
+		<item jid='globe.shakespeare.lit'
+			name='Calendar of Performances'/>
+		<item jid='headlines.shakespeare.lit'
+			name='Latest Shakespearean News'/>
+		<item jid='catalog.shakespeare.lit'
+			name='Buy Shakespeare Stuff!'/>
+		<item jid='en2fr.shakespeare.lit'
+			name='French Translation Service'/>
+	</query>
+	</iq>
+      
+     */
+
+	/// <summary>
+	/// Discovering the Items Associated with a Jabber Entity
+	/// </summary>
+	public class DiscoItemsIq : IQ
+	{
+		private DiscoItems m_DiscoItems = new DiscoItems();
+	
+		public DiscoItemsIq()
+		{
+			base.Query = m_DiscoItems;
+			this.GenerateId();
+		}
+
+		public DiscoItemsIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}	
+
+        public new DiscoItems Query
+        {
+            get
+            {
+                return m_DiscoItems;
+            }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoManager.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoManager.cs
new file mode 100644
index 0000000..5ba88c7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/DiscoManager.cs
@@ -0,0 +1,245 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.iq.disco;
+
+namespace agsXMPP.protocol.iq.disco
+{
+    public class DiscoManager
+    {
+        private XmppClientConnection	xmppConnection	= null;
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="con"></param>
+        public DiscoManager(XmppClientConnection con)
+        {
+            xmppConnection = con;
+            xmppConnection.OnIq += new IqHandler(OnIq);
+        }
+
+        #region << Properties >>
+        private bool m_AutoAnswerDiscoInfoRequests = true;  
+
+        /// <summary>
+        /// Automatically answer DiscoInfo requests.
+        /// Set disco information (identties and features) in the DiscoInfo property object.        
+        /// </summary>
+        public bool AutoAnswerDiscoInfoRequests
+        {
+            get { return m_AutoAnswerDiscoInfoRequests; }
+            set { m_AutoAnswerDiscoInfoRequests = value; }
+        }
+        #endregion
+
+        private void OnIq(object sender, IQ iq)
+        {
+            // DiscoInfo
+            if (m_AutoAnswerDiscoInfoRequests && iq.Query is DiscoInfo && iq.Type == IqType.get)
+                ProcessDiscoInfo(iq);
+        }
+
+        private void ProcessDiscoInfo(IQ iq)
+        {            
+            IQ diiq = new IQ();
+            diiq.To = iq.From;
+            diiq.Id = iq.Id;
+            diiq.Type = IqType.result;
+
+            diiq.Query = xmppConnection.DiscoInfo;
+
+            xmppConnection.Send(diiq);        
+        }
+
+        #region << Discover Info >>
+        public void DiscoverInformation(Jid to)
+        {
+            DiscoverInformation(to, null, null, null, null);
+        }
+
+        public void DiscoverInformation(Jid to, Jid from)
+        {
+            DiscoverInformation(to, from, null, null, null);
+        }
+
+        public void DiscoverInformation(Jid to, IqCB cb)
+        {
+            DiscoverInformation(to, null, null, cb, null);
+        }
+
+        public void DiscoverInformation(Jid to, Jid from, IqCB cb)
+        {
+            DiscoverInformation(to, from, null, cb, null);
+        }
+
+        public void DiscoverInformation(Jid to, IqCB cb, object cbArgs)
+        {
+            DiscoverInformation(to, null, null, cb, cbArgs);
+        }
+
+        public void DiscoverInformation(Jid to, Jid from, IqCB cb, object cbArgs)
+        {
+            DiscoverInformation(to, from, null, cb, cbArgs);
+        }
+
+        public void DiscoverInformation(Jid to, string node)
+        {
+            DiscoverInformation(to, null, node, null, null);
+        }
+
+        public void DiscoverInformation(Jid to, Jid from, string node)
+        {
+            DiscoverInformation(to, from, node, null, null);
+        }
+
+        public void DiscoverInformation(Jid to, string node, IqCB cb)
+        {
+            DiscoverInformation(to, null, node, cb, null);
+        }
+
+        public void DiscoverInformation(Jid to, Jid from, string node, IqCB cb)
+        {
+            DiscoverInformation(to, from, node, cb, null);
+        }
+
+        public void DiscoverInformation(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            DiscoverInformation(to, null, node, cb, cbArgs);
+        }
+        public void DiscoverInformation(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            /*
+            
+            Example 9. Querying a specific JID and node combination
+            
+            <iq type='get'
+                from='romeo at montague.net/orchard'
+                to='mim.shakespeare.lit'
+                id='info3'>
+              <query xmlns='http://jabber.org/protocol/disco#info' 
+                     node='http://jabber.org/protocol/commands'/>
+            </iq>
+                  
+
+            Example 10. JID+node result
+
+            <iq type='result'
+                from='mim.shakespeare.lit'
+                to='romeo at montague.net/orchard'
+                id='info3'>
+              <query xmlns='http://jabber.org/protocol/disco#info' 
+                     node='http://jabber.org/protocol/commands'>
+                <identity
+                    category='automation'
+                    type='command-list'/>
+              </query>
+            </iq>
+            */
+            DiscoInfoIq discoIq = new DiscoInfoIq(IqType.get);
+            discoIq.To = to;
+
+            if (from != null)
+                discoIq.From = from;
+
+            if (node != null && node.Length > 0)
+                discoIq.Query.Node = node;
+            
+            xmppConnection.IqGrabber.SendIq(discoIq, cb, cbArgs);
+        }
+        #endregion
+
+        #region << Discover Items >>
+        public void DiscoverItems(Jid to)
+        {
+            DiscoverItems(to, null, null, null);
+        }
+
+        public void DiscoverItems(Jid to, Jid from)
+        {
+            DiscoverItems(to, from, null, null, null);
+        }
+
+        public void DiscoverItems(Jid to, IqCB cb)
+        {
+            DiscoverItems(to, null, null, cb, null);
+        }
+
+        public void DiscoverItems(Jid to, Jid from, IqCB cb)
+        {
+            DiscoverItems(to, from, null, cb, null);
+        }
+
+        public void DiscoverItems(Jid to, IqCB cb, object cbArgs)
+        {
+            DiscoverItems(to, null, null, cb, cbArgs);
+        }
+
+        public void DiscoverItems(Jid to, Jid from, IqCB cb, object cbArgs)
+        {
+            DiscoverItems(to, from, null, cb, cbArgs);
+        }
+
+        public void DiscoverItems(Jid to, string node)
+        {
+            DiscoverItems(to, null, node, null, null);
+        }
+
+        public void DiscoverItems(Jid to, Jid from, string node)
+        {
+            DiscoverItems(to, from, node, null, null);
+        }
+
+        public void DiscoverItems(Jid to, string node, IqCB cb)
+        {
+            DiscoverItems(to, null, node, cb, null);
+        }
+
+        public void DiscoverItems(Jid to, Jid from, string node, IqCB cb)
+        {
+            DiscoverItems(to, from, node, cb, null);
+        }
+
+        public void DiscoverItems(Jid to, string node, IqCB cb, object cbArgs)
+        {
+            DiscoverItems(to, null, node, cb, cbArgs);
+        }
+
+        public void DiscoverItems(Jid to, Jid from, string node, IqCB cb, object cbArgs)
+        {
+            DiscoItemsIq discoIq = new DiscoItemsIq(IqType.get);
+            discoIq.To = to;
+            
+            if (from != null)
+                discoIq.From = from;
+
+            if (node != null && node.Length > 0)
+                discoIq.Query.Node = node;
+
+            xmppConnection.IqGrabber.SendIq(discoIq, cb, cbArgs);
+        }
+        #endregion
+                        
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/disco/Features.cs b/lib/agsxmpp/agsxmpp/protocol/iq/disco/Features.cs
new file mode 100644
index 0000000..97f8ef5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/disco/Features.cs
@@ -0,0 +1,156 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2007 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.iq.disco
+{
+	/// <summary>
+	/// Disco Features Enumeration
+	/// </summary>
+	public class Features
+	{
+		//	Application supports DNS SRV lookups of XMPP services. 	RFC 3920: XMPP Core, RFC 3921: XMPP IM
+		public const string FEAT_DNSSRV			= "dnssrv";
+		// 	Application supports Unicode characters throughout, including in displayed text, JIDs, and passwords. 	N/A
+		public const string FEAT_FULL_UNICODE	= "fullunicode";
+		// gc-1.0 	Support for the "groupchat 1.0" protocol. 	JEP-0045: Multi-User Chat		
+		public const string FEAT_GROUPCHAT_1	= "gc-1.0";
+		// http://jabber.org/protocol/amp?action=alert 	Support for the "alert" action in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_ACTION_ALERT	= "http://jabber.org/protocol/amp?action=alert";
+		// http://jabber.org/protocol/amp?action=drop 	Support for the "drop" action in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_ACTION_DROP	= "http://jabber.org/protocol/amp?action=drop";
+		// http://jabber.org/protocol/amp?action=error 	Support for the "error" action in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_ACTION_ERROR	= "http://jabber.org/protocol/amp?action=error ";
+		/// http://jabber.org/protocol/amp?action=notify 	Support for the "notify" action in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_ACTION_NOTIFY	= "http://jabber.org/protocol/amp?action=notify";
+		// http://jabber.org/protocol/amp?condition=deliver 	Support for the "deliver" condition in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_CONDITION_DELIVER	= "http://jabber.org/protocol/amp?condition=deliver ";
+		// http://jabber.org/protocol/amp?condition=expire-at 	Support for the "expire-at" condition in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_CONDITION_EXPIRE_AT	= "http://jabber.org/protocol/amp?condition=expire-at";
+		// http://jabber.org/protocol/amp?condition=match-resource 	Support for the "match-resource" condition in Advanced Message Processing. 	JEP-0079: Advanced Message Processing
+		public const string FEAT_AMP_CONDITION_MATCH_RESOURCE	= "http://jabber.org/protocol/amp?condition=match-resource";
+		
+		// http://jabber.org/protocol/disco#publish 	Support for the "publishing" feature of service discovery. 	JEP-0030: Service Discovery
+		public const string FEAT_PUBLISH	= "http://jabber.org/protocol/disco#publish";
+		
+		//http://jabber.org/protocol/muc#register 	Support for the muc#register FORM_TYPE 	JEP-0045
+		public const string FEAT_MUC_REGISTER	= "http://jabber.org/protocol/muc#register";
+		// http://jabber.org/protocol/muc#roomconfig 	Support for the muc#roomconfig FORM_TYPE 	JEP-0045
+		public const string FEAT_MUC_ROOMCONFIG	= "http://jabber.org/protocol/muc#roomconfig";
+		// http://jabber.org/protocol/muc#roominfo 	Support for the muc#roominfo FORM_TYPE 	JEP-0045
+		public const string FEAT_MUC_ROOMINFO	= "http://jabber.org/protocol/muc#roominfo";
+		// http://jabber.org/protocol/pubsub#collections 	Collection nodes are supported. 	JEP-0060
+		
+		// http://jabber.org/protocol/pubsub#config-node 	Configuration of node options is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_CONFIG_NODE	= "http://jabber.org/protocol/pubsub#collections";
+		// http://jabber.org/protocol/pubsub#create-nodes 	Creation of nodes is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_CREATE_NODES	= "http://jabber.org/protocol/pubsub#create-nodes";
+		// http://jabber.org/protocol/pubsub#delete-any 	Any publisher may delete an item (not only the originating publisher). 	JEP-0060
+		public const string FEAT_PUBSUB_DELETE_ANY	= "http://jabber.org/protocol/pubsub#create-nodes";
+		// http://jabber.org/protocol/pubsub#delete-nodes 	Deletion of nodes is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_DELETE_NODES	= "http://jabber.org/protocol/pubsub#delete-nodes";
+		// http://jabber.org/protocol/pubsub#instant-nodes 	Creation of instant nodes is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_INSTANT_NODES	= "http://jabber.org/protocol/pubsub#instant-nodes";
+		// http://jabber.org/protocol/pubsub#item-ids 	Publishers may specify item identifiers. 	JEP-0060
+		public const string FEAT_OUBSUB_ITEM_IDS	= "http://jabber.org/protocol/pubsub#item-ids";
+		// http://jabber.org/protocol/pubsub#leased-subscription 	Time-based subscriptions are supported. 	JEP-0060
+		public const string FEAT_PUBSUB_LEASED_SUBSCRIPTION		= "http://jabber.org/protocol/pubsub#leased-subscription";
+		// http://jabber.org/protocol/pubsub#meta-data 	Node meta-data is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_META		= "http://jabber.org/protocol/pubsub#meta-data";
+		// http://jabber.org/protocol/pubsub#multi-subscribe 	A single entity may subscribe to a node multiple times. 	JEP-0060
+		public const string FEAT_PUBSUB_MULTI_SUBSCRIBE		= "http://jabber.org/protocol/pubsub#multi-subscribe";
+		// http://jabber.org/protocol/pubsub#outcast-affiliation 	The outcast affiliation is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_OUTCAST_AFFILIATION		= "http://jabber.org/protocol/pubsub#outcast-affiliation";
+		// http://jabber.org/protocol/pubsub#persistent-items 	Persistent items are supported. 	JEP-0060
+		public const string FEAT_PUBSUB_PERSISTENT_ITEMS		= "http://jabber.org/protocol/pubsub#persistent-items";
+		// http://jabber.org/protocol/pubsub#presence-notifications 	Presence-based delivery of event notifications is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_PRESENCE_NOTIFICATIONS	= "http://jabber.org/protocol/pubsub#presence-notifications";
+		// http://jabber.org/protocol/pubsub#publisher-affiliation 	The publisher affiliation is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_PUBLISHER_AFFILIATION	= "http://jabber.org/protocol/pubsub#publisher-affiliation";
+		// http://jabber.org/protocol/pubsub#purge-nodes 	Purging of nodes is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_PURGE_NODES		= "http://jabber.org/protocol/pubsub#purge-nodes";
+		// http://jabber.org/protocol/pubsub#retract-items 	Item retraction is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_RETRACT_ITEMS	= "http://jabber.org/protocol/pubsub#retract-items";
+		// http://jabber.org/protocol/pubsub#retrieve-affiliations 	Retrieval of current affiliations is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_RETRIEVE_AFFILIATIONS	= "http://jabber.org/protocol/pubsub#retrieve-affiliations";
+		// http://jabber.org/protocol/pubsub#retrieve-items 	Item retrieval is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_RETRIEVE_ITEMS		= "http://jabber.org/protocol/pubsub#retrieve-items";
+		// http://jabber.org/protocol/pubsub#subscribe 	Subscribing and unsubscribing are supported. 	JEP-0060
+		public const string FEAT_PUBSUB_SUBSCRIBE		= "http://jabber.org/protocol/pubsub#subscribe";
+		// http://jabber.org/protocol/pubsub#subscription-options 	Configuration of subscription options is supported. 	JEP-0060
+		public const string FEAT_PUBSUB_SUBSCRIPTIONS_OPTIONS	= "http://jabber.org/protocol/pubsub#subscription-options";
+		// http://jabber.org/protocol/waitinglist/schemes/mailto 	Waiting list service supports the mailto: URI scheme. 	JEP-0130
+		public const string FEAT_WAITINGLIST_MAILTO		= "http://jabber.org/protocol/waitinglist/schemes/mailto";
+		// http://jabber.org/protocol/waitinglist/schemes/tel 	Waiting list service supports the tel: URI scheme. 	JEP-0130
+		public const string FEAT_WAITINGLIST_TEL		= "http://jabber.org/protocol/waitinglist/schemes/tel";
+		// ipv6 	Application supports IPv6. 	N/A
+		public const string FEAT_IPV6		= "ipv6";
+		// msglog 	Application performs logging or archiving of messages. 	N/A
+		public const string FEAT_MESSAGE_LOG	= "msglog";																													 
+		// msgoffline 	Server stores messages offline for later delivery. 	N/A
+		public const string FEAT_MESSAGE_OFFLINE	= "msgoffline";
+		
+		// muc_hidden 	Hidden room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_HIDDEN	= "muc_hidden";
+		// muc_membersonly 	Members-only room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_MEMBERSONLY = "muc_membersonly";
+        // muc_moderated 	Moderated room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_MODERATED	= "muc_moderated";
+		// muc_nonanonymous 	Non-anonymous room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_NONANONYMOUS	= "muc_nonanonymous";
+		// muc_open 	Open room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_OPEN		= "muc_open";
+		// muc_passwordprotected 	Password-protected room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_PASSWORDPROTECTED	= "muc_passwordprotected";
+		// muc_persistent 	Persistent room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_PERSISTANT		= "muc_persistent";
+		// muc_public 	Public room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_PUBLIC		= "muc_public";
+		// muc_rooms 	List of MUC rooms (each as a separate item) 	JEP-0045
+		public const string FEAT_MUC_ROOMS		= "muc_rooms";
+		// muc_semianonymous 	Semi-anonymous room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_SEMIANONYMOUS	= "muc_semianonymous";
+		// muc_temporary 	Temporary room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_TEMPORARY	= "muc_temporary";
+		// muc_unmoderated 	Unmoderated room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_UNMODERATED	= "muc_unmoderated";
+		// muc_unsecured 	Unsecured room in Multi-User Chat (MUC) 	JEP-0045
+		public const string FEAT_MUC_UNSECURED	= "muc_unsecured";
+		
+		// sslc2s 	Application supports old-style (pre-TLS) SSL connections on a dedicated port. 	N/A
+		public const string FEAT_SSL_C2S	= "sslc2s";
+		// stringprep 	Application supports the nameprep, nodeprep, and resourceprep profiles of stringprep. 	RFC 3920: XMPP Core
+		public const string FEAT_STRINGPREP	= "stringprep";
+		
+		// urn:ietf:params:xml:ns:xmpp-sasl#c2s 	Application supports client-to-server SASL. 	RFC 3920: XMPP Core
+		public const string FEAT_SASL_C2S	= "urn:ietf:params:xml:ns:xmpp-sasl#c2s";
+		// urn:ietf:params:xml:ns:xmpp-sasl#s2s 	Application supports server-to-server SASL. 	RFC 3920: XMPP Core
+		public const string FEAT_SASL_S2S	= "urn:ietf:params:xml:ns:xmpp-sasl#s2s";
+		// urn:ietf:params:xml:ns:xmpp-tls#c2s 	Application supports client-to-server TLS. 	RFC 3920: XMPP Core
+		public const string FEAT_TLS_C2S	= "urn:ietf:params:xml:ns:xmpp-tls#c2s";
+		// urn:ietf:params:xml:ns:xmpp-tls#s2s 	Application supports server-to-server TLS. 	RFC 3920: XMPP Core
+		public const string FEAT_TLS_S2S	= "urn:ietf:params:xml:ns:xmpp-tls#s2s";
+		
+		// xmllang 	Application supports the 'xml:lang' attribute as described in RFC 3920. 	RFC 3920: XMPP Core
+		public const string FEAT_XMLLANG	= "xmllang";	
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/last/Last.cs b/lib/agsxmpp/agsxmpp/protocol/iq/last/Last.cs
new file mode 100644
index 0000000..ee18fb1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/last/Last.cs
@@ -0,0 +1,55 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.Xml.Dom;
+
+
+// Send:	<iq type='get' id='MX_5' to='jfrankel at coversant.net/SoapBox'>
+//				<query xmlns='jabber:iq:last'></query>
+//			</iq>
+// Recv:	<iq from="jfrankel at coversant.net/SoapBox" id="MX_5" to="gnauck at myjabber.net/Office" type="result">
+//				<query seconds="644" xmlns="jabber:iq:last"/>
+//			</iq> 
+
+namespace agsXMPP.protocol.iq.last
+{
+	/// <summary>
+	/// Zusammenfassung f�r Last.
+	/// </summary>
+	public class Last : Element
+	{
+		public Last()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_LAST;
+		}
+
+		/// <summary>
+		/// Seconds since the last activity.
+		/// </summary>
+		public int Seconds
+		{
+			get { return Int32.Parse(GetAttribute("seconds"));  }
+			set { SetAttribute("seconds", value.ToString()); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/last/LastIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/last/LastIq.cs
new file mode 100644
index 0000000..a6d2a71
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/last/LastIq.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.last
+{
+	/// <summary>
+	/// Summary description for LastIq.
+	/// </summary>
+	public class LastIq : IQ
+	{
+		private Last m_Last = new Last();
+
+		public LastIq()
+		{		
+			base.Query = m_Last;
+			this.GenerateId();			
+		}
+
+		public LastIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public LastIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public LastIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Last Query
+		{
+			get
+			{
+				return m_Last;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/oob/Oob.cs b/lib/agsxmpp/agsxmpp/protocol/iq/oob/Oob.cs
new file mode 100644
index 0000000..1c6d839
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/oob/Oob.cs
@@ -0,0 +1,73 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.oob
+{
+
+	
+	 //	<iq type="set" to="horatio at denmark" from="sailor at sea" id="i_oob_001">
+	 //		<query xmlns="jabber:iq:oob">
+	 //			<url>http://denmark/act4/letter-1.html</url>
+	 //			<desc>There's a letter for you sir.</desc>
+	 //		</query>
+	 // </iq>	
+
+	/// <summary>
+	/// Zusammenfassung f�r Oob.
+	/// </summary>
+	public class Oob : Element
+	{
+		public Oob()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_OOB;
+		}
+
+		public string Url
+		{
+			set
+			{
+				SetTag("url", value);
+			}
+			get
+			{
+				return GetTag("url");
+			}
+		}
+		
+		public string Description
+		{
+			set
+			{
+				SetTag("desc", value);
+			}
+			get
+			{
+				return GetTag("desc");
+			}
+
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/oob/OobIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/oob/OobIq.cs
new file mode 100644
index 0000000..3e7bef1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/oob/OobIq.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.oob
+{
+	/// <summary>
+	/// Summary description for OobIq.
+	/// </summary>
+	public class OobIq : IQ
+	{
+		private Oob m_Oob = new Oob();
+
+		public OobIq()
+		{		
+			base.Query = m_Oob;
+			this.GenerateId();
+		}
+
+		public OobIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public OobIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public OobIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Oob Query
+		{
+			get
+			{
+				return m_Oob;
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Action.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Action.cs
new file mode 100644
index 0000000..fbaf01f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Action.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// privacy lis action
+    /// </summary>
+    public enum Action
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        allow,
+        
+        /// <summary>
+        /// 
+        /// </summary>
+        deny
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Active.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Active.cs
new file mode 100644
index 0000000..a600c3d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Active.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// The active list
+    /// </summary>
+    public class Active : List
+    {
+        public Active()
+        {
+            this.TagName = "active";
+        }
+
+        public Active(string name) : this()
+        {
+            Name = name;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Default.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Default.cs
new file mode 100644
index 0000000..4a563f5
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Default.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// The default list
+    /// </summary>
+    public class Default : List
+    {
+        public Default()
+        {
+            this.TagName = "default";
+        }
+
+        public Default(string name) : this()
+        {
+            Name = name;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Item.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Item.cs
new file mode 100644
index 0000000..37fe774
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Item.cs
@@ -0,0 +1,239 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// This class represents a rule which is used for blocking communication
+    /// </summary>
+    public class Item : Element
+    {
+
+        #region << Constructors >>
+        /// <summary>
+        /// Default Contructor
+        /// </summary>
+        public Item()
+        {
+            this.TagName    = "item";
+            this.Namespace  = Uri.IQ_PRIVACY;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="order"></param>
+        public Item(Action action, int order) : this()
+        {
+            Action  = action;
+            Order   = order;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="order"></param>
+        /// <param name="block"></param>
+        public Item(Action action, int order, Stanza stanza) : this(action, order)
+        {
+            Stanza = stanza;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="order"></param>
+        /// <param name="type"></param>
+        /// <param name="value"></param>
+        public Item(Action action, int order, Type type, string value) : this(action, order)
+        {
+            Type    = type;
+            Val     = value;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action"></param>
+        /// <param name="order"></param>
+        /// <param name="type"></param>
+        /// <param name="value"></param>
+        /// <param name="block"></param>
+        public Item(Action action, int order, Type type, string value, Stanza stanza) : this(action, order, type, value)
+        {
+            Stanza = stanza;
+        }
+        #endregion
+
+        public Action Action
+		{
+			get 
+			{
+                return (Action)GetAttributeEnum("action", typeof(Action)); 
+			}
+			set 
+			{ 
+				SetAttribute("action", value.ToString()); 
+			}
+		}
+
+        public Type Type
+        {
+            get
+            {
+                return (Type)GetAttributeEnum("type", typeof(Type));
+            }
+            set
+            {
+                if (value != Type.NONE)
+                    SetAttribute("type", value.ToString());
+                else
+                    RemoveAttribute("type");
+            }
+        }
+
+        /// <summary>
+        /// The order of this rule
+        /// </summary>
+        public int Order
+        {
+            get { return GetAttributeInt("order"); }
+            set { SetAttribute("order", value); }
+        }
+
+        /// <summary>
+        /// The value to match of this rule
+        /// </summary>
+        public string Val
+        {
+            get { return GetAttribute("value"); }
+            set { SetAttribute("value", value); }
+        }
+
+        /// <summary>
+        /// Block Iq stanzas
+        /// </summary>
+        public bool BlockIq
+        {
+            get { return HasTag("iq"); }
+            set
+            {
+                if (value)
+                    this.SetTag("iq");
+                else
+                    this.RemoveTag("iq");
+            }
+        }
+
+        /// <summary>
+        /// Block messages
+        /// </summary>
+        public bool BlockMessage
+        {
+            get { return HasTag("message"); }
+            set
+            {
+                if (value)
+                    this.SetTag("message");
+                else
+                    this.RemoveTag("message");
+            }
+        }
+
+        /// <summary>
+        /// Block incoming presence
+        /// </summary>
+        public bool BlockIncomingPresence
+        {
+            get { return HasTag("presence-in"); }
+            set
+            {
+                if (value)
+                    this.SetTag("presence-in");
+                else
+                    this.RemoveTag("presence-in");
+            }
+        }
+
+        /// <summary>
+        /// Block outgoing presence
+        /// </summary>
+        public bool BlockOutgoingPresence
+        {
+            get { return HasTag("presence-out"); }
+            set
+            {
+                if (value)
+                    this.SetTag("presence-out");
+                else
+                    this.RemoveTag("presence-out");
+            }
+        }
+        
+        /// <summary>
+        /// which stanzas should be blocked?
+        /// </summary>
+        public Stanza Stanza
+        {
+            get
+            {
+                Stanza result = Stanza.All;
+
+                if (BlockIq)
+                    result |= Stanza.Iq;
+                if (BlockMessage) 
+                    result |= Stanza.Message;
+                if (BlockIncomingPresence)
+                    result |= Stanza.IncomingPresence;
+                if (BlockOutgoingPresence)
+                    result |= Stanza.OutgoingPresence;
+                
+                return result;
+            }
+            set
+            {
+                if (value == Stanza.All)
+                {
+                    // Block All Communications
+                    BlockIq                 = false;
+                    BlockMessage            = false;
+                    BlockIncomingPresence   = false;
+                    BlockOutgoingPresence   = false;
+                }
+                else
+                {
+                    BlockIq                 = ((value & Stanza.Iq) == Stanza.Iq);
+                    BlockMessage            = ((value & Stanza.Message) == Stanza.Message);
+                    BlockIncomingPresence   = ((value & Stanza.IncomingPresence) == Stanza.IncomingPresence);
+                    BlockOutgoingPresence   = ((value & Stanza.OutgoingPresence) == Stanza.OutgoingPresence);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/List.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/List.cs
new file mode 100644
index 0000000..e928678
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/List.cs
@@ -0,0 +1,89 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    public class List : Element
+    {
+        public List()
+        {
+            this.TagName    = "list";
+            this.Namespace  = Uri.IQ_PRIVACY;
+        }
+
+        public List(string name) : this()
+        {
+            Name = name;
+        }
+
+        public string Name
+        {
+            get { return GetAttribute("name"); }
+            set { SetAttribute("name", value); }
+        }
+
+        /// <summary>
+        /// Gets all Rules (Items) when available
+        /// </summary>
+        /// <returns></returns>
+        public Item[] GetItems()
+        {
+            ElementList el = SelectElements(typeof(Item));
+            int i = 0;
+            Item[] result = new Item[el.Count];
+            foreach (Item itm in el)
+            {
+                result[i] = itm;
+                i++;
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// Adds a rule (item) to the list
+        /// </summary>
+        /// <param name="itm"></param>
+        public void AddItem(Item item)
+        {
+            this.AddChild(item);
+        }
+
+        public void AddItems(Item[] items)
+        {
+            foreach (Item item in items)
+            {
+                this.AddChild(item);
+            }            
+        }
+
+        /// <summary>
+        /// Remove all items/rules of this list
+        /// </summary>
+        public void RemoveAllItems()
+        {
+            this.RemoveTags(typeof(Item));
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Privacy.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Privacy.cs
new file mode 100644
index 0000000..4f4f9de
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Privacy.cs
@@ -0,0 +1,100 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    public class Privacy : Element
+    {
+        public Privacy()
+        {
+            this.TagName    = "query";
+            this.Namespace  = Uri.IQ_PRIVACY;
+        }
+        
+        /// <summary>
+        /// Add a provacy list
+        /// </summary>
+        /// <param name="list"></param>
+        public void AddList(List list)
+        {
+            this.AddChild(list);
+        }
+
+        /// <summary>
+        /// Get all Lists
+        /// </summary>
+        /// <returns>Array of all privacy lists</returns>
+        public List[] GetList()
+        {
+            ElementList el = SelectElements(typeof(List));
+            int i = 0;
+            List[] result = new List[el.Count];
+            foreach (List list in el)
+            {
+                result[i] = list;
+                i++;
+            }
+            return result;
+        }
+
+        /// <summary>
+        /// The active list
+        /// </summary>
+        public Active Active
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Active)) as Active;
+            }
+            set
+            {
+                if (HasTag(typeof(Active)))
+                    RemoveTag(typeof(Active));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The default list
+        /// </summary>
+        public Default Default
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Default)) as Default;
+            }
+            set
+            {
+                if (HasTag(typeof(Default)))
+                    RemoveTag(typeof(Default));
+
+                this.AddChild(value);
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyIq.cs
new file mode 100644
index 0000000..c4af100
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyIq.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// Summary description for PrivateIq.
+    /// </summary>
+    public class PrivacyIq : IQ
+    {
+        Privacy m_Privacy = new Privacy();
+
+        public PrivacyIq()
+        {
+            base.Query = m_Privacy;
+            this.GenerateId();
+        }
+
+        public PrivacyIq(IqType type)
+            : this()
+        {
+            this.Type = type;
+        }
+
+        public PrivacyIq(IqType type, Jid to)
+            : this(type)
+        {
+            this.To = to;
+        }
+
+        public PrivacyIq(IqType type, Jid to, Jid from)
+            : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public new Privacy Query
+        {
+            get { return m_Privacy; }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyManager.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyManager.cs
new file mode 100644
index 0000000..d327fa2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/PrivacyManager.cs
@@ -0,0 +1,384 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP;
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.iq.privacy;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// Helper class for managing server side privacy lists (blocking communication)
+    /// </summary>
+    public class PrivacyManager
+    {
+        private XmppClientConnection	m_connection	= null;
+
+        public PrivacyManager(XmppClientConnection con)
+        {
+            m_connection = con;
+        }
+
+
+        /// <summary>
+        /// Retrieving all Privacy Lists
+        /// </summary>
+        public void GetLists()
+        {
+            GetLists(null, null);
+        }
+
+        /// <summary>
+        /// Retrieving all Privacy Lists
+        /// </summary>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void GetLists(IqCB cb, object cbArg)
+        {
+            /*
+                Example: Client requests names of privacy lists from server:
+
+                <iq from='romeo at example.net/orchard' type='get' id='getlist1'>
+                  <query xmlns='jabber:iq:privacy'/>
+                </iq>
+
+                Example: Server sends names of privacy lists to client, preceded by active list and default list:
+
+                <iq type='result' id='getlist1' to='romeo at example.net/orchard'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <active name='private'/>
+                    <default name='public'/>
+                    <list name='public'/>
+                    <list name='private'/>
+                    <list name='special'/>
+                  </query>
+                </iq>
+
+            */
+
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.get;
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Requests a privacy list from the server by its name
+        /// </summary>
+        /// <param name="name">name of the privacy list to retrieve</param>
+        public void GetList(string name)
+        {
+            GetList(name, null, null);
+        }
+
+        /// <summary>
+        /// Requests a privacy list from the server by its name
+        /// </summary>
+        /// <param name="name">name of the privacy list to retrieve</param>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void GetList(string name, IqCB cb, object cbArg)
+        {
+            /*
+                Example: Client requests a privacy list from server:
+
+                <iq from='romeo at example.net/orchard' type='get' id='getlist2'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <list name='public'/>
+                  </query>
+                </iq>
+
+                Example: Server sends a privacy list to client:
+
+                <iq type='result' id='getlist2' to='romeo at example.net/orchard'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <list name='public'>
+                      <item type='jid'
+                            value='tybalt at example.com'
+                            action='deny'
+                            order='1'/>
+                      <item action='allow' order='2'/>
+                    </list>
+                  </query>
+                </iq>
+
+            */
+
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.get;
+            pIq.Query.AddList(new List(name));
+
+            SendStanza(pIq, cb, cbArg);            
+        }
+
+        /// <summary>
+        /// Remove a privacy list
+        /// </summary>
+        /// <param name="name">name of the privacy list to remove</param>
+        public void RemoveList(string name)
+        {
+            RemoveList(name, null, null);
+        }
+
+        /// <summary>
+        /// Remove a privacy list
+        /// </summary>
+        /// <param name="name">name of the privacy list to remove</param>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void RemoveList(string name, IqCB cb, object cbArg)
+        {
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+            pIq.Query.AddList(new List(name));
+
+            SendStanza(pIq, cb, cbArg);            
+        }
+
+        /// <summary>
+        /// Decline the use of any active list
+        /// </summary>
+        public void DeclineActiveList()
+        {
+            DeclineActiveList(null, null);
+        }
+
+        /// <summary>
+        /// Decline the use of any active list
+        /// </summary>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void DeclineActiveList(IqCB cb, object cbArg)
+        {
+            /*
+                In order to decline the use of any active list, the connected resource MUST send an empty <active/> element 
+                with no 'name' attribute.
+
+                Example: Client declines the use of active lists:
+
+                <iq from='romeo at example.net/orchard' type='set' id='active3'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <active/>
+                  </query>
+                </iq>
+
+                Example: Server acknowledges success of declining any active list:
+
+                <iq type='result' id='active3' to='romeo at example.net/orchard'/>            
+            */
+
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+            pIq.Query.Active = new Active();
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Change the active list
+        /// </summary>
+        /// <param name="name"></param>
+        public void ChangeActiveList(string name)
+        {
+            ChangeActiveList(name, null, null);
+        }
+
+        /// <summary>
+        /// Change the active list
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void ChangeActiveList(string name, IqCB cb, object cbArg)
+        {
+            /*
+                Example: Client requests change of active list:
+
+                <iq from='romeo at example.net/orchard' type='set' id='active1'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <active name='special'/>
+                  </query>
+                </iq>
+
+                The server MUST activate and apply the requested list before sending the result back to the client.
+
+                Example: Server acknowledges success of active list change:
+
+                <iq type='result' id='active1' to='romeo at example.net/orchard'/>
+
+                If the user attempts to set an active list but a list by that name does not exist, the server MUST return an <item-not-found/> stanza error to the user:
+
+                Example: Client attempts to set a non-existent list as active:
+
+                <iq to='romeo at example.net/orchard' type='error' id='active2'>
+                  <query xmlns='jabber:iq:privacy'>
+                    <active name='The Empty Set'/>
+                  </query>
+                  <error type='cancel'>
+                    <item-not-found
+                        xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
+                  </error>
+                </iq>                
+             
+            */
+
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+            pIq.Query.Active = new Active(name);
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Change the default list
+        /// </summary>
+        /// <param name="name">name of the new default list</param>
+        public void ChangeDefaultList(string name)
+        {
+            ChangeDefaultList(name, null, null);
+        }
+
+        /// <summary>
+        /// Change the default list
+        /// </summary>
+        /// <param name="name">name of the new default list</param>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void ChangeDefaultList(string name, IqCB cb, object cbArg)
+        {
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+            pIq.Query.Default = new Default(name);
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Decline the use of the default list
+        /// </summary>
+        public void DeclineDefaultList()
+        {
+            DeclineDefaultList(null, null);
+        }
+
+        /// <summary>
+        /// Decline the use of the default list
+        /// </summary>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void DeclineDefaultList(IqCB cb, object cbArg)
+        {
+            PrivacyIq pIq = new PrivacyIq();
+
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+            pIq.Query.Default = new Default();
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+      
+
+        /// <summary>
+        /// Update the list with the given name and rules.
+        /// </summary>
+        /// <remarks>
+        /// Specify the desired changes to the list by including all elements/rules in the list 
+        /// (not the "delta")
+        /// </remarks>
+        /// <param name="name">name of the list</param>
+        /// <param name="rules">rules of this list</param>
+        public void UpdateList(string name, Item[] rules)
+        {
+            UpdateList(name, rules, null, null);
+        }
+
+        /// <summary>
+        /// Update the list with the given name and rules.
+        /// </summary>
+        /// <remarks>
+        /// Specify the desired changes to the list by including all elements/rules in the list 
+        /// (not the "delta")
+        /// </remarks>
+        /// <param name="name">name of this list</param>
+        /// <param name="rules">rules of this list</param>
+        /// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void UpdateList(string name, Item[] rules, IqCB cb, object cbArg)
+        {
+            PrivacyIq pIq = new PrivacyIq();
+            pIq.Type = agsXMPP.protocol.client.IqType.set;
+
+            // create a new list with the given name
+            List list = new List(name);
+            list.AddItems(rules);
+            // add the list to the query
+            pIq.Query.AddList(list);
+
+            SendStanza(pIq, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Add a new list with the given name and rules
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="rules"></param>
+        public void AddList(string name, Item[] rules)
+        {
+            AddList(name, rules, null, null);
+        }
+
+        /// <summary>
+        /// Add a new list with the given name and rules.
+        /// </summary>        
+        /// <param name="name"></param>
+        /// <param name="rules"></param>
+        ///// <param name="cb">Callback for the server result</param>
+        /// <param name="cbArg">Callback arguments for the result when needed</param>
+        public void AddList(string name, Item[] rules, IqCB cb, object cbArg)
+        {
+            UpdateList(name, rules, cb, cbArg);
+        }
+
+        /// <summary>
+        /// Sends a PrivacyIq over the active connection
+        /// </summary>
+        /// <param name="pIq"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        private void SendStanza(PrivacyIq pIq, IqCB cb, object cbArg)
+        {
+            if (cb == null)
+                m_connection.Send(pIq);
+            else
+                m_connection.IqGrabber.SendIq(pIq, cb, cbArg);
+        }
+        
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/RuleManager.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/RuleManager.cs
new file mode 100644
index 0000000..cb7eb01
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/RuleManager.cs
@@ -0,0 +1,116 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.protocol.iq.roster;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// Helper class for creating rules for communication blocking
+    /// </summary>
+    public class RuleManager
+    {
+        /// <summary>
+        /// Block stanzas by Jid
+        /// </summary>
+        /// <param name="jidToBlock"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item BlockByJid(Jid jidToBlock, int order, Stanza stanza)
+        {
+            return new Item(Action.deny, order, Type.jid, jidToBlock.ToString(), stanza);
+        }
+                
+
+        /// <summary>
+        /// Block stanzas for a given roster group
+        /// </summary>
+        /// <param name="group"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item BlockByGroup(string group, int order, Stanza stanza)
+        {
+            return new Item(Action.deny, order, Type.group, group, stanza);
+        }
+                
+        /// <summary>
+        /// Block stanzas by subscription type
+        /// </summary>
+        /// <param name="subType"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item BlockBySubscription(SubscriptionType subType, int order, Stanza stanza)
+        {
+            return new Item(Action.deny, order, Type.subscription, subType.ToString(), stanza);
+        }
+
+        /// <summary>
+        /// Block globally (all users) the given stanzas
+        /// </summary>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item BlockGlobal(int order, Stanza stanza)
+        {
+            return new Item(Action.deny, order, stanza);
+        }
+
+        /// <summary>
+        /// Allow stanzas by Jid
+        /// </summary>
+        /// <param name="jidToBlock"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item AllowByJid(Jid jidToBlock, int order, Stanza stanza)
+        {
+            return new Item(Action.allow, order, Type.jid, jidToBlock.ToString(), stanza);
+        }
+
+        /// <summary>
+        /// Allow stanzas for a given roster group
+        /// </summary>
+        /// <param name="group"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item AllowByGroup(string group, int order, Stanza stanza)
+        {
+            return new Item(Action.allow, order, Type.group, group, stanza);
+        }
+
+        /// <summary>
+        /// Allow stanzas by subscription type
+        /// </summary>
+        /// <param name="subType"></param>
+        /// <param name="order"></param>
+        /// <param name="stanza">stanzas you want to block</param>
+        /// <returns></returns>
+        public Item AllowBySubscription(SubscriptionType subType, int order, Stanza stanza)
+        {
+            return new Item(Action.allow, order, Type.subscription, subType.ToString(), stanza);
+        }
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Stanza.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Stanza.cs
new file mode 100644
index 0000000..b89f024
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Stanza.cs
@@ -0,0 +1,67 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    /// <summary>
+    /// enum for block or allow communications.
+    /// This flags could be combined under the following conditions.
+    /// </summary>
+    /// <remarks>
+    /// <list type="bullet">
+    ///     <item>All must stand alone, its not allowed to combine thsi flag</item>
+    ///     <item>Message, Iq, IncomingPresence and Outgoing Presence could be combined, 
+    ///         <b>but</b> its not allowed to combine more than 3 of this flag.
+    ///         If you need all of them you have to use the All flag</item>
+    /// </list>
+    /// </remarks>    
+    public enum Stanza
+    {
+        /// <summary>
+        /// Block all stanzas
+        /// !!! Don't combine this flag with others!!!
+        /// </summary>
+        All                 = 0,
+        
+        /// <summary>
+        /// Block messages
+        /// </summary>
+        Message             = 1,
+
+        /// <summary>
+        /// Block IQs
+        /// </summary>
+        Iq                  = 2,
+
+        /// <summary>
+        /// Block Incoming Presences
+        /// </summary>
+        IncomingPresence    = 4,
+
+        /// <summary>
+        /// Block Outgoing Presences
+        /// </summary>
+        OutgoingPresence    = 8,
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Type.cs b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Type.cs
new file mode 100644
index 0000000..6bbbbae
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/privacy/Type.cs
@@ -0,0 +1,46 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.iq.privacy
+{
+    public enum Type
+    {
+        NONE = -1,
+       
+        /// <summary>
+        /// 
+        /// </summary>
+        jid,
+
+        /// <summary>
+        /// 
+        /// </summary>
+        group,
+
+        /// <summary>
+        /// 
+        /// </summary>
+        subscription
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/private/Private.cs b/lib/agsxmpp/agsxmpp/protocol/iq/private/Private.cs
new file mode 100644
index 0000000..256f080
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/private/Private.cs
@@ -0,0 +1,73 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+using agsXMPP.protocol.extensions.bookmarks;
+
+namespace agsXMPP.protocol.iq. at private
+{
+	/// <summary>
+	/// Private XML Storage JEP-0049
+	/// </summary>
+	/// <remarks>
+	/// A Jabber client can store any arbitrary XML on the server side by sending an
+	/// iq stanza of type "set" to the server with a query child scoped by the 'jabber:iq:private' namespace.
+	/// The query element MAY contain any arbitrary XML fragment as long as the root element of that 
+	/// fragment is scoped by its own namespace. The data can then be retrieved by sending an iq stanza 
+	/// of type "get" with a query child scoped by the 'jabber:iq:private' namespace, 
+	/// which in turn contains a child element scoped by the namespace used for storage of that fragment.
+	/// Using this method, Jabber entities can store private data on the server and retrieve it 
+	/// whenever necessary. The data stored might be anything, as long as it is valid XML.
+	/// One typical usage for this namespace is the server-side storage of client-specific preferences; 
+	/// another is Bookmark Storage.
+	/// </remarks>
+	public class Private : Element
+	{
+		public Private()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_PRIVATE;			
+		}
+        
+        /// <summary>
+        /// The <see cref="agsXMPP.protocol.extensions.bookmarks.Storage">Storage</see> object 
+        /// </summary>
+        public Storage Storage
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Storage)) as Storage;
+            }
+            set
+            {
+                if (HasTag(typeof(Storage)))
+                    RemoveTag(typeof(Storage));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/private/PrivateIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/private/PrivateIq.cs
new file mode 100644
index 0000000..71b44e1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/private/PrivateIq.cs
@@ -0,0 +1,61 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq. at private
+{
+	/// <summary>
+	/// Summary description for PrivateIq.
+	/// </summary>
+	public class PrivateIq : IQ
+	{
+		Private m_Private	= new Private();
+
+		public PrivateIq()
+		{
+			base.Query = m_Private;
+			this.GenerateId();
+		}
+
+		public PrivateIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public PrivateIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public PrivateIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Private Query
+		{
+			get { return m_Private; }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/register/Register.cs b/lib/agsxmpp/agsxmpp/protocol/iq/register/Register.cs
new file mode 100644
index 0000000..481e5a3
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/register/Register.cs
@@ -0,0 +1,126 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+// Sample 1
+// <SENT> <iq id="2" type="set"><query xmlns="jabber:iq:register"><username>gnauck2</username><password>secret</password></query></iq>
+// <RECV> <iq id='2' type='result'/>
+
+// Sample 2
+// <SEND> <iq xmlns="jabber:client" id="agsXMPP_1" type="get" to="127.0.0.1"><query xmlns="jabber:iq:register"><username>test1</username><password>secret</password></query></iq>
+// <RECV> <iq xmlns="jabber:client" id="agsXMPP_1" type="result"><query xmlns="jabber:iq:register"><username>test1</username><password>mysecret</password><password /><instructions>Choose a username and password to register with this server.</instructions><name /><email /><username /></query></iq>
+
+
+namespace agsXMPP.protocol.iq.register
+{
+	/// <summary>
+	/// Used for registering new usernames on Jabber/XMPP Servers
+	/// </summary>
+	public class Register : Element
+	{
+		#region << Constructors >>
+		public Register()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_REGISTER;
+		}
+
+		public Register(string username, string password) : this()
+		{
+			Username = username;
+			Password = password;
+		}
+		#endregion
+
+		#region << Properties >>
+		public string Username
+		{
+			get	{ return GetTag("username"); }
+			set	{ SetTag("username", value); }
+		}
+
+		public string Password
+		{
+			get	{ return GetTag("password"); }
+			set { SetTag("password", value); }
+		}
+
+		public string Instructions
+		{
+			get	{ return GetTag("instructions"); }
+			set	{ SetTag("instructions", value); }
+		}
+
+		public string Name
+		{
+			get	{ return GetTag("name"); }
+			set { SetTag("name", value); }
+		}
+
+		public string Email
+		{
+			get	{ return GetTag("email"); }
+			set	{ SetTag("email", value); }
+		}
+
+        /// <summary>
+        /// Remove registration from the server
+        /// </summary>
+        public bool RemoveAccount
+        {
+            get { return HasTag("remove"); }
+            set
+            {
+                if (value == true)
+                    SetTag("remove");
+                else
+                    RemoveTag("remove");
+            }
+        }
+
+        /// <summary>
+        /// The X-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+		#endregion
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterEventArgs.cs b/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterEventArgs.cs
new file mode 100644
index 0000000..fa3fc9e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterEventArgs.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.iq.register
+{
+    public delegate void RegisterEventHandler(object sender, RegisterEventArgs args);
+
+    public class RegisterEventArgs
+    {
+        public RegisterEventArgs()
+        {
+        }
+        
+        public RegisterEventArgs(Register reg)
+        {
+            m_Register = reg;
+        }
+        
+        // by default we register automatically
+        private bool						m_Auto			= true;
+        private Register                    m_Register;
+
+        /// <summary>
+        /// Set Auto to true if the library should register automatically
+        /// Set it to false if you want to fill out the registration fields manual
+        /// </summary>
+        public bool Auto
+        {
+            get { return m_Auto; }
+            set { m_Auto = value; }
+        }
+
+        public Register Register
+        {
+            get { return m_Register; }
+            set { m_Register = value; }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterIq.cs
new file mode 100644
index 0000000..989e02f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/register/RegisterIq.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.register
+{
+	/// <summary>
+	/// Used for registering new usernames on Jabber/XMPP Servers
+	/// </summary>
+	public class RegisterIq : IQ
+	{
+		private Register m_Register = new Register();
+
+		public RegisterIq()
+		{
+			base.Query = m_Register;
+			this.GenerateId();
+		}
+
+		public RegisterIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public RegisterIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public RegisterIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Register Query
+		{
+			get
+			{
+				return m_Register;
+			}           
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/roster/Delimiter.cs b/lib/agsxmpp/agsxmpp/protocol/iq/roster/Delimiter.cs
new file mode 100644
index 0000000..bc99d0e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/roster/Delimiter.cs
@@ -0,0 +1,69 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.roster
+{
+	/// <summary>
+	/// Extension JEP-0083, delimiter for nested roster groups
+	/// </summary>
+	public class Delimiter : Element
+	{
+		/*
+		3.1 Querying for the delimiter 
+		All compliant clients SHOULD query for an existing delimiter at login.
+
+		Example 1. Querying for the Delimiter
+			
+		CLIENT:																												 CLIENT:
+		<iq type='get'
+			 id='1'>
+		<query xmlns='jabber:iq:private'>
+			 <roster xmlns='roster:delimiter'/>
+				  </query>
+		</iq>
+
+		SERVER:
+		<iq type='result'
+			 id='1'
+		from='bill at shakespeare.lit/Globe'
+		to='bill at shakespeare.lit/Globe'>
+		<query xmlns='jabber:iq:private'>
+			 <roster xmlns='roster:delimiter'>::</roster>
+		</query>
+		</iq>
+		*/
+		public Delimiter()
+		{
+			this.TagName	= "roster";
+            this.Namespace	= Uri.ROSTER_DELIMITER;
+		}
+
+		public Delimiter(string delimiter) : this()
+		{
+			this.Value = delimiter;
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/roster/Roster.cs b/lib/agsxmpp/agsxmpp/protocol/iq/roster/Roster.cs
new file mode 100644
index 0000000..0d1e670
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/roster/Roster.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.roster
+{
+
+	/// <summary>
+	/// Zusammenfassung f�r Roster.
+	/// </summary>
+	public class Roster : Element
+	{
+
+		// Request Roster:
+		// <iq id='someid' to='myjabber.net' type='get'>
+		//		<query xmlns='jabber:iq:roster'/>
+		// </iq>
+		public Roster()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_ROSTER;
+		}
+
+		public RosterItem[] GetRoster()
+		{
+            ElementList nl = SelectElements(typeof(RosterItem));
+			int i = 0;
+			RosterItem[] result = new RosterItem[nl.Count];
+			foreach (RosterItem ri in nl)
+			{				
+				result[i] = (RosterItem) ri;
+				i++;
+			}
+			return result;
+		}
+		
+		public void AddRosterItem(RosterItem r)
+		{
+			this.ChildNodes.Add(r);
+		}		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterIq.cs
new file mode 100644
index 0000000..78c54d6
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterIq.cs
@@ -0,0 +1,55 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+
+// Request Roster:
+// <iq id='someid' to='myjabber.net' type='get'>
+//		<query xmlns='jabber:iq:roster'/>
+// </iq>
+namespace agsXMPP.protocol.iq.roster
+{
+	/// <summary>
+	/// Build a new roster query, jabber:iq:roster
+	/// </summary>
+	public class RosterIq : IQ
+	{
+		private Roster m_Roster = new Roster();
+
+		public RosterIq()
+		{
+			base.Query = m_Roster;
+			this.GenerateId();
+		}
+
+		public RosterIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}	
+
+		public new Roster Query
+		{
+			get { return m_Roster; }            
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterItem.cs b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterItem.cs
new file mode 100644
index 0000000..a4e3d66
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterItem.cs
@@ -0,0 +1,107 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.Base;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.roster
+{
+	// jabber:iq:roster
+	// <iq from="user at server.com/Office" id="doroster_1" type="result">
+	//		<query xmlns="jabber:iq:roster">
+	//			<item subscription="both" name="juiliet" jid="11111 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="roman" jid="22222 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="angie" jid="33333 at icq.myjabber.net"><group>ICQ</group></item>
+	//			<item subscription="both" name="bob" jid="44444 at icq.myjabber.net"><group>ICQ</group></item>
+	//		</query>
+	// </iq> 
+
+	// # "none" -- the user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information
+	// # "to" -- the user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information
+	// # "from" -- the contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information
+	// # "both" -- both the user and the contact have subscriptions to each other's presence information
+
+    // TODO rename to Ask and move to a seperate file, so it matches better to all other enums
+	public enum AskType
+	{		
+		NONE = -1,	
+		subscribe,		
+		unsubscribe
+	}
+
+    // TODO rename to Subscription and move to a seperate file, so it matches better to all other enums
+	public enum SubscriptionType
+	{        
+		none,
+		to,
+		from,
+		both,
+		remove
+	}
+
+	/// <summary>
+	/// Item is used in jabber:iq:roster, jabber:iq:search
+	/// </summary>
+	public class RosterItem : agsXMPP.protocol.Base.RosterItem
+	{
+		public RosterItem() : base()
+		{
+			this.Namespace	= Uri.IQ_ROSTER;
+		}
+		
+		public RosterItem(Jid jid) : this()
+		{
+			Jid = jid;				
+		}
+
+		public RosterItem(Jid jid, string name) : this(jid)
+		{
+			Name = name;
+		}
+
+		public SubscriptionType Subscription
+		{
+			get 
+			{ 
+				return (SubscriptionType) GetAttributeEnum("subscription", typeof(SubscriptionType)); 
+			}
+			set { SetAttribute("subscription", value.ToString()); }
+		}
+
+		public AskType Ask
+		{
+			get 
+			{ 
+				return (AskType) GetAttributeEnum("ask", typeof(AskType)); 
+			}
+			set 
+			{ 
+				if (value == AskType.NONE) 
+					RemoveAttribute("ask");
+				else
+					SetAttribute("ask", value.ToString()); 
+			}
+		}
+	}	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterManager.cs b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterManager.cs
new file mode 100644
index 0000000..0b133e4
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/roster/RosterManager.cs
@@ -0,0 +1,169 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.roster
+{
+	/// <summary>
+	/// Helper class that makes it easier to manage your contact list.
+	/// </summary>
+	public class RosterManager
+	{
+		private readonly XmppClientConnection	m_connection;
+
+	    #region << Constructors >>
+	    /// <summary>
+		/// Constructor
+		/// </summary>
+		/// <param name="con">The XmppClientConnection on which the RosterManager should send the packets</param>
+		public RosterManager(XmppClientConnection con)
+		{		
+			m_connection = con;
+		}
+
+	    #endregion
+
+	    #region << Add Contact >>
+
+	    /// <summary>
+	    /// Add a contact to the Roster
+	    /// </summary>
+	    /// <param name="jid">The BARE jid of the rosteritem that should be removed</param>
+	    public void AddRosterItem(Jid jid)
+	    {
+	        AddRosterItem(jid, null, new string[] {});
+	    }
+
+	    /// <summary>
+	    /// Add a contact to the Roster
+	    /// </summary>
+	    /// <param name="jid">The BARE jid of the contact that should be added.</param>
+	    /// <param name="nickname">Nickname for the new contact.</param>
+	    public void AddRosterItem(Jid jid, string nickname)
+	    {
+	        AddRosterItem(jid, nickname, new string[] {});
+	    }
+
+	    /// <summary>
+	    /// Add a contact to the Roster
+	    /// </summary>
+	    /// <param name="jid">The BARE jid of the contact that should be added.</param>
+	    /// <param name="nickname">Nickname for the new contact.</param>
+	    /// <param name="group">The group to which the contact should be added.</param>
+	    public void AddRosterItem(Jid jid, string nickname, string group)
+	    {
+	        AddRosterItem(jid, nickname, new string[] {group});
+	    }
+
+	    /// <summary>
+	    /// Add a contact to the Roster.
+	    /// </summary>
+	    /// <param name="jid">The BARE jid of the contact that should be added.</param>
+	    /// <param name="nickname">Nickname for the contact.</param>
+	    /// <param name="group">An Array of groups when you want to add the contact to multiple groups.</param>
+	    public void AddRosterItem(Jid jid, string nickname, string[] group)
+	    {
+	        RosterIq riq = new RosterIq();
+	        riq.Type = IqType.set;
+				
+	        RosterItem ri = new RosterItem();
+	        ri.Jid	= jid;
+			
+	        if (nickname != null)
+	            ri.Name	= nickname;
+			
+	        foreach (string g in group)
+	        {
+	            ri.AddGroup(g);			
+	        }
+
+	        riq.Query.AddRosterItem(ri);
+				
+	        m_connection.Send(riq);
+	    }
+
+	    #endregion
+        
+        #region << Update contact >>
+        /// <summary>
+        /// Update a contact
+        /// </summary>
+        /// <param name="jid"></param>
+        public void UpdateRosterItem(Jid jid)
+        {
+            AddRosterItem(jid, null, new string[] { });
+        }
+
+        /// <summary>
+        /// Update a contact
+        /// </summary>
+        /// <param name="jid">The BARE jid of the contact that should be updated.</param>
+        /// <param name="nickname">Nickname for the contact to update.</param>
+        public void UpdateRosterItem(Jid jid, string nickname)
+        {
+            AddRosterItem(jid, nickname, new string[] { });
+        }
+
+        /// <summary>
+        /// Update a contact
+        /// </summary>
+        /// <param name="jid"></param>
+        /// <param name="nickname"></param>
+        /// <param name="group"></param>
+        public void UpdateRosterItem(Jid jid, string nickname, string group)
+        {
+            AddRosterItem(jid, nickname, new string[] { group });
+        }
+
+        /// <summary>
+        /// Update a contact.
+        /// </summary>
+        /// <param name="jid">The BARE jid of the contact that should be updated.</param>
+        /// <param name="nickname">Nickname for the contact to update.</param>
+        /// <param name="group">An Array of groups when you want to add the contact to multiple groups.</param>
+        public void UpdateRosterItem(Jid jid, string nickname, string[] group)
+        {
+            AddRosterItem(jid, nickname, group);
+        }
+        #endregion
+
+	    #region << Remove Contact >>
+	    /// <summary>
+        /// Removes a contact from the Roster
+        /// </summary>
+        /// <param name="jid">The BARE jid of the rosteritem that should be removed</param>
+        public void RemoveRosterItem(Jid jid)
+        {
+            RosterIq riq = new RosterIq();
+            riq.Type = IqType.set;
+
+            RosterItem ri = new RosterItem();
+            ri.Jid = jid;
+            ri.Subscription = SubscriptionType.remove;
+
+            riq.Query.AddRosterItem(ri);
+
+            m_connection.Send(riq);
+        }
+	    #endregion
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodCall.cs b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodCall.cs
new file mode 100644
index 0000000..8d914d2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodCall.cs
@@ -0,0 +1,92 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System.Collections;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.rpc
+{    
+
+    /// <summary>
+    /// The methodCall element.     
+    /// </summary>
+    public class MethodCall : Element
+    {
+        /*
+        
+         <methodCall>
+            <methodName>examples.getStateName</methodName>
+            <params>
+                <param><value><i4>41</i4></value></param>
+            </params>
+         </methodCall>        
+         
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public MethodCall()
+        {
+            TagName    = "methodCall";
+            Namespace  = Uri.IQ_RPC;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="methodName"></param>
+        /// <param name="Params"></param>
+        public MethodCall(string methodName, ArrayList Params) : this()
+        {
+            WriteCall(methodName, Params);            
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public string MethodName
+		{
+			set	{ SetTag("methodName", value); }
+            get { return GetTag("methodName"); }
+		}
+
+        /// <summary>
+        /// Write the functions call with params to this Element
+        /// </summary>
+        /// <param name="name"></param>
+        /// <param name="Params"></param>
+        public void WriteCall(string name, ArrayList Params)
+        {
+            MethodName = name;
+
+            // remove this tag if exists, in case this function gets
+            // calles multiple times by some guys
+            RemoveTag("params");
+            
+            var elParams = RpcHelper.WriteParams(Params);
+
+            if (elParams != null)
+                AddChild(elParams);
+        }
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodResponse.cs b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodResponse.cs
new file mode 100644
index 0000000..1a47813
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/MethodResponse.cs
@@ -0,0 +1,233 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Collections;
+using System.Globalization;
+
+using agsXMPP.Exceptions;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.rpc
+{    
+    /// <summary>
+    /// The method Response element. 
+    /// </summary>
+    public class MethodResponse : Element
+    {
+        /*
+         
+         <methodResponse>
+           <fault>
+              <value>
+                 <struct>
+                    <member>
+                       <name>faultCode</name>
+                       <value><int>4</int></value>
+                       </member>
+                    <member>
+                       <name>faultString</name>
+                       <value><string>Too many parameters.</string></value>
+                       </member>
+                    </struct>
+                 </value>
+              </fault>
+           </methodResponse>
+         
+         */
+        public MethodResponse()
+        {
+            TagName = "methodResponse";
+            Namespace = Uri.IQ_RPC;
+        }
+
+        public void WriteResponse(ArrayList Params)
+        {
+            // remove this tag if exists, in case this function gets
+            // calles multiple times by some guys
+            RemoveTag("params");
+
+            var elParams = RpcHelper.WriteParams(Params);
+
+            if (elParams != null)
+                AddChild(elParams);
+        }
+
+        /// <summary>
+        /// Parses the XML-RPC resonse and returns an ArrayList with all Parameters.
+        /// In there is an XML-RPC Error it returns an XmlRpcException as single parameter in the ArrayList.
+        /// </summary>
+        /// <returns>Arraylist with parameters, or Arraylist with an exception</returns>
+        public ArrayList GetResponse()
+        {
+            return ParseResponse();
+        }
+
+        /// <summary>
+        /// parse the response
+        /// </summary>
+        /// <returns></returns>
+        private ArrayList ParseResponse()
+        {
+            ArrayList al = new ArrayList();
+
+            // If an error occurred, the server will return fault
+            Element fault = SelectSingleElement("fault");
+            if (fault != null)
+            {
+                Hashtable ht = ParseStruct(fault.SelectSingleElement("struct", true));
+                al.Add(new XmlRpcException((int) ht["faultCode"], (string) ht["faultString"]));
+            }
+            else
+            {
+                Element elParams = SelectSingleElement("params");
+                ElementList nl = elParams.SelectElements("param");
+
+
+                foreach (Element p in nl)
+                {
+                    Element value = p.SelectSingleElement("value");
+                    if (value != null)
+                        al.Add(ParseValue(value));
+                }
+            }
+            return al;
+        }
+
+        /// <summary>
+        /// Parse a single response value
+        /// </summary>
+        /// <param name="value"></param>
+        /// <returns></returns>
+        private object ParseValue(Element value)
+        {
+            object result = null;            
+
+            if (value != null)
+            {
+                if (value.HasChildElements)
+                {
+                    Element next = value.FirstChild;
+                    if (next.TagName == "string")
+                        result = next.Value;
+                    else if (next.TagName == "boolean")
+                        result = next.Value == "1";
+                    else if (next.TagName == "i4")
+                        result = Int32.Parse(next.Value);
+                    else if (next.TagName == "int") // occurs in fault
+                        result = int.Parse(next.Value);
+                    else if (next.TagName == "double")
+                    {
+                        NumberFormatInfo numberInfo = new NumberFormatInfo();
+                        numberInfo.NumberDecimalSeparator = ".";
+                        result = Double.Parse(next.Value, numberInfo);
+                    }
+                    else if (next.TagName == "dateTime.iso8601")
+                        result = Util.Time.ISO_8601Date(next.Value);
+                    else if (next.TagName == "base64")
+                        result = Convert.FromBase64String(next.Value);
+                    else if (next.TagName == "struct")
+                        result = ParseStruct(next);
+                    else if (next.TagName == "array")
+                        result = ParseArray(next);
+                }
+                else
+                {
+                    result = value.Value;
+                }
+                   
+            }
+            return result;            
+        }
+
+        /// <summary>
+        /// parse a response array
+        /// </summary>
+        /// <param name="elArray"></param>
+        /// <returns></returns>
+        private ArrayList ParseArray(Element elArray)
+        {
+            //<array>
+            //    <data>
+            //        <value><string>one</string></value>
+            //        <value><string>two</string></value>
+            //        <value><string>three</string></value>
+            //        <value><string>four</string></value>
+            //        <value><string>five</string></value>
+            //    </data>
+            //</array>
+
+            Element data = elArray.SelectSingleElement("data");
+            if (data != null)
+            {
+                ArrayList al = new ArrayList();
+                ElementList values = data.SelectElements("value");
+
+                foreach (Element val in values)
+                {
+                    al.Add(ParseValue(val));
+                }               
+                return al;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// parse a response struct
+        /// </summary>
+        /// <param name="el"></param>
+        /// <returns></returns>
+        private Hashtable ParseStruct(Element el)
+        {           
+            //<struct>
+            //   <member>
+            //      <name>x</name>
+            //      <value><i4>20</i4></value>
+            //   </member>
+            //   <member>
+            //      <name>y</name>
+            //      <value><string>cow</string></value>
+            //   </member>
+            //   <member>
+            //      <name>z</name>
+            //      <value><double>3,14</double></value>
+            //   </member>
+            //</struct>
+			
+            Hashtable ht = new Hashtable();
+
+            ElementList members = el.SelectElements("member");
+
+            foreach (Element member in members)
+            {
+                string name = member.GetTag("name");
+
+                // parse this member value
+                Element value = member.SelectSingleElement("value");
+                if (value != null)
+				    ht[name] = ParseValue(value);			
+			} 
+            return ht;		
+        }
+
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/rpc/Rpc.cs b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/Rpc.cs
new file mode 100644
index 0000000..13831da
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/Rpc.cs
@@ -0,0 +1,101 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.rpc
+{
+    
+    /*         
+
+        Example 1. A typical request
+
+        <iq type='set' to='responder at company-a.com/jrpc-server' id='1'>
+          <query xmlns='jabber:iq:rpc'>
+            <methodCall>
+              <methodName>examples.getStateName</methodName>
+              <params>
+                <param>
+                  <value><i4>6</i4></value>
+                </param>
+              </params>
+            </methodCall>
+          </query>
+        </iq>
+
+        Example 2. A typical response
+
+        <iq type='result' to='requester at company-b.com/jrpc-client' 
+                    from='responder at company-a.com/jrpc-server' id='1'>
+          <query xmlns='jabber:iq:rpc'>
+            <methodResponse>
+              <params>
+                <param>
+                  <value><string>Colorado</string></value>
+                </param>
+              </params>
+            </methodResponse>
+          </query>
+        </iq>
+
+    */
+      
+    /// <summary>
+    /// JEP-0009: Jabber-RPC, transport RPC over Jabber/XMPP
+    /// </summary>
+    public class Rpc : Element
+    {
+        public Rpc()
+        {
+            TagName    = "query";
+            Namespace  = Uri.IQ_RPC;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public MethodCall MethodCall
+        {
+            get { return (MethodCall)SelectSingleElement(typeof(MethodCall)); }
+            set
+            {
+                RemoveTag(typeof(MethodCall));
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public MethodResponse MethodResponse
+        {
+            get { return (MethodResponse)SelectSingleElement(typeof(MethodResponse)); }
+            set
+            {
+                RemoveTag(typeof(MethodResponse));
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+        
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcHelper.cs b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcHelper.cs
new file mode 100644
index 0000000..df4511d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcHelper.cs
@@ -0,0 +1,121 @@
+using System;
+using System.Collections;
+using System.Globalization;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.rpc
+{
+    internal class RpcHelper
+    {
+        public static Element WriteParams(ArrayList Params)
+        {
+            if (Params != null && Params.Count > 0)
+            {
+                Element elParams = new Element("params");
+
+                for (int i = 0; i < Params.Count; i++)
+                {
+                    Element param = new Element("param");
+                    WriteValue(Params[i], param);
+                    elParams.AddChild(param);
+                }
+                return elParams;
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// Writes a single value to a call
+        /// </summary>
+        /// <param name="param"></param>
+        /// <param name="parent"></param>
+        public static void WriteValue(object param, Element parent)
+        {
+            Element value = new Element("value");
+
+            if (param is String)
+            {
+                value.AddChild(new Element("string", param as string));
+            }
+            else if (param is Int32)
+            {
+                value.AddChild(new Element("i4", ((Int32)param).ToString()));
+            }
+            else if (param is Double)
+            {
+                NumberFormatInfo numberInfo = new NumberFormatInfo();
+                numberInfo.NumberDecimalSeparator = ".";
+                //numberInfo.NumberGroupSeparator = ",";
+                value.AddChild(new Element("double", ((Double)param).ToString(numberInfo)));
+            }
+            else if (param is Boolean)
+            {
+                value.AddChild(new Element("boolean", ((bool)param) ? "1" : "0"));
+            }
+            // XML-RPC dates are formatted in iso8601 standard, same as xmpp,
+            else if (param is DateTime)
+            {
+                value.AddChild(new Element("dateTime.iso8601", Util.Time.ISO_8601Date((DateTime)param)));
+            }
+            // byte arrays must be encoded in Base64 encoding
+            else if (param is byte[])
+            {
+                byte[] b = (byte[])param;
+                value.AddChild(new Element("base64", Convert.ToBase64String(b, 0, b.Length)));
+            }
+            // Arraylist maps to an XML-RPC array
+            else if (param is ArrayList)
+            {
+                //<array>  
+                //    <data>
+                //        <value>  <string>one</string>  </value>
+                //        <value>  <string>two</string>  </value>
+                //        <value>  <string>three</string></value>  
+                //    </data> 
+                //</array>
+                Element array = new Element("array");
+                Element data = new Element("data");
+
+                ArrayList list = param as ArrayList;
+
+                for (int i = 0; i < list.Count; i++)
+                {
+                    WriteValue(list[i], data);
+                }
+
+                array.AddChild(data);
+                value.AddChild(array);
+            }
+            // java.util.Hashtable maps to an XML-RPC struct
+            else if (param is Hashtable)
+            {
+                Element elStruct = new Element("struct");
+
+                Hashtable ht = (Hashtable)param;
+                IEnumerator myEnumerator = ht.Keys.GetEnumerator();
+                while (myEnumerator.MoveNext())
+                {
+                    Element member = new Element("member");
+                    object key = myEnumerator.Current;
+
+                    if (key != null)
+                    {
+                        member.AddChild(new Element("name", key.ToString()));
+                        WriteValue(ht[key], member);
+                    }
+
+                    elStruct.AddChild(member);
+                }
+
+                value.AddChild(elStruct);
+            }
+            /*
+            else
+            {
+                // Unknown Type
+            }
+            */
+            parent.AddChild(value);
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcIq.cs
new file mode 100644
index 0000000..9de129a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/rpc/RpcIq.cs
@@ -0,0 +1,66 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+
+namespace agsXMPP.protocol.iq.rpc
+{
+    /// <summary>
+    /// RpcIq.
+    /// </summary>
+    public class RpcIq : IQ
+    {
+        private Rpc m_Rpc = new Rpc();
+
+        public RpcIq()
+        {
+            base.Query = m_Rpc;
+            this.GenerateId();
+        }
+
+        public RpcIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public RpcIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public RpcIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public new Rpc Query
+        {
+            get
+            {
+                return m_Rpc;
+            }
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/search/Search.cs b/lib/agsxmpp/agsxmpp/protocol/iq/search/Search.cs
new file mode 100644
index 0000000..ea93514
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/search/Search.cs
@@ -0,0 +1,178 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.x.data;
+
+using agsXMPP.Xml.Dom;
+
+//	Example 1. Requesting Search Fields
+//
+//	<iq type='get'
+//		from='romeo at montague.net/home'
+//		to='characters.shakespeare.lit'
+//		id='search1'
+//		xml:lang='en'>
+//		<query xmlns='jabber:iq:search'/>
+//	</iq>
+//
+
+//	The service MUST then return the possible search fields to the user, and MAY include instructions:
+//
+//	Example 2. Receiving Search Fields
+//
+//	<iq type='result'
+//		from='characters.shakespeare.lit'
+//		to='romeo at montague.net/home'
+//		id='search1'
+//		xml:lang='en'>
+//		<query xmlns='jabber:iq:search'>
+//			<instructions>
+//			Fill in one or more fields to search
+//			for any matching Jabber users.
+//			</instructions>
+//			<first/>
+//			<last/>
+//			<nick/>
+//			<email/>
+//		</query>
+//	</iq>    
+
+namespace agsXMPP.protocol.iq.search
+{
+	/// <summary>
+	/// http://www.jabber.org/jeps/jep-0055.html
+	/// </summary>
+	public class Search : Element
+	{
+		public Search()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_SEARCH;
+		}
+
+		public string Instructions
+		{
+			get
+			{
+				return GetTag("instructions");
+			}
+			set
+			{
+				SetTag("instructions", value);
+			}
+		}
+
+		public string Firstname
+		{
+			get
+			{
+				return GetTag("first");
+			}
+			set
+			{
+				SetTag("first", value);
+			}
+		}
+		
+		public string Lastname
+		{
+			get
+			{
+				return GetTag("last");
+			}
+			set
+			{
+				SetTag("last", value);
+			}
+		}
+
+		public string Nickname
+		{
+			get
+			{
+				return GetTag("nick");
+			}
+			set
+			{
+				SetTag("nick", value);
+			}
+		}
+
+		public string Email
+		{
+			get
+			{
+				return GetTag("email");
+			}
+			set
+			{
+				SetTag("email", value);
+			}
+		}
+
+        /// <summary>
+        /// The X-Data Element
+        /// </summary>
+        public Data Data
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Data)) as Data;
+
+            }
+            set
+            {
+                if (HasTag(typeof(Data)))
+                    RemoveTag(typeof(Data));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+		/// <summary>
+		/// Retrieve the result items of a search
+		/// </summary>
+        //public ElementList GetItems
+        //{
+        //    get
+        //    {
+        //        return this.SelectElements("item");
+        //    }			
+        //}
+
+        public SearchItem[] GetItems()
+        {
+            ElementList nl = SelectElements(typeof(SearchItem));
+            SearchItem[] items = new SearchItem[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (SearchItem)e;
+                i++;
+            }
+            return items;
+        }
+	
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchIq.cs
new file mode 100644
index 0000000..2255021
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchIq.cs
@@ -0,0 +1,75 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+//	Example 1. Requesting Search Fields
+//
+//	<iq type='get'
+//		from='romeo at montague.net/home'
+//		to='characters.shakespeare.lit'
+//		id='search1'
+//		xml:lang='en'>
+//		<query xmlns='jabber:iq:search'/>
+//	</iq>
+
+namespace agsXMPP.protocol.iq.search
+{
+	/// <summary>
+	/// Summary description for SearchIq.
+	/// </summary>
+	public class SearchIq : IQ
+	{
+		private Search m_Search = new Search();
+
+		public SearchIq()
+		{
+			base.Query = m_Search;
+			this.GenerateId();
+		}
+
+		public SearchIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public SearchIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public SearchIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+		
+		public new Search Query
+		{
+			get
+			{
+				return m_Search;
+			}
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchItem.cs b/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchItem.cs
new file mode 100644
index 0000000..ef79503
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/search/SearchItem.cs
@@ -0,0 +1,132 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.search
+{
+	// jabber:iq:search
+	//	Example 4. Receiving Search Results
+	//
+	//	<iq type='result'
+	//		from='characters.shakespeare.lit'
+	//		to='romeo at montague.net/home'
+	//		id='search2'
+	//		xml:lang='en'>
+	//		<query xmlns='jabber:iq:search'>
+	//			<item jid='juliet at capulet.com'>
+	//				<first>Juliet</first>
+	//				<last>Capulet</last>
+	//				<nick>JuliC</nick>
+	//				<email>juliet at shakespeare.lit</email>
+	//			</item>
+	//			<item jid='stpeter at jabber.org'>
+	//				<first>Tybalt</first>
+	//				<last>Capulet</last>
+	//				<nick>ty</nick>
+	//				<email>tybalt at shakespeare.lit</email>
+	//			</item>
+	//		</query>
+	//	</iq>
+
+	/// <summary>
+	///
+	/// </summary>
+	public class SearchItem : Element
+	{
+		public SearchItem()
+		{
+			this.TagName	= "item";
+			this.Namespace	= Uri.IQ_SEARCH;	
+		}
+
+        public Jid Jid
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+                else
+                    RemoveAttribute("jid");
+            }
+        }
+
+		public string Firstname
+		{
+			get
+			{
+				return GetTag("first");
+			}
+			set
+			{
+				SetTag("first", value);
+			}
+		}
+		
+		public string Lastname
+		{
+			get
+			{
+				return GetTag("last");
+			}
+			set
+			{
+				SetTag("last", value);
+			}
+		}
+
+		/// <summary>
+		/// Nickname, null when not available
+		/// </summary>
+		public string Nickname
+		{
+			get
+			{
+				return GetTag("nick");
+			}
+			set
+			{
+				SetTag("nick", value);
+			}
+		}
+
+		public string Email
+		{
+			get
+			{
+				return GetTag("email");
+			}
+			set
+			{
+				SetTag("email", value);
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/session/Session.cs b/lib/agsxmpp/agsxmpp/protocol/iq/session/Session.cs
new file mode 100644
index 0000000..d5923aa
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/session/Session.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.session
+{
+	/// <summary>
+	/// Summary description for Session.
+	/// </summary>
+	public class Session : Element
+	{
+		public Session()
+		{
+			this.TagName	= "session";
+			this.Namespace	= Uri.SESSION;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/session/SessionIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/session/SessionIq.cs
new file mode 100644
index 0000000..a51d50c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/session/SessionIq.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.session
+{
+	/// <summary>
+	/// Starting the session, this is done after resource binding
+	/// </summary>
+	public class SessionIq : IQ
+	{
+		/*
+		SEND:	<iq xmlns="jabber:client" id="agsXMPP_2" type="set" to="jabber.ru">
+					<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
+				</iq>
+		RECV:	<iq xmlns="jabber:client" from="jabber.ru" type="result" id="agsXMPP_2">
+					<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
+				</iq> 
+		 */
+		private Session m_Session = new Session();
+		
+		public SessionIq()
+		{
+			this.GenerateId();
+			this.AddChild(m_Session);
+		}
+
+		public SessionIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public SessionIq(IqType type, Jid to) : this()
+		{			
+			this.Type = type;
+			this.To = to;
+		}		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/time/Time.cs b/lib/agsxmpp/agsxmpp/protocol/iq/time/Time.cs
new file mode 100644
index 0000000..b97c8df
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/time/Time.cs
@@ -0,0 +1,104 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.time
+{
+
+	/*
+     <iq type='get'
+        from='romeo at montague.net/orchard'
+        to='juliet at capulet.com/balcony'
+        id='time_1'>
+      <query xmlns='jabber:iq:time'/>
+     </iq>
+
+	 <iq type='result'
+        from='juliet at capulet.com/balcony'
+        to='romeo at montague.net/orchard'
+        id='time_1'>
+      <query xmlns='jabber:iq:time'>
+        <utc>20020910T17:58:35</utc>
+        <tz>MDT</tz>
+        <display>Tue Sep 10 12:58:35 2002</display>
+      </query>
+     </iq>
+     */
+    
+     
+	/// <summary>
+    /// XEP-0090: Entity Time
+	/// </summary>
+	public class Time : Element
+	{
+		public Time()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_TIME;
+		}
+
+
+		public string Utc 
+		{
+			get 
+			{ 
+				return GetTag("utc"); 
+			}
+			set 
+			{ 
+				SetTag("utc", value);
+			}
+		}
+
+		/// <summary>
+		/// Timezone
+		/// </summary>		
+		public string Tz
+		{			
+			get 
+			{ 
+				return GetTag("tz"); 
+			}
+			set 
+			{ 
+				SetTag("tz", value);			
+			}
+		}
+
+		/// <summary>
+		/// Human-readable date/time.
+		/// </summary>
+		public string Display
+		{
+			get 
+			{ 
+				return GetTag("display"); 
+			}
+			set 
+			{ 
+				SetTag("display", value);
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/time/TimeIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/time/TimeIq.cs
new file mode 100644
index 0000000..e90440a
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/time/TimeIq.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.time
+{
+	/// <summary>
+	/// Summary description for TimeIq.
+	/// </summary>
+	public class TimeIq : IQ
+	{
+		private Time m_Time = new Time();
+		
+		public TimeIq()
+		{		
+			base.Query = m_Time;
+			this.GenerateId();
+		}
+
+		public TimeIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public TimeIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public TimeIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Time Query
+		{
+			get
+			{
+				return m_Time;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Address.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Address.cs
new file mode 100644
index 0000000..7b5d8ac
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Address.cs
@@ -0,0 +1,146 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	public enum AddressLocation
+	{
+		NONE = -1,
+		HOME,
+		WORK
+	}
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Address : Element
+	{
+		//		<!-- Structured address property. Address components with
+		//		multiple values must be specified as a comma separated list
+		//		of values. -->
+		//		<!ELEMENT ADR (
+		//		HOME?, 
+		//		WORK?, 
+		//		POSTAL?, 
+		//		PARCEL?, 
+		//		(DOM | INTL)?, 
+		//		PREF?, 
+		//		POBOX?, 
+		//		EXTADR?, 
+		//		STREET?, 
+		//		LOCALITY?, 
+		//		REGION?, 
+		//		PCODE?, 
+		//		CTRY?
+		//		)>
+
+		// <ADR>
+		//	<WORK/>
+		//	<EXTADD>Suite 600</EXTADD>
+		//	<STREET>1899 Wynkoop Street</STREET>
+		//	<LOCALITY>Denver</LOCALITY>
+		//	<REGION>CO</REGION>
+		//	<PCODE>80202</PCODE>
+		//	<CTRY>USA</CTRY>
+		// </ADR>
+		public Address()
+		{
+			this.TagName	= "ADR";
+			this.Namespace	= Uri.VCARD;
+		}
+
+		public Address(AddressLocation loc, string extra, string street, string locality, string region, string postalcode, string country, bool prefered) : this()
+		{
+			Location		= loc;
+			ExtraAddress	= extra;
+			Street			= street;
+			Locality		= locality;
+			Region			= region;
+			PostalCode		= postalcode;
+			Country			= country;
+			IsPrefered		= prefered;
+		}
+
+		public AddressLocation Location
+		{
+			get
+			{
+				return (AddressLocation) HasTagEnum(typeof(AddressLocation));
+			}
+			set
+			{
+				SetTag(value.ToString());
+			}
+		}
+
+		public bool IsPrefered
+		{
+			get { return HasTag("PREF"); }
+			set 
+			{
+				if (value == true)
+					SetTag("PREF");
+				else
+					RemoveTag("PREF");
+			}			
+		}
+
+		public string ExtraAddress
+		{
+			get { return GetTag("EXTADD"); }
+			set { SetTag("EXTADD", value); }
+		}
+
+		public string Street
+		{
+			get { return GetTag("STREET"); }
+			set { SetTag("STREET", value); }
+		}
+
+		public string Locality
+		{
+			get { return GetTag("LOCALITY"); }
+			set { SetTag("LOCALITY", value); }
+		}
+
+		public string Region
+		{
+			get { return GetTag("REGION"); }
+			set { SetTag("REGION", value); }
+		}
+
+		public string PostalCode
+		{
+			get { return GetTag("PCODE"); }
+			set { SetTag("PCODE", value); }
+		}
+
+		public string Country
+		{
+			get { return GetTag("CTRY"); }
+			set { SetTag("CTRY", value); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Email.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Email.cs
new file mode 100644
index 0000000..cbd0a32
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Email.cs
@@ -0,0 +1,107 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	//	<!-- Email address property. Default type is INTERNET. -->
+	//	<!ELEMENT EMAIL (
+	//	HOME?, 
+	//	WORK?, 
+	//	INTERNET?, 
+	//	PREF?, 
+	//	X400?, 
+	//	USERID
+	//	)>
+	public enum EmailType
+	{
+		NONE = -1,
+		HOME,
+		WORK,
+		INTERNET,
+		X400,
+	}
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Email : Element
+	{	
+		// <EMAIL><INTERNET/><PREF/><USERID>stpeter at jabber.org</USERID></EMAIL>
+		#region << Constructors >>
+		public Email()
+		{
+			this.TagName	= "EMAIL";
+			this.Namespace	= Uri.VCARD;
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="type">Type of the new Email Adress</param>
+		/// <param name="address">Email Adress</param>
+		/// <param name="prefered">Is this adressed prefered</param>
+		public Email(EmailType type, string userid, bool prefered) : this()
+		{
+			Type		= type;
+			IsPrefered	= prefered;
+			UserId		= userid;			
+		}
+		#endregion
+
+		public EmailType Type
+		{
+			get { return (EmailType) HasTagEnum(typeof(EmailType)); }
+			set 
+			{ 
+				if (value != EmailType.NONE)
+					SetTag(value.ToString()); 
+			}
+
+		}
+		/// <summary>
+		/// Is this the prefered contact adress?
+		/// </summary>
+		public bool IsPrefered
+		{
+			get { return HasTag("PREF"); }
+			set 
+			{
+				if (value == true)
+					SetTag("PREF");
+				else
+					RemoveTag("PREF");
+			}
+		}
+
+		/// <summary>
+		/// The email Adress
+		/// </summary>
+		public string UserId
+		{
+			get { return GetTag("USERID"); }
+			set { SetTag("USERID", value); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Name.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Name.cs
new file mode 100644
index 0000000..b6d7c3d
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Name.cs
@@ -0,0 +1,70 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Name : Element
+	{
+		// <N>
+		//	<FAMILY>Saint-Andre<FAMILY>
+		//	<GIVEN>Peter</GIVEN>
+		//	<MIDDLE/>
+		// </N>
+		#region << Constructors >>
+		public Name()
+		{
+			this.TagName	= "N";
+			this.Namespace	= Uri.VCARD;
+		}
+		public Name(string family, string given, string middle) : this()
+		{
+			this.Family	= family;
+			this.Given	= given;
+			this.Middle	= middle;
+		}
+		#endregion
+		
+		public string Family
+		{
+			get { return GetTag("FAMILY"); }
+			set { SetTag("FAMILY", value); }
+		}
+
+		public string Given
+		{
+			get { return GetTag("GIVEN"); }
+			set { SetTag("GIVEN", value); }
+
+		}
+		public string Middle
+		{
+			get { return GetTag("MIDDLE"); }
+			set { SetTag("MIDDLE", value); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Organization.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Organization.cs
new file mode 100644
index 0000000..478ae1f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Organization.cs
@@ -0,0 +1,65 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Organization : Element
+	{
+		// <ORG>
+		//	<ORGNAME>Jabber Software Foundation</ORGNAME>
+		//	<ORGUNIT/>
+		// </ORG>
+
+		#region << Constructors >>
+		public Organization()
+		{
+			this.TagName	= "ORG";
+			this.Namespace	= Uri.VCARD;
+		}
+		
+		public Organization(string name, string unit) : this()
+		{			
+			this.Name	= name;		
+			this.Unit	= unit;
+		}
+		#endregion
+
+		public string Name
+		{
+			get { return GetTag("ORGNAME"); }
+			set { SetTag("ORGNAME", value); }
+		}
+
+		public string Unit
+		{
+			get { return GetTag("ORGUNIT"); }
+			set { SetTag("ORGUNIT", value); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Photo.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Photo.cs
new file mode 100644
index 0000000..3fb9ed0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Photo.cs
@@ -0,0 +1,198 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+#if !CF
+using System;
+using System.IO;
+#if !SL
+using System.Drawing;
+using System.Drawing.Imaging;
+#endif
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	/// <summary>
+	/// Vcard Photo
+	/// When you dont want System.Drawing in the Lib just remove the photo stuff
+	/// </summary>
+	public class Photo : Element
+	{
+		// <!-- Photograph property. Value is either a BASE64 encoded
+		// binary value or a URI to the external content. -->
+		// <!ELEMENT PHOTO ((TYPE, BINVAL) | EXTVAL)>	
+		#region << Constructors >>
+		public Photo()
+		{
+			this.TagName	= "PHOTO";
+			this.Namespace	= Uri.VCARD;
+		}
+#if !SL
+		public Photo(Image image, ImageFormat format) : this()
+		{
+			SetImage(image, format);
+		}
+#endif	
+		public Photo(string url) : this()
+		{
+			SetImage(url);
+		}
+		#endregion
+				
+		/// <summary>
+		/// The Media Type, Only available when BINVAL
+		/// </summary>
+		public string Type
+		{
+			//<TYPE>image</TYPE>
+			get { return GetTag("TYPE"); }
+			set { SetTag("TYPE", value); }
+		}
+
+		/// <summary>
+		/// Sets the URL of an external image
+		/// </summary>
+		/// <param name="url"></param>
+		public void SetImage(string url)
+		{
+			SetTag("EXTVAL", url);
+		}
+
+        /*
+		/// <summary>
+		/// Sets a internal Image
+		/// </summary>
+		/// <param name="image"></param>
+		public void SetImage(Image image)
+		{
+			Image = image;
+		}
+        */
+
+#if !SL
+        public void SetImage(Image image, ImageFormat format)
+        {
+            // if we have no FOrmatprovider then we save the image as PNG
+            if (format == null)
+                format = ImageFormat.Png;
+
+            // 17.05.2006 
+            // fixed GDI+ bug see also http://www.bobpowell.net/imagefileconvert.htm
+            string sType = "image";
+            
+            if (format == ImageFormat.Jpeg)
+                sType = "image/jpeg";
+            else if (format == ImageFormat.Png)
+                sType = "image/png";
+            else if (format == ImageFormat.Gif)
+                sType = "image/gif";
+#if!CF_2
+            else if (format == ImageFormat.Tiff)
+                sType = "image/tiff";
+#endif
+
+            SetTag("TYPE", sType);            
+            //create temporary
+            Image temp = new Bitmap(image.Width, image.Height);            
+            //get graphics
+            Graphics g = Graphics.FromImage(temp);
+            
+            //copy image
+            // i hope this overload of DrawImage works now on all Frameworks, also CF2
+            g.DrawImage(image, new Rectangle(0, 0, temp.Width, temp.Height), new Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel);
+            //g.DrawImage(image, 0, 0, image.Width, image.Height);
+            g.Dispose();
+
+            MemoryStream ms = new MemoryStream();
+            temp.Save(ms, format);
+            byte[] buf = ms.GetBuffer();
+            SetTagBase64("BINVAL", buf);
+        }
+
+        /// <summary>
+        /// returns the image format or null for unknown formats or TYPES
+        /// </summary>
+        public ImageFormat ImageFormat
+        {
+            get
+            {
+                string sType = GetTag("TYPE");
+
+                if (sType == "image/jpeg")
+                    return ImageFormat.Jpeg;
+                else if (sType == "image/png")
+                    return ImageFormat.Png;
+                else if (sType == "image/gif")
+                    return ImageFormat.Gif;
+#if!CF_2
+                else if (sType == "image/tiff")
+                    return ImageFormat.Tiff;
+#endif
+                else
+                    return null;
+            }
+        }
+
+		/// <summary>
+		/// gets or sets the from internal (binary) or external source
+		/// When external then it trys to get the image with a Webrequest
+		/// </summary>
+		public System.Drawing.Image Image
+		{
+			get
+			{
+				try
+				{
+					if (HasTag("BINVAL"))
+					{
+						byte[] pic = Convert.FromBase64String(GetTag("BINVAL"));
+						System.IO.MemoryStream ms = new System.IO.MemoryStream(pic, 0, pic.Length);
+						return new System.Drawing.Bitmap(ms);
+					}
+					else if (HasTag("EXTVAL"))
+					{
+						System.Net.WebRequest req = System.Net.WebRequest.Create(GetTag("EXTVAL"));
+						System.Net.WebResponse response = req.GetResponse();
+						return new System.Drawing.Bitmap(response.GetResponseStream());
+					}
+					else
+						return null;
+				}
+				catch
+				{
+					return null;
+				}
+			}
+			/*
+            set
+			{
+				SetTag("TYPE", "image");
+				MemoryStream ms = new MemoryStream();
+				// Save the Image as PNG to the Memorystream
+				value.Save(ms, ImageFormat.Png);
+				byte[] buf = ms.GetBuffer();				
+				SetTagBase64("BINVAL", buf);
+			}
+            */
+		}
+#endif
+    }
+}
+#endif
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Telephone.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Telephone.cs
new file mode 100644
index 0000000..0b6add9
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Telephone.cs
@@ -0,0 +1,110 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	public enum TelephoneLocation
+	{
+		NONE = -1,
+		HOME,
+		WORK
+	}
+	
+	public enum TelephoneType
+	{		
+		NONE = -1,		
+		VOICE,
+		FAX,
+		PAGER,
+		MSG,
+		CELL,
+		VIDEO,
+		BBS,
+		MODEM,
+		ISDN,
+		PCS, 
+		PREF, 
+		NUMBER	
+	}
+
+	/// <summary>
+	/// Zusammenfassung f�r Telephone.
+	/// </summary>
+	public class Telephone : Element
+	{
+		//	<TEL><VOICE/><WORK/><NUMBER>303-308-3282</NUMBER></TEL>
+		//	<TEL><FAX/><WORK/><NUMBER/></TEL>
+		//	<TEL><MSG/><WORK/><NUMBER/></TEL>
+		
+		#region << Constructors >>
+		public Telephone()
+		{
+			this.TagName	= "TEL";
+			this.Namespace	= Uri.VCARD;			
+		}
+
+		public Telephone(TelephoneLocation loc, TelephoneType type, string number) : this()
+		{
+			if(loc != TelephoneLocation.NONE)
+				this.Location	= loc;
+			
+			if(type != TelephoneType.NONE)
+				this.Type		= type;
+			
+			this.Number		= number;
+		}
+		#endregion
+
+		public string Number
+		{
+			get { return GetTag("NUMBER"); }
+			set	{ SetTag("NUMBER", value); }
+		}
+
+		public TelephoneLocation Location
+		{
+			get
+			{
+				return (TelephoneLocation) HasTagEnum(typeof(TelephoneLocation));
+			}
+			set
+			{
+				SetTag(value.ToString());
+			}
+		}
+
+		public TelephoneType Type
+		{
+			get
+			{
+				return (TelephoneType) HasTagEnum(typeof(TelephoneType));
+			}
+			set
+			{
+				SetTag(value.ToString());
+			}
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Vcard.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Vcard.cs
new file mode 100644
index 0000000..c470b70
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/Vcard.cs
@@ -0,0 +1,391 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.IO;
+
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.iq.vcard;
+
+// JEP-0054
+// http://www.jabber.org/jeps/jep-0054.html
+
+// Example 2. Receiving One's Own vCard
+//
+//	<iq 
+//		to='stpeter at jabber.org/Gabber'
+//		type='result'
+//		id='v1'>
+//	<vCard xmlns='vcard-temp'>
+//		<FN>Peter Saint-Andre</FN>
+//		<N>
+//			<FAMILY>Saint-Andre<FAMILY>
+//			<GIVEN>Peter</GIVEN>
+//			<MIDDLE/>
+//		</N>
+//		<NICKNAME>stpeter</NICKNAME>
+//		<URL>http://www.jabber.org/people/stpeter.php</URL>
+//		<BDAY>1966-08-06</BDAY>
+//		<ORG>
+//		<ORGNAME>Jabber Software Foundation</ORGNAME>
+//		<ORGUNIT/>
+//		</ORG>
+//		<TITLE>Executive Director</TITLE>
+//		<ROLE>Patron Saint</ROLE>
+//		<TEL><VOICE/><WORK/><NUMBER>303-308-3282</NUMBER></TEL>
+//		<TEL><FAX/><WORK/><NUMBER/></TEL>
+//		<TEL><MSG/><WORK/><NUMBER/></TEL>
+//		<ADR>
+//			<WORK/>
+//			<EXTADD>Suite 600</EXTADD>
+//			<STREET>1899 Wynkoop Street</STREET>
+//			<LOCALITY>Denver</LOCALITY>
+//			<REGION>CO</REGION>
+//			<PCODE>80202</PCODE>
+//			<CTRY>USA</CTRY>
+//		</ADR>
+//		<TEL><VOICE/><HOME/><NUMBER>303-555-1212</NUMBER></TEL>
+//		<TEL><FAX/><HOME/><NUMBER/></TEL>
+//		<TEL><MSG/><HOME/><NUMBER/></TEL>
+//		<ADR>
+//			<HOME/>
+//			<EXTADD/>
+//			<STREET/>
+//			<LOCALITY>Denver</LOCALITY>
+//			<REGION>CO</REGION>
+//			<PCODE>80209</PCODE>
+//			<CTRY>USA</CTRY>
+//		</ADR>
+//		<EMAIL><INTERNET/><PREF/><USERID>stpeter at jabber.org</USERID></EMAIL>
+//		<JABBERID>stpeter at jabber.org</JABBERID>
+//		<DESC>
+//			More information about me is located on my 
+//			personal website: http://www.saint-andre.com/
+//		</DESC>		
+//		</vCard>
+//</iq>
+//    
+namespace agsXMPP.protocol.iq.vcard
+{
+	//	<!-- Telephone number property. -->
+	//	<!ELEMENT TEL (
+	//	HOME?, 
+	//	WORK?, 
+	//	VOICE?, 
+	//	FAX?, 
+	//	PAGER?, 
+	//	MSG?, 
+	//	CELL?, 
+	//	VIDEO?, 
+	//	BBS?, 
+	//	MODEM?, 
+	//	ISDN?, 
+	//	PCS?, 
+	//	PREF?, 
+	//	NUMBER
+	//	)>
+
+
+
+	/// <summary>
+	/// Summary description for Vcard.
+	/// </summary>
+	public class Vcard : Element
+	{
+		#region << Constructors >>
+		public Vcard()
+		{
+			this.TagName	= "vCard";
+			this.Namespace	= Uri.VCARD;
+		}
+		#endregion
+
+		/// <summary>
+		///
+		/// </summary>
+		public string Url
+		{
+			get { return GetTag("URL"); }
+			set { SetTag("URL", value); }
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public DateTime Birthday
+		{
+			get 
+			{ 
+				try
+				{
+                    string sDate = GetTag("BDAY");
+                    if (sDate != null)
+					    return DateTime.Parse(sDate);
+                    else
+                        return DateTime.MinValue;
+				}
+				catch
+				{
+					return DateTime.MinValue;
+				}
+			}
+			set { SetTag("BDAY", value.ToString("yyyy-MM-dd")); }            
+		}
+		
+		/// <summary>
+		/// 
+		/// </summary>
+		public string Title
+		{
+			get { return GetTag("TITLE"); }
+			set { SetTag("TITLE", value); }
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public string Role
+		{
+			get { return GetTag("ROLE"); }
+			set { SetTag("ROLE", value); }
+		}
+
+		public string Fullname
+		{
+			get { return GetTag("FN"); }
+			set { SetTag("FN", value); }
+		}
+
+		public string Nickname
+		{
+			get { return GetTag("NICKNAME"); }
+			set { SetTag("NICKNAME", value); }
+		}
+
+		public Jid JabberId
+		{
+			get
+			{
+				return new Jid(GetTag("JABBERID"));
+			}
+			set
+			{
+				SetTag("JABBERID", value.ToString());
+			}
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public string Description
+		{
+			get { return GetTag("DESC"); }
+			set { SetTag("DESC", value); }
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public Name Name
+		{
+			get { return SelectSingleElement(typeof(Name)) as Name; }
+			set 
+            {
+                Element n = SelectSingleElement(typeof(Name));
+                if (n != null)
+                    n.Remove();
+
+                AddChild(value);                
+            }
+		}
+
+#if !CF
+        /// <summary>
+        /// a Photograph
+        /// </summary>
+		public Photo Photo
+		{
+			get { return SelectSingleElement(typeof(Photo)) as Photo; }
+			set 
+            {
+                Element p = SelectSingleElement(typeof(Photo));
+                if (p != null)
+                    p.Remove();
+
+                AddChild(value);              
+            }
+		}
+#endif
+
+		/// <summary>
+		/// 
+		/// </summary>
+		public Organization Organization
+		{
+			get { return SelectSingleElement(typeof(Organization)) as Organization; }
+			set 
+            {
+                Element org = SelectSingleElement(typeof(Organization));
+                if (org != null)
+                    org.Remove();
+
+                AddChild(value);           
+            }
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Address[] GetAddresses()
+		{
+            ElementList el = SelectElements(typeof(Address));
+            int i = 0;
+            Address[] result = new Address[el.Count];
+            foreach (Address add in el)
+            {
+                result[i] = add;
+                i++;
+            }
+            return result;			
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="loc"></param>
+        /// <returns></returns>
+		public Address GetAddress(AddressLocation loc)
+		{
+			foreach (Address adr in GetAddresses())
+			{
+				if (adr.Location == loc)
+					return adr;
+			}
+			return null;
+		}
+
+
+        public void AddAddress(Address addr)
+        {
+            Address a = GetAddress(addr.Location);
+            if (a != null)
+                a.Remove();
+
+            this.AddChild(addr);
+        }
+
+		public Address GetPreferedAddress()
+		{
+			foreach (Address adr in GetAddresses())
+			{
+				if (adr.IsPrefered)
+					return adr;
+			}
+			return null;
+		}
+              
+   
+        public Telephone[] GetTelephoneNumbers()
+        {
+            ElementList el = SelectElements(typeof(Telephone));
+            int i = 0;
+            Telephone[] result = new Telephone[el.Count];
+            foreach (Telephone tel in el)
+            {
+                result[i] = tel;
+                i++;
+            }
+            return result;
+        }
+
+		public Telephone GetTelephoneNumber(TelephoneType type, TelephoneLocation loc)
+		{
+			foreach (Telephone phone in GetTelephoneNumbers())
+			{
+				if (phone.Type == type && phone.Location == loc)
+					return phone;
+			}
+			return null;
+		}
+
+		public void AddTelephoneNumber(Telephone tel)
+		{
+            Telephone t = GetTelephoneNumber(tel.Type, tel.Location);
+            if (t != null)
+                t.Remove();
+
+            this.AddChild(tel);	
+		}
+
+		/// <summary>
+		/// Adds a new Email Adress object
+		/// </summary>
+		/// <param name="mail"></param>
+		public void AddEmailAddress(Email mail)
+		{
+            Email e = GetEmailAddress(mail.Type);
+            if (e != null)
+                e.Remove();
+
+			this.AddChild(mail);
+		}
+               
+        /// <summary>
+        /// Get all Email addresses
+        /// </summary>
+        /// <returns></returns>
+        public Email[] GetEmailAddresses()
+        {
+            ElementList el = SelectElements(typeof(Email));
+            int i = 0;
+            Email[] result = new Email[el.Count];
+            foreach (Email mail in el)
+            {
+                result[i] = mail;
+                i++;
+            }
+            return result;
+        }
+
+		public Email GetEmailAddress(EmailType type)
+		{
+			foreach (Email email in GetEmailAddresses())
+			{
+				if (email.Type == type)
+					return email;
+			}
+			return null;
+		}
+
+		public Email GetPreferedEmailAddress()
+		{
+			foreach (Email email in GetEmailAddresses())
+			{
+				if (email.IsPrefered)
+					return email;
+			}
+			return null;
+		}
+	}
+	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/vcard/VcardIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/VcardIq.cs
new file mode 100644
index 0000000..a0fd5b2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/vcard/VcardIq.cs
@@ -0,0 +1,86 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.vcard
+{
+	//<iq id="id_62" to="gnauck at myjabber.net" type="get"><vCard xmlns="vcard-temp"/></iq>
+	
+	/// <summary>
+	/// Summary description for VcardIq.
+	/// </summary>
+	public class VcardIq : IQ
+	{
+		private Vcard m_Vcard = new Vcard();
+
+		#region << Constructors >>
+		public VcardIq()
+		{
+			this.GenerateId();
+			this.AddChild(m_Vcard);
+		}	
+
+		public VcardIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public VcardIq(IqType type, Vcard vcard) : this(type)
+		{			
+			this.Vcard = vcard;
+		}
+
+		public VcardIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public VcardIq(IqType type, Jid to, Vcard vcard) : this(type, to)
+		{
+			this.Vcard = vcard;
+		}
+
+		public VcardIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public VcardIq(IqType type, Jid to, Jid from, Vcard vcard) : this(type, to, from)
+		{
+			this.Vcard = vcard;
+		}
+		#endregion
+			
+		public override Vcard Vcard 
+		{
+			get 
+			{ 
+				return m_Vcard;
+			}
+			set
+			{
+				ReplaceChild(value);
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/version/Version.cs b/lib/agsxmpp/agsxmpp/protocol/iq/version/Version.cs
new file mode 100644
index 0000000..29190f6
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/version/Version.cs
@@ -0,0 +1,71 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.iq.version
+{
+	// Send:<iq type='get' id='MX_6' to='jfrankel at coversant.net/SoapBox'>
+	//			<query xmlns='jabber:iq:version'></query>
+	//		</iq>
+	//
+	// Recv:<iq from="jfrankel at coversant.net/SoapBox" id="MX_6" to="gnauck at myjabber.net/Office" type="result">
+	//			<query xmlns="jabber:iq:version">
+	//				<name>SoapBox</name>
+	//				<version>2.1.2 beta</version>
+	//				<os>Windows NT 5.1 (en-us)</os>
+	//			</query>
+	//		</iq> 
+
+
+	/// <summary>
+	/// Zusammenfassung f�r Version.
+	/// </summary>
+	public class Version : Element
+	{
+		public Version()
+		{
+			this.TagName	= "query";
+			this.Namespace	= Uri.IQ_VERSION;
+		}
+
+		public string Name
+		{
+			set	{ SetTag("name", value); }
+			get	{ return GetTag("name"); }
+		}
+
+		public string Ver
+		{
+			set	{ SetTag("version", value); }
+			get	{ return GetTag("version");	}
+		}
+
+		public string Os
+		{
+			set { SetTag("os", value); }
+			get { return GetTag("os"); }
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/iq/version/VersionIq.cs b/lib/agsxmpp/agsxmpp/protocol/iq/version/VersionIq.cs
new file mode 100644
index 0000000..58360d7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/iq/version/VersionIq.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.iq.version
+{	
+	/// <summary>
+	/// Summary description for VersionIq.
+	/// </summary>
+	public class VersionIq : IQ
+	{
+		private Version m_Version = new Version();
+
+		public VersionIq()
+		{		
+			base.Query = m_Version;
+			this.GenerateId();
+		}
+
+		public VersionIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public VersionIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public VersionIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Version Query
+		{
+			get { return m_Version;	}
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Abort.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Abort.cs
new file mode 100644
index 0000000..8a60767
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Abort.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Abort.
+	/// </summary>
+	public class Abort : Element
+	{
+		public Abort()
+		{
+			this.TagName	= "abort";
+			this.Namespace	= Uri.SASL;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Auth.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Auth.cs
new file mode 100644
index 0000000..d4d7e3f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Auth.cs
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+// <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Auth.
+	/// </summary>
+	public class Auth : Element
+	{
+		public Auth()
+		{
+			this.TagName	= "auth";
+			this.Namespace	= Uri.SASL;
+		}
+
+		public Auth(MechanismType type) : this()
+		{
+			MechanismType = type;
+		}
+
+		public Auth(MechanismType type, string text) : this(type)
+		{			
+			this.Value		= text;			
+		}
+
+
+		public MechanismType MechanismType
+		{
+			get
+			{
+				return Mechanism.GetMechanismType(GetAttribute("mechanism"));
+			}
+			set
+			{
+				SetAttribute("mechanism", Mechanism.GetMechanismName(value));
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Challenge.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Challenge.cs
new file mode 100644
index 0000000..1319923
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Challenge.cs
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using agsXMPP.Xml.Dom;
+
+//<challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//cmVhbG09InNvbWVyZWFsbSIsbm9uY2U9Ik9BNk1HOXRFUUdtMmhoIixxb3A9ImF1dGgi
+//LGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNzCg==
+//</challenge>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Challenge.
+	/// </summary>
+	public class Challenge : Element
+	{
+		public Challenge()
+		{
+			TagName	= "challenge";
+			Namespace	= Uri.SASL;
+		}		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Failure.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Failure.cs
new file mode 100644
index 0000000..e877f8c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Failure.cs
@@ -0,0 +1,87 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+// <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//		<incorrect-encoding/>
+// </failure>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Failure.
+	/// </summary>
+	public class Failure : Element
+	{
+		public Failure()
+		{
+			this.TagName	= "failure";
+			this.Namespace	= Uri.SASL;
+		}
+
+        public Failure(FailureCondition cond) : this()
+        {
+            Condition = cond;
+        }
+
+        public FailureCondition Condition
+        {
+            get
+            {
+                if (HasTag("aborted"))
+                    return FailureCondition.aborted;
+                else if (HasTag("incorrect-encoding"))
+                    return FailureCondition.incorrect_encoding;
+                else if (HasTag("invalid-authzid"))
+                    return FailureCondition.invalid_authzid;
+                else if (HasTag("invalid-mechanism"))
+                    return FailureCondition.invalid_mechanism;
+                else if (HasTag("mechanism-too-weak"))
+                    return FailureCondition.mechanism_too_weak;
+                else if (HasTag("not-authorized"))
+                    return FailureCondition.not_authorized;
+                else if (HasTag("temporary-auth-failure"))
+                    return FailureCondition.temporary_auth_failure;
+                else
+                    return FailureCondition.UnknownCondition;
+            }
+            set
+            {
+                if (value == FailureCondition.aborted)
+                    SetTag("aborted");
+                else if (value == FailureCondition.incorrect_encoding)
+                    SetTag("incorrect-encoding");
+                else if (value == FailureCondition.invalid_authzid)
+                    SetTag("invalid-authzid");
+                else if (value == FailureCondition.invalid_mechanism)
+                    SetTag("invalid-mechanism");
+                else if (value == FailureCondition.mechanism_too_weak)
+                    SetTag("mechanism-too-weak");
+                else if (value == FailureCondition.not_authorized)
+                    SetTag("not-authorized");
+                else if (value == FailureCondition.temporary_auth_failure)
+                    SetTag("temporary-auth-failure");                
+            }
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/FailureCondition.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/FailureCondition.cs
new file mode 100644
index 0000000..fd85ede
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/FailureCondition.cs
@@ -0,0 +1,45 @@
+using System;
+
+namespace agsXMPP.protocol.sasl
+{
+    public enum FailureCondition
+    {
+        
+        /// <summary>
+        /// The receiving entity acknowledges an <abort/> element sent by the initiating entity; sent in reply to the <abort/> element.
+        /// </summary>
+        aborted,
+        
+        /// <summary>
+        /// The data provided by the initiating entity could not be processed because the [BASE64] (Josefsson, S., �The Base16, Base32, and Base64 Data Encodings,� July 2003.) encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64] (Josefsson, S., �The Base16, Base32, and Base64 Data Encodings,� July 2003.)); sent in reply to a <response/> element or an <auth/> element with initial response data.
+        /// </summary>
+        incorrect_encoding,
+        
+        /// <summary>
+        /// The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a <response/> element or an <auth/> element with initial response data.
+        /// </summary>
+        invalid_authzid,
+
+        /// <summary>
+        /// The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an <auth/> element.
+        /// </summary>
+        invalid_mechanism,
+        
+        /// <summary>
+        /// The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a <response/> element or an <auth/> element with initial response data.
+        /// </summary>
+        mechanism_too_weak,
+        
+        /// <summary>
+        /// The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a <response/> element or an <auth/> element with initial response data.
+        /// </summary>
+        not_authorized,
+        
+        /// <summary>
+        /// The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an <auth/> element or <response/> element.
+        /// </summary>
+        temporary_auth_failure,
+
+        UnknownCondition
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanism.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanism.cs
new file mode 100644
index 0000000..ad4f793
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanism.cs
@@ -0,0 +1,247 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Sasl;
+using agsXMPP.Xml.Dom;
+
+//	<mechanism>DIGEST-MD5</mechanism>
+//	<mechanism>PLAIN</mechanism>
+
+//MECHANISMS           USAGE    REFERENCE   OWNER
+//----------           -----    ---------   -----
+//KERBEROS_V4          LIMITED  [RFC2222]   IESG <iesg at ietf.org>
+//GSSAPI               COMMON   [RFC2222]   IESG <iesg at ietf.org> 
+//SKEY                 OBSOLETE [RFC2444]   IESG <iesg at ietf.org>
+//EXTERNAL             COMMON   [RFC2222]   IESG <iesg at ietf.org>
+//CRAM-MD5             LIMITED  [RFC2195]   IESG <iesg at ietf.org> 
+//ANONYMOUS            COMMON   [RFC2245]   IESG <iesg at ietf.org>
+//OTP                  COMMON   [RFC2444]   IESG <iesg at ietf.org>
+//GSS-SPNEGO           LIMITED  [Leach]     Paul Leach <paulle at microsoft.com>
+//PLAIN                COMMON   [RFC2595]   IESG <iesg at ietf.org>
+//SECURID              COMMON   [RFC2808]   Magnus Nystrom <magnus at rsasecurity.com>
+//NTLM                 LIMITED  [Leach]     Paul Leach <paulle at microsoft.com>
+//NMAS_LOGIN           LIMITED  [Gayman]    Mark G. Gayman <mgayman at novell.com>
+//NMAS_AUTHEN          LIMITED  [Gayman]    Mark G. Gayman <mgayman at novell.com>
+//DIGEST-MD5           COMMON   [RFC2831]   IESG <iesg at ietf.org>
+//9798-U-RSA-SHA1-ENC  COMMON    [RFC3163]  robert.zuccherato at entrust.com
+//9798-M-RSA-SHA1-ENC  COMMON   [RFC3163]   robert.zuccherato at entrust.com
+//9798-U-DSA-SHA1      COMMON   [RFC3163]   robert.zuccherato at entrust.com
+//9798-M-DSA-SHA1      COMMON   [RFC3163]   robert.zuccherato at entrust.com
+//9798-U-ECDSA-SHA1    COMMON   [RFC3163]   robert.zuccherato at entrust.com
+//9798-M-ECDSA-SHA1    COMMON   [RFC3163]   robert.zuccherato at entrust.com
+//KERBEROS_V5          COMMON   [Josefsson] Simon Josefsson <simon at josefsson.org>
+//NMAS-SAMBA-AUTH      LIMITED  [Brimhall]  Vince Brimhall <vbrimhall at novell.com>
+
+namespace agsXMPP.protocol.sasl
+{
+	
+	public enum MechanismType 
+	{
+		NONE = 0,
+		KERBEROS_V4,
+		GSSAPI,
+		SKEY,
+		EXTERNAL,
+		CRAM_MD5,
+		ANONYMOUS,
+		OTP,
+		GSS_SPNEGO,
+		PLAIN,
+		SECURID,
+		NTLM,
+		NMAS_LOGIN,
+		NMAS_AUTHEN,
+		DIGEST_MD5,
+		ISO_9798_U_RSA_SHA1_ENC,
+		ISO_9798_M_RSA_SHA1_ENC,
+		ISO_9798_U_DSA_SHA1,
+		ISO_9798_M_DSA_SHA1,
+		ISO_9798_U_ECDSA_SHA1,
+		ISO_9798_M_ECDSA_SHA1,
+		KERBEROS_V5,
+		NMAS_SAMBA_AUTH,
+        X_GOOGLE_TOKEN,
+        SCRAM_SHA_1,
+        X_FACEBOOK_PLATFORM
+	}
+
+	/// <summary>
+	/// Summary description for Mechanism.
+	/// </summary>
+	public class Mechanism : Element
+	{
+		public Mechanism()
+		{
+			this.TagName    = "mechanism";
+            this.Namespace  = Uri.SASL;
+		}
+
+		public Mechanism(MechanismType mechanism) : this()
+		{
+			MechanismType = mechanism;
+		}
+
+		/// <summary>
+		/// SASL mechanis as enum
+		/// </summary>
+		public MechanismType MechanismType
+		{
+			get 
+			{
+                return GetMechanismType(this.Value);				                
+			}
+			set 
+			{
+                this.Value = GetMechanismName(value);		
+			}
+		}
+        
+		public static MechanismType GetMechanismType(string mechanism)
+		{
+            switch (mechanism)
+			{
+                //case "KERBEROS_V4":
+                //    return MechanismType.KERBEROS_V4;
+                case "GSSAPI":
+                    return MechanismType.GSSAPI;
+                //case "SKEY":
+                //    return MechanismType.SKEY;
+                //case "EXTERNAL":
+                //    return MechanismType.EXTERNAL;
+                //case "CRAM-MD5":
+                //    return MechanismType.CRAM_MD5;
+                //case "ANONYMOUS":
+                //    return MechanismType.ANONYMOUS;
+                //case "OTP":
+                //    return MechanismType.OTP;
+                //case "GSS-SPNEGO":
+                //    return MechanismType.GSS_SPNEGO;
+                case "PLAIN":
+                    return MechanismType.PLAIN;
+                //case "SECURID":
+                //    return MechanismType.SECURID;
+                //case "NTLM":
+                //    return MechanismType.NTLM;
+                //case "NMAS_LOGIN":
+                //    return MechanismType.NMAS_LOGIN;
+                //case "NMAS_AUTHEN":
+                //    return MechanismType.NMAS_AUTHEN;
+                case "DIGEST-MD5":
+                    return MechanismType.DIGEST_MD5;
+                //case "9798-U-RSA-SHA1-ENC":
+                //    return MechanismType.ISO_9798_U_RSA_SHA1_ENC;
+                //case "9798-M-RSA-SHA1-ENC":
+                //    return MechanismType.ISO_9798_M_RSA_SHA1_ENC;
+                //case "9798-U-DSA-SHA1":
+                //    return MechanismType.ISO_9798_U_DSA_SHA1;
+                //case "9798-M-DSA-SHA1":
+                //    return MechanismType.ISO_9798_M_DSA_SHA1;
+                //case "9798-U-ECDSA-SHA1":
+                //    return MechanismType.ISO_9798_U_ECDSA_SHA1;
+                //case "9798-M-ECDSA-SHA1":
+                //    return MechanismType.ISO_9798_M_ECDSA_SHA1;
+                //case "KERBEROS_V5":
+                //    return MechanismType.KERBEROS_V5;
+                //case "NMAS-SAMBA-AUTH":
+                //    return MechanismType.NMAS_SAMBA_AUTH;				
+                case "X-GOOGLE-TOKEN":
+                    return MechanismType.X_GOOGLE_TOKEN;
+                case "SCRAM-SHA-1":
+			        return MechanismType.SCRAM_SHA_1;
+                case "X-FACEBOOK-PLATFORM":
+			        return MechanismType.X_FACEBOOK_PLATFORM;
+                default:
+					return MechanismType.NONE;
+			}
+		}
+
+		public static string GetMechanismName(MechanismType mechanism)
+		{
+			switch (mechanism)
+			{				
+				case MechanismType.KERBEROS_V4:
+					return "KERBEROS_V4";
+				case MechanismType.GSSAPI:
+					return "GSSAPI";
+				case MechanismType.SKEY:
+					return "SKEY";
+				case MechanismType.EXTERNAL:
+					return "EXTERNAL";
+				case MechanismType.CRAM_MD5:
+					return "CRAM-MD5";
+				case MechanismType.ANONYMOUS:
+					return "ANONYMOUS";
+				case MechanismType.OTP:
+					return "OTP";
+				case MechanismType.GSS_SPNEGO:
+					return "GSS-SPNEGO";
+				case MechanismType.PLAIN:
+					return "PLAIN";
+				case MechanismType.SECURID:
+					return "SECURID";
+				case MechanismType.NTLM:
+					return "NTLM";
+				case MechanismType.NMAS_LOGIN:
+					return "NMAS_LOGIN";
+				case MechanismType.NMAS_AUTHEN:
+					return "NMAS_AUTHEN";
+				case MechanismType.DIGEST_MD5:
+					return "DIGEST-MD5";
+				case MechanismType.ISO_9798_U_RSA_SHA1_ENC:
+					return "9798-U-RSA-SHA1-ENC";
+				case MechanismType.ISO_9798_M_RSA_SHA1_ENC:
+					return "9798-M-RSA-SHA1-ENC";
+				case MechanismType.ISO_9798_U_DSA_SHA1:
+					return "9798-U-DSA-SHA1";
+				case MechanismType.ISO_9798_M_DSA_SHA1:
+					return "9798-M-DSA-SHA1";
+				case MechanismType.ISO_9798_U_ECDSA_SHA1:
+					return "9798-U-ECDSA-SHA1";
+				case MechanismType.ISO_9798_M_ECDSA_SHA1:
+					return "9798-M-ECDSA-SHA1";
+				case MechanismType.KERBEROS_V5:
+					return "KERBEROS_V5";
+				case MechanismType.NMAS_SAMBA_AUTH:
+					return "NMAS-SAMBA-AUTH";
+                case MechanismType.X_GOOGLE_TOKEN:
+                    return "X-GOOGLE-TOKEN";
+                case MechanismType.SCRAM_SHA_1:
+			        return "SCRAM-SHA-1";
+                case MechanismType.X_FACEBOOK_PLATFORM:
+			        return "X-FACEBOOK-PLATFORM";
+				default:
+					return null;
+			}
+		}
+
+        /// <summary>
+        /// Gets or sets the kerberos principal.
+        /// </summary>
+        /// <value>The kerberos proncipal.</value>
+	    public string KerberosPrincipal
+	    {
+            get { return GetAttribute("kerb:principal"); }
+            set { SetAttribute("kerb:principal", value); } 
+	    }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanisms.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanisms.cs
new file mode 100644
index 0000000..3cfb860
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Mechanisms.cs
@@ -0,0 +1,84 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml;
+using agsXMPP.Xml.Dom;
+
+//	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//		<mechanism>DIGEST-MD5</mechanism>
+//		<mechanism>PLAIN</mechanism>
+//	</mechanisms>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Mechanisms.
+	/// </summary>
+	public class Mechanisms : Element
+	{
+		public Mechanisms()
+		{
+			this.TagName	= "mechanisms";
+			this.Namespace	= Uri.SASL;
+		}
+
+		public Mechanism[] GetMechanisms()
+		{
+
+            ElementList elements = SelectElements("mechanism");			
+
+            Mechanism[] items = new Mechanism[elements.Count];
+            int i=0;
+            foreach (Element e in elements)
+            {
+                items[i] = (Mechanism) e;
+                i++;
+            }
+            return items;
+		}
+
+		public bool SupportsMechanism(MechanismType type)
+		{
+			foreach( Mechanism m in GetMechanisms())
+			{
+				if (m.MechanismType == type)
+					return true;
+			}
+			return false;
+		}
+
+        /// <summary>
+        /// Gets the given mechanism.
+        /// </summary>
+        /// <param name="type">The mechanism type.</param>
+        /// <returns></returns>
+        public Mechanism GetMechanism(MechanismType type)
+        {
+            foreach (Mechanism m in GetMechanisms())
+            {
+                if (m.MechanismType == type)
+                    return m;
+            }
+            return null;
+        }
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Response.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Response.cs
new file mode 100644
index 0000000..454866b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Response.cs
@@ -0,0 +1,58 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+//<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//dXNlcm5hbWU9InNvbWVub2RlIixyZWFsbT0ic29tZXJlYWxtIixub25jZT0i
+//T0E2TUc5dEVRR20yaGgiLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLG5jPTAw
+//MDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZXhhbXBsZS5jb20i
+//LHJlc3BvbnNlPWQzODhkYWQ5MGQ0YmJkNzYwYTE1MjMyMWYyMTQzYWY3LGNo
+//YXJzZXQ9dXRmLTgK
+//</response>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Response.
+	/// </summary>
+	public class Response : Element
+	{
+		public Response()
+		{
+			TagName	= "response";
+			Namespace	= Uri.SASL;
+		}
+
+		public Response(string text) 
+            : this()
+		{
+			TextBase64	= text;
+		}
+
+        //public Response(byte[] bytes)
+        //    : this()
+        //{
+        //    this.Value = Convert.ToBase64String(bytes);
+        //}
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/sasl/Success.cs b/lib/agsxmpp/agsxmpp/protocol/sasl/Success.cs
new file mode 100644
index 0000000..fb25374
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/sasl/Success.cs
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+// <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
+namespace agsXMPP.protocol.sasl
+{
+	/// <summary>
+	/// Summary description for Success.
+	/// </summary>
+	public class Success : Element
+	{
+		public Success()
+		{
+			this.TagName	= "success";
+			this.Namespace	= Uri.SASL;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/server/Presence.cs b/lib/agsxmpp/agsxmpp/protocol/server/Presence.cs
new file mode 100644
index 0000000..e6b89d2
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/server/Presence.cs
@@ -0,0 +1,33 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.server
+{
+    public class Presence : agsXMPP.protocol.client.Presence
+    {
+        public Presence()
+        {
+            this.Namespace = Uri.SERVER;
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/storage/Avatar.cs b/lib/agsxmpp/agsxmpp/protocol/storage/Avatar.cs
new file mode 100644
index 0000000..ad1f764
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/storage/Avatar.cs
@@ -0,0 +1,47 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.storage
+{
+
+	//	<iq id='0' type='set' to='user at server'>
+	//		<query xmlns='storage:client:avatar'>
+	//			<data mimetype='image/jpeg'>
+	//			Base64 Encoded Data
+	//			</data>
+	//		</query>
+	//	</iq>
+
+	/// <summary>
+	/// Summary description for Avatar.
+	/// </summary>
+	public class Avatar : Base.Avatar
+	{
+		public Avatar() : base()
+		{
+			this.Namespace	= Uri.STORAGE_AVATAR;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/storage/AvatarIq.cs b/lib/agsxmpp/agsxmpp/protocol/storage/AvatarIq.cs
new file mode 100644
index 0000000..fd94442
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/storage/AvatarIq.cs
@@ -0,0 +1,72 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.storage
+{
+
+	//	Once such data has been set, the avatar can be retrieved by any requesting client from the avatar-generating client's public XML storage:
+	//
+	//	Example 8.
+	//
+	//	<iq id='1' type='get' to='user at server'>
+	//		<query xmlns='storage:client:avatar'/>
+	//	</iq>  
+
+	/// <summary>
+	/// Summary description for AvatarIq.
+	/// </summary>
+	public class AvatarIq : IQ
+	{
+		private Avatar m_Avatar = new Avatar();
+
+		public AvatarIq()
+		{			
+			base.Query = m_Avatar;
+			this.GenerateId();
+		}
+
+		public AvatarIq(IqType type) : this()
+		{			
+			this.Type = type;		
+		}
+
+		public AvatarIq(IqType type, Jid to) : this(type)
+		{
+			this.To = to;
+		}
+
+		public AvatarIq(IqType type, Jid to, Jid from) : this(type, to)
+		{
+			this.From = from;
+		}
+
+		public new Avatar Query
+		{
+			get
+			{
+				return m_Avatar;
+			}
+		}		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/stream/Features.cs b/lib/agsxmpp/agsxmpp/protocol/stream/Features.cs
new file mode 100644
index 0000000..f8060dd
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/stream/Features.cs
@@ -0,0 +1,207 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.tls;
+
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.iq.bind;
+using agsXMPP.protocol.stream.feature;
+using agsXMPP.protocol.stream.feature.compression;
+using agsXMPP.protocol.extensions.caps;
+
+//</stream:features>
+// <stream:features>
+//		<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//			<mechanism>DIGEST-MD5</mechanism>
+//			<mechanism>PLAIN</mechanism>
+//		</mechanisms>
+// </stream:features>
+
+// <stream:features>
+//		<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
+//			<required/>
+//		</starttls>
+//		<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
+//			<mechanism>DIGEST-MD5</mechanism>
+//			<mechanism>PLAIN</mechanism>
+//		</mechanisms>
+// </stream:features>
+
+namespace agsXMPP.protocol.stream
+{
+	/// <summary>
+	/// Summary description for Features.
+	/// </summary>
+	public class Features : Element
+	{
+		public Features()
+		{
+			this.TagName	= "features";
+			this.Namespace	= Uri.STREAM;
+		}
+
+		public StartTls StartTls
+		{
+			get
+			{
+				return SelectSingleElement(typeof(StartTls)) as StartTls;
+			}
+			set
+			{
+				if (HasTag(typeof(StartTls)))
+					RemoveTag(typeof(StartTls));
+                
+                if (value != null)
+                    this.AddChild(value);
+			}
+		}
+		
+		public Bind Bind
+		{
+			get
+			{
+				return SelectSingleElement(typeof(Bind)) as Bind;
+			}
+			set
+			{
+				if(HasTag(typeof(Bind)))
+					RemoveTag(typeof(Bind));
+                
+                if (value != null)
+				    this.AddChild(value);
+			}
+		}
+
+        // <stream:stream from="beta.soapbox.net" xml:lang="de" id="373af7e9-6107-4729-8cea-e8b8ea05ceea" xmlns="jabber:client" version="1.0" xmlns:stream="http://etherx.jabber.org/streams">
+        
+        // <stream:features xmlns:stream="http://etherx.jabber.org/streams">
+        //      <compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression>
+        //      <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
+        //      <register xmlns="http://jabber.org/features/iq-register" />
+        //      <auth xmlns="http://jabber.org/features/iq-auth" />
+        //      <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
+        //          <mechanism>PLAIN</mechanism>
+        //          <mechanism>DIGEST-MD5</mechanism>
+        //          <mechanism>ANONYMOUS</mechanism>
+        //      </mechanisms>
+        // </stream:features>
+
+
+        public Compression Compression
+        {
+            get { return SelectSingleElement(typeof(Compression)) as Compression; }
+            set
+            {
+                if (HasTag(typeof(Compression)))
+                    RemoveTag(typeof(Compression));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public Register Register
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Register)) as Register;
+            }
+            set
+            {
+                if (HasTag(typeof(Register)))
+                    RemoveTag(typeof(Register));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+        public sasl.Mechanisms Mechanisms
+        {
+            get
+            {
+                return SelectSingleElement(typeof(sasl.Mechanisms)) as sasl.Mechanisms;
+            }
+            set
+            {
+                if (HasTag(typeof(sasl.Mechanisms)))
+                    RemoveTag(typeof(sasl.Mechanisms));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+
+		public bool SupportsBind
+		{
+			get { return Bind!=null ? true : false; }
+		}
+
+		public bool SupportsStartTls
+		{
+			get
+			{				
+				return StartTls!=null ? true : false; 
+			}
+		}
+
+        /// <summary>
+        /// Is Stream Compression supported?
+        /// </summary>
+        public bool SupportsCompression
+        {
+            get
+            {
+                return Compression != null ? true : false;
+            }
+        }
+
+        /// <summary>
+        /// Is Registration supported?
+        /// </summary>
+        public bool SupportsRegistration
+        {
+            get
+            {
+                return Register != null ? true : false;
+            }
+        }
+
+        public Capabilities Capabilities
+        {
+            get
+            {
+                return SelectSingleElement<Capabilities>();
+            }
+            set
+            {
+                RemoveTag<Capabilities>();
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/stream/feature/Register.cs b/lib/agsxmpp/agsxmpp/protocol/stream/feature/Register.cs
new file mode 100644
index 0000000..0b3ecd6
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/stream/feature/Register.cs
@@ -0,0 +1,47 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+//<stream:stream xmlns:stream='http://etherx.jabber.org/streams/'
+//xmlns='jabber:client'
+//from='somedomain'
+//version='1.0'>
+//<stream:features>
+//...
+//<register xmlns='http://jabber.org/features/iq-register'/>
+//...
+
+namespace agsXMPP.protocol.stream.feature
+{
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Register : Element
+	{
+		public Register()
+		{
+			this.TagName	= "register";
+			this.Namespace	= Uri.FEATURE_IQ_REGISTER;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Compression.cs b/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Compression.cs
new file mode 100644
index 0000000..4c1a720
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Compression.cs
@@ -0,0 +1,109 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.extensions.compression;
+
+namespace agsXMPP.protocol.stream.feature.compression
+{
+    public class Compression : Element
+    {
+        /*
+         *  <compression xmlns='http://jabber.org/features/compress'>
+         *      <method>zlib</method>
+         *  </compression>
+         * 
+         * <stream:features>
+         *      <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
+         *      <compression xmlns='http://jabber.org/features/compress'>
+         *          <method>zlib</method>
+         *          <method>lzw</method>
+         *      </compression>
+         * </stream:features>
+         */
+
+        public Compression()
+        {
+            this.TagName    = "compression";
+            this.Namespace  = Uri.FEATURE_COMPRESS;
+        }
+
+        /// <summary>
+        /// method/algorithm used to compressing the stream
+        /// </summary>
+        public CompressionMethod Method
+        {
+            set
+            {
+                if (value != CompressionMethod.Unknown)
+                    SetTag("method", value.ToString());
+            }
+            get
+            {
+                return (CompressionMethod) GetTagEnum("method", typeof(CompressionMethod));
+            }
+        }
+
+        /// <summary>
+        /// Add a compression method/algorithm
+        /// </summary>
+        /// <param name="method"></param>
+        public void AddMethod(CompressionMethod method)
+        {
+            if (!SupportsMethod(method))
+                AddChild(new Method(method));
+        }
+
+        /// <summary>
+        /// Is the given compression method/algrithm supported?
+        /// </summary>
+        /// <param name="method"></param>
+        /// <returns></returns>
+        public bool SupportsMethod(CompressionMethod method)
+        {
+            ElementList nList = SelectElements(typeof(Method));
+            foreach (Method m in nList)
+            {
+                if (m.CompressionMethod == method)
+                    return true;
+            }
+            return false;
+        }
+
+        public Method[] GetMethods()
+        {
+            ElementList methods = SelectElements(typeof(Method));
+
+            Method[] items = new Method[methods.Count];
+            int i = 0;
+            foreach (Method m in methods)
+            {
+                items[i] = m;
+                i++;
+            }
+            return items;
+        }
+      
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Method.cs b/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Method.cs
new file mode 100644
index 0000000..1a7d773
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/stream/feature/compression/Method.cs
@@ -0,0 +1,72 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.extensions.compression;
+
+namespace agsXMPP.protocol.stream.feature.compression
+{
+    public class Method : Element
+    {
+        /*
+         *  <compression xmlns='http://jabber.org/features/compress'>
+         *      <method>zlib</method>
+         *  </compression>
+         * 
+         * <stream:features>
+         *      <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
+         *      <compression xmlns='http://jabber.org/features/compress'>
+         *          <method>zlib</method>
+         *          <method>lzw</method>
+         *      </compression>
+         * </stream:features>
+         */
+        #region << Constructors >>
+        public Method()
+        {
+            this.TagName    = "method";
+            this.Namespace  = Uri.FEATURE_COMPRESS;
+        }
+
+        public Method(CompressionMethod method) : this()
+        {
+            this.Value      = method.ToString();
+        }
+        #endregion
+
+        public CompressionMethod CompressionMethod
+        {
+            get
+            {
+#if CF
+				return (CompressionMethod) util.Enum.Parse(typeof(CompressionMethod), this.Value, true);
+#else
+                return (CompressionMethod) Enum.Parse(typeof(CompressionMethod), this.Value, true);
+#endif
+            }
+            set { this.Value = value.ToString(); }
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/tls/Failure.cs b/lib/agsxmpp/agsxmpp/protocol/tls/Failure.cs
new file mode 100644
index 0000000..a2d64e0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/tls/Failure.cs
@@ -0,0 +1,44 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.tls
+{
+	// Step 5 (alt): Server informs client that TLS negotiation has failed and closes both stream and TCP connection:
+
+	// <failure xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
+	// </stream:stream>
+
+	/// <summary>
+	/// Summary description for Failure.
+	/// </summary>
+	public class Failure : Element
+	{
+		public Failure()
+		{
+			this.TagName	= "failure";
+			this.Namespace	= Uri.TLS;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/tls/Proceed.cs b/lib/agsxmpp/agsxmpp/protocol/tls/Proceed.cs
new file mode 100644
index 0000000..e32fe85
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/tls/Proceed.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.tls
+{
+	// Step 5: Server informs client that it is allowed to proceed:
+	// <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
+
+	/// <summary>
+	/// Summary description for Proceed.
+	/// </summary>
+	public class Proceed : Element
+	{
+		public Proceed()
+		{
+			this.TagName	= "proceed";
+			this.Namespace	= Uri.TLS;
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/tls/StartTls.cs b/lib/agsxmpp/agsxmpp/protocol/tls/StartTls.cs
new file mode 100644
index 0000000..1eb4c0b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/tls/StartTls.cs
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.tls
+{
+
+	// Step 4: Client sends the STARTTLS command to server:
+	// <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
+
+	/// <summary>
+	/// Summary description for starttls.
+	/// </summary>
+	public class StartTls : Element
+	{
+		public StartTls()
+		{
+			this.TagName	= "starttls";
+			this.Namespace	= Uri.TLS;
+		}
+
+		public bool Required
+		{
+			get
+			{
+				return HasTag("required");
+			}
+			set
+			{
+				if (value == false)
+				{
+					if (HasTag("required"))
+						RemoveTag("required");
+				}
+				else
+				{
+					if (!HasTag("required"))
+						SetTag("required");
+				}
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/Avatar.cs b/lib/agsxmpp/agsxmpp/protocol/x/Avatar.cs
new file mode 100644
index 0000000..5496557
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/Avatar.cs
@@ -0,0 +1,59 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x
+{
+	
+	// <x xmlns="jabber:x:avatar"><hash>bbf231f2b7fa1772c2ec5cffa620d3aedb4bd793</hash></x>
+
+	/// <summary>
+	/// JEP-0008 avatars
+	/// </summary>
+	public class Avatar : Element
+	{
+		public Avatar()
+		{
+			this.TagName	= "x";
+			this.Namespace	= Uri.X_AVATAR;
+		}
+
+        public Avatar(string hash) : this()
+        {
+            Hash = hash;
+        }
+
+		public string Hash
+		{
+			get
+			{
+				return GetTag("hash");
+			}
+			set
+			{
+				SetTag("hash", value);
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/Conference.cs b/lib/agsxmpp/agsxmpp/protocol/x/Conference.cs
new file mode 100644
index 0000000..7b98ba7
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/Conference.cs
@@ -0,0 +1,60 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x
+{
+	/*
+	<message from='crone1 at shakespeare.lit/desktop' to='hecate at shakespeare.lit'>
+		<body>You have been invited to darkcave at macbeth.</body>
+		<x jid='room at service' xmlns='jabber:x:conference'/>
+	</message>
+	*/
+
+	/// <summary>
+	/// is used for inviting somebody to a chatroom
+	/// </summary>
+	public class Conference : Element
+	{
+		public Conference()
+		{
+			this.TagName	= "x";
+			this.Namespace	= Uri.X_CONFERENCE;
+		}
+
+		public Conference(Jid room) : this()
+		{
+			Chatroom = room;
+		}
+
+		/// <summary>
+		/// Room Jid
+		/// </summary>
+		public Jid Chatroom
+		{
+			get { return new Jid(GetAttribute("jid")); }
+			set { SetAttribute("jid", value.ToString()); }
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/Delay.cs b/lib/agsxmpp/agsxmpp/protocol/x/Delay.cs
new file mode 100644
index 0000000..0b56629
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/Delay.cs
@@ -0,0 +1,76 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x
+{
+	// <presence to="gnauck at myjabber.net/myJabber v3.5" from="yahoo.myjabber.net/registered">
+	//		<status>Extended Away</status>
+	//		<show>xa</show><priority>5</priority>
+	//		<x stamp="20050206T13:09:50" from="gnauck at myjabber.net/myJabber v3.5" xmlns="jabber:x:delay"/>    
+	// </presence> 
+
+	/// <summary>
+    /// <para>
+	/// Delay class for Timestamps
+    /// </para>
+    /// <para>
+    /// Mainly used in offline and groupchat messages. This is the time when the message was received by the server
+    /// </para>
+	/// </summary>
+	public class Delay : Element
+	{
+		public Delay()
+		{
+			this.TagName	= "x";
+			this.Namespace	= Uri.X_DELAY;
+		}
+
+		public Jid From
+		{
+			get
+			{
+				if (HasAttribute("from"))
+					return new Jid(GetAttribute("from"));
+				else
+					return null;
+			}
+			set
+			{
+				SetAttribute("from", value.ToString());
+			}
+		}
+
+		public DateTime Stamp
+		{
+			get
+			{
+				return Util.Time.Date(GetAttribute("stamp"));
+			}
+			set
+			{
+				SetAttribute("stamp", Util.Time.Date(value));
+			}
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/Event.cs b/lib/agsxmpp/agsxmpp/protocol/x/Event.cs
new file mode 100644
index 0000000..b990770
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/Event.cs
@@ -0,0 +1,123 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x
+{
+    /// <summary>
+    /// JEP-0022: Message Events
+    /// This JEP defines protocol extensions used to request and respond to events relating to the delivery, display, and composition of messages.
+    /// </summary>
+    public class Event : Element
+    {
+        public Event()
+        {
+            this.TagName    = "x";
+            this.Namespace  = Uri.X_EVENT;
+        }
+
+        /// <summary>
+        /// Indicates that the message has been stored offline by the intended recipient's server.
+        /// This event is triggered only if the intended recipient's server supports offline storage, 
+        /// has that support enabled, and the recipient is offline when the server receives the message for delivery.
+        /// </summary>
+        public bool Offline
+        {
+            get { return HasTag("offline"); }
+            set 
+            {
+                RemoveTag("offline");
+                if (value)
+                    AddTag("offline");
+            }
+            
+        }
+
+        /// <summary>
+        /// Indicates that the message has been delivered to the recipient. 
+        /// This signifies that the message has reached the recipient's Jabber client, 
+        /// but does not necessarily mean that the message has been displayed. 
+        /// This event is to be raised by the Jabber client.
+        /// </summary>
+        public bool Delivered
+        {
+            get { return HasTag("delivered"); }
+            set 
+            {
+                RemoveTag("delivered");
+                if (value)
+                    AddTag("delivered");
+            }
+            
+        }
+        
+        /// <summary>
+        /// Once the message has been received by the recipient's Jabber client, 
+        /// it may be displayed to the user. 
+        /// This event indicates that the message has been displayed, and is to be raised by the Jabber client.
+        /// Even if a message is displayed multiple times, this event should be raised only once.
+        /// </summary>
+        public bool Displayed
+        {
+            get { return HasTag("displayed"); }
+            set 
+            {
+                RemoveTag("displayed");
+                if (value)
+                    AddTag("displayed");
+            }
+            
+        }
+        
+        /// <summary>
+        /// In threaded chat conversations, this indicates that the recipient is composing a reply to a message.
+        /// The event is to be raised by the recipient's Jabber client. 
+        /// A Jabber client is allowed to raise this event multiple times in response to the same request, 
+        /// providing the original event is cancelled first.
+        /// </summary>
+        public bool Composing
+        {
+            get { return HasTag("composing"); }
+            set 
+            {
+                RemoveTag("composing");
+                if (value)
+                    AddTag("composing");
+            }
+            
+        }
+
+        /// <summary>
+        /// 'id' attribute of the original message to which this event notification pertains.
+        /// (If no 'id' attribute was included in the original message, then the id tag must still be included with no 
+        /// </summary>
+        public string Id
+        {
+            get { return GetTag("id"); }
+            set { SetTag("id", value); }
+        }
+
+   
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Data.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Data.cs
new file mode 100644
index 0000000..550d4cd
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Data.cs
@@ -0,0 +1,167 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+
+	/// <summary>
+	/// Form Types
+	/// </summary>
+	public enum XDataFormType
+	{
+		/// <summary>
+		/// The forms-processing entity is asking the forms-submitting entity to complete a form.
+		/// </summary>
+		form,
+		/// <summary>
+		/// The forms-submitting entity is submitting data to the forms-processing entity.
+		/// </summary>
+		submit,
+		/// <summary>
+		/// The forms-submitting entity has cancelled submission of data to the forms-processing entity.
+		/// </summary>
+		cancel,
+		/// <summary>
+		/// The forms-processing entity is returning data (e.g., search results) to the forms-submitting entity, or the data is a generic data set.
+		/// </summary>
+		result    
+	}
+
+	/// <summary>
+	/// Summary for Data.
+	/// </summary>
+	public class Data : FieldContainer
+	{
+		/*
+		The base syntax for the 'jabber:x:data' namespace is as follows (a formal description can be found in the XML Schema section below):
+		
+		<x xmlns='jabber:x:data'
+		type='{form-type}'>
+		<title/>
+		<instructions/>
+		<field var='field-name'
+				type='{field-type}'
+				label='description'>
+			<desc/>
+			<required/>
+			<value>field-value</value>
+			<option label='option-label'><value>option-value</value></option>
+			<option label='option-label'><value>option-value</value></option>
+		</field>
+		</x>
+		
+		*/
+			
+		#region << Constructors >>
+		public Data()
+		{
+			this.TagName	= "x";
+			this.Namespace	= Uri.X_DATA;			
+		}
+
+		public Data(XDataFormType type) : this()
+		{
+			this.Type = type;
+		}
+		#endregion
+
+		#region << Properties >>
+		public string Title
+		{
+			get { return GetTag("title"); }
+			set { SetTag("title", value); }
+		}
+
+		public string Instructions
+		{
+			get { return GetTag("instructions"); }
+			set { SetTag("instructions", value); }
+		}
+
+		/// <summary>
+		/// Type of thie XDATA Form.
+		/// </summary>
+		public XDataFormType Type
+		{
+			get 
+			{ 
+				return (XDataFormType) GetAttributeEnum("type", typeof(XDataFormType)); 
+			}
+			set { SetAttribute("type", value.ToString());}
+		}
+
+        public Reported Reported
+        {
+            get { return SelectSingleElement(typeof(Reported)) as Reported; }
+            set 
+            {
+                RemoveTag(typeof(Reported));
+                AddChild(value);
+            }
+        }
+
+		#endregion
+
+        #region << public Methods >>
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Item AddItem()
+        {
+            Item i = new Item();
+            AddChild(i);
+            return i;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="item"></param>
+        /// <returns></returns>
+        public Item AddItem(Item item)
+        {
+            AddChild(item);
+            return item;
+        }
+
+        /// <summary>
+        /// Gets a list of all form fields
+        /// </summary>
+        /// <returns></returns>
+        public Item[] GetItems()
+        {
+            ElementList nl = SelectElements(typeof(Item));
+            Item[] items = new Item[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                items[i] = (Item) e;
+                i++;
+            }
+            return items;
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Field.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Field.cs
new file mode 100644
index 0000000..b47f0bf
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Field.cs
@@ -0,0 +1,340 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+
+	/*
+	 * <x xmlns='jabber:x:data'
+		type='{form-type}'>
+		<title/>
+		<instructions/>
+		<field var='field-name'
+				type='{field-type}'
+				label='description'>
+			<desc/>
+			<required/>
+			<value>field-value</value>
+			<option label='option-label'><value>option-value</value></option>
+			<option label='option-label'><value>option-value</value></option>
+		</field>
+		</x>
+	*/
+
+	/// <summary>
+	/// 
+	/// </summary>
+	public class Field : Element
+	{
+		public Field()
+		{
+			this.TagName	= "field";
+			this.Namespace	= Uri.X_DATA;		
+		}
+		
+		public Field(FieldType type) : this()
+		{
+			this.Type = type;			
+		}
+
+		public Field(string var, string label, FieldType type) : this()
+		{
+			this.Type	= type;
+			this.Var	= var;
+			this.Label	= label;
+		}
+
+		#region << Properties >>
+		public string Var
+		{
+			get { return GetAttribute("var"); }
+			set { SetAttribute("var", value); }			
+		}
+
+		public string Label
+		{
+			get { return GetAttribute("label"); }
+			set { SetAttribute("label", value); }
+		}
+
+		public FieldType Type
+		{
+			get
+			{
+				switch (GetAttribute("type"))
+				{
+					case "boolean":
+						return FieldType.Boolean;
+					case "fixed":
+						return FieldType.Fixed;
+					case "hidden":
+						return FieldType.Hidden;
+					case "jid-multi":
+						return FieldType.Jid_Multi;
+					case "jid-single":
+						return FieldType.Jid_Single;
+					case "list-multi":
+						return FieldType.List_Multi;
+					case "list-single":
+						return FieldType.List_Single;
+					case "text-multi":
+						return FieldType.Text_Multi;
+					case "text-private":
+						return FieldType.Text_Private;
+					case "text-single":
+						return FieldType.Text_Single;
+					default:
+						return FieldType.Unknown;
+				}
+			}
+			
+			set
+			{
+				switch (value)
+				{					
+					case FieldType.Boolean:
+						SetAttribute("type", "boolean");
+						break;
+					case FieldType.Fixed:
+						SetAttribute("type", "fixed");
+						break;
+					case FieldType.Hidden:
+						SetAttribute("type", "hidden");
+						break;
+					case FieldType.Jid_Multi:
+						SetAttribute("type", "jid-multi");
+						break;
+					case FieldType.Jid_Single:
+						SetAttribute("type", "jid-single");
+						break;
+					case FieldType.List_Multi:
+						SetAttribute("type", "list-multi");
+						break;
+					case FieldType.List_Single:
+						SetAttribute("type", "list-single");
+						break;
+					case FieldType.Text_Multi:
+						SetAttribute("type", "text-multi");
+						break;
+					case FieldType.Text_Private:
+						SetAttribute("type", "text-private");
+						break;
+					case FieldType.Text_Single:
+						SetAttribute("type", "text-single");
+						break;
+					default:
+						RemoveAttribute("type");
+						break;
+				}
+
+			}
+		}
+
+		
+		public string Description
+		{
+			get { return GetTag("desc"); }
+			set { SetTag("desc", value); }
+		}
+
+		/// <summary>
+		/// Is this field a required field?
+		/// </summary>
+		public bool IsRequired
+		{
+			get	{ return HasTag("required"); }
+			set
+			{
+				if (value == true)
+					SetTag("required");
+				else
+					RemoveTag("required");
+			}
+		}		
+		#endregion
+
+		#region << Methods and Functions >>
+		/// <summary>
+		/// The value of the field.
+		/// </summary>
+		public string GetValue()
+		{
+			return GetTag(typeof(Value));
+			//return GetTag("value");			
+		}
+
+		public bool HasValue(string val)
+		{
+			foreach(string s in GetValues())
+			{
+				if(s == val)
+					return true;
+			}
+			return false;
+		}
+
+		/// <summary>
+		/// 
+		/// </summary>
+		/// <param name="val"></param>
+		/// <returns></returns>
+		public void SetValue(string val)
+		{
+			SetTag(typeof(Value), val);
+		}
+
+		/// <summary>
+		/// Set the value of boolean fields
+		/// </summary>
+		/// <param name="val"></param>
+		public void SetValueBool(bool val)
+		{			
+			SetValue( val ? "1" : "0" );			
+		}
+		
+		/// <summary>
+		/// Get the value of boolean fields
+		/// </summary>
+		/// <returns></returns>
+		public bool GetValueBool()
+		{
+			// only "0" and "1" are valid. We dont care about other buggy implementations
+			string val = GetValue();
+			if (val == null || val == "0")
+				return false;
+			else
+				return true;				
+		}
+
+		/// <summary>
+		/// Returns the value as Jif for the Jid fields. 
+		/// Or null when the value is not a valid Jid.
+		/// </summary>
+		/// <returns></returns>
+		public Jid GetValueJid()
+		{
+			try
+			{
+				return new Jid(GetValue());
+			}
+			catch
+			{
+				return null;
+			}			
+		}
+
+		/// <summary>
+		/// Adds a value
+		/// </summary>
+		/// <remarks>
+		/// you can call this function multiple times to add values to "multi" fields
+		/// </remarks> 
+		/// <param name="val"></param>
+		public void AddValue(string val)
+		{
+			AddChild(new Value(val));
+			//AddTag("value", val);
+		}		
+		
+		/// <summary>
+		/// Adds multiple values to the already existing values from a string array
+		/// </summary>
+		/// <param name="vals"></param>
+		public void AddValues(string[] vals)
+		{
+            if (vals.Length > 0)
+            {
+                foreach (string s in vals)
+                    AddValue(s);
+            }
+		}
+
+		/// <summary>
+		/// Adds multiple values. All already existing values will be removed
+		/// </summary>
+		/// <param name="vals"></param>
+		public void SetValues(string[] vals)
+		{
+            ElementList nl = SelectElements(typeof(Value));
+			
+			foreach(Element e in nl)
+				e.Remove();
+
+			AddValues(vals);
+		}
+
+		/// <summary>
+		/// Gets all values for multi fields as Array
+		/// </summary>
+		/// <returns>string Array that contains all the values</returns>
+		public string[] GetValues()
+		{
+            ElementList nl = SelectElements(typeof(Value));
+			string[] values = new string[nl.Count];
+			int i = 0;
+			foreach (Element val in nl)
+			{
+				values[i] = val.Value;
+				i++;
+			}
+			return values;
+		}
+
+		public Option AddOption(string label, string val)
+		{
+			Option opt = new Option(label, val);
+			AddChild(opt);
+			return opt;
+		}
+
+		public Option AddOption()
+		{
+			Option opt = new Option();
+			AddChild(opt);
+			return opt;
+		}
+
+		public void AddOption(Option opt)
+		{			
+			AddChild(opt);
+		}
+
+		public Option[] GetOptions()
+		{
+            ElementList nl = SelectElements(typeof(Option));
+			int i = 0;
+			Option[] result = new Option[nl.Count];
+			foreach (Option o in nl)
+			{		
+				result[i] = o;				
+				i++;
+			}
+			return result;
+		}
+		#endregion
+
+	}
+	
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/FieldContainer.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/FieldContainer.cs
new file mode 100644
index 0000000..0674e14
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/FieldContainer.cs
@@ -0,0 +1,98 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+    /// <summary>
+    /// Bass class for all xdata classes that contain xData fields
+    /// </summary>
+    public abstract class FieldContainer : Element
+    {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="FieldContainer"/> class.
+        /// </summary>
+        public FieldContainer()
+        {
+        }
+
+        #region << public Methods >>
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Field AddField()
+        {
+            Field f = new Field();
+            AddChild(f);
+            return f;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="field"></param>
+        public Field AddField(Field field)
+        {
+            AddChild(field);
+            return field;            
+        }
+
+        /// <summary>
+        /// Retrieve a field with the given "var"
+        /// </summary>
+        /// <param name="var"></param>
+        /// <returns></returns>
+        public Field GetField(string var)
+        {
+           ElementList nl = SelectElements(typeof(Field));
+           foreach (Element e in nl)
+           {
+               Field f = e as Field;
+               if (f.Var == var)
+                   return f;
+           }
+           return null;
+        }
+
+        /// <summary>
+        /// Gets a list of all form fields
+        /// </summary>
+        /// <returns></returns>
+        public Field[] GetFields()
+        {
+            ElementList nl = SelectElements(typeof(Field));
+            Field[] fields = new Field[nl.Count];
+            int i = 0;
+            foreach (Element e in nl)
+            {
+                fields[i] = (Field)e;
+                i++;
+            }
+            return fields;
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/FieldTypes.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/FieldTypes.cs
new file mode 100644
index 0000000..a32005b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/FieldTypes.cs
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.x.data
+{
+	/// <summary>
+	/// Field Types
+	/// </summary>
+	public enum FieldType
+	{
+		/// <summary>
+		/// a unknown fieldtype
+		/// </summary>
+		Unknown,
+
+		/// <summary>
+		/// The field enables an entity to gather or provide an either-or choice between two options. The allowable values are 1 for yes/true/assent and 0 for no/false/decline. The default value is 0.
+		/// </summary>
+		Boolean,
+		
+		/// <summary>
+		/// The field is intended for data description (e.g., human-readable text such as "section" headers) rather than data gathering or provision. The <value/> child SHOULD NOT contain newlines (the \n and \r characters); instead an application SHOULD generate multiple fixed fields, each with one <value/> child.
+		/// </summary>
+		Fixed,
+		
+		/// <summary>
+		///	The field is not shown to the entity providing information, but instead is returned with the form.
+		///	</summary>
+		Hidden,
+		
+		/// <summary>
+		/// The field enables an entity to gather or provide multiple Jabber IDs.
+		/// </summary>
+		Jid_Multi,
+				
+		/// <summary>
+		/// The field enables an entity to gather or provide a single Jabber ID.	
+		/// </summary>
+		Jid_Single,
+
+		/// <summary>
+		/// The field enables an entity to gather or provide one or more options from among many.
+		/// </summary>
+		List_Multi,
+		
+		/// <summary>
+		/// The field enables an entity to gather or provide one option from among many.
+		/// </summary>
+		List_Single,
+		
+		/// <summary>
+		/// The field enables an entity to gather or provide multiple lines of text.
+		/// </summary>
+		Text_Multi,
+
+		/// <summary>
+		/// password style textbox.
+		/// The field enables an entity to gather or provide a single line or word of text, which shall be obscured in an interface (e.g., *****).
+		/// </summary>		
+		Text_Private,
+
+		/// <summary>
+		/// The field enables an entity to gather or provide a single line or word of text, which may be shown in an interface. This field type is the default and MUST be assumed if an entity receives a field type it does not understand.
+		/// </summary>
+		Text_Single		
+	}
+
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Item.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Item.cs
new file mode 100644
index 0000000..61a1c69
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Item.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.x.data
+{
+    /// <summary>
+    /// Used in XData seach.
+    /// includes the headers of the search results
+    /// </summary>
+    public class Item : FieldContainer
+    {
+       
+        #region << Constructors >>
+        public Item()
+        {
+            this.TagName    = "item";
+            this.Namespace  = Uri.X_DATA;
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Option.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Option.cs
new file mode 100644
index 0000000..0c6686b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Option.cs
@@ -0,0 +1,99 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+	/*
+	<x xmlns='jabber:x:data'
+		type='{form-type}'>
+		<title/>
+		<instructions/>
+		<field var='field-name'
+				type='{field-type}'
+				label='description'>
+			<desc/>
+			<required/>
+			<value>field-value</value>
+			<option label='option-label'><value>option-value</value></option>
+			<option label='option-label'><value>option-value</value></option>
+		</field>
+	</x>
+	
+	
+	<xs:element name='option'>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref='value'/>
+      </xs:sequence>
+      <xs:attribute name='label' type='xs:string' use='optional'/>
+    </xs:complexType>
+	</xs:element>
+	*/
+
+	/// <summary>
+	/// Field Option.
+	/// </summary>
+	public class Option : Element
+	{
+		#region << Constructors >>
+		public Option()
+		{
+			this.TagName	= "option";
+			this.Namespace	= Uri.X_DATA;
+		}
+
+		public Option(string label, string val) : this()
+		{
+			Label		= label;
+			SetValue(val);
+		}
+		#endregion
+
+		#region << Properties >>
+		/// <summary>
+		/// Label of the option
+		/// </summary>
+		public string Label
+		{
+			get { return GetAttribute("label"); }
+			set { SetAttribute("label", value); }
+		}	
+		#endregion
+
+
+		/// <summary>
+		/// Value of the Option
+		/// </summary>
+		public string GetValue()
+		{	
+			return GetTag(typeof(Value));			
+		}
+
+		public void SetValue(string val)
+		{	
+			SetTag(typeof(Value), val);
+		}			
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Reported.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Reported.cs
new file mode 100644
index 0000000..085d963
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Reported.cs
@@ -0,0 +1,43 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+    /// <summary>
+    /// Used in XData seach reports.
+    /// includes the headers of the search results
+    /// </summary>
+    public class Reported : FieldContainer
+    {
+        #region << Constructors >>
+        public Reported()
+        {
+            this.TagName    = "reported";
+            this.Namespace  = Uri.X_DATA;            
+        }
+        #endregion       
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/data/Value.cs b/lib/agsxmpp/agsxmpp/protocol/x/data/Value.cs
new file mode 100644
index 0000000..a3a276e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/data/Value.cs
@@ -0,0 +1,50 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.data
+{
+	/// <summary>
+	/// Summary description for Value.
+	/// </summary>
+	public class Value : Element
+	{
+		public Value()
+		{
+			this.TagName	= "value";
+			this.Namespace	= Uri.X_DATA;
+		}
+
+		public Value(string val) : this()
+		{
+            Value = val;			
+		}
+
+		public Value(bool val) : this()
+		{
+			Value = val ? "1" : "0";
+		}
+		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Actor.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Actor.cs
new file mode 100644
index 0000000..dbc9d70
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Actor.cs
@@ -0,0 +1,43 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+
+namespace agsXMPP.protocol.x.muc
+{
+    public class Actor : Element
+    {
+        public Actor()
+        {
+            this.TagName    = "actor";
+            this.Namespace  = Uri.MUC_USER;
+        }
+
+        public Jid Jid
+        {
+            get { return GetAttributeJid("jid"); }
+            set { SetAttribute("jid", value); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Affiliation.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Affiliation.cs
new file mode 100644
index 0000000..56d160f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Affiliation.cs
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.x.muc
+{
+	/// <summary>
+	/// There are five defined affiliations that a user may have in relation to a room
+	/// </summary>
+	public enum Affiliation
+	{
+		/// <summary>
+		/// the absence of an affiliation
+		/// </summary>
+		none,
+		owner,
+		admin,
+		member,
+		outcast
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Decline.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Decline.cs
new file mode 100644
index 0000000..7866591
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Decline.cs
@@ -0,0 +1,83 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+    Example 45. Invitee Declines Invitation
+
+    <message
+        from='hecate at shakespeare.lit/broom'
+        to='darkcave at macbeth.shakespeare.lit'>
+      <x xmlns='http://jabber.org/protocol/muc#user'>
+        <decline to='crone1 at shakespeare.lit'>
+          <reason>
+            Sorry, I'm too busy right now.
+          </reason>
+        </decline>
+      </x>
+    </message>
+        
+
+    Example 46. Room Informs Invitor that Invitation Was Declined
+
+    <message
+        from='darkcave at macbeth.shakespeare.lit'
+        to='crone1 at shakespeare.lit/desktop'>
+      <x xmlns='http://jabber.org/protocol/muc#user'>
+        <decline from='hecate at shakespeare.lit'>
+          <reason>
+            Sorry, I'm too busy right now.
+          </reason>
+        </decline>
+      </x>
+    </message>
+    */
+     
+    public class Decline : Invitation
+    {
+        #region << Constructors >>
+        public Decline() : base()
+        {
+            this.TagName    = "decline";            
+        }
+        
+        public Decline(string reason) : this()
+        {
+            this.Reason = reason;
+        }
+
+        public Decline(Jid to) : this()
+        {
+            this.To = to;
+        }
+
+        public Decline(Jid to, string reason): this()
+        {            
+            this.To     = to;
+            this.Reason = reason;
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Destroy.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Destroy.cs
new file mode 100644
index 0000000..f8d5455
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Destroy.cs
@@ -0,0 +1,105 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2008 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+     
+        <iq from='crone1 at shakespeare.lit/desktop'
+            id='begone'
+            to='heath at macbeth.shakespeare.lit'
+            type='set'>
+          <query xmlns='http://jabber.org/protocol/muc#owner'>
+            <destroy jid='darkcave at macbeth.shakespeare.lit'>
+              <reason>Macbeth doth come.</reason>
+            </destroy>
+          </query>
+        </iq>
+     
+     */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Destroy : Element
+    {
+        #region << Constructor >>
+        public Destroy()
+        {
+            this.TagName = "destroy";
+            this.Namespace = Uri.MUC_OWNER;
+        }
+
+        public Destroy(string reason) : this()
+        {
+            Reason = reason;
+        }
+
+        public Destroy(Jid altVenue) : this()
+        {
+            AlternateVenue = altVenue;
+        }
+
+        public Destroy(string reason, Jid altVenue) : this()
+        {
+            Reason = reason;
+            AlternateVenue = altVenue;
+        }
+        #endregion                     
+
+        
+        /// <summary>
+        /// Pptional attribute for a alternate venue
+        /// </summary>
+        public Jid AlternateVenue
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+            }
+        }
+        
+        public string Reason
+        {
+            set { SetTag("reason", value); }
+            get { return GetTag("reason"); }
+        }
+
+        public string Password
+        {
+            set { SetTag("password", value); }
+            get { return GetTag("password"); }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/History.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/History.cs
new file mode 100644
index 0000000..7cafff0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/History.cs
@@ -0,0 +1,138 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+        Example 29. User Requests Limit on Number of Messages in History
+
+        <presence
+            from='hag66 at shakespeare.lit/pda'
+            to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+          <x xmlns='http://jabber.org/protocol/muc'>
+            <history maxstanzas='20'/>
+          </x>
+        </presence>
+              
+
+        Example 30. User Requests History in Last 3 Minutes
+
+        <presence
+            from='hag66 at shakespeare.lit/pda'
+            to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+          <x xmlns='http://jabber.org/protocol/muc'>
+            <history seconds='180'/>
+          </x>
+        </presence>
+              
+
+        Example 31. User Requests All History Since the Beginning of the Unix Era
+
+        <presence
+            from='hag66 at shakespeare.lit/pda'
+            to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+          <x xmlns='http://jabber.org/protocol/muc'>
+            <history since='1970-01-01T00:00Z'/>
+          </x>
+        </presence>
+    */
+
+    /// <summary>
+    /// This is used to get the history of a muc room
+    /// </summary>
+    public class History : Element
+    {
+        #region << Constructors >>
+        /// <summary>
+        /// Empty default constructor
+        /// </summary>
+        public History()
+        {
+            this.TagName    = "history";
+            this.Namespace  = Uri.MUC;
+        }
+
+        /// <summary>
+        /// get the history starting from a given date when available
+        /// </summary>
+        /// <param name="date"></param>
+        public History(DateTime date) : this()
+        {
+            this.Since = date;
+        }
+
+        /// <summary>
+        /// Specify the maximum nunber of messages to retrieve from the history
+        /// </summary>
+        /// <param name="max"></param>
+        public History(int max) : this()
+        {
+            this.MaxStanzas = max;
+        }
+        #endregion
+
+
+        /// <summary>
+        /// request the last xxx seconds of history when available
+        /// </summary>
+        public int Seconds
+        {
+            get { return GetAttributeInt("seconds"); }
+            set { SetAttribute("seconds", value); }
+        }
+
+        /// <summary>
+        /// Request maximum stanzas of history when available
+        /// </summary>
+        public int MaxStanzas
+        {
+            get { return GetAttributeInt("maxstanzas"); }
+            set { SetAttribute("maxstanzas", value); }
+        }
+
+        /// <summary>
+        /// Request history from a given date when available
+        /// </summary>
+        public DateTime Since
+        {
+            get { return Util.Time.ISO_8601Date(GetAttribute("since")); }
+            set { SetAttribute("since", Util.Time.ISO_8601Date(value)); }
+        }
+
+        /// <summary>
+        /// Limit the total number of characters in the history to "X" 
+        /// (where the character count is the characters of the complete XML stanzas, 
+        /// not only their XML character data).
+        /// </summary>
+        public int MaxCharacters
+        {
+            get { return GetAttributeInt("maxchars"); }
+            set { SetAttribute("maxchars", value); }
+        }
+    }
+
+}
+
+
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Invitation.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Invitation.cs
new file mode 100644
index 0000000..19ac02e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Invitation.cs
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /// <summary>
+    /// A base class vor Decline and Invite
+    /// We need From, To and SwitchDirection here. This is why we inherit from XmppPacket Base
+    /// </summary>
+    public abstract class Invitation : Base.Stanza
+    {
+        public Invitation()
+        {
+            this.Namespace = Uri.MUC_USER;
+        }
+        
+        /// <summary>
+        /// A reason why you want to invite this contact
+        /// </summary>
+        public string Reason
+        {
+            set { SetTag("reason", value); }
+            get { return GetTag("reason"); }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Invite.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Invite.cs
new file mode 100644
index 0000000..43d6270
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Invite.cs
@@ -0,0 +1,115 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+using agsXMPP.protocol.extensions.nickname;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+    <message
+        from='crone1 at shakespeare.lit/desktop'
+        to='darkcave at macbeth.shakespeare.lit'>
+      <x xmlns='http://jabber.org/protocol/muc#user'>
+        <invite to='hecate at shakespeare.lit'>
+          <reason>
+            Hey Hecate, this is the place for all good witches!
+          </reason>
+        </invite>
+      </x>
+    </message>
+    */
+
+    /// <summary>
+    /// Invite other users t a chatroom
+    /// </summary>
+    public class Invite : Invitation
+    {
+        #region << Constructors >>
+        public Invite() : base()
+        {
+            this.TagName    = "invite";            
+        }
+        
+        public Invite(string reason) : this()
+        {
+            this.Reason = reason;
+        }
+
+        public Invite(Jid to) : this()
+        {
+            this.To = to;
+        }
+
+        public Invite(Jid to, string reason): this()
+        {            
+            this.To     = to;
+            this.Reason = reason;
+        }
+        #endregion
+
+        /*
+            <invite to='wiccarocks at shakespeare.lit/laptop'>
+                <reason>This coven needs both wiccarocks and hag66.</reason>
+                <continue/>
+            </invite>
+         */
+ 
+        public bool Continue
+        {
+            get
+            {
+                return GetTag("continue") == null ? false : true;
+            }
+            set
+            {
+                if (value)
+                    SetTag("continue");
+                else
+                    RemoveTag("continue");
+            }
+        }
+
+        /// <summary>
+        /// Nickname Element
+        /// </summary>
+        public Nickname Nickname
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Nickname)) as Nickname;
+            }
+            set
+            {
+                if (HasTag(typeof(Nickname)))
+                    RemoveTag(typeof(Nickname));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+        
+
+    }
+
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Item.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Item.cs
new file mode 100644
index 0000000..5dd650c
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Item.cs
@@ -0,0 +1,153 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+	/// <summary>
+	/// Summary description for Item.
+	/// </summary>
+	public class Item : agsXMPP.protocol.Base.Item
+	{
+        /*
+        <x xmlns='http://jabber.org/protocol/muc#user'>
+             <item affiliation='admin' role='moderator'/>
+        </x>
+         
+        <item nick='pistol' role='none'>
+            <reason>Avaunt, you cullion!</reason>
+        </item>
+        
+        <presence
+                from='darkcave at macbeth.shakespeare.lit/thirdwitch'
+                to='crone1 at shakespeare.lit/desktop'>
+                <x xmlns='http://jabber.org/protocol/muc#user'>
+                    <item   affiliation='none'
+                            jid='hag66 at shakespeare.lit/pda'
+                            role='participant'/>
+                </x>
+        </presence>
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+		public Item() : base()
+		{			
+            this.TagName    = "item";
+			this.Namespace  = Uri.MUC_USER;
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        public Item(Affiliation affiliation) : this()
+        {
+            this.Affiliation = affiliation;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="role"></param>
+        public Item(Role role) : this()
+        {
+            this.Role = role;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        public Item(Affiliation affiliation, Role role) : this(affiliation)
+        {
+            this.Role = role;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        /// <param name="reason"></param>
+        public Item(Affiliation affiliation, Role role, string reason) : this(affiliation, role)
+        {
+            this.Reason = reason;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+		public Role Role
+		{
+			get { return (Role) GetAttributeEnum("role", typeof(Role)); }
+			set { SetAttribute("role", value.ToString()); }
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+		public Affiliation Affiliation
+		{
+			get { return (Affiliation) GetAttributeEnum("affiliation", typeof(Affiliation)); }
+			set { SetAttribute("affiliation", value.ToString()); }
+		}
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public string Nickname
+        {
+            get { return GetAttribute("nick"); }
+            set { SetAttribute("nick", value); }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public string Reason
+        {
+            set { SetTag("reason", value); }
+            get { return GetTag("reason"); }
+        }
+
+        public Actor Actor
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Actor)) as Actor;
+            }
+            set
+            {
+                if (HasTag(typeof(Actor)))
+                    RemoveTag(typeof(Actor));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Muc.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Muc.cs
new file mode 100644
index 0000000..a626b42
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Muc.cs
@@ -0,0 +1,74 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+     
+        <x xmlns='http://jabber.org/protocol/muc'>
+            <password>secret</password>
+        </x>
+     
+     */
+      
+    /// <summary>
+    /// Summary description for MucUser.
+    /// </summary>
+    public class Muc : Element
+    {
+        #region << Constructor >>
+        public Muc()
+        {
+            this.TagName    = "x";
+            this.Namespace  = Uri.MUC;
+        }
+        #endregion
+
+        public string Password
+		{
+			set	{ SetTag("password", value); }
+			get { return GetTag("password"); }
+		}
+
+        /// <summary>
+        /// The History object
+        /// </summary>
+        public History History
+        {
+            get
+            {
+                return SelectSingleElement(typeof(History)) as History;
+            }
+            set
+            {
+                if (HasTag(typeof(History)))
+                    RemoveTag(typeof(History));
+
+                if (value != null)
+                    this.AddChild(value);
+            }
+        }
+    }
+}  
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/MucManager.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/MucManager.cs
new file mode 100644
index 0000000..e25db72
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/MucManager.cs
@@ -0,0 +1,1718 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+using System;
+using System.Text;
+
+using agsXMPP.protocol.client;
+
+using agsXMPP.protocol.x.muc;
+using agsXMPP.protocol.x.muc.iq;
+using agsXMPP.protocol.x.muc.iq.admin;
+using agsXMPP.protocol.x.muc.iq.owner;
+
+using agsXMPP.protocol.x.data;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /// <summary>
+    /// A helper class for Multi User Chat
+    /// </summary>
+    public class MucManager
+    {
+        private XmppClientConnection	m_connection	= null;
+
+        public MucManager(XmppClientConnection con)
+        {
+            m_connection = con;
+        }
+
+
+        #region << Invite >>
+        /*
+        <message
+            from='crone1 at shakespeare.lit/desktop'
+            to='darkcave at macbeth.shakespeare.lit'>
+          <x xmlns='http://jabber.org/protocol/muc#user'>
+            <invite to='hecate at shakespeare.lit'>
+              <reason>
+                Hey Hecate, this is the place for all good witches!
+              </reason>
+            </invite>
+          </x>
+        </message>
+        */
+
+        /// <summary>
+        /// Invite a contact to join a chatroom
+        /// </summary>
+        /// <param name="to">The Jid of the contact to invite</param>
+        /// <param name="room">The Jid of the chatroom</param>
+        public void Invite(Jid to, Jid room)
+        {
+            Invite(to, room, null);
+        }
+
+        /// <summary>
+        /// Invite a contact to join a chatroom
+        /// </summary>
+        /// <param name="to">The Jid of the contact to invite</param>
+        /// <param name="room">The Jid of the chatroom</param>
+        /// <param name="reason">The reason.</param>
+        public void Invite(Jid to, Jid room, string reason)
+        {
+            Invite(to, room, reason, null);
+        }
+        
+        /// <summary>
+        /// Invite a contact to join a chatroom
+        /// </summary>
+        /// <param name="to">The Jid of the contact to invite</param>
+        /// <param name="room">The Jid of the chatroom</param>
+        /// <param name="reason">The reason.</param>
+        /// <param name="password">The password required to enter the room.</param>
+        public void Invite(Jid to, Jid room, string reason, string password)
+        {
+            Invite(new Jid[1] { to }, room, reason, password);
+        }
+
+        /// <summary>
+        /// Invite multiple contacts to a chatroom
+        /// </summary>
+        /// <param name="jids"></param>
+        /// <param name="room"></param>
+        /// <param name="reason"></param>
+        public void Invite(Jid[] jids, Jid room, string reason, string password)
+        {
+            Message msg = new Message();
+            msg.To = room;
+
+            User user = new User();
+            foreach (Jid jid in jids)
+            {
+                if (reason != null)
+                    user.AddChild(new Invite(jid, reason));
+                else
+                    user.AddChild(new Invite(jid));
+            }           
+
+            if (password != null) {
+                user.Password = password;
+            }
+
+            msg.AddChild(user);
+
+            m_connection.Send(msg);
+        }
+        #endregion
+
+
+        #region << Decline Invite >>
+        /// <summary>
+        /// Decline a groupchat invitation
+        /// </summary>
+        /// <param name="to">the jid which invited us</param>
+        /// <param name="room">to room to which we send the decline (this is normally the same room we were invited to)</param>
+        public void Decline(Jid to, Jid room)
+        {
+            Decline(to, room, null);
+        }
+
+        /// <summary>
+        /// Decline a groupchat invitation
+        /// </summary>
+        /// <param name="to">the jid which invited us</param>
+        /// <param name="room">to room to which we send the decline (this is normally the same room we were invited to)</param>
+        /// <param name="reason">reason why we decline the invitation</param>
+        public void Decline(Jid to, Jid room, string reason)
+        {
+            Message msg = new Message();
+            msg.To = room;
+
+            User user = new User();
+            if (reason != null)
+                user.Decline = new Decline(to, reason);
+            else
+                user.Decline = new Decline(to);
+
+            msg.AddChild(user);
+
+            m_connection.Send(msg);
+        }
+        #endregion
+
+        /*
+            <message
+                from='darkcave at macbeth.shakespeare.lit/secondwitch'
+                to='crone1 at shakespeare.lit/desktop'
+                type='groupchat'>
+              <subject>Fire Burn and Cauldron Bubble!</subject>
+            </message>
+        */
+        /// <summary>
+        /// Change the subject of a room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="newSubject"></param>
+        public void ChangeSubject(Jid room, string newSubject)
+        {
+            ChangeSubject(room, newSubject, null);
+        }
+
+        /// <summary>
+        /// Change the subject of a room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="newSubject"></param>
+        /// <param name="body"></param>
+        public void ChangeSubject(Jid room, string newSubject, string body)
+        {
+            Message msg = new Message();
+            msg.Type = MessageType.groupchat;
+            msg.To = room;
+            msg.Subject = newSubject;
+            
+            if (body != null)
+                msg.Body = body;
+
+            m_connection.Send(msg);
+        }
+
+        /// <summary>
+        /// Change the Nickname in a room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="newNick"></param>
+        public void ChangeNickname(Jid room, string newNick)
+        {
+            Jid to = new Jid(room.ToString());
+            to.Resource = newNick;            
+
+            Presence pres = new Presence();
+            pres.To = to;
+
+            m_connection.Send(pres);
+        }
+
+        /*
+            <presence
+                from='hag66 at shakespeare.lit/pda'
+                to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+              <x xmlns='http://jabber.org/protocol/muc'/>
+            </presence>
+         */
+        /// <summary>
+        /// Join a chatroom
+        /// </summary>
+        /// <param name="room">jid of the room to join</param>
+        /// <param name="nickname">nickname to use in the room</param>
+        public void JoinRoom(Jid room, string nickname)
+        {
+            JoinRoom(room, nickname, null, false);            
+        }
+
+        /// <summary>
+        /// Join a chatroom
+        /// </summary>
+        /// <param name="room">jid of the room to join</param>
+        /// <param name="nickname">nickname to use in the room</param>
+        /// <param name="disableHistory">true for joining without chat room history</param>
+        public void JoinRoom(Jid room, string nickname, bool disableHistory)
+        {
+            JoinRoom(room, nickname, null, disableHistory);
+        }
+
+        public void JoinRoom(Jid room, string nickname, string password)
+        {
+            JoinRoom(room, nickname, password, false);
+        }
+
+        /// <summary>
+        /// Join a chatroom
+        /// </summary>
+        /// <param name="room">jid of the room to join</param>
+        /// <param name="nickname">nickname to use in the room</param>
+        /// <param name="password">password for password protected chat rooms</param>
+        /// <param name="disableHistory">true for joining without chat room history</param>
+        public void JoinRoom(Jid room, string nickname, string password, bool disableHistory)
+        {
+            /*
+            <presence
+                from='hag66 at shakespeare.lit/pda'
+                to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+              <x xmlns='http://jabber.org/protocol/muc'>
+                <password>cauldron</password>
+              </x>
+            </presence>
+
+            join room and request no history
+            <presence
+                from='hag66 at shakespeare.lit/pda'
+                to='darkcave at macbeth.shakespeare.lit/thirdwitch'>
+              <x xmlns='http://jabber.org/protocol/muc'>
+                <history maxchars='0'/>
+              </x>
+            </presence>
+            */
+            
+            Jid to = new Jid(room.ToString());
+            to.Resource = nickname;           
+
+            Presence pres = new Presence();
+            pres.To = to;
+            Muc x = new Muc();
+            if (password != null)
+                x.Password = password;
+
+            if (disableHistory)
+            {
+                History hist = new History();
+                hist.MaxCharacters = 0;
+                x.History = hist;
+            }
+            
+            pres.AddChild(x);
+
+            m_connection.Send(pres);
+        }
+
+        
+        /// <summary>
+        /// Leave a conference room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        public void LeaveRoom(Jid room, string nickname)
+        {
+            Jid to = new Jid(room.ToString());
+            to.Resource = nickname;            
+
+            Presence pres = new Presence();
+            pres.To = to;
+            pres.Type = PresenceType.unavailable;
+
+            m_connection.Send(pres);
+        }
+        
+        /*
+            9.1.2 Creating an Instant Room
+
+            If the initial room owner wants to accept the default room configuration (i.e., create an "instant room"), the room owner MUST decline an initial configuration form by sending an IQ set to the <room at service> itself containing a <query/> element qualified by the 'http://jabber.org/protocol/muc#owner' namespace, where the only child of the <query/> is an empty <x/> element that is qualified by the 'jabber:x:data' namespace and that possesses a 'type' attribute whose value is "s [...]
+
+            Example 129. Owner Requests Instant Room
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='create1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#owner'>
+                <x xmlns='jabber:x:data' type='submit'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// create an "instant room". This means you accept the default configuration and dont want to configure the room.
+        /// </summary>
+        /// <param name="room"></param>
+        public void AcceptDefaultConfiguration(Jid room)
+        {
+            AcceptDefaultConfiguration(room, null, null);
+        }
+
+        /// <summary>
+        /// create an "instant room". This means you accept the default configuration and dont want to configure the room.
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        public void AcceptDefaultConfiguration(Jid room, IqCB cb)
+        {
+            AcceptDefaultConfiguration(room, cb, null);
+        }
+
+        /// <summary>
+        /// create an "instant room". This means you accept the default configuration and dont want to configure the room.
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void AcceptDefaultConfiguration(Jid room, IqCB cb, object cbArgs)
+        {
+            OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq(IqType.set, room);
+            oIq.Query.AddChild(new Data(XDataFormType.submit));
+            
+            if (cb == null)
+                m_connection.Send(oIq);
+            else
+                m_connection.IqGrabber.SendIq(oIq, cb, cbArgs);
+        }
+        
+        /*
+            
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='create1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#owner'/>
+            </iq>
+      
+         */
+
+        /// <summary>
+        /// Request the configuration form of a chatroom.
+        /// You can request the from when creating a new room. or at any time later if you want to change the room configuration.
+        /// Only room owners can request this from. Otherwise the service must return a 403 forbidden error
+        /// </summary>
+        /// <param name="room"></param>
+        public void RequestConfigurationForm(Jid room)
+        {
+            RequestConfigurationForm(room, null, null);
+        }
+
+        /// <summary>
+        /// Request the configuration form of a chatroom.
+        /// You can request the from when creating a new room. or at any time later if you want to change the room configuration.
+        /// Only room owners can request this from. Otherwise the service must return a 403 forbidden error
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        public void RequestConfigurationForm(Jid room, IqCB cb)
+        {
+            RequestConfigurationForm(room, cb, null);
+        }
+
+        /// <summary>
+        /// Request the configuration form of a chatroom.
+        /// You can request the from when creating a new room. or at any time later if you want to change the room configuration.
+        /// Only room owners can request this from. Otherwise the service must return a 403 forbidden error
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArgs"></param>
+        public void RequestConfigurationForm(Jid room, IqCB cb, object cbArgs)
+        {
+            OwnerIq oIq = new agsXMPP.protocol.x.muc.iq.owner.OwnerIq(IqType.get, room);          
+
+            m_connection.IqGrabber.SendIq(oIq, cb, cbArgs);
+        }
+
+        /*
+            <iq from='fluellen at shakespeare.lit/pda'
+                id='kick1'
+                to='harfleur at henryv.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item nick='pistol' role='none'>
+                  <reason>Avaunt, you cullion!</reason>
+                </item>
+              </query>
+            </iq>
+         */
+
+        /// <summary>
+        /// Kick a occupant
+        /// A moderator has permissions kick a visitor or participant from a room.
+        /// The kick is normally performed based on the occupant's room nickname (though it MAY be based on the full JID)
+        /// and is completed by setting the role of a participant or visitor to a value of "none".
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname">Nickname od the occupant to kick</param>
+        public void KickOccupant(Jid room, string nickname)
+        {
+            KickOccupant(room, nickname, null, null, null);
+        }
+
+        /// <summary>
+        /// Kick a occupant
+        /// A moderator has permissions kick a visitor or participant from a room.
+        /// The kick is normally performed based on the occupant's room nickname (though it MAY be based on the full JID)
+        /// and is completed by setting the role of a participant or visitor to a value of "none".
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname">Nickname od the occupant to kick</param>
+        /// <param name="reason">A optional reason why you kick this occupant</param>
+        public void KickOccupant(Jid room, string nickname, string reason)
+        {
+            KickOccupant(room, nickname, reason, null, null);
+        }
+
+
+        /// <summary>
+        /// Kick a occupant
+        /// A moderator has permissions kick a visitor or participant from a room.
+        /// The kick is normally performed based on the occupant's room nickname (though it MAY be based on the full JID)
+        /// and is completed by setting the role of a participant or visitor to a value of "none".
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname">Nickname od the occupant to kick</param>
+        /// <param name="reason">A optional reason why you kick this occupant</param>
+        /// <param name="cb">Callback which is invoked with the result to this iq</param>        
+        public void KickOccupant(Jid room, string nickname, string reason, IqCB cb)
+        {
+            KickOccupant(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// Kick a occupant
+        /// A moderator has permissions kick a visitor or participant from a room.
+        /// The kick is normally performed based on the occupant's room nickname (though it MAY be based on the full JID)
+        /// and is completed by setting the role of a participant or visitor to a value of "none".
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname">Nickname od the occupant to kick</param>
+        /// <param name="reason">A optional reason why you kick this occupant</param>
+        /// <param name="cb">Callback which is invoked with the result to this iq</param>
+        /// <param name="cbArg">Callback which is invoked with the result to this iq</param>
+        public void KickOccupant(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeRole(Role.none, room, nickname, reason, cb, cbArg);            
+        }
+
+        /*
+            Example 77. Moderator Grants Voice to a Visitor
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='voice1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item nick='thirdwitch'
+                      role='participant'>
+                  <reason>A worthy witch indeed!</reason>
+                </item>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        public void GrantVoice(Jid room, string nickname)
+        {
+            GrantVoice(room, nickname, null, null, null);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        public void GrantVoice(Jid room, string nickname, string reason)
+        {
+            GrantVoice(room, nickname, reason, null, null);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>        
+        public void GrantVoice(Jid room, string nickname, string reason, IqCB cb)
+        {
+            GrantVoice(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantVoice(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeRole(Role.participant, room, nickname, reason, cb, cbArg);            
+        }
+
+        /*
+            Example 80. Moderator Revokes Voice from a Participant
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='voice2'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item nick='thirdwitch'
+                      role='visitor'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// In a moderated room, a moderator may want to revoke a participant's privileges to speak.
+        /// The moderator can revoke voice from a participant by changing the participant's role to "visitor":
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        public void RevokeVoice(Jid room, string nickname)
+        {
+            RevokeVoice(room, nickname, null, null, null);
+        }
+
+        /// <summary>
+        /// In a moderated room, a moderator may want to revoke a participant's privileges to speak.
+        /// The moderator can revoke voice from a participant by changing the participant's role to "visitor":
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        public void RevokeVoice(Jid room, string nickname, string reason)
+        {
+            RevokeVoice(room, nickname, reason, null, null);
+        }
+
+        /// <summary>
+        /// In a moderated room, a moderator may want to revoke a participant's privileges to speak.
+        /// The moderator can revoke voice from a participant by changing the participant's role to "visitor":
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void RevokeVoice(Jid room, string nickname, string reason, IqCB cb)
+        {
+            RevokeVoice(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// In a moderated room, a moderator may want to revoke a participant's privileges to speak.
+        /// The moderator can revoke voice from a participant by changing the participant's role to "visitor":
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RevokeVoice(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeRole(Role.visitor, room, nickname, reason, cb, cbArg);
+        }        
+
+        /*
+            A moderator in a moderated room may want to modify the voice list. To do so, the moderator first requests the voice list by querying the room for all occupants with a role of 'participant'.
+
+            Example 84. Moderator Requests Voice List
+
+            <iq from='bard at shakespeare.lit/globe'
+                id='voice3'
+                to='goodfolk at chat.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item role='participant'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// A moderator in a moderated room may want to modify the voice list. 
+        /// To do so, the moderator first requests the voice list by querying the room for all occupants 
+        /// with a role of 'participant'.
+        /// The service MUST then return the voice list to the moderator; each item MUST include 
+        /// the 'nick' and 'role' attributes and SHOULD include the 'affiliation' and 'jid' attributes.
+        /// The moderator MAY then modify the voice list. In order to do so, the moderator MUST send the 
+        /// changed items (i.e., only the "delta") back to the service; each item MUST include 
+        /// the 'nick' attribute and 'role' attribute (normally set to a value of "participant" or "visitor") 
+        /// but SHOULD NOT include the 'jid' attribute and MUST NOT include the 'affiliation' attribute 
+        /// (which is used to manage affiliations such as owner rather than the participant role),
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        public void RequestVoiceList(Jid room)
+        {
+            RequestVoiceList(room, null, null);
+        }        
+        
+        /// <summary>
+        /// A moderator in a moderated room may want to modify the voice list. 
+        /// To do so, the moderator first requests the voice list by querying the room for all occupants 
+        /// with a role of 'participant'.
+        /// The service MUST then return the voice list to the moderator; each item MUST include 
+        /// the 'nick' and 'role' attributes and SHOULD include the 'affiliation' and 'jid' attributes.
+        /// The moderator MAY then modify the voice list. In order to do so, the moderator MUST send the 
+        /// changed items (i.e., only the "delta") back to the service; each item MUST include 
+        /// the 'nick' attribute and 'role' attribute (normally set to a value of "participant" or "visitor") 
+        /// but SHOULD NOT include the 'jid' attribute and MUST NOT include the 'affiliation' attribute 
+        /// (which is used to manage affiliations such as owner rather than the participant role),        
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="cb"></param>
+        public void RequestVoiceList(Jid room, IqCB cb)
+        {
+            RequestVoiceList(room, cb, null);
+        }
+
+        /// <summary>
+        /// A moderator in a moderated room may want to modify the voice list. 
+        /// To do so, the moderator first requests the voice list by querying the room for all occupants 
+        /// with a role of 'participant'.
+        /// The service MUST then return the voice list to the moderator; each item MUST include 
+        /// the 'nick' and 'role' attributes and SHOULD include the 'affiliation' and 'jid' attributes.
+        /// The moderator MAY then modify the voice list. In order to do so, the moderator MUST send the 
+        /// changed items (i.e., only the "delta") back to the service; each item MUST include 
+        /// the 'nick' attribute and 'role' attribute (normally set to a value of "participant" or "visitor") 
+        /// but SHOULD NOT include the 'jid' attribute and MUST NOT include the 'affiliation' attribute 
+        /// (which is used to manage affiliations such as owner rather than the participant role),        
+        /// </summary>
+        /// <param name="room">Jid of the room to which this iq is sent</param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RequestVoiceList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Role.participant, room, cb, cbArg);            
+        }
+
+        /*
+         Example 89. Admin Bans User
+
+        <iq from='kinghenryv at shakespeare.lit/throne'
+            id='ban1'
+            to='southampton at henryv.shakespeare.lit'
+            type='set'>
+          <query xmlns='http://jabber.org/protocol/muc#admin'>
+            <item affiliation='outcast'
+                  jid='earlofcambridge at shakespeare.lit'>
+              <reason>Treason</reason>
+            </item>
+          </query>
+        </iq>
+        */
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        public void BanUser(Jid room, Jid user)
+        {
+            BanUser(room, user, null, null, null);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        public void BanUser(Jid room, Jid user, string reason)
+        {
+            BanUser(room, user, reason, null, null);
+        }
+
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void BanUser(Jid room, Jid user, string reason, IqCB cb)
+        {
+            BanUser(room, user, reason, cb, null);
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void BanUser(Jid room, Jid user, string reason, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.outcast, room, user, null, reason, cb, cbArg);            
+        }
+
+        /*
+            A room admin may want to modify the ban list. Note: The ban list is always based on a user's bare JID, although a nick (perhaps the last room nickname associated with that JID) MAY be included for convenience. To modify the list of banned JIDs, the admin first requests the ban list by querying the room for all users with an affiliation of 'outcast'.
+
+            Example 94. Admin Requests Ban List
+
+            <iq from='kinghenryv at shakespeare.lit/throne'
+                id='ban2'
+                to='southampton at henryv.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='outcast'/>
+              </query>
+            </iq>
+    
+         */
+
+        /// <summary>
+        /// A room admin may want to modify the ban list. 
+        /// <remarks>
+        /// Note: The ban list is always based on a user's bare JID, 
+        /// although a nick (perhaps the last room nickname associated with that JID) MAY be included for convenience. 
+        /// To modify the list of banned JIDs, the admin first requests the ban list by querying the room for all 
+        /// users with an affiliation of 'outcast'.
+        /// </remarks>
+        /// </summary>
+        /// <param name="room"></param>
+        public void RequestBanList(Jid room)
+        {
+            RequestBanList(room, null, null);
+        }        
+
+        /// <summary>
+        /// A room admin may want to modify the ban list. 
+        /// <remarks>
+        /// Note: The ban list is always based on a user's bare JID, 
+        /// although a nick (perhaps the last room nickname associated with that JID) MAY be included for convenience. 
+        /// To modify the list of banned JIDs, the admin first requests the ban list by querying the room for all 
+        /// users with an affiliation of 'outcast'.
+        /// </remarks>
+        /// </summary>
+        /// <param name="room"></param>        
+        /// <param name="cb"></param>
+        public void RequestBanList(Jid room, IqCB cb)
+        {
+            RequestBanList(room, cb, null);
+        }
+
+        /// <summary>
+        /// A room admin may want to modify the ban list. 
+        /// <remarks>
+        /// Note: The ban list is always based on a user's bare JID, 
+        /// although a nick (perhaps the last room nickname associated with that JID) MAY be included for convenience. 
+        /// To modify the list of banned JIDs, the admin first requests the ban list by querying the room for all 
+        /// users with an affiliation of 'outcast'.
+        /// </remarks>
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RequestBanList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Affiliation.outcast, room, cb, cbArg);
+        }
+
+
+        /*
+            An owner can grant administrative privileges to a member or unaffiliated user; this is done by changing the user's affiliation to "admin":
+
+            Example 155. Owner Grants Admin Privileges
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='admin1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='admin'
+                      jid='wiccarocks at shakespeare.lit'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// Grant administrative privileges to a member or unaffiliated user.
+        /// This could be done by an room owner
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        public void GrantAdminPrivileges(Jid room, Jid user)
+        {
+            GrantAdminPrivileges(room, user, null, null);
+        }
+
+        /// <summary>
+        /// Grant administrative privileges to a member or unaffiliated user.
+        /// This could be done by an room owner
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="cb"></param>
+        public void GrantAdminPrivileges(Jid room, Jid user, IqCB cb)
+        {
+            GrantAdminPrivileges(room, user, cb, null);
+        }
+
+        /// <summary>
+        /// Grant administrative privileges to a member or unaffiliated user.
+        /// This could be done by an room owner
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantAdminPrivileges(Jid room, Jid user, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.admin, room, user, cb, cbArg);
+        }
+
+
+        /*
+            An admin can grant membership to a user; 
+            this is done by changing the user's affiliation to "member" 
+            (normally based on nick if the user is in the room, or on bare JID if not; 
+            in either case, if the nick is provided, that nick becomes the user's default nick in the room
+            if that functionality is supported by the implementation)
+
+            Example 98. Admin Grants Membership
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='member1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='member'
+                      jid='hag66 at shakespeare.lit'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        public void GrantMembership(Jid room, Jid user)
+        {
+            GrantMembership(room, user, null, null, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        public void GrantMembership(Jid room, Jid user, string reason)
+        {
+            GrantMembership(room, user, reason, null, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void GrantMembership(Jid room, Jid user, string reason, IqCB cb)
+        {
+            GrantMembership(room, user, reason, cb, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantMembership(Jid room, Jid user, string reason, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.member, room, user, null, reason, cb, cbArg);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        public void GrantMembership(Jid room, string nickname)
+        {
+            GrantMembership(room, nickname, null, null, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        public void GrantMembership(Jid room, string nickname, string reason)
+        {
+            GrantMembership(room, nickname, reason, null, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void GrantMembership(Jid room, string nickname, string reason, IqCB cb)
+        {
+            GrantMembership(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// An admin can grant membership to a user; 
+        /// this is done by changing the user's affiliation to "member" 
+        /// (normally based on nick if the user is in the room, or on bare JID if not; 
+        /// in either case, if the nick is provided, that nick becomes the user's default nick in the room
+        /// if that functionality is supported by the implementation)
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantMembership(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.member, room, nickname, reason, cb, cbArg);
+        }
+
+
+        /*
+            Example 144. Owner Grants Ownership Privileges
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='owner1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='owner'
+                      jid='hecate at shakespeare.lit'/>
+              </query>
+            </iq>                
+         */
+
+        /// <summary>
+        /// If allowed by an implementation, an owner MAY grant ownership privileges to another user.        
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        public void GrantOwnershipPrivileges(Jid room, Jid user)
+        {
+            ChangeAffiliation(Affiliation.owner, room, user, null, null);
+        }
+
+        /// <summary>
+        /// If allowed by an implementation, an owner MAY grant ownership privileges to another user.        
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="cb"></param>
+        public void GrantOwnershipPrivileges(Jid room, Jid user, IqCB cb)
+        {
+            ChangeAffiliation(Affiliation.owner, room, user, cb, null);
+        }
+
+        /// <summary>
+        /// If allowed by an implementation, an owner MAY grant ownership privileges to another user.        
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="user"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantOwnershipPrivileges(Jid room, Jid user, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.owner, room, user, cb, cbArg);
+        }
+
+        /*
+            8.4 Revoking Membership
+
+            An admin may want to revoke a user's membership; this is done by changing the user's affiliation to "none":
+
+            Example 101. Admin Revokes Membership
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='member2'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='none'
+                      nick='thirdwitch'/>
+              </query>
+            </iq>
+        */
+
+        /// <summary>
+        /// An admin may want to revoke a user's membership
+        /// this is done by changing the user's affiliation to "none"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        public void RevokeMembership(Jid room, string nickname)
+        {
+            RevokeMembership(room, nickname, null, null);
+        }
+
+        /// <summary>
+        /// An admin may want to revoke a user's membership
+        /// this is done by changing the user's affiliation to "none"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        public void RevokeMembership(Jid room, string nickname, string reason)
+        {
+            RevokeMembership(room, nickname, reason, null, null);
+        }
+
+        /// <summary>
+        /// An admin may want to revoke a user's membership
+        /// this is done by changing the user's affiliation to "none"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void RevokeMembership(Jid room, string nickname, string reason, IqCB cb)
+        {
+            RevokeMembership(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// An admin may want to revoke a user's membership
+        /// this is done by changing the user's affiliation to "none"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RevokeMembership(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeAffiliation(Affiliation.none, room, nickname, reason, cb, cbArg);  
+        }
+
+
+        /*
+            9.8 Modifying the Admin List
+
+            A room owner may want to modify the admin list. 
+            To do so, the owner first requests the admin list by querying the room for all users with an affiliation of 'admin'.
+
+            Example 161. Owner Requests Admin List
+
+            <iq from='bard at shakespeare.lit/desktopaffiliation
+                id='admin3'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='admin'/>
+              </query>
+            </iq>
+    
+        */
+
+        /// <summary>
+        /// Request the list of admins. This could be done by the room owner
+        /// </summary>
+        /// <param name="room"></param>
+        public void RequestAdminList(Jid room)
+        {
+            RequestAdminList(room, null, null);
+        }
+
+        /// <summary>
+        /// Request the list of admins. This could be done by the room owner
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        public void RequestAdminList(Jid room, IqCB cb)
+        {
+            RequestAdminList(room, cb, null);
+        }
+
+        /// <summary>
+        /// Request the list of admins. This could be done by the room owner
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RequestAdminList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Affiliation.admin, room, cb, cbArg);
+        }
+
+        /*
+            If allowed by an implementation, a room owner may want to modify the owner list. 
+            To do so, the owner first requests the owner list by querying the room for all users with an affiliation of 'owner'.
+
+            Example 150. Owner Requests Owner List
+
+            <iq from='bard at shakespeare.lit/globe'
+                id='owner3'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='owner'/>
+              </query>
+            </iq>
+    
+        */
+
+        /// <summary>
+        /// Request the owner list of a room
+        /// </summary>
+        /// <param name="room"></param>
+        public void RequestOwnerList(Jid room)
+        {
+            RequestOwnerList(room, null, null);
+        }
+
+        /// <summary>
+        /// Request the owner list of a room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        public void RequestOwnerList(Jid room, IqCB cb)
+        {
+            RequestOwnerList(room, cb, null);
+        }
+
+        /// <summary>
+        /// Request the owner list of a room
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RequestOwnerList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Affiliation.owner, room, cb, cbArg);
+        }
+
+        /*
+            Example 105. Admin Requests Member List
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='member3'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item affiliation='member'/>
+              </query>
+            </iq>
+                
+         */
+
+        /// <summary>
+        /// In the context of a members-only room, the member list is essentially a "whitelist" of people 
+        /// who are allowed to enter the room. Anyone who is not a member is effectively banned from entering the room, 
+        /// even if their affiliation is not "outcast".
+        /// In the context of an open room, the member list is simply a list of users (bare JID and reserved nick) 
+        /// who are registered with the room. Such users may appear in a room roster, have their room nickname reserved, 
+        /// be returned in search results or FAQ queries, and the like.
+        /// It is RECOMMENDED that only room admins have the privilege to modify the member list in members-only rooms. 
+        /// To do so, the admin first requests the member list by querying the room for all users with an affiliation of "member"
+        /// </summary>
+        /// <param name="room"></param>
+        public void RequestMemberList(Jid room)
+        {
+            RequestMemberList(room, null, null);
+        }
+
+        /// <summary>
+        /// In the context of a members-only room, the member list is essentially a "whitelist" of people 
+        /// who are allowed to enter the room. Anyone who is not a member is effectively banned from entering the room, 
+        /// even if their affiliation is not "outcast".
+        /// In the context of an open room, the member list is simply a list of users (bare JID and reserved nick) 
+        /// who are registered with the room. Such users may appear in a room roster, have their room nickname reserved, 
+        /// be returned in search results or FAQ queries, and the like.
+        /// It is RECOMMENDED that only room admins have the privilege to modify the member list in members-only rooms. 
+        /// To do so, the admin first requests the member list by querying the room for all users with an affiliation of "member"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        public void RequestMemberList(Jid room, IqCB cb)
+        {
+            RequestMemberList(room, cb, null);
+        }
+
+        /// <summary>
+        /// In the context of a members-only room, the member list is essentially a "whitelist" of people 
+        /// who are allowed to enter the room. Anyone who is not a member is effectively banned from entering the room, 
+        /// even if their affiliation is not "outcast".
+        /// In the context of an open room, the member list is simply a list of users (bare JID and reserved nick) 
+        /// who are registered with the room. Such users may appear in a room roster, have their room nickname reserved, 
+        /// be returned in search results or FAQ queries, and the like.
+        /// It is RECOMMENDED that only room admins have the privilege to modify the member list in members-only rooms. 
+        /// To do so, the admin first requests the member list by querying the room for all users with an affiliation of "member"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void RequestMemberList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Affiliation.member, room, cb, cbArg);            
+        }
+
+        /*
+            8.6 Granting Moderator Privileges
+
+            An admin may want to grant moderator privileges to a participant or visitor; this is done by changing the user's role to "moderator":
+
+            Example 113. Admin Grants Moderator Privileges
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='mod1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item nick='thirdwitch'
+                      role='moderator'/>
+              </query>
+            </iq>
+                
+        */
+
+        /// <summary>
+        /// An admin may want to grant moderator privileges to a participant or visitor
+        /// this is done by changing the user's role to "moderator"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        public void GrantModeratorPrivileges(Jid room, string nickname)
+        {
+            GrantModeratorPrivileges(room, nickname, null, null, null);
+        }
+
+        /// <summary>
+        /// An admin may want to grant moderator privileges to a participant or visitor
+        /// this is done by changing the user's role to "moderator"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        public void GrantModeratorPrivileges(Jid room, string nickname, string reason)
+        {
+            GrantModeratorPrivileges(room, nickname, reason, null, null);
+        }
+
+        /// <summary>
+        /// An admin may want to grant moderator privileges to a participant or visitor
+        /// this is done by changing the user's role to "moderator"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        public void GrantModeratorPrivileges(Jid room, string nickname, string reason, IqCB cb)
+        {
+            GrantModeratorPrivileges(room, nickname, reason, cb, null);
+        }
+
+        /// <summary>
+        /// An admin may want to grant moderator privileges to a participant or visitor
+        /// this is done by changing the user's role to "moderator"
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="nickname"></param>
+        /// <param name="reason"></param>
+        /// <param name="cb"></param>
+        /// <param name="cbArg"></param>
+        public void GrantModeratorPrivileges(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeRole(Role.moderator, room, nickname, reason, cb, cbArg);
+        }
+        
+        /*
+            8.7 Revoking Moderator Privileges
+
+            An admin may want to revoke a user's moderator privileges. An admin MAY revoke moderator privileges only from a user whose affiliation is "member" or "none" (i.e., not from an owner or admin). The privilege is revoked by changing the user's role to "participant":
+
+            Example 116. Admin Revokes Moderator Privileges
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='mod2'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item nick='thirdwitch'
+                      role='participant'/>
+              </query>
+            </iq>
+        */
+
+        public void RevokeModerator(Jid room, string nickname)
+        {
+            RevokeModerator(room, nickname, null, null, null);
+        }
+
+        public void RevokeModerator(Jid room, string nickname, string reason)
+        {
+            RevokeModerator(room, nickname, reason, null, null);
+        }
+
+        public void RevokeModerator(Jid room, string nickname, string reason, IqCB cb)
+        {
+            RevokeModerator(room, nickname, reason, cb, null);
+        }
+
+        public void RevokeModerator(Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            ChangeRole(Role.participant, room, nickname, reason, cb, cbArg);
+        }
+
+        /*
+            8.8 Modifying the Moderator List
+
+            An admin may want to modify the moderator list. To do so, the admin first requests the moderator list by querying the room for all users with a role of 'moderator'.
+
+            Example 120. Admin Requests Moderator List
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='mod3'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+              <query xmlns='http://jabber.org/protocol/muc#admin'>
+                <item role='moderator'/>
+              </query>
+            </iq>
+                
+        */
+
+        /// <summary>
+        /// Requests the moderator list.
+        /// </summary>
+        /// <param name="room">The room.</param>
+        public void RequestModeratorList(Jid room)
+        {
+            RequestModeratorList(room, null, null);
+        }
+
+        /// <summary>
+        /// Requests the moderator list.
+        /// </summary>
+        /// <param name="room">The room.</param>
+        /// <param name="cb">The cb.</param>
+        public void RequestModeratorList(Jid room, IqCB cb)
+        {
+            RequestModeratorList(room, cb, null);
+        }
+
+        /// <summary>
+        /// Requests the moderator list.
+        /// </summary>
+        /// <param name="room">The room.</param>
+        /// <param name="cb">The cb.</param>
+        /// <param name="cbArg">The cb arg.</param>
+        public void RequestModeratorList(Jid room, IqCB cb, object cbArg)
+        {
+            RequestList(Role.moderator, room, cb, cbArg);
+        }
+
+
+        public void RequestList(Affiliation affiliation, Jid room, IqCB cb, object cbArg)
+        {
+            AdminIq aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.get;
+
+            aIq.Query.AddItem(new agsXMPP.protocol.x.muc.iq.admin.Item(affiliation));
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
+        }
+
+        public void RequestList(Role role, Jid room, IqCB cb, object cbArg)
+        {
+            AdminIq aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.get;
+
+            aIq.Query.AddItem(new agsXMPP.protocol.x.muc.iq.admin.Item(role));
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
+        }
+
+        #region << Create Reserved Room >>
+        /// <summary>
+        /// Creates a reserved room. The MUC server replies to this request either with an error if the room already exists 
+        /// or another error occured. Or with the configuration for, for the reserved room which you have submit in the
+        /// second step
+        /// </summary>
+        /// <param name="room">Jid of the room to create</param>
+        public void CreateReservedRoom(Jid room)
+        {
+            CreateReservedRoom(room, null, null);
+        }
+
+        /// <summary>
+        /// <para>
+        /// Creates a reserved room. The MUC server replies to this request either with an error if the room already exists 
+        /// or another error occured. Or with the configuration for, for the reserved room which you have submit in the
+        /// second step.
+        /// </para>        
+        /// </summary>
+        /// <param name="room">Jid of the room to create</param>
+        /// <param name="cb">callback for the response</param>
+        public void CreateReservedRoom(Jid room, IqCB cb)
+        {
+            CreateReservedRoom(room, cb, null);
+        }
+
+        /// <summary>
+        /// <para>
+        /// Creates a reserved room. The MUC server replies to this request either with an error if the room already exists 
+        /// or another error occured. Or with the configuration for, for the reserved room which you have submit in the
+        /// second step.
+        /// </para>        
+        /// </summary>
+        /// <param name="room">Jid of the room to create</param>
+        /// <param name="cb">callback for the response</param>
+        /// <param name="cbArg">optional callback arguments</param>
+        public void CreateReservedRoom(Jid room, IqCB cb, object cbArg)
+        {
+            /*
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='create1'
+                to='darkcave at macbeth.shakespeare.lit'
+                type='get'>
+                <query xmlns='http://jabber.org/protocol/muc#owner'/>
+            </iq>
+            */
+
+            OwnerIq iq = new OwnerIq();
+            iq.Type = IqType.get;
+            iq.To   = room;
+            
+            if (cb == null)
+                m_connection.Send(iq);
+            else
+                m_connection.IqGrabber.SendIq(iq, cb, cbArg);
+        }
+        #endregion       
+
+
+        #region << Destroy Room >>
+        public void DestroyRoom(Jid room, Jid altVenue)
+        {
+            DestroyRoom(room, altVenue, null, null, null);
+        }
+
+        public void DestroyRoom(Jid room, Jid altVenue, IqCB cb)
+        {
+            DestroyRoom(room, altVenue, null, cb, null);
+        }
+
+        public void DestroyRoom(Jid room, Jid altVenue, IqCB cb, object cbArg)
+        {
+            DestroyRoom(room, altVenue, null, cb, cbArg);
+        }
+
+        public void DestroyRoom(Jid room, string reason)
+        {
+            DestroyRoom(room, null, reason, null, null);
+        }
+
+        public void DestroyRoom(Jid room, string reason, IqCB cb)
+        {
+            DestroyRoom(room, null, reason, cb, null);
+        }
+
+        public void DestroyRoom(Jid room, string reason, IqCB cb, object cbArg)
+        {
+            DestroyRoom(room, null, reason, cb, cbArg);
+        }
+
+        public void DestroyRoom(Jid room, Jid altVenue, string reason)
+        {
+            DestroyRoom(room, altVenue, reason, null, null);
+        }
+
+        public void DestroyRoom(Jid room, Jid altVenue, string reason, IqCB cb)
+        {
+            DestroyRoom(room, altVenue, reason, cb, null);
+        }
+
+        public void DestroyRoom(Jid room, Jid altVenue, string reason, IqCB cb, object cbArg)       
+        {
+            /*
+             Example 177. Owner Submits Room Destruction Request
+
+            <iq from='crone1 at shakespeare.lit/desktop'
+                id='begone'
+                to='heath at macbeth.shakespeare.lit'
+                type='set'>
+              <query xmlns='http://jabber.org/protocol/muc#owner'>
+                <destroy jid='darkcave at macbeth.shakespeare.lit'>
+                  <reason>Macbeth doth come.</reason>
+                </destroy>
+              </query>
+            </iq>
+            */
+
+            OwnerIq iq = new OwnerIq();
+            iq.Type = IqType.set;
+            iq.To = room;
+
+            owner.Destroy destroy = new owner.Destroy();
+
+            if (reason != null)
+                destroy.Reason = reason;
+
+            if (altVenue != null)
+                destroy.AlternateVenue = altVenue;
+
+            iq.Query.AddChild(destroy);
+            
+            if (cb == null)
+                m_connection.Send(iq);
+            else
+                m_connection.IqGrabber.SendIq(iq, cb, cbArg);
+
+        }
+        #endregion
+
+        public void ModifyList(Jid room, agsXMPP.protocol.x.muc.iq.admin.Item[] items)
+        {
+            ModifyList(room, items, null, null);
+        }
+
+        public void ModifyList(Jid room, agsXMPP.protocol.x.muc.iq.admin.Item[] items, IqCB cb)
+        {
+            ModifyList(room, items, cb, null);
+        }
+
+        public void ModifyList(Jid room, agsXMPP.protocol.x.muc.iq.admin.Item[] items, IqCB cb, object cbArg)
+        {
+            AdminIq aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.set;
+
+            foreach (agsXMPP.protocol.x.muc.iq.admin.Item itm in items)
+            {
+                aIq.Query.AddItem(itm);
+            }           
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
+        }
+
+
+        #region << private functions >>
+
+        private void ChangeRole(Role role, Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            AdminIq aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.set;
+
+            agsXMPP.protocol.x.muc.iq.admin.Item itm = new agsXMPP.protocol.x.muc.iq.admin.Item();
+            itm.Role = role;
+            itm.Nickname = nickname;
+
+            if (reason != null)
+                itm.Reason = reason;
+
+            aIq.Query.AddItem(itm);
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
+        }
+        
+        private void ChangeAffiliation(Affiliation affiliation, Jid room, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            AdminIq aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.set;
+
+            agsXMPP.protocol.x.muc.iq.admin.Item itm = new agsXMPP.protocol.x.muc.iq.admin.Item();
+            itm.Affiliation = affiliation;               
+
+            if (nickname != null)
+                itm.Nickname    = nickname;
+
+            if (reason != null)
+                itm.Reason = reason;
+
+            aIq.Query.AddItem(itm);
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
+        }
+
+        private void ChangeAffiliation(Affiliation affiliation, Jid room, Jid user, IqCB cb, object cbArg)
+        {            
+            ChangeAffiliation(affiliation, room, user, null, null, cb, cbArg);
+        }
+
+        private void ChangeAffiliation(Affiliation affiliation, Jid room, Jid user, string nickname, string reason, IqCB cb, object cbArg)
+        {
+            var aIq = new AdminIq();
+            aIq.To = room;
+            aIq.Type = IqType.set;
+
+            agsXMPP.protocol.x.muc.iq.admin.Item itm = new agsXMPP.protocol.x.muc.iq.admin.Item();
+            itm.Affiliation = affiliation;
+
+            if (user != null)
+                itm.Jid = user;
+            
+            if (nickname != null)
+                itm.Nickname = nickname;
+
+            if (reason != null)
+                itm.Reason = reason;
+
+            aIq.Query.AddItem(itm);
+
+            if (cb == null)
+                m_connection.Send(aIq);
+            else
+                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);      
+        }
+        #endregion
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Role.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Role.cs
new file mode 100644
index 0000000..e4a875f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Role.cs
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+namespace agsXMPP.protocol.x.muc
+{
+	/// <summary>
+	/// There are four defined roles that an occupant may have
+	/// </summary>
+	public enum Role
+	{
+		/// <summary>
+		/// the absence of a role
+		/// </summary>
+		none,
+		moderator,
+		participant,
+		visitor		
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/Status.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/Status.cs
new file mode 100644
index 0000000..3dd014b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/Status.cs
@@ -0,0 +1,70 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+    /*
+    <x xmlns='http://jabber.org/protocol/muc#user'>
+        <status code='100'/>
+    </x>    
+    */
+
+    /// <summary>
+    /// Summary description for MucUser.
+    /// </summary>
+    public class Status : Element
+    {
+        #region << Constructors >>
+        public Status()
+        {
+            this.TagName    = "status";
+            this.Namespace  = Uri.MUC_USER;
+        }
+
+        public Status(StatusCode code) : this()
+        {
+            this.Code = code;
+        }
+
+        public Status(int code) : this()
+        {
+            SetAttribute("code", code);
+        }
+        #endregion
+
+        public StatusCode Code
+		{
+			get 
+			{
+                return (StatusCode)GetAttributeEnum("code", typeof(StatusCode)); 
+			}
+			set 
+			{ 
+				SetAttribute("code", value.ToString()); 
+			}
+		}
+    }
+
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/StatusCode.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/StatusCode.cs
new file mode 100644
index 0000000..05f601b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/StatusCode.cs
@@ -0,0 +1,131 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+namespace agsXMPP.protocol.x.muc
+{
+    /// <summary>
+    /// StatusCode
+    /// </summary>
+    public enum StatusCode
+    {
+        /// <summary>
+        /// Unkown status code.
+        /// </summary>
+        Unknown                 = -1,
+
+        /// <summary>
+        /// Inform user that any occupant is allowed to see the user's full JID.
+        /// </summary>
+        FullJidVisible          = 100,
+        
+        /// <summary>
+        /// Inform user that his or her affiliation changed while not in the room.
+        /// </summary>
+        AffiliationChanged      = 101,
+
+        /// <summary>
+        /// Inform occupants that room now shows unavailable members.
+        /// </summary>
+        ShowUnavailableMembers = 102,
+    
+        /// <summary>
+        /// Inform occupants that room now does not show unavailable members .
+        /// </summary>
+        HideUnavailableMembers = 103,
+
+        /// <summary>
+        /// Inform occupants that a non-privacy-related room configuration change has occurred.
+        /// </summary>
+        ConfigurationChanged    = 104,
+
+        /// <summary>
+        /// Inform user that presence refers to one of its own room occupants .
+        /// </summary>
+        SelfPresence            = 110,
+
+        /// <summary>
+        /// Inform occupants that room logging is now enabled.
+        /// </summary>
+        LoggingEnabled          = 170,
+
+        /// <summary>
+        /// Inform occupants that room logging is now disabled. 
+        /// </summary>
+        LoggingDisabled         = 171,
+    
+        /// <summary>
+        /// Inform occupants that the room is now non-anonymous.
+        /// </summary>
+        RoomNonAnonymous        = 172,
+
+        /// <summary>
+        /// Inform occupants that the room is now semi-anonymous.
+        /// </summary>
+        RoomSemiAnonymous       = 173,
+
+        /// <summary>
+        /// Inform occupants that the room is now fully-anonymous. 
+        /// </summary>
+        RoomAnonymous           = 174,
+
+        /// <summary>
+        /// Inform user that a new room has been created. 
+        /// </summary>
+        RoomCreated             = 201,
+
+        /// <summary>
+        ///  Inform user that service has assigned or modified occupant's roomnick.
+        /// </summary>
+        ModifiedNick            = 210,
+
+        /// <summary>
+        /// Inform user that he or she has been banned from the room. 
+        /// </summary>
+        Banned                  = 301,
+
+        /// <summary>
+        /// Inform all occupants of new room nickname. 
+        /// </summary>
+        NewNickname             = 303,
+
+        /// <summary>
+        /// Inform user that he or she has been kicked from the room. 
+        /// </summary>
+        Kicked                  = 307,
+
+        /// <summary>
+        /// Inform user that he or she is being removed from the room because of an affiliation change.
+        /// </summary>
+        // TODO, find better name
+        AffiliationChange       = 321,
+        
+        /// <summary>
+        /// Inform user that he or she is being removed from the room because the room 
+        /// has been changed to members-only and the user is not a member.
+        /// </summary>
+        MembersOnly             = 322,
+
+        /// <summary>
+        /// Inform user that he or she is being removed from the room because of a system shutdown.
+        /// </summary>
+        Shutdown                = 332
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/User.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/User.cs
new file mode 100644
index 0000000..50df132
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/User.cs
@@ -0,0 +1,164 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System.Collections.Generic;
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc
+{
+	/// <summary>
+	/// Summary description for MucUser.
+	/// </summary>
+	public class User : Element
+	{
+        /*
+        <x xmlns='http://jabber.org/protocol/muc#user'>
+             <item affiliation='admin' role='moderator'/>
+        </x>
+         
+        <message from='darkcave at macbeth.shakespeare.lit'
+                 to='hag66 at shakespeare.lit/pda'
+                 type='groupchat'>
+            <body>This room is not anonymous.</body>
+            <x xmlns='http://jabber.org/protocol/muc#user'>
+                <status code='100'/>
+            </x>
+        </message>
+         
+        <message
+            from='crone1 at shakespeare.lit/desktop'
+            to='darkcave at macbeth.shakespeare.lit'>
+          <x xmlns='http://jabber.org/protocol/muc#user'>
+            <invite to='hecate at shakespeare.lit'>
+              <reason>
+                Hey Hecate, this is the place for all good witches!
+              </reason>
+            </invite>
+          </x>
+        </message>
+         
+        <message
+            from='darkcave at macbeth.shakespeare.lit'
+            to='hecate at shakespeare.lit'>
+          <body>You have been invited to darkcave at macbeth by crone1 at shakespeare.lit.</body>
+          <x xmlns='http://jabber.org/protocol/muc#user'>
+            <invite from='crone1 at shakespeare.lit'>
+              <reason>
+                Hey Hecate, this is the place for all good witches!
+              </reason>
+            </invite>
+            <password>cauldron</password>
+          </x>
+          <x jid='darkcave at macbeth.shakespeare.lit' xmlns='jabber:x:conference'>
+            Hey Hecate, this is the place for all good witches!
+          </x>
+        </message>
+        
+        */
+        public User()
+		{
+			TagName	= "x";
+			Namespace	= Uri.MUC_USER;
+		}
+
+        public Item Item
+        {
+            get
+            {
+                return SelectSingleElement(typeof(Item)) as Item;
+            }
+            set
+            {
+                RemoveTag(typeof(Item));
+                AddChild(value);
+            }
+        }
+        
+        /// <summary>
+        /// Gets or sets the status codes.
+        /// </summary>
+        /// <value>The status codes.</value>
+        public List<Status> StatusCodes
+        {
+            get { return SelectElements<Status>(); }
+            set
+            {
+                RemoveTags<Status>();
+                foreach (Status status in value)
+                    AddChild(status);
+            }
+        }
+
+        /// <summary>
+        /// The Status Element
+        /// </summary>
+        public Status Status
+        {
+            get { return SelectSingleElement(typeof(Status)) as Status; }
+            set
+            {
+                if (HasTag(typeof(Status)))
+                    RemoveTag(typeof(Status));
+                
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The Invite Element
+        /// </summary>
+        public Invite Invite
+        {
+            get { return SelectSingleElement(typeof(Invite)) as Invite; }
+            set
+            {
+                if (HasTag(typeof(Invite)))
+                    RemoveTag(typeof(Invite));
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+
+        /// <summary>
+        /// The Decline Element
+        /// </summary>
+        public Decline Decline
+        {
+            get { return SelectSingleElement(typeof(Decline)) as Decline; }
+            set
+            {
+                if (HasTag(typeof(Decline)))
+                    RemoveTag(typeof(Decline));
+
+                if (value != null)
+                    AddChild(value);
+            }
+        }
+
+        public string Password
+        {
+            set { SetTag("password", value); }
+            get { return GetTag("password"); }
+        }
+	}
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Admin.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Admin.cs
new file mode 100644
index 0000000..b8ef83f
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Admin.cs
@@ -0,0 +1,86 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc.iq.admin
+{
+    /*
+        <query xmlns='http://jabber.org/protocol/muc#admin'>
+            <item nick='pistol' role='none'>
+              <reason>Avaunt, you cullion!</reason>
+            </item>
+        </query>
+    */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Admin : Element
+    {
+        public Admin()
+        {           
+			this.TagName	= "query";
+			this.Namespace	= Uri.MUC_ADMIN;		
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="item"></param>
+        public void AddItem(Item item)
+        {
+            AddChild(item);
+        }
+
+        /// <summary>
+        /// Adds the items.
+        /// </summary>
+        /// <param name="items">The items.</param>
+        public void AddItems(Item[] items)
+        {
+            foreach (Item itm in items)
+            {
+                AddItem(itm);
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <returns></returns>
+        public Item[] GetItems()
+        {
+            ElementList nl = SelectElements(typeof(Item));
+            Item[] items = new Item[nl.Count];
+            int i = 0;
+            foreach (Item itm in nl)
+            {
+                items[i] = itm;
+                i++;
+            }
+            return items;
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/AdminIq.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/AdminIq.cs
new file mode 100644
index 0000000..acac22e
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/AdminIq.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.x.muc.iq.admin
+{
+    /*
+        Example 72. Moderator Kicks Occupant
+
+        <iq from='fluellen at shakespeare.lit/pda'
+            id='kick1'
+            to='harfleur at henryv.shakespeare.lit'
+            type='set'>
+          <query xmlns='http://jabber.org/protocol/muc#admin'>
+            <item nick='pistol' role='none'>
+              <reason>Avaunt, you cullion!</reason>
+            </item>
+          </query>
+        </iq>
+    */
+    
+    /// <summary>
+    /// 
+    /// </summary>
+    public class AdminIq : IQ
+    {
+        private Admin m_Admin = new Admin();
+
+        public AdminIq()
+        {
+            base.Query = m_Admin;
+            this.GenerateId();
+        }
+
+        public AdminIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public AdminIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public AdminIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public new Admin Query
+        {
+            get
+            {
+                return m_Admin;
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Item.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Item.cs
new file mode 100644
index 0000000..4b9c5c0
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/admin/Item.cs
@@ -0,0 +1,114 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+using System.Text;
+
+namespace agsXMPP.protocol.x.muc.iq.admin
+{
+    public class Item : agsXMPP.protocol.x.muc.Item
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public Item() : base()
+        {
+            this.Namespace = Uri.MUC_ADMIN;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        public Item(Affiliation affiliation) : this()
+        {
+            this.Affiliation = affiliation;
+        }
+
+        public Item(Affiliation affiliation, Jid jid) : this(affiliation)
+        {
+            this.Jid = jid;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="role"></param>
+        public Item(Role role) : this()
+        {
+            this.Role = role;
+        }
+
+        public Item(Role role, Jid jid) : this(role)
+        {
+            this.Jid = jid;
+        }
+
+        public Item(Jid jid) : this()
+        {
+            this.Jid = jid;
+        }
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        public Item(Affiliation affiliation, Role role) : this(affiliation)
+        {
+            this.Role = role;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        /// <param name="jid"></param>
+        public Item(Affiliation affiliation, Role role, Jid jid) : this(affiliation, role)
+        {
+            this.Jid = jid;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        /// <param name="reason"></param>
+        public Item(Affiliation affiliation, Role role, string reason) : this(affiliation, role)
+        {
+            this.Reason = reason;
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="affiliation"></param>
+        /// <param name="role"></param>
+        /// <param name="jid"></param>
+        /// <param name="reason"></param>
+        public Item(Affiliation affiliation, Role role, Jid jid, string reason) : this(affiliation, role, jid)
+        {
+            this.Reason = reason;
+        }
+
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/Owner.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/Owner.cs
new file mode 100644
index 0000000..135eb93
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/Owner.cs
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc.iq.owner
+{
+    /*
+        <iq id="jcl_110" to="xxxxxx at conference.jabber.org" type="set">
+            <query xmlns="http://jabber.org/protocol/muc#owner">
+                <x type="submit" xmlns="jabber:x:data"/>
+            </query>
+        </iq>
+    */
+
+    public class Owner : Element
+    {
+        public Owner()
+        {
+            TagName    = "query";
+            Namespace  = Uri.MUC_OWNER;           
+        }        
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/OwnerIq.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/OwnerIq.cs
new file mode 100644
index 0000000..c591c07
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/iq/owner/OwnerIq.cs
@@ -0,0 +1,79 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.client;
+
+namespace agsXMPP.protocol.x.muc.iq.owner
+{
+    /*
+        Example 72. Moderator Kicks Occupant
+
+        <iq from='fluellen at shakespeare.lit/pda'
+            id='kick1'
+            to='harfleur at henryv.shakespeare.lit'
+            type='set'>
+          <query xmlns='http://jabber.org/protocol/muc#admin'>
+            <item nick='pistol' role='none'>
+              <reason>Avaunt, you cullion!</reason>
+            </item>
+          </query>
+        </iq>
+    */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class OwnerIq : IQ
+    {
+        private Owner m_Owner = new Owner();
+
+        public OwnerIq()
+        {
+            base.Query = m_Owner;
+            this.GenerateId();
+        }
+
+        public OwnerIq(IqType type) : this()
+        {
+            this.Type = type;
+        }
+
+        public OwnerIq(IqType type, Jid to) : this(type)
+        {
+            this.To = to;
+        }
+
+        public OwnerIq(IqType type, Jid to, Jid from) : this(type, to)
+        {
+            this.From = from;
+        }
+
+        public new Owner Query
+        {
+            get
+            {
+                return m_Owner;
+            }
+        }
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/owner/Destroy.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/owner/Destroy.cs
new file mode 100644
index 0000000..572e607
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/owner/Destroy.cs
@@ -0,0 +1,105 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.muc.owner
+{
+    /*
+     
+        <iq from='crone1 at shakespeare.lit/desktop'
+            id='begone'
+            to='heath at macbeth.shakespeare.lit'
+            type='set'>
+          <query xmlns='http://jabber.org/protocol/muc#owner'>
+            <destroy jid='darkcave at macbeth.shakespeare.lit'>
+              <reason>Macbeth doth come.</reason>
+            </destroy>
+          </query>
+        </iq>
+     
+     */
+
+    /// <summary>
+    /// 
+    /// </summary>
+    public class Destroy : Element
+    {
+        #region << Constructor >>
+        public Destroy()
+        {
+            this.TagName = "destroy";
+            this.Namespace = Uri.MUC_OWNER;
+        }
+
+        public Destroy(string reason) : this()
+        {
+            Reason = reason;
+        }
+
+        public Destroy(Jid altVenue) : this()
+        {
+            AlternateVenue = altVenue;
+        }
+
+        public Destroy(string reason, Jid altVenue) : this()
+        {
+            Reason = reason;
+            AlternateVenue = altVenue;
+        }
+        #endregion                     
+
+        
+        /// <summary>
+        /// Pptional attribute for a alternate venue
+        /// </summary>
+        public Jid AlternateVenue
+        {
+            get
+            {
+                if (HasAttribute("jid"))
+                    return new Jid(this.GetAttribute("jid"));
+                else
+                    return null;
+            }
+            set
+            {
+                if (value != null)
+                    this.SetAttribute("jid", value.ToString());
+            }
+        }
+        
+        public string Reason
+        {
+            set { SetTag("reason", value); }
+            get { return GetTag("reason"); }
+        }
+
+        public string Password
+        {
+            set { SetTag("password", value); }
+            get { return GetTag("password"); }
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/muc/user/Destroy.cs b/lib/agsxmpp/agsxmpp/protocol/x/muc/user/Destroy.cs
new file mode 100644
index 0000000..d66ff31
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/muc/user/Destroy.cs
@@ -0,0 +1,54 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+
+namespace agsXMPP.protocol.x.muc.user
+{
+    public class Destroy : agsXMPP.protocol.x.muc.owner.Destroy
+    {
+        #region << Constructor >>
+        public Destroy() : base()
+        {
+            this.Namespace = Uri.MUC_USER;
+        }
+
+        public Destroy(string reason)
+            : this()
+        {
+            Reason = reason;
+        }
+
+        public Destroy(Jid altVenue)
+            : this()
+        {
+            AlternateVenue = altVenue;
+        }
+
+        public Destroy(string reason, Jid altVenue)
+            : this()
+        {
+            Reason = reason;
+            AlternateVenue = altVenue;
+        }
+        #endregion  
+    }
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterItem.cs b/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterItem.cs
new file mode 100644
index 0000000..51c850b
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterItem.cs
@@ -0,0 +1,77 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.protocol.Base;
+
+namespace agsXMPP.protocol.x.rosterx
+{
+	public enum Action
+	{
+		NONE = -1,
+		add,
+		remove,
+		modify
+	}
+
+	/// <summary>
+	/// Summary description for RosterItem.
+	/// </summary>
+	public class RosterItem : agsXMPP.protocol.Base.RosterItem
+	{
+		/*
+		<item action='delete' jid='rosencrantz at denmark' name='Rosencrantz'>   
+			<group>Visitors</group>   
+		</item> 
+		*/
+
+		public RosterItem() : base()
+		{
+			this.Namespace	= Uri.X_ROSTERX;
+		}
+
+		public RosterItem(Jid jid) : this()
+		{
+			Jid = jid;				
+		}
+
+		public RosterItem(Jid jid, string name) : this(jid)
+		{
+			Name = name;
+		}
+
+		public RosterItem(Jid jid, string name, Action action) : this(jid, name)
+		{
+			Action = action;
+		}
+
+		public Action Action
+		{
+			get 
+			{ 
+				return (Action) GetAttributeEnum("action", typeof(Action)); 
+			}
+			set { SetAttribute("action", value.ToString()); }
+		}
+
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterX.cs b/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterX.cs
new file mode 100644
index 0000000..1b3b217
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/rosterx/RosterX.cs
@@ -0,0 +1,87 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
+
+using System;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.rosterx
+{
+    /// <summary>
+    /// Roster Item Exchange (JEP-0144)
+    /// </summary>
+	public class RosterX : Element
+	{
+		/*
+		<message from='horatio at denmark.lit' to='hamlet at denmark.lit'>
+		<body>Some visitors, m'lord!</body>
+		<x xmlns='http://jabber.org/protocol/rosterx'> 
+			<item action='add'
+				jid='rosencrantz at denmark.lit'
+				name='Rosencrantz'>
+				<group>Visitors</group>
+			</item>
+			<item action='add'
+				jid='guildenstern at denmark.lit'
+				name='Guildenstern'>
+				<group>Visitors</group>
+			</item>
+		</x>
+		</message>
+		*/
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="RosterX"/> class.
+        /// </summary>
+		public RosterX()
+		{
+			this.TagName	= "x";
+			this.Namespace	= Uri.X_ROSTERX;
+		}
+
+
+        /// <summary>
+        /// Gets the roster.
+        /// </summary>
+        /// <returns></returns>
+		public RosterItem[] GetRoster()
+		{
+            ElementList nl = SelectElements(typeof(RosterItem));
+			int i = 0;
+			RosterItem[] result = new RosterItem[nl.Count];
+			foreach (RosterItem ri in nl)
+			{
+				result[i] = (RosterItem) ri;				
+				i++;
+			}
+			return result;
+		}
+
+        /// <summary>
+        /// Adds a roster item.
+        /// </summary>
+        /// <param name="r">The r.</param>
+		public void AddRosterItem(RosterItem r)
+		{
+			this.ChildNodes.Add(r);
+		}
+	}
+}
diff --git a/lib/agsxmpp/agsxmpp/protocol/x/vcard_update/VcardUpdate.cs b/lib/agsxmpp/agsxmpp/protocol/x/vcard_update/VcardUpdate.cs
new file mode 100644
index 0000000..f5d10b1
--- /dev/null
+++ b/lib/agsxmpp/agsxmpp/protocol/x/vcard_update/VcardUpdate.cs
@@ -0,0 +1,78 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright (c) 2003-2012 by AG-Software 											 *
+ * All Rights Reserved.																 *
+ * Contact information for AG-Software is available at http://www.ag-software.de	 *
+ *																					 *
+ * Licence:																			 *
+ * The agsXMPP SDK is released under a dual licence									 *
+ * agsXMPP can be used under either of two licences									 *
+ * 																					 *
+ * A commercial licence which is probably the most appropriate for commercial 		 *
+ * corporate use and closed source projects. 										 *
+ *																					 *
+ * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
+ * other open source projects.														 *
+ *																					 *
+ * See README.html for details.														 *
+ *																					 *
+ * For general enquiries visit our website at:										 *
+ * http://www.ag-software.de														 *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+using System;
+using System.Text;
+
+using agsXMPP.Xml.Dom;
+
+namespace agsXMPP.protocol.x.vcard_update
+{
+    /*
+        <presence>
+          <x xmlns='vcard-temp:x:update'>
+            <photo/>
+          </x>
+        </presence>
+    */
+    public class VcardUpdate : Element
+    {
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="VcardUpdate"/> class.
+        /// </summary>
+        public VcardUpdate()
+        {
+            this.TagName    = "x";
+            this.Namespace  = Uri.VCARD_UPDATE;
+        }
+
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="VcardUpdate"/> class.
+        /// </summary>
+        /// <param name="photo">The photo.</param>
+        public VcardUpdate(string photo) : this()
+        {
+            Photo = photo;
+        }
+
+        /// <summary>
+        /// SHA1 hash of the avatar image data
+        /// <para>if no image/avatar should be advertised, or other clients should be forced
+        /// to remove the image set it to a empty string value ("")</para>
+        /// <para>if this protocol is supported but you ae not ready o advertise a imaeg yet
+        /// set teh value to null.</para>
+        /// <para>Otherwise teh value must the SHA1 hash of the image data.</para>
+        /// </summary>
+        public string Photo
+        {
+            get { return GetTag("photo"); }
+            set
+            {
+                if (value == null)
+                    RemoveTag("photo");
+                else
+                    SetTag("photo", value);
+            }
+        }
+    }
+}
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/EventArgs/CreateConnectionAsyncCompletedEventArgs.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/Exceptions/ProxyException.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/Exceptions/ProxyException.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/Exceptions/ProxyException.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/HttpProxyClient.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/HttpProxyClient.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/HttpProxyClient.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/HttpProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/IProxyClient.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/IProxyClient.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/IProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/ProxyClientFactory.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/ProxyClientFactory.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/ProxyClientFactory.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/Socks4ProxyClient.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/Socks4ProxyClient.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/Socks4ProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/Socks4aProxyClient.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/Socks4aProxyClient.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/Socks4aProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/Socks5ProxyClient.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/Socks5ProxyClient.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/Socks5ProxyClient.cs
diff --git a/lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs b/lib/agsxmpp/agsxmpp/starksoftproxy/Utils.cs
similarity index 100%
rename from lib/SmartIrc4net/src/StarkSoftProxy/Utils.cs
rename to lib/agsxmpp/agsxmpp/starksoftproxy/Utils.cs
diff --git a/lib/jabber-net/2005-jabber-net.csproj b/lib/jabber-net/2005-jabber-net.csproj
deleted file mode 100644
index 6a6ec8a..0000000
--- a/lib/jabber-net/2005-jabber-net.csproj
+++ /dev/null
@@ -1,479 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <ProjectType>Local</ProjectType>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{6CAE854A-F202-4D2B-B10E-E8D8E81E5EF5}</ProjectGuid>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <AssemblyKeyContainerName>
-    </AssemblyKeyContainerName>
-    <AssemblyName>jabber-net</AssemblyName>
-    <AssemblyOriginatorKeyFile>jabbernet.key</AssemblyOriginatorKeyFile>
-    <DefaultClientScript>JScript</DefaultClientScript>
-    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
-    <DefaultTargetSchema>IE50</DefaultTargetSchema>
-    <DelaySign>false</DelaySign>
-    <OutputType>Library</OutputType>
-    <RootNamespace>jabbernet</RootNamespace>
-    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
-    <FileUpgradeFlags>
-    </FileUpgradeFlags>
-    <UpgradeBackupLocation>
-    </UpgradeBackupLocation>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <OutputPath>bin5\Debug\</OutputPath>
-    <BaseIntermediateOutputPath>obj5\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>obj5\Debug\</IntermediateOutputPath>
-    <BaseAddress>285212672</BaseAddress>
-    <ConfigurationOverrideFile>
-    </ConfigurationOverrideFile>
-    <DefineConstants Condition="'$(BuildMono)'==''">TRACE;DEBUG;NET20 NO_SRV</DefineConstants>
-    <DefineConstants Condition="'$(BuildMono)'=='true'">TRACE;DEBUG;NO_SRV</DefineConstants>
-    <DocumentationFile>2005-jabber-net.xml</DocumentationFile>
-    <DebugSymbols>true</DebugSymbols>
-    <FileAlignment>4096</FileAlignment>
-    <Optimize>false</Optimize>
-    <RegisterForComInterop>false</RegisterForComInterop>
-    <RemoveIntegerChecks>false</RemoveIntegerChecks>
-    <WarningLevel>4</WarningLevel>
-    <DebugType>full</DebugType>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <OutputPath>bin5\Release\</OutputPath>
-    <BaseIntermediateOutputPath>obj5\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>obj5\Debug\</IntermediateOutputPath>
-    <BaseAddress>285212672</BaseAddress>
-    <ConfigurationOverrideFile>
-    </ConfigurationOverrideFile>
-    <DefineConstants Condition="'$(BuildMono)'==''">TRACE;NET20 NO_SRV</DefineConstants>
-    <DefineConstants Condition="'$(BuildMono)'=='true'">TRACE;NO_SRV</DefineConstants>
-    <DocumentationFile>2005-jabber-net.xml</DocumentationFile>
-    <FileAlignment>4096</FileAlignment>
-    <Optimize>true</Optimize>
-    <RegisterForComInterop>false</RegisterForComInterop>
-    <RemoveIntegerChecks>false</RemoveIntegerChecks>
-    <WarningLevel>4</WarningLevel>
-    <DebugType>none</DebugType>
-    <ErrorReport>prompt</ErrorReport>
-  </PropertyGroup>
-  <ItemGroup Condition="'$(BuildMono)'==''">
-    <Reference Include="System">
-      <Name>System</Name>
-    </Reference>
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Security" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml">
-      <Name>System.XML</Name>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="AssemblyInfo.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\ByteStack.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\GraphNode.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\IndexedTrie.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\ISet.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\LinkedList.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\Set.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\SkipList.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\StringSet.cs" />
-    <Compile Include="bedrock\collections\Tree.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\Trie.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\collections\TrieNode.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\Delegates.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\io\BufferAggregate.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\client\BookmarkManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\FileMap.cs" />
-    <Compile Include="bedrock\io\ReadEventStream.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\io\ZlibStream.cs" />
-    <Compile Include="bedrock\net\Address.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\AsyncSocket.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\BaseSocket.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\Exceptions.cs" />
-    <Compile Include="bedrock\net\HttpSocket.cs" />
-    <Compile Include="bedrock\net\IHttpSocket.cs" />
-    <Compile Include="bedrock\net\ProxySocket.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\ShttpProxy.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\SocketEventListener.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\SocketWatcher.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\Socks4Proxy.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\Socks5Proxy.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\net\XEP124Socket.cs" />
-    <Compile Include="bedrock\net\XEP25Socket.cs" />
-    <Compile Include="bedrock\util\ConfigFile.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\util\GetOptBase.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="bedrock\util\IdleTime.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="bedrock\util\Version.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\BindingStanzaStream.cs" />
-    <Compile Include="jabber\connection\CapsManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\CertificatePrompt.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\ConferenceManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\DiscoManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\client\JabberClient.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\client\PresenceManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\client\RosterManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\HttpStanzaStream.cs" />
-    <Compile Include="jabber\connection\HttpUploader.cs" />
-    <Compile Include="jabber\connection\IQTracker.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\PollingStanzaStream.cs" />
-    <Compile Include="jabber\connection\PubSubManager.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\sasl\ExternalProcessor.cs" />
-    <Compile Include="jabber\connection\sasl\KerbProcessor.cs" />
-    <Compile Include="jabber\connection\sasl\MD5Processor.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\sasl\PlainProcessor.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\sasl\SASLProcessor.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\StreamComponent.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\XmppStream.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\connection\SocketStanzaStream.cs" />
-    <Compile Include="jabber\connection\StanzaStream.cs" />
-    <Compile Include="jabber\connection\States.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\JID.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\accept\Factory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\accept\Handshake.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\accept\Log.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\accept\Route.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\accept\Xdb.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\AsynchElementStream.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\Error.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\Factory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\IQ.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\Message.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\Presence.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\client\ProtocolException.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\Element.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\ElementFactory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\ElementList.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\ElementStream.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\EnumParser.cs" />
-    <Compile Include="jabber\protocol\iq\Agents.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Auth.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Bookmarks.cs" />
-    <Compile Include="jabber\protocol\iq\Browse.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Disco.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Factory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\GeoLoc.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Last.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\MUC.cs">
-    </Compile>
-    <Compile Include="jabber\protocol\iq\OOB.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Private.cs" />
-    <Compile Include="jabber\protocol\iq\PubSub.cs" />
-    <Compile Include="jabber\protocol\iq\PubSubErrors.cs" />
-    <Compile Include="jabber\protocol\iq\PubSubEvent.cs" />
-    <Compile Include="jabber\protocol\iq\PubSubOwner.cs" />
-    <Compile Include="jabber\protocol\iq\Register.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Roster.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Time.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\VCard.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\iq\Version.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\NS.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\Packet.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Bind.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Compression.cs" />
-    <Compile Include="jabber\protocol\stream\Error.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Factory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Features.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\HttpBind.cs" />
-    <Compile Include="jabber\protocol\stream\SASL.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Session.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\StartTLS.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\stream\Stream.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\URI.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\x\Caps.cs" />
-    <Compile Include="jabber\protocol\x\Data.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\x\Delay.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\x\Event.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\protocol\x\Factory.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="jabber\server\JabberService.cs">
-      <SubType>Component</SubType>
-    </Compile>
-    <Compile Include="jabber\server\XdbTracker.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="stringprep\Nameprep.cs" />
-    <Compile Include="stringprep\Plain.cs" />
-    <Compile Include="stringprep\Profile.cs" />
-    <Compile Include="stringprep\steps\BidiStep.cs" />
-    <Compile Include="stringprep\steps\MapStep.cs" />
-    <Compile Include="stringprep\steps\NFKCStep.cs" />
-    <Compile Include="stringprep\steps\ProfileStep.cs" />
-    <Compile Include="stringprep\steps\ProhibitStep.cs" />
-    <Compile Include="stringprep\steps\RFC3454.cs" />
-    <Compile Include="stringprep\unicode\Combining.cs" />
-    <Compile Include="stringprep\unicode\CombiningData.cs" />
-    <Compile Include="stringprep\unicode\Compose.cs" />
-    <Compile Include="stringprep\unicode\ComposeData.cs" />
-    <Compile Include="stringprep\unicode\Decompose.cs" />
-    <Compile Include="stringprep\unicode\DecomposeData.cs" />
-    <Compile Include="stringprep\XmppNode.cs" />
-    <Compile Include="stringprep\XmppResource.cs" />
-    <Compile Include="xpnet\ContentToken.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="xpnet\Encoding.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="xpnet\Exceptions.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="xpnet\Position.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="xpnet\Token.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="xpnet\UTF8Encoding.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <EmbeddedResource Include="jabber\client\JabberClient.bmp">
-      <LogicalName>jabber.client.JabberClient.bmp</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\client\JabberClient.resx">
-      <DependentUpon>JabberClient.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\client\PresenceManager.bmp">
-      <LogicalName>jabber.client.PresenceManager.bmp</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\client\RosterManager.bmp">
-      <LogicalName>jabber.client.RosterManager.bmp</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\client\RosterManager.resx">
-      <DependentUpon>RosterManager.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\connection\XmppStream.resx">
-      <DependentUpon>XmppStream.cs</DependentUpon>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\server\JabberService.bmp">
-      <LogicalName>jabber.server.JabberService.bmp</LogicalName>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\server\JabberService.resx">
-      <DependentUpon>JabberService.cs</DependentUpon>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="jabbernet.key" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="jabber\connection\DiscoManager.bmp">
-      <LogicalName>jabber.connection.DiscoManager.bmp</LogicalName>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="jabber\connection\CapsManager.bmp">
-      <LogicalName>jabber.connection.CapsManager.bmp</LogicalName>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="jabber\connection\PubSubManager.bmp">
-      <LogicalName>jabber.connection.PubSubManager.bmp</LogicalName>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="jabber\connection\CertificatePrompt.resx">
-      <SubType>Designer</SubType>
-      <DependentUpon>CertificatePrompt.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="jabber\connection\ConferenceManager.bmp">
-      <LogicalName>jabber.connection.ConferenceManager.bmp</LogicalName>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Condition="'$(BuildMono)'==''" Include="netlib.Dns\netlib.Dns.csproj">
-      <Project>{40AC7A7C-D3E5-46DF-B740-06BD9D2A00E1}</Project>
-      <Name>netlib.Dns</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="System.Data" />
-  </ItemGroup>
-  <Import Condition="'$(BuildMono)'==''" Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PreBuildEvent>
-    </PreBuildEvent>
-    <PostBuildEvent>
-    </PostBuildEvent>
-    <SignAssembly>false</SignAssembly>
-  </PropertyGroup>
-</Project>
diff --git a/lib/jabber-net/AssemblyInfo.cs b/lib/jabber-net/AssemblyInfo.cs
deleted file mode 100644
index fe41d25..0000000
--- a/lib/jabber-net/AssemblyInfo.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.1433
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("Jabber-Net library")]
-[assembly: AssemblyDescription("Connect to Jabber (http://www.jabber.org/) from .Net")]
-[assembly: AssemblyCompany("Cursive Systems, Inc.")]
-[assembly: AssemblyProduct("jabber-net")]
-[assembly: AssemblyCopyright("Copyright (c) Cursive, Inc. 2000-2008")]
-[assembly: AssemblyVersion("2.0.0.613")]
-[assembly: AssemblyDelaySign(false)]
-[assembly: CLSCompliant(true)]
-
diff --git a/lib/jabber-net/ConsoleClient/AssemblyInfo.cs b/lib/jabber-net/ConsoleClient/AssemblyInfo.cs
deleted file mode 100644
index ba2e543..0000000
--- a/lib/jabber-net/ConsoleClient/AssemblyInfo.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("ConsoleClient")]
-[assembly: AssemblyDescription("Jabber-net console client example")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Cursive Systems, Inc.")]
-[assembly: AssemblyProduct("jnExample")]
-[assembly: AssemblyCopyright("Copyright (c) Cursive Systems, 2000-2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
diff --git a/lib/jabber-net/ConsoleClient/Main.cs b/lib/jabber-net/ConsoleClient/Main.cs
deleted file mode 100644
index 76ba6fe..0000000
--- a/lib/jabber-net/ConsoleClient/Main.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Threading;
-using System.Xml;
-
-using bedrock.util;
-using jabber;
-using jabber.client;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using jabber.connection;
-
-namespace ConsoleClient
-{
-    /// <summary>
-    /// Summary description for Class1.
-    /// </summary>
-    [SVN(@"$Id$")]
-    class Class1
-    {
-        [CommandLine("j", "user at host Jabber ID", true)]
-        public string jid = null;
-
-        [CommandLine("p", "Password", false)]
-        public string pass = null;
-
-        [CommandLine("n", "Network Host", false)]
-        public string networkHost = null;
-
-        [CommandLine("o", "Port", false)]
-        public int port = 5222;
-
-        [CommandLine("t", "TLS auto-start", false)]
-        public bool TLS = true;
-
-        [CommandLine("r", "Register user", false)]
-        public bool register = false;
-
-        [CommandLine("c", "Certificate file", false)]
-        public string certificateFile = null;
-
-        [CommandLine("w", "Certificate password", false)]
-        public string certificatePass = "";
-
-        [CommandLine("u", "Untrusted certificates OK", false)]
-        public bool untrustedOK = false;
-
-        [CommandLine("i", "Do not send initial presence", false)]
-        public bool initialPresence = true;
-
-        [CommandLine("b", "HTTP Binding (BOSH) URL", false)]
-        public string boshURL = null;
-
-        public Class1(string[] args)
-        {
-            JabberClient jc = new JabberClient();
-            jc.OnReadText += new bedrock.TextHandler(jc_OnReadText);
-            jc.OnWriteText += new bedrock.TextHandler(jc_OnWriteText);
-            jc.OnError +=new bedrock.ExceptionHandler(jc_OnError);
-            jc.OnStreamError += new jabber.protocol.ProtocolHandler(jc_OnStreamError);
-
-            jc.AutoReconnect = 3f;
-
-            GetOpt go = new GetOpt(this);
-            try
-            {
-                go.Process(args);
-            }
-            catch (ArgumentException)
-            {
-                go.UsageExit();
-            }
-
-            if (untrustedOK)
-                jc.OnInvalidCertificate += new System.Net.Security.RemoteCertificateValidationCallback(jc_OnInvalidCertificate);
-
-            JID j = new JID(jid);
-            jc.User = j.User;
-            jc.Server = j.Server;
-            jc.NetworkHost = networkHost;
-            jc.Port = port;
-            jc.Resource = "Jabber.Net Console Client";
-            jc.Password = pass;
-            jc.AutoStartTLS = TLS;
-            jc.AutoPresence = initialPresence;
-
-            if (certificateFile != null)
-            {
-                jc.SetCertificateFile(certificateFile, certificatePass);
-                Console.WriteLine(jc.LocalCertificate.ToString(true));
-            }
-
-            if (boshURL != null)
-            {
-                jc[Options.POLL_URL] = boshURL;
-                jc[Options.CONNECTION_TYPE] = ConnectionType.HTTP_Binding;
-            }
-            
-            if (register)
-            {
-                jc.AutoLogin = false;
-                jc.OnLoginRequired +=
-                    new bedrock.ObjectHandler(jc_OnLoginRequired);
-                jc.OnRegisterInfo += new RegisterInfoHandler(this.jc_OnRegisterInfo);
-                jc.OnRegistered += new IQHandler(jc_OnRegistered);
-            }
-
-            CapsManager cm = new CapsManager();
-            cm.Stream = jc;
-            cm.Node = "http://cursive.net/clients/ConsoleClient";
-            
-            Console.WriteLine("Connecting");
-            jc.Connect();
-            Console.WriteLine("Connected");
-
-            string line;
-            while ((line = Console.ReadLine()) != null)
-            {
-                if (line == "/clear")
-                {
-                    // Hm.... I wonder if this works on windows.
-                    Console.Write("\x1b[H\x1b[2J");
-                    continue;
-                }
-                if ((line == "/q") || (line == "/quit"))
-                {
-                    jc.Close();
-                    break;
-                }
-                if (line.Trim() == "")
-                {
-                    continue;
-                }
-                try
-                {
-                    if (line == "</stream:stream>")
-                    {
-                        jc.Write(line);
-                    }
-                    else
-                    {
-                        // TODO: deal with stanzas that span lines... keep
-                        // parsing until we have a full "doc".
-                        XmlDocument doc = new XmlDocument();
-                        doc.LoadXml(line);
-                        XmlElement elem = doc.DocumentElement;
-                        if (elem != null)
-                            jc.Write(elem);
-                    }
-                }
-                catch (XmlException ex)
-                {
-                    Console.WriteLine("Invalid XML: " + ex.Message);
-                }
-            }
-        }
-
-        bool jc_OnInvalidCertificate(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            Console.WriteLine("Invalid certificate ({0}):\n{1}", sslPolicyErrors.ToString(), certificate.ToString(true));
-            return true;
-        }
-
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main(string[] args)
-        {
-            new Class1(args);
-        }
-
-        private void jc_OnReadText(object sender, string txt)
-        {
-            if (txt != " ")
-                Console.WriteLine("RECV: " + txt);
-        }
-
-        private void jc_OnWriteText(object sender, string txt)
-        {
-            if (txt != " ")
-                Console.WriteLine("SENT: " + txt);
-        }
-
-        private void jc_OnError(object sender, Exception ex)
-        {
-            Console.WriteLine("ERROR: " + ex.ToString());
-            Environment.Exit(1);
-        }
-
-        private void jc_OnStreamError(object sender, System.Xml.XmlElement rp)
-        {
-            Console.WriteLine("Stream ERROR: " + rp.OuterXml);
-            Environment.Exit(1);
-        }
-
-        private void jc_OnLoginRequired(object sender)
-        {
-            Console.WriteLine("Registering");
-            JabberClient jc = (JabberClient) sender;
-            jc.Register(new JID(jc.User, jc.Server, null));
-        }
-
-        private void jc_OnRegistered(object sender,
-                                     IQ iq)
-        {
-            JabberClient jc = (JabberClient) sender;
-            if (iq.Type == IQType.result)
-                jc.Login();
-        }
-
-        private bool jc_OnRegisterInfo(object sender, Register r)
-        {
-            return true;
-        }
-    }
-}
diff --git a/lib/jabber-net/Example/AddContact.cs b/lib/jabber-net/Example/AddContact.cs
deleted file mode 100644
index 2d871bd..0000000
--- a/lib/jabber-net/Example/AddContact.cs
+++ /dev/null
@@ -1,325 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-
-using bedrock.util;
-using jabber;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class AddContact : Form
-    {
-
-        private Label label1;
-        private TextBox txtJID;
-        private Label label2;
-        private TextBox txtNickname;
-        private Label label3;
-        private CheckedListBox lbGroups;
-        private Button btnOK;
-        private Button btnCancel;
-        private TextBox txtGroup;
-        private Button btnAdd;
-
-        private string m_domain = null;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        public AddContact()
-        {
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        /// <summary>
-        /// The Jabber ID to subscribe to.
-        /// </summary>
-        public JID JID
-        {
-            get
-            {
-                return new JID(txtJID.Text);
-            }
-            set
-            {
-                txtJID.Text = value.ToString();
-            }
-        }
-
-        public string Nickname
-        {
-            get
-            {
-                return txtNickname.Text;
-            }
-            set
-            {
-                txtNickname.Text = value;
-            }
-        }
-
-        /// <summary>
-        /// All of the groups, checked or not.
-        /// </summary>
-        public string[] AllGroups
-        {
-            get
-            {
-                string[] items = new string[lbGroups.Items.Count];
-                lbGroups.Items.CopyTo(items, 0);
-                return items;
-            }
-            set
-            {
-                lbGroups.BeginUpdate();
-                lbGroups.Items.Clear();
-                lbGroups.Items.AddRange(value);
-                lbGroups.EndUpdate();
-            }
-        }
-
-        /// <summary>
-        /// The groups that have been selected
-        /// </summary>
-        public string[] SelectedGroups
-        {
-            get
-            {
-                string[] items = new string[lbGroups.CheckedItems.Count];
-                lbGroups.CheckedItems.CopyTo(items, 0);
-                return items;
-            }
-            set
-            {
-                lbGroups.BeginUpdate();
-                lbGroups.ClearSelected();
-                for (int i=0; i<lbGroups.Items.Count; i++ )
-                {
-                    for (int j=0; j<value.Length; j++)
-                    {
-                        if (((string)lbGroups.Items[i]) == value[j])
-                        {
-                            lbGroups.SetItemChecked(i, true);
-                        }
-                    }
-                }
-                lbGroups.EndUpdate();
-            }
-        }
-
-        /// <summary>
-        /// Use this domain, if one isn't provided in the JID.
-        /// </summary>
-        public string DefaultDomain
-        {
-            get { return m_domain; }
-            set { m_domain = value; }
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.txtJID = new System.Windows.Forms.TextBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.txtNickname = new System.Windows.Forms.TextBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.lbGroups = new System.Windows.Forms.CheckedListBox();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.txtGroup = new System.Windows.Forms.TextBox();
-            this.btnAdd = new System.Windows.Forms.Button();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(54, 9);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(26, 13);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "JID:";
-            //
-            // txtJID
-            //
-            this.txtJID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtJID.Location = new System.Drawing.Point(86, 6);
-            this.txtJID.Name = "txtJID";
-            this.txtJID.Size = new System.Drawing.Size(269, 20);
-            this.txtJID.TabIndex = 1;
-            this.txtJID.Leave += new System.EventHandler(this.txtJID_Leave);
-            //
-            // label2
-            //
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(22, 35);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(58, 13);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Nickname:";
-            //
-            // txtNickname
-            //
-            this.txtNickname.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtNickname.Location = new System.Drawing.Point(86, 32);
-            this.txtNickname.Name = "txtNickname";
-            this.txtNickname.Size = new System.Drawing.Size(269, 20);
-            this.txtNickname.TabIndex = 3;
-            //
-            // label3
-            //
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(36, 58);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(44, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "Groups:";
-            //
-            // lbGroups
-            //
-            this.lbGroups.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.lbGroups.Location = new System.Drawing.Point(86, 58);
-            this.lbGroups.Name = "lbGroups";
-            this.lbGroups.Size = new System.Drawing.Size(269, 124);
-            this.lbGroups.Sorted = true;
-            this.lbGroups.TabIndex = 5;
-            //
-            // btnOK
-            //
-            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(199, 215);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 8;
-            this.btnOK.Text = "OK";
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(280, 216);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 9;
-            this.btnCancel.Text = "Cancel";
-            //
-            // txtGroup
-            //
-            this.txtGroup.Location = new System.Drawing.Point(86, 190);
-            this.txtGroup.Name = "txtGroup";
-            this.txtGroup.Size = new System.Drawing.Size(269, 20);
-            this.txtGroup.TabIndex = 6;
-            this.txtGroup.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtGroup_KeyDown);
-            //
-            // btnAdd
-            //
-            this.btnAdd.Location = new System.Drawing.Point(12, 188);
-            this.btnAdd.Name = "btnAdd";
-            this.btnAdd.Size = new System.Drawing.Size(68, 23);
-            this.btnAdd.TabIndex = 7;
-            this.btnAdd.Text = "Add Group";
-            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
-            //
-            // AddContact
-            //
-            this.AcceptButton = this.btnOK;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(367, 250);
-            this.Controls.Add(this.btnAdd);
-            this.Controls.Add(this.txtGroup);
-            this.Controls.Add(this.btnCancel);
-            this.Controls.Add(this.btnOK);
-            this.Controls.Add(this.lbGroups);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.txtNickname);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.txtJID);
-            this.Controls.Add(this.label1);
-            this.Name = "AddContact";
-            this.Text = "Add Contact";
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private void btnAdd_Click(object sender, EventArgs e)
-        {
-            string g = txtGroup.Text.Trim();
-            if (g != "")
-            {
-                int item = lbGroups.Items.Add(g, true);
-                lbGroups.TopIndex = item;
-                txtGroup.Clear();
-            }
-        }
-
-        private void txtGroup_KeyDown(object sender, KeyEventArgs e)
-        {
-            // TODO: this doesn't actually work.
-            if (e.KeyCode == Keys.Return)
-            {
-                btnAdd_Click(null, null);
-#if NET_20
-                e.SuppressKeyPress = true;
-#endif
-            }
-        }
-
-        private void txtJID_Leave(object sender, EventArgs e)
-        {
-            if (!txtJID.Text.Contains("@") && (m_domain != null))
-            {
-                txtJID.Text = txtJID.Text + "@" + m_domain;
-            }
-            if (txtNickname.Text == "")
-            {
-                JID jid = new JID(txtJID.Text);
-                txtNickname.Text = jid.User;
-            }
-        }
-
-    }
-}
diff --git a/lib/jabber-net/Example/AddGroup.cs b/lib/jabber-net/Example/AddGroup.cs
deleted file mode 100644
index 64d649c..0000000
--- a/lib/jabber-net/Example/AddGroup.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-
-using bedrock.util;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class AddGroup : Form
-    {
-        private System.Windows.Forms.TextBox textBox1;
-        private System.Windows.Forms.Button btnOK;
-        private System.Windows.Forms.Button btnCancel;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        public AddGroup()
-        {
-            InitializeComponent();
-        }
-
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-
-        /// <summary>
-        /// Get the new group name.
-        /// </summary>
-        public string GroupName
-        {
-            get { return textBox1.Text; }
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.textBox1 = new System.Windows.Forms.TextBox();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.SuspendLayout();
-            //
-            // textBox1
-            //
-            this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.textBox1.Location = new System.Drawing.Point(12, 12);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(176, 20);
-            this.textBox1.TabIndex = 0;
-            //
-            // btnOK
-            //
-            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(32, 38);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 1;
-            this.btnOK.Text = "OK";
-            this.btnOK.UseVisualStyleBackColor = true;
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(113, 38);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 2;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.UseVisualStyleBackColor = true;
-            //
-            // AddGroup
-            //
-            this.AcceptButton = this.btnOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(200, 70);
-            this.Controls.Add(this.btnCancel);
-            this.Controls.Add(this.btnOK);
-            this.Controls.Add(this.textBox1);
-            this.Name = "AddGroup";
-            this.Text = "Add Group";
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-    }
-}
diff --git a/lib/jabber-net/Example/AssemblyInfo.cs b/lib/jabber-net/Example/AssemblyInfo.cs
deleted file mode 100644
index 41a4b8c..0000000
--- a/lib/jabber-net/Example/AssemblyInfo.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Reflection;
-
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("Example")]
-[assembly: AssemblyDescription("Jabber-net examples")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Cursive Systems, Inc.")]
-[assembly: AssemblyProduct("jnExample")]
-[assembly: AssemblyCopyright("Copyright (c) Cursive Systems, 2000-2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
diff --git a/lib/jabber-net/Example/ConferenceForm.cs b/lib/jabber-net/Example/ConferenceForm.cs
deleted file mode 100644
index a07f3a1..0000000
--- a/lib/jabber-net/Example/ConferenceForm.cs
+++ /dev/null
@@ -1,253 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-
-using bedrock.util;
-using jabber;
-using jabber.connection;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class ConferenceForm : Form
-    {
-        private Label label1;
-        private Label label2;
-        private ComboBox cmbJID;
-        private TextBox txtRoom;
-        private Button btnOK;
-        private Button btnCancel;
-
-        private DiscoManager m_disco = null;
-        private TextBox txtNick;
-        private Label label3;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        public ConferenceForm()
-        {
-            InitializeComponent();
-        }
-
-        public DiscoManager DiscoManager
-        {
-            get { return m_disco; }
-            set { m_disco = value; }
-        }
-
-        public JID RoomJID
-        {
-            get
-            {
-                return new JID(txtRoom.Text, cmbJID.Text, null);
-            }
-        }
-
-        public JID RoomAndNick
-        {
-            get
-            {
-                return new JID(txtRoom.Text, cmbJID.Text, txtNick.Text);
-            }
-            set
-            {
-                if (value == null)
-                {
-                    cmbJID.Text = txtRoom.Text = txtNick.Text = "";
-                }
-                else
-                {
-                    cmbJID.Text = value.Server;
-                    txtRoom.Text = value.User;
-                    txtNick.Text = value.Resource;
-                }
-            }
-        }
-
-        public string Nick
-        {
-            get { return txtNick.Text; }
-            set { txtNick.Text = value; }
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.cmbJID = new System.Windows.Forms.ComboBox();
-            this.txtRoom = new System.Windows.Forms.TextBox();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.txtNick = new System.Windows.Forms.TextBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(12, 9);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(99, 13);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "Conference Server:";
-            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // label2
-            //
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(73, 35);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(38, 13);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Room:";
-            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // cmbJID
-            //
-            this.cmbJID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.cmbJID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
-            this.cmbJID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
-            this.cmbJID.Location = new System.Drawing.Point(118, 5);
-            this.cmbJID.Name = "cmbJID";
-            this.cmbJID.Size = new System.Drawing.Size(156, 21);
-            this.cmbJID.TabIndex = 1;
-            //
-            // txtRoom
-            //
-            this.txtRoom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtRoom.Location = new System.Drawing.Point(118, 32);
-            this.txtRoom.Name = "txtRoom";
-            this.txtRoom.Size = new System.Drawing.Size(156, 20);
-            this.txtRoom.TabIndex = 3;
-            //
-            // btnOK
-            //
-            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(118, 84);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 6;
-            this.btnOK.Text = "OK";
-            this.btnOK.UseVisualStyleBackColor = true;
-            //
-            // btnCancel
-            //
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(199, 84);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 7;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.UseVisualStyleBackColor = true;
-            //
-            // txtNick
-            //
-            this.txtNick.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtNick.Location = new System.Drawing.Point(118, 58);
-            this.txtNick.Name = "txtNick";
-            this.txtNick.Size = new System.Drawing.Size(156, 20);
-            this.txtNick.TabIndex = 5;
-            //
-            // label3
-            //
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(53, 61);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(58, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "Nickname:";
-            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // ConferenceForm
-            //
-            this.AcceptButton = this.btnOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(286, 117);
-            this.Controls.Add(this.txtNick);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.btnCancel);
-            this.Controls.Add(this.btnOK);
-            this.Controls.Add(this.txtRoom);
-            this.Controls.Add(this.cmbJID);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
-            this.Name = "ConferenceForm";
-            this.Text = "Join/Create room";
-            this.Shown += new System.EventHandler(this.ConferenceForm_Shown);
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-
-        private void ConferenceForm_Shown(object sender, EventArgs e)
-        {
-            cmbJID.BeginUpdate();
-            cmbJID.Items.Clear();
-            if (m_disco != null)
-                m_disco.BeginGetItems(null, GotRoot, null);
-            else
-                cmbJID.EndUpdate();
-        }
-
-        private void GotRoot(DiscoManager sender, DiscoNode node, object state)
-        {
-            if (node.Children != null)
-            {
-                foreach (DiscoNode component in node.Children)
-                {
-                    if (component.HasFeature(jabber.protocol.URI.MUC))
-                        cmbJID.Items.Add(component.JID);
-                }
-                if (cmbJID.Items.Count > 0)
-                    cmbJID.SelectedIndex = 0;
-            }
-            cmbJID.EndUpdate();
-        }
-    }
-}
diff --git a/lib/jabber-net/Example/MainForm.cs b/lib/jabber-net/Example/MainForm.cs
deleted file mode 100644
index 7388757..0000000
--- a/lib/jabber-net/Example/MainForm.cs
+++ /dev/null
@@ -1,1224 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Xml;
-using bedrock.util;
-using jabber;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace Example
-{
-    /// <summary>
-    /// Summary description for MainForm.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class MainForm : Form
-    {
-        #region Private Members
-
-        private StatusBar sb;
-        private jabber.client.JabberClient jc;
-        private jabber.client.RosterManager rm;
-        private jabber.client.PresenceManager pm;
-        private TabControl tabControl1;
-        private TabPage tpDebug;
-        private TabPage tpRoster;
-        private StatusBarPanel pnlCon;
-        private StatusBarPanel pnlPresence;
-        private ContextMenu mnuPresence;
-        private MenuItem mnuAvailable;
-        private MenuItem mnuAway;
-        private IContainer components;
-        private muzzle.RosterTree roster;
-        private StatusBarPanel pnlSSL;
-        private DiscoManager dm;
-        private TabPage tpServices;
-        private CapsManager cm;
-        private muzzle.XmppDebugger debug;
-        private PubSubManager psm;
-        private MenuStrip menuStrip1;
-        private ToolStripMenuItem fileToolStripMenuItem;
-        private ToolStripMenuItem connectToolStripMenuItem;
-        private ToolStripSeparator toolStripMenuItem1;
-        private ToolStripMenuItem exitToolStripMenuItem;
-        private ToolStripMenuItem viewToolStripMenuItem;
-        private ToolStripMenuItem servicesToolStripMenuItem;
-        private ToolStripMenuItem debugToolStripMenuItem;
-        private ToolStripMenuItem rosterToolStripMenuItem;
-        private ToolStripMenuItem addContactToolStripMenuItem;
-        private ToolStripMenuItem removeContactToolStripMenuItem;
-        private ToolStripMenuItem addGroupToolStripMenuItem;
-        private IdleTime idler;
-        private ServiceDisplay services;
-        private ToolStripMenuItem windowToolStripMenuItem;
-        private ToolStripMenuItem closeTabToolStripMenuItem;
-        private ToolStripMenuItem deletePubSubToolStripMenuItem;
-        private ToolStripMenuItem subscribePubSubToolStripMenuItem;
-        private ToolStripMenuItem pubSubToolStripMenuItem;
-        private ConferenceManager muc;
-        private ToolStripMenuItem joinConferenceToolStripMenuItem;
-
-        private bool m_err = false;
-        private jabber.client.BookmarkManager bmm;
-        private TabPage tpBookmarks;
-        private ListView lvBookmarks;
-        private ColumnHeader chName;
-        private ColumnHeader chNick;
-        private ColumnHeader chAutoJoin;
-        private ToolStripMenuItem bookmarkToolStripMenuItem;
-        private ToolStripMenuItem addToolStripMenuItem;
-        private ToolStripMenuItem removeToolStripMenuItem;
-        private bool m_connected = false;
-
-        #endregion
-
-        public MainForm()
-        {
-            //
-            // Required for Windows Form Designer support
-            //
-            InitializeComponent();
-
-            services.ImageList = roster.ImageList;
-            cm.AddFeature(URI.TIME);
-            cm.AddFeature(URI.VERSION);
-            cm.AddFeature(URI.LAST);
-            cm.AddFeature(URI.DISCO_INFO);
-
-            tabControl1.TabPages.Remove(tpServices);
-            tabControl1.TabPages.Remove(tpDebug);
-            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
-        }
-
-
-        void idler_OnUnIdle(object sender, TimeSpan span)
-        {
-            jc.Presence(PresenceType.available, "Available", null, 0);
-            pnlPresence.Text = "Available";
-        }
-
-        private void idler_OnIdle(object sender, TimeSpan span)
-        {
-            jc.Presence(PresenceType.available, "Auto-away", "away", 0);
-            pnlPresence.Text = "Away";
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            idler.Enabled = false;
-
-            if( disposing )
-            {
-                if (components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-#region Windows Form Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            jabber.connection.Ident ident2 = new jabber.connection.Ident();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
-            this.sb = new System.Windows.Forms.StatusBar();
-            this.pnlCon = new System.Windows.Forms.StatusBarPanel();
-            this.pnlSSL = new System.Windows.Forms.StatusBarPanel();
-            this.pnlPresence = new System.Windows.Forms.StatusBarPanel();
-            this.tabControl1 = new System.Windows.Forms.TabControl();
-            this.tpRoster = new System.Windows.Forms.TabPage();
-            this.roster = new muzzle.RosterTree();
-            this.jc = new jabber.client.JabberClient(this.components);
-            this.pm = new jabber.client.PresenceManager(this.components);
-            this.cm = new jabber.connection.CapsManager(this.components);
-            this.dm = new jabber.connection.DiscoManager(this.components);
-            this.rm = new jabber.client.RosterManager(this.components);
-            this.tpServices = new System.Windows.Forms.TabPage();
-            this.services = new Example.ServiceDisplay();
-            this.tpBookmarks = new System.Windows.Forms.TabPage();
-            this.lvBookmarks = new System.Windows.Forms.ListView();
-            this.chName = new System.Windows.Forms.ColumnHeader();
-            this.chNick = new System.Windows.Forms.ColumnHeader();
-            this.chAutoJoin = new System.Windows.Forms.ColumnHeader();
-            this.tpDebug = new System.Windows.Forms.TabPage();
-            this.debug = new muzzle.XmppDebugger();
-            this.mnuPresence = new System.Windows.Forms.ContextMenu();
-            this.mnuAvailable = new System.Windows.Forms.MenuItem();
-            this.mnuAway = new System.Windows.Forms.MenuItem();
-            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
-            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.connectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.joinConferenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
-            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.servicesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.rosterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.addContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.removeContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.addGroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.bookmarkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.closeTabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.pubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.subscribePubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.deletePubSubToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-            this.psm = new jabber.connection.PubSubManager(this.components);
-            this.idler = new bedrock.util.IdleTime();
-            this.muc = new jabber.connection.ConferenceManager(this.components);
-            this.bmm = new jabber.client.BookmarkManager(this.components);
-            ((System.ComponentModel.ISupportInitialize)(this.pnlCon)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pnlSSL)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pnlPresence)).BeginInit();
-            this.tabControl1.SuspendLayout();
-            this.tpRoster.SuspendLayout();
-            this.tpServices.SuspendLayout();
-            this.tpBookmarks.SuspendLayout();
-            this.tpDebug.SuspendLayout();
-            this.menuStrip1.SuspendLayout();
-            this.SuspendLayout();
-            // 
-            // sb
-            // 
-            this.sb.Location = new System.Drawing.Point(0, 416);
-            this.sb.Name = "sb";
-            this.sb.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
-            this.pnlCon,
-            this.pnlSSL,
-            this.pnlPresence});
-            this.sb.ShowPanels = true;
-            this.sb.Size = new System.Drawing.Size(632, 22);
-            this.sb.TabIndex = 0;
-            this.sb.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.sb_PanelClick);
-            // 
-            // pnlCon
-            // 
-            this.pnlCon.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
-            this.pnlCon.Name = "pnlCon";
-            this.pnlCon.Text = "Click on \"Offline\", and select a presence to log in.";
-            this.pnlCon.Width = 538;
-            // 
-            // pnlSSL
-            // 
-            this.pnlSSL.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
-            this.pnlSSL.Name = "pnlSSL";
-            this.pnlSSL.Width = 30;
-            // 
-            // pnlPresence
-            // 
-            this.pnlPresence.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
-            this.pnlPresence.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
-            this.pnlPresence.Name = "pnlPresence";
-            this.pnlPresence.Text = "Offline";
-            this.pnlPresence.Width = 47;
-            // 
-            // tabControl1
-            // 
-            this.tabControl1.Controls.Add(this.tpRoster);
-            this.tabControl1.Controls.Add(this.tpServices);
-            this.tabControl1.Controls.Add(this.tpBookmarks);
-            this.tabControl1.Controls.Add(this.tpDebug);
-            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tabControl1.Location = new System.Drawing.Point(0, 24);
-            this.tabControl1.Name = "tabControl1";
-            this.tabControl1.SelectedIndex = 0;
-            this.tabControl1.Size = new System.Drawing.Size(632, 392);
-            this.tabControl1.TabIndex = 2;
-            // 
-            // tpRoster
-            // 
-            this.tpRoster.Controls.Add(this.roster);
-            this.tpRoster.Location = new System.Drawing.Point(4, 22);
-            this.tpRoster.Name = "tpRoster";
-            this.tpRoster.Size = new System.Drawing.Size(624, 366);
-            this.tpRoster.TabIndex = 1;
-            this.tpRoster.Text = "Roster";
-            this.tpRoster.UseVisualStyleBackColor = true;
-            // 
-            // roster
-            // 
-            this.roster.AllowDrop = true;
-            this.roster.Client = this.jc;
-            this.roster.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.roster.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawText;
-            this.roster.ImageIndex = 1;
-            this.roster.Location = new System.Drawing.Point(0, 0);
-            this.roster.Name = "roster";
-            this.roster.PresenceManager = this.pm;
-            this.roster.RosterManager = this.rm;
-            this.roster.SelectedImageIndex = 0;
-            this.roster.ShowLines = false;
-            this.roster.ShowRootLines = false;
-            this.roster.Size = new System.Drawing.Size(624, 366);
-            this.roster.Sorted = true;
-            this.roster.StatusColor = System.Drawing.Color.Teal;
-            this.roster.TabIndex = 0;
-            this.roster.DoubleClick += new System.EventHandler(this.roster_DoubleClick);
-            // 
-            // jc
-            // 
-            this.jc.AutoReconnect = 3F;
-            this.jc.AutoStartCompression = true;
-            this.jc.AutoStartTLS = true;
-            this.jc.InvokeControl = this;
-            this.jc.KeepAlive = 30F;
-            this.jc.LocalCertificate = null;
-            this.jc.Password = null;
-            this.jc.User = null;
-            this.jc.OnRegisterInfo += new jabber.client.RegisterInfoHandler(this.jc_OnRegisterInfo);
-            this.jc.OnError += new bedrock.ExceptionHandler(this.jc_OnError);
-            this.jc.OnIQ += new jabber.client.IQHandler(this.jc_OnIQ);
-            this.jc.OnAuthenticate += new bedrock.ObjectHandler(this.jc_OnAuthenticate);
-            this.jc.OnStreamError += new jabber.protocol.ProtocolHandler(this.jc_OnStreamError);
-            this.jc.OnConnect += new jabber.connection.StanzaStreamHandler(this.jc_OnConnect);
-            this.jc.OnDisconnect += new bedrock.ObjectHandler(this.jc_OnDisconnect);
-            this.jc.OnAuthError += new jabber.protocol.ProtocolHandler(this.jc_OnAuthError);
-            this.jc.OnRegistered += new jabber.client.IQHandler(this.jc_OnRegistered);
-            this.jc.OnMessage += new jabber.client.MessageHandler(this.jc_OnMessage);
-            // 
-            // pm
-            // 
-            this.pm.CapsManager = this.cm;
-            this.pm.OverrideFrom = null;
-            this.pm.Stream = this.jc;
-            // 
-            // cm
-            // 
-            this.cm.DiscoManager = this.dm;
-            this.cm.Features = new string[0];
-            this.cm.FileName = "caps.xml";
-            ident2.Category = "client";
-            ident2.Lang = "en";
-            ident2.Name = "Jabber-Net Test Client";
-            ident2.Type = "pc";
-            this.cm.Identities = new jabber.connection.Ident[] {
-        ident2};
-            this.cm.Node = "http://cursive.net/clients/csharp-example";
-            this.cm.OverrideFrom = null;
-            this.cm.Stream = this.jc;
-            // 
-            // dm
-            // 
-            this.dm.OverrideFrom = null;
-            this.dm.Stream = this.jc;
-            // 
-            // rm
-            // 
-            this.rm.AutoAllow = jabber.client.AutoSubscriptionHanding.AllowIfSubscribed;
-            this.rm.AutoSubscribe = true;
-            this.rm.OverrideFrom = null;
-            this.rm.Stream = this.jc;
-            this.rm.OnRosterEnd += new bedrock.ObjectHandler(this.rm_OnRosterEnd);
-            this.rm.OnSubscription += new jabber.client.SubscriptionHandler(this.rm_OnSubscription);
-            this.rm.OnUnsubscription += new jabber.client.UnsubscriptionHandler(this.rm_OnUnsubscription);
-            // 
-            // tpServices
-            // 
-            this.tpServices.Controls.Add(this.services);
-            this.tpServices.Location = new System.Drawing.Point(4, 22);
-            this.tpServices.Name = "tpServices";
-            this.tpServices.Size = new System.Drawing.Size(624, 366);
-            this.tpServices.TabIndex = 2;
-            this.tpServices.Text = "Services";
-            this.tpServices.UseVisualStyleBackColor = true;
-            // 
-            // services
-            // 
-            this.services.DiscoManager = this.dm;
-            this.services.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.services.ImageList = null;
-            this.services.Location = new System.Drawing.Point(0, 0);
-            this.services.Name = "services";
-            this.services.Size = new System.Drawing.Size(624, 366);
-            this.services.Stream = this.jc;
-            this.services.TabIndex = 0;
-            // 
-            // tpBookmarks
-            // 
-            this.tpBookmarks.Controls.Add(this.lvBookmarks);
-            this.tpBookmarks.Location = new System.Drawing.Point(4, 22);
-            this.tpBookmarks.Name = "tpBookmarks";
-            this.tpBookmarks.Size = new System.Drawing.Size(624, 366);
-            this.tpBookmarks.TabIndex = 3;
-            this.tpBookmarks.Text = "Bookmarks";
-            this.tpBookmarks.UseVisualStyleBackColor = true;
-            // 
-            // lvBookmarks
-            // 
-            this.lvBookmarks.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
-            this.chName,
-            this.chNick,
-            this.chAutoJoin});
-            this.lvBookmarks.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.lvBookmarks.Location = new System.Drawing.Point(0, 0);
-            this.lvBookmarks.Name = "lvBookmarks";
-            this.lvBookmarks.Size = new System.Drawing.Size(624, 366);
-            this.lvBookmarks.Sorting = System.Windows.Forms.SortOrder.Ascending;
-            this.lvBookmarks.TabIndex = 0;
-            this.lvBookmarks.UseCompatibleStateImageBehavior = false;
-            this.lvBookmarks.View = System.Windows.Forms.View.Details;
-            this.lvBookmarks.DoubleClick += new System.EventHandler(this.lvBookmarks_DoubleClick);
-            this.lvBookmarks.KeyUp += new System.Windows.Forms.KeyEventHandler(this.lvBookmarks_KeyUp);
-            // 
-            // chName
-            // 
-            this.chName.Text = "Room";
-            this.chName.Width = 198;
-            // 
-            // chNick
-            // 
-            this.chNick.Text = "Nick";
-            this.chNick.Width = 88;
-            // 
-            // chAutoJoin
-            // 
-            this.chAutoJoin.Text = "AutoJoin";
-            // 
-            // tpDebug
-            // 
-            this.tpDebug.Controls.Add(this.debug);
-            this.tpDebug.Location = new System.Drawing.Point(4, 22);
-            this.tpDebug.Name = "tpDebug";
-            this.tpDebug.Size = new System.Drawing.Size(624, 366);
-            this.tpDebug.TabIndex = 0;
-            this.tpDebug.Text = "Debug";
-            this.tpDebug.UseVisualStyleBackColor = true;
-            // 
-            // debug
-            // 
-            this.debug.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.debug.ErrorColor = System.Drawing.Color.Red;
-            this.debug.Location = new System.Drawing.Point(0, 0);
-            this.debug.Name = "debug";
-            this.debug.OtherColor = System.Drawing.Color.Green;
-            this.debug.OverrideFrom = null;
-            this.debug.ReceiveColor = System.Drawing.Color.Orange;
-            this.debug.SendColor = System.Drawing.Color.Blue;
-            this.debug.Size = new System.Drawing.Size(624, 366);
-            this.debug.Stream = this.jc;
-            this.debug.TabIndex = 0;
-            this.debug.TextColor = System.Drawing.Color.Black;
-            // 
-            // mnuPresence
-            // 
-            this.mnuPresence.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
-            this.mnuAvailable,
-            this.mnuAway});
-            // 
-            // mnuAvailable
-            // 
-            this.mnuAvailable.Enabled = false;
-            this.mnuAvailable.Index = 0;
-            this.mnuAvailable.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
-            this.mnuAvailable.Text = "&Available";
-            this.mnuAvailable.Click += new System.EventHandler(this.mnuAvailable_Click);
-            // 
-            // mnuAway
-            // 
-            this.mnuAway.Enabled = false;
-            this.mnuAway.Index = 1;
-            this.mnuAway.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
-            this.mnuAway.Text = "A&way";
-            this.mnuAway.Click += new System.EventHandler(this.mnuAway_Click);
-            // 
-            // menuStrip1
-            // 
-            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.fileToolStripMenuItem,
-            this.viewToolStripMenuItem,
-            this.rosterToolStripMenuItem,
-            this.bookmarkToolStripMenuItem,
-            this.windowToolStripMenuItem,
-            this.pubSubToolStripMenuItem});
-            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
-            this.menuStrip1.Name = "menuStrip1";
-            this.menuStrip1.Size = new System.Drawing.Size(632, 24);
-            this.menuStrip1.TabIndex = 3;
-            this.menuStrip1.Text = "menuStrip1";
-            // 
-            // fileToolStripMenuItem
-            // 
-            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.connectToolStripMenuItem,
-            this.joinConferenceToolStripMenuItem,
-            this.toolStripMenuItem1,
-            this.exitToolStripMenuItem});
-            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
-            this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
-            this.fileToolStripMenuItem.Text = "&File";
-            // 
-            // connectToolStripMenuItem
-            // 
-            this.connectToolStripMenuItem.Name = "connectToolStripMenuItem";
-            this.connectToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F9;
-            this.connectToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
-            this.connectToolStripMenuItem.Text = "&Connect";
-            this.connectToolStripMenuItem.Click += new System.EventHandler(this.connectToolStripMenuItem_Click);
-            // 
-            // joinConferenceToolStripMenuItem
-            // 
-            this.joinConferenceToolStripMenuItem.Name = "joinConferenceToolStripMenuItem";
-            this.joinConferenceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.J)));
-            this.joinConferenceToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
-            this.joinConferenceToolStripMenuItem.Text = "&Join Conference";
-            this.joinConferenceToolStripMenuItem.Click += new System.EventHandler(this.joinConferenceToolStripMenuItem_Click);
-            // 
-            // toolStripMenuItem1
-            // 
-            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(197, 6);
-            // 
-            // exitToolStripMenuItem
-            // 
-            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
-            this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
-            this.exitToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
-            this.exitToolStripMenuItem.Text = "E&xit";
-            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
-            // 
-            // viewToolStripMenuItem
-            // 
-            this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.servicesToolStripMenuItem,
-            this.debugToolStripMenuItem});
-            this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
-            this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
-            this.viewToolStripMenuItem.Text = "&View";
-            // 
-            // servicesToolStripMenuItem
-            // 
-            this.servicesToolStripMenuItem.Name = "servicesToolStripMenuItem";
-            this.servicesToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F8;
-            this.servicesToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
-            this.servicesToolStripMenuItem.Text = "&Services";
-            this.servicesToolStripMenuItem.Click += new System.EventHandler(this.servicesToolStripMenuItem_Click);
-            // 
-            // debugToolStripMenuItem
-            // 
-            this.debugToolStripMenuItem.Name = "debugToolStripMenuItem";
-            this.debugToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
-            this.debugToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
-            this.debugToolStripMenuItem.Text = "&Debug";
-            this.debugToolStripMenuItem.Click += new System.EventHandler(this.debugToolStripMenuItem_Click);
-            // 
-            // rosterToolStripMenuItem
-            // 
-            this.rosterToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.addContactToolStripMenuItem,
-            this.removeContactToolStripMenuItem,
-            this.addGroupToolStripMenuItem});
-            this.rosterToolStripMenuItem.Name = "rosterToolStripMenuItem";
-            this.rosterToolStripMenuItem.Size = new System.Drawing.Size(51, 20);
-            this.rosterToolStripMenuItem.Text = "&Roster";
-            // 
-            // addContactToolStripMenuItem
-            // 
-            this.addContactToolStripMenuItem.Name = "addContactToolStripMenuItem";
-            this.addContactToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Insert;
-            this.addContactToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
-            this.addContactToolStripMenuItem.Text = "&Add Contact";
-            this.addContactToolStripMenuItem.Click += new System.EventHandler(this.menuItem3_Click);
-            // 
-            // removeContactToolStripMenuItem
-            // 
-            this.removeContactToolStripMenuItem.Name = "removeContactToolStripMenuItem";
-            this.removeContactToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete;
-            this.removeContactToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
-            this.removeContactToolStripMenuItem.Text = "&Remove Contact";
-            this.removeContactToolStripMenuItem.Click += new System.EventHandler(this.menuItem5_Click);
-            // 
-            // addGroupToolStripMenuItem
-            // 
-            this.addGroupToolStripMenuItem.Name = "addGroupToolStripMenuItem";
-            this.addGroupToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
-            this.addGroupToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
-            this.addGroupToolStripMenuItem.Text = "&Add Group";
-            this.addGroupToolStripMenuItem.Click += new System.EventHandler(this.addGroupToolStripMenuItem_Click);
-            // 
-            // bookmarkToolStripMenuItem
-            // 
-            this.bookmarkToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.addToolStripMenuItem,
-            this.removeToolStripMenuItem});
-            this.bookmarkToolStripMenuItem.Name = "bookmarkToolStripMenuItem";
-            this.bookmarkToolStripMenuItem.Size = new System.Drawing.Size(65, 20);
-            this.bookmarkToolStripMenuItem.Text = "Bookmark";
-            // 
-            // addToolStripMenuItem
-            // 
-            this.addToolStripMenuItem.Name = "addToolStripMenuItem";
-            this.addToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
-            this.addToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
-            this.addToolStripMenuItem.Text = "Add";
-            this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click);
-            // 
-            // removeToolStripMenuItem
-            // 
-            this.removeToolStripMenuItem.Name = "removeToolStripMenuItem";
-            this.removeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
-                        | System.Windows.Forms.Keys.B)));
-            this.removeToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
-            this.removeToolStripMenuItem.Text = "Remove";
-            this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click);
-            // 
-            // windowToolStripMenuItem
-            // 
-            this.windowToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.closeTabToolStripMenuItem});
-            this.windowToolStripMenuItem.Name = "windowToolStripMenuItem";
-            this.windowToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
-            this.windowToolStripMenuItem.Text = "&Window";
-            // 
-            // closeTabToolStripMenuItem
-            // 
-            this.closeTabToolStripMenuItem.Name = "closeTabToolStripMenuItem";
-            this.closeTabToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
-            this.closeTabToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
-            this.closeTabToolStripMenuItem.Text = "&Close Tab";
-            this.closeTabToolStripMenuItem.Click += new System.EventHandler(this.closeTabToolStripMenuItem_Click);
-            // 
-            // pubSubToolStripMenuItem
-            // 
-            this.pubSubToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.subscribePubSubToolStripMenuItem,
-            this.deletePubSubToolStripMenuItem});
-            this.pubSubToolStripMenuItem.Name = "pubSubToolStripMenuItem";
-            this.pubSubToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
-            this.pubSubToolStripMenuItem.Text = "PubSub";
-            // 
-            // subscribePubSubToolStripMenuItem
-            // 
-            this.subscribePubSubToolStripMenuItem.Name = "subscribePubSubToolStripMenuItem";
-            this.subscribePubSubToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
-            this.subscribePubSubToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
-            this.subscribePubSubToolStripMenuItem.Text = "&Subscribe";
-            this.subscribePubSubToolStripMenuItem.Click += new System.EventHandler(this.subscribeToPubSubToolStripMenuItem_Click);
-            // 
-            // deletePubSubToolStripMenuItem
-            // 
-            this.deletePubSubToolStripMenuItem.Name = "deletePubSubToolStripMenuItem";
-            this.deletePubSubToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F11;
-            this.deletePubSubToolStripMenuItem.Size = new System.Drawing.Size(156, 22);
-            this.deletePubSubToolStripMenuItem.Text = "&Delete";
-            this.deletePubSubToolStripMenuItem.Click += new System.EventHandler(this.deletePubSubToolStripMenuItem_Click);
-            // 
-            // psm
-            // 
-            this.psm.OverrideFrom = null;
-            this.psm.Stream = this.jc;
-            // 
-            // idler
-            // 
-            this.idler.InvokeControl = this;
-            this.idler.OnIdle += new bedrock.util.SpanEventHandler(this.idler_OnIdle);
-            this.idler.OnUnIdle += new bedrock.util.SpanEventHandler(this.idler_OnUnIdle);
-            // 
-            // muc
-            // 
-            this.muc.OverrideFrom = null;
-            this.muc.Stream = this.jc;
-            // 
-            // bmm
-            // 
-            this.bmm.ConferenceManager = this.muc;
-            this.bmm.OverrideFrom = null;
-            this.bmm.Stream = this.jc;
-            this.bmm.OnConferenceAdd += new jabber.client.BookmarkConferenceDelegate(this.bmm_OnConferenceAdd);
-            this.bmm.OnConferenceRemove += new jabber.client.BookmarkConferenceDelegate(this.bmm_OnConferenceRemove);
-            // 
-            // MainForm
-            // 
-            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-            this.ClientSize = new System.Drawing.Size(632, 438);
-            this.ContextMenu = this.mnuPresence;
-            this.Controls.Add(this.tabControl1);
-            this.Controls.Add(this.sb);
-            this.Controls.Add(this.menuStrip1);
-            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.MainMenuStrip = this.menuStrip1;
-            this.Name = "MainForm";
-            this.Text = "MainForm";
-            this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
-            ((System.ComponentModel.ISupportInitialize)(this.pnlCon)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pnlSSL)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.pnlPresence)).EndInit();
-            this.tabControl1.ResumeLayout(false);
-            this.tpRoster.ResumeLayout(false);
-            this.tpServices.ResumeLayout(false);
-            this.tpBookmarks.ResumeLayout(false);
-            this.tpDebug.ResumeLayout(false);
-            this.menuStrip1.ResumeLayout(false);
-            this.menuStrip1.PerformLayout();
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-#endregion
-
-        /// <summary>
-        /// The MainForm entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            Application.Run(new MainForm());
-        }
-
-        private void Connect()
-        {
-            muzzle.ClientLogin.Login(jc, "login.xml");
-        }
-
-        private void jc_OnAuthenticate(object sender)
-        {
-            pnlPresence.Text = "Available";
-            pnlCon.Text = "Connected";
-            mnuAway.Enabled = mnuAvailable.Enabled = true;
-
-            if (jc.SSLon)
-            {
-
-                pnlSSL.Text = "SSL";
-                System.Security.Cryptography.X509Certificates.X509Certificate cert2 =
-                    (System.Security.Cryptography.X509Certificates.X509Certificate)
-                    jc[Options.REMOTE_CERTIFICATE];
-
-                string cert_str = cert2.ToString(true);
-                debug.Write("CERT:", cert_str);
-                pnlSSL.ToolTipText = cert_str;
-            }
-            idler.Enabled = true;
-        }
-
-        private void jc_OnDisconnect(object sender)
-        {
-            m_connected = false;
-            mnuAway.Enabled = mnuAvailable.Enabled = false;
-            idler.Enabled = false;
-            pnlPresence.Text = "Offline";
-            pnlSSL.Text = "";
-            pnlSSL.ToolTipText = "";
-            connectToolStripMenuItem.Text = "&Connect";
-            lvBookmarks.Items.Clear();
-
-            if (!m_err)
-                pnlCon.Text = "Disconnected";
-        }
-
-        private void jc_OnError(object sender, Exception ex)
-        {
-            m_connected = false;
-            mnuAway.Enabled = mnuAvailable.Enabled = false;
-            connectToolStripMenuItem.Text = "&Connect";
-            idler.Enabled = false;
-            lvBookmarks.Items.Clear();
-
-            pnlCon.Text = "Error: " + ex.Message;
-        }
-
-        private void jc_OnAuthError(object sender, XmlElement elem)
-        {
-            if (MessageBox.Show(this,
-                "Create new account?",
-                "Authentication error",
-                MessageBoxButtons.OKCancel,
-                MessageBoxIcon.Warning) == DialogResult.OK)
-            {
-                if (!m_connected)
-                {
-                    MessageBox.Show("You have been disconnected by the server.  Registration is not enabled.", "Disconnected", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                    return;
-                }
-                jc.Register(new JID(jc.User, jc.Server, null));
-            }
-            else
-            {
-                jc.Close(false);
-            }
-        }
-
-        private void jc_OnRegistered(object sender, IQ iq)
-        {
-            if (iq.Type == IQType.result)
-                jc.Login();
-            else
-                pnlCon.Text = "Registration error";
-        }
-
-        private bool jc_OnRegisterInfo(object sender, Register r)
-        {
-            if (r.Form == null)
-                return true;
-            muzzle.XDataForm f = new muzzle.XDataForm(r.Form);
-            if (f.ShowDialog() != DialogResult.OK)
-                return false;
-            f.FillInResponse(r.Form);
-            return true;
-        }
-
-        private void jc_OnMessage(object sender, jabber.protocol.client.Message msg)
-        {
-            jabber.protocol.x.Data x = msg["x", URI.XDATA] as jabber.protocol.x.Data;
-            if (x != null)
-            {
-                muzzle.XDataForm f = new muzzle.XDataForm(msg);
-                f.ShowDialog(this);
-                jc.Write(f.GetResponse());
-            }
-            else
-                MessageBox.Show(this, msg.Body, msg.From, MessageBoxButtons.OK);
-        }
-
-        private void jc_OnIQ(object sender, IQ iq)
-        {
-            if (iq.Type != IQType.get)
-                return;
-
-            XmlElement query = iq.Query;
-            if (query == null)
-                return;
-
-            // <iq id="jcl_8" to="me" from="you" type="get"><query xmlns="jabber:iq:version"/></iq>
-            if (query is jabber.protocol.iq.Version)
-            {
-                iq = iq.GetResponse(jc.Document);
-                jabber.protocol.iq.Version ver = iq.Query as jabber.protocol.iq.Version;
-                if (ver != null)
-                {
-                    ver.OS = Environment.OSVersion.ToString();
-                    ver.EntityName = Application.ProductName;
-                    ver.Ver = Application.ProductVersion;
-                }
-                jc.Write(iq);
-                return;
-            }
-
-            if (query is Time)
-            {
-                iq = iq.GetResponse(jc.Document);
-                Time tim = iq.Query as Time;
-                if (tim != null) tim.SetCurrentTime();
-                jc.Write(iq);
-                return;
-            }
-
-            if (query is Last)
-            {
-                iq = iq.GetResponse(jc.Document);
-                Last last = iq.Query as Last;
-                if (last != null) last.Seconds = (int)IdleTime.GetIdleTime();
-                jc.Write(iq);
-                return;
-            }
-        }
-
-        private void roster_DoubleClick(object sender, EventArgs e)
-        {
-            muzzle.RosterTree.ItemNode n = roster.SelectedNode as muzzle.RosterTree.ItemNode;
-            if (n == null)
-                return;
-            new SendMessage(jc, n.JID).Show();
-        }
-
-        private void sb_PanelClick(object sender, StatusBarPanelClickEventArgs e)
-        {
-            if (e.StatusBarPanel != pnlPresence)
-                return;
-            mnuPresence.Show(sb, new Point(e.X, e.Y));
-        }
-
-        private void connectToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (jc.IsAuthenticated)
-            {
-                jc.Close(true);
-                connectToolStripMenuItem.Text = "&Connect";
-            }
-            else
-            {
-                Connect();
-                connectToolStripMenuItem.Text = "Dis&connect";
-            }
-        }
-
-        private void mnuAvailable_Click(object sender, EventArgs e)
-        {
-            if (jc.IsAuthenticated)
-            {
-                jc.Presence(PresenceType.available, "Available", null, 0);
-                pnlPresence.Text = "Available";
-            }
-            else
-                Connect();
-        }
-
-        private void mnuAway_Click(object sender, EventArgs e)
-        {
-            if (jc.IsAuthenticated)
-            {
-                jc.Presence(PresenceType.available, "Away", "away", 0);
-                pnlPresence.Text = "Away";
-            }
-            else
-                Connect();
-        }
-
-        /*
-        private void mnuOffline_Click(object sender, EventArgs e)
-        {
-            if (jc.IsAuthenticated)
-                jc.Close();
-        }
-         */
-
-        void jc_OnConnect(object sender, StanzaStream stream)
-        {
-            m_err = false;
-            m_connected = true;
-        }
-
-        private void jc_OnStreamError(object sender, XmlElement rp)
-        {
-            m_err = true;
-            pnlCon.Text = "Stream error: " + rp.InnerText;
-        }
-
-        /*
-        private void txtDebugInput_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
-        {
-            if ((e.KeyCode == Keys.Enter) && e.Control)
-            {
-                try
-                {
-                    XmlDocument doc = new XmlDocument();
-                    doc.LoadXml(txtDebugInput.Text);
-                    XmlElement elem = doc.DocumentElement;
-                    if (elem != null)
-                        jc.Write(elem);
-                    txtDebugInput.Clear();
-                }
-                catch (XmlException ex)
-                {
-                    MessageBox.Show("Invalid XML: " + ex.Message);
-                }
-            }
-
-        }
-*/
-        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
-        {
-            MessageBox.Show(e.ExceptionObject.ToString(), "Unhandled exception: " + e.GetType());
-        }
-
-        private void rm_OnRosterEnd(object sender)
-        {
-            roster.ExpandAll();
-        }
-
-        private void MainForm_Closing(object sender, CancelEventArgs e)
-        {
-            if (jc.IsAuthenticated)
-                jc.Close();
-        }
-
-        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            jc.Close();
-            Close();
-        }
-
-        private void menuItem3_Click(object sender, EventArgs e)
-        {
-            AddContact ac = new AddContact();
-            ac.AllGroups = roster.Groups;
-            ac.DefaultDomain = jc.Server;
-            if (ac.ShowDialog() != DialogResult.OK)
-                return;
-
-            jc.Subscribe(ac.JID, ac.Nickname, ac.SelectedGroups);
-        }
-
-        private void menuItem5_Click(object sender, EventArgs e)
-        {
-            muzzle.RosterTree.ItemNode n = roster.SelectedNode as muzzle.RosterTree.ItemNode;
-            if (n == null)
-                return;
-            jc.RemoveRosterItem(n.JID);
-       }
-
-
-        // add group
-        private void addGroupToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            AddGroup ag = new AddGroup();
-            if (ag.ShowDialog() == DialogResult.Cancel)
-                return;
-
-            if (ag.GroupName == "")
-                return;
-
-            roster.AddGroup(ag.GroupName).EnsureVisible();
-        }
-
-        private void servicesToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (tabControl1.TabPages.Contains(tpServices))
-            {
-                tabControl1.TabPages.Remove(tpServices);
-                servicesToolStripMenuItem.Checked = false;
-            }
-            else
-            {
-                tabControl1.TabPages.Add(tpServices);
-                tabControl1.SelectedTab = tpServices;
-                servicesToolStripMenuItem.Checked = true;
-            }
-        }
-
-        private void debugToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            if (tabControl1.TabPages.Contains(tpDebug))
-            {
-                tabControl1.TabPages.Remove(tpDebug);
-                debugToolStripMenuItem.Checked = false;
-            }
-            else
-            {
-                tabControl1.TabPages.Add(tpDebug);
-                tabControl1.SelectedTab = tpDebug;
-                debugToolStripMenuItem.Checked = true;
-            }
-        }
-
-        private void subscribeToPubSubToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            PubSubSubcribeForm ps = new PubSubSubcribeForm();
-            // this is a small race.  to do it right, I should call dm.BeginFindServiceWithFeature,
-            // and modify that to call back on all of the found services.  The idea is that
-            // by the the time the user has a chance to click on the menu item, the DiscoManager
-            // will be populated.
-            ps.DiscoManager = dm;
-            if (ps.ShowDialog() != DialogResult.OK)
-                return;
-            JID jid = ps.JID;
-            string node = ps.Node;
-            string text = string.Format("{0}/{1}", jid, node);
-
-            TabPage tp = new TabPage(text);
-            tp.Name = text;
-
-            PubSubDisplay disp = new PubSubDisplay();
-            disp.Node = psm.GetNode(jid, node, 10);
-            tp.Controls.Add(disp);
-            disp.Dock = DockStyle.Fill;
-
-            tabControl1.TabPages.Add(tp);
-            tabControl1.SelectedTab = tp;
-        }
-
-        private void rm_OnSubscription(jabber.client.RosterManager manager, Item ri, Presence pres)
-        {
-            DialogResult res = MessageBox.Show("Allow incoming presence subscription request from: " + pres.From,
-                "Subscription Request",
-                MessageBoxButtons.YesNoCancel);
-            switch (res)
-            {
-            case DialogResult.Yes:
-                manager.ReplyAllow(pres);
-                break;
-            case DialogResult.No:
-                manager.ReplyDeny(pres);
-                break;
-            case DialogResult.Cancel:
-                // do nothing;
-                break;
-            }
-        }
-
-        private void rm_OnUnsubscription(jabber.client.RosterManager manager, Presence pres, ref bool remove)
-        {
-            MessageBox.Show(pres.From + " has removed you from their roster.", "Unsubscription notification", MessageBoxButtons.OK);
-        }
-
-        private void closeTabToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            TabPage tp = tabControl1.SelectedTab;
-            if (tp == tpRoster)
-                return;
-            else if (tp == tpDebug)
-                debugToolStripMenuItem.Checked = false;
-            else if (tp == tpServices)
-                servicesToolStripMenuItem.Checked = false;
-            tabControl1.TabPages.Remove(tp);
-        }
-
-        private void deletePubSubToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            PubSubSubcribeForm fm = setupPubSubForm();
-            if (fm.ShowDialog() != DialogResult.OK)
-                return;
-
-            JID jid = fm.JID;
-            string node = fm.Node;
-
-            psm.RemoveNode(jid, node,
-                delegate {
-                    MessageBox.Show("Remove Node unsuccessful.");
-                });
-
-            tabControl1.TabPages.RemoveByKey(string.Format("{0}/{1}", jid, node));
-        }
-
-        private PubSubSubcribeForm setupPubSubForm()
-        {
-            string JID = null;
-            string node = null;
-            if (tabControl1.SelectedTab.Name != null && tabControl1.SelectedTab.Name.Contains("/"))
-            {
-                string value = tabControl1.SelectedTab.Name;
-                int index = value.IndexOf("/");
-
-                JID = value.Substring(0, index);
-                node = value.Substring(index + 1);
-            }
-
-            PubSubSubcribeForm fm = new PubSubSubcribeForm();
-            fm.Text = "Delete PubSub";
-            if (JID != null) fm.JID = JID;
-            if (node != null) fm.Node = node;
-            fm.DiscoManager = dm;
-
-            return fm;
-        }
-
-        private void joinConferenceToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            ConferenceForm cf = new ConferenceForm();
-            cf.DiscoManager = dm;
-            cf.Nick = muc.DefaultNick;
-            if (cf.ShowDialog() != DialogResult.OK)
-                return;
-
-            muc.GetRoom(cf.RoomAndNick).Join();
-        }
-
-        private IQ muc_OnRoomConfig(Room room, IQ parent)
-        {
-            muzzle.XDataForm form = new muzzle.XDataForm(parent);
-            if (form.ShowDialog() != DialogResult.OK)
-                return null;
-
-            return (IQ)form.GetResponse();
-        }
-
-        private void muc_OnPresenceError(Room room, Presence pres)
-        {
-            m_err = true;
-            pnlCon.Text = "Groupchat error: " + pres.Error.OuterXml;
-        }
-
-        private void muc_OnInvite(object sender, jabber.protocol.client.Message msg)
-        {
-            Room r = sender as Room;
-            r.Join();
-        }
-
-        private void bmm_OnConferenceAdd(jabber.client.BookmarkManager manager, BookmarkConference conference)
-        {
-            string jid = conference.JID;
-            string name = conference.ConferenceName;
-            if (name == null)
-                name = jid;
-            if (lvBookmarks.Items.ContainsKey(jid))
-                lvBookmarks.Items.RemoveByKey(jid);
-            ListViewItem item = lvBookmarks.Items.Add(jid, name, -1);
-            item.SubItems.Add(conference.Nick);
-            item.SubItems.Add(conference.AutoJoin.ToString());
-            item.Tag = conference.JID;
-        }
-
-        private void bmm_OnConferenceRemove(jabber.client.BookmarkManager manager, BookmarkConference conference)
-        {
-            string jid = conference.JID;
-            if (lvBookmarks.Items.ContainsKey(jid))
-                lvBookmarks.Items.RemoveByKey(jid);
-        }
-
-        private void lvBookmarks_KeyUp(object sender, KeyEventArgs e)
-        {
-            if (e.KeyCode == Keys.Delete)
-                removeToolStripMenuItem_Click(null, null);
-        }
-
-        private void addToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            // pop up AddBookmark dialog
-            ConferenceForm cf = new ConferenceForm();
-            cf.DiscoManager = dm;
-            cf.Nick = muc.DefaultNick;
-            if (cf.ShowDialog() != DialogResult.OK)
-                return;
-            // TODO: add autojoin and name.
-            bmm.AddConference(cf.RoomJID, null, false, cf.Nick);
-        }
-
-        private void removeToolStripMenuItem_Click(object sender, EventArgs e)
-        {
-            foreach (ListViewItem lvi in lvBookmarks.SelectedItems)
-            {
-                bmm[(JID)lvi.Tag] = null;
-            }
-        }
-
-        private void lvBookmarks_DoubleClick(object sender, EventArgs e)
-        {
-            if (lvBookmarks.SelectedItems.Count == 0)
-                return;
-            ListViewItem lvi = lvBookmarks.SelectedItems[0];
-
-            JID jid = (JID)lvi.Tag;
-            BookmarkConference conf = bmm[jid];
-            Debug.Assert(conf != null);
-
-            ConferenceForm cf = new ConferenceForm();
-            cf.DiscoManager = dm;
-            cf.RoomAndNick = new JID(jid.User, jid.Server, conf.Nick);
-
-            if (cf.ShowDialog() != DialogResult.OK)
-                return;
-            bmm.AddConference(cf.RoomJID, null, false, cf.Nick);
-        }
-    }
-}
diff --git a/lib/jabber-net/Example/PubSubDisplay.cs b/lib/jabber-net/Example/PubSubDisplay.cs
deleted file mode 100644
index c6620c6..0000000
--- a/lib/jabber-net/Example/PubSubDisplay.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Diagnostics;
-using System.Windows.Forms;
-using jabber.connection;
-
-using bedrock.util;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class PubSubDisplay : UserControl
-    {
-        private ListBox lbID;
-        private Splitter splitter1;
-        private RichTextBox rtItem;
-
-        private PubSubNode m_node = null;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private readonly System.ComponentModel.IContainer components = null;
-
-        public PubSubDisplay()
-        {
-            InitializeComponent();
-        }
-
-        public PubSubNode Node
-        {
-            get { return m_node; }
-            set
-            {
-                if (m_node == value)
-                    return;
-                if (m_node != null)
-                {
-                    m_node.OnItemAdd -= m_node_OnItemAdd;
-                    m_node.OnItemRemove -= m_node_OnItemRemove;
-                }
-                m_node = value;
-                m_node.OnItemAdd += m_node_OnItemAdd;
-                m_node.OnItemRemove += m_node_OnItemRemove;
-                m_node.AutomatedSubscribe();
-            }
-        }
-
-        private void m_node_OnItemAdd(PubSubNode node, jabber.protocol.iq.PubSubItem item)
-        {
-            // OnItemRemove should have fired first, so no reason to remove it here.
-            // Hopefully.
-            Debug.Assert(lbID.Items.IndexOf(item.ID) == -1);
-            lbID.Items.Add(item.ID);
-        }
-
-        private void m_node_OnItemRemove(PubSubNode node, jabber.protocol.iq.PubSubItem item)
-        {
-            int index = lbID.Items.IndexOf(item.ID);
-            if (lbID.SelectedIndex == index)
-                rtItem.Clear();
-            if (index >= 0)
-                lbID.Items.RemoveAt(index);
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.lbID = new System.Windows.Forms.ListBox();
-            this.splitter1 = new System.Windows.Forms.Splitter();
-            this.rtItem = new System.Windows.Forms.RichTextBox();
-            this.SuspendLayout();
-            //
-            // lbID
-            //
-            this.lbID.Dock = System.Windows.Forms.DockStyle.Left;
-            this.lbID.FormattingEnabled = true;
-            this.lbID.IntegralHeight = false;
-            this.lbID.Location = new System.Drawing.Point(0, 0);
-            this.lbID.Name = "lbID";
-            this.lbID.Size = new System.Drawing.Size(120, 170);
-            this.lbID.TabIndex = 0;
-            this.lbID.SelectedIndexChanged += new System.EventHandler(this.lbID_SelectedIndexChanged);
-            //
-            // splitter1
-            //
-            this.splitter1.Location = new System.Drawing.Point(120, 0);
-            this.splitter1.Name = "splitter1";
-            this.splitter1.Size = new System.Drawing.Size(3, 170);
-            this.splitter1.TabIndex = 1;
-            this.splitter1.TabStop = false;
-            //
-            // rtItem
-            //
-            this.rtItem.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.rtItem.Location = new System.Drawing.Point(123, 0);
-            this.rtItem.Name = "rtItem";
-            this.rtItem.Size = new System.Drawing.Size(236, 170);
-            this.rtItem.TabIndex = 2;
-            this.rtItem.Text = "";
-            //
-            // PubSubDisplay
-            //
-            this.Controls.Add(this.rtItem);
-            this.Controls.Add(this.splitter1);
-            this.Controls.Add(this.lbID);
-            this.Name = "PubSubDisplay";
-            this.Size = new System.Drawing.Size(359, 170);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private void lbID_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            rtItem.Clear();
-            if (lbID.SelectedIndex == -1)
-                return;
-            // TODO: XML2RTF
-            rtItem.Text = m_node[(string)lbID.SelectedItem].OuterXml;
-        }
-    }
-}
diff --git a/lib/jabber-net/Example/PubSubSubscribeForm.cs b/lib/jabber-net/Example/PubSubSubscribeForm.cs
deleted file mode 100644
index a88c811..0000000
--- a/lib/jabber-net/Example/PubSubSubscribeForm.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.ComponentModel;
-using System.Windows.Forms;
-using bedrock.util;
-using jabber;
-using jabber.connection;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class PubSubSubcribeForm : Form
-    {
-        private Label label1;
-        private Label label2;
-        private ComboBox cmbJID;
-        private TextBox txtNode;
-        private Button btnOK;
-        private Button btnCancel;
-
-        private DiscoManager m_disco = null;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private readonly IContainer components = null;
-
-        public PubSubSubcribeForm()
-        {
-            InitializeComponent();
-        }
-
-        public DiscoManager DiscoManager
-        {
-            get { return m_disco; }
-            set { m_disco = value; }
-        }
-
-        public JID JID
-        {
-            get { return cmbJID.Text; }
-            set { cmbJID.Text = value.ToString(); }
-        }
-
-        public string Node
-        {
-            get { return txtNode.Text; }
-            set { txtNode.Text = value; }
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.cmbJID = new System.Windows.Forms.ComboBox();
-            this.txtNode = new System.Windows.Forms.TextBox();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(12, 9);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(106, 13);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "PubSub Service JID:";
-            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // label2
-            //
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(82, 35);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(36, 13);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Node:";
-            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // cmbJID
-            //
-            this.cmbJID.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.cmbJID.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
-            this.cmbJID.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
-            this.cmbJID.Location = new System.Drawing.Point(124, 6);
-            this.cmbJID.Name = "cmbJID";
-            this.cmbJID.Size = new System.Drawing.Size(141, 21);
-            this.cmbJID.TabIndex = 4;
-            //
-            // txtNode
-            //
-            this.txtNode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtNode.Location = new System.Drawing.Point(124, 32);
-            this.txtNode.Name = "txtNode";
-            this.txtNode.Size = new System.Drawing.Size(141, 20);
-            this.txtNode.TabIndex = 5;
-            //
-            // btnOK
-            //
-            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(109, 58);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 6;
-            this.btnOK.Text = "OK";
-            this.btnOK.UseVisualStyleBackColor = true;
-            //
-            // btnCancel
-            //
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(190, 58);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 7;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.UseVisualStyleBackColor = true;
-            //
-            // PubSubSubcribeForm
-            //
-            this.AcceptButton = this.btnOK;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(277, 90);
-            this.Controls.Add(this.btnCancel);
-            this.Controls.Add(this.btnOK);
-            this.Controls.Add(this.txtNode);
-            this.Controls.Add(this.cmbJID);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
-            this.Name = "PubSubSubcribeForm";
-            this.Text = "Subscribe to PubSub Node";
-            this.Shown += new System.EventHandler(this.PubSub_Shown);
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private void PubSub_Shown(object sender, EventArgs e)
-        {
-            cmbJID.BeginUpdate();
-            cmbJID.Items.Clear();
-            foreach (DiscoNode component in m_disco.Root.Children)
-            {
-                if (component.HasFeature(jabber.protocol.URI.PUBSUB))
-                    cmbJID.Items.Add(component.JID);
-            }
-            if (cmbJID.Items.Count > 0)
-                cmbJID.SelectedIndex = 0;
-            cmbJID.EndUpdate();
-        }
-
-    }
-}
diff --git a/lib/jabber-net/Example/SendMessage.cs b/lib/jabber-net/Example/SendMessage.cs
deleted file mode 100644
index 8756572..0000000
--- a/lib/jabber-net/Example/SendMessage.cs
+++ /dev/null
@@ -1,209 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-
-namespace Example
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// Summary description for SendMessage.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SendMessage : System.Windows.Forms.Form
-    {
-        private jabber.client.JabberClient m_jc;
-        private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.TextBox txtTo;
-        private System.Windows.Forms.TextBox txtSubject;
-        private System.Windows.Forms.Button btnSend;
-        private System.Windows.Forms.Button btnCancel;
-        private System.Windows.Forms.TextBox txtBody;
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.Container components = null;
-
-        public SendMessage(jabber.client.JabberClient jc, string toJid) : this(jc)
-        {
-            txtTo.Text = toJid;
-        }
-
-        public SendMessage(jabber.client.JabberClient jc)
-        {
-            //
-            // Required for Windows Form Designer support
-            //
-            InitializeComponent();
-
-            m_jc = jc;
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-                #region Windows Form Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SendMessage));
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.btnSend = new System.Windows.Forms.Button();
-            this.txtSubject = new System.Windows.Forms.TextBox();
-            this.txtTo = new System.Windows.Forms.TextBox();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
-            this.txtBody = new System.Windows.Forms.TextBox();
-            this.panel1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // panel1
-            //
-            this.panel1.Controls.Add(this.btnCancel);
-            this.panel1.Controls.Add(this.btnSend);
-            this.panel1.Controls.Add(this.txtSubject);
-            this.panel1.Controls.Add(this.txtTo);
-            this.panel1.Controls.Add(this.label2);
-            this.panel1.Controls.Add(this.label1);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel1.Location = new System.Drawing.Point(0, 0);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(312, 72);
-            this.panel1.TabIndex = 1;
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(256, 40);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(48, 23);
-            this.btnCancel.TabIndex = 2;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
-            //
-            // btnSend
-            //
-            this.btnSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnSend.Location = new System.Drawing.Point(256, 8);
-            this.btnSend.Name = "btnSend";
-            this.btnSend.Size = new System.Drawing.Size(48, 23);
-            this.btnSend.TabIndex = 1;
-            this.btnSend.Text = "Send";
-            this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
-            //
-            // txtSubject
-            //
-            this.txtSubject.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtSubject.Location = new System.Drawing.Point(64, 41);
-            this.txtSubject.Name = "txtSubject";
-            this.txtSubject.Size = new System.Drawing.Size(184, 20);
-            this.txtSubject.TabIndex = 0;
-            this.txtSubject.Text = "";
-            //
-            // txtTo
-            //
-            this.txtTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtTo.Location = new System.Drawing.Point(64, 9);
-            this.txtTo.Name = "txtTo";
-            this.txtTo.Size = new System.Drawing.Size(184, 20);
-            this.txtTo.TabIndex = 3;
-            this.txtTo.Text = "";
-            //
-            // label2
-            //
-            this.label2.Location = new System.Drawing.Point(8, 40);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(48, 23);
-            this.label2.TabIndex = 2;
-            this.label2.Text = "Subject:";
-            //
-            // label1
-            //
-            this.label1.Location = new System.Drawing.Point(8, 8);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(48, 23);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "To:";
-            //
-            // txtBody
-            //
-            this.txtBody.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.txtBody.Location = new System.Drawing.Point(0, 72);
-            this.txtBody.Multiline = true;
-            this.txtBody.Name = "txtBody";
-            this.txtBody.ScrollBars = System.Windows.Forms.ScrollBars.Both;
-            this.txtBody.Size = new System.Drawing.Size(312, 194);
-            this.txtBody.TabIndex = 0;
-            this.txtBody.Text = "";
-            //
-            // SendMessage
-            //
-            this.AcceptButton = this.btnSend;
-            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(312, 266);
-            this.Controls.Add(this.txtBody);
-            this.Controls.Add(this.panel1);
-            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Name = "SendMessage";
-            this.Text = "SendMessage";
-            this.panel1.ResumeLayout(false);
-            this.ResumeLayout(false);
-
-        }
-                #endregion
-
-        private void btnSend_Click(object sender, System.EventArgs e)
-        {
-            jabber.protocol.client.Message msg = new jabber.protocol.client.Message(m_jc.Document);
-            msg.To = txtTo.Text;
-            if (txtSubject.Text != "")
-                msg.Subject = txtSubject.Text;
-            msg.Body = txtBody.Text;
-            m_jc.Write(msg);
-            this.Close();
-        }
-
-        private void btnCancel_Click(object sender, System.EventArgs e)
-        {
-            this.Close();
-        }
-    }
-}
diff --git a/lib/jabber-net/Example/ServiceDisplay.cs b/lib/jabber-net/Example/ServiceDisplay.cs
deleted file mode 100644
index 826fe44..0000000
--- a/lib/jabber-net/Example/ServiceDisplay.cs
+++ /dev/null
@@ -1,248 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Windows.Forms;
-
-using bedrock.util;
-
-using jabber.client;
-using jabber.connection;
-
-namespace Example
-{
-    [SVN(@"$Id$")]
-    public class ServiceDisplay : UserControl
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-        private TreeView tvServices;
-        private Splitter splitter2;
-        private PropertyGrid pgServices;
-        private DiscoManager m_disco = null;
-        private JabberClient m_stream = null;
-
-        public ServiceDisplay()
-        {
-            InitializeComponent();
-            tvServices.ShowNodeToolTips = true;
-            tvServices.NodeMouseDoubleClick += new TreeNodeMouseClickEventHandler(tvServices_NodeMouseDoubleClick);
-            tvServices.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvServices_AfterSelect);
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.tvServices = new System.Windows.Forms.TreeView();
-            this.splitter2 = new System.Windows.Forms.Splitter();
-            this.pgServices = new System.Windows.Forms.PropertyGrid();
-            this.SuspendLayout();
-            //
-            // tvServices
-            //
-            this.tvServices.Dock = System.Windows.Forms.DockStyle.Left;
-            this.tvServices.Location = new System.Drawing.Point(0, 0);
-            this.tvServices.Name = "tvServices";
-            this.tvServices.ShowLines = false;
-            this.tvServices.ShowPlusMinus = false;
-            this.tvServices.ShowRootLines = false;
-            this.tvServices.Size = new System.Drawing.Size(175, 281);
-            this.tvServices.TabIndex = 1;
-            this.tvServices.AfterCollapse += new System.Windows.Forms.TreeViewEventHandler(this.tvServices_AfterCollapse);
-            this.tvServices.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.tvServices_AfterExpand);
-            //
-            // splitter2
-            //
-            this.splitter2.Location = new System.Drawing.Point(175, 0);
-            this.splitter2.Name = "splitter2";
-            this.splitter2.Size = new System.Drawing.Size(3, 281);
-            this.splitter2.TabIndex = 2;
-            this.splitter2.TabStop = false;
-            //
-            // pgServices
-            //
-            this.pgServices.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pgServices.Location = new System.Drawing.Point(178, 0);
-            this.pgServices.Name = "pgServices";
-            this.pgServices.Size = new System.Drawing.Size(366, 281);
-            this.pgServices.TabIndex = 3;
-            //
-            // ServiceDisplay
-            //
-            this.Controls.Add(this.pgServices);
-            this.Controls.Add(this.splitter2);
-            this.Controls.Add(this.tvServices);
-            this.Name = "ServiceDisplay";
-            this.Size = new System.Drawing.Size(544, 281);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-
-        /// <summary>
-        /// The JabberClient or JabberService to hook up to.
-        /// </summary>
-        [Description("The JabberClient to hook up to.")]
-        [Category("Jabber")]
-        public virtual JabberClient Stream
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get an XmppStream control
-                // from the environment.
-                if ((this.m_stream == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.Stream = (JabberClient)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(JabberClient));
-                }
-                return m_stream;
-            }
-            set
-            {
-                if ((object)m_stream != (object)value)
-                {
-                    m_stream = value;
-                    m_stream.OnAuthenticate += new bedrock.ObjectHandler(m_stream_OnAuthenticate);
-                    m_stream.OnDisconnect += new bedrock.ObjectHandler(m_stream_OnDisconnect);
-                }
-            }
-        }
-
-        [Category("Jabber")]
-        public DiscoManager DiscoManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get a DiscoManager control
-                // from the environment.
-                if ((this.m_disco == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.m_disco = (DiscoManager)StreamComponent.GetComponentFromHost(host, typeof(DiscoManager));
-                }
-                return m_disco;
-            }
-            set
-            {
-                if ((object)m_disco != (object)value)
-                    m_disco = value;
-            }
-        }
-
-        [Category("Appearance")]
-        public ImageList ImageList
-        {
-            get { return tvServices.ImageList; }
-            set { tvServices.ImageList = value; }
-        }
-
-        private void m_stream_OnAuthenticate(object sender)
-        {
-            // TODO: some of this will break in 2003.
-            jabber.connection.DiscoNode dn = m_disco.GetNode(m_stream.Server, null);
-            TreeNode tn = tvServices.Nodes.Add(dn.Key, dn.Name);
-            tn.ToolTipText = dn.Key.Replace('\u0000', '\n');
-            tn.Tag = dn;
-            tn.ImageIndex = 8;
-            tn.SelectedImageIndex = 8;
-            m_disco.BeginGetFeatures(dn, new jabber.connection.DiscoNodeHandler(GotInitialFeatures), null);
-        }
-
-        private void m_stream_OnDisconnect(object sender)
-        {
-            pgServices.SelectedObject = null;
-            tvServices.Nodes.Clear();
-        }
-
-
-        private void tvServices_AfterExpand(object sender, TreeViewEventArgs e)
-        {
-            e.Node.ImageIndex = 6;
-            e.Node.SelectedImageIndex = 6;
-        }
-
-        private void tvServices_AfterCollapse(object sender, TreeViewEventArgs e)
-        {
-            e.Node.ImageIndex = 7;
-            e.Node.SelectedImageIndex = 7;
-        }
-
-        private void tvServices_NodeMouseDoubleClick(object sender,
-                                             TreeNodeMouseClickEventArgs e)
-        {
-            jabber.connection.DiscoNode dn = (jabber.connection.DiscoNode)e.Node.Tag;
-            if (dn.Children == null)
-                m_disco.BeginGetItems(dn.JID, dn.Node, new jabber.connection.DiscoNodeHandler(GotItems), null);
-        }
-
-        private void tvServices_AfterSelect(object sender, TreeViewEventArgs e)
-        {
-            jabber.connection.DiscoNode dn = (jabber.connection.DiscoNode)e.Node.Tag;
-            m_disco.BeginGetFeatures(dn, new jabber.connection.DiscoNodeHandler(GotInfo), null);
-        }
-
-        private void GotInitialFeatures(DiscoManager sender, jabber.connection.DiscoNode node, object state)
-        {
-            m_disco.BeginGetItems(node, new jabber.connection.DiscoNodeHandler(GotItems), state);
-        }
-
-        private void GotItems(DiscoManager sender, jabber.connection.DiscoNode node, object state)
-        {
-            // TODO: some of this will break in 2003.
-            TreeNode[] nodes = tvServices.Nodes.Find(node.Key, true);
-            foreach (TreeNode n in nodes)
-            {
-                n.ImageIndex = 7;
-                n.SelectedImageIndex = 7;
-                foreach (jabber.connection.DiscoNode dn in node.Children)
-                {
-                    TreeNode tn = n.Nodes.Add(dn.Key, dn.Name);
-                    tn.ToolTipText = dn.Key.Replace('\u0000', '\n');
-                    tn.Tag = dn;
-                    tn.ImageIndex = 8;
-                    tn.SelectedImageIndex = 8;
-                }
-            }
-            pgServices.Refresh();
-        }
-
-        private void GotInfo(DiscoManager sender, jabber.connection.DiscoNode node, object state)
-        {
-            pgServices.SelectedObject = node;
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/Delegates.cs b/lib/jabber-net/bedrock/Delegates.cs
deleted file mode 100644
index 427f0d5..0000000
--- a/lib/jabber-net/bedrock/Delegates.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-namespace bedrock
-{
-    /// <summary>
-    /// Delegate for memebers that just have a sender
-    /// </summary>
-    public delegate void ObjectHandler(object sender);
-
-    /// <summary>
-    /// Delegate for members that receive a string
-    /// </summary>
-    public delegate void TextHandler(object sender, string txt);
-
-    /// <summary>
-    /// Delegate for methods that get a block of bytes
-    /// </summary>
-    public delegate void ByteHandler(object sender, byte[] buf);
-
-    /// <summary>
-    /// Delegate for members that receive partial blocks of bytes.
-    /// </summary>
-    public delegate void ByteOffsetHandler(object sender, byte[] buf, int offset, int length);
-
-    /// <summary>
-    /// Delegate for members that receive an exception
-    /// </summary>
-    public delegate void ExceptionHandler(object sender, Exception ex);
-}
diff --git a/lib/jabber-net/bedrock/collections/ByteStack.cs b/lib/jabber-net/bedrock/collections/ByteStack.cs
deleted file mode 100644
index a51396c..0000000
--- a/lib/jabber-net/bedrock/collections/ByteStack.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A type-safe stack for bytes, implemented as a growable
-    /// buffer.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ByteStack
-    {
-        private const double GROWTH_FACTOR = 1.5d;
-        private const int    DEFAULT_SIZE  = 16;
-        private const int    MIN_SIZE      = 2;
-        private static readonly System.Text.Encoding ENCODING = System.Text.Encoding.Default;
-        private int    m_count    = 0;
-        private int    m_capacity = 0;
-        private byte[] m_buffer;
-        /// <summary>
-        /// Creates an instance with the default initial capacity.
-        /// </summary>
-        public ByteStack() : this(DEFAULT_SIZE)
-        {
-        }
-        /// <summary>
-        /// Create an instance with the given initial capacity.
-        /// </summary>
-        /// <param name="initialSize">The initial capacity</param>
-        public ByteStack(int initialSize)
-        {
-            if (initialSize < MIN_SIZE)
-            {
-                initialSize = DEFAULT_SIZE;
-            }
-            m_capacity = initialSize;
-            m_buffer   = new byte[m_capacity];
-        }
-        /// <summary>
-        /// Create an instance with the given initial value.  The initial size
-        /// will be grown from the size of the given bytes.  A copy is made of
-        /// the given bytes.
-        /// </summary>
-        /// <param name="start">byte array copied into this ByteStack</param>
-        public ByteStack(byte[] start)
-        {
-            m_count  = m_capacity = start.Length;
-            m_buffer = start;
-            IncreaseSize();
-        }
-        /// <summary>
-        /// Increase the size of the stack by GROWTH_FACTOR times.
-        /// </summary>
-        private void IncreaseSize()
-        {
-            m_capacity = (int) (m_capacity * GROWTH_FACTOR);
-            // if the size is 1, we'll never get bigger.
-            if (m_capacity < MIN_SIZE)
-            {
-                m_capacity = DEFAULT_SIZE;
-            }
-            byte[] newBuf = new byte[m_capacity];
-            Buffer.BlockCopy(m_buffer, 0, newBuf, 0, m_count);
-            m_buffer = newBuf;
-        }
-        /// <summary>
-        /// Gets the number of bytes that are currently in the stack.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return m_count;
-            }
-        }
-        /// <summary>
-        /// Gets the number of bytes that the stack can hold.
-        /// </summary>
-        public int Capacity
-        {
-            get
-            {
-                return m_capacity;
-            }
-        }
-        /// <summary>
-        /// Push a byte onto the stack.
-        /// </summary>
-        /// <param name="b"> </param>
-        public void Push(byte b)
-        {
-            if (m_count >= m_capacity)
-            {
-                IncreaseSize();
-            }
-            m_buffer[m_count] = b;
-            m_count++;
-        }
-        /// <summary>
-        /// Pop a byte off of the stack.
-        /// </summary>
-        public byte Pop()
-        {
-            if (m_count <= 0)
-            {
-                throw new InvalidOperationException("Empty stack");
-            }
-            m_count--;
-            byte b =  m_buffer[m_count];
-            return b;
-        }
-        /// <summary>
-        /// Non-destructively read the byte on the top of the stack.
-        /// </summary>
-        public byte Peek()
-        {
-            if (m_count <= 0)
-            {
-                throw new InvalidOperationException("Empty stack");
-            }
-            return m_buffer[m_count - 1];
-        }
-        /// <summary>
-        /// Converts to byte[] by making a trimmed copy.
-        /// </summary>
-        /// <param name="bs">The ByteStack to convert to a byte array.</param>
-        /// <returns>The byte array containing a copy of the passed in ByteStack.</returns>
-        public static implicit operator byte[](ByteStack bs)
-        {
-            if (bs.m_count == 0)
-            {
-                return new byte[0];
-            }
-            byte[] newBuf = new byte[bs.m_count];
-            Buffer.BlockCopy(bs.m_buffer, 0, newBuf, 0, bs.m_count);
-            return newBuf;
-        }
-        /// <summary>
-        /// Convert to a string, using the default encoding.  This is probably not
-        /// right, but it's really nice for debugging and testing.
-        /// </summary>
-        public override string ToString()
-        {
-            return ENCODING.GetString(m_buffer, 0, m_count);
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/GraphNode.cs b/lib/jabber-net/bedrock/collections/GraphNode.cs
deleted file mode 100644
index 9e2ac11..0000000
--- a/lib/jabber-net/bedrock/collections/GraphNode.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A node in a Graph, such as a Tree
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class GraphNode : IEnumerable
-    {
-        private object      m_key      = null;
-        private object      m_data     = null;
-        private GraphNode   m_parent   = null;
-        private IDictionary m_children = null;
-        private bool        m_sorted   = true;
-        /// <summary>
-        /// Creates a new node, with key and data.
-        /// </summary>
-        /// <param name="key">The key used to retrieve the data</param>
-        /// <param name="data">The data in the node</param>
-        public GraphNode(object key, object data) : this(key, data, true)
-        {
-        }
-        /// <summary>
-        /// Creates a new node, with key and data, possibly having
-        /// sorted children. 
-        /// </summary>
-        /// <param name="key">The key used to retrieve the data</param>
-        /// <param name="data">The data in the node</param>
-        /// <param name="sorted">Should the children be sorted?</param>
-        public GraphNode(object key, object data, bool sorted)
-        {
-            m_key    = key;
-            m_data   = data;
-            m_sorted = sorted;
-            if (m_sorted)
-            {
-                m_children = new SortedList();
-            }
-            else
-            {
-                m_children = new Hashtable();
-            }
-        }
-
-        /// <summary>
-        /// The key for this node.
-        /// </summary>
-        public object Key
-        {
-            get { return m_key; }
-        }
-
-        /// <summary>
-        /// The data associated with this node.
-        /// </summary>
-        public object Data
-        {
-            get { return m_data; }
-            set { m_data = value; }
-        }
-        
-        /// <summary>
-        /// Adds a new child node
-        /// </summary>
-        /// <param name="key">The key for the child</param>
-        /// <param name="data">The data for the child</param>
-        /// <returns>The child node added to the graph.</returns>
-        public GraphNode Add(object key, object data)
-        {
-            GraphNode n = new GraphNode(key, data, m_sorted);
-            n.m_parent = this;
-            m_children.Add(key, n);
-            return n;
-        }
-        /// <summary>
-        /// Retrieves a child node, based on the key.
-        /// </summary>
-        public object this[object key]
-        {
-            get
-            {
-                return ((GraphNode)m_children[key]).m_data;
-            }
-        }
-        /// <summary>
-        /// Determines whether this is a root node.
-        /// </summary>
-        public bool IsRoot
-        {
-            get
-            {
-                return m_parent == null;
-            }
-        }
-        #region IEnumerable
-
-        /// <summary>
-        /// Iterate over the child nodes
-        /// </summary>
-        /// <returns></returns>
-        public IEnumerator GetEnumerator()
-        {
-            return new GraphNodeEnumerator(this);
-        }
-
-        private class GraphNodeEnumerator : IEnumerator
-        {
-            private IEnumerator m_arrayEnumerator;
-            public GraphNodeEnumerator(GraphNode n)
-            {
-                m_arrayEnumerator = n.m_children.GetEnumerator();
-            }
-
-            public object Current
-            {
-                get
-                {
-                    return ((GraphNode)m_arrayEnumerator.Current).m_data;
-                }
-            }
-
-            public bool MoveNext()
-            {
-                return m_arrayEnumerator.MoveNext();
-            }
-
-            public void Reset()
-            {
-                m_arrayEnumerator.Reset();
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/ISet.cs b/lib/jabber-net/bedrock/collections/ISet.cs
deleted file mode 100644
index f807621..0000000
--- a/lib/jabber-net/bedrock/collections/ISet.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-
-namespace bedrock.collections
-{
-    /// <summary>
-    /// Set operations.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public interface ISet : ICollection
-    {
-        /// <summary>
-        /// Add an object to the set
-        /// </summary>
-        /// <param name="o">The object to add</param>
-        /// <exception cref="ArgumentException">object was already in the set.</exception>
-        void Add(object o);
-
-        /// <summary>
-        /// Remove the given object from the set.  If the object is not in the set, this is a no-op.
-        /// </summary>
-        /// <param name="o">The object to remove.</param>
-        void Remove(object o);
-
-        /// <summary>
-        /// Removes all items from the set.
-        /// </summary>
-        void Clear();
-
-        /// <summary>
-        /// Is the given object in the set?
-        /// </summary>
-        /// <param name="o">The object to search for.</param>
-        /// <returns>True if the object is in the set.</returns>
-        bool Contains(object o);
-
-        /// <summary>
-        /// Returns a new collection that contains all of the items that
-        /// are in this set or the other set.
-        /// </summary>
-        /// <param name="other">Second set to combine with this one.</param>
-        /// <returns>Combined set.</returns>
-        ISet Union(ISet other);
-
-        /// <summary>
-        /// Return a new collection that contains all of the items that
-        /// are in this list *and* the other set.
-        /// </summary>
-        ISet Intersection(ISet other);
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/IndexedTrie.cs b/lib/jabber-net/bedrock/collections/IndexedTrie.cs
deleted file mode 100644
index 9487778..0000000
--- a/lib/jabber-net/bedrock/collections/IndexedTrie.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A Trie that is searchable for substrings.  Uses a separate set of indexes
-    /// to allow entry into the Trie at any point.  Yes, this
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IndexedTrie : Trie
-    {
-        private Tree m_indexes    = new Tree();
-        private int  m_maxResults = 100;
-
-        /// <summary>
-        /// Creates the indexed trie.
-        /// </summary>
-        public IndexedTrie()  {}
-
-        /// <summary>
-        /// Creates the indexed trie and sets the maximum number of query results returned.
-        /// </summary>
-        /// <param name="maxResults">Maximum number of query results returned.</param>
-        public IndexedTrie(int maxResults)
-        {
-            m_maxResults = maxResults;
-        }
-
-        /// <summary>
-        /// The maximum number of results to return from any query.  This is an approximate number.
-        /// </summary>
-        public int MaxResults
-        {
-            get
-            {
-                return m_maxResults;
-            }
-            set
-            {
-                m_maxResults = value;
-            }
-        }
-        /// <summary>
-        /// Finds the index for the given byte.
-        /// </summary>
-        protected ArrayList this[byte b]
-        {
-            get
-            {
-                return (ArrayList) m_indexes[b];
-            }
-        }
-        /// <summary>
-        /// Traverse the trie, computing indexes.
-        /// </summary>
-        /// <param name="n"> </param>
-        /// <param name="data"> </param>
-        private bool IndexWalker(TrieNode n, object data)
-        {
-            if (n.Parent != null)
-            {
-                 this[n.Byte].Add(new WeakReference(n));
-            }
-            return true;
-        }
-        /// <summary>
-        /// Computes the index.
-        /// </summary>
-        public void Index()
-        {
-            Traverse(new TrieWalker(IndexWalker), null);
-            foreach (ArrayList al in m_indexes)
-            {
-                al.TrimToSize();
-            }
-        }
-        /// <summary>
-        /// Copy the keys from the sub-tree into an ArrayList.
-        /// </summary>
-        /// <param name="n"> </param>
-        /// <param name="data"> </param>
-        /// <param name="key"> </param>
-        private bool CopyWalker(TrieNode n, object data, ByteStack key)
-        {
-            if (n.Value != null)
-            {
-                ArrayList al = (ArrayList) data;
-                al.Add((byte[]) key);
-                if (al.Count >= m_maxResults)
-                {
-                    return false;
-                }
-            }
-            return true;
-        }
-        /// <summary>
-        /// Return a list of keys that contain the given substring.
-        /// </summary>
-        /// <param name="lookFor">The substring to search for.</param>
-        public ArrayList SubString(byte[] lookFor)
-        {
-            ArrayList starts = (ArrayList) m_indexes[lookFor[0]];
-            ArrayList finds = new ArrayList();
-            byte[] nBuf = new byte[lookFor.Length - 1];
-            Buffer.BlockCopy(lookFor, 1, nBuf, 0, lookFor.Length - 1);
-            TrieKeyWalker w = new TrieKeyWalker(CopyWalker);
-            foreach (WeakReference wref in starts)
-            {
-                if (finds.Count >= m_maxResults)
-                {
-                    break;
-                }
-                TrieNode first = (TrieNode) wref.Target;
-                if (first == null)
-                {
-                    // node got removed out from underneath.
-                    starts.Remove(wref);
-                }
-                else
-                {
-                    TrieNode last = FindNode(nBuf, first, false);
-                    if (last != null)
-                    {
-                        Traverse(w, finds, last, new ByteStack(last.Key));
-                    }
-                }
-            }
-            return finds;
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/LinkedList.cs b/lib/jabber-net/bedrock/collections/LinkedList.cs
deleted file mode 100644
index a8ac979..0000000
--- a/lib/jabber-net/bedrock/collections/LinkedList.cs
+++ /dev/null
@@ -1,565 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A doubly-linked list implementation, with a sentinal wrap-around
-    /// m_header.  Yes, it <b>does</b> seem like this should have been included
-    /// in System.Collections.  This may be a nicer implementation of Queue
-    /// than the one in System.Collections, which uses an array.  YMMV.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class LinkedList : IList
-    {
-        private Node      m_header     = new Node(null, null, null);
-        private int       m_size       = 0;
-        private int       m_modCount   = 0;
-        private IComparer m_comparator = null;
-        private bool      m_readOnly   = false;
-        private bool      m_synch      = false;
-        /// <summary>
-        /// Creates an empty list.
-        /// </summary>
-        public LinkedList()
-        {
-            m_header.next = m_header.previous = m_header;
-        }
-        /// <summary>
-        /// Create a list with the targets of the given
-        /// enumeration copied into it.
-        /// </summary>
-        /// <param name="e"></param>
-        public LinkedList(IEnumerable e) : this()
-        {
-            foreach (object o in e)
-            {
-                Add(o);
-            }
-        }
-        #region IEnumerable
-        /// <summary>
-        /// Iterate over the list.
-        /// </summary>
-        /// <returns></returns>
-        public IEnumerator GetEnumerator()
-        {
-            return new ListEnumerator(this);
-        }
-        #endregion
-        #region ICollection
-        /// <summary>
-        /// How many elements in the list?
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return m_size;
-            }
-        }
-
-        /// <summary>
-        /// Determines if the list is read-only (Can the user add or remove an item from this list).
-        /// </summary>
-        public bool IsReadOnly
-        {
-            get
-            {
-                return m_readOnly;
-            }
-            set
-            {
-                m_readOnly = value;
-            }
-        }
-
-        /// <summary>
-        /// Is the list thread-safe?
-        /// TODO: implement thread-safe
-        /// </summary>
-        public bool IsSynchronized
-        {
-            get
-            {
-                return m_synch;
-            }
-            set
-            {
-                m_synch = value;
-            }
-        }
-
-        /// <summary>
-        /// The object to synchronize on.
-        /// TODO: implement settable SyncRoot
-        /// </summary>
-        public object SyncRoot
-        {
-            get
-            {
-                return this;
-            }
-        }
-
-        /// <summary>
-        /// Copy this list to the given array.
-        /// </summary>
-        /// <param name="array">Array to copy into</param>
-        /// <param name="index">Index to start copying at</param>
-        public void CopyTo(Array array, int index)
-        {
-            int i = index;
-            foreach (object o in this)
-            {
-                array.SetValue(o, i++);
-            }
-        }
-        #endregion
-        #region IList
-        /// <summary>
-        /// Gets the indexth element by walking the list.
-        /// </summary>
-        public object this[int index]
-        {
-            get
-            {
-                return GetNode(index).element;
-            }
-            set
-            {
-                GetNode(index).element = value;
-            }
-        }
-
-        /// <summary>
-        /// Insert an element at the end of the list
-        /// </summary>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public int Add(object value)
-        {
-            AddBefore(value, m_header);
-            return m_size-1;
-        }
-
-        /// <summary>
-        /// Remove all of the elements.
-        /// </summary>
-        public void Clear()
-        {
-            m_modCount++;
-            m_header.next = m_header.previous = m_header;
-            m_size = 0;
-        }
-
-        /// <summary>
-        /// Is the given object in the list?
-        /// </summary>
-        /// <param name="value">The object to find</param>
-        /// <returns>True if the object is in the list</returns>
-        public bool Contains(object value)
-        {
-            return IndexOf(value) != -1;
-        }
-
-        /// <summary>
-        /// Determines where in the index the specified object exists.
-        /// </summary>
-        /// <param name="value">The object to find</param>
-        /// <returns>The position of the object in the list, or -1 if not found</returns>
-        public int IndexOf(object value)
-        {
-            int index = 0;
-            if (value == null)
-            {
-                for (Node e = m_header.next; e != m_header; e = e.next)
-                {
-                    if (e.element == null)
-                        return index;
-                    index++;
-                }
-            }
-            else
-            {
-                for (Node e = m_header.next; e != m_header; e = e.next)
-                {
-                    if (value.Equals(e.element))
-                        return index;
-                    index++;
-                }
-            }
-            return -1;
-        }
-
-        /// <summary>
-        /// Inserts an item into the list at the given index.
-        /// </summary>
-        /// <param name="index">The position to insert before</param>
-        /// <param name="value">The object to insert</param>
-        public void Insert(int index, object value)
-        {
-            if (index >= m_size)
-            {
-                AddBefore(value, m_header);
-            }
-            else
-            {
-                Node n = GetNode(index);
-                AddBefore(value, n);
-            }
-        }
-
-        /// <summary>
-        /// Always returns "false" for now.
-        /// TODO: implement fixed size
-        /// </summary>
-        public bool IsFixedSize
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Finds the first matching object, and removes it from the list.
-        /// </summary>
-        /// <param name="value">The object to remove</param>
-        /// <exception cref="System.ArgumentException">Object not found</exception>
-        public void Remove(object value)
-        {
-            if (value == null)
-            {
-                for (Node e = m_header.next; e != m_header; e = e.next)
-                {
-                    if (e.element == null)
-                    {
-                        Remove(e);
-                        return;
-                    }
-                }
-            }
-            else
-            {
-                for (Node e = m_header.next; e != m_header; e = e.next)
-                {
-                    if (value.Equals(e.element))
-                    {
-                        Remove(e);
-                        return;
-                    }
-                }
-            }
-            throw new ArgumentException("Object not found", "value");
-        }
-
-        /// <summary>
-        /// Removes the indexth element from the list.
-        /// </summary>
-        /// <param name="index">The index of the element to delete</param>
-        public void RemoveAt(int index)
-        {
-            Node e = GetNode(index);
-            Remove(e);
-        }
-        #endregion
-
-        #region Queue
-        /// <summary>
-        /// Inserts an element at the end of the list.
-        /// </summary>
-        /// <param name="value">Element to insert.</param>
-        public void Enqueue(object value)
-        {
-            AddBefore(value, m_header);
-        }
-
-        /// <summary>
-        /// Remove and return the element at the front of the list
-        /// </summary>
-        /// <returns>The element at the end of the list</returns>
-        public object Dequeue()
-        {
-            object value = m_header.next.element;
-            Remove(m_header.next);
-            return value;
-        }
-
-        /// <summary>
-        /// Retrieve the element at the front of the list, without removing it.
-        /// </summary>
-        /// <returns></returns>
-        public object Peek()
-        {
-            return m_header.next.element;
-        }
-        #endregion
-        #region Stack
-        /// <summary>
-        /// Add an element to the front of the list.
-        /// </summary>
-        /// <param name="value"></param>
-        public void Push(object value)
-        {
-            AddBefore(value, m_header.next);
-        }
-
-        /// <summary>
-        /// Retrieve and remove the element at the front of the list.
-        /// </summary>
-        /// <returns></returns>
-        public object Pop()
-        {
-            return Dequeue();
-        }
-        #endregion Stack
-        #region private
-        private Node GetNode(int index)
-        {
-            if ((index < 0) || (index >= m_size))
-            {
-                throw new IndexOutOfRangeException("Must choose index between 0 and " +
-                                                   (m_size-1));
-            }
-
-            Node e = m_header;
-            // start from end if closer
-            if (index < m_size/2)
-            {
-                for (int i = 0; i <= index; i++)
-                    e = e.next;
-            }
-            else
-            {
-                for (int i = m_size; i > index; i--)
-                    e = e.previous;
-            }
-            return e;
-        }
-
-        private Node AddBefore(object value, Node n)
-        {
-            if (m_readOnly)
-            {
-                throw new InvalidOperationException("Cannot add to a read-only list");
-            }
-
-            if (m_synch)
-            {
-                lock (this)
-                {
-                    return UncheckedAdd(value, n);
-                }
-            }
-            else
-            {
-                return UncheckedAdd(value, n);
-            }
-        }
-
-        private Node UncheckedAdd(object value, Node n)
-        {
-            Node newNode = new Node(value, n, n.previous);
-            newNode.previous.next = newNode;
-            newNode.next.previous = newNode;
-            m_size++;
-            m_modCount++;
-            return newNode;
-        }
-
-        private void Remove(Node n)
-        {
-            if (n == m_header)
-                throw new InvalidOperationException("Deleting from an empty list");
-            if (m_readOnly)
-            {
-                throw new InvalidOperationException("Cannot remove from a read-only list");
-            }
-
-            if (m_synch)
-            {
-                lock (this)
-                {
-                    UncheckedRemove(n);
-                }
-            }
-            else
-            {
-                UncheckedRemove(n);
-            }
-        }
-
-        private void UncheckedRemove(Node n)
-        {
-            n.previous.next = n.next;
-            n.next.previous = n.previous;
-            m_size--;
-            m_modCount++;
-        }
-        #endregion
-        #region Object
-        /// <summary>
-        /// Comma-separated list of element.ToString()'s.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder();
-            bool first = true;
-            foreach (object o in this)
-            {
-                if (!first)
-                {
-                    sb.Append(", ");
-                }
-                else
-                {
-                    first = false;
-                }
-
-                if (o == null)
-                    sb.Append("null");
-                else
-                    sb.Append(o.ToString());
-            }
-            return sb.ToString();
-        }
-        #endregion
-        #region newstuff
-        /// <summary>
-        /// Insert in order.
-        /// </summary>
-        /// <param name="value">Value to insert.</param>
-        /// <returns>The position of the insertion point.</returns>
-        public int Insert(object value)
-        {
-            if (m_comparator == null)
-            {
-                m_comparator = Comparer.Default;
-            }
-
-            // null less than anything
-            if (value == null)
-            {
-                AddBefore(null, m_header.next);
-                return 0;
-            }
-
-            int index=0;
-            int c;
-            for (Node n = m_header.next; n != m_header; n = n.next, index++)
-            {
-                c = m_comparator.Compare(value, n.element);
-                if (c < 0)
-                {
-                    AddBefore(value, n);
-                    return index;
-                }
-                else if (c == 0) // equal.  replace
-                {
-                    n.element = value;
-                    return index;
-                }
-            }
-
-            // got to the end without inserting.  Put it on the end.
-            AddBefore(value, m_header);
-            return m_size-1;
-        }
-
-        /// <summary>
-        /// The object to use for comparisons.
-        /// </summary>
-        public IComparer Comparator
-        {
-            get
-            {
-                return m_comparator;
-            }
-
-            set
-            {
-                m_comparator = value;
-            }
-        }
-
-        /// <summary>
-        /// Returns a read-only linked list from the given enumeration.
-        /// </summary>
-        /// <param name="e">Collection to be copied over to the read-only list.</param>
-        /// <returns>The new read-only list.</returns>
-        public static LinkedList ReadOnly(IEnumerable e)
-        {
-            LinkedList ll = new LinkedList(e);
-            ll.m_readOnly = true;
-            return ll;
-        }
-        #endregion
-        #region enumerator
-        private class ListEnumerator : IEnumerator
-        {
-            private LinkedList  list    = null;
-            private Node        current = null;
-            private int         mods    = -1;
-
-            public ListEnumerator(LinkedList ll)
-            {
-                list    = ll;
-                current = list.m_header;
-                mods    = list.m_modCount;
-            }
-
-            public object Current
-            {
-                get
-                {
-                    if (list.m_modCount != mods)
-                    {
-                        throw new InvalidOperationException("Changed list during iterator");
-                    }
-                    return current.element;
-                }
-            }
-
-            public bool MoveNext()
-            {
-                current = current.next;
-                return current != list.m_header;
-            }
-
-            public void Reset()
-            {
-                current = list.m_header;
-                mods = list.m_modCount;
-            }
-        }
-        #endregion
-        #region Node
-        private class Node
-        {
-            public object element;
-            public Node  next;
-            public Node  previous;
-
-            public Node(object element, Node next, Node previous)
-            {
-                this.element = element;
-                this.next = next;
-                this.previous = previous;
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/Set.cs b/lib/jabber-net/bedrock/collections/Set.cs
deleted file mode 100644
index 86bdfb6..0000000
--- a/lib/jabber-net/bedrock/collections/Set.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-
-namespace bedrock.collections
-{
-    /// <summary>
-    /// The different ways a set can be implemented.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum SetImplementation
-    {
-        /// <summary>
-        /// Hash table.
-        /// </summary>
-        Hashtable,
-        /// <summary>
-        /// Red/Black tree.
-        /// </summary>
-        Tree,
-        /// <summary>
-        /// Skip List.
-        /// </summary>
-        SkipList
-    }
-
-    /// <summary>
-    /// Set backed into a Tree.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Set : ISet
-    {
-        private static readonly object s_nothing = new object();
-
-        private IDictionary m_dict;
-
-        /// <summary>
-        /// Creates a new, empty Set backed into a hash table.
-        /// </summary>
-        public Set()
-        {
-            m_dict = new Hashtable();
-        }
-
-        /// <summary>
-        /// Creates a set with the given back-end implementation.
-        /// </summary>
-        /// <param name="impl">How to implement the set.</param>
-        public Set(SetImplementation impl)
-        {
-            switch (impl)
-            {
-                case SetImplementation.Hashtable:
-                    m_dict = new Hashtable();
-                    break;
-                case SetImplementation.Tree:
-                    m_dict = new Tree();
-                    break;
-                case SetImplementation.SkipList:
-                    m_dict = new SkipList();
-                    break;
-                default:
-                    throw new NotImplementedException("Unknown SetImplementation");
-            }
-        }
-
-        #region Implementation of ISet
-        /// <summary>
-        /// Adds an object to the set.
-        /// </summary>
-        /// <param name="o">The object to add</param>
-        /// <exception cref="ArgumentException">object was already in the set.</exception>
-        public void Add(object o)
-        {
-            if (!m_dict.Contains(o))
-                m_dict.Add(o, s_nothing);
-        }
-
-        /// <summary>
-        /// Removes the given object from the set.
-        /// There is no exception thrown if the object is not in the set.
-        /// </summary>
-        /// <param name="o">The object to remove.</param>
-        public void Remove(object o)
-        {
-            m_dict.Remove(o);
-        }
-
-        /// <summary>
-        /// Removes all items from the set.
-        /// </summary>
-        public void Clear()
-        {
-            m_dict.Clear();
-        }
-
-        /// <summary>
-        /// Determines if the given object is in the set.
-        /// </summary>
-        /// <param name="o">The object to search for.</param>
-        /// <returns>True if the object is in the set.</returns>
-        public bool Contains(object o)
-        {
-            return m_dict.Contains(o);
-        }
-
-        /// <summary>
-        /// Returns a new collection that contains all of the items that
-        /// are in this set or the other set.
-        /// </summary>
-        /// <param name="other">Second set to combine.</param>
-        /// <returns>Combined set.</returns>
-        public bedrock.collections.ISet Union(bedrock.collections.ISet other)
-        {
-            throw new NotImplementedException();
-        }
-
-        /// <summary>
-        /// Returns a new collection that contains all of the items that
-        /// are in this list *and* the other set.
-        /// </summary>
-        /// <param name="other">
-        /// Other set to intersect with.
-        /// </param>
-        /// <returns>Combined set.</returns>
-        public bedrock.collections.ISet Intersection(bedrock.collections.ISet other)
-        {
-            throw new NotImplementedException();
-        }
-        #endregion
-
-        #region Implementation of ICollection
-        /// <summary>
-        /// Copies the elements of the ICollection to an Array, starting at a particular Array index.
-        /// </summary>
-        /// <param name="array">The array to copy.</param>
-        /// <param name="index">The index to start at.</param>
-        public void CopyTo(System.Array array, int index)
-        {
-            int count = index;
-            foreach (object o in this)
-            {
-                array.SetValue(o, count);
-                count++;
-            }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether access to the ICollection is synchronized (thread-safe).
-        /// </summary>
-        public bool IsSynchronized
-        {
-            get { return m_dict.IsSynchronized; }
-        }
-
-        /// <summary>
-        /// Gets the number of items in the set.
-        /// </summary>
-        public int Count
-        {
-            get { return m_dict.Count; }
-        }
-
-        /// <summary>
-        /// Gets an object that can be used to synchronize access to the ICollection.
-        /// </summary>
-        public object SyncRoot
-        {
-            get { return m_dict.SyncRoot; }
-        }
-        #endregion
-
-        #region Implementation of IEnumerable
-        /// <summary>
-        /// Returns an enumerator that iterates through all items in the set.
-        /// </summary>
-        /// <returns>An IEnumerator for the entire set.</returns>
-        public System.Collections.IEnumerator GetEnumerator()
-        {
-            return new TreeSetEnumerator(m_dict);
-        }
-        #endregion
-
-        private class TreeSetEnumerator : IEnumerator
-        {
-            private IEnumerator m_enum;
-
-            public TreeSetEnumerator(IDictionary e)
-            {
-                m_enum = e.GetEnumerator();
-            }
-
-            #region Implementation of IEnumerator
-            public void Reset()
-            {
-                m_enum.Reset();
-            }
-
-            public bool MoveNext()
-            {
-                return m_enum.MoveNext();
-            }
-
-            public object Current
-            {
-                get
-                {
-                    DictionaryEntry entry = (DictionaryEntry) m_enum.Current;
-                    return entry.Key;
-                }
-            }
-            #endregion
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/SkipList.cs b/lib/jabber-net/bedrock/collections/SkipList.cs
deleted file mode 100644
index 0ea74b7..0000000
--- a/lib/jabber-net/bedrock/collections/SkipList.cs
+++ /dev/null
@@ -1,519 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-
-using bedrock.util;
-
-namespace bedrock.collections
-{
-    /// <summary>
-    /// Summary description for SkipList.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SkipList : IEnumerable, IDictionary
-    {
-        /// <summary>
-        /// The default probability for adding new node levels.
-        /// .25 provides a good balance of speed and size.
-        /// .5 will be slightly less variable in run time,
-        /// and take up more space
-        /// </summary>
-        private const float DEFAULT_PROBABILITY = 0.25F;
-
-        /// <summary>
-        /// The maximum depth for searching.
-        /// log(1/p, n), where n is the max number of
-        /// expected nodes.  For the defaults, n = 4096.
-        /// The list will continue to work for larger lists,
-        /// but performance will start to degrade toward
-        /// that of a linear search to further you get
-        /// above n.
-        /// TODO: automatically reset max_level when Length
-        /// goes above n.
-        /// </summary>
-        private const int DEFAULT_MAX_LEVEL = 6;
-
-        private float        m_probability;
-        private int          m_max_level = DEFAULT_MAX_LEVEL;
-        private SkipListNode m_header;
-        private Random       m_rand = new Random();
-        private IComparer    m_comparator = System.Collections.Comparer.Default;
-        private int          m_count = 0;
-
-        /// <summary>
-        /// Creates a skiplist with the default probability (0.25).
-        /// </summary>
-        public SkipList() : this(DEFAULT_PROBABILITY, DEFAULT_MAX_LEVEL)
-        {
-        }
-
-        /// <summary>
-        /// Create a skiplist with the default max_level.
-        /// </summary>
-        /// <param name="probability">Probability of adding a new level</param>
-        public SkipList(float probability) : this(probability, DEFAULT_MAX_LEVEL)
-        {
-        }
-
-        /// <summary>
-        /// Create a skiplist.
-        /// </summary>
-        /// <param name="probability">Probability of adding a new level</param>
-        /// <param name="maxLevel">Highest level in the list</param>
-        public SkipList(float probability, int maxLevel)
-        {
-            m_probability = probability;
-            m_max_level = maxLevel;
-            m_header = new SkipListNode(1, new Ali(), null);
-        }
-
-        /// <summary>
-        /// Gets the current number of elements in the list.
-        /// </summary>
-        public int Count
-        {
-            get { return m_count; }
-        }
-
-        /// <summary>
-        /// Add an item to the list.
-        /// </summary>
-        /// <param name="key">Key for later retrieval.
-        /// Must implement IComparable.</param>
-        /// <param name="val">The value to store</param>
-        /// <exception cref="ArgumentException">Thrown if the same key is added twice</exception>
-        /// <exception cref="ArgumentNullException">Thrown if key is null</exception>
-        public void Add(object key, object val)
-        {
-            if (key == null)
-                throw new ArgumentNullException("key");
-
-            SkipListNode update = new SkipListNode(m_max_level);
-            SkipListNode n = m_header;
-            SkipListNode next;
-
-            for (int i=m_header.Level-1; i>=0; i--)
-            {
-                next = n[i];
-                while ((next != null) &&
-                       (m_comparator.Compare(next.Key, key) < 0))
-                {
-                    n = next;
-                    next = n[i];
-                }
-                update[i] = n;
-            }
-            if ((n.Level > 0) &&
-                (n[0] != null) &&
-                (m_comparator.Compare(n[0].Key, key) == 0))
-            { // already here
-                //n.Value = val;
-                throw new ArgumentException("Can't add the same key twice", "key");
-            }
-            else
-            { // need to insert
-                int level = RandomLevel();
-                int s = m_header.Level;
-                if (level > s)
-                {
-                    // this shouldn't happen any more.
-                    //Debug.Assert(false);
-                    m_header.Level = level;
-                    for (int i=s; i<level; i++)
-                    {
-                        update[i] = m_header;
-                    }
-                }
-
-                n = new SkipListNode(level, key, val);
-                for (int i=0; i<level; i++)
-                {
-                    n[i] = update[i][i];
-                    update[i][i] = n;
-                }
-                m_count++;
-            }
-        }
-
-        /// <summary>
-        /// Is the given key found in the tree?
-        /// </summary>
-        /// <param name="key">The key to search for</param>
-        /// <returns></returns>
-        public bool Contains(object key)
-        {
-            return GetNode(key) != null;
-        }
-
-        /// <summary>
-        /// Looks up the key, and returns the corresponding value, or null if not found.
-        /// </summary>
-        public object this[object key]
-        {
-            get
-            {
-                SkipListNode n = GetNode(key);
-                if (n == null)
-                    return null;
-                return n.Value;
-            }
-            set
-            {
-                Add(key, value);
-            }
-        }
-
-        /// <summary>
-        /// Remove all of the items from the list.
-        /// </summary>
-        public void Clear()
-        {
-            m_header = new SkipListNode(1, new Ali(), null);
-            m_count = 0;
-        }
-
-        /// <summary>
-        /// Removes the item associated with this key from the list.
-        /// </summary>
-        /// <param name="key">Object that implements IComparable</param>
-        public void Remove(object key)
-        {
-            if (key == null)
-                throw new ArgumentNullException("key");
-
-            SkipListNode update = new SkipListNode(m_max_level);
-            SkipListNode n = m_header;
-            SkipListNode next;
-
-            for (int i=m_header.Level-1; i>=0; i--)
-            {
-                next = n[i];
-                while ((next != null) &&
-                       (m_comparator.Compare(next.Key, key) < 0))
-                {
-                    n = next;
-                    next = n[i];
-                }
-                update[i] = n;
-            }
-            if (n.Level == 0)
-                return; // or assert
-
-            n = n[0];
-            if ((n == null) ||
-                (m_comparator.Compare(n.Key, key) != 0))
-            { // not found
-                return;  // or assert
-            }
-
-            for (int i=0; i<m_header.Level; i++)
-            {
-                if (update[i][i] != n)
-                    break;
-                update[i][i] = n[i];
-            }
-            // TODO: reset m_header level
-            m_count--;
-        }
-
-        /// <summary>
-        /// Returns true if the list will not accept more items than constructed with.
-        /// </summary>
-        public bool IsFixedSize
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Returns true if one is unable to add or removed an item from this list.
-        /// </summary>
-        public bool IsReadOnly
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Gets all of the keys in the list.
-        /// </summary>
-        public System.Collections.ICollection Keys
-        {
-            get
-            {
-                object[] keys = new object[m_count];
-                int count = 0;
-                foreach (DictionaryEntry e in this)
-                {
-                    keys[count++] = e.Key;
-                }
-                return keys;
-            }
-        }
-
-        /// <summary>
-        /// Gets all of the values in the list.
-        /// </summary>
-        public System.Collections.ICollection Values
-        {
-            get
-            {
-                object[] vals = new object[m_count];
-                CopyTo(vals, 0);
-                return vals;
-            }
-        }
-
-        /// <summary>
-        /// Iterate over the list
-        /// </summary>
-        /// <returns></returns>
-        public IDictionaryEnumerator GetEnumerator()
-        {
-            return new SkipListEnumerator(this);
-        }
-
-        #region IEnumerable
-        /// <summary>
-        /// Iterate over the list
-        /// </summary>
-        /// <returns></returns>
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return new SkipListEnumerator(this);
-        }
-        #endregion
-
-        /// <summary>
-        /// Copy the *values* from this list to the given array.
-        /// It's not clear from the .Net docs wether this should be
-        /// entries or values, so I chose values.
-        /// </summary>
-        /// <param name="array">The array to copy into</param>
-        /// <param name="arrayIndex">The index to start at</param>
-        public void CopyTo(System.Array array, int arrayIndex)
-        {
-            if (array == null)
-                throw new ArgumentNullException("array");
-            if (array.Rank != 1)
-                throw new ArgumentException("Array must be single dimensional", "array");
-            if (arrayIndex < 0)
-                throw new ArgumentOutOfRangeException("arrayIndex", "starting index may not be negative");
-            if (array.Length - arrayIndex < m_count)
-                throw new ArgumentException("Array too small", "array");
-
-            int count = arrayIndex;
-            foreach (DictionaryEntry e in this)
-            {
-                array.SetValue(e.Value, count++);
-            }
-        }
-
-        /// <summary>
-        /// Returns false, for now
-        /// </summary>
-        public bool IsSynchronized
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Gets an object that can be used to synchronize access to ICollection.
-        /// </summary>
-        /// <exception cref="NotImplementedException">Currently this Property is not implemented.</exception>
-        public object SyncRoot
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-        }
-
-        private SkipListNode GetNode(object key)
-        {
-            if (key == null)
-                throw new ArgumentNullException("key");
-
-            if (m_count == 0)
-                return null;
-
-            SkipListNode n = m_header;
-            SkipListNode next;
-
-            for(int i=m_header.Level-1; i>=0; i--)
-            {
-                next = n[i];
-                while((next != null) &&
-                    (m_comparator.Compare(next.Key, key) < 0))
-                {
-                    n = next;
-                    next = n[i];
-                }
-            }
-
-            // n should always be level > 0, now.
-            n = n[0];
-
-            if( (n != null) && (m_comparator.Compare(n.Key, key) == 0))
-                return n;
-            else
-                return null;
-        }
-
-        private int RandomLevel()
-        {
-            int level = 1;
-            while ((level < m_max_level-1) && (m_rand.NextDouble() < m_probability))
-            {
-                level++;
-            }
-
-            return level;
-        }
-
-        private class SkipListNode
-        {
-            private SkipListNode[] m_next;
-            private object m_key;
-            private object m_value;
-
-            public SkipListNode(int level) : this(level, null, null)
-            {
-            }
-
-            public SkipListNode(int level, object key, object val)
-            {
-                m_next  = new SkipListNode[level];
-                for (int i=0; i<level; i++)
-                    m_next[i] = null;
-                m_key   = key;
-                m_value = val;
-            }
-
-            public SkipListNode this[int i]
-            {
-                get { return m_next[i]; }
-                set { m_next[i] = value; }
-            }
-
-            public int Level
-            {
-                get { return m_next.Length; }
-                set
-                {
-                    Debug.Assert(value > m_next.Length);
-                    SkipListNode[] n = new SkipListNode[value];
-                    Array.Copy(m_next, 0, n, 0, m_next.Length);
-                    for (int i=m_next.Length; i<value; i++)
-                    {
-                        n[i] = null;
-                    }
-                    m_next = n;
-                }
-            }
-
-            public object Key
-            {
-                get { return m_key; }
-                set { m_key = value; }
-            }
-
-            public object Value
-            {
-                get { return m_value; }
-                set { m_value = value; }
-            }
-        }
-
-        /// <summary>
-        /// An object that is the greatest.
-        /// </summary>
-        private class Ali : IComparable
-        {
-            int IComparable.CompareTo(object obj)
-            {
-                return 1;
-            }
-        }
-
-        private class SkipListEnumerator : IDictionaryEnumerator
-        {
-            private SkipList     m_list;
-            private SkipListNode m_node;
-
-            public SkipListEnumerator(SkipList list)
-            {
-                m_list = list;
-                m_node = m_list.m_header;
-            }
-
-            public bool MoveNext()
-            {
-                Debug.Assert(m_node != null);
-
-                m_node = m_node[0];
-                return m_node != null;
-            }
-
-            public void Reset()
-            {
-                m_node = m_list.m_header;
-            }
-
-            public object Current
-            {
-                get
-                {
-                    if (m_node == m_list.m_header)
-                        throw new InvalidOperationException("Call MoveNext, first");
-                    return Entry;
-                }
-            }
-
-            public System.Collections.DictionaryEntry Entry
-            {
-                get
-                {
-                    return new System.Collections.DictionaryEntry(m_node.Key, m_node.Value);
-                }
-            }
-
-            public object Key
-            {
-                get
-                {
-                    return m_node.Key;
-                }
-            }
-
-            public object Value
-            {
-                get
-                {
-                    return m_node.Value;
-                }
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/StringSet.cs b/lib/jabber-net/bedrock/collections/StringSet.cs
deleted file mode 100644
index 7d0b7a6..0000000
--- a/lib/jabber-net/bedrock/collections/StringSet.cs
+++ /dev/null
@@ -1,440 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-using bedrock.util;
-
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A set of strings, backed into a BitArray.  Any given string that is inserted
-    /// into any instance of a StringSet increases the size of all StringSets over time.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StringSet : IEnumerable, IEnumerable<string>, ICloneable
-	{
-        private BitArray m_bits = null;
-
-        // List<T>.Add doesn't return an int.
-        private static ArrayList s_strings = new ArrayList();
-        private static Dictionary<string, int> s_bits = new Dictionary<string,int>();
-
-        /// <summary>
-        /// Create a new StringSet, which is empty, but sized for all strings seen so far.
-        /// </summary>
-        public StringSet()
-        {
-            m_bits = new BitArray(s_strings.Count);
-        }
-
-        /// <summary>
-        /// Create a new set with the contents of another set.
-        /// </summary>
-        /// <param name="other"></param>
-        public StringSet(StringSet other)
-        {
-            if (other != null)
-                m_bits = (BitArray)other.m_bits.Clone();
-        }
-
-        /// <summary>
-        /// Create a set with one string in it.
-        /// </summary>
-        /// <param name="str"></param>
-        public StringSet(string str) : this()
-        {
-            if (str != null)
-                this.Add(str);
-        }
-
-        /// <summary>
-        /// Create a set containing all of the strings from the specified array.
-        /// </summary>
-        /// <param name="arr"></param>
-        public StringSet(string[] arr) : this()
-        {
-            if (arr != null)
-                Add(arr);
-        }
-
-        private static int GetStringValue(string s)
-        {
-            int val = -1;
-            
-            lock (s_bits)
-            {
-                if (!s_bits.TryGetValue(s, out val))
-                {
-                    s_bits[s] = val = s_strings.Add(s);
-                }
-            }
-            return val;
-        }
-
-        /// <summary>
-        /// Add a string to this set.  If it is already in the set, this is a no-op.
-        /// </summary>
-        /// <param name="s"></param>
-        public void Add(string s)
-        {
-            int val = GetStringValue(s);
-            if (val >= m_bits.Length)
-                m_bits.Length = s_strings.Count;
-            m_bits[val] = true;
-        }
-
-        /// <summary>
-        /// Add all of the strings from the given set to this set.
-        /// </summary>
-        /// <param name="set"></param>
-        public void Add(StringSet set)
-        {
-            // Lengthen this one to be able to hold everything in the other set, as well.
-            m_bits.Length = set.m_bits.Length = Math.Max(m_bits.Length, set.m_bits.Length);
-            m_bits.Or(set.m_bits);
-        }
-
-        /// <summary>
-        /// Add all of the strings from the given array to this set.
-        /// </summary>
-        /// <param name="arr"></param>
-        public void Add(string[] arr)
-        {
-            foreach (string s in arr)
-                Add(s);
-        }
-
-        /// <summary>
-        /// Remove the given string from this set.
-        /// </summary>
-        /// <param name="s"></param>
-        public void Remove(string s)
-        {
-            int val = GetStringValue(s);
-            if (val >= m_bits.Length)
-                return;
-            m_bits[val] = false;
-        }
-
-        /// <summary>
-        /// Remove all of the strings from the given set from this set.
-        /// </summary>
-        /// <param name="set"></param>
-        public void Remove(StringSet set)
-        {
-            m_bits.Length = set.m_bits.Length = Math.Max(m_bits.Length, set.m_bits.Length);
-            // Not is destructive.  Stupid.
-            BitArray os = (BitArray)set.m_bits.Clone();
-            os.Not();
-            m_bits.And(os);
-        }
-
-        /// <summary>
-        /// Clear all of the strings from this set.
-        /// </summary>
-        public void Clear()
-        {
-            m_bits.SetAll(false);
-        }
-
-        /// <summary>
-        /// Is this string in the set?
-        /// </summary>
-        /// <param name="s"></param>
-        /// <returns></returns>
-        public bool Contains(string s)
-        {
-            int val = GetStringValue(s);
-            if (val >= m_bits.Length)
-                return false;
-            return m_bits[val];            
-        }
-
-        /// <summary>
-        /// Gets or sets whether this string is in the set.
-        /// </summary>
-        /// <param name="s"></param>
-        /// <returns></returns>
-        public bool this[string s]
-        {
-            get { return Contains(s); }
-            set
-            {
-                if (value)
-                    Add(s);
-                else
-                    Remove(s);
-            }
-        }
-
-        /// <summary>
-        /// How many strings are in the set?
-        /// May be slower than you expect, at the moment.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                int c = 0;
-                foreach (bool b in m_bits)
-                {
-                    if (b)
-                        c++;
-                }
-                return c;
-            }
-        }
-
-        #region operators
-        /// <summary>
-        /// Add two StringSets together, returning a new set.
-        /// </summary>
-        /// <param name="one"></param>
-        /// <param name="two"></param>
-        /// <returns></returns>
-        public static StringSet operator +(StringSet one, StringSet two)
-        {
-            StringSet n = new StringSet(one);
-            n.Add(two);
-            return n;
-        }
-
-        /// <summary>
-        /// Returns a new set containing the contents of the first set as well as the
-        /// other string.
-        /// </summary>
-        /// <param name="set"></param>
-        /// <param name="str"></param>
-        /// <returns></returns>
-        public static StringSet operator +(StringSet set, string str)
-        {
-            StringSet n = new StringSet(set);
-            n.Add(str);
-            return n;
-        }
-
-        /// <summary>
-        /// Returns a new set containing everything from the first set that isn't in
-        /// the second set.
-        /// </summary>
-        /// <param name="one"></param>
-        /// <param name="two"></param>
-        /// <returns></returns>
-        public static StringSet operator -(StringSet one, StringSet two)
-        {
-            StringSet n = new StringSet(one);
-            n.Remove(two);
-            return n;
-        }
-
-        /// <summary>
-        /// Returns a new set containing everything from the first except the specified
-        /// string.
-        /// </summary>
-        /// <param name="set"></param>
-        /// <param name="str"></param>
-        /// <returns></returns>
-        public static StringSet operator -(StringSet set, string str)
-        {
-            StringSet n = new StringSet(set);
-            n.Remove(str);
-            return n;
-        }
-
-        /// <summary>
-        /// Is this set equal to another one?
-        /// Warning: this is about 32x slower than it should be.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(object obj)
-        {
-            if ((object)this == obj)
-                return true;
-            StringSet set = obj as StringSet;
-            if (set == null)
-                return false;
-
-            // BitArray.Equals is useless.  
-            // You'd also like to just compare the internal ints, 
-            // but BitArray is sealed.  Thx, MS.
-
-            // it's easiest to just stretch everythin out to the longest.
-            int max = Math.Max(this.m_bits.Length, set.m_bits.Length);
-            if (this.m_bits.Length != max)
-                this.m_bits.Length = max;
-            if (set.m_bits.Length != max)
-                set.m_bits.Length = max;
-
-            for (int i = 0; i < max; i++)
-            {
-                if (this.m_bits[i] != set.m_bits[i])
-                    return false;
-            }
-            
-            return true;
-        }
-
-        /// <summary>
-        /// Hashcode for the current contents of the list.
-        /// SLOW!
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            // Again, if I wrote a BitArray, it's GetHashCode would work, probably by
-            // adding and rotating the ints.
-            int hash = 0;
-            foreach (string s in this)
-            {
-                hash ^= s.GetHashCode();
-            }
-            return hash;
-        }
-        #endregion
-
-        /// <summary>
-        /// Get all of the strings that are currently in the set.
-        /// No guarantee of order.
-        /// </summary>
-        /// <returns></returns>
-        public string[] GetStrings()
-        {
-            string[] ret = new string[this.Count];
-            int i = 0;
-            foreach (string s in this)
-            {
-                ret[i++] = s;
-            }
-            return ret;
-        }
-
-        /// <summary>
-        /// All of the strings from the set, newline-separated.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.IO.StringWriter sw = new System.IO.StringWriter();
-            for (int i = 0; i < m_bits.Length; i++)
-            {
-                if (m_bits[i])
-                    sw.WriteLine(s_strings[i]);
-            }
-            return sw.ToString();
-        }
-
-        #region IEnumerable Members
-
-        /// <summary>
-        /// Enumerate over the strings in the set.
-        /// </summary>
-        /// <returns></returns>
-        public IEnumerator GetEnumerator()
-        {
-            return new StringSetEnumerator(this);
-        }
-
-        #endregion
-
-        #region IEnumerable<string> Members
-
-        /// <summary>
-        /// Enumerate over the strings in the set.
-        /// </summary>
-        /// <returns></returns>
-        IEnumerator<string> IEnumerable<string>.GetEnumerator()
-        {
-            return new StringSetEnumerator(this);
-        }
-
-        #endregion
-
-        #region ICloneable Members
-
-        /// <summary>
-        /// Return a copy of this set.
-        /// </summary>
-        /// <returns></returns>
-        public object Clone()
-        {
-            return new StringSet(this);
-        }
-
-        #endregion
-
-        private class StringSetEnumerator : IEnumerator<string>
-        {
-            StringSet m_set;
-            int m_cur = -1;
-
-            public StringSetEnumerator(StringSet set)
-            {
-                m_set = set;
-            }
-
-            #region IEnumerator<string> Members
-
-            public string Current
-            {
-                get 
-                {
-                    if ((m_cur < 0) || (m_cur >= m_set.m_bits.Length))
-                        throw new InvalidOperationException("Call to current outside of MoveNext");
-                    return (string)StringSet.s_strings[m_cur];
-                }
-            }
-
-            #endregion
-
-            #region IDisposable Members
-
-            public void Dispose()
-            {
-                m_set = null;
-            }
-
-            #endregion
-
-            #region IEnumerator Members
-
-            object IEnumerator.Current
-            {
-                get 
-                {
-                    return this.Current;
-                }
-            }
-
-            public bool MoveNext()
-            {
-                while (++m_cur < m_set.m_bits.Length)
-                {
-                    if (m_set.m_bits[m_cur])
-                        return true;
-                }
-                return false;
-            }
-
-            public void Reset()
-            {
-                m_cur = -1;
-            }
-
-            #endregion
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/Tree.cs b/lib/jabber-net/bedrock/collections/Tree.cs
deleted file mode 100644
index eb056af..0000000
--- a/lib/jabber-net/bedrock/collections/Tree.cs
+++ /dev/null
@@ -1,839 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A basic balanced tree implementation.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Tree : IEnumerable, IDictionary
-    {
-        private Node      root       = null;
-        private int       size       = 0;
-        private int       modCount   = 0;
-        private IComparer comparator = System.Collections.Comparer.Default;
-        //private bool      readOnly   = false;
-        //private bool      synch      = false;
-        /// <summary>
-        /// Construct an empty tree
-        /// </summary>
-        public Tree()
-        {
-            //
-            // TODO: Add Constructor Logic here
-            //
-        }
-        #region IEnumerable
-        /// <summary>
-        /// Iterate over the tree
-        /// </summary>
-        /// <returns></returns>
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return new TreeEnumerator(this);
-        }
-        #endregion
-        #region ICollection
-        /// <summary>
-        /// The number of items in the tree.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return size;
-            }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether access to the tree is synchronized in thread-safe mode.
-        /// Currently, it only returns false.
-        /// </summary>
-        public bool IsSynchronized
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        ///  Copies the values from the tree to the specified array in the order of the keys.
-        /// </summary>
-        /// <param name="array">The array to copy into</param>
-        /// <param name="index">The index to start at</param>
-        public void CopyTo(System.Array array, int index)
-        {
-            int i = index;
-            foreach (DictionaryEntry o in this)
-            {
-                array.SetValue(o.Value, i++);
-            }
-        }
-
-        /// <summary>
-        /// Gets an object that can be used to sychronize access to the tree. For now, it returns null.
-        /// </summary>
-        public object SyncRoot
-        {
-            get
-            {
-                return null;
-            }
-        }
-
-        #endregion
-        #region IDictionary
-        /// <summary>
-        /// Add an item to the tree
-        /// </summary>
-        /// <param name="key">The key for the item</param>
-        /// <param name="value">The data to store with this key</param>
-        /// <exception cref="ArgumentException">Thrown if the same key is added twice</exception>
-        /// <exception cref="ArgumentNullException">Thrown if key is null</exception>
-        public void Add(object key,object value)
-        {
-            if (key == null)
-                throw new ArgumentNullException("key");
-
-            Node n = root;
-
-            if (n == null)
-            {
-                sizeUp();
-                root = new Node(key, value, null);
-                return;
-            }
-
-            while (true)
-            {
-                int cmp = comparator.Compare(key, n.key);
-                if (cmp == 0)
-                {
-                    //n.value = value;
-                    //return;
-                    throw new ArgumentException("Can't add the same key twice", "key");
-                }
-                else if (cmp < 0)
-                {
-                    if (n.left != null)
-                    {
-                        n = n.left;
-                    }
-                    else
-                    {
-                        sizeUp();
-                        n.left = new Node(key, value, n);
-                        fixAfterInsertion(n.left);
-                        return;
-                    }
-                }
-                else // cmp > 0
-                {
-                    if (n.right != null) {
-                        n = n.right;
-                    }
-                    else
-                    {
-                        sizeUp();
-                        n.right = new Node(key, value, n);
-                        fixAfterInsertion(n.right);
-                        return;
-                    }
-                }
-            }
-
-        }
-
-        /// <summary>
-        /// Remove all values from the tree.
-        /// </summary>
-        public void Clear()
-        {
-            modCount++;
-            size = 0;
-            root = null;
-        }
-
-        /// <summary>
-        /// Determines if the specified key exists in the tree.
-        /// </summary>
-        /// <param name="key">The key to search for</param>
-        /// <returns>True if the key exists in the tree; otherwise false.</returns>
-        public bool Contains(object key)
-        {
-            return getNode(key) != null;
-        }
-
-        /// <summary>
-        /// Returns a dictionary enumerator.
-        /// </summary>
-        /// <returns>A dictionary enumerator</returns>
-        public IDictionaryEnumerator GetEnumerator()
-        {
-            return new TreeEnumerator(this);
-        }
-
-        /// <summary>
-        /// Remove the element from the tree associated
-        /// with this key, possibly rebalancing.
-        /// </summary>
-        /// <param name="key"></param>
-        public void Remove(object key)
-        {
-            Node n = getNode(key);
-            if (n == null)
-            {
-                return;
-            }
-            sizeDown();
-
-            // If strictly internal, first swap position with successor.
-            if ((n.left != null) && (n.right != null))
-            {
-                Node s = successor(n);
-                swapPosition(s, n);
-            }
-
-            // Start fixup at replacement node, if it exists.
-            Node replacement = ((n.left != null) ? n.left : n.right);
-
-            if (replacement != null)
-            {
-                // Link replacement to parent
-                replacement.parent = n.parent;
-                if (n.parent == null)
-                    root = replacement;
-                else if (n == n.parent.left)
-                    n.parent.left = replacement;
-                else
-                    n.parent.right = replacement;
-
-                // Null out links so they are OK to use by fixAfterDeletion.
-                n.left = n.right = n.parent = null;
-
-                // Fix replacement
-                if (n.color == NodeColor.BLACK)
-                fixAfterDeletion(replacement);
-            }
-            else if (n.parent == null)
-            {
-                root = null;
-            }
-            else
-            {
-                if (n.color == NodeColor.BLACK)
-                    fixAfterDeletion(n);
-
-                if (n.parent != null)
-                {
-                    if (n == n.parent.left)
-                        n.parent.left = null;
-                    else if (n == n.parent.right)
-                        n.parent.right = null;
-                    n.parent = null;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Retrieves the value associated with the given key.
-        /// </summary>
-        public object this[object key]
-        {
-            get
-            {
-                Node n = getNode(key);
-                if (n == null)
-                    return null;
-                return n.value;
-            }
-            set
-            {
-                Add(key, value);
-            }
-        }
-
-        /// <summary>
-        /// Retrieve a list of keys.
-        /// </summary>
-        public ICollection Keys
-        {
-            get
-            {
-                object[] keys = new object[Count];
-                int i=0;
-                if (root == null)
-                    return keys;
-                Node n = first(root);
-                while (n != null)
-                {
-                    keys[i++] = n.key;
-                    n = successor(n);
-                }
-                return keys;
-            }
-        }
-
-        /// <summary>
-        /// Retrieves a list of values.
-        /// </summary>
-        public ICollection Values
-        {
-            get
-            {
-                object[] vals = new object[Count];
-                int i=0;
-                Node n = first(root);
-                while (n != null)
-                {
-                    vals[i++] = n.value;
-                    n = successor(n);
-                }
-                return vals;
-            }
-        }
-
-        /// <summary>
-        /// Always returns false for now.
-        /// </summary>
-        public bool IsFixedSize
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Always returns false for now.
-        /// </summary>
-        public bool IsReadOnly
-        {
-            get
-            {
-                return false;
-            }
-        }
-        #endregion
-        #region Object
-        /// <summary>
-        /// Retrieves a string representation of the tree.
-        /// </summary>
-        /// <returns>string in the format '{key1}={value1}, {key2}={value2}, ...'</returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder();
-            bool f = true;
-            for (Node n = first(root); n != null; n = successor(n))
-            {
-                if (!f)
-                {
-                    sb.Append(", ");
-                }
-                else
-                {
-                    f = false;
-                }
-
-                sb.AppendFormat("{0}={1}", n.key, n.value);
-            }
-            return sb.ToString();
-        }
-
-        #endregion
-        /// <summary>
-        /// Retrieve a string representation of the tree.
-        /// Nice for debugging, but otherwise useless.
-        /// </summary>
-        /// <returns></returns>
-        public string Structure()
-        {
-            return root.ToString();
-        }
-        #region hidden
-        private static Node first(Node n)
-        {
-            if (n != null)
-            {
-                while (n.left != null)
-                    n = n.left;
-            }
-            return n;
-        }
-
-        private static Node successor(Node t)
-        {
-            if (t == null)
-                return null;
-
-            if (t.right != null)
-            {
-                Node n = t.right;
-                while (n.left != null)
-                    n = n.left;
-                return n;
-            }
-
-            Node p = t.parent;
-            Node ch = t;
-            while (p != null && ch == p.right)
-            {
-                ch = p;
-                p = p.parent;
-            }
-            return p;
-        }
-
-        private Node getNode(object key)
-        {
-            Node n = root;
-            while (n != null)
-            {
-                int cmp = comparator.Compare(key, n.key);
-                if (cmp == 0)
-                    return n;
-                else if (cmp < 0)
-                    n = n.left;
-                else
-                    n = n.right;
-            }
-            return null;
-        }
-
-        private void swapPosition(Node x, Node y)
-        {
-            Node px = x.parent;
-            Node lx = x.left;
-            Node rx = x.right;
-            Node py = y.parent;
-            Node ly = y.left;
-            Node ry = y.right;
-            bool xWasLeftChild = (px != null) && (x == px.left);
-            bool yWasLeftChild = (py != null) && (y == py.left);
-
-            if (x == py)
-            {
-                x.parent = y;
-                if (yWasLeftChild)
-                {
-                    y.left = x;
-                    y.right = rx;
-                }
-                else
-                {
-                    y.right = x;
-                    y.left = lx;
-                }
-            }
-            else
-            {
-                x.parent = py;
-                if (py != null)
-                {
-                    if (yWasLeftChild)
-                        py.left = x;
-                    else
-                        py.right = x;
-                }
-                y.left = lx;
-                y.right = rx;
-            }
-
-            if (y == px)
-            {
-                y.parent = x;
-                if (xWasLeftChild)
-                {
-                    x.left = y;
-                    x.right = ry;
-                }
-                else
-                {
-                    x.right = y;
-                    x.left = ly;
-                }
-            }
-            else
-            {
-                y.parent = px;
-                if (px != null)
-                {
-                    if (xWasLeftChild)
-                        px.left = y;
-                    else
-                        px.right = y;
-                }
-                x.left = ly;
-                x.right = ry;
-            }
-
-            if (x.left != null)
-                x.left.parent = x;
-            if (x.right != null)
-                x.right.parent = x;
-            if (y.left != null)
-                y.left.parent = y;
-            if (y.right != null)
-                y.right.parent = y;
-
-            NodeColor c = x.color;
-            x.color = y.color;
-            y.color = c;
-
-            if (root == x)
-                root = y;
-            else if (root == y)
-                root = x;
-        }
-
-        private static NodeColor colorOf(Node n)
-        {
-            return (n == null ? NodeColor.BLACK : n.color);
-        }
-
-        private static Node  parentOf(Node n)
-        {
-            return (n == null ? null: n.parent);
-        }
-
-        private static void setColor(Node n, NodeColor c)
-        {
-            if (n != null)
-                n.color = c;
-        }
-
-        private static Node leftOf(Node n)
-        {
-            return (n == null)? null: n.left;
-        }
-
-        private static Node rightOf(Node n)
-        {
-            return (n == null)? null: n.right;
-        }
-
-        private void rotateLeft(Node n)
-        {
-            Node r = n.right;
-            n.right = r.left;
-            if (r.left != null)
-                r.left.parent = n;
-            r.parent = n.parent;
-
-            if (n.parent == null)
-                root = r;
-            else if (n.parent.left == n)
-                n.parent.left = r;
-            else
-                n.parent.right = r;
-
-            r.left   = n;
-            n.parent = r;
-        }
-
-        private void rotateRight(Node n)
-        {
-            Node l = n.left;
-            n.left = l.right;
-            if (l.right != null)
-                l.right.parent = n;
-            l.parent = n.parent;
-
-            if (n.parent == null)
-                root = l;
-            else if (n.parent.right == n)
-                n.parent.right = l;
-            else
-                n.parent.left = l;
-
-            l.right = n;
-            n.parent = l;
-        }
-
-
-        private void fixAfterInsertion(Node n)
-        {
-            n.color = NodeColor.RED;
-
-            while ((n != null) &&
-                   (n != root) &&
-                   (n.parent.color == NodeColor.RED))
-            {
-                if (parentOf(n) == leftOf(parentOf(parentOf(n))))
-                {
-                    Node y = rightOf(parentOf(parentOf(n)));
-                    if (colorOf(y) == NodeColor.RED)
-                    {
-                        setColor(parentOf(n), NodeColor.BLACK);
-                        setColor(y, NodeColor.BLACK);
-                        setColor(parentOf(parentOf(n)), NodeColor.RED);
-                        n = parentOf(parentOf(n));
-                    }
-                    else
-                    {
-                        if (n == rightOf(parentOf(n)))
-                        {
-                            n = parentOf(n);
-                            rotateLeft(n);
-                        }
-
-                        setColor(parentOf(n), NodeColor.BLACK);
-                        setColor(parentOf(parentOf(n)), NodeColor.RED);
-                        if (parentOf(parentOf(n)) != null)
-                            rotateRight(parentOf(parentOf(n)));
-                    }
-                }
-                else
-                {
-                    Node y = leftOf(parentOf(parentOf(n)));
-                    if (colorOf(y) == NodeColor.RED)
-                    {
-                        setColor(parentOf(n), NodeColor.BLACK);
-                        setColor(y, NodeColor.BLACK);
-                        setColor(parentOf(parentOf(n)), NodeColor.RED);
-                        n = parentOf(parentOf(n));
-                    }
-                    else
-                    {
-                        if (n == leftOf(parentOf(n)))
-                        {
-                            n = parentOf(n);
-                            rotateRight(n);
-                        }
-                        setColor(parentOf(n),  NodeColor.BLACK);
-                        setColor(parentOf(parentOf(n)), NodeColor.RED);
-                        if (parentOf(parentOf(n)) != null)
-                            rotateLeft(parentOf(parentOf(n)));
-                    }
-                }
-            }
-            root.color = NodeColor.BLACK;
-        }
-
-        private void fixAfterDeletion(Node x)
-        {
-            while ((x != root) && (colorOf(x) == NodeColor.BLACK))
-            {
-                if (x == leftOf(parentOf(x)))
-                {
-                    Node sib = rightOf(parentOf(x));
-
-                    if (colorOf(sib) == NodeColor.RED)
-                    {
-                        setColor(sib, NodeColor.BLACK);
-                        setColor(parentOf(x), NodeColor.RED);
-                        rotateLeft(parentOf(x));
-                        sib = rightOf(parentOf(x));
-                    }
-
-                    if ((colorOf(leftOf(sib))  == NodeColor.BLACK) &&
-                        (colorOf(rightOf(sib)) == NodeColor.BLACK))
-                    {
-                        setColor(sib,  NodeColor.RED);
-                        x = parentOf(x);
-                    }
-                    else
-                    {
-                        if (colorOf(rightOf(sib)) == NodeColor.BLACK)
-                        {
-                            setColor(leftOf(sib), NodeColor.BLACK);
-                            setColor(sib, NodeColor.RED);
-                            rotateRight(sib);
-                            sib = rightOf(parentOf(x));
-                        }
-                        setColor(sib, colorOf(parentOf(x)));
-                        setColor(parentOf(x), NodeColor.BLACK);
-                        setColor(rightOf(sib), NodeColor.BLACK);
-                        rotateLeft(parentOf(x));
-                        x = root;
-                    }
-                }
-                else
-                {
-                    Node sib = leftOf(parentOf(x));
-
-                    if (colorOf(sib) == NodeColor.RED)
-                    {
-                        setColor(sib, NodeColor.BLACK);
-                        setColor(parentOf(x), NodeColor.RED);
-                        rotateRight(parentOf(x));
-                        sib = leftOf(parentOf(x));
-                    }
-
-                    if (colorOf(rightOf(sib)) == NodeColor.BLACK &&
-                        colorOf(leftOf(sib)) == NodeColor.BLACK)
-                    {
-                        setColor(sib,  NodeColor.RED);
-                        x = parentOf(x);
-                    }
-                    else
-                    {
-                        if (colorOf(leftOf(sib)) == NodeColor.BLACK) {
-                        setColor(rightOf(sib), NodeColor.BLACK);
-                        setColor(sib, NodeColor.RED);
-                        rotateLeft(sib);
-                        sib = leftOf(parentOf(x));
-                        }
-                        setColor(sib, colorOf(parentOf(x)));
-                        setColor(parentOf(x), NodeColor.BLACK);
-                        setColor(leftOf(sib), NodeColor.BLACK);
-                        rotateRight(parentOf(x));
-                        x = root;
-                    }
-                }
-            }
-
-            setColor(x, NodeColor.BLACK);
-        }
-
-        private void sizeUp()   { modCount++; size++; }
-        private void sizeDown() { modCount++; size--; }
-        #endregion
-        #region node
-        private enum NodeColor : byte
-        {
-            RED,
-            BLACK
-        }
-
-        private class Node
-        {
-            public object key;
-            public object value;
-            public Node left = null;
-            public Node right = null;
-            public Node parent;
-            public NodeColor color = NodeColor.BLACK;
-
-            public Node(object key, object value, Node parent)
-            {
-                this.key = key;
-                this.value = value;
-                this.parent = parent;
-            }
-
-            public override bool Equals(object o)
-            {
-                Node n = o as Node;
-                if (n == null)
-                {
-                    return false;
-                }
-                return (key == n.key) && (value == n.value);
-            }
-
-            public override int GetHashCode()
-            {
-                return key.GetHashCode();
-            }
-
-            public override string ToString()
-            {
-                //return key + "=" + value + " (" + color + ")";
-                if ((left==null) && (right==null))
-                {
-                    return key.ToString();
-                }
-                return key + " (" +
-                    ((left == null) ? "null" : left.ToString()) + "," +
-                    ((right == null) ? "null" : right.ToString()) + ")";
-            }
-
-        }
-        #endregion
-        #region enumerator
-        private class TreeEnumerator : IDictionaryEnumerator
-        {
-            private Tree  tree    = null;
-            private Node  current = null;
-            private int   mods    = -1;
-
-            public TreeEnumerator(Tree t) : this(t, t.root)
-            {
-            }
-
-            public TreeEnumerator(Tree t, Node n)
-            {
-                tree    = t;
-                mods    = t.modCount;
-
-                // foreach calls MoveNext before starting.  Create a dummy node before the first one.
-                current = new Node(null, null, null);
-                current.right = first(n);
-            }
-
-            public object Current
-            {
-                get
-                {
-                    if (tree.modCount != mods)
-                    {
-                        throw new InvalidOperationException("Changed list during iterator");
-                    }
-                    return Entry;
-                }
-            }
-
-            public bool MoveNext()
-            {
-                current = successor(current);
-                return current != null;
-            }
-
-            public void Reset()
-            {
-                current = first(tree.root);
-                mods = tree.modCount;
-            }
-
-            public object Key
-            {
-                get
-                {
-                    if (tree.modCount != mods)
-                    {
-                        throw new InvalidOperationException("Changed list during iterator");
-                    }
-                    return current.key;
-                }
-            }
-
-            public object Value
-            {
-                get
-                {
-                    if (tree.modCount != mods)
-                    {
-                        throw new InvalidOperationException("Changed list during iterator");
-                    }
-                    return current.value;
-                }
-            }
-
-            public DictionaryEntry Entry
-            {
-                get
-                {
-                    return new DictionaryEntry(current.key, current.value);
-                }
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/Trie.cs b/lib/jabber-net/bedrock/collections/Trie.cs
deleted file mode 100644
index 68153b6..0000000
--- a/lib/jabber-net/bedrock/collections/Trie.cs
+++ /dev/null
@@ -1,466 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using bedrock.util;
-
-namespace bedrock.collections
-{
-    /// <summary>
-    /// The method signature used by <see cref="Trie.Traverse(TrieKeyWalker,object,TrieNode,ByteStack)"/> when it encounters a key.
-    /// </summary>
-    public delegate bool TrieKeyWalker(TrieNode e, object data, ByteStack key);
-    /// <summary>
-    /// The method signature used by <see cref="Trie.Traverse(TrieWalker,object,TrieNode)"/> when it encounters a node.
-    /// </summary>
-    public delegate bool TrieWalker(TrieNode e, object data);
-    /// <summary>
-    /// A trie is a tree structure that implements a radix search.  Each node of the tree has a
-    /// sub-node for each possible next byte.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Trie : IDictionary
-    {
-        private static readonly System.Text.Encoding ENCODING = System.Text.Encoding.Default;
-
-        /// <summary>
-        /// The root node of the trie.
-        /// </summary>
-        private TrieNode m_root  = new TrieNode(null, 0);
-
-        /// <summary>
-        /// The number of nodes are in the trie
-        /// </summary>
-        private int      m_count = 0;
-
-        /// <summary>
-        /// Creates an empty trie.
-        /// </summary>
-        public Trie() {}
-
-        /// <summary>
-        /// Find a node for a given key, somewhere under the root.
-        /// </summary>
-        /// <param name="key">The bytes to search for, where key[0] corresponds to a child
-        /// node of the root.</param>
-        /// <param name="create">Create nodes that don't exist, while searching.</param>
-        /// <returns>The node if found. If the node doesn't exist and create is true, the node created; otherwise null.</returns>
-        protected virtual TrieNode FindNode(byte[] key, bool create)
-        {
-            return FindNode(key, m_root, create);
-        }
-        /// <summary>
-        /// Finds a node in the given sub-tree.
-        /// </summary>
-        /// <param name="key">The key to search on, where key[0] corresponds to a child of startAt.</param>
-        /// <param name="startAt">The node to search under</param>
-        /// <param name="create">Create nodes that don't exist, while searching.</param>
-        /// <returns>The node if found. If the node doesn't exist and create is true, the node created; otherwise null.</returns>
-        protected virtual TrieNode FindNode(byte[] key, TrieNode startAt, bool create)
-        {
-            TrieNode current = startAt;
-            byte b;
-
-            for (int i=0; (i<key.Length) && (current != null); i++)
-            {
-                b = key[i];
-                current = current[b, create];
-            }
-            return current;
-        }
-        /// <summary>
-        /// Compute the byte array corresping to the given object.
-        /// This is likely to cause problems for non 7-bit ASCII text.
-        /// </summary>
-        /// <param name="key"> </param>
-        protected static byte[] KeyBytes(object key)
-        {
-            if (key is byte[])
-            {
-                return (byte[]) key;
-            }
-
-            return ENCODING.GetBytes(key.ToString());
-        }
-        /// <summary>
-        /// Extra functionality for trie's whose values are integers.
-        /// Increment the value corresponding to the key.  If
-        /// the key doesn't exist, put in a value of '1'.
-        /// </summary>
-        /// <param name="key"> </param>
-        public virtual void Increment(object key)
-        {
-            TrieNode e = FindNode(KeyBytes(key), true);
-            if (e.Value == null)
-            {
-                e.Value = 1;
-            }
-            else
-            {
-                e.Value = ((int) e.Value) + 1;
-            }
-        }
-        /// <summary>
-        /// Performs the given function on every element of the trie. This is equivalent to Perl's map() operator.
-        /// </summary>
-        /// <param name="w">The function to call</param>
-        /// <param name="data">Extra data to pass along to the function.</param>
-        public void Traverse(TrieKeyWalker w, object data)
-        {
-            Traverse(w, data, m_root, new ByteStack());
-        }
-
-        /// <summary>
-        /// Perform the given function on every element of the trie.  Perl's map() operator.
-        /// </summary>
-        /// <param name="w">The function to call</param>
-        /// <param name="data">Extra data to pass along to the function.</param>
-        /// <param name="current">What node are we currently on?</param>
-        /// <param name="key">A stack holding the current key value</param>
-        protected void Traverse(TrieKeyWalker w, object data, TrieNode current, ByteStack key)
-        {
-            if (!w(current, data, key))
-            {
-                return;
-            }
-            foreach (TrieNode e in current)
-            {
-                key.Push(e.Byte);
-                Traverse(w, data, e, key);
-                key.Pop();
-            }
-        }
-        /// <summary>
-        /// Perform the given function on every element of the trie.  Perl's map() operator.
-        /// Don't keep track of the keys (slightly faster than the other Traverse() method).
-        /// </summary>
-        /// <param name="w">The function to call</param>
-        /// <param name="data">Extra data to pass along to the function.</param>
-        public void Traverse(TrieWalker w, object data)
-        {
-            Traverse(w, data, m_root);
-        }
-        /// <summary>
-        /// Perform the given function on every element of the trie.  Perl's map() operator.
-        /// </summary>
-        /// <param name="w">The function to call</param>
-        /// <param name="data">Extra data to pass along to the function.</param>
-        /// <param name="current">What node are we currently on?</param>
-        protected void Traverse(TrieWalker w, object data, TrieNode current)
-        {
-            if (! w(current, data))
-            {
-                return;
-            }
-            foreach (TrieNode e in current)
-            {
-                Traverse(w, data, e);
-            }
-        }
-        #region System.Collections.IDictionary
-
-        /// <summary>
-        /// Retrieve the value associated with the given key.
-        /// </summary>
-        public virtual object this[object key]
-        {
-            get
-            {
-                TrieNode e = FindNode(KeyBytes(key), false);
-                return (e == null) ? null : e.Value;
-            }
-            set
-            {
-                TrieNode e = FindNode(KeyBytes(key), true);
-                e.Value = value;
-                m_count++;
-            }
-        }
-
-        /// <summary>
-        /// Always "false" for now.
-        /// </summary>
-        public bool IsFixedSize
-        {
-            get { return false; }
-        }
-
-
-        /// <summary>
-        /// Find all of the keys.
-        /// </summary>
-        /// <param name="n"> </param>
-        /// <param name="data"> </param>
-        /// <param name="key"> </param>
-        private bool KeyWalker(TrieNode n, object data, ByteStack key)
-        {
-            if (n.Value != null)
-            {
-                ArrayList al = (ArrayList) data;
-                al.Add((byte[]) key);
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// Get a list of all of the keys.  Hope this doesn't get called often, since it has to make copies
-        /// of all of the possible keys.
-        /// </summary>
-        public ICollection Keys
-        {
-            get
-            {
-                ArrayList al = new ArrayList(m_count);
-                Traverse(new TrieKeyWalker(KeyWalker), al);
-                al.TrimToSize();
-                return al;
-            }
-        }
-
-        /// <summary>
-        /// Returns a collection containing all of the values.
-        /// </summary>
-        public ICollection Values
-        {
-            get
-            {
-                // pretty easy, since we implement ICollection.
-                return new ArrayList(this);
-            }
-        }
-
-        /// <summary>
-        /// Removes the node associated with the given key, along with all newly empty ancestors.
-        /// </summary>
-        /// <param name="key">Key to remove.</param>
-        public void Remove(object key)
-        {
-            TrieNode current = FindNode(KeyBytes(key), false);
-            if (current == null)
-            {
-                return;
-            }
-
-            current.Value = null;
-            m_count--;
-
-            if (m_count == 0)
-            {
-                Clear();
-                return;
-            }
-
-            // prune
-            byte last;
-            while (current.IsEmpty)
-            {
-                last = current.Byte;
-                current = current.Parent;
-                if (current == null)
-                {
-                    // all the way empty.
-                    break;
-                }
-                current.Remove(last);
-            }
-        }
-
-        /// <summary>
-        /// Iterate the dictionary way.
-        /// </summary>
-        IDictionaryEnumerator IDictionary.GetEnumerator()
-        {
-            return new TrieEnumerator(this);
-        }
-
-        /// <summary>
-        /// Deletes all nodes.
-        /// </summary>
-        public void Clear()
-        {
-            m_root  = new TrieNode(null, 0);
-            m_count = 0;
-        }
-
-        /// <summary>
-        /// Add a new key/value pair.
-        /// </summary>
-        /// <param name="key"> </param>
-        /// <param name="value"> </param>
-        public void Add(object key, object value)
-        {
-            this[key] = value;
-        }
-
-        /// <summary>
-        /// Is the given key in the trie?
-        /// </summary>
-        /// <param name="key"> </param>
-        public bool Contains(object key)
-        {
-            TrieNode current = FindNode(KeyBytes(key), false);
-            return current != null;
-        }
-
-        #endregion
-        #region System.Collections.ICollection
-
-        /// <summary>
-        /// How many values are stored?  Note: NOT how many nodes.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return m_count;
-            }
-        }
-
-        /// <summary>
-        /// Object to synchronize on, if in thread-safe mode.
-        /// TODO: implement settable SyncRoot
-        /// </summary>
-        public object SyncRoot
-        {
-            get
-            {
-                return this;
-            }
-        }
-
-        /// <summary>
-        /// Always "false" for now
-        /// </summary>
-        public bool IsReadOnly
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether access to the trie is synchronized in thread-safe mode.
-        /// Only returns false now.
-        /// </summary>
-        public bool IsSynchronized
-        {
-            get
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Copy into an array.
-        /// </summary>
-        /// <param name="array"> </param>
-        /// <param name="index"> </param>
-        public void CopyTo(Array array, int index)
-        {
-            int i = index;
-            foreach (object o in this)
-            {
-                array.SetValue(o, i);
-                i++;
-            }
-        }
-
-        #endregion
-        #region System.Collections.IEnumerable
-
-        /// <summary>
-        /// Iterate over the keys.  Each key will be a byte[].
-        /// </summary>
-        public IEnumerator GetEnumerator()
-        {
-            return new TrieEnumerator(this);
-        }
-
-        #endregion
-
-        private class TrieEnumerator : IDictionaryEnumerator
-        {
-            protected Trie     m_trie;
-            protected Stack    m_pos     = new Stack();
-            protected TrieNode m_current = null;
-            public TrieEnumerator(Trie t)
-            {
-                m_trie = t;
-                m_pos.Push(m_trie.m_root);
-            }
-
-            public object Current
-            {
-                get
-                {
-                    return Entry;
-                }
-            }
-
-            public void Reset()
-            {
-                m_pos.Clear();
-                m_pos.Push(m_trie.m_root);
-            }
-
-            public bool MoveNext()
-            {
-                if (m_pos.Count <= 0)
-                {
-                    return false;
-                }
-
-                m_current = (TrieNode) m_pos.Pop();
-
-                foreach (TrieNode e in m_current)
-                {
-                    m_pos.Push(e);
-                }
-
-                if (m_current.Value != null)
-                {
-                    return true;
-                }
-
-                return MoveNext();
-            }
-
-            public object Key
-            {
-                get
-                {
-                    return m_current.Key;
-                }
-            }
-
-            public object Value
-            {
-                get
-                {
-                    return m_current.Value;
-                }
-            }
-
-            public DictionaryEntry Entry
-            {
-                get
-                {
-                    return new DictionaryEntry(m_current.Key, m_current.Value);
-                }
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/collections/TrieNode.cs b/lib/jabber-net/bedrock/collections/TrieNode.cs
deleted file mode 100644
index da6865f..0000000
--- a/lib/jabber-net/bedrock/collections/TrieNode.cs
+++ /dev/null
@@ -1,267 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.IO;
-using System.Collections;
-using bedrock.util;
-namespace bedrock.collections
-{
-    /// <summary>
-    /// A node in a Trie.  This class is public to support traversal via Trie.Traverse().
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class TrieNode : IEnumerable
-    {
-        // Warning: Assumption of 7-bit ASCII encoding!
-        // TODO: replace with GraphNode
-        //public const byte MIN_CHAR  = (byte) ' ';
-        //public const byte MAX_CHAR  = (byte) '~';
-        //public const byte NUM_CHARS = MAX_CHAR - MIN_CHAR + 1;
-
-        //private TrieNode[] m_children = new TrieNode[NUM_CHARS];
-        private Tree       m_children = new Tree();
-        private TrieNode   m_parent   = null;
-        private Object     m_value    = null;
-        private byte       m_key      = 0;
-
-        /// <summary>
-        /// Create a new node
-        /// </summary>
-        /// <param name="parent">The parent of the new node</param>
-        /// <param name="key">The byte for this node</param>
-        public TrieNode(TrieNode parent, byte key)
-        {
-            m_parent = parent;
-            m_key    = key;
-        }
-
-        /// <summary>
-        /// Adds a child to this node.
-        /// </summary>
-        /// <param name="key">The key for the child.</param>
-        /// <returns>The child noded added to this node.</returns>
-        public virtual TrieNode Add(byte key)
-        {
-            TrieNode e = new TrieNode(this, key);
-            this[key]  = e;
-            return e;
-        }
-        /// <summary>
-        /// Are there children of this node?
-        /// </summary>
-        public bool IsEmpty
-        {
-            get
-            {
-                if (m_value != null)
-                    return false;
-                foreach (object key in m_children)
-                {
-                    if (m_children[key] != null)
-                        return false;
-                }
-                return true;
-            }
-        }
-
-        /// <summary>
-        /// Get the parent of this node
-        /// </summary>
-        public TrieNode Parent
-        {
-            get
-            {
-                return m_parent;
-            }
-        }
-        /// <summary>
-        /// Gets the byte associated with this node.
-        /// </summary>
-        public byte Byte
-        {
-            get
-            {
-                return m_key;
-            }
-        }
-
-        /// <summary>
-        /// Retrive the full key for this node, traversing parent-ward toward the root.
-        /// </summary>
-        public byte[] Key
-        {
-            get
-            {
-                MemoryStream ms = new MemoryStream();
-                TrieNode current = this;
-                while (current.Parent != null)
-                {
-                    ms.WriteByte(current.Byte);
-                    current = current.Parent;
-                }
-                byte[] buf = ms.ToArray();
-                Array.Reverse(buf);
-                return buf;
-            }
-        }
-        /// <summary>
-        /// The value associated with this node
-        /// </summary>
-        public Object Value
-        {
-            get
-            {
-                return m_value;
-            }
-            set
-            {
-                m_value = value;;
-            }
-        }
-        /// <summary>
-        /// Gets the child associated with the specified byte, or null if one does not exist.
-        /// </summary>
-        public TrieNode this[byte key]
-        {
-            get
-            {
-                return (TrieNode) m_children[key];
-            }
-            set
-            {
-                m_children[key] = value;
-            }
-        }
-        /// <summary>
-        /// Gets the child associated with the specified byte, or null if one does not exist.
-        /// If create is true, a node will be added with a null value
-        /// if a node does not already exist, so that this can be used
-        /// as an lvalue.
-        /// </summary>
-        public TrieNode this[byte key, bool create]
-        {
-            get
-            {
-                TrieNode e = this[key];
-                if (e != null)
-                {
-                    return e;
-                }
-                if (create)
-                {
-                    return Add(key);
-                }
-                return null;
-            }
-        }
-        /// <summary>
-        /// Is there a child at the given byte?
-        /// </summary>
-        /// <param name="key"></param>
-        /// <returns></returns>
-        public bool HasChild(byte key)
-        {
-            return this[key] != null;
-        }
-        /// <summary>
-        /// Remove the child at the given byte
-        /// </summary>
-        /// <param name="key"></param>
-        public void Remove(byte key)
-        {
-            this[key] = null;
-        }
-        /// <summary>
-        /// Compares the specified object with this entry for equality.
-        /// Returns <tt>true</tt> if the given object is also a map entry and
-        /// the two entries represent the same mapping.  More formally, two
-        /// entries <tt>e1</tt> and <tt>e2</tt> represent the same mapping
-        /// if:<pre>
-        ///     (e1.getKey()==null ?
-        ///      e2.getKey()==null : e1.getKey().equals(e2.getKey()))  &&
-        ///     (e1.getValue()==null ?
-        ///      e2.getValue()==null : e1.getValue().equals(e2.getValue()))
-        /// </pre>
-        /// This ensures that the <tt>equals</tt> method works properly across
-        /// different implementations of the <tt>Map.Entry</tt> interface.
-        /// </summary>
-        /// <param name="o">Object to be compared for equality with this map entry.</param>
-        /// <returns><tt>True</tt> if the specified object is equal to this map
-        ///         entry; otherwise false.</returns>
-        public override bool Equals(Object o)
-        {
-            if (o == null)
-                return false;
-            if (o == this)
-                return true;
-
-            if (! (o is TrieNode))
-                return false;
-            TrieNode e = (TrieNode) o;
-
-            return ((Key == null)    ? (e.Key   == null) : Key.Equals(e.Key))  &&
-                ((Value == null) ? (e.Value == null) : Value.Equals(e.Value));
-        }
-        /// <summary>
-        /// Returns the hash code value for this map entry.
-        /// </summary>
-        /// <returns>Hash code.</returns>
-        public override int GetHashCode()
-        {
-            return ((Key==null)    ? 0 : Key.GetHashCode()) ^
-                    ((Value==null) ? 0 : Value.GetHashCode());
-        }
-        #region Implementation of IEnumerable
-        /// <summary>
-        /// Iterates over the child nodes.
-        /// </summary>
-        /// <returns>An IEnumerator to parse over the child nodes.</returns>
-        public System.Collections.IEnumerator GetEnumerator()
-        {
-            return new TrieNodeEnumerator(this);
-        }
-        #endregion
-        private class TrieNodeEnumerator : IEnumerator
-        {
-            private TrieNode    m_node;
-            private IEnumerator m_enum;
-            public TrieNodeEnumerator(TrieNode n)
-            {
-                m_node = n;
-                Reset();
-            }
-            #region Implementation of IEnumerator
-            public void Reset()
-            {
-                // yeah, I know.  but I want to go to bed.
-                m_enum  = m_node.m_children.Values.GetEnumerator();
-            }
-
-            public bool MoveNext()
-            {
-                return m_enum.MoveNext();
-            }
-
-            public object Current
-            {
-                get
-                {
-                    return m_enum.Current;
-                }
-            }
-            #endregion
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/io/BufferAggregate.cs b/lib/jabber-net/bedrock/io/BufferAggregate.cs
deleted file mode 100644
index dc26acf..0000000
--- a/lib/jabber-net/bedrock/io/BufferAggregate.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Collections;
-using System.IO;
-
-using bedrock.util;
-
-namespace bedrock.io
-{
-    /// <summary> Aggregate byte arrays together, so we can parse
-    /// across IP packet boundaries
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BufferAggregate
-    { // RingBuffer of the Nieblung
-        private class BufNode
-        {
-            public byte[] buf;
-            public BufNode next = null;
-        }
-
-        private MemoryStream m_stream = new MemoryStream();
-        private BufNode m_head = null;
-        private BufNode m_tail = null;
-
-        /// <summary>
-        /// Create an empty buffer
-        /// </summary>
-        public BufferAggregate()
-        {
-        }
-
-        /// <summary>
-        /// Write to the buffer.  Please make sure that you won't use this memory any more after you hand it in.
-        /// It will get mangled.
-        /// </summary>
-        /// <param name="buf"></param>
-        public void Write(byte[] buf)
-        {
-            m_stream.Write(buf, 0, buf.Length);
-            if (m_tail == null)
-            {
-                m_head = m_tail = new BufNode();
-                m_head.buf = buf;
-            }
-            else
-            {
-                BufNode n = new BufNode();
-                n.buf = buf;
-                m_tail.next = n;
-                m_tail = n;
-            }
-        }
-
-        /// <summary>
-        /// Get the current aggregate contents of the buffer.
-        /// </summary>
-        /// <returns></returns>
-        public byte[] GetBuffer()
-        {
-            return m_stream.ToArray();
-        }
-
-        /// <summary>
-        /// Clear the first "offset" bytes of the buffer, so they won't be parsed again.
-        /// </summary>
-        /// <param name="offset"></param>
-        public void Clear(int offset)
-        {
-            int s = 0;
-            int save = -1;
-
-            BufNode bn = null;
-            for (bn = m_head; bn != null; bn = bn.next)
-            {
-                if (s + bn.buf.Length <= offset)
-                {
-                    if (s + bn.buf.Length == offset)
-                    {
-                        bn = bn.next;
-                        break;
-                    }
-                    s += bn.buf.Length;
-                }
-                else
-                {
-                    save = s + bn.buf.Length - offset;
-                    break;
-                }
-            }
-
-            m_head = bn;
-            if (m_head == null)
-                m_tail = null;
-
-            if (save > 0)
-            {
-                byte[] buf = new byte[save];
-                System.Buffer.BlockCopy(m_head.buf,
-                    m_head.buf.Length - save,
-                    buf, 0, save);
-                m_head.buf = buf;
-            }
-
-            m_stream.SetLength(0);
-            for (bn = m_head; bn != null; bn = bn.next)
-            {
-                m_stream.Write(bn.buf, 0, bn.buf.Length);
-            }
-        }
-
-        /// <summary>
-        /// UTF8 encode the current contents of the buffer.  Just for prettiness in the debugger.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            byte[] b = GetBuffer();
-            return System.Text.Encoding.UTF8.GetString(b, 0, b.Length);
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/io/ReadEventStream.cs b/lib/jabber-net/bedrock/io/ReadEventStream.cs
deleted file mode 100644
index 4baee71..0000000
--- a/lib/jabber-net/bedrock/io/ReadEventStream.cs
+++ /dev/null
@@ -1,236 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.IO;
-using bedrock.util;
-
-namespace bedrock.io
-{
-    /// <summary>
-    /// Wrap a stream, so that OnRead events can be fired.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ReadEventStream : Stream
-    {
-        private Stream m_stream;
-
-        /// <summary>
-        /// Create a new stream.
-        /// </summary>
-        /// <param name="s"></param>
-        public ReadEventStream(Stream s)
-        {
-            m_stream = s;
-        }
-
-        /// <summary>
-        /// Bytes have been read from the underlying stream.
-        /// </summary>
-        public event ByteOffsetHandler OnRead;
-
-        /// <summary>
-        /// Gets a value indicating whether the current stream supports reading.
-        /// </summary>
-        public override bool CanRead
-        {
-            get { return m_stream.CanRead; }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether the current stream supports seeking.
-        /// </summary>
-        public override bool CanSeek
-        {
-            get { return m_stream.CanSeek; }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether the current stream supports writing.
-        /// </summary>
-        public override bool CanWrite
-        {
-            get { return m_stream.CanWrite; }
-        }
-
-        /// <summary>
-        /// Gets the length in bytes of the stream.
-        /// </summary>
-        public override long Length
-        {
-            get { return m_stream.Length; }
-        }
-
-        /// <summary>
-        /// Gets or sets the position within the current stream.
-        /// </summary>
-        public override long Position
-        {
-            get { return m_stream.Position; }
-            set { m_stream.Position = value; }
-        }
-
-        /// <summary>
-        /// Begins an asynchronous read operation.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns></returns>
-        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            return m_stream.BeginRead (buffer, offset, count, callback, state);
-        }
-
-        /// <summary>
-        /// Begins an asynchronous write operation.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns></returns>
-        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            return m_stream.BeginWrite (buffer, offset, count, callback, state);
-        }
-
-        /// <summary>
-        /// Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
-        /// </summary>
-        public override void Close()
-        {
-            m_stream.Close ();
-        }
-
-        /// <summary>
-        /// Waits for the pending asynchronous read to complete.
-        /// </summary>
-        /// <param name="asyncResult"></param>
-        /// <returns></returns>
-        public override int EndRead(IAsyncResult asyncResult)
-        {
-            int count = m_stream.EndRead(asyncResult);
-            byte[] buf = System.Text.Encoding.UTF8.GetBytes("Read " + count + " bytes from async stream");
-            FireOnRead(buf, 0, buf.Length);
-            return count;
-        }
-
-        /// <summary>
-        /// Ends an asynchronous write operation.
-        /// </summary>
-        /// <param name="asyncResult"></param>
-        public override void EndWrite(IAsyncResult asyncResult)
-        {
-            m_stream.EndWrite (asyncResult);
-        }
-
-        /// <summary>
-        /// Clears all buffers for this stream and causes any buffered data to be written to
-        /// the underlying device.
-        /// </summary>
-        public override void Flush()
-        {
-            m_stream.Flush();
-        }
-
-        /// <summary>
-        /// Reads a sequence of bytes from the current stream and advances the position within the stream
-        /// by the number of bytes read.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <returns></returns>
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            int rcount = m_stream.Read(buffer, offset, count);
-            FireOnRead(buffer, offset, rcount);
-            return rcount;
-        }
-
-        /// <summary>
-        /// Reads a byte from the stream and advances the position within the stream by one byte,
-        /// or returns -1 if at the end of the stream.
-        /// </summary>
-        /// <returns></returns>
-        public override int ReadByte()
-        {
-            return m_stream.ReadByte();
-        }
-
-        /// <summary>
-        /// Sets the position within the current stream.
-        /// </summary>
-        /// <param name="offset"></param>
-        /// <param name="origin"></param>
-        /// <returns></returns>
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            return m_stream.Seek(offset, origin);
-        }
-
-        /// <summary>
-        /// Sets the length of the current stream.
-        /// </summary>
-        /// <param name="value"></param>
-        public override void SetLength(long value)
-        {
-            m_stream.SetLength(value);
-        }
-
-        /// <summary>
-        /// writes a sequence of bytes to the current stream and advances
-        /// the current position within this stream by the number of bytes written.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            m_stream.Write(buffer, offset, count);
-        }
-
-        /// <summary>
-        /// Writes a byte to the current position in the stream and advances
-        /// the position within the stream by one byte.
-        /// </summary>
-        /// <param name="val"></param>
-        public override void WriteByte(byte val)
-        {
-            m_stream.WriteByte(val);
-        }
-
-        /// <summary>
-        /// Serves as a hash function for a particular type, suitable for use
-        /// in hashing algorithms and data structures like a hash table.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            return m_stream.GetHashCode();
-        }
-
-        private void FireOnRead(byte[] buf, int offset, int length)
-        {
-            if ((OnRead != null) && (length > 0))
-            {
-                OnRead(this, buf, offset, length);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/io/ZlibStream.cs b/lib/jabber-net/bedrock/io/ZlibStream.cs
deleted file mode 100644
index 4a0d8ac..0000000
--- a/lib/jabber-net/bedrock/io/ZlibStream.cs
+++ /dev/null
@@ -1,444 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if ZLIB_NET
-using System;
-using System.IO;
-using System.Diagnostics;
-
-using bedrock.util;
-using ComponentAce.Compression.Libs.zlib;
-
-namespace bedrock.io
-{
-    /// <summary>
-    /// Compression failed.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class CompressionFailedException : ApplicationException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="message"></param>
-        public CompressionFailedException(string message) : base(message) { }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public CompressionFailedException() : base() { }
-    }
-
-
-    /// <summary>
-    /// Wrap two ComponentAce.Compression.Libs.zlib.ZStream's, one in and one out.
-    /// The existing wrappers in the project are uni-directional.
-    ///
-    /// No, System.IO.Compression.GZipStream won't work, because they didn't expose
-    /// compression levels or flush types.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ZlibStream : Stream
-    {
-        /// <summary>
-        /// Is zlib supported?  Note, this will throw an exception if the library is missing.
-        /// </summary>
-        public static bool Supported
-        {
-            get
-            {
-                return zlibConst.version() != "";
-            }
-        }
-
-        private Stream m_stream = null;
-        private ZStream m_in;
-        private ZStream m_out;
-        private int m_flush = zlibConst.Z_PARTIAL_FLUSH;
-
-        private const int bufsize = 1024;
-        private byte[] m_inbuf;
-        private byte[] m_outbuf;
-
-        /// <summary>
-        /// Wrap a bi-directional stream in a compression stream.
-        /// </summary>
-        /// <param name="innerStream">The stream to wrap.</param>
-        public ZlibStream(Stream innerStream)
-        {
-            init(innerStream);
-        }
-
-        /// <summary>
-        /// Wrap a bi-directional stream in a compression stream.
-        /// </summary>
-        /// <param name="innerStream">The stream to wrap.</param>
-        /// <param name="flush">The flush type.  TODO: doc these.</param>
-        public ZlibStream(Stream innerStream, int flush)
-        {
-            m_flush = flush;
-            init(innerStream);
-        }
-
-
-        private void init(Stream innerStream)
-        {
-            m_stream = innerStream;
-            if (m_stream.CanRead)
-            {
-                m_in = new ZStream();
-                int ret = m_in.inflateInit();
-                if (ret != zlibConst.Z_OK)
-                    throw new CompressionFailedException("Unable to initialize zlib for deflate: " + ret);
-                m_inbuf = new byte[bufsize];
-                m_in.avail_in = 0;
-                m_in.next_in = m_inbuf;
-                m_in.next_in_index = 0;
-            }
-
-            if (m_stream.CanWrite)
-            {
-                m_out = new ZStream();
-                int ret = m_out.deflateInit(zlibConst.Z_DEFAULT_COMPRESSION);
-                if (ret != zlibConst.Z_OK)
-                    throw new CompressionFailedException("Unable to initialize zlib for inflate: " + ret);
-                m_outbuf = new byte[bufsize];
-                m_out.next_out = m_outbuf;
-            }
-        }
-
-        /// <summary>
-        /// Is the underlying stream readable?
-        /// </summary>
-        public override bool CanRead
-        {
-            get { return m_stream.CanRead; }
-        }
-
-        /// <summary>
-        /// No seeking on compressed streams.  That sounds hard.
-        /// </summary>
-        public override bool CanSeek
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Is the underlying stream writable?
-        /// </summary>
-        public override bool CanWrite
-        {
-            get { return m_stream.CanWrite; }
-        }
-
-        /// <summary>
-        /// This just flushes the stream, but doesn't perform zlib flushing.
-        /// </summary>
-        public override void Flush()
-        {
-            m_stream.Flush();
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override long Length
-        {
-            get { throw new NotImplementedException("The method or operation is not implemented."); }
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override long Position
-        {
-            get { throw new NotImplementedException("The method or operation is not implemented."); }
-            set { throw new NotImplementedException("The method or operation is not implemented."); }
-        }
-
-        /// <summary>
-        /// Start an async read. Implemented locally, since Stream.BeginRead() isn't really asynch.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns></returns>
-        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            if (count <= 0)
-                throw new ArgumentException("Can't read 0 bytes", "count");
-
-            m_in.next_out = buffer;
-            m_in.next_out_index = offset;
-            m_in.avail_out = count;
-            if (m_in.avail_in == 0)
-            {
-                m_in.next_in_index = 0;
-                return m_stream.BeginRead(m_inbuf, 0, bufsize, callback, state);
-            }
-            ZlibStreamAsyncResult ar = new ZlibStreamAsyncResult(state);
-            callback(ar);
-            return ar;
-        }
-
-        /// <summary>
-        /// Complete a pending read, when the callback passed to BeginRead fires.
-        /// </summary>
-        /// <param name="asyncResult"></param>
-        /// <returns></returns>
-        public override int EndRead(IAsyncResult asyncResult)
-        {
-            if (!(asyncResult is ZlibStreamAsyncResult))
-                m_in.avail_in = m_stream.EndRead(asyncResult);
-            return Inflate();
-        }
-
-        /// <summary>
-        /// Synchronous read.  Decompresses.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <returns></returns>
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            if (count <= 0)
-                return 0;
-
-            m_in.next_out = buffer;
-            m_in.next_out_index = offset;
-            m_in.avail_out = count;
-
-            if (m_in.avail_in == 0)
-            {
-                m_in.next_in_index = 0;
-                m_in.avail_in = m_stream.Read(m_inbuf, 0, bufsize);
-                if (m_in.avail_in == 0)
-                    return 0;
-            }
-            return Inflate();
-        }
-
-        private int Inflate()
-        {
-            int count = m_in.avail_out;
-            int err = m_in.inflate(m_flush);
-            if ((err != zlibConst.Z_OK) && (err != zlibConst.Z_STREAM_END))
-            {
-                if (err == zlibConst.Z_BUF_ERROR)
-                    return 0;
-                if (err != zlibConst.Z_OK)
-                    throw new CompressionFailedException("Decompress failed: " + err);
-            }
-            return (count - m_in.avail_out);
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        /// <param name="offset"></param>
-        /// <param name="origin"></param>
-        /// <returns></returns>
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        /// <param name="value"></param>
-        public override void SetLength(long value)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Begin an asynch write, compressing first.  Implemented locally, since Stream.BeginWrite isn't asynch.
-        /// Note: may call Write() on the underlying stream more than once.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns></returns>
-        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            if (count <= 0)
-                throw new ArgumentException("Can't write 0 bytes", "count");
-
-            m_out.next_in = buffer;
-            m_out.next_in_index = offset;
-            m_out.avail_in = count;
-
-            m_out.next_out_index = 0;
-            m_out.avail_out = bufsize;
-            int err = m_out.deflate(m_flush);
-            if (err != zlibConst.Z_STREAM_END)
-            {
-                if (err != zlibConst.Z_OK)
-                {
-                    ZlibStreamAsyncResult res = new ZlibStreamAsyncResult(state, new CompressionFailedException("Compress failed: " + err));
-                    callback(res);
-                    return res;
-                }
-            }
-            if (m_out.avail_in == 0)
-                return m_stream.BeginWrite(m_outbuf, 0, bufsize - m_out.avail_out, callback, state);
-            else
-                return m_stream.BeginWrite(m_outbuf, 0, bufsize - m_out.avail_out, new AsyncCallback(IntermediateWrite), new ZlibState(callback, state));
-        }
-
-        private void IntermediateWrite(IAsyncResult asyncResult)
-        {
-            ZlibState state = (ZlibState)asyncResult.AsyncState;
-            try
-            {
-                m_stream.EndWrite(asyncResult);
-            }
-            catch (Exception e)
-            {
-                ZlibStreamAsyncResult res = new ZlibStreamAsyncResult(state.state, e);
-                state.callback(res);
-                return;
-            }
-
-            m_out.next_out_index = 0;
-            m_out.avail_out = bufsize;
-            int err = m_out.deflate(m_flush);
-            if (err != zlibConst.Z_STREAM_END)
-            {
-                if (err != zlibConst.Z_OK)
-                {
-                    ZlibStreamAsyncResult res = new ZlibStreamAsyncResult(state.state, new CompressionFailedException("Compress failed: " + err));
-                    state.callback(res);
-                    return;
-                }
-            }
-            if (m_out.avail_in == 0)
-                m_stream.BeginWrite(m_outbuf, 0, bufsize - m_out.avail_out, state.callback, state.state);
-            else
-                m_stream.BeginWrite(m_outbuf, 0, bufsize - m_out.avail_out, new AsyncCallback(IntermediateWrite), state);
-        }
-
-        /// <summary>
-        /// Complete a pending write, when the callback given to BeginWrite is called.
-        /// </summary>
-        /// <param name="asyncResult"></param>
-        public override void EndWrite(IAsyncResult asyncResult)
-        {
-            if (asyncResult is ZlibStreamAsyncResult)
-            {
-                ZlibStreamAsyncResult ar = (ZlibStreamAsyncResult)asyncResult;
-                if (ar.Exception != null)
-                    throw ar.Exception;
-            }
-            else
-                m_stream.EndWrite(asyncResult);
-            return;
-        }
-
-        /// <summary>
-        /// Synchronous write, after compressing.
-        /// </summary>
-        /// <param name="buffer"></param>
-        /// <param name="offset"></param>
-        /// <param name="count"></param>
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            if (count <= 0)
-                return;
-            m_out.next_in = buffer;
-            m_out.next_in_index = offset;
-            m_out.avail_in = count;
-
-            while (m_out.avail_in > 0)
-            {
-                m_out.next_out_index = 0;
-                m_out.avail_out = bufsize;
-                int err = m_out.deflate(m_flush);
-                if (err != zlibConst.Z_STREAM_END)
-                {
-                    if (err != zlibConst.Z_OK)
-                        throw new CompressionFailedException("Compress failed: " + err);
-                }
-                m_stream.Write(m_outbuf, 0, bufsize - m_out.avail_out);
-            }
-        }
-
-        private class ZlibStreamAsyncResult : IAsyncResult
-        {
-            private object m_state = null;
-            private Exception m_exception;
-
-            public ZlibStreamAsyncResult(object state)
-            {
-                m_state = state;
-            }
-
-            public ZlibStreamAsyncResult(object state, Exception except)
-            {
-                m_state = state;
-                m_exception = except;
-            }
-
-            public Exception Exception
-            {
-                get { return m_exception; }
-            }
-
-            #region IAsyncResult Members
-
-            public object AsyncState
-            {
-                get { return m_state; }
-            }
-
-            public System.Threading.WaitHandle AsyncWaitHandle
-            {
-                get
-                {
-                    throw new Exception("The method or operation is not implemented.");
-                }
-            }
-
-            public bool CompletedSynchronously
-            {
-                get { return true; }
-            }
-
-            public bool IsCompleted
-            {
-                get { return true; }
-            }
-
-            #endregion
-        }
-
-        private class ZlibState
-        {
-            public AsyncCallback callback;
-            public object state;
-
-            public ZlibState(AsyncCallback callback, object state)
-            {
-                this.callback = callback;
-                this.state = state;
-            }
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/bedrock/net/Address.cs b/lib/jabber-net/bedrock/net/Address.cs
deleted file mode 100644
index 36b8084..0000000
--- a/lib/jabber-net/bedrock/net/Address.cs
+++ /dev/null
@@ -1,354 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Net;
-using System.Net.Sockets;
-using System.ComponentModel;
-using System.Globalization;
-
-using bedrock.util;
-
-#if !__MonoCS__
-using netlib.Dns;
-using netlib.Dns.Records;
-#endif
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Callback for async DNS lookups.
-    /// </summary>
-    public delegate void AddressResolved(Address addr);
-    /// <summary>
-    /// Encapsulation and caching of IP address information.  Very similar to System.Net.IPEndPoint,
-    /// but adds async DNS lookups.
-    /// TODO: add SRV?
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Address
-    {
-        private string    m_hostname = null;
-        private int       m_port     = -1;
-        private IPAddress m_ip       = IPAddress.Any;
-        /// <summary>
-        /// Address for a server, corresponding to IPAddress.Any.
-        /// </summary>
-        /// <param name="port"></param>
-        public Address(int port)
-        {
-            m_port = port;
-        }
-        /// <summary>
-        /// New connection endpoint.
-        /// </summary>
-        /// <param name="hostname">Host name or dotted-quad IP address</param>
-        /// <param name="port">Port number</param>
-        public Address(string hostname, int port) : this(port)
-        {
-            Debug.Assert(hostname != null, "must supply a host name");
-            this.Hostname = hostname;
-        }
-        /// <summary>
-        /// Create a new connection endpoint, where the IP address is already known.
-        /// </summary>
-        /// <param name="ip"></param>
-        /// <param name="port"></param>
-        public Address(IPAddress ip, int port) : this(port)
-        {
-            this.IP = ip;
-        }
-
-
-#if !__MonoCS__
-        private static SRVRecord PickSRV(SRVRecord[] srv)
-        {
-            // TODO: keep track of connection failures, and try the next priority down.
-
-            if ((srv == null) || (srv.Length == 0))
-                throw new ArgumentException();
-            if (srv.Length == 1)
-                return srv[0];
-
-            // randomize order.  One might wish that the OS would have done this for us.
-            // cf. Bob Schriter's Grandfather.
-            Random rnd = new Random();
-            byte[] keys = new byte[srv.Length];
-            rnd.NextBytes(keys);
-            Array.Sort(keys, srv);  // Permute me, Knuth!  (I wish I had a good anagram for that)
-
-            int minpri = int.MaxValue;
-            foreach (SRVRecord rec in srv)
-            {
-                if (rec.Priority < minpri)
-                {
-                    minpri = rec.Priority;
-                }
-            }
-
-            int weight = 0;
-            foreach (SRVRecord rec in srv)
-            {
-                if (rec.Priority == minpri)
-                {
-                    weight += rec.Weight;
-                }
-            }
-
-            int pos = rnd.Next(weight);
-            weight = 0;
-            foreach (SRVRecord rec in srv)
-            {
-                if (rec.Priority == minpri)
-                {
-                    weight += rec.Weight;
-                    if ((pos < weight) || (weight == 0))
-                    {
-                        return rec;
-                    }
-                }
-            }
-
-            throw new DnsException("No matching SRV");
-        }
-
-        /// <summary>
-        /// Look up a DNS SRV record, returning the best host and port number to connect to.
-        /// </summary>
-        /// <param name="prefix">The SRV prefix, ending with a dot.  Example: "_xmpp-client._tcp."</param>
-        /// <param name="domain">The domain to check</param>
-        /// <param name="host">The host name to connect to</param>
-        /// <param name="port">The port number to connect to</param>
-        public static void LookupSRV(string prefix, string domain, ref string host, ref int port)
-        {
-            if (prefix == null)
-                throw new ArgumentNullException("prefix");
-            if (domain == null)
-                throw new ArgumentNullException("domain");
-            if (!prefix.EndsWith("."))
-                throw new ArgumentOutOfRangeException("Prefix must end in '.'", "prefix");
-            try
-            {
-                DnsRequest request = new DnsRequest(prefix + domain);
-                DnsResponse response = request.GetResponse(DnsRecordType.SRV);
-
-                SRVRecord record = PickSRV(response.SRVRecords);
-                host = record.NameNext;
-                port = record.Port;
-                Debug.WriteLine(string.Format("SRV found: {0}:{1}", host, port));
-            }
-            catch
-            {
-                host = domain;
-            }
-        }
-
-        /// <summary>
-        /// Look up a DNS TXT record.
-        /// </summary>
-        /// <param name="prefix">The prefix, ending in '.'.  Example: "_xmppconnect."</param>
-        /// <param name="domain">The domain to search</param>
-        /// <param name="attribute">The attribute name to look for.  Example: "_xmpp-client-xbosh"</param>
-        /// <returns></returns>
-        public static string LookupTXT(string prefix, string domain, string attribute)
-        {
-            if (prefix == null)
-                throw new ArgumentNullException("prefix");
-            if (domain == null)
-                throw new ArgumentNullException("domain");
-            if (attribute == null)
-                throw new ArgumentNullException("attribute");
-            if (!prefix.EndsWith("."))
-                throw new ArgumentOutOfRangeException("Prefix must end in '.'", "prefix");
-
-            try
-            {
-                DnsRequest request = new DnsRequest(prefix + domain);
-                DnsResponse response = request.GetResponse(DnsRecordType.TEXT);
-                string attr = attribute + "=";
-                foreach (TXTRecord txt in response.TXTRecords)
-                {
-                    if (txt.StringArray.StartsWith(attr))
-                    {
-                        Debug.WriteLine(string.Format("TXT found: {0}", txt.StringArray));
-                        return txt.StringArray.Substring(attr.Length);
-                    }
-                }
-            }
-            catch
-            {
-            }
-            return null;
-        }
-#endif
-
-        /// <summary>
-        /// The host name.  When set, checks for dotted-quad representation, to avoid
-        /// async DNS call when possible.
-        /// </summary>
-        public string Hostname
-        {
-            get { return m_hostname; }
-            set
-            {
-                if ((value == null) || (value == ""))
-                {
-                    m_hostname = null;
-                    m_ip = IPAddress.Any;
-                    return;
-                }
-                if (m_hostname != value)
-                {
-                    m_hostname = value;
-
-                    try
-                    {
-                        m_ip = IPAddress.Parse(m_hostname);
-                    }
-                    catch (FormatException)
-                    {
-                        m_ip = null;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Port number.
-        /// TODO: add string version that looks in /etc/services (or equiv)?
-        /// </summary>
-        public int Port
-        {
-            get { return m_port; }
-            set
-            {
-                Debug.Assert(value > 0);
-                m_port = value;
-            }
-        }
-        /// <summary>
-        /// The binary IP address.  Gives IPAddress.Any if resolution hasn't occured, and
-        /// null if resolution failed.
-        /// </summary>
-        public IPAddress IP
-        {
-            get { return m_ip; }
-            set
-            {
-                m_ip = value;
-                m_hostname = m_ip.ToString();
-            }
-        }
-        /// <summary>
-        /// Not implemented yet.
-        /// </summary>
-        public string Service
-        {
-            get { throw new NotImplementedException(); }
-            set { throw new NotImplementedException(); }
-        }
-        /// <summary>
-        /// An IPEndPoint for making socket connections with.
-        /// </summary>
-        public IPEndPoint Endpoint
-        {
-            get
-            {
-                if (m_ip == null)
-                    return null;
-                return new IPEndPoint(m_ip, Port);
-            }
-            set
-            {
-                m_ip = value.Address;
-                Port = value.Port;
-            }
-        }
-        /// <summary>
-        /// Async DNS lookup.  IP will be null in callback on failure.  Callback will
-        /// be called immediately if IP is already known (e.g. dotted-quad).
-        /// </summary>
-        /// <param name="callback">Called when resolution complete.</param>
-        public void Resolve(AddressResolved callback)
-        {
-            if ((m_ip != null) && (m_ip != IPAddress.Any)
-                && (m_ip != IPAddress.IPv6Any)
-                )
-            {
-                callback(this);
-            }
-            else
-                Dns.BeginGetHostEntry(m_hostname, new AsyncCallback(OnResolved), callback);
-        }
-
-        /// <summary>
-        /// Synchronous DNS lookup.
-        /// </summary>
-        public void Resolve()
-        {
-            if ((m_ip != null) && 
-                (m_ip != IPAddress.Any) && 
-                (m_ip != IPAddress.IPv6Any))
-            {
-                return;
-            }
-            Debug.Assert(m_hostname != null, "Must set hostname first");
-            IPHostEntry iph = Dns.GetHostEntry(m_hostname);
-
-            // TODO: what happens here on error?
-            m_ip = iph.AddressList[0];
-        }
-
-        /// <summary>
-        /// Handle the async DNS response.
-        /// </summary>
-        /// <param name="ar"></param>
-        private void OnResolved(IAsyncResult ar)
-        {
-            try
-            {
-                IPHostEntry ent = Dns.EndGetHostEntry(ar);
-                if (ent.AddressList.Length <= 0)
-                {
-                    m_ip = null;
-                }
-                else
-                {
-                    // From docs:
-                    // When hostName is a DNS-style host name associated with multiple IP addresses,
-                    // only the first IP address that resolves to that host name is returned.
-                    m_ip = ent.AddressList[0];
-                }
-            }
-            catch (Exception e)
-            {
-                Debug.WriteLine(e.ToString());
-                m_ip = null;
-            }
-            AddressResolved callback = (AddressResolved) ar.AsyncState;
-            if (callback != null)
-                callback(this);
-        }
-        /// <summary>
-        /// Readable representation of the address.
-        /// Host (IP):port
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return string.Format("{0}({1}):{2}", m_hostname, m_ip, m_port);
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/AsyncSocket.cs b/lib/jabber-net/bedrock/net/AsyncSocket.cs
deleted file mode 100644
index 00dd52a..0000000
--- a/lib/jabber-net/bedrock/net/AsyncSocket.cs
+++ /dev/null
@@ -1,1314 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Net;
-using System.Net.Sockets;
-using System.Threading;
-using bedrock.util;
-
-using System.Security.Authentication;
-using System.Net.Security;
-using System.Security.Cryptography.X509Certificates;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Delegate for members that receive a socket.
-    /// </summary>
-    public delegate void AsyncSocketHandler(object sender, BaseSocket sock);
-
-    /// <summary>
-    /// An asynchronous socket, which calls a listener class when
-    /// interesting things happen.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AsyncSocket : BaseSocket, IComparable
-    {
-        /// <summary>
-        /// Socket states.
-        /// </summary>
-        [SVN(@"$Id$")]
-            private enum SocketState
-        {
-            /// <summary>
-            /// Socket has been created.
-            /// </summary>
-            Created,
-            /// <summary>
-            /// Socket is listening for new connections
-            /// </summary>
-            Listening,
-            /// <summary>
-            /// Doing DNS lookup
-            /// </summary>
-            Resolving,
-            /// <summary>
-            /// Attempting to connect
-            /// </summary>
-            Connecting,
-            /// <summary>
-            /// Connected to a peer.  The running state.
-            /// </summary>
-            Connected,
-            /// <summary>
-            /// Shutting down the socket.
-            /// </summary>
-            Closing,
-            /// <summary>
-            /// Closed down.
-            /// </summary>
-            Closed,
-            /// <summary>
-            /// An error ocurred.
-            /// </summary>
-            Error
-        }
-
-        private const int BUFSIZE = 4096;
-
-        /// <summary> The set of allowable errors in SSL certificates
-        /// if UntrustedRootOK is set to true.  </summary>
-        [Obsolete("Catch OnInvalidCertificate, instead")]
-        public const SslPolicyErrors DefaultUntrustedPolicy =
-                 SslPolicyErrors.RemoteCertificateChainErrors;
-
-        /// <summary> The allowable SSL certificate errors.  If you
-        /// modify UntrustedRootOK to true, the side effect will be to
-        /// set this to DefaultUntrustedPolicy.  False, the default,
-        /// sets this to None.  </summary>
-        private static SslPolicyErrors AllowedSSLErrors = SslPolicyErrors.None;
-
-        /// <summary>
-        /// Are untrusted root certificates OK when connecting using
-        /// SSL?  Setting this to true is insecure, but it's unlikely
-        /// that you trust jabbber.org or jabber.com's relatively
-        /// bogus certificate roots.
-        ///
-        /// Setting this modifies AllowedSSLErrors by side-effect.
-        /// </summary>
-        [DefaultValue(false)]
-        [Obsolete("Catch OnInvalidCertificate, instead")]
-        public static bool UntrustedRootOK
-        {
-            get
-            {
-                return (AllowedSSLErrors != SslPolicyErrors.None);
-            }
-            set
-            {
-                if (value)
-                {
-                    AllowedSSLErrors = DefaultUntrustedPolicy;
-                }
-                else
-                {
-                    AllowedSSLErrors = SslPolicyErrors.None;
-                }
-            }
-        }
-
-        /// <summary>
-        /// The types of SSL to support.  SSL3 and TLS1 by default.
-        /// That should be good enough for most apps, and was
-        /// hard-coded to start with.  Note: when doing start-tls,
-        /// this is overridden to just be TLS.
-        /// </summary>
-        public static SslProtocols   SSLProtocols        = SslProtocols.Ssl3 | SslProtocols.Tls;
-        private SslProtocols         m_secureProtocol    = SslProtocols.None;
-        private Socket               m_sock              = null;
-        private X509Certificate2     m_cert              = null;
-        private Stream               m_stream            = null;
-        private SslStream            m_sslStream         = null;  // hold on to the SSL stream as it goes by, since compression might happen later.
-        private MemoryStream         m_pending           = new MemoryStream();
-        private bool                 m_writing           = false;
-        private bool                 m_requireClientCert = false;
-        private bool                 m_cert_gui          = true;
-        private bool                 m_server            = false;
-        private byte[]               m_buf               = new byte[BUFSIZE];
-        private SocketState          m_state             = SocketState.Created;
-        private SocketWatcher        m_watcher           = null;
-        private Guid                 m_id                = Guid.NewGuid();
-        private bool                 m_reading           = false;
-        private bool                 m_synch             = false;
-        private Address              m_addr;
-
-
-        /// <summary>
-        /// Called from SocketWatcher.
-        /// </summary>
-        /// <param name="w"></param>
-        /// <param name="listener">The listener for this socket</param>
-        public AsyncSocket(SocketWatcher w, ISocketEventListener listener) : base(listener)
-        {
-            m_watcher = w;
-        }
-
-        /// <summary>
-        /// Called from SocketWatcher.
-        /// </summary>
-        /// <param name="w"></param>
-        /// <param name="listener">The listener for this socket</param>
-        /// <param name="SSL">Do SSL3 and TLS1 on startup (call
-        /// StartTLS later if this is false, and TLS only is needed
-        /// later)</param>
-        /// <param name="synch">Synchronous operation</param>
-        public AsyncSocket(SocketWatcher w,
-                           ISocketEventListener listener,
-                           bool SSL,
-                           bool synch) :
-            base(listener)
-        {
-            m_watcher = w;
-            m_synch = synch;
-
-            if (SSL)
-                m_secureProtocol = SSLProtocols;
-        }
-
-        private AsyncSocket(SocketWatcher w) : base()
-        {
-            m_watcher = w;
-        }
-
-        /*
-        /// <summary>
-        /// Return the state of the socket.  WARNING: don't use this.
-        /// </summary>
-        public State Socket_State
-        {
-            get
-            {
-                return m_state;
-            }
-        }
-        */
-        private SocketState State
-        {
-            get { return m_state; }
-            set
-            {
-// useful for finding unexpected socket closes.
-//                Debug.WriteLine("socket state: " + m_state.ToString() + "->" + value.ToString());
-                m_state = value;
-            }
-        }
-
-        /// <summary>
-        /// For connect sockets, the remote address.  For Accept sockets, the local address.
-        /// </summary>
-        public Address Address
-        {
-            get
-            {
-                return m_addr;
-            }
-        }
-
-        /// <summary>
-        /// Get the certificate of the remote endpoint of the socket.
-        /// </summary>
-        public X509Certificate RemoteCertificate
-        {
-            get
-            {
-                if (m_sslStream == null)
-                    return null;
-                return m_sslStream.RemoteCertificate;
-            }
-        }
-
-        /// <summary>
-        /// Choose a certificate from the local store.  If there are
-        /// none available, returns right away.
-        /// If there is exactly one, uses it.
-        /// Otherwise, prompts.
-        /// </summary>
-        [Obsolete("Pass in a list of acceptable issuers")]
-        public void ChooseClientCertificate()
-        {
-            ChooseClientCertificate(null);
-        }
-
-        /// <summary>
-        /// Choose a certificate from the local store.  If there are
-        /// none available, returns right away.
-        /// If there is exactly one, uses it.
-        /// Otherwise, prompts.
-        /// TODO: figure out something for server certs, too.
-            /// </summary>
-        /// <param name="acceptableIssuers">A list of DNs of CAs that are trusted by the other party</param>
-        public void ChooseClientCertificate(string[] acceptableIssuers)
-        {
-            X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
-            store.Open(OpenFlags.ReadOnly);
-            X509Certificate2Collection coll = new X509Certificate2Collection();
-            if (acceptableIssuers == null)
-            {
-                coll.AddRange(store.Certificates);
-            }
-            else
-            {
-                foreach (X509Certificate2 cert in store.Certificates)
-                {
-                    foreach (string issuer in acceptableIssuers)
-                    {
-                        if (cert.Issuer == issuer)
-                        {
-                            coll.Add(cert);
-                        }
-                    }
-                }
-            }
-
-            switch (coll.Count)
-            {
-                case 0:
-                    return;
-                case 1:
-                    m_cert = coll[0];
-                    return;
-                default:
-                    #if __MonoCS__
-                        m_cert = null;
-                    #else
-                    X509Certificate2Collection certs = X509Certificate2UI.SelectFromCollection(
-                        coll,
-                        "Select certificate",
-                        "Use this certificate to log in",
-                        X509SelectionFlag.SingleSelection);
-                    if (certs.Count > 0)
-                        m_cert = certs[0];
-                    #endif
-                    break;
-            }
-        }
-
-        /// <summary>
-        /// Callback to choose client cert.
-        /// TODO: this should surface an event of some kind.
-        /// </summary>
-        public X509Certificate ChooseClientCertificate(Object sender,
-            string targetHost,
-            X509CertificateCollection localCertificates,
-            X509Certificate remoteCertificate,
-            string[] acceptableIssuers)
-        {
-            // this will be called twice if the server requires a client cert.
-            // Ignore the callback the first time; I think this is a .Net bug.
-            if (acceptableIssuers.Length == 0)
-                return m_cert;
-
-            if (CertificateGui)
-            {
-                if (m_cert != null)
-                    return m_cert;
-
-                ChooseClientCertificate(acceptableIssuers);
-            }
-            return m_cert;
-        }
-
-        /// <summary>
-        /// If true the certificate selection dialog is called.
-        /// </summary>
-        public bool CertificateGui
-        {
-            get { return m_cert_gui; }
-            set { m_cert_gui = value; }
-        }
-
-        /// <summary>
-        /// The local certificate of the socket.
-        /// </summary>
-        public X509Certificate2 LocalCertificate
-        {
-            get { return m_cert; }
-            set { m_cert = value; }
-        }
-
-        /// <summary>
-        /// Are we using SSL/TLS?
-        /// </summary>
-        public bool SSL
-        {
-            get
-            {
-                if (m_sslStream == null)
-                    return false;
-                return m_sslStream.IsEncrypted;
-            }
-        }
-
-        /// <summary>
-        /// Is the socket connected?
-        /// </summary>
-        public override bool Connected
-        {
-            get
-            {
-                if (m_sock == null)
-                    return false;
-                return m_sock.Connected;
-            }
-        }
-
-        /// <summary>
-        /// Sets the specified option to the specified value.
-        /// </summary>
-        /// <param name="optionLevel"></param>
-        /// <param name="optionName"></param>
-        /// <param name="optionValue"></param>
-        public void SetSocketOption(SocketOptionLevel optionLevel,
-            SocketOptionName optionName,
-            byte[] optionValue)
-        {
-            m_sock.SetSocketOption(optionLevel, optionName, optionValue);
-        }
-
-        /// <summary>
-        /// Sets the specified option to the specified value.
-        /// </summary>
-        /// <param name="optionLevel"></param>
-        /// <param name="optionName"></param>
-        /// <param name="optionValue"></param>
-        public void SetSocketOption(SocketOptionLevel optionLevel,
-            SocketOptionName optionName,
-            int optionValue)
-        {
-            m_sock.SetSocketOption(optionLevel, optionName, optionValue);
-        }
-
-        /// <summary>
-        /// Sets the specified option to the specified value.
-        /// </summary>
-        /// <param name="optionLevel"></param>
-        /// <param name="optionName"></param>
-        /// <param name="optionValue"></param>
-        public void SetSocketOption(SocketOptionLevel optionLevel,
-            SocketOptionName optionName,
-            object optionValue)
-        {
-            m_sock.SetSocketOption(optionLevel, optionName, optionValue);
-        }
-
-        /// <summary>
-        /// Prepare to start accepting inbound requests.  Call
-        /// RequestAccept() to start the async process.
-        /// </summary>
-        /// <param name="addr">Address to listen on</param>
-        /// <param name="backlog">The Maximum length of the queue of
-        /// pending connections</param>
-        public override void Accept(Address addr, int backlog)
-        {
-            lock (this)
-            {
-                m_addr = addr;
-
-                m_sock = new Socket(AddressFamily.InterNetwork,
-                                    SocketType.Stream,
-                                    ProtocolType.Tcp);
-
-                // Always reuse address.
-                m_sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);
-                m_sock.Bind(m_addr.Endpoint);
-                m_sock.Listen(backlog);
-                State = SocketState.Listening;
-
-                if (m_watcher != null)
-                    m_watcher.RegisterSocket(this);
-            }
-        }
-
-        /// <summary>
-        /// Start the flow of async accepts.  Flow will continue while
-        /// Listener.OnAccept() returns true.  Otherwise, call
-        /// RequestAccept() again to continue.
-        /// </summary>
-        public override void RequestAccept()
-        {
-            lock (this)
-            {
-                if (State != SocketState.Listening)
-                {
-                    throw new InvalidOperationException("Not a listen socket");
-                }
-            }
-            if (m_synch)
-            {
-                Socket cli;
-                try
-                {
-                    cli = m_sock.Accept();
-                }
-                catch (SocketException)
-                {
-                    Debug.WriteLine("A cancel call was sent to the accepting socket.");
-                    return;
-                }
-
-                AsyncSocket cliCon = new AsyncSocket(m_watcher);
-                cliCon.m_sock = cli;
-                cliCon.m_synch = true;
-                AcceptDone(cliCon);
-            }
-            else
-            {
-                m_sock.BeginAccept(new AsyncCallback(ExecuteAccept), null);
-            }
-        }
-
-        /// <summary>
-        /// We got a connection from outside.  Add it to the SocketWatcher.
-        /// </summary>
-        /// <param name="ar"></param>
-        private void ExecuteAccept(IAsyncResult ar)
-        {
-            Socket cli = (Socket) m_sock.EndAccept(ar);
-            AsyncSocket cliCon = new AsyncSocket(m_watcher);
-            cliCon.m_sock = cli;
-            AcceptDone(cliCon);
-        }
-
-        private void AcceptDone(AsyncSocket cliCon)
-        {
-            cliCon.m_addr = m_addr;
-            cliCon.Address.IP = ((IPEndPoint) cliCon.m_sock.RemoteEndPoint).Address;
-            cliCon.State = SocketState.Connected;
-
-            cliCon.m_stream = new NetworkStream(cliCon.m_sock);
-            cliCon.m_server = true;
-            cliCon.LocalCertificate = m_cert;
-            cliCon.RequireClientCert = m_requireClientCert;
-
-            ISocketEventListener l = m_listener.GetListener(cliCon);
-            if (l == null)
-            {
-                // if the listener returns null, close the socket and
-                // quit, instead of asserting.
-                cliCon.m_sock.Close();
-                RequestAccept();
-                return;
-            }
-
-            cliCon.m_listener = l;
-
-            try
-            {
-                if (m_watcher != null)
-                    m_watcher.RegisterSocket(cliCon);
-            }
-            catch (InvalidOperationException)
-            {
-                // m_watcher out of slots.
-                cliCon.AsyncClose();
-
-                // don't set state
-                // they really don't need this error, we don't think.
-                // Error(e);
-
-                // tell the watcher that when it gets its act together,
-                // we'd appreciate it if it would restart the RequestAccept().
-                m_watcher.PendingAccept(this);
-                return;
-            }
-
-            if (m_secureProtocol != SslProtocols.None)
-                cliCon.StartTLS();
-
-            if (l.OnAccept(cliCon))
-            {
-                RequestAccept();
-            }
-        }
-
-        /// <summary>
-        /// Outbound connection.  Eventually calls Listener.OnConnect() when
-        /// the connection comes up.  Don't forget to call RequestRead() in
-        /// OnConnect()!
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(Address addr)
-        {
-            // Debug.WriteLine("starting connect to " + addr.ToString());
-            State = SocketState.Resolving;
-            if (m_synch)
-            {
-                addr.Resolve();
-                OnConnectResolved(addr);
-            }
-            else
-            {
-                addr.Resolve(new AddressResolved(OnConnectResolved));
-            }
-        }
-
-        /// <summary>
-        /// Address resolution finished.  Try connecting.
-        /// </summary>
-        /// <param name="addr"></param>
-        private void OnConnectResolved(Address addr)
-        {
-            // Debug.WriteLine("connectresolved: " + addr.ToString());
-            lock (this)
-            {
-                if (State != SocketState.Resolving)
-                {
-                    // closed in the mean time.   Probably not an error.
-                    return;
-                }
-                if ((addr == null) || (addr.IP == null) || (addr.Endpoint == null))
-                {
-                    FireError(new AsyncSocketConnectionException("Bad host: " + addr.Hostname));
-                    return;
-                }
-
-
-                if (m_watcher != null)
-                    m_watcher.RegisterSocket(this);
-
-                m_addr = addr;
-                State = SocketState.Connecting;
-
-                if (Socket.OSSupportsIPv6 && (m_addr.Endpoint.AddressFamily == AddressFamily.InterNetworkV6))
-                {
-                    // Debug.WriteLine("ipv6");
-                    m_sock = new Socket(AddressFamily.InterNetworkV6,
-                        SocketType.Stream,
-                        ProtocolType.Tcp);
-                }
-                else
-                {
-                    // Debug.WriteLine("ipv4");
-                    m_sock = new Socket(AddressFamily.InterNetwork,
-                        SocketType.Stream,
-                        ProtocolType.Tcp);
-                }
-
-                // well, of course this isn't right.
-                m_sock.SetSocketOption(SocketOptionLevel.Socket,
-                    SocketOptionName.ReceiveBuffer,
-                    4 * m_buf.Length);
-            }
-
-            if (m_synch)
-            {
-                try
-                {
-                    m_sock.Connect(m_addr.Endpoint);
-                }
-                catch (SocketException ex)
-                {
-                    FireError(ex);
-                    return;
-                }
-
-                if (m_sock.Connected)
-                {
-                    // TODO: check to see if this Mono bug is still valid
-#if __MonoCS__
-                    m_sock.Blocking = true;
-                    m_stream = new NetworkStream(m_sock);
-                    m_sock.Blocking = false;
-#else
-                    m_stream = new NetworkStream(m_sock);
-#endif
-                    if (m_secureProtocol != SslProtocols.None)
-                        StartTLS();
-
-                    lock (this)
-                    {
-                        State = SocketState.Connected;
-                    }
-                    m_listener.OnConnect(this);
-                }
-                else
-                {
-                    AsyncClose();
-                    FireError(new AsyncSocketConnectionException("could not connect"));
-                }
-            }
-            else
-            {
-#if __MonoCS__
-                m_sock.Blocking = false;
-#endif
-                m_sock.BeginConnect(m_addr.Endpoint, new AsyncCallback(ExecuteConnect), null);
-            }
-        }
-
-        /// <summary>
-        /// Validate the server cert.  SSLPolicyErrors will be
-        /// pre-filled with the errors you got.
-        ///
-        /// If there is an error in the cert, OnIvalidCertificate will be called.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="certificate"></param>
-        /// <param name="chain"></param>
-        /// <param name="sslPolicyErrors"></param>
-        /// <returns></returns>
-        protected bool ValidateServerCertificate(object sender,
-                                                 X509Certificate certificate,
-                                                 X509Chain chain,
-                                                 SslPolicyErrors sslPolicyErrors)
-        {
-            // Note: Don't write servers with Jabber-Net, please.  :)
-            if (m_server)
-            {
-                return true;
-            }
-
-            if (sslPolicyErrors == SslPolicyErrors.None)
-                return true;
-
-            if ((sslPolicyErrors & (sslPolicyErrors ^ AllowedSSLErrors)) == SslPolicyErrors.None)
-            {
-                // Huh.  Maybe there should be a listener method for this.
-                return true;
-            }
-
-            if (m_listener.OnInvalidCertificate(this, certificate, chain, sslPolicyErrors))
-                return true;
-
-            Debug.WriteLine("Certificate error: {0}", sslPolicyErrors.ToString());
-
-            // Do not allow this client to communicate with unauthenticated servers.
-            return false;
-        }
-
-        /// <summary>
-        /// Start TLS processing on an open socket.
-        /// </summary>
-        public override void StartTLS()
-        {
-            // we're really doing start-tls.
-            if (m_secureProtocol == SslProtocols.None)
-                m_secureProtocol = SslProtocols.Tls;
-
-            m_stream = m_sslStream = new SslStream(m_stream, false, ValidateServerCertificate, ChooseClientCertificate);
-
-            if (m_server)
-            {
-                if (m_cert == null)
-                {
-                    FireError(new InvalidOperationException("Must set Certificate for server SSL"));
-                    Close();
-                    return;
-                }
-                // TODO: surface these as params
-                m_sslStream.AuthenticateAsServer(m_cert, m_requireClientCert, m_secureProtocol, false);
-            }
-            else
-            {
-                if ((m_watcher != null) && (m_watcher.LocalCertificate != null))
-                    m_cert = m_watcher.LocalCertificate;
-
-                X509CertificateCollection certs = null;
-                if (m_cert != null)
-                {
-                    certs = new X509Certificate2Collection();
-                    certs.Add(m_cert);
-                }
-                try
-                {
-                    m_sslStream.AuthenticateAsClient(m_hostid, certs, m_secureProtocol, false);
-                }
-                catch (Exception ex)
-                {
-                    FireError(ex);
-                    //Close();
-                    //throw;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Is the connection mutually authenticated?  (was there a good client cert, etc.)
-        /// </summary>
-        public bool IsMutuallyAuthenticated
-        {
-            get
-            {
-                if (m_sslStream == null)
-                    return false;
-                return m_sslStream.IsMutuallyAuthenticated;
-            }
-        }
-
-        /// <summary>
-        /// Does the server require a client cert?  If not, the client cert won't be sent.
-        /// </summary>
-        public bool RequireClientCert
-        {
-            get { return m_requireClientCert; }
-            set { m_requireClientCert = value; }
-        }
-
-        /// <summary>
-        /// Start XEP-138 compression on this socket.
-        /// </summary>
-        public override void StartCompression()
-        {
-#if ZLIB_NET
-            m_stream = new bedrock.io.ZlibStream(m_stream, ComponentAce.Compression.Libs.zlib.zlibConst.Z_FULL_FLUSH);
-#else
-            throw new NotSupportedException();
-#endif
-        }
-
-        /// <summary>
-        /// Connection complete.
-        /// </summary>
-        /// <remarks>This is called solely by an async socket thread</remarks>
-        /// <param name="ar"></param>
-        private void ExecuteConnect(IAsyncResult ar)
-        {
-            Debug.WriteLine("ExecuteConnect");
-            lock (this)
-            {
-                try
-                {
-                    m_sock.EndConnect(ar);
-                }
-                catch (SocketException e)
-                {
-                    if (State != SocketState.Connecting)
-                    {
-                        // closed in the mean time.   Probably not an error.
-                        return;
-                    }
-                    FireError(e);
-                    return;
-                }
-                if (m_sock.Connected)
-                {
-                    // TODO: Check to see if this Mono bug is still valid.
-                    // TODO: check to see if blocking should be turned back on after StartTLS.
-#if __MonoCS__
-                    m_sock.Blocking = true;
-                    m_stream = new NetworkStream(m_sock);
-                    m_sock.Blocking = false;
-#else
-                    m_stream = new NetworkStream(m_sock);
-#endif
-
-                    if (m_secureProtocol != SslProtocols.None)
-                    {
-                        try
-                        {
-                            StartTLS();
-                        }
-                        catch (Exception e)
-                        {
-                            FireError(e);
-                            AsyncClose();
-                            return;
-                        }
-                    }
-
-                    State = SocketState.Connected;
-                    m_listener.OnConnect(this);
-                }
-                else
-                {
-                    FireError(new AsyncSocketConnectionException("could not connect"));
-                    AsyncClose();
-                }
-            }
-        }
-
-        private bool SyncRead()
-        {
-            int count = m_stream.Read(m_buf, 0, m_buf.Length);
-
-            if (count > 0)
-            {
-                return m_listener.OnRead(this, m_buf, 0, count);
-            }
-            Close();
-            return false;
-        }
-
-        /// <summary>
-        /// Start an async read from the socket.  Listener.OnRead() is
-        /// eventually called when data arrives.
-        /// </summary>
-        public override void RequestRead()
-        {
-            try
-            {
-                if (m_synch)
-                {
-                    lock (this)
-                    {
-                        if (State != SocketState.Connected)
-                        {
-                            throw new InvalidOperationException("Socket not connected.");
-                        }
-                    }
-
-                    while (SyncRead())
-                    {
-                        ;
-                    }
-                    return;
-                }
-
-                lock (this)
-                {
-                    if (m_reading)
-                    {
-                        throw new InvalidOperationException("Cannot call RequestRead while another read is pending.");
-                    }
-                    if (State != SocketState.Connected)
-                    {
-                        throw new InvalidOperationException("Socket not connected.");
-                    }
-
-                    m_reading = true;
-                }
-                m_stream.BeginRead(m_buf, 0, m_buf.Length, new AsyncCallback(GotData), null);
-            }
-            catch (AuthenticationException)
-            {
-                Close();
-                // don't throw.  this gets caught elsewhere.
-            }
-            catch (SocketException e)
-            {
-                Close();
-
-                // 10053 = An established connection was aborted by the
-                //         software in your host machine.
-                // 10054 = An existing connection was forcibly closed
-                //         by the remote host.
-                if ((e.ErrorCode != 10053) &&
-                    (e.ErrorCode != 10054))
-                {
-                    throw;
-                }
-            }
-            catch (IOException)
-            {
-                Close();
-            }
-            catch (Exception e)
-            {
-                Debug.WriteLine("Exception in RequestRead: " + e.ToString());
-                Close();
-                throw e;
-            }
-        }
-
-        /// <summary>
-        /// Some data arrived.
-        /// </summary>
-        /// <param name="ar"></param>
-        protected virtual void GotData(IAsyncResult ar)
-        {
-            lock (this)
-            {
-                m_reading = false;
-            }
-
-            int count;
-            try
-            {
-                count = m_stream.EndRead(ar);
-            }
-            catch (SocketException e)
-            {
-                AsyncClose();
-
-                // closed in middle of read
-                if (e.ErrorCode != 64)
-                {
-                    FireError(e);
-                }
-                return;
-            }
-            catch(ObjectDisposedException)
-            {
-                //object already disposed, just exit
-                return;
-            }
-            catch (Exception e)
-            {
-                AsyncClose();
-                FireError(e);
-                return;
-            }
-            if (count > 0)
-            {
-                //byte[] ret = new byte[count];
-                //Buffer.BlockCopy(m_buf, 0, ret, 0, count);
-
-                if (m_listener.OnRead(this, m_buf, 0, count) &&
-                    (m_state == SocketState.Connected))
-                {
-                    RequestRead();
-                }
-            }
-            else
-            {
-                AsyncClose();
-            }
-        }
-
-        /// <summary>
-        /// Async write to the socket.  Listener.OnWrite will be
-        /// called eventually when the data has been written.  A
-        /// trimmed copy is made of the data, internally.
-        /// </summary>
-        /// <param name="buf">Buffer to output</param>
-        /// <param name="offset">Offset into buffer</param>
-        /// <param name="len">Number of bytes to output</param>
-        public override void Write(byte[] buf, int offset, int len)
-        {
-            lock (this)
-            {
-                if (State != SocketState.Connected)
-                {
-                    return;
-                    //throw new InvalidOperationException("Socket must be connected before writing.  Current state: " + State.ToString());
-                }
-
-                try
-                {
-                    if (m_synch)
-                    {
-                        m_stream.Write(buf, offset, len);
-                        m_listener.OnWrite(this, buf, offset, len);
-                    }
-                    else
-                    {
-
-                        if (m_writing)
-                        {
-                            // already writing.  save this for later.
-                            m_pending.Write(buf, offset, len);
-                        }
-                        else
-                        {
-                            m_writing = true;
-                            // make copy, since we might be a while in async-land
-                            byte[] ret = new byte[len];
-                            Buffer.BlockCopy(buf, offset, ret, 0, len);
-
-                            m_stream.BeginWrite(ret, 0, ret.Length,
-                                                new AsyncCallback(WroteData),
-                                                ret);
-                        }
-                    }
-                }
-                catch (SocketException e)
-                {
-                    Close();
-
-                    // closed in middle of write
-                    if (e.ErrorCode != 10054)
-                    {
-                        FireError(e);
-                    }
-                    return;
-                }
-                catch (Exception e)
-                {
-                    Close();
-                    FireError(e);
-                    return;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Data was written.
-        /// </summary>
-        /// <param name="ar"></param>
-        private void WroteData(IAsyncResult ar)
-        {
-            try
-            {
-                m_stream.EndWrite(ar);
-            }
-            catch (SocketException)
-            {
-                AsyncClose();
-                return;
-            }
-            catch (ObjectDisposedException)
-            {
-                AsyncClose();
-                return;
-            }
-            catch (Exception e)
-            {
-                AsyncClose();
-                FireError(e);
-                return;
-            }
-
-            lock (this)
-            {
-                m_writing = false;
-            }
-            byte[] buf = (byte[])ar.AsyncState;
-            m_listener.OnWrite(this, buf, 0, buf.Length);
-
-            if (m_pending.Length > 0)
-            {
-                buf = m_pending.ToArray();
-                m_pending.SetLength(0L);
-                Write(buf);
-            }
-        }
-
-        /// <summary>
-        /// Close the socket.  This is NOT async.  .Net doesn't have
-        /// async closes.  But, it can be *called* async, particularly
-        /// from GotData.  Attempts to do a shutdown() first.
-        /// </summary>
-        public override void Close()
-        {
-            Debug.WriteLine("Close");
-            lock (this)
-            {
-                /*
-                switch (State)
-                {
-                case State.Closed:
-                    throw new InvalidOperationException("Socket already closed");
-                case State.Closing:
-                    throw new InvalidOperationException("Socket already closing");
-                }
-                */
-
-                SocketState oldState = State;
-
-                if (m_sock.Connected)
-                {
-                    State = SocketState.Closing;
-                }
-
-                if (m_stream != null)
-                    m_stream.Close();
-                else
-                {
-                    try
-                    {
-                        m_sock.Close();
-                    }
-                    catch { }
-                }
-
-                if (oldState <= SocketState.Connected)
-                    m_listener.OnClose(this);
-
-                if (m_watcher != null)
-                    m_watcher.CleanupSocket(this);
-
-                State = SocketState.Closed;
-            }
-        }
-
-
-        /// <summary>
-        /// Close, called from async places, so that Errors get fired,
-        /// appropriately.
-        /// </summary>
-        protected void AsyncClose()
-        {
-            try
-            {
-                Close();
-            }
-            catch(Exception e)
-            {
-                FireError(e);
-            }
-        }
-
-        /// <summary>
-        /// Error occurred in the class.  Send to Listener.
-        /// </summary>
-        /// <param name="e"></param>
-        protected void FireError(Exception e)
-        {
-            lock (this)
-            {
-                State = SocketState.Error;
-            }
-            if (e is SocketException)
-            {
-                Debug.WriteLine("Sock errno: " + ((SocketException) e).ErrorCode);
-            }
-            if (m_watcher != null)
-                m_watcher.CleanupSocket(this);
-            m_listener.OnError(this, e);
-        }
-
-
-        /// <summary>
-        /// Return a string representation of this socket
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "AsyncSocket " + m_sock.LocalEndPoint + "->" +
-                m_sock.RemoteEndPoint;
-        }
-
-        /// <summary>
-        /// In case SocketWatcher wants to use a HashTable.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            return m_id.GetHashCode();
-        }
-
-        #region IComparable
-        int IComparable.CompareTo(object val)
-        {
-            if (val == null)
-                return 1;
-
-            AsyncSocket sock = val as AsyncSocket;
-            if ((object)sock == null)
-                throw new ArgumentException("value compared to is not an AsyncSocket", "val");
-
-            return this.m_id.CompareTo(sock.m_id);
-        }
-
-        /// <summary>
-        /// IComparable's need to implement Equals().  This checks the
-        /// guid's for each socket to see if they are the same.
-        /// </summary>
-        /// <param name="val">The AsyncSocket to check against.</param>
-        /// <returns></returns>
-        public override bool Equals(object val)
-        {
-            AsyncSocket sock = val as AsyncSocket;
-            if (sock == null)
-                return false;
-            return (this.m_id == sock.m_id);
-        }
-
-        /// <summary>
-        /// IComparable's need to implement ==.  Checks for guid equality.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator==(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-                return ((object)two == null);
-            if ((object)two == null)
-                return false;
-
-            return (one.m_id == two.m_id);
-        }
-
-        /// <summary>
-        /// IComparable's need to implement comparison operators.
-        /// Checks compares guids.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator!=(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-                return ((object)two != null);
-            if ((object)two == null)
-                return true;
-
-            return (one.m_id != two.m_id);
-        }
-
-        /// <summary>
-        /// IComparable's need to implement comparison operators.  Checks compares guids.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator<(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-            {
-                return ((object)two != null);
-            }
-            return (((IComparable)one).CompareTo(two) < 0);
-        }
-        /// <summary>
-        /// IComparable's need to implement comparison operators.
-        /// Checks compares guids.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator<=(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-                return true;
-
-            return (((IComparable)one).CompareTo(two) <= 0);
-        }
-        /// <summary>
-        /// IComparable's need to implement comparison operators.
-        /// Checks compares guids.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator>(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-                return false;
-            return (((IComparable)one).CompareTo(two) > 0);
-        }
-        /// <summary>
-        /// IComparable's need to implement comparison operators.  Checks compares guids.
-        /// </summary>
-        /// <param name="one">First socket to compare</param>
-        /// <param name="two">Second socket to compare</param>
-        /// <returns></returns>
-        public static bool operator>=(AsyncSocket one, AsyncSocket two)
-        {
-            if ((object)one == null)
-            {
-                return (two == null);
-            }
-            return (((IComparable)one).CompareTo(two) >= 0);
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Retrieve the socketwatcher used by this instance of AsyncSocket
-        /// </summary>
-        public SocketWatcher SocketWatcher
-        {
-            get
-            {
-                return m_watcher;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/BaseSocket.cs b/lib/jabber-net/bedrock/net/BaseSocket.cs
deleted file mode 100644
index 6a01323..0000000
--- a/lib/jabber-net/bedrock/net/BaseSocket.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Base class for AsyncSocket and proxies for AsyncSocket
-    /// </summary>
-    public abstract class BaseSocket
-    {
-        /// <summary>
-        /// Identity of the host we're connecting to.  Used for SSL
-        /// validation, this is the name of the SRV we looked up, for
-        /// example.
-        /// </summary>
-        protected string m_hostid = null;
-
-        /// <summary>
-        /// Call through this interface when events happen.  WARNING:
-        /// AsyncSocket assumes this is not NULL.
-        /// </summary>
-        protected ISocketEventListener m_listener = null;
-
-        /// <summary>
-        /// Only to be called by things that immediately set m_listener!
-        /// </summary>
-        protected BaseSocket()
-        {
-        }
-
-        /// <summary>
-        /// Construct a BaseSocket.
-        /// </summary>
-        /// <param name="listener"></param>
-        protected BaseSocket(ISocketEventListener listener)
-        {
-            Debug.Assert(listener != null);
-            m_listener = listener;
-        }
-
-        /// <summary>
-        /// Where to send notifications of interesting things.
-        /// WARNING!  Only assign to this if you are Tom Waters.
-        /// </summary>
-        public virtual ISocketEventListener Listener
-        {
-            get
-            {
-                return m_listener;
-            }
-            set
-            {
-                lock (this)
-                {
-                    //if (m_reading)
-                    //    throw new InvalidOperationException("Don't set listener while reading, Tom.");
-                    m_listener = value;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Prepare to start accepting inbound requests.  Call
-        /// RequestAccept() to start the async process.
-        /// Default the listen queue size to 5.
-        /// </summary>
-        /// <param name="addr">Address to listen on</param>
-        public void Accept(Address addr)
-        {
-            Accept(addr, 5);
-        }
-
-        /// <summary>
-        /// Prepare to start accepting inbound requests.  Call
-        /// RequestAccept() to start the async process.
-        /// </summary>
-        /// <param name="addr">Address to listen on</param>
-        /// <param name="backlog">The Maximum length of the queue of
-        /// pending connections</param>
-        public abstract void Accept(Address addr, int backlog);
-
-        /// <summary>
-        /// Start the flow of async accepts.  Flow will continue while
-        /// Listener.OnAccept() returns true.  Otherwise, call RequestAccept() again
-        /// to continue.
-        /// </summary>
-        public abstract void RequestAccept();
-
-        /// <summary>
-        /// Outbound connection.  Eventually calls Listener.OnConnect() when
-        /// the connection comes up.  Don't forget to call RequestRead() in
-        /// OnConnect()!
-        /// </summary>
-        /// <param name="addr">Address/hostname to connect to</param>
-        /// <param name="hostIdentity">Identity of the host we're
-        /// connecting to.  Used for SSL validation, this is the name
-        /// of the SRV we looked up, for example.</param>
-        public void Connect(Address addr, string hostIdentity)
-        {
-            m_hostid = hostIdentity;
-            Connect(addr);
-        }
-
-        /// <summary>
-        /// Outbound connection.  Eventually calls Listener.OnConnect() when
-        /// the connection comes up.  Don't forget to call RequestRead() in
-        /// OnConnect()!
-        /// </summary>
-        /// <param name="addr"></param>
-        public abstract void Connect(Address addr);
-
-        ///<summary>
-        /// Returns true if the socket is connected.
-        ///</summary>
-        public abstract bool Connected
-        { 
-            get;
-        }
-
-#if !NO_SSL
-        /// <summary>
-        /// Start TLS processing on an open socket.
-        /// </summary>
-        public abstract void StartTLS();
-#endif
-
-        /// <summary>
-        /// Start XEP-138 compression on this socket.
-        /// </summary>
-        public abstract void StartCompression();
-
-        /// <summary>
-        /// Start an async read from the socket.  Listener.OnRead() is
-        /// eventually called when data arrives.
-        /// </summary>
-        public abstract void RequestRead();
-
-        /// <summary>
-        /// Async write to the socket.  Listener.OnWrite will be
-        /// called eventually when the data has been written.  A copy
-        /// is made of the data, internally.
-        /// </summary>
-        /// <param name="buf">Data to write</param>
-        public void Write(byte[] buf)
-        {
-            Write(buf, 0, buf.Length);
-        }
-
-        /// <summary>
-        /// Async write to the socket.  Listener.OnWrite will be
-        /// called eventually when the data has been written.  A
-        /// trimmed copy is made of the data, internally.
-        /// </summary>
-        /// <param name="buf">Buffer to output</param>
-        /// <param name="offset">Offset into buffer</param>
-        /// <param name="len">Number of bytes to output</param>
-        public abstract void Write(byte[] buf, int offset, int len);
-
-        /// <summary>
-        /// Close the socket.  This is NOT async.  .Net doesn't have
-        /// async closes.  But, it can be *called* async, particularly
-        /// from GotData.  Attempts to do a shutdown() first.
-        /// </summary>
-        public abstract void Close();
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/CertUtil.cs b/lib/jabber-net/bedrock/net/CertUtil.cs
deleted file mode 100644
index a328614..0000000
--- a/lib/jabber-net/bedrock/net/CertUtil.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-#if !NO_SSL && !NET20  && !__MonoCS__
-using Org.Mentalis.Security.Certificates;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Utilities for creating certificates
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class CertUtil
-    {
-        /// <summary>
-        /// Can this cert be used for server authentication?
-        /// </summary>
-        private const string OID_PKIX_KP_SERVER_AUTH = "1.3.6.1.5.5.7.3.1";
-        /// <summary>
-        /// Can this cert be used for client authentication?
-        /// </summary>
-        private const string OID_PKIX_KP_CLIENT_AUTH = "1.3.6.1.5.5.7.3.2";
-
-        /// <summary>
-        /// Find a server certificate in the given store.
-        /// </summary>
-        /// <param name="store"></param>
-        /// <returns></returns>
-        public static Certificate FindServerCert(CertificateStore store)
-        {
-            // return store.FindCertificate(new string[] {OID_PKIX_KP_SERVER_AUTH});
-            return store.FindCertificateByUsage(new string[] {OID_PKIX_KP_SERVER_AUTH});
-        }
-
-        /// <summary>
-        /// Find a client certificate in the given store.
-        /// </summary>
-        /// <param name="store"></param>
-        /// <returns></returns>
-        public static Certificate FindClientCert(CertificateStore store)
-        {
-            //return store.FindCertificate(new string[] {OID_PKIX_KP_CLIENT_AUTH});
-            return store.FindCertificateByUsage(new string[] {OID_PKIX_KP_CLIENT_AUTH});
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/bedrock/net/Exceptions.cs b/lib/jabber-net/bedrock/net/Exceptions.cs
deleted file mode 100644
index bcefc83..0000000
--- a/lib/jabber-net/bedrock/net/Exceptions.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Lame exception, since I couldn't find one I liked.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [Serializable]
-    public class AsyncSocketConnectionException : System.SystemException
-    {
-        /// <summary>
-        /// Create a new exception instance.
-        /// </summary>
-        /// <param name="description"></param>
-        public AsyncSocketConnectionException(string description)
-            : base(description)
-        {
-        }
-
-        /// <summary>
-        /// Create a new exception instance.
-        /// </summary>
-        public AsyncSocketConnectionException()
-            : base()
-        {
-        }
-
-        /// <summary>
-        /// Create a new exception instance, wrapping another exception.
-        /// </summary>
-        /// <param name="description">Desecription of the exception</param>
-        /// <param name="e">Inner exception</param>
-        public AsyncSocketConnectionException(string description, Exception e)
-            : base(description, e)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the
-        /// AsyncSocketConnectionException class with serialized
-        /// data.
-        /// </summary>
-        /// <param name="info">The object that holds the serialized
-        /// object data.</param>
-        /// <param name="ctx">The contextual information about the
-        /// source or destination.</param>
-        protected AsyncSocketConnectionException(System.Runtime.Serialization.SerializationInfo info,
-            System.Runtime.Serialization.StreamingContext ctx)
-            :
-            base(info, ctx)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/HttpSocket.cs b/lib/jabber-net/bedrock/net/HttpSocket.cs
deleted file mode 100644
index e575b97..0000000
--- a/lib/jabber-net/bedrock/net/HttpSocket.cs
+++ /dev/null
@@ -1,647 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Net;
-using System.Text;
-using System.Threading;
-
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Do basic HTTP processing, with a long-lived socket.
-    /// TODO: the BaseSocket parameter in the listener events will always be null for now.
-    /// TODO: change HttpSocket to be a is-a of AsyncSocket, not has-a.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class HttpSocket : BaseSocket, ISocketEventListener
-	{
-        private class PendingRequest
-        {
-            public string Method;
-            public Uri URI;
-            public byte[] Body;
-            public string ContentType;
-            public int Offset;
-            public int Length;
-
-            public WebHeaderCollection Headers = new WebHeaderCollection();
-            public int Code = -1;
-            public string ResponseText = null;
-            public MemoryStream Response;
-
-            public PendingRequest(string method, Uri URL, byte[] body, int offset, int len, string contentType)
-            {
-                this.Method = method;
-                this.URI = URL;
-                this.Body = (body == null) ? new byte[] { } : body;
-                this.Offset = offset;
-                this.Length = len;
-                this.ContentType = contentType;
-            }
-
-            public int ContentLength
-            {
-                get
-                {
-                    string slen = this.Headers[HttpResponseHeader.ContentLength];
-                    if (slen == null)
-                    {
-                        Debug.WriteLine("No Content-Length header");
-                        return -1;
-                    }
-                    try
-                    {
-                        return int.Parse(slen);
-                    }
-                    catch (Exception)
-                    {
-                        Debug.WriteLine("Invalid Content-Length");
-                        return -1;
-                    }
-                }
-            }
-        }
-
-        private static readonly Encoding ENC = Encoding.UTF8;
-        private string m_host = null;
-        private Address m_addr = null;
-        private bool m_ssl = false;
-
-        private AsyncSocket m_sock = null;
-        private ParseState m_state = ParseState.START;
-        private PendingRequest m_current = null;
-        private bool m_keepRunning = true;
-        private Uri m_proxyURI = null;
-        private NetworkCredential m_proxyCredentials = null;
-        private float m_connectRetrySec = 10.0F;
-        private int m_maxErrors = 5;
-        private int m_errorCount = 0;
-        private object m_lock = new Object();
-                
-        private static readonly byte[] SPACE = ENC.GetBytes(" ");
-        private static readonly byte[] CRLF = ENC.GetBytes("\r\n");
-        private static readonly byte[] COL_SP = ENC.GetBytes(": ");
-        private static readonly byte[] SP_HTTP11_CRLF = ENC.GetBytes(" HTTP/1.1\r\n");
-        private static readonly byte[] HTTP11_SP = ENC.GetBytes("HTTP/1.1 ");
-
-        /// <summary>
-        /// Create a socket.  This starts a thread for background processing, but the thread is mostly paused
-        /// waiting for new requests.
-        /// </summary>
-        public HttpSocket(ISocketEventListener listener) : base(listener)
-        {
-        }
-
-        /// <summary>
-        /// The URI of the HTTP proxy.  Note: HTTPS connections through a proxy are not yet supported.
-        /// </summary>
-        [DefaultValue(null)]
-        public Uri ProxyURI
-        {
-            get { return m_proxyURI; }
-            set { m_proxyURI = value; }
-        }
-
-        /// <summary>
-        /// Username/password for the proxy.
-        /// </summary>
-        [DefaultValue(null)]
-        public NetworkCredential ProxyCredentials
-        {
-            get { return m_proxyCredentials; }
-            set { m_proxyCredentials = value; }
-        }
-
-        /// <summary>
-        /// How long to wait before attempting to reconnect, in seconds.
-        /// </summary>
-        [DefaultValue(10.0f)]
-        public float ReconnectTimeout
-        {
-            get { return m_connectRetrySec; }
-            set { m_connectRetrySec = value; }
-        }
-
-        /// <summary>
-        /// The maximum number of reconnect attempts before giving up.
-        /// </summary>
-        [DefaultValue(5)]
-        public int MaxErrors
-        {
-            get { return m_maxErrors; }
-            set { m_maxErrors = value; }
-        }
-
-        private string m_name;
-
-        /// <summary>
-        /// The name of the socket, for debugging purposes
-        /// </summary>
-        public string Name
-        {
-            get { return m_name; }
-            set { m_name = value; }
-        }
-
-        /// <summary>
-        /// Execute an HTTP request.
-        /// </summary>
-        /// <param name="method">The HTTP method verb.  E.g. "GET", "POST", etc.</param>
-        /// <param name="URL">The URL to request.  MUST be for the same host as the first request.</param>
-        /// <param name="body">Any data to post with the request</param>
-        /// <param name="offset">The offset into body from which to start</param>
-        /// <param name="len">The number of bytes to read from body, starting at offset</param>
-        /// <param name="contentType">The MIME type of the supplied body</param>
-        public void Execute(string method, Uri URL, byte[] body, int offset, int len, string contentType)
-        {
-            Debug.Assert(!this.IsPending);
-
-            PendingRequest req = new PendingRequest(method, URL, body, offset, len, contentType);
-            if (m_host == null)
-                m_host = req.URI.Host;
-            else if (m_host != req.URI.Host)
-                throw new InvalidOperationException("All requests must got to same host: " + m_host);
-
-            // connect if not yet connected
-            if (req.Method != null)
-            {
-                lock (m_lock)
-                {
-                    if (!Connected)
-                    {
-                        Connect(req.URI);
-
-                        Monitor.Wait(m_lock, (int)(m_connectRetrySec * 1000));
-                        if (!m_keepRunning)
-                            return;
-
-                        Debug.Assert(Connected);
-                        Debug.Assert(!IsPending);
-                    }
-                }
-            }
-            Send(req);
-        }
-
-        /// <summary>
-        /// Is there an outstanding request that has not been responded to?
-        /// </summary>
-        public bool IsPending
-        {
-            get { return (m_current != null); }
-        }
-
-        /// <summary>
-        /// Generally should not be used.
-        /// </summary>
-        /// <param name="uri"></param>
-        internal void Connect(Uri uri)
-        {
-            m_keepRunning = true;
-
-            if (Connected)
-                return;
-
-            m_ssl = (uri != null) && (uri.Scheme == "https");
-            m_host = uri.Host;
-            if (m_proxyURI != null)
-            {
-                // TODO: add CONNECT support here.  ShttpProxy?
-                if (m_ssl)
-                    throw new InvalidOperationException("Can't do SSL through proxies yet.");
-                uri = m_proxyURI;
-            }
-            m_addr = new Address(uri.Host, uri.Port);
-            Connect();
-        }
-
-        private void Connect()
-        {
-            m_errorCount = 0;
-
-            if (!m_keepRunning)
-                return;
-            m_state = ParseState.START;
-            m_sock = new AsyncSocket(null, this, m_ssl, false);
-            m_sock.Connect(m_addr, m_host);
-        }
-
-        /// <summary>
-        /// Shut down the socket, abandoning any outstainding requests
-        /// </summary>
-        public override void Close()
-        {
-            lock (m_lock)
-            {
-                m_keepRunning = false;
-                // in case we closed while waiting for connect
-                Monitor.Pulse(m_lock);
-            }
-
-            if (Connected)
-                m_sock.Close();
-            m_sock = null;
-        }
-
-        /// <summary>
-        /// Close the socket after any pending request is completed.
-        /// </summary>
-        public void EnqueueClose()
-        {
-            lock (m_lock)
-            {
-                if (!m_keepRunning)
-                    return;
-
-                m_keepRunning = false;
-                if (!IsPending)
-                    Close();
-                // otherwise, we'll close after the current pending request completes
-            }
-        }
-
-        #region ISocketEventListener Members
-
-        void ISocketEventListener.OnInit(BaseSocket newSock)
-        {
-            // This is the one listener event with a good socket, but it might not be the one that anyone expects.
-            // The important thing is that if someone wants to set the TCP buffer sizes downstream, it 
-            // will work.
-            m_listener.OnInit(newSock);
-        }
-
-        ISocketEventListener ISocketEventListener.GetListener(BaseSocket newSock)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        bool ISocketEventListener.OnAccept(BaseSocket newsocket)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        private static void WriteString(Stream s, string str)
-        {
-            byte[] buf = ENC.GetBytes(str);
-            s.Write(buf, 0, buf.Length);
-        }
-
-        private void Send(PendingRequest req)
-        {
-            m_current = req;
-
-            // Try to get it big enough that we don't have to allocate, without going overboard.
-            MemoryStream ms = new MemoryStream(req.Length + 256);
-            WriteString(ms, req.Method);
-            WriteString(ms, " ");
-            if (m_proxyURI == null)
-                WriteString(ms, req.URI.PathAndQuery);
-            else
-                WriteString(ms, req.URI.ToString());
-            ms.Write(SP_HTTP11_CRLF, 0, SP_HTTP11_CRLF.Length);
-
-            WebHeaderCollection coll = new WebHeaderCollection();
-            coll.Add(HttpRequestHeader.Host, req.URI.Host);
-            if (req.ContentType != null)
-                coll.Add(HttpRequestHeader.ContentType, req.ContentType);
-            if (m_proxyCredentials != null)
-            {
-                byte[] creds = Encoding.ASCII.GetBytes(m_proxyCredentials.UserName + ":" + m_proxyCredentials.Password);
-                coll.Add("Proxy-Authorization", "Basic " + Convert.ToBase64String(creds));
-            }
-            coll.Add("X-JN-Name", m_name);
-            coll.Add(HttpRequestHeader.Date, string.Format("{0:r}", DateTime.Now));
-            coll.Add(HttpRequestHeader.ContentLength, req.Length.ToString());
-
-            byte[] headers = coll.ToByteArray();
-            ms.Write(headers, 0, headers.Length);
-
-            ms.Write(req.Body, req.Offset, req.Length);
-
-            byte[] buf = ms.ToArray();
-
-            m_sock.Write(buf);
-            m_sock.RequestRead();
-        }
-
-        void ISocketEventListener.OnConnect(BaseSocket sock)
-        {
-            m_listener.OnConnect(null);
-            lock (m_lock)
-            {
-                Monitor.Pulse(m_lock);
-            }
-        }
-
-        void ISocketEventListener.OnClose(BaseSocket sock)
-        {
-            m_sock = null;
-            lock (m_lock)
-            {
-                Monitor.Pulse(m_lock);
-            }
-        }
-
-        void ISocketEventListener.OnError(BaseSocket sock, Exception ex)
-        {
-            if (Interlocked.Increment(ref m_errorCount) > m_maxErrors)
-            {
-                m_keepRunning = false;
-                m_listener.OnError(null, ex);
-            }
-
-            lock (m_lock)
-            {
-                Monitor.Pulse(m_lock);
-            }
-        }
-
-        private bool ParseAt(byte[] buf, ref int i, int last, byte[] check, int checkoffset)
-        {
-            int start = i;
-            for (int j = checkoffset; j < check.Length; j++)
-            {
-                if (i >= last)
-                {
-                    i = start;
-                    return false;
-                }
-
-                if (buf[i++] != check[j])
-                {
-                    i = start;
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        private string ParseTo(byte[] buf, ref int i, int last, byte[] check)
-        {
-            int start = i;
-
-            // IndexOf should be in asm.
-            int j;
-            while (i < last)
-            {
-                j = Array.IndexOf(buf, check[0], i);
-                if (j == -1)
-                    return null;
-                i = j;
-                if (check.Length > 1)
-                {
-                    i++;
-                    if (ParseAt(buf, ref i, last, check, 1))
-                        return ENC.GetString(buf, start, j - start);
-                }
-                else
-                    return ENC.GetString(buf, start, j - start);
-            }
-            return null;
-        }
-
-        private enum ParseState
-        {
-            START,
-            RESPONSE,
-            RESPONSE_TEXT,
-            HEADER_NAME,
-            HEADER_VALUE,
-            BODY_START,
-            BODY_CONTINUE
-        }
-
-        private void Done()
-        {
-            m_state = ParseState.START;
-            m_current = null;
-            Debug.WriteLine("HTTP Socket " + m_name + " done");
-        }
-
-        bool ISocketEventListener.OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            Debug.WriteLine("IN HTTP(" + m_name + "): " + ENC.GetString(buf, offset, length));
-            int i = offset;
-            string header = null;
-            int last = offset + length;
-
-            while (i < last)
-            {
-                // HTTP/1.1 200 OK
-                // Header: value
-                // Header: value
-                //
-                // Content
-                switch (m_state)
-                {
-                    case ParseState.START:
-                        if (!ParseAt(buf, ref i, last, HTTP11_SP, 0))
-                            goto ERROR;
-                        m_state = ParseState.RESPONSE;
-                        break;
-                    case ParseState.RESPONSE:
-                        string code = ParseTo(buf, ref i, last, SPACE);
-                        if (code == null)
-                            goto ERROR;
-
-                        if (code != "200")
-                        {
-                            Debug.WriteLine("Non-OK response from server (" + code + ").  STOP!");
-                            goto ERROR;
-                        }
-
-                        try
-                        {
-                            // I know this can never fail.  it's here for when we
-                            // implement redirects and the like.
-                            m_current.Code = int.Parse(code);
-                        }
-                        catch (Exception)
-                        {
-                            Debug.WriteLine("invalid response code");
-                            goto ERROR;
-                        }
-
-                        m_state = ParseState.RESPONSE_TEXT;
-                        break;
-                    case ParseState.RESPONSE_TEXT:
-                        m_current.ResponseText = ParseTo(buf, ref i, last, CRLF);
-                        if (m_current.ResponseText == null)
-                            goto ERROR;
-                        m_state = ParseState.HEADER_NAME;
-                        break;
-                    case ParseState.HEADER_NAME:
-                        if (ParseAt(buf, ref i, last, CRLF, 0))
-                        {
-                            m_state = ParseState.BODY_START;
-                            break;
-                        }
-                        header = ParseTo(buf, ref i, last, COL_SP);
-                        if (header == null)
-                            goto ERROR;
-                        m_state = ParseState.HEADER_VALUE;
-                        break;
-                    case ParseState.HEADER_VALUE:
-                        string val = ParseTo(buf, ref i, last, CRLF);
-                        if (val == null)
-                            goto ERROR;
-                        m_current.Headers.Add(header, val);
-                        m_state = ParseState.HEADER_NAME;
-                        break;
-                    case ParseState.BODY_START:
-                        // if we have the whole response, which is typical in XEP-124, then return it all at
-                        // once, without creating a MemoryStream.
-                        int len = m_current.ContentLength;
-                        if (len == -1)
-                            goto ERROR;
-                        if (i + len <= last)
-                        {
-                            Done();
-                            if (!m_listener.OnRead(this, buf, i, len) || !m_keepRunning)
-                            {
-                                Close();
-                                return false;
-                            }
-                            return false;
-                        }
-
-                        // We got a partial response.  We're going to have to wait until OnRead is called
-                        // again before we can pass a full response upstream.  Hold on to the pieces in a
-                        // MemoryStream.
-                        m_current.Response = new MemoryStream(len);
-                        m_current.Response.Write(buf, i, last - i);
-                        m_state = ParseState.BODY_CONTINUE;
-                        return true;
-                    case ParseState.BODY_CONTINUE:
-                        m_current.Response.Write(buf, i, last - i);
-                        if (m_current.Response.Length == m_current.Response.Capacity)
-                        {
-                            PendingRequest req = m_current;
-                            Done();
-
-                            byte[] resp = req.Response.ToArray();
-                            if (!m_listener.OnRead(this, resp, 0, resp.Length) || !m_keepRunning)
-                            {
-                                Close();
-                                return false;
-                            }
-
-                            return false;
-                        }
-                        return true;
-                    default:
-                        break;
-                }
-            }
-            return true;
-
-        ERROR:
-            m_listener.OnError(null, new ProtocolViolationException("Error parsing HTTP response"));
-            Close();
-            return false;
-        }
-
-        void ISocketEventListener.OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            m_listener.OnWrite(null, buf, offset, length);
-        }
-
-        bool ISocketEventListener.OnInvalidCertificate(BaseSocket sock, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            // TODO: pass up the chain
-            return m_listener.OnInvalidCertificate(null, certificate, chain, sslPolicyErrors);
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        /// <param name="addr"></param>
-        /// <param name="backlog"></param>
-        public override void Accept(Address addr, int backlog)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override void RequestAccept()
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(Address addr)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Are we currently connected? 
-        /// </summary>
-        public override bool Connected
-        {
-            get { return (m_sock != null) && (m_sock.Connected); }
-        }
-
-#if !NO_SSL
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override void StartTLS()
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-#endif
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override void StartCompression()
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        public override void RequestRead()
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Not implemented.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="len"></param>
-        public override void Write(byte[] buf, int offset, int len)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/IHttpSocket.cs b/lib/jabber-net/bedrock/net/IHttpSocket.cs
deleted file mode 100644
index 9f4f4bf..0000000
--- a/lib/jabber-net/bedrock/net/IHttpSocket.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace bedrock.net
-{
-	interface IHttpSocket
-	{
-	    string URL { get; set; }
-	}
-
-    /// <summary>
-    /// This socket has special support for writing XML elements.
-    /// </summary>
-    public interface IElementSocket
-    {
-        /// <summary>
-        /// Write an XML element to the socket.
-        /// </summary>
-        /// <param name="elem"></param>
-        void Write(System.Xml.XmlElement elem);
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/ProxySocket.cs b/lib/jabber-net/bedrock/net/ProxySocket.cs
deleted file mode 100644
index a6d10a2..0000000
--- a/lib/jabber-net/bedrock/net/ProxySocket.cs
+++ /dev/null
@@ -1,318 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Text;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Proxy object for sockets.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ProxySocket : BaseSocket, ISocketEventListener
-    {
-        private BaseSocket     m_sock = null;
-        private string         m_host = null;
-        private int            m_port = 0;
-        private string         m_username = null;
-        private string         m_password = null;
-        private Address        m_remote_addr = null;
-        private bool           m_ssl = false;
-
-        /// <summary>
-        /// Wrap an existing socket event listener with a proxy.  Make SURE to set Socket after this.
-        /// </summary>
-        /// <param name="chain">Event listener to pass events through to.</param>
-        public ProxySocket(ISocketEventListener chain) : base(chain)
-        {
-        }
-
-        /// <summary>
-        /// The address that the proxy should connect to.
-        /// </summary>
-        public Address RemoteAddress
-        {
-            get { return m_remote_addr; }
-            set { m_remote_addr = value; }
-        }
-
-        /// <summary>
-        /// The lower level socket
-        /// </summary>
-        public BaseSocket Socket
-        {
-            get { return m_sock; }
-            set { m_sock = value; }
-        }
-
-        /// <summary>
-        /// the host running the proxy
-        /// </summary>
-        public string Host
-        {
-            get { return m_host; }
-            set { m_host = value; }
-        }
-
-        /// <summary>
-        /// the port to talk to the proxy host on
-        /// </summary>
-        public int Port
-        {
-            get { return m_port; }
-            set { m_port = value; }
-        }
-
-        /// <summary>
-        /// Do SSL **after** connected through the proxy.
-        /// </summary>
-        public bool SSL
-        {
-            get { return m_ssl; }
-            set { m_ssl = value; }
-        }
-
-        /// <summary>
-        /// the auth username for the proxy
-        /// </summary>
-        public string Username
-        {
-            get { return m_username; }
-            set { m_username = value; }
-        }
-
-        /// <summary>
-        /// the auth password for the proxy
-        /// </summary>
-        public string Password
-        {
-            get { return m_password; }
-            set { m_password = value; }
-        }
-
-        /// <summary>
-        /// Are we currently connected?
-        /// </summary>
-        public override bool Connected
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Prepare to start accepting inbound requests.  Call RequestAccept() to start the async process.
-        /// </summary>
-        /// <param name="addr">Address to listen on</param>
-        /// <param name="backlog">The Maximum length of the queue of pending connections</param>
-        public override void Accept(bedrock.net.Address addr, int backlog)
-        {
-            m_sock.Accept(addr, backlog);
-        }
-
-        /// <summary>
-        /// Close the socket.  This is NOT async.  .Net doesn't have async closes.
-        /// But, it can be *called* async, particularly from GotData.
-        /// Attempts to do a shutdown() first.
-        /// </summary>
-        public override void Close()
-        {
-            m_sock.Close();
-        }
-
-        /// <summary>
-        /// Saves the address passed in, and really connects to m_host:m_port.
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(bedrock.net.Address addr)
-        {
-            m_remote_addr = addr; // save this till we are ready for it...
-            Debug.Assert(m_host != null);
-            Debug.Assert(m_port != 0);
-            // connect to the proxy.
-            Address proxy_addr = new Address(m_host, m_port);
-            m_sock.Connect(proxy_addr, m_hostid);
-            // we'll end up in OnConnected below.
-        }
-
-#if !NO_SSL
-        /// <summary>
-        /// Start TLS processing on an open socket.
-        /// </summary>
-        public override void StartTLS()
-        {
-            m_sock.StartTLS();
-        }
-#endif
-
-        /// <summary>
-        /// Start compression processing on an open socket.
-        /// </summary>
-        public override void StartCompression()
-        {
-            m_sock.StartCompression();
-        }
-
-        /// <summary>
-        /// Start the flow of async accepts.  Flow will continue while
-        /// Listener.OnAccept() returns true.  Otherwise, call RequestAccept() again
-        /// to continue.
-        /// </summary>
-        public override void RequestAccept()
-        {
-            m_sock.RequestAccept();
-        }
-
-        /// <summary>
-        /// Start an async read from the socket.  Listener.OnRead() is eventually called
-        /// when data arrives.
-        /// </summary>
-        public override void RequestRead()
-        {
-            m_sock.RequestRead();
-        }
-
-        /// <summary>
-        /// Async write to the socket.  Listener.OnWrite will be called eventually
-        /// when the data has been written.  A trimmed copy is made of the data, internally.
-        /// </summary>
-        /// <param name="buf">Buffer to output</param>
-        /// <param name="offset">Offset into buffer</param>
-        /// <param name="len">Number of bytes to output</param>
-        public override void Write(byte[] buf, int offset, int len)
-        {
-            m_sock.Write(buf, offset, len);
-        }
-
-        #region Implementation of ISocketEventListener
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="newSock"></param>
-        public virtual void OnInit(BaseSocket newSock)
-        {
-            m_listener.OnInit(newSock);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="newSock"></param>
-        /// <returns></returns>
-        public virtual ISocketEventListener GetListener(BaseSocket newSock)
-        {
-            return m_listener.GetListener(newSock);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="newsocket"></param>
-        /// <returns></returns>
-        public virtual bool OnAccept(BaseSocket newsocket)
-        {
-            return m_listener.OnAccept(newsocket);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sock"></param>
-        public virtual void OnConnect(BaseSocket sock)
-        {
-            if (m_ssl)
-            {
-#if !NO_SSL
-                m_sock.StartTLS();
-#else
-                throw new NotImplementedException("SSL not compiled in");
-#endif
-            }
-            m_listener.OnConnect(sock);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sock"></param>
-        public virtual void OnClose(BaseSocket sock)
-        {
-            m_listener.OnClose(sock);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="ex"></param>
-        public virtual void OnError(BaseSocket sock, System.Exception ex)
-        {
-            m_listener.OnError(sock, ex);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        /// <returns></returns>
-        public virtual bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            return m_listener.OnRead(sock, buf, offset, length);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        public virtual void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            m_listener.OnWrite(sock, buf, offset, length);
-        }
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        public virtual bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return m_listener.OnInvalidCertificate(sock, certificate, chain, sslPolicyErrors);
-        }
-        #endregion
-
-        /// <summary>
-        /// String representation of the proxy socket.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "Proxy connection to: " + RemoteAddress.ToString();
-        }
-
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/ShttpProxy.cs b/lib/jabber-net/bedrock/net/ShttpProxy.cs
deleted file mode 100644
index 0c7e052..0000000
--- a/lib/jabber-net/bedrock/net/ShttpProxy.cs
+++ /dev/null
@@ -1,173 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Text;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Proxy object for sockets that want to do SHTTP proxying.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ShttpProxy : ProxySocket
-    {
-        private enum States { None, Connecting, WaitingForAuth, Running, Closed, Error }
-        private States m_state = States.None;
-        private System.IO.MemoryStream m_headerstream = new System.IO.MemoryStream();
-        private System.Collections.ArrayList m_headers = new System.Collections.ArrayList();
-
-        /// <summary>
-        /// Wrap an existing socket event listener with a ShttpProxy proxy.  Make SURE to set Socket after this.
-        /// </summary>
-        /// <param name="chain">Event listener to pass events through to.</param>
-        public ShttpProxy(ISocketEventListener chain) : base(chain)
-        {
-        }
-
-        /// <summary>
-        /// Remember that we're in the connecting state, let base connect to proxy, resumes in OnConnect.
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(bedrock.net.Address addr)
-        {
-            m_state = States.Connecting;
-            base.Connect(addr);
-        }
-
-        #region Implementation of ISocketEventListener
-
-        /// <summary>
-        /// overridden OnConnect to start off SHTTP protocol.
-        /// </summary>
-        /// <param name="sock"></param>
-        public override void OnConnect(bedrock.net.BaseSocket sock)
-        {
-            if (m_state == States.Connecting)
-            { // CONNECT users.instapix.com:5222 HTTP/1.0
-                m_state = States.WaitingForAuth;
-                string cmd = string.Format(@"CONNECT {0}:{1} HTTP/1.1
-Host: {0}
-", RemoteAddress.Hostname, RemoteAddress.Port);
-
-                // if authinfo is set, send it.
-                if (Username != null && Username.Length > 0 && Password != null && Password.Length > 0)
-                {
-                    string auth = Convert.ToBase64String(Encoding.ASCII.GetBytes(Username + ":" + Password));
-                    cmd += "Proxy-Authorization: Basic " + auth + "\r\n";
-                }
-                cmd += "\r\n";
-                Debug.WriteLine("PSEND:" + cmd);
-                Write(Encoding.ASCII.GetBytes(cmd));
-                RequestRead();
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnRead to handle 4 Socks5 states...
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        /// <returns></returns>
-        public override bool OnRead(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            switch (m_state)
-            {
-            case States.WaitingForAuth:
-                m_headerstream.Write(buf, offset, length);
-                int state = 0;
-                int line = 0;
-                foreach (byte b in buf)
-                {
-                    // Look for \r\n\r\n for end of response header
-                    switch (state)
-                    {
-                    case 0:
-                        if (b == '\r')
-                            state++;
-                        break;
-                    case 1:
-                        if (b == '\n')
-                        {
-                            byte[] hs = m_headerstream.ToArray();
-                            string s = System.Text.Encoding.UTF8.GetString(hs);
-                            Debug.Write("PRECV: " + s);
-                            m_headers.Add(s);
-                            m_headerstream.SetLength(0);
-                            state++;
-                            line++;
-                        }
-                        else
-                            state = 0;
-                        break;
-                    case 2:
-                        if (b == '\r')
-                            state++;
-                        else
-                            state = 0;
-                        break;
-                    case 3:
-                        if (b == '\n')
-                        {
-                            Debug.WriteLine("End of proxy headers");
-                            string line0 = (string)m_headers[0];
-                            if (line0.IndexOf("200") == -1)
-                            {
-                                Debug.WriteLine("200 response not detected.  Closing.");
-                                m_state = States.Error;
-                                this.Close();
-                            }
-                            else
-                            {
-                                Debug.WriteLine("Proxy connected");
-                                m_listener.OnConnect(sock); // tell the real listener that we're connected.
-                                m_state = States.Running;
-                            }
-                            // they'll call RequestRead(), so we can return false here.
-                            return false;
-                        }
-                        else
-                            state = 0;
-                        break;
-                    }
-                }
-                return true;
-            case States.Error:
-                throw new InvalidOperationException("Cannot read after error");
-            default:
-                return base.OnRead(sock, buf, offset, length);
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnWrite to ensure that the base only gets called when in running state.
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        public override void OnWrite(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            if (m_state == States.Running)
-            {
-                base.OnWrite(sock, buf, offset, length);
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/SocketEventListener.cs b/lib/jabber-net/bedrock/net/SocketEventListener.cs
deleted file mode 100644
index 3f155f6..0000000
--- a/lib/jabber-net/bedrock/net/SocketEventListener.cs
+++ /dev/null
@@ -1,203 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-namespace bedrock.net
-{
-    /// <summary>
-    /// Interface class for Socket events. Any object which
-    /// implements these interfaces is eligible to recieve Socket
-    /// events.  This is an interface instead of events in order
-    /// to preserve symmetry with libbedrock.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public interface ISocketEventListener
-    {
-        /// <summary>
-        /// An accept socket is about to be bound, or a connect socket is about to connect,
-        /// or an incoming socket just came in.  Use this as an opportunity to
-        /// </summary>
-        /// <param name="newSock">The new socket that is about to be connected.</param>
-        void OnInit(BaseSocket newSock);
-
-        /// <summary>
-        /// We accepted a socket, and need to get a listener.
-        /// If the return value is null, then the socket will be closed,
-        /// and RequestAccept will ALWAYS be called.
-        /// </summary>
-        /// <param name="newSock">The new socket.</param>
-        /// <returns>The listener for the *new* socket, as compared to
-        /// the listener for the *listen* socket</returns>
-        ISocketEventListener GetListener(BaseSocket newSock);
-
-        /// <summary>
-        /// A new incoming connection was accepted.
-        /// </summary>
-        /// <param name="newsocket">Socket for new connection.</param>
-        /// <returns>true if RequestAccept() should be called automatically again</returns>
-        bool OnAccept(BaseSocket newsocket);
-        /// <summary>
-        /// Outbound connection was connected.
-        /// </summary>
-        /// <param name="sock">Connected socket.</param>
-        void OnConnect(BaseSocket sock);
-        /// <summary>
-        /// Connection was closed.
-        /// </summary>
-        /// <param name="sock">Closed socket.  Already closed!</param>
-        void OnClose(BaseSocket sock);
-        /// <summary>
-        /// An error happened in processing.  The socket is no longer open.
-        /// </summary>
-        /// <param name="sock">Socket in error</param>
-        /// <param name="ex">Exception that caused the error</param>
-        void OnError(BaseSocket sock, Exception ex);
-        /// <summary>
-        /// Bytes were read from the socket.
-        /// </summary>
-        /// <param name="sock">The socket that was read from.</param>
-        /// <param name="buf">The bytes that were read.</param>
-        /// <param name="offset">Offset into the buffer to start at</param>
-        /// <param name="length">Number of bytes to use out of the buffer</param>
-        /// <returns>true if RequestRead() should be called automatically again</returns>
-        bool OnRead (BaseSocket sock, byte[] buf, int offset, int length);
-        /// <summary>
-        /// Bytes were written to the socket.
-        /// </summary>
-        /// <param name="sock">The socket that was written to.</param>
-        /// <param name="buf">The bytes that were written.</param>
-        /// <param name="offset">Offset into the buffer to start at</param>
-        /// <param name="length">Number of bytes to use out of the buffer</param>
-        void OnWrite(BaseSocket sock, byte[] buf, int offset, int length);
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors);
-    }
-    /// <summary>
-    /// Default, empty implementation of ISocketEventListener
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SocketEventListener : ISocketEventListener
-    {
-        #region Implementation of ISocketEventListener
-        /// <summary>
-        /// An accept socket is about to be bound, or a connect socket is about to connect,
-        /// or an incoming socket just came in.  Use this as an opportunity to
-        /// </summary>
-        /// <param name="newSock">The new socket that is about to be connected.</param>
-        public virtual void OnInit(BaseSocket newSock)
-        {
-        }
-
-        /// <summary>
-        /// We accepted a socket, and need to get a listener.
-        /// If the return value is null, then the socket will be closed,
-        /// and RequestAccept will ALWAYS be called.
-        /// </summary>
-        /// <param name="newSock">The new socket.</param>
-        /// <returns>The listener for the *new* socket, as compared to
-        /// the listener for the *listen* socket</returns>
-        public virtual ISocketEventListener GetListener(BaseSocket newSock)
-        {
-            return this;
-        }
-
-        /// <summary>
-        /// A new incoming connection was accepted.
-        /// </summary>
-        /// <param name="newsocket">Socket for new connection.</param>
-        /// <returns>true if RequestAccept() should be called automatically again</returns>
-        public virtual bool OnAccept(BaseSocket newsocket)
-        {
-            return true;
-        }
-
-        /// <summary>
-        /// Outbound connection was connected.
-        /// </summary>
-        /// <param name="sock">Connected socket.</param>
-        public virtual void OnConnect(BaseSocket sock)
-        {
-        }
-
-        /// <summary>
-        /// Connection was closed.
-        /// </summary>
-        /// <param name="sock">Closed socket.  Already closed!</param>
-        public virtual void OnClose(BaseSocket sock)
-        {
-        }
-
-        /// <summary>
-        /// An error happened in processing.  The socket is no longer open.
-        /// </summary>
-        /// <param name="sock">Socket in error</param>
-        /// <param name="ec">Exception that caused the error</param>
-        public virtual void OnError(BaseSocket sock, System.Exception ec)
-        {
-        }
-
-        /// <summary>
-        /// Bytes were read from the socket.
-        /// </summary>
-        /// <param name="sock">The socket that was read from.</param>
-        /// <param name="buf">The bytes that were read.</param>
-        /// <returns>true if RequestRead() should be called automatically again</returns>
-        /// <param name="offset">Offset into the buffer to start at</param>
-        /// <param name="length">Number of bytes to use out of the buffer</param>
-        public virtual bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            return true;
-        }
-
-        /// <summary>
-        /// Bytes were written to the socket.
-        /// </summary>
-        /// <param name="sock">The socket that was written to.</param>
-        /// <param name="buf">The bytes that were written.</param>
-        /// <param name="offset">Offset into the buffer to start at</param>
-        /// <param name="length">Number of bytes to use out of the buffer</param>
-        public virtual void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-        }
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        public virtual bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return false;
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/SocketWatcher.cs b/lib/jabber-net/bedrock/net/SocketWatcher.cs
deleted file mode 100644
index f9326c9..0000000
--- a/lib/jabber-net/bedrock/net/SocketWatcher.cs
+++ /dev/null
@@ -1,318 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-using System.IO;
-
-using bedrock.util;
-using bedrock.collections;
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// A collection of sockets.  This makes a lot more sense in the poll() version (Unix/C) since
-    /// you need to have a place to collect all of the sockets and call poll().  Here, it's just
-    /// convenience functions.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SocketWatcher : IDisposable
-    {
-        private enum State
-        {
-            Running,
-            Shutdown,
-            Stopped
-        };
-
-        private ISet        m_pending = new Set(SetImplementation.SkipList);
-        private ISet        m_socks   = new Set(SetImplementation.SkipList);
-        private object      m_lock = new object();
-        private int         m_maxSocks;
-        private bool        m_synch = false;
-
-        private X509Certificate2 m_cert = null;
-        private bool m_requireClientCert = false;
-
-        /// <summary>
-        /// Create a new instance, which will manage an unlimited number of sockets.
-        /// </summary>
-        public SocketWatcher()
-        {
-            m_maxSocks = -1;
-        }
-
-        /// <summary>
-        /// Create a new instance.
-        /// </summary>
-        /// <param name="maxsockets">Maximum number of sockets to watch.  In this version,
-        /// this is mostly for rate-limiting purposes.</param>
-        public SocketWatcher(int maxsockets)
-        {
-            m_maxSocks = maxsockets;
-        }
-
-        /// <summary>
-        /// Synchronous operation
-        /// </summary>
-        public bool Synchronous
-        {
-            get { return m_synch; }
-            set { m_synch = value; }
-        }
-
-        /// <summary>
-        /// The maximum number of sockets watched.  Throws
-        /// InvalidOperationException if the new value is fewer than the number
-        /// currently open.  -1 means no limit.
-        /// </summary>
-        public int MaxSockets
-        {
-            get { return m_maxSocks; }
-            set
-            {
-                lock(m_lock)
-                {
-                    if ((value >= 0) && (m_socks.Count >= value))
-                        throw new InvalidOperationException("Too many sockets: " + m_socks.Count);
-
-                    m_maxSocks = value;
-                }
-            }
-        }
-
-        /// <summary>
-        /// The certificate to be used for the local side of sockets, with SSL on.
-        /// </summary>
-        public X509Certificate2 LocalCertificate
-        {
-            get { return m_cert; }
-            set { m_cert = value; }
-        }
-
-        /// <summary>
-        /// Does the server require a client cert?  If not, the client cert won't be sent.
-        /// </summary>
-        public bool RequireClientCert
-        {
-            get { return m_requireClientCert; }
-            set { m_requireClientCert = value; }
-        }
-
-        /// <summary>
-        /// Set the certificate to be used for accept sockets.  To generate a test .pfx file using openssl,
-        /// add this to openssl.conf:
-        ///   <blockquote>
-        ///   [ serverex ]
-        ///   extendedKeyUsage=1.3.6.1.5.5.7.3.1
-        ///   </blockquote>
-        /// and run the following commands:
-        ///   <blockquote>
-        ///   openssl req -new -x509 -newkey rsa:1024 -keyout privkey.pem -out key.pem -extensions serverex
-        ///   openssl pkcs12 -export -in key.pem -inkey privkey.pem -name localhost -out localhost.pfx
-        ///   </blockquote>
-        /// If you leave the certificate null, and you are doing Accept, the SSL class will try to find a
-        /// default server cert on your box.  If you have IIS installed with a cert, this might just go...
-        /// </summary>
-        /// <param name="filename">A .pfx or .cer file</param>
-        /// <param name="password">The password, if this is a .pfx file, null if .cer file.</param>
-        public void SetCertificateFile(string filename,
-                                       string password)
-        {
-            m_cert = new X509Certificate2(filename, password);
-            // TODO: check cert for validity
-        }
-
-        /// <summary>
-        /// Set the certificate from a system store.  Try "MY" for the ones listed in IE.
-        /// </summary>
-        /// <param name="storeName"></param>
-        public void SetCertificateStore(StoreName storeName)
-        {
-            throw new NotImplementedException("Not implemented yet.  Need to figure out how to search for 'server' certs.");
-        }
-
-        /// <summary>
-        /// Create a socket that is listening for inbound connections.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <param name="backlog">The maximum length of the queue of pending connections</param>
-        /// <param name="SSL">Do SSL3/TLS1 on connect</param>
-        /// <returns>A socket that is ready for calling RequestAccept()</returns>
-        public AsyncSocket CreateListenSocket(ISocketEventListener listener,
-                                              Address              addr,
-                                              int                  backlog,
-                                              bool                 SSL)
-        {
-            //Debug.Assert(m_maxSocks > 1);
-            AsyncSocket result = new AsyncSocket(this, listener, SSL, m_synch);
-            if (SSL)
-            {
-                result.LocalCertificate = m_cert;
-                result.RequireClientCert = m_requireClientCert;
-            }
-            result.Accept(addr, backlog);
-            return result;
-        }
-
-        /// <summary>
-        /// Create a socket that is listening for inbound connections.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <param name="SSL">Do SSL3/TLS1 on connect</param>
-        /// <returns>A socket that is ready for calling RequestAccept()</returns>
-        public AsyncSocket CreateListenSocket(ISocketEventListener listener,
-                                              Address              addr,
-                                              bool                 SSL)
-        {
-            return CreateListenSocket(listener, addr, 5, SSL);
-        }
-
-        /// <summary>
-        /// Create a socket that is listening for inbound connections, with no SSL/TLS.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <returns>A socket that is ready for calling RequestAccept()</returns>
-        public AsyncSocket CreateListenSocket(ISocketEventListener listener,
-            Address              addr)
-        {
-            return CreateListenSocket(listener, addr, 5, false);
-        }
-
-        /// <summary>
-        /// Create a socket that is listening for inbound connections, with no SSL/TLS.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <param name="backlog">The maximum length of the queue of pending connections</param>
-        /// <returns>A socket that is ready for calling RequestAccept()</returns>
-        public AsyncSocket CreateListenSocket(ISocketEventListener listener,
-                                              Address              addr,
-                                              int                  backlog)
-        {
-            return CreateListenSocket(listener, addr, backlog, false);
-        }
-
-        /// <summary>
-        /// Create an outbound socket.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <returns>Socket that is in the process of connecting</returns>
-        public AsyncSocket CreateConnectSocket(ISocketEventListener listener,
-                                               Address              addr)
-        {
-            return CreateConnectSocket(listener, addr, false, null);
-        }
-
-        /// <summary>
-        /// Create an outbound socket.
-        /// </summary>
-        /// <param name="listener">Where to send notifications</param>
-        /// <param name="addr">Address to connect to</param>
-        /// <param name="SSL">Do SSL3/TLS1 on startup</param>
-        /// <param name="hostId">The logical name of the host to connect to, for SSL/TLS purposes.</param>
-        /// <returns>Socket that is in the process of connecting</returns>
-        public AsyncSocket CreateConnectSocket(ISocketEventListener listener,
-                                               Address              addr,
-                                               bool                 SSL,
-                                               string               hostId)
-        {
-            AsyncSocket result;
-
-            // Create the socket:
-            result = new AsyncSocket(this, listener, SSL, m_synch);
-            if (SSL)
-                result.LocalCertificate = m_cert;
-
-            // Start the connect process:
-            result.Connect(addr, hostId);
-            return result;
-        }
-
-        /// <summary>
-        /// Called by AsyncSocket when a new connection is received on a listen socket.
-        /// </summary>
-        /// <param name="s">New socket connection</param>
-        public void RegisterSocket(AsyncSocket s)
-        {
-            lock (m_lock)
-            {
-                if ((m_maxSocks >= 0) && (m_socks.Count >= m_maxSocks))
-                    throw new InvalidOperationException("Too many sockets: " + m_socks.Count);
-                m_socks.Add(s);
-            }
-        }
-
-        /// <summary>
-        /// Called by AsyncSocket when a socket is closed.
-        /// </summary>
-        /// <param name="s">Closed socket</param>
-        public void CleanupSocket(AsyncSocket s)
-        {
-            lock (m_lock)
-            {
-                m_socks.Remove(s);
-
-                if (m_pending.Contains(s))
-                {
-                    m_pending.Remove(s);
-                }
-                else
-                {
-                    foreach (AsyncSocket sock in m_pending)
-                    {
-                        sock.RequestAccept();
-                    }
-                    m_pending.Clear();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Called by AsyncSocket when this class is full, and the listening AsyncSocket
-        /// socket would like to be restarted when there are slots free.
-        /// </summary>
-        /// <param name="s">Listening socket</param>
-        public void PendingAccept(AsyncSocket s)
-        {
-            lock (m_lock)
-            {
-                m_pending.Add(s);
-            }
-        }
-
-        /// <summary>
-        /// Or close.  Potato, tomato.  This is useful if you want to use using().
-        /// </summary>
-        public void Dispose()
-        {
-            lock (m_lock)
-            {
-                m_pending.Clear();
-                foreach (AsyncSocket s in m_socks)
-                {
-                    s.Close();
-                }
-                m_socks.Clear();
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/Socks4Proxy.cs b/lib/jabber-net/bedrock/net/Socks4Proxy.cs
deleted file mode 100644
index 471c676..0000000
--- a/lib/jabber-net/bedrock/net/Socks4Proxy.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Text;
-using System.Net;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Proxy object for sockets that want to do SOCKS4 proxying.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Socks4Proxy : ProxySocket
-    {
-        private enum States { None, Connecting, RequestingProxy, Running, Closed }
-        private States m_state = States.None;
-
-        /// <summary>
-        /// Wrap an existing socket event listener with a Socks5 proxy.  Make SURE to set Socket after this.
-        /// </summary>
-        /// <param name="chain">Event listener to pass events through to.</param>
-        public Socks4Proxy(ISocketEventListener chain) : base(chain)
-        {
-        }
-
-        /// <summary>
-        /// Saves the address passed in, and really connects to ProxyHost:ProxyPort to begin SOCKS5 handshake.
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(bedrock.net.Address addr)
-        {
-            m_state = States.Connecting;
-            base.Connect(addr);
-        }
-
-        #region Socks4 private methods.
-
-        /*
-                    +----+----+----+----+----+----+----+----+
-                    | VN | CD | DSTPORT |      DSTIP        |
-                    +----+----+----+----+----+----+----+----+
-     # of bytes:       1    1      2              4
-
-    VN is the version of the reply code and should be 0. CD is the result
-    code with one of the following values:
-
-        90: request granted
-        91: request rejected or failed
-        92: request rejected becasue SOCKS server cannot connect to
-            identd on the client
-        93: request rejected because the client program and identd
-            report different user-ids
-
-     */
-        private bool HandleRequestResponse(int ver, int reply)
-        {
-            if (ver != 0)
-            {
-                Debug.WriteLine("bogus version in reply from proxy: " + ver);
-                return false;
-            }
-            if (reply != 90)
-            {
-                Debug.WriteLine("request failed on proxy: " + reply);
-                return false;
-            }
-            Debug.WriteLine("proxy complete");
-            m_state = States.Running;
-            return true;
-        }
-
-        #endregion
-
-        #region Implementation of ISocketEventListener
-
-        /// <summary>
-        /// overridden OnConnect to start off Socks5 protocol.
-        /// </summary>
-        /// <param name="sock"></param>
-        public override void OnConnect(bedrock.net.BaseSocket sock)
-        {
-            if (m_state == States.Connecting)
-            {
-                IPHostEntry server = Dns.GetHostEntry(RemoteAddress.Hostname);
-                IPAddress ip_addr = server.AddressList[0];
-
-                byte[] addr = ip_addr.GetAddressBytes();
-
-                int port = RemoteAddress.Port;
-                byte [] buffer = new Byte[14];
-                buffer[0] = 4;  // protocol version.
-                buffer[1] = 1;  // connect.
-                buffer[2] = (byte)(port >> 8);
-                buffer[3] = (byte)port;
-                // TODO: test byte order!
-                buffer[4] = addr[3];
-                buffer[5] = addr[2];
-                buffer[6] = addr[1];
-                buffer[7] = addr[0];
-                buffer[8] = (byte)'i';
-                buffer[9] = (byte)'d';
-                buffer[10] = (byte)'e';
-                buffer[11] = (byte)'n';
-                buffer[12] = (byte)'t';
-                buffer[13] = 0;
-
-                /*
-                +----+----+----+----+----+----+----+----+----+----+....+----+
-                | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
-                +----+----+----+----+----+----+----+----+----+----+....+----+
-    # of bytes:    1    1      2              4           variable       1
-                */
-
-
-                Write(buffer);
-                RequestRead();
-                m_state = States.RequestingProxy;
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnRead to handle 4 Socks5 states...
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        /// <returns></returns>
-        public override bool OnRead(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            switch (m_state)
-            {
-                case States.RequestingProxy:
-                    bool ret = HandleRequestResponse(buf[offset], buf[offset + 1]);
-                    if (ret)
-                    {
-                        m_listener.OnConnect(sock); // tell the real listener that we're connected.
-                        // they'll call RequestRead(), so we can return false here.
-                    }
-                    return false;
-                default:
-                    return base.OnRead(sock, buf, offset, length);
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnWrite to ensure that the base only gets called when in running state.
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        public override void OnWrite(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            if (m_state == States.Running)
-            {
-                base.OnWrite(sock, buf, offset, length);
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/Socks5Proxy.cs b/lib/jabber-net/bedrock/net/Socks5Proxy.cs
deleted file mode 100644
index c085a2e..0000000
--- a/lib/jabber-net/bedrock/net/Socks5Proxy.cs
+++ /dev/null
@@ -1,265 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Text;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// Proxy object for sockets that want to do SOCKS proxying.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Socks5Proxy : ProxySocket
-    {
-        private enum States { None, Connecting, GettingMethods, WaitingForAuth, RequestingProxy, Running, Closed }
-        private States m_state = States.None;
-
-        /// <summary>
-        /// Wrap an existing socket event listener with a Socks5 proxy.  Make SURE to set Socket after this.
-        /// </summary>
-        /// <param name="chain">Event listener to pass events through to.</param>
-        public Socks5Proxy(ISocketEventListener chain) : base(chain)
-        {
-        }
-
-        /// <summary>
-        /// Saves the address passed in, and really connects to ProxyHost:ProxyPort to begin SOCKS5 handshake.
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(bedrock.net.Address addr)
-        {
-            m_state = States.Connecting;
-            base.Connect(addr);
-        }
-
-        #region Socks5 private methods.
-
-        /*
-         * The SOCKS request is formed as follows:
-         *
-         *      +----+-----+-------+------+----------+----------+
-         *      |VER | CMD |  RSV  | ATYP | DST.ADDR | DST.PORT |
-         *      +----+-----+-------+------+----------+----------+
-         *      | 1  |  1  | X'00' |  1   | Variable |    2     |
-         *      +----+-----+-------+------+----------+----------+
-         *
-         *   Where:
-         *
-         *        o  VER    protocol version: X'05'
-         *        o  CMD
-         *           o  CONNECT X'01'
-         *           o  BIND X'02'
-         *           o  UDP ASSOCIATE X'03'
-         *        o  RSV    RESERVED
-         *        o  ATYP   address type of following address
-         *           o  IP V4 address: X'01'
-         *           o  DOMAINNAME: X'03'
-         *           o  IP V6 address: X'04'
-         *        o  DST.ADDR    desired destination address
-         *        o  DST.PORT    desired destination port in network octet order
-         */
-        private void RequestProxyConnection()
-        {
-            m_state = States.RequestingProxy;
-
-            byte[] host = Encoding.ASCII.GetBytes(RemoteAddress.Hostname);
-            int n = host.Length;
-            byte [] buffer = new Byte[7 + n];
-            buffer[0] = 5; // protocol version.
-            buffer[1] = 1; // connect
-            buffer[2] = 0; // reserved.
-            buffer[3] = 3; // DOMAINNAME
-            buffer[4] = (byte)n;
-            host.CopyTo(buffer, 5);
-            buffer[5+n] = (byte)(RemoteAddress.Port >> 8);
-            buffer[6+n] = (byte)RemoteAddress.Port;
-            Debug.WriteLine("sending request to proxy to " + RemoteAddress);
-            Write(buffer);
-        }
-
-        private bool HandleGetMethodsResponse(int ver, int method)
-        {
-            if (ver != 5)
-            {
-                Debug.WriteLine("bogus version  from proxy: " + ver);
-                return false;
-            }
-            if (method == 0xff)
-            {
-                Debug.WriteLine("no valid method returned from proxy");
-                return false;
-            }
-
-            Debug.WriteLine("proxy accepted our connection: " + method);
-            switch (method)
-            {
-                case 2:
-                    /*
-                     * +----+------+----------+------+----------+
-                     * |VER | ULEN |  UNAME   | PLEN |  PASSWD  |
-                     * +----+------+----------+------+----------+
-                     * | 1  |  1   | 1 to 255 |  1   | 1 to 255 |
-                     * +----+------+----------+------+----------+
-                     */
-                    m_state = States.WaitingForAuth;
-                    byte [] buffer = new Byte[3 + Username.Length + Password.Length];
-                    buffer[0] = 1; // version of this subnegotiation.
-                    buffer[1] = (byte)Username.Length;
-                    Encoding.ASCII.GetBytes(Username, 0, Username.Length, buffer, 2);
-                    int pw_offset = 2 + Username.Length;
-                    buffer[pw_offset] = (byte)Password.Length;
-                    Encoding.ASCII.GetBytes(Password, 0, Password.Length, buffer, pw_offset + 1);
-                    Debug.WriteLine("sending plain auth to proxy");
-                    Write(buffer);
-                    return true;
-                case 0:
-                    RequestProxyConnection();
-                    return true;
-                default:
-                    Debug.WriteLine("bogus auth method: " + method);
-                    return false;
-            }
-        }
-
-        private bool HandleAuthResponse(int ver, int status)
-        {
-            if (ver != 1)
-            {
-                Debug.WriteLine("bogus subnegotiation version from proxy: " + ver);
-                return false;
-            }
-            if (status != 0)
-            {
-                Debug.WriteLine("username/password auth failed on proxy");
-                return false;
-            }
-
-            Debug.WriteLine("proxy accepted our auth handshake");
-            RequestProxyConnection();
-            return true;
-        }
-
-        /*
-         * +----+-----+-------+------+----------+----------+
-         * |VER | REP |  RSV  | ATYP | BND.ADDR | BND.PORT |
-         * +----+-----+-------+------+----------+----------+
-         * | 1  |  1  | X'00' |  1   | Variable |    2     |
-         * +----+-----+-------+------+----------+----------+
-         *
-         *     Where:
-         *
-         *           o  VER    protocol version: X'05'
-         *           o  REP    Reply field:
-         *              o  X'00' succeeded
-         *              o  X'01' general SOCKS server failure
-         *              o  X'02' connection not allowed by ruleset
-         *              o  X'03' Network unreachable
-         *              o  X'04' Host unreachable
-         *              o  X'05' Connection refused
-         *              o  X'06' TTL expired
-         *              o  X'07' Command not supported
-         *              o  X'08' Address type not supported
-         *              o  X'09' to X'FF' unassigned
-         */
-        private bool HandleRequestResponse(int ver, int reply)
-        {
-            if (ver != 5)
-            {
-                Debug.WriteLine("bogus version in reply from proxy: " + ver);
-                return false;
-            }
-            if (reply != 0)
-            {
-                Debug.WriteLine("request failed on proxy: " + reply);
-                return false;
-            }
-
-            Debug.WriteLine("proxy complete");
-            m_state = States.Running;
-            return true;
-        }
-
-        #endregion
-
-        #region Implementation of ISocketEventListener
-
-        /// <summary>
-        /// overridden OnConnect to start off Socks5 protocol.
-        /// </summary>
-        /// <param name="sock"></param>
-        public override void OnConnect(bedrock.net.BaseSocket sock)
-        {
-            if (m_state == States.Connecting)
-            {
-                byte [] buffer = new Byte[4];
-                buffer[0] = 5; // protocol version.
-                buffer[1] = 2; // number of methods.
-                buffer[2] = 0; // no auth.
-                buffer[3] = 2; // username password.
-                Debug.WriteLine("sending auth methods to proxy...");
-                Write(buffer);
-                RequestRead();
-                m_state = States.GettingMethods;
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnRead to handle 4 Socks5 states...
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        /// <returns></returns>
-        public override bool OnRead(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            switch (m_state)
-            {
-                case States.GettingMethods:
-                    return HandleGetMethodsResponse(buf[offset], buf[offset + 1]);
-                case States.WaitingForAuth:
-                    return HandleAuthResponse(buf[offset], buf[offset + 1]);
-                case States.RequestingProxy:
-                    bool ret = HandleRequestResponse(buf[offset], buf[offset + 1]);
-                    if (ret)
-                    {
-                        m_listener.OnConnect(sock); // tell the real listener that we're connected.
-                        // they'll call RequestRead(), so we can return false here.
-                    }
-                    return false;
-                default:
-                    return base.OnRead(sock, buf, offset, length);
-            }
-        }
-
-        /// <summary>
-        /// Overridden OnWrite to ensure that the base only gets called when in running state.
-        /// </summary>
-        /// <param name="sock"></param>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        public override void OnWrite(bedrock.net.BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            if (m_state == States.Running)
-            {
-                base.OnWrite(sock, buf, offset, length);
-            }
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/XEP124Socket.cs b/lib/jabber-net/bedrock/net/XEP124Socket.cs
deleted file mode 100644
index 4e5ee69..0000000
--- a/lib/jabber-net/bedrock/net/XEP124Socket.cs
+++ /dev/null
@@ -1,673 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Net;
-using System.Security.Cryptography;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using System.Threading;
-using System.Xml;
-using bedrock.util;
-
-using jabber.protocol.stream;
-using jabber.connection;
-using jabber.protocol;
-
-namespace bedrock.net
-{    
-    /// <summary>
-    /// XEP-0124 Error conditions
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XEP124Exception : WebException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="reason"></param>
-        public XEP124Exception(string reason)
-            : base(reason)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Make a XEP-124 (http://www.xmpp.org/extensions/xep-0124.html) polling "connection" look like a socket.
-    /// TODO: get rid of the PipeStream, if possible.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XEP124Socket : BaseSocket, IHttpSocket, IElementSocket, ISocketEventListener
-    {
-        /// <summary>
-        /// Text encoding.  Always UTF-8 for XMPP.
-        /// </summary>
-        protected static readonly Encoding ENC = Encoding.UTF8;
-
-        private const string CONTENT_TYPE = "text/xml; charset=utf-8";
-        private const string METHOD = "POST";
-
-        private readonly int m_hold = 1;
-        private int m_wait = 60;
-        private int m_maxPoll = 30;
-        private int m_minPoll = 1;
-        private Uri m_uri = null;
-        private bool m_running = false;
-        private long m_rid = -1L;
-        private string m_sid = null;
-        private string m_authID = null;
-        private X509Certificate m_remote_cert = null;
-        private bool m_StartStream = false;
-        private string m_NS;
-        private string m_lang = System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag;
-        private XmlDocument m_doc = new XmlDocument();
-
-        private Uri m_proxyURI = null;
-        private NetworkCredential m_proxyCredentials = null;
-
-        private Thread m_thread = null;
-        private LinkedList<XmlElement> m_queue = new LinkedList<XmlElement>();
-
-        private HttpSocket m_sockA = null;
-        private HttpSocket m_sockB = null;
-        private HttpSocket m_lastSock = null;
-
-        /// <summary>
-        /// Create an instance
-        /// </summary>
-        /// <param name="listener"></param>
-        public XEP124Socket(ISocketEventListener listener) : base(listener)
-        {
-        }
-
-        /// <summary>
-        /// The xml:lang for all requests.  Defaults to the current culture's language tag.
-        /// </summary>
-        public string Lang
-        {
-            get { return m_lang; }
-            set { m_lang = value; }
-        }
-
-        ///<summary>
-        /// Informs the socket that we are dealing with the start tag.
-        ///</summary>
-        public bool StartStream
-        {
-            get { return m_StartStream; }
-            set { m_StartStream = value; }
-        }
-
-        ///<summary>
-        /// Gets or sets the NS used by the stream:stream tag.
-        ///</summary>
-        public string NS
-        {
-            get { return m_NS; }
-            set { m_NS = value; }
-        }
-
-        /// <summary>
-        /// Maximum time between polls, in seconds
-        /// </summary>
-        public int MaxPoll
-        {
-            get { return m_maxPoll; }
-            set { m_maxPoll = value; }
-        }
-
-        /// <summary>
-        /// Minimum time between polls, in seconds
-        /// </summary>
-        public int MinPoll
-        {
-            get { return m_minPoll; }
-            set { m_minPoll = value; }
-        }
-
-        /// <summary>
-        /// The URL to poll
-        /// </summary>
-        public string URL
-        {
-            get { return m_uri.ToString(); }
-            set { m_uri = new Uri(value); }
-        }
-
-        /// <summary>
-        /// The URI of the HTTP proxy.  Note: HTTPS connections through a proxy are not yet supported.
-        /// </summary>
-        public Uri ProxyURI
-        {
-            get { return m_proxyURI; }
-            set { m_proxyURI = value; }
-        }
-
-        /// <summary>
-        /// Username/password for the proxy.
-        /// </summary>
-        public NetworkCredential ProxyCredentials
-        {
-            get { return m_proxyCredentials; }
-            set { m_proxyCredentials = value; }
-        }
-
-        /// <summary>
-        /// Accept a socket.  Not implemented.
-        /// </summary>
-        /// <param name="addr"></param>
-        /// <param name="backlog"></param>
-        public override void Accept(Address addr, int backlog)
-        {
-            throw new NotImplementedException("HTTP binding server not implemented");
-        }
-
-        private void Enqueue(XmlElement elem)
-        {
-            lock (m_queue)
-            {
-                m_queue.AddLast(elem);
-                Monitor.Pulse(m_queue);
-            }
-        }
-
-        // Must hold lock first.
-        private HttpSocket GetSocket()
-        {
-            // Debug.Assert(!BothPending);
-
-            // Switch to the other socket than the last one, assuming the other socket isn't pending.
-            // If the other socket is pending, use the last one.
-            HttpSocket other = (m_lastSock == m_sockA) ? m_sockB : m_sockA;
-            if (!other.IsPending)
-                m_lastSock = other;
-
-            Debug.WriteLine("Socket: " + m_lastSock.Name);
-            return m_lastSock;
-        }
-
-        private bool BothPending
-        {
-            get { return (m_sockA != null) && (m_sockB != null) && 
-                          m_sockA.IsPending && m_sockB.IsPending; }
-        }
-
-        private bool NeitherPending
-        {
-            get { return !m_sockA.IsPending && !m_sockB.IsPending; }
-        }
-
-        private bool BothConnected
-        {
-            get
-            {
-                return (m_sockA != null) && (m_sockB != null) &&
-                        m_sockA.Connected && m_sockB.Connected;
-            }
-        }
-
-        private void ProcessThread()
-        {
-            Body body = null;
-            int children = 0;
-
-            while (m_running)
-            {
-                lock (m_queue)
-                {
-                    //if (NeitherPending)
-                    //    m_queue.AddFirst((XmlElement)null);
-
-                    Debug.WriteLine("A: " + m_sockA.IsPending);
-                    Debug.WriteLine("b: " + m_sockB.IsPending);
-                    while ((m_queue.First == null) || BothPending)
-                    {
-                        Monitor.Wait(m_queue);
-                        if (!m_running)
-                            return;
-                    }
-
-                    // We'll enq nulls to get a poll.
-                    // We'll enq a body in order to terminate.
-
-                    Debug.Assert(m_queue.First != null);
-                    body = m_queue.First.Value as Body;
-                    children = 0;
-                    if (body != null)
-                        // TODO: what to do with leftover stanzas!?
-                        m_queue.RemoveFirst();
-                    else
-                    {
-                        body = CreateOpenBodyTag();
-                        while (m_queue.First != null)
-                        {
-                            XmlElement elem = m_queue.First.Value;
-                            // ignore nulls.  we're going munge together all pending poll requests.
-                            if (elem != null)
-                            {
-                                // if we get to a body in the queue, stop inserting, and wait for the body
-                                // to come around again next time.
-                                if (elem is Body)
-                                    break;
-                                body.AddChild(elem);
-                                children++;
-                            }
-                            m_queue.RemoveFirst();
-                        }
-                    }
-                }
-
-                if (NeitherPending || (children > 0) || (body.Type == BodyType.terminate))
-                {
-                    if (body.RID == -1)
-                        body.RID = Interlocked.Increment(ref m_rid);
-
-                    byte[] buf = ENC.GetBytes(body.OuterXml);
-                    GetSocket().Execute(METHOD, m_uri, buf, 0, buf.Length, CONTENT_TYPE);
-                }
-
-                if (body.Type == BodyType.terminate)
-                {
-                    // shutting down.
-                    m_sockA.EnqueueClose();
-                    m_sockB.EnqueueClose();
-                    return;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Stop polling.
-        /// </summary>
-        public override void Close()
-        {
-            Body body = CreateOpenBodyTag();
-            body.Type = BodyType.terminate;
-
-            Enqueue(body);
-            
-            if (m_thread != null)
-                m_thread.Join();
-
-            lock (m_queue)
-            {
-                m_running = false;
-                m_thread = null;
-                m_sockA = m_sockB = m_lastSock = null;
-            }
-            m_listener.OnClose(this);
-        }
-
-        /// <summary>
-        /// Start polling
-        /// </summary>
-        /// <param name="addr">Ignored in this case.  Set URL.</param>
-        public override void Connect(Address addr)
-        {
-            Debug.Assert(m_uri != null);
-
-            m_rid = -1L;
-            m_lastSock = null;
-            m_running = false;
-
-            // Create new ones each time, in case the URL has changed or something.
-            m_sockA = new HttpSocket(this);
-            m_sockB = new HttpSocket(this);
-
-            m_sockA.Name = "A";
-            m_sockB.Name = "B";
-
-            m_sockA.ProxyURI = m_sockB.ProxyURI = m_proxyURI;
-            m_sockA.ProxyCredentials = m_sockB.ProxyCredentials = m_proxyCredentials;
-
-            m_sockA.Connect(m_uri);
-            m_sockB.Connect(m_uri);
-        }
-
-        /// <summary>
-        /// Not implemented
-        /// </summary>
-        public override void RequestAccept()
-        {
-            throw new NotImplementedException();
-        }
-
-        /// <summary>
-        /// Start reading.
-        /// </summary>
-        public override void RequestRead()
-        {
-            // shutdown race, likely.
-            if (!m_running)
-                //throw new InvalidOperationException("Call Connect() first");
-                return;
-            if (m_sockA.IsPending || m_sockB.IsPending)
-            {
-                Debug.WriteLine("Skipping request, already pending");
-                return;
-            }
-
-            Enqueue(null);
-        }
-
-        /// <summary>
-        /// Start TLS over this connection.  Not implemented.
-        /// </summary>
-        public override void StartTLS()
-        {
-            throw new NotImplementedException();
-        }
-
-        /// <summary>
-        /// Start compression over this connection.  Not implemented.
-        /// </summary>
-        public override void StartCompression()
-        {
-            throw new NotImplementedException();
-        }
-
-        private void FakeTimer(object state)
-        {
-            // HACK: stream restart is null for older versions of XEP-124.
-            if (!FakeReceivedStream())
-                return;
-
-            Features f = new Features(m_doc);
-            f.AddChild(new Bind(m_doc));
-            f.AddChild(new Session(m_doc));
-            byte[] p = ENC.GetBytes(f.OuterXml);
-            if (!m_listener.OnRead(this, p, 0, p.Length))
-            {
-                Close();
-                return;
-            }
-        }
-
-        /// <summary>
-        /// Send bytes to the jabber server
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="len"></param>
-        public override void Write(byte[] buf, int offset, int len)
-        {
-            if (buf != null)
-                throw new NotImplementedException("Call Write(XmlElement)");
-
-            // HACK
-            byte[] p = ENC.GetBytes("Psuedo-stream body");
-            m_listener.OnWrite(this, p, 0, p.Length);
-            if (m_sid == null)
-            {
-                StartStream = true;
-                return;
-            }
-
-            // HACK: upper levels need this to come in after the
-            // return from write. Double-hack: hope this doesn't get
-            // gc's before the timer fires.... :)
-            
-            //Timer t =
-            new Timer(new TimerCallback(FakeTimer), null, 0, Timeout.Infinite);
-        }
-
-        /// <summary>
-        /// Write an XML element to the socket.
-        /// In this case, the element is queued, so that the write
-        /// thread can pick it up.
-        /// </summary>
-        /// <param name="elem"></param>
-        public void Write(XmlElement elem)
-        {
-            Enqueue(elem);
-        }
-
-        private Body CreateOpenBodyTag()
-        {
-            Body body = new Body(m_doc);
-
-            if (m_rid == -1L)
-            {
-                Random rnd = new Random();
-                long r = m_rid = (long)rnd.Next();
-                body.Content = CONTENT_TYPE;
-                
-                body.To = m_hostid;
-                body.Wait = m_wait;
-                body.Hold = m_hold;
-                body.Lang = m_lang;
-                body.RID = r;
-            }
-            else
-            {
-                body.SID = m_sid;
-            }
-            
-            return body;
-        }
-
-        /// <summary>
-        /// Descripton, including URL.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "XEP-0124 socket: " + m_uri.ToString();
-        }
-
-        /// <summary>
-        /// Are we connected?
-        /// </summary>
-        public override bool Connected
-        {
-            get
-            { return m_running; }
-        }
-
-        /// <summary>
-        /// The certificate from the server.
-        /// </summary>
-        public X509Certificate RemoteCertificate
-        {
-            get { return m_remote_cert; }
-            set { m_remote_cert = value; }
-        }
-
-        #region ISocketEventListener Members
-
-        void ISocketEventListener.OnInit(BaseSocket newSock)
-        {
-            m_listener.OnInit(newSock);
-        }
-
-        ISocketEventListener ISocketEventListener.GetListener(BaseSocket newSock)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        bool ISocketEventListener.OnAccept(BaseSocket newsocket)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        void ISocketEventListener.OnConnect(BaseSocket sock)
-        {
-            lock (m_queue)
-            {
-                if (!m_running &&
-                    (m_sockA != null) && m_sockA.Connected &&
-                    (m_sockB != null) && m_sockB.Connected)
-                {
-                    m_running = true;
-                    m_lastSock = m_sockB;
-
-                    m_thread = new Thread(ProcessThread);
-                    m_thread.IsBackground = true;
-                    m_thread.Name = "XEP 124 processing thread";
-                    m_thread.Start();
-
-                    m_listener.OnConnect(this);
-                }
-            }            
-        }
-
-        void ISocketEventListener.OnClose(BaseSocket sock)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        void ISocketEventListener.OnError(BaseSocket sock, Exception ex)
-        {
-            // shutdown race.
-            if (!m_running)
-                return;
-
-            m_listener.OnError(this, ex);
-        }
-
-        private bool FakeReceivedStream()
-        {
-            jabber.protocol.stream.Stream stream =
-                new jabber.protocol.stream.Stream(m_doc, NS);
-            stream.Version = "1.0";
-            stream.ID = m_authID;
-
-            byte[] sbuf = ENC.GetBytes(stream.StartTag());
-            if (!m_listener.OnRead(this, sbuf, 0, sbuf.Length))
-            {
-                Close();
-                return false;
-            }
-            return true;
-        }
-
-        bool ISocketEventListener.OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            if (!m_running)
-            {
-                Debug.WriteLine("shutting down.  extra bytes received.");
-                return false;
-            }
-
-            Debug.WriteLine("OnRead: " + ((HttpSocket)sock).Name);
-
-            // Parse out the first start tag or empty element, which will be
-            // <body/>.
-            xpnet.UTF8Encoding e = new xpnet.UTF8Encoding();
-            xpnet.ContentToken ct = new xpnet.ContentToken();
-            xpnet.TOK tok = e.tokenizeContent(buf, offset, offset + length, ct);
-
-            if ((tok != xpnet.TOK.START_TAG_WITH_ATTS) &&
-                (tok != xpnet.TOK.EMPTY_ELEMENT_WITH_ATTS))
-            {
-                m_listener.OnError(this, new ProtocolViolationException("Invalid HTTP binding XML.  Token type: " + tok.ToString()));
-                return false;
-            }
-
-            string name = ENC.GetString(buf,
-                                        offset + e.MinBytesPerChar,
-                                        ct.NameEnd - offset - e.MinBytesPerChar);
-            Debug.Assert(name == "body");
-            Body b = new Body(m_doc);
-            string val;
-            int start;
-            int end;
-            for (int i = 0; i < ct.getAttributeSpecifiedCount(); i++)
-            {
-                start = ct.getAttributeNameStart(i);
-                end = ct.getAttributeNameEnd(i);
-                name = ENC.GetString(buf, start, end - start);
-
-                start = ct.getAttributeValueStart(i);
-                end = ct.getAttributeValueEnd(i);
-                val = ENC.GetString(buf, start, end - start);
-
-                if (!name.StartsWith("xmlns"))
-                    b.SetAttribute(name, val);
-            }
-
-            if (b.SID != null)
-                m_sid = b.SID;
-
-            if (m_sid == null)
-            {
-                m_listener.OnError(this, new ProtocolViolationException("Invalid HTTP binding.  No SID."));
-                return false;
-            }
-
-            if (b.Wait != -1)
-                m_wait = b.Wait;
-
-            if (StartStream)
-            {
-                StartStream = false;
-                m_authID = b.AuthID;
-                if (!FakeReceivedStream())
-                    return false;
-            }
-
-            lock (m_queue)
-            {
-                if (!m_running)
-                    return false;
-
-                if (b.Type == BodyType.terminate)
-                {
-                    m_running = false;
-                    Error err = new Error(m_doc);
-                    err.AppendChild(m_doc.CreateElement(b.GetAttribute("condition"), URI.STREAM_ERROR));
-                    byte[] sbuf = ENC.GetBytes(err.OuterXml);
-                    m_listener.OnRead(this, sbuf, 0, sbuf.Length);
-                    sbuf = ENC.GetBytes("</stream:stream>");
-                    m_listener.OnRead(this, sbuf, 0, sbuf.Length);
-                    Close();
-                    return false;
-                }
-            }
-
-
-            if (tok == xpnet.TOK.START_TAG_WITH_ATTS)
-            {
-                // len(</body>) = 7
-                start = ct.TokenEnd;
-                if (m_listener.OnRead(this, buf, start, offset + length - start - 7))
-                    RequestRead();
-            }
-            else
-                RequestRead();
-
-            lock (m_queue)
-            {
-                Monitor.Pulse(m_queue);
-            }
-            return true;
-        }
-
-        void ISocketEventListener.OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            m_listener.OnWrite(this, buf, offset, length);
-        }
-
-        bool ISocketEventListener.OnInvalidCertificate(BaseSocket sock, X509Certificate certificate, X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return m_listener.OnInvalidCertificate(this, certificate, chain, sslPolicyErrors);
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/bedrock/net/XEP25Socket.cs b/lib/jabber-net/bedrock/net/XEP25Socket.cs
deleted file mode 100644
index b419372..0000000
--- a/lib/jabber-net/bedrock/net/XEP25Socket.cs
+++ /dev/null
@@ -1,518 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Collections;
-using System.Diagnostics;
-using System.IO;
-using System.Net;
-using System.Security.Cryptography;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using System.Threading;
-using bedrock.util;
-
-namespace bedrock.net
-{
-    /// <summary>
-    /// XEP25 Error conditions
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XEP25Exception : WebException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="reason"></param>
-        public XEP25Exception(string reason) : base(reason)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Make a XEP-25 (http://www.xmpp.org/extensions/xep-0025.html) polling "connection" look like a socket.
-    /// TODO: get rid of the PipeStream, if possible.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XEP25Socket : BaseSocket, IHttpSocket
-    {
-        private const string CONTENT_TYPE = "application/x-www-form-urlencoded";
-        private const string METHOD       = "POST";
-
-        private readonly RandomNumberGenerator s_rng = RNGCryptoServiceProvider.Create();
-
-        private readonly Queue      m_writeQ  = new Queue();
-        private readonly Object     m_lock    = new Object();
-        private Thread              m_thread  = null;
-        private int                 m_maxPoll = 30;
-        private int                 m_minPoll = 1;
-        private double              m_curPoll = 1.0;
-        private string              m_url     = null;
-        private string[]            m_keys    = null;
-        private int                 m_numKeys = 512;
-        private int                 m_curKey  = 511;
-        private bool                m_running = false;
-        private string              m_id      = null;
-        private WebProxy            m_proxy   = null;
-        private X509Certificate     m_cert = null;
-        private X509Certificate     m_remote_cert = null;
-
-        /// <summary>
-        /// Do trust all server sertificates?
-        /// </summary>
-        public static bool UntrustedRootOK = false;
-
-        /// <summary>
-        /// Create an instance
-        /// </summary>
-        /// <param name="listener"></param>
-        public XEP25Socket(ISocketEventListener listener)
-        {
-            Debug.Assert(listener != null);
-            m_listener = listener;
-        }
-
-        /// <summary>
-        /// Maximum time between polls, in seconds
-        /// </summary>
-        public int MaxPoll
-        {
-            get { return m_maxPoll; }
-            set { m_maxPoll = value; }
-        }
-
-        /// <summary>
-        /// Minimum time between polls, in seconds
-        /// </summary>
-        public int MinPoll
-        {
-            get { return m_minPoll; }
-            set { m_minPoll = value; }
-        }
-
-        /// <summary>
-        /// The URL to poll
-        /// </summary>
-        public string URL
-        {
-            get { return m_url; }
-            set { m_url = value; }
-        }
-
-
-        /// <summary>
-        /// The number of keys to generate at a time.  Higher numbers use more memory,
-        /// and more CPU to generate keys, less often.  Defaults to 512.
-        /// </summary>
-        public int NumKeys
-        {
-            get { return m_numKeys; }
-            set { m_numKeys = value; }
-        }
-
-        /// <summary>
-        /// Proxy information.  My guess is if you leave this null, the IE proxy
-        /// info may be used.  Not tested.
-        /// </summary>
-        public WebProxy Proxy
-        {
-            get { return m_proxy; }
-            set { m_proxy = value; }
-        }
-
-        /// <summary>
-        /// The local certificate of the socket.
-        /// </summary>
-        public X509Certificate LocalCertificate
-        {
-            get { return m_cert; }
-            set { m_cert = value; }
-        }
-
-        /// <summary>
-        /// The remote certificate.
-        /// </summary>
-        public X509Certificate RemoteCertificate
-        {
-            get { return m_remote_cert; }
-            set { m_remote_cert = value; }
-        }
-
-        /// <summary>
-        /// Accept a socket.  Not implemented.
-        /// </summary>
-        /// <param name="addr"></param>
-        /// <param name="backlog"></param>
-        public override void Accept(Address addr, int backlog)
-        {
-            throw new NotImplementedException("HTTP polling server not implemented yet");
-        }
-
-        /// <summary>
-        /// Stop polling.
-        /// </summary>
-        public override void Close()
-        {
-            lock (m_lock)
-            {
-                m_running = false;
-                Monitor.Pulse(m_lock);
-            }
-            m_listener.OnClose(this);
-        }
-
-
-
-        /// <summary>
-        /// Start polling
-        /// </summary>
-        /// <param name="addr"></param>
-        public override void Connect(Address addr)
-        {
-            Debug.Assert(m_url != null);
-            m_running = true;
-            m_curKey = -1;
-
-            if (m_thread == null)
-            {
-                m_thread = new Thread(PollThread);
-                m_thread.IsBackground = true;
-                m_thread.Start();
-            }
-
-            m_listener.OnConnect(this);
-        }
-
-        /// <summary>
-        /// Not implemented
-        /// </summary>
-        public override void RequestAccept()
-        {
-            throw new NotImplementedException();
-        }
-
-        /// <summary>
-        /// Start reading.
-        /// </summary>
-        public override void RequestRead()
-        {
-            if (!m_running)
-                throw new InvalidOperationException("Call Connect() first");
-        }
-
-#if !NO_SSL
-
-        /// <summary>
-        /// Start TLS over this connection.  Not implemented.
-        /// </summary>
-        public override void StartTLS()
-        {
-            throw new NotImplementedException();
-        }
-#endif
-
-        /// <summary>
-        /// Start TLS over this connection.  Not implemented.
-        /// </summary>
-        public override void StartCompression()
-        {
-            throw new NotImplementedException();
-        }
-
-        /// <summary>
-        /// Send bytes to the jabber server
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="len"></param>
-        public override void Write(byte[] buf, int offset, int len)
-        {
-            if (!m_running)
-                throw new InvalidOperationException("Call Connect() first");
-
-            lock (m_lock)
-            {
-                //if (m_thread == null)
-                //{
-                //    // first write
-                //    m_thread = new Thread(new ThreadStart(PollThread));
-                //    m_thread.IsBackground = true;
-                //    m_thread.Start();
-                //}
-                m_writeQ.Enqueue(new WriteBuf(buf, offset, len));
-                Monitor.Pulse(m_lock);
-            }
-        }
-
-        private void GenKeys()
-        {
-            byte[] seed = new byte[32];
-            SHA1 sha = SHA1.Create();
-            Encoding ENC = Encoding.ASCII; // All US-ASCII.  No need for UTF8.
-            string prev;
-
-            // K(n, seed) = Base64Encode(SHA1(K(n - 1, seed))), for n > 0
-            // K(0, seed) = seed, which is client-determined
-
-            s_rng.GetBytes(seed);
-            prev = Convert.ToBase64String(seed);
-            m_keys = new string[m_numKeys];
-            for (int i=0; i<m_numKeys; i++)
-            {
-                m_keys[i] = Convert.ToBase64String(sha.ComputeHash(ENC.GetBytes(prev)));
-                prev = m_keys[i];
-            }
-            m_curKey = m_numKeys - 1;
-        }
-
-        private static bool ValidateRemoteCertificate(Object sender,
-                                               X509Certificate certificate,
-                                               X509Chain chain,
-                                               System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return UntrustedRootOK;
-        }
-
-        /// <summary>
-        /// Keep polling until
-        /// </summary>
-        private void PollThread()
-        {
-            m_curPoll = m_minPoll;
-            m_id = null;
-
-            MemoryStream ms = new MemoryStream();
-            CookieContainer cookies = new CookieContainer(5);
-            byte[] readbuf = new byte[1024];
-
-            Stream rs;
-            byte[] buf;
-            HttpWebResponse resp;
-            HttpWebRequest req;
-            Stream s;
-            WriteBuf start;
-
-            while (m_running)
-            {
-                lock (m_lock)
-                {
-                    if (m_writeQ.Count == 0)
-                    {
-                        Monitor.Wait(m_lock, (int)(m_curPoll * 1000.0));
-                    }
-                }
-                // did we get closed?
-                if (!m_running)
-                    break;
-
-
-                if (m_id == null)
-                {
-                    GenKeys();
-                    start = new WriteBuf(string.Format("0;{0},", m_keys[m_curKey]));
-                }
-                else
-                {
-                    if (m_curKey == 0)
-                    {
-                        string k = m_keys[0];
-                        GenKeys();
-                        start = new WriteBuf(string.Format("{0};{1};{2},", m_id, k, m_keys[m_curKey]));
-                    }
-                    else
-                    {
-                        start = new WriteBuf(string.Format("{0};{1},", m_id, m_keys[m_curKey]));
-                    }
-                }
-                m_curKey--;
-
-                ms.SetLength(0);
-                int count = start.len;
-                while (m_writeQ.Count > 0)
-                {
-                    WriteBuf b = (WriteBuf) m_writeQ.Dequeue();
-                    count += b.len;
-                    ms.Write(b.buf, b.offset, b.len);
-                }
-
-            POLL:
-                req = (HttpWebRequest)WebRequest.Create(m_url);
-                req.CookieContainer = cookies;
-                req.ContentType     = CONTENT_TYPE;
-                req.Method          = METHOD;
-
-                if (m_cert != null)
-                    req.ClientCertificates.Add(m_cert);
-
-                req.KeepAlive       = false;
-
-                req.CachePolicy = new System.Net.Cache.HttpRequestCachePolicy(System.Net.Cache.HttpRequestCacheLevel.NoCacheNoStore);
-                req.CachePolicy = new System.Net.Cache.HttpRequestCachePolicy(System.Net.Cache.HttpRequestCacheLevel.NoCacheNoStore);
-
-                if (m_proxy != null)
-                    req.Proxy = m_proxy;
-                req.ContentLength = count;
-
-
-                try
-                {
-                    ServicePointManager.ServerCertificateValidationCallback =
-                        ValidateRemoteCertificate;
-
-                    s = req.GetRequestStream();
-                    s.Write(start.buf, start.offset, start.len);
-
-                    m_remote_cert = req.ServicePoint.Certificate;
-
-                    buf = ms.ToArray();
-                    s.Write(buf, 0, buf.Length);
-                    s.Close();
-
-                    resp = (HttpWebResponse) req.GetResponse();
-                }
-                catch (WebException ex)
-                {
-                    if (ex.Status != WebExceptionStatus.KeepAliveFailure)
-                    {
-                        m_listener.OnError(this, ex);
-                        return;
-                    }
-                    goto POLL;
-                }
-
-
-
-                if (resp.StatusCode != HttpStatusCode.OK)
-                {
-                    m_listener.OnError(this, new WebException("Invalid HTTP return code: " + resp.StatusCode));
-                    return;
-                }
-
-                CookieCollection cc = resp.Cookies;
-                Debug.Assert(cc != null);
-
-                Cookie c = cc["ID"];
-                if ((c == null) || (c.Value == null))
-                {
-                    m_listener.OnError(this, new WebException("No ID cookie returned"));
-                    return;
-                }
-
-                if (m_id == null)
-                {
-                    // if ID ends in :0, it's an error
-                    if (!c.Value.EndsWith(":0"))
-                        m_id = c.Value;
-                }
-
-                if (m_id != c.Value)
-                {
-                    switch (c.Value)
-                    {
-                        case "0:0":
-                            m_listener.OnError(this, new XEP25Exception("Unknown XEP25 error"));
-                            return;
-                        case "-1:0":
-                            m_listener.OnError(this, new XEP25Exception("Server error"));
-                            return;
-                        case "-2:0":
-                            m_listener.OnError(this, new XEP25Exception("Bad request"));
-                            return;
-                        case "-3:0":
-                            m_listener.OnError(this, new XEP25Exception("Key sequence error"));
-                            return;
-                        default:
-                            m_listener.OnError(this, new WebException("ID cookie changed"));
-                            return;
-                    }
-                }
-
-                if (ms.Length > 0)
-                {
-                    m_listener.OnWrite(this, buf, 0, buf.Length);
-                }
-
-                ms.SetLength(0);
-                rs = resp.GetResponseStream();
-
-
-                int readlen;
-                while ((readlen = rs.Read(readbuf, 0, readbuf.Length)) > 0)
-                {
-                    ms.Write(readbuf, 0, readlen);
-                }
-                rs.Close();
-                if (ms.Length > 0)
-                {
-                    buf = ms.ToArray();
-
-                    try
-                    {
-                        if (!m_listener.OnRead(this, buf, 0, buf.Length))
-                        {
-                            Close();
-                            return;
-                        }
-                    } catch (NullReferenceException)
-                    {}
-                    m_curPoll = m_minPoll;
-                }
-                else
-                {
-                    m_curPoll *= 1.25;
-                    if (m_curPoll > m_maxPoll)
-                        m_curPoll = m_maxPoll;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Is socket connected.
-        /// </summary>
-        public override bool Connected
-        {
-            get
-            { return m_running; }
-        }
-
-        /// <summary>
-        /// Descripton, including poll URL.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "XEP-0025 Polling socket: " + m_url;
-        }
-
-        private class WriteBuf
-        {
-            public readonly byte[] buf;
-            public readonly int offset;
-            public readonly int len;
-
-            public WriteBuf(byte[] buf, int offset, int len)
-            {
-                this.buf = buf;
-                this.offset = offset;
-                this.len = len;
-            }
-
-            public WriteBuf(string b)
-            {
-                buf = Encoding.UTF8.GetBytes(b);
-                offset = 0;
-                len = buf.Length;
-            }
-        }
-    }}
diff --git a/lib/jabber-net/bedrock/util/ConfigFile.cs b/lib/jabber-net/bedrock/util/ConfigFile.cs
deleted file mode 100644
index a9df359..0000000
--- a/lib/jabber-net/bedrock/util/ConfigFile.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using System.IO;
-using System.Diagnostics;
-using System.Collections;
-using bedrock.util;
-namespace bedrock.util
-{
-    /// <summary>
-    /// XML configuration file manager.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ConfigFile
-    {
-        private string m_file;
-        private XmlDocument m_doc;
-        private static Hashtable s_instances = new Hashtable();
-        private FileSystemWatcher m_watcher;
-
-        /// <summary>
-        /// Singleton factory
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns></returns>
-        public static ConfigFile GetInstance(string name)
-        {
-            ConfigFile inst = (ConfigFile) s_instances[name];
-            if (inst == null)
-            {
-                lock (s_instances.SyncRoot)
-                {
-                    if (inst == null)
-                    {
-                        inst = new ConfigFile(name);
-                        s_instances[name] = inst;
-                    }
-                }
-            }
-            return inst;
-        }
-
-        /// <summary>
-        /// The config file has been modified, and reloaded.
-        /// </summary>
-        public event FileSystemEventHandler OnFileChange;
-
-        private ConfigFile(string name)
-        {
-            // Don't call Tracer from here!
-            m_doc = new XmlDocument();
-            string d = Path.GetDirectoryName(System.Environment.GetCommandLineArgs()[0]);
-            DirectoryInfo p;
-            while (d != null)
-            {
-                FileInfo fi = new FileInfo(Path.Combine(d, name));
-                if (fi.Exists)
-                {
-                    Load(fi);
-                    return;
-                }
-                p = fi.Directory.Parent;
-                if (p == null)
-                    break;
-                d = p.FullName;
-            }
-
-            throw new FileNotFoundException(name);
-        }
-
-        private void Load(FileInfo info)
-        {
-            m_file = info.FullName;
-            m_doc.Load(m_file);
-            m_watcher = new FileSystemWatcher(info.DirectoryName, info.Name);
-            m_watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.CreationTime;
-            m_watcher.Changed += new FileSystemEventHandler(m_watcher_Changed);
-            m_watcher.EnableRaisingEvents = true;
-        }
-
-        private void m_watcher_Changed(object sender, FileSystemEventArgs e)
-        {
-            m_doc = new XmlDocument();
-            m_doc.Load(m_file);
-            if (OnFileChange != null)
-                OnFileChange(this, e);
-        }
-
-        /// <summary>
-        /// The full path of the filename being used.
-        /// </summary>
-        public string Filename
-        {
-            get { return m_file; }
-        }
-
-        /// <summary>
-        /// Get the configuration file XML node associated
-        /// with a given XPath query.
-        /// </summary>
-        /// <param name="xpath"></param>
-        /// <returns></returns>
-        public XmlNode GetNode(string xpath)
-        {
-            return m_doc.SelectSingleNode(xpath);
-            //ConfigFile f;
-        }
-        /// <summary>
-        /// Get the configuration file XML nodes associated with a give XPath query
-        /// </summary>
-        /// <param name="xpath"></param>
-        /// <returns></returns>
-        public XmlNodeList GetNodes(string xpath)
-        {
-            return m_doc.SelectNodes(xpath);
-        }
-        /// <summary>
-        /// Get the configuration file string associated
-        /// with a given XPath query, or null if not found.
-        /// </summary>
-        public string this[string xpath]
-        {
-            get
-            {
-                return this[xpath, null];
-            }
-        }
-        /// <summary>
-        /// Get the configuration file string associated
-        /// with a given XPath query, or defaultValue if not found.
-        /// </summary>
-        public string this[string xpath, string defaultValue]
-        {
-            get
-            {
-                string val;
-                XmlNode n = m_doc.SelectSingleNode(xpath);
-                if (n != null)
-                {
-                    val = n.InnerText;
-                }
-                else
-                {
-                    val = defaultValue;
-                }
-                return val;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/util/GetOptBase.cs b/lib/jabber-net/bedrock/util/GetOptBase.cs
deleted file mode 100644
index 242e45a..0000000
--- a/lib/jabber-net/bedrock/util/GetOptBase.cs
+++ /dev/null
@@ -1,553 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-namespace bedrock.util
-
-{
-    using System;
-    using System.Collections;
-    using System.Diagnostics;
-    using System.Reflection;
-    using System.Text;
-    using System.Text.RegularExpressions;
-
-    /// <summary>
-    /// GetOpt should be subclassed to create a class that handles
-    /// command-line parameters.  The subclass should use fields or properties
-    /// that have the CommandLine attribute set on them.  Fields and properties
-    /// of type bool will be toggle flags, other types will take a value as
-    /// either the next command-line parameter or following a colon.
-    /// Also, now, you can create an instance of GetOpt, and pass in
-    /// TODO: Give examples of sublcass and calling example.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class GetOpt
-    {
-        private object    m_obj   = null;
-        private string[]  m_args  = null;
-        private Hashtable m_flags =
-            new Hashtable(StringComparer.InvariantCultureIgnoreCase);
-
-        // Regular expression to parse these:
-        // /a
-        // /a:foo
-        // -a
-        // -a:foo
-        private static readonly Regex FLAG_REGEX =
-            new Regex("[/-]([a-z0-9_]+)([:=](.*))?", RegexOptions.IgnoreCase);
-        /// <summary>
-        /// Really only useful for subclasses, I think.
-        /// </summary>
-        public GetOpt()
-        {
-            // Debug.Assert(this.GetType() != typeof(GetOpt));
-            m_obj = this;
-        }
-        /// <summary>
-        /// Get ready to process command line parameters for the given target object.
-        /// </summary>
-        /// <param name="target">Object to set parameters on</param>
-        public GetOpt(object target)
-        {
-            m_obj = (target == null) ? this : target;
-        }
-        /// <summary>
-        /// Process command line parameters for the given target object, with the
-        /// given arguments.
-        /// </summary>
-        /// <param name="target">Object to set parameters on</param>
-        /// <param name="args">An array of arguments.  If null, use the environment's command line.</param>
-        public GetOpt(object target, string[] args) : this(target)
-        {
-            Process(args);
-        }
-        /// <summary>
-        /// Subclass interface, processing immediately.
-        /// </summary>
-        /// <param name="args">An array of arguments.  If null, use the environment's command line.</param>
-        public GetOpt(string[] args) : this(null, args)
-        {
-        }
-        /// <summary>
-        /// Process the given command line parameters.
-        /// </summary>
-        /// <param name="args">An array of arguments.  If null, use the environment's command line.</param>
-        public void Process(string[] args)
-        {
-            int        i;
-            MemberInfo mi;
-            Match      rm;
-            Type       mit;
-
-            SetFlags();
-            if (args == null)
-            {
-                string[] e = Environment.GetCommandLineArgs();
-                args = new string[e.Length - 1];
-                Array.Copy(e, 1, args, 0, e.Length-1);
-            }
-
-            for (i=0; i<args.Length; i++)
-            {
-                rm = FLAG_REGEX.Match(args[i]);
-                if (!rm.Success)   // no more flags
-                {
-                    break;
-                }
-
-                mi = (MemberInfo) m_flags[rm.Groups[1].ToString()];
-                if (mi == null)
-                {
-                    throw new ArgumentException("Invalid command-line argument", args[i]);
-                }
-
-                mit = GetMemberType(mi);
-                // methods return null types, for now.
-                // TODO: should this be moved to SetValue?
-                // Not sure what to do with bool params, then.
-                if (mit == null)
-                {
-                    string old_flag = args[i];
-                    MethodInfo meth = (MethodInfo) mi;
-                    ParameterInfo[] pi = meth.GetParameters();
-                    object[] parms = new object[pi.Length];
-                    for (int j=0; j<pi.Length; j++)
-                    {
-                        if (i+1 >= args.Length)
-                        {
-                            throw new IndexOutOfRangeException("Not enough parameters for: " + old_flag);
-                        }
-                        parms[j] = ConvertValue(args[++i], pi[j].ParameterType);
-                    }
-
-                    meth.Invoke(m_obj, parms);
-                }
-
-                // bool flags act as toggles
-                else if (mit == typeof(bool))
-                {
-                    SetValue(mi, ! (bool) GetValue(mi));
-                }
-                else
-                {
-                    // use the value after the colon, if it exists
-                    if (rm.Groups[3].Success)
-                    {
-                        SetValue(mi, rm.Groups[3].ToString());
-                    }
-                    else
-                    {
-                        if (i+1 >= args.Length)
-                        {
-                            throw new IndexOutOfRangeException("Not enough parameters for: " + args[i]);
-                        }
-                        SetValue(mi, args[++i]);
-                    }
-                }
-            }
-            // copy the rest of the argument array (those after the flags)
-            // into an array for later use.
-            m_args = new string[args.Length - i];
-            Array.Copy(args, i, m_args, 0, args.Length - i);
-            CheckRequired();
-        }
-        /// <summary>
-        /// Look at myself, to see if there are any command line
-        /// parameter fields or properties.
-        /// </summary>
-        private void SetFlags()
-        {
-            if (m_flags.Count != 0)
-                return;
-            MemberInfo[] mis = GetCommandLineMembers();
-            foreach (MemberInfo mi in mis)
-            {
-                CommandLineAttribute cla = GetOption(mi);
-                string cf = cla.CommandFlag;
-                // If no CommandFlag specified, use the member name.
-                if (cf == null)
-                {
-                    cf = mi.Name;
-                }
-                // make sure required parameters are initialized to null.
-                if (cla.Required && (GetValue(mi) != null))
-                {
-                    throw new ArgumentException("Must provide null initial value for required parameters: ", mi.Name);
-                }
-                m_flags[cf] = mi;
-            }
-        }
-        /// <summary>
-        /// Make sure all required fields got hit.
-        /// </summary>
-        private void CheckRequired()
-        {
-            MemberInfo[] mis = GetCommandLineMembers();
-            foreach (MemberInfo mi in mis)
-            {
-                CommandLineAttribute cla = GetOption(mi);
-                if (cla.Required && (GetValue(mi) == null))
-                {
-                    throw new ArgumentException("Did not provide required parameter: ", mi.Name);
-                }
-            }
-        }
-        /// <summary>
-        /// Set the value of a field or property, depending on the kind of member.
-        /// Coerce the type of the value passed in, as possible
-        /// </summary>
-        /// <param name="mi">The member to set</param>
-        /// <param name="val">The value to set</param>
-        private void SetValue(MemberInfo mi, object val)
-        {
-            switch (mi.MemberType)
-            {
-            case MemberTypes.Field:
-                FieldInfo fi = (FieldInfo) mi;
-                fi.SetValue(m_obj, ConvertValue(val, fi.FieldType));
-                break;
-            case MemberTypes.Property:
-                PropertyInfo pi = (PropertyInfo) mi;
-                pi.SetValue(m_obj, ConvertValue(val, pi.PropertyType), null);
-                break;
-            default:
-                throw new ArgumentException("Invalid member type", "mi");
-            }
-        }
-        /// <summary>
-        /// Convert a field value representation to a value of the correct type.
-        /// Enums need special handling, at least for now.
-        /// </summary>
-        /// <param name="val">The value to convert</param>
-        /// <param name="TargetType">The type to convert it to</param>
-        private object ConvertValue(object val, Type TargetType)
-        {
-            if (TargetType.IsEnum)
-            {
-                return Enum.Parse(TargetType, (string) val, true);
-            }
-            return Convert.ChangeType(val, TargetType);
-        }
-        /// <summary>
-        /// Get the value from a field or property, depending on the type of member.
-        /// </summary>
-        /// <param name="mi"> </param>
-        private object GetValue(MemberInfo mi)
-        {
-            object ret = null;
-            switch (mi.MemberType)
-            {
-            case MemberTypes.Field:
-                FieldInfo fi = (FieldInfo) mi;
-                ret = fi.GetValue(m_obj);
-                break;
-            case MemberTypes.Property:
-                PropertyInfo pi = (PropertyInfo) mi;
-                ret = pi.GetValue(m_obj, null);
-                break;
-            default:
-                throw new ArgumentException("Invalid member type", "mi");
-            }
-            return ret;
-        }
-        /// <summary>
-        /// Get the type contained in the given member.
-        /// </summary>
-        /// <param name="mi">The member to check</param>
-        private static Type GetMemberType(MemberInfo mi)
-        {
-            Type ret = null;
-            switch (mi.MemberType)
-            {
-            case MemberTypes.Field:
-                FieldInfo fi = (FieldInfo) mi;
-                ret = fi.FieldType;
-                break;
-            case MemberTypes.Property:
-                PropertyInfo pi = (PropertyInfo) mi;
-                ret = pi.PropertyType;
-                break;
-            case MemberTypes.Method:
-                ret = null;
-                break;
-            default:
-                throw new ArgumentException("Invalid member type", "mi");
-            }
-            return ret;
-        }
-        /// <summary>
-        /// Get all of the members that are tagged with the CommandLineAttribute.
-        /// NOTE: this currently returns private members as well, but setting the
-        /// BindingFlags to public doesn't return anything.  Could be a bug in the BCL?
-        /// </summary>
-        private MemberInfo[] GetCommandLineMembers()
-        {
-            Type t = m_obj.GetType();
-            MemberInfo[] mis = t.FindMembers(MemberTypes.All,
-                                             BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance,
-                                             new MemberFilter(AttrMemberFilter),
-                                             typeof(CommandLineAttribute));
-            Debug.Assert(mis.Length > 0, "Must have at least one CommandLine attribute on class: " + t.FullName);
-            return mis;
-        }
-
-        /// <summary>
-        /// Filter proc for GetCommandLineMembers.  Returns true if the member
-        /// implements a given attribute.
-        /// </summary>
-        /// <param name="m">The member to evaluate</param>
-        /// <param name="filterCriteria">The attribute type to check for</param>
-        private static bool AttrMemberFilter(MemberInfo m, object filterCriteria)
-        {
-            return m.GetCustomAttributes((Type)filterCriteria, true).Length > 0;
-        }
-        /// <summary>
-        /// Get the CommandLineAttribute off of a member.  Assumes that the member implements
-        ///<i>exactly</i> one instance of the attribute.
-        /// </summary>
-        /// <param name="mi">The member to retrieve from</param>
-        private CommandLineAttribute GetOption(MemberInfo mi)
-        {
-            object[] o = mi.GetCustomAttributes(typeof(CommandLineAttribute), true);
-            Debug.Assert(o.Length == 1);
-            return ((CommandLineAttribute[]) o)[0];
-        }
-        /// <summary>
-        /// The list of command-line arguments that were not associated with flags.
-        /// </summary>
-        public virtual string[] Args
-        {
-            get { return m_args; }
-        }
-        /// <summary>
-        /// Get/Set a parameter on the managed object, using the flag.
-        /// Warning: this will do an implicit conversion to the type of the
-        /// field associated with the flag.
-        /// If you're using this, you've probably got a design problem.
-        /// </summary>
-        public object this[string flag]
-        {
-            get
-            {
-                SetFlags();
-                MemberInfo mi = (MemberInfo) m_flags[flag];
-                return GetValue(mi);
-            }
-            set
-            {
-                SetFlags();
-                MemberInfo mi = (MemberInfo) m_flags[flag];
-                SetValue(mi, value);
-            }
-        }
-        /// <summary>
-        /// Get a usage description string from the object.
-        /// Use the CommandLineAttribute descriptions wherever possible.
-        /// </summary>
-        public virtual string Usage
-        {
-            get
-            {
-                SetFlags();
-                StringBuilder sb = new StringBuilder();
-                // Gr.  this used to work, and I can't find the new API.
-                //sb.Append(System.IO.File.GetFileNameFromPath(Environment.GetCommandLineArgs()[0]));
-                sb.Append(Environment.GetCommandLineArgs()[0]);
-                string[] keys = new string[m_flags.Count];
-                m_flags.Keys.CopyTo(keys, 0);
-                Array.Sort(keys);
-                foreach (object key in keys)
-                {
-                    MemberInfo mi = (MemberInfo) m_flags[key];
-                    CommandLineAttribute cla = GetOption(mi);
-                    Type       mit = GetMemberType(mi);
-                    sb.Append(" ");
-                    if (!cla.Required)
-                    {
-                        sb.Append("[");
-                    }
-
-                    // method
-                    if (mit == null)
-                    {
-                        MethodInfo meth = (MethodInfo) mi;
-                        ParameterInfo[] pis = meth.GetParameters();
-                        sb.AppendFormat("/{0}", key);
-                        foreach (ParameterInfo pi in pis)
-                        {
-                            sb.Append(" ");
-                            sb.Append(pi.ParameterType.Name);
-                        }
-                    }
-                    else if (mit == typeof(bool))
-                    {
-                        sb.AppendFormat("/{0}", key);
-                    }
-                    else if (mit.IsEnum)
-                    {
-                        sb.AppendFormat("/{0} (", key);
-                        string val = GetValue(mi).ToString();
-                        string[] names = Enum.GetNames(mit);
-                        bool first = true;
-                        foreach (string n in names)
-                        {
-                            if (first)
-                            {
-                                first = false;
-                            }
-                            else
-                            {
-                                sb.Append("|");
-                            }
-                            if (val == n)
-                            {
-                                sb.AppendFormat("*{0}*", n);
-                            }
-                            else
-                            {
-                                sb.Append(n);
-                            }
-                        }
-                        sb.Append(")");
-                    }
-                    else
-                    {
-                        sb.AppendFormat("/{0} {1}", key, GetValue(mi));
-                    }
-                    if (!cla.Required)
-                    {
-                        sb.Append("]");
-                    }
-                }
-                sb.Append(Environment.NewLine);
-                foreach (object key in keys)
-                {
-                    sb.AppendFormat("\t/{0}: \t{1}", key, GetOption((MemberInfo)m_flags[key]).Description);
-                    sb.Append(Environment.NewLine);
-                }
-                return sb.ToString();
-            }
-        }
-        /// <summary>
-        /// Print out the usage information on StdErr, and exit with code 64.
-        /// </summary>
-        public virtual void UsageExit()
-        {
-            Console.Error.WriteLine(Usage);
-            Environment.Exit(64);
-        }
-
-        /// <summary>
-        /// Echo Command-Line requirements for a GUI app via a MessageBox
-        /// (since we do not have user-visible stdout)
-        /// </summary>
-        public virtual void UsageGUIExit()
-        {
-            /*
-          MessageBox.Show
-            (Usage, "Command-line argument usage",
-             MessageBoxButtons.OK, MessageBoxIcon.Error);
-          Environment.Exit(64);
-             */
-            throw new NotImplementedException("This is the only thing that requires Windows.Forms.  Removed.");
-        }
-    }
-    /// <summary>
-    /// Attribute to annotate subclasses of GetOpt.  Any field or property
-    /// that gets this attribute is a possible command-line argument for the
-    /// program containing the GetOpt subclass.
-    /// </summary>
-    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method,
-                    AllowMultiple=false)]
-    [SVN(@"$Id$")]
-    public class CommandLineAttribute : Attribute
-    {
-        private string m_commandFlag = null;
-        private string m_description = null;
-        private bool   m_required    = false;
-        /// <summary>
-        /// Use the member name for the command-line parameter.
-        /// </summary>
-        public CommandLineAttribute()
-        {
-        }
-        /// <summary>
-        /// Use the given string as the command-line parameter.
-        /// </summary>
-        /// <param name="commandFlag"> </param>
-        public CommandLineAttribute(string commandFlag)
-        {
-            m_commandFlag = commandFlag;
-        }
-        /// <summary>
-        /// Use the given string as the command-line parameter.
-        /// </summary>
-        /// <param name="commandFlag"> </param>
-        /// <param name="description"> </param>
-        public CommandLineAttribute(string commandFlag, string description)
-        {
-            m_commandFlag = commandFlag;
-            m_description = description;
-        }
-        /// <summary>
-        /// Use the given string as the command-line parameter.
-        /// </summary>
-        /// <param name="commandFlag"> </param>
-        /// <param name="description"> </param>
-        /// <param name="required"> </param>
-        public CommandLineAttribute(string commandFlag, string description, bool required)
-        {
-            m_commandFlag = commandFlag;
-            m_description = description;
-            m_required    = required;
-        }
-        /// <summary>
-        /// Get the command-line flag.  If none was specified, returns null.
-        /// </summary>
-        public string CommandFlag
-        {
-            get
-            {
-                return m_commandFlag;
-            }
-        }
-        /// <summary>
-        /// Get the command-line description.  If none was specified, returns null.
-        /// </summary>
-        public string Description
-        {
-            get
-            {
-                return m_description;
-            }
-            set
-            {
-                m_description = value;
-            }
-        }
-        /// <summary>
-        /// Is the option required?  Defaults to false.
-        /// </summary>
-        public bool Required
-        {
-            get
-            {
-                return m_required;
-            }
-            set
-            {
-                m_required = value;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/util/IdleTime.cs b/lib/jabber-net/bedrock/util/IdleTime.cs
deleted file mode 100644
index 4ca3ad4..0000000
--- a/lib/jabber-net/bedrock/util/IdleTime.cs
+++ /dev/null
@@ -1,217 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.ComponentModel.Design;
-
-namespace bedrock.util
-{
-    /// <summary>
-    /// TimeSpan event.
-    /// </summary>
-    /// <param name="sender"></param>
-    /// <param name="span"></param>
-    public delegate void SpanEventHandler(object sender, TimeSpan span);
-
-    /// <summary>
-    /// Idle time calculations and notifications.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IdleTime : System.ComponentModel.Component
-    {
-        [StructLayout(LayoutKind.Sequential)]
-        private struct LASTINPUTINFO
-        {
-            public int cbSize;
-            public int dwTime;
-        }
-
-        [DllImport("User32.dll")]
-        private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
-
-        /// <summary>
-        /// Get the lapse time between user input (mouse or keyboard) system-wide.
-        /// </summary>
-        /// <returns>Lapse time in seconds.</returns>
-        public static double GetIdleTime()
-        {
-            LASTINPUTINFO lii = new LASTINPUTINFO();
-            lii.cbSize = Marshal.SizeOf(lii.GetType());
-            if (!GetLastInputInfo(ref lii))
-                throw new ApplicationException("Error executing GetLastInputInfo");
-            return (Environment.TickCount - lii.dwTime) / 1000.0;
-        }
-
-        /// <summary>
-        /// Fired when user has been idle (mouse, keyboard) for the configured number of seconds.
-        /// </summary>
-        public event SpanEventHandler OnIdle;
-
-        /// <summary>
-        /// Fired when the user comes back.
-        /// </summary>
-        public event SpanEventHandler OnUnIdle;
-
-        private const double DEFAULT_POLL = 5;      // 5s in s.
-        private const double DEFAULT_IDLE = 5 * 60; // 5m in s.
-
-        private System.Timers.Timer m_timer = null;
-        private double m_notifySecs = DEFAULT_IDLE;
-        private bool m_idle = false;
-        private DateTime m_idleStart = DateTime.MinValue;
-        private ISynchronizeInvoke m_invoker = null;
-
-        /// <summary>
-        /// Create an idle timer with the default timouts.
-        /// </summary>
-        public IdleTime()
-        {
-            m_timer = new System.Timers.Timer(DEFAULT_POLL * 1000.0);
-            m_timer.Elapsed += new System.Timers.ElapsedEventHandler(m_timer_Elapsed);
-        }
-
-        /// <summary>
-        /// Create an idle timer.  Make sure to set Enabled = true to start.
-        /// </summary>
-        /// <param name="pollSecs">Every pollSecs seconds, poll to see how long we've been away.</param>
-        /// <param name="notifySecs">If we've been away notifySecs seconds, fire notification.</param>
-        public IdleTime(int pollSecs, int notifySecs) : this()
-        {
-            if (pollSecs > notifySecs)
-                throw new ArgumentException("Poll more often than you notify.");
-            PollInterval = pollSecs;
-            IdleLength = notifySecs;
-        }
-
-        /// <summary>
-        /// Is the timer running?
-        /// </summary>
-        [Category("Logic")]
-        [DefaultValue(false)]
-        public bool Enabled
-        {
-            get { return m_timer.Enabled; }
-            set { m_timer.Enabled = value; }
-        }
-
-        /// <summary>
-        /// Time, in seconds, between checking for
-        /// </summary>
-        [Category("Time")]
-        [DefaultValue(DEFAULT_POLL)]
-        public double PollInterval
-        {
-            get { return m_timer.Interval / 1000.0; }
-            set { m_timer.Interval = value * 1000.0; }
-        }
-
-        /// <summary>
-        /// The amount of time (in seconds) the computer can be idle before OnIdle is fired.
-        /// </summary>
-        [Category("Time")]
-        [DefaultValue(DEFAULT_IDLE)]
-        public double IdleLength
-        {
-            get { return m_notifySecs;  }
-            set { m_notifySecs = value;  }
-        }
-
-        /// <summary>
-        /// Are we currently idle?
-        /// </summary>
-        [Category("Logic")]
-        public bool IsIdle
-        {
-            get { return m_idle; }
-        }
-
-        /// <summary>
-        /// Invoke() all callbacks on this control.
-        /// </summary>
-        [Description("Invoke all callbacks on this control")]
-        [DefaultValue(null)]
-        [Category("Logic")]
-        public ISynchronizeInvoke InvokeControl
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get
-                // an invoke control from the environment.  VB
-                // programmers can't seem to follow directions.
-                if ((this.m_invoker == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    if (host != null)
-                    {
-                        object root = host.RootComponent;
-                        if ((root != null) && (root is ISynchronizeInvoke))
-                        {
-                            m_invoker = (ISynchronizeInvoke)root;
-                            // TODO: fire some sort of propertyChanged event,
-                            // so that old code gets cleaned up correctly.
-                        }
-                    }
-                }
-                return m_invoker;
-            }
-            set { m_invoker = value; }
-        }
-
-
-        private void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
-        {
-            double idle = GetIdleTime();
-            if (m_idle)
-            {
-                if (idle < PollInterval)
-                {
-                    m_idle = false;
-                    if (OnUnIdle != null)
-                    {
-                        TimeSpan span = DateTime.Now - m_idleStart;
-                        if ((m_invoker != null) &&
-                            (m_invoker.InvokeRequired))
-                        {
-                            m_invoker.Invoke(OnUnIdle, new object[] { this, span });
-                        }
-                        else
-                            OnUnIdle(this, span);
-                    }
-                    m_idleStart = DateTime.MinValue;
-                }
-            }
-            else
-            {
-                if (idle > m_notifySecs)
-                {
-                    m_idle = true;
-                    m_idleStart = DateTime.Now;
-                    if (OnIdle != null)
-                    {
-                        TimeSpan span = new TimeSpan((long)(idle * 1000L));
-                        if ((m_invoker != null) &&
-                            (m_invoker.InvokeRequired))
-                        {
-                            m_invoker.Invoke(OnIdle, new object[] { this, span });
-                        }
-                        else
-                            OnIdle(this, span);
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/bedrock/util/Version.cs b/lib/jabber-net/bedrock/util/Version.cs
deleted file mode 100644
index 27b0dff..0000000
--- a/lib/jabber-net/bedrock/util/Version.cs
+++ /dev/null
@@ -1,632 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Collections.Specialized;
-using System.Reflection;
-using System.Text;
-using System.Text.RegularExpressions;
-namespace bedrock.util
-{
-    /// <summary>
-    /// Make source code versions available at runtime.  Use the appropriate
-    /// subclass for your CM system.
-    /// </summary>
-    /// <see cref="StarTeamAttribute"/>
-    /// <see cref="SourceSafeAttribute"/>
-    /// <see cref="RCSAttribute"/>
-    //    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct,
-                    AllowMultiple = false,
-                    Inherited     = false)]
-    public abstract class SourceVersionAttribute : Attribute
-    {
-        /// <summary>
-        /// The entire header
-        /// </summary>
-        protected string   m_header  = null;
-        /// <summary>
-        /// The directory it's stored in
-        /// </summary>
-        protected string   m_archive = null;
-        /// <summary>
-        /// Last check-in author
-        /// </summary>
-        protected string   m_author  = null;
-        /// <summary>
-        /// Last check-in version
-        /// </summary>
-        protected string   m_version = null;
-        /// <summary>
-        /// Last check-in date
-        /// </summary>
-        protected DateTime m_date    = DateTime.MinValue;
-        /// <summary>
-        /// Have we parsed the header, yet?
-        /// </summary>
-        private   bool     m_parsed  = false;
-        // TODO: replace all of the subclasses with a single, uber-regex.
-        private static readonly Regex REGEX =
-            new Regex(@"^(\$(?<field>[a-z]+): *(?<value>.+) *\$)|( *(?<value>.+) *)$",
-                      RegexOptions.IgnoreCase | RegexOptions.Compiled);
-        /// <summary>
-        /// Construct the attribute.  Parsing is delayed until needed.
-        /// </summary>
-        /// <param name="header">the Header keyword for your CM system.
-        /// Usually $Header$</param>
-        public SourceVersionAttribute(string header)
-        {
-            m_header = header;
-        }
-        /// <summary>
-        /// You could use this one, and pass the keywords in individually.
-        /// </summary>
-        public SourceVersionAttribute()
-        {
-
-        }
-        /// <summary>
-        /// Give back the header string.
-        /// </summary>
-        public override string ToString()
-        {
-            return m_header;
-        }
-        /// <summary>
-        /// Have we parsed yet?
-        /// </summary>
-        protected void CheckParse()
-        {
-            if (m_parsed)
-            {
-                return;
-            }
-            lock(this)
-            {
-                if (m_parsed)
-                {
-                    return;
-                }
-                Parse();
-                m_parsed = true;
-            }
-        }
-        /// <summary>
-        /// We have done a parse, now
-        /// </summary>
-        protected void SetParse()
-        {
-            if (!m_parsed)
-            {
-                lock(this)
-                {
-                    m_parsed = true;
-                }
-            }
-        }
-        /// <summary>
-        /// Parse data into internal fields
-        /// </summary>
-        protected abstract void Parse();
-        /// <summary>
-        /// Do a regex match on src
-        /// </summary>
-        /// <param name="src"></param>
-        /// <returns></returns>
-        protected string GetField(string src)
-        {
-            Match m = REGEX.Match(src);
-            if (!m.Success)
-            {
-                throw new FormatException("Bad header format: " + src + " != " + REGEX.ToString());
-            }
-            if (!m.Groups["value"].Success)
-            {
-                throw new FormatException("Value not found in: " + src);
-            }
-            return m.Groups["value"].ToString();
-        }
-        /// <summary>
-        /// The last checked-in version
-        /// </summary>
-        public string Revision
-        {
-            get
-            {
-                CheckParse();
-                return m_version;
-            }
-            set
-            {
-                SetParse();
-                m_version = GetField(value);
-            }
-        }
-        /// <summary>
-        /// The last checked-in version, in perhaps more useful format
-        /// </summary>
-        public Version Version
-        {
-            get
-            {
-                CheckParse();
-                if (m_version == null)
-                {
-                    return null;
-                }
-                if (m_version.IndexOf('.') == -1)
-                {
-                    return new Version(1, Int32.Parse(m_version));
-                }
-                return new Version(m_version);
-            }
-        }
-        /// <summary>
-        /// Retrive the binary date/time of last check-in
-        /// </summary>
-        public DateTime Date
-        {
-            get
-            {
-                CheckParse();
-                return m_date;
-            }
-            set
-            {
-                SetParse();
-                m_date = value;
-            }
-        }
-        /// <summary>
-        /// Retrieve the string representation of the date of last check-in.
-        /// </summary>
-        public string DateString
-        {
-            get
-            {
-                CheckParse();
-                return m_date.ToString();
-            }
-            set
-            {
-                SetParse();
-                m_date = DateTime.Parse(GetField(value));
-            }
-        }
-        /// <summary>
-        /// Retrive the name of the last person to check in
-        /// </summary>
-        public string Author
-        {
-            get
-            {
-                CheckParse();
-                return m_author;
-            }
-            set
-            {
-                SetParse();
-                m_author = GetField(value);
-            }
-        }
-        /// <summary>
-        /// Retrieve the archive name from the header
-        /// </summary>
-        public string Archive
-        {
-            get
-            {
-                CheckParse();
-                return m_archive;
-            }
-            set
-            {
-                SetParse();
-                m_archive = GetField(value);
-            }
-        }
-        /// <summary>
-        /// Get the version information for the given type.
-        /// </summary>
-        /// <param name="t"></param>
-        /// <returns></returns>
-        public static SourceVersionAttribute GetVersion(Type t)
-        {
-            object[] sta = t.GetCustomAttributes(typeof(SourceVersionAttribute), true);
-            if (sta.Length == 0)
-            {
-                // throw exception?  Null seems nicer.
-                return null;
-            }
-            return (SourceVersionAttribute) sta[0];
-        }
-        /// <summary>
-        /// Get the version information for the class of the given object.
-        /// </summary>
-        /// <param name="o"></param>
-        /// <returns></returns>
-        public static SourceVersionAttribute GetVersion(object o)
-        {
-            // Well, someone used it wrong, but who am I to complain?
-            if (o is Type)
-            {
-                return GetVersion((Type) o);
-            }
-            return GetVersion(o.GetType());
-        }
-        /// <summary>
-        /// Get all of the versioned classes currently in the working set.
-        /// </summary>
-        /// <returns></returns>
-        public static SourceVersionCollection GetVersion()
-        {
-            SourceVersionCollection tv = new SourceVersionCollection();
-            Assembly[] assems = AppDomain.CurrentDomain.GetAssemblies();
-            SourceVersionAttribute sta;
-            foreach (Assembly a in assems)
-            {
-                Type[] ts = a.GetTypes();
-                foreach (Type t in ts)
-                {
-                    sta = GetVersion(t);
-                    if (sta != null)
-                    {
-                        tv.Add(t.FullName, sta);
-                    }
-                }
-            }
-            return tv;
-        }
-    }
-    /// <summary>
-    /// Make StarTeam versoning available at run-time.
-    ///
-    /// </summary>
-    /// <example>
-    /// [StarTeam(@"$Header$")]
-    /// public class foo {}
-    ///
-    /// SourceVersionAttribute sta = SourceVersionAttribute.GetVersion(typeof(foo));
-    /// </example>
-    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct,
-                    AllowMultiple=false, Inherited=false)]
-    public class StarTeamAttribute : SourceVersionAttribute
-    {
-        // Dammit gumby.  Don't mess up my regex.
-        private static readonly Regex REGEX =
-            new Regex(@"^\$" + @"Header(: (?<archive>[^,]+), (?<version>[0-9.]+), (?<date>[^,]+), (?<author>[^$]+))?" + @"\$$");
-        /// <summary>
-        /// Normal usage
-        /// </summary>
-        /// <param name="header"></param>
-        public StarTeamAttribute(string header) : base(header)
-        {
-        }
-        /// <summary>
-        /// Not useful
-        /// </summary>
-        public StarTeamAttribute() : base()
-        {
-        }
-
-        /// <summary>
-        /// Return normalized header
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            string s = base.ToString();
-            if (s != null)
-            {
-                return s;
-            }
-
-            return String.Format("{0}Header: {1}, {2}, {3:MM/dd/yyyy h:mm:ss tt}, {4}{5}",
-                                 new object[] {"$", m_archive, m_version, m_date, m_author, "$"});
-        }
-        /// <summary>
-        /// Parse the header
-        /// </summary>
-        protected override void Parse()
-        {
-            Match m = REGEX.Match(m_header);
-            if (!m.Success)
-            {
-                throw new FormatException("Bad header format: " + m_header + " != " + REGEX.ToString());
-            }
-            if (m.Groups["archive"].Success)
-            {
-                m_archive = m.Groups["archive"].ToString();
-                m_version = m.Groups["version"].ToString();
-                m_date    = DateTime.Parse(m.Groups["date"].ToString());
-                m_author  = m.Groups["author"].ToString();
-            }
-        }
-    }
-    /// <summary>
-    /// Version control attribute for RCS and CVS.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct,
-                    AllowMultiple=false, Inherited=false)]
-    public class RCSAttribute : SourceVersionAttribute
-    {
-        // Header: /u1/html/cvsroot/www.cyclic.com/RCS-html/info-ref.html,v 1.1 1999/04/14 19:04:02 kingdon Exp
-        private static readonly Regex REGEX =
-            new Regex(@"^\$" + @"Header(: +(?<archive>[^ ]+) +(?<version>[0-9.]+) +(?<date>[0-9/]+ [0-9:]+) +(?<author>[^ ]+) +(?<state>[^ ]+) *)?" + @"\$$");
-        private string m_state = null;
-        /// <summary>
-        /// The most common.  Pass in @"$ Header $" (without the spaces).
-        /// </summary>
-        /// <param name="header"></param>
-        public RCSAttribute(string header) : base(header)
-        {
-        }
-        /// <summary>
-        /// Null constructor.  This is rarely right.
-        /// </summary>
-        public RCSAttribute() : base()
-        {
-        }
-        /// <summary>
-        /// Parse the header string.
-        /// </summary>
-        protected override void Parse()
-        {
-            Match m = REGEX.Match(m_header);
-            if (!m.Success)
-            {
-                throw new FormatException("Bad header format: " + m_header + " != " + REGEX.ToString());
-            }
-            if (m.Groups["archive"].Success)
-            {
-                m_archive = m.Groups["archive"].ToString();
-                m_version = m.Groups["version"].ToString();
-                m_date    = DateTime.Parse(m.Groups["date"].ToString());
-                m_author  = m.Groups["author"].ToString();
-                m_state   = m.Groups["state"].ToString();
-            }
-        }
-        /// <summary>
-        /// Hm.  Wish I remembered what this was for.  :)
-        /// </summary>
-        public string State
-        {
-            get
-            {
-                CheckParse();
-                return m_state;
-            }
-            set
-            {
-                SetParse();
-                m_state  = GetField(value);
-            }
-        }
-    }
-    /// <summary>
-    /// Version control attribute for SourceSafe.
-    /// I don't use this any more, so someone tell me if it breaks with
-    /// some new release.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct,
-                    AllowMultiple=false, Inherited=false)]
-    public class SourceSafeAttribute : SourceVersionAttribute
-    {
-        // Header: /t.cs 1     2/14/01 3:57p Hildebzj
-        private static readonly Regex REGEX =
-            new Regex(@"^\$" + @"Header(: +(?<archive>[^ ]+) +(?<version>[0-9.]+) +(?<date>[0-9/]+ [0-9:]+)(?<ampm>[ap]) +(?<author>[^ ]+) *)?" + @"\$$");
-        //private string m_state = null;
-        /// <summary>
-        /// The normal use.  Pass in @"$ Header $" (without the spaces).
-        /// </summary>
-        /// <param name="header"></param>
-        public SourceSafeAttribute(string header) : base(header)
-        {
-        }
-        /// <summary>
-        /// Not usually useful.
-        /// </summary>
-        public SourceSafeAttribute() : base()
-        {
-        }
-        /// <summary>
-        /// Parse the header.
-        /// </summary>
-        protected override void Parse()
-        {
-            Match m = REGEX.Match(m_header);
-            if (!m.Success)
-            {
-                throw new FormatException("Bad header format: " + m_header + " != " + REGEX.ToString());
-            }
-            if (m.Groups["archive"].Success)
-            {
-                m_archive = m.Groups["archive"].ToString();
-                m_version = m.Groups["version"].ToString();
-                m_date    = DateTime.Parse(m.Groups["date"].ToString());
-                if (m.Groups["ampm"].ToString() == "p")
-                {
-                    m_date = m_date.AddHours(12);
-                }
-                m_author  = m.Groups["author"].ToString();
-            }
-        }
-    }
-    /// <summary>
-    /// A collection of SourceVersionAttributes, so that we can
-    /// return a list of all of the versioned classes in the
-    /// current working set.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SourceVersionCollection : NameObjectCollectionBase
-    {
-        /// <summary>
-        /// Add an attribute to the list
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="value"></param>
-        public void Add(string type, SourceVersionAttribute value)
-        {
-            BaseAdd(type, value);
-        }
-        /// <summary>
-        /// Remove all of the attributes from the list
-        /// </summary>
-        public void Clear()
-        {
-            BaseClear();
-        }
-        /// <summary>
-        /// Get the index'th attribute
-        /// </summary>
-        /// <param name="index"></param>
-        /// <returns></returns>
-        public SourceVersionAttribute Get(int index)
-        {
-            return (SourceVersionAttribute) BaseGet(index);
-        }
-        /// <summary>
-        /// Get the attribute associated with a give type name
-        /// </summary>
-        /// <param name="type"></param>
-        /// <returns></returns>
-        public SourceVersionAttribute Get(string type)
-        {
-            return (SourceVersionAttribute) BaseGet(type);
-        }
-        /// <summary>
-        /// Set the attribute associated with a given type name
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="value"></param>
-        public void Set(string type, SourceVersionAttribute value)
-        {
-            BaseSet(type, value);
-        }
-        /// <summary>
-        /// Set the index'th attribute
-        /// </summary>
-        /// <param name="index"></param>
-        /// <param name="value"></param>
-        public void Set(int index, SourceVersionAttribute value)
-        {
-            BaseSet(index, value);
-        }
-        /// <summary>
-        /// Remove the index'th attribute
-        /// </summary>
-        /// <param name="index"></param>
-        public void Remove(int index)
-        {
-            BaseRemoveAt(index);
-        }
-        /// <summary>
-        /// Remove the attribute associated with the given type name
-        /// </summary>
-        /// <param name="type"></param>
-        public void Remove(string type)
-        {
-            BaseRemove(type);
-        }
-        /// <summary>
-        /// Retrieve the index'th attribute
-        /// </summary>
-        public string this[int index]
-        {
-            get
-            {
-                return BaseGetKey(index);
-            }
-        }
-        /// <summary>
-        /// Retrieve/set the attriubute associated with the given type name.
-        /// </summary>
-        public SourceVersionAttribute this[string type]
-        {
-            get
-            {
-                return Get(type);
-            }
-            set
-            {
-                Set(type, value);
-            }
-        }
-        /// <summary>
-        /// Retrieve/set the attribute associated with the given type.
-        /// </summary>
-        public SourceVersionAttribute this[Type type]
-        {
-            get
-            {
-                return Get(type.FullName);
-            }
-            set
-            {
-                Set(type.FullName, value);
-            }
-        }
-    }
-
-    /// <summary>
-    /// Version control attribute for Subversion.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct,
-                    AllowMultiple=false, Inherited=false)]
-    public class SVNAttribute : SourceVersionAttribute
-    {
-        // Header: /u1/html/cvsroot/www.cyclic.com/RCS-html/info-ref.html,v 1.1 1999/04/14 19:04:02 kingdon Exp
-        // Id: calc.c 148 2002-07-28 21:30:43Z sally
-        private static readonly Regex REGEX =
-            new Regex(@"^\$" + @"Id(: +(?<archive>[^ ]+) +(?<version>[0-9.]+) +(?<date>[0-9-]+ [0-9:]+)Z +(?<author>[^ ]+) *)?\$$");
-        /// <summary>
-        /// The most common.  Pass in @"$ Id $" (without the spaces).
-        /// </summary>
-        /// <param name="header"></param>
-        public SVNAttribute(string header)
-            : base(header)
-        {
-        }
-        /// <summary>
-        /// Null constructor.  This is rarely right.
-        /// </summary>
-        public SVNAttribute()
-            : base()
-        {
-        }
-        /// <summary>
-        /// Parse the header string.
-        /// </summary>
-        protected override void Parse()
-        {
-            Match m = REGEX.Match(m_header);
-            if (!m.Success)
-            {
-                throw new FormatException("Bad header format: " + m_header + " != " + REGEX.ToString());
-            }
-            if (m.Groups["archive"].Success)
-            {
-                m_archive = m.Groups["archive"].ToString();
-                m_version = m.Groups["version"].ToString();
-                m_date    = DateTime.Parse(m.Groups["date"].ToString());
-                m_author  = m.Groups["author"].ToString();
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/JID.cs b/lib/jabber-net/jabber/JID.cs
deleted file mode 100644
index c8eb336..0000000
--- a/lib/jabber-net/jabber/JID.cs
+++ /dev/null
@@ -1,723 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Text;
-using System.Diagnostics;
-
-using bedrock.util;
-using System.Text.RegularExpressions;
-
-namespace jabber
-{
-    /// <summary>
-    /// Informs the client that an invalid JID was entered.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JIDFormatException : ApplicationException
-    {
-        /// <summary>
-        /// Creates a new exception for an invalid JID.
-        /// </summary>
-        /// <param name="badJid">The invalid JID</param>
-        public JIDFormatException(string badJid) : base("Bad JID: (" + badJid + ")")
-        {
-        }
-
-        /// <summary>
-        /// Creates a new exception instance.
-        /// </summary>
-        public JIDFormatException() : base()
-        {
-        }
-
-        /// <summary>
-        /// Creates a new exception instance, wrapping another exception.
-        /// </summary>
-        /// <param name="badJid">Invalid JID.</param>
-        /// <param name="e">Inner exception.</param>
-        public JIDFormatException(string badJid, Exception e) : base("Bad JID: (" + badJid + ")", e)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the AsyncSocketConnectionException class with serialized data.
-        /// </summary>
-        /// <param name="info">The object that holds the serialized object data.</param>
-        /// <param name="ctx">The contextual information about the source or destination.</param>
-        protected JIDFormatException(System.Runtime.Serialization.SerializationInfo info,
-            System.Runtime.Serialization.StreamingContext ctx) :
-            base(info, ctx)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Provides simple JID management.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [System.ComponentModel.TypeConverter(typeof(JIDTypeConverter))]
-    public class JID : IComparable
-    {
-#if !NO_STRINGPREP
-        private static readonly stringprep.Profile s_nodeprep     = new stringprep.XmppNode();
-        private static readonly stringprep.Profile s_nameprep     = new stringprep.Nameprep();
-        private static readonly stringprep.Profile s_resourceprep = new stringprep.XmppResource();
-#endif
-
-        private string m_user     = null;
-        private string m_server   = null;
-        private string m_resource = null;
-        private string m_JID      = null;
-
-        /// <summary>
-        /// Creates a JID from a string.
-        /// This will parse and perform the stringprep (RFC 3454) process.
-        /// </summary>
-        /// <param name="jid">Jabber ID, in string form</param>
-        public JID(string jid)
-        {
-            Debug.Assert(jid != null, "jid must be non-null");
-            m_JID = jid;
-            parse();
-        }
-
-        /// <summary>
-        /// Builds a new JID from the given components.
-        /// This will parse and perform the stringprep (RFC 3454) process.
-        /// </summary>
-        /// <param name="user">The username value.</param>
-        /// <param name="server">The XMPP server domain value.</param>
-        /// <param name="resource">The current resource value.</param>
-        public JID(string user, string server, string resource)
-        {
-            Debug.Assert(server != null, "server must be non-null");
-
-#if !NO_STRINGPREP
-            m_user     = (user == null) ? null : s_nodeprep.Prepare(user);
-            m_server   = s_nameprep.Prepare(server);
-            m_resource = (resource == null) ? null : s_resourceprep.Prepare(resource);
-#else
-            m_user     = (user == null) ? null : user.ToLower();
-            m_server   = server.ToLower();
-            m_resource = resource;
-#endif
-            m_JID      = build(m_user, m_server, m_resource);
-
-        }
-
-        /// <summary>
-        /// Builds a new JID, from portions that are guaranteed to already be stringprep'd.
-        /// </summary>
-        /// <param name="user"></param>
-        /// <param name="server"></param>
-        /// <param name="resource"></param>
-        /// <param name="full">The full user at server/resource JID, so that it doesn't have to be recreated from the parts</param>
-        private JID(string user, string server, string resource, string full)
-        {
-            m_user = user;
-            m_server = server;
-            m_resource = resource;
-            m_JID = full;
-        }
-
-        private static string build(string user, string server, string resource)
-        {
-            Debug.Assert(server != null, "Server must be non-null");
-            StringBuilder sb = new StringBuilder();
-            if (user != null)
-            {
-                sb.Append(user);
-                sb.Append("@");
-            }
-            sb.Append(server);
-            if (resource != null)
-            {
-                sb.Append("/");
-                sb.Append(resource);
-            }
-            return sb.ToString();
-        }
-
-        private void parse()
-        {
-            if (m_server != null)
-                return; // already parsed
-
-            string user = null;
-            string server = null;
-            string resource = null;
-
-            int at = m_JID.IndexOf('@');
-            int slash = m_JID.IndexOf('/');
-
-            if (at == -1)
-            {
-                user = null;
-                if (slash == -1)
-                {
-                    server = m_JID;
-                    resource = null;
-                }
-                else
-                {
-                    server = m_JID.Substring(0, slash);
-                    resource = m_JID.Substring(slash+1);
-                }
-            }
-            else
-            {
-                if (slash == -1)
-                {
-                    user = m_JID.Substring(0, at);
-                    server = m_JID.Substring(at + 1);
-                }
-                else
-                {
-                    if (at < slash)
-                    { // normal case
-                        user = m_JID.Substring(0, at);
-                        server = m_JID.Substring(at+1, slash-at-1);
-                        resource = m_JID.Substring(slash+1);
-                    }
-                    else
-                    { // @ in a resource, with no user.  bastards.
-                        user = null;
-                        server = m_JID.Substring(0, slash);
-                        resource = m_JID.Substring(slash+1);
-                    }
-                }
-            }
-            if (user != null)
-            {
-                if (user.IndexOf('@') != -1) throw new JIDFormatException(m_JID);
-                if (user.IndexOf('/') != -1) throw new JIDFormatException(m_JID);
-            }
-
-            if ((server == null) || (server.Length == 0)) throw new JIDFormatException(m_JID);
-            if (server.IndexOf('@') != -1) throw new JIDFormatException(m_JID);
-            if (server.IndexOf('/') != -1) throw new JIDFormatException(m_JID);
-            if ((resource != null) && (resource.Length == 0)) // null is ok, but "" is not.
-                throw new JIDFormatException(m_JID);
-
-#if !NO_STRINGPREP
-            m_user = (user == null) ? null : s_nodeprep.Prepare(user);
-            m_server = s_nameprep.Prepare(server);
-            m_resource = (resource == null) ? null : s_resourceprep.Prepare(resource);
-#else
-            m_user = (user == null) ? null : user.ToLower();
-            m_server = server.ToLower();
-            m_resource = resource;
-#endif
-            // Make the case right, for fast equality comparisons
-            m_JID = build(m_user, m_server, m_resource);
-        }
-
-        /// <summary>
-        /// Gets the hash code on the string version of the JID.
-        /// </summary>
-        /// <returns>Hash code.</returns>
-        public override int GetHashCode()
-        {
-            return m_JID.GetHashCode();
-        }
-
-        /// <summary>
-        /// Returns the string representation.
-        /// </summary>
-        /// <returns>String in the form of "[user]@[server]/[resource]</returns>
-        public override string ToString()
-        {
-            return m_JID;
-        }
-
-        /// <summary>
-        /// Equality of string representations.
-        /// </summary>
-        /// <param name="other">JID or string to compare against.</param>
-        /// <returns></returns>
-        public override bool Equals(object other)
-        {
-            if (other == null)
-                return false;
-            if (other is string)
-                return m_JID.Equals(other);
-            if (! (other is JID))
-                return false;
-
-            return m_JID.Equals(((JID)other).m_JID);
-        }
-
-        /// <summary>
-        /// Determines whether two JIDs have the same value.
-        /// </summary>
-        /// <param name="one">A JID to compare.</param>
-        /// <param name="two">Another JID to compare to the first one.</param>
-        /// <returns>True if everything (user, host and resource) are the same; otherwise false.</returns>
-        public static bool operator==(JID one, JID two)
-        {
-            if ((object)one == null)
-                return ((object)two == null);
-            return one.Equals(two);
-        }
-
-        /// <summary>
-        /// Determines whether the string representation of the specified JID is equal to the current JID.
-        /// </summary>
-        /// <param name="one">This string is converted to a JID than compared to the second parameter.</param>
-        /// <param name="two">JID to compare to the first one.</param>
-        /// <returns>True if everything (user, host and resource) are the same; otherwise false.</returns>
-        public static bool operator==(string one, JID two)
-        {
-            if ((object)two == null)
-                return ((object)one == null);
-            return two.Equals(one);
-        }
-
-        /// <summary>
-        /// Determines whether the string representation of the specified JID is not equal to the current JID.
-        /// </summary>
-        /// <param name="one">This string is converted to a JID than compared to the second parameter.</param>
-        /// <param name="two">JID to compare to the first one.</param>
-        /// <returns>True if one thing (user, host or resource) is different; otherwise false.</returns>
-        public static bool operator!=(string one, JID two)
-        {
-            if ((object)two == null)
-                return ((object)one != null);
-            return !two.Equals(one);
-        }
-
-        /// <summary>
-        /// Determines whether two JIDs have different values.
-        /// </summary>
-        /// <param name="one">A JID to compare.</param>
-        /// <param name="two">Another JID to compare to the first one.</param>
-        /// <returns>True if one thing (user, host and resource) is different; otherwise false.</returns>
-        public static bool operator!=(JID one, JID two)
-        {
-            if ((object)one == null)
-                return ((object)two != null);
-            return !one.Equals(two);
-        }
-
-        /// <summary>
-        /// Converts a string to a JID implicitly (no cast needed).
-        /// </summary>
-        /// <param name="jid">String containing a JID.</param>
-        /// <returns>JID object representing the string passed in.</returns>
-        public static implicit operator JID(string jid)
-        {
-            if (jid == null)
-                return null;
-            return new JID(jid);
-        }
-
-        /// <summary>
-        /// Converts a JID to a string implicitly (no cast needed).
-        /// </summary>
-        /// <param name="jid">JID whos string representation we want.</param>
-        /// <returns>String version of the jid.</returns>
-        public static implicit operator string(JID jid)
-        {
-            if (jid == null)
-                return null;
-            return jid.m_JID;
-        }
-
-        /// <summary>
-        /// Compares two JIDs.
-        /// </summary>
-        /// <param name="left">First JID.</param>
-        /// <param name="right">Second JID.</param>
-        /// <returns>True if the first JID is less to the second; otherwise false.</returns>
-        public static bool operator<(JID left, JID right)
-        {
-            return left.CompareTo(right) == -1;
-        }
-
-        /// <summary>
-        /// Compares two JIDs.
-        /// </summary>
-        /// <param name="left">First JID.</param>
-        /// <param name="right">Second JID.</param>
-        /// <returns>True if the first JID is greater than the second; otherwise false.</returns>
-        public static bool operator>(JID left, JID right)
-        {
-            return left.CompareTo(right) == 1;
-        }
-
-        /// <summary>
-        /// Compares two JIDs.
-        /// </summary>
-        /// <param name="left">First JID.</param>
-        /// <param name="right">Second JID.</param>
-        /// <returns>True if the first JID is less than or equal to the second; otherwise false.</returns>
-        public static bool operator<=(JID left, JID right)
-        {
-            return left.CompareTo(right) != 1;
-        }
-
-        /// <summary>
-        /// Compares two JIDs.
-        /// </summary>
-        /// <param name="left">First JID.</param>
-        /// <param name="right">Second JID.</param>
-        /// <returns>True if the first JID is greater than or equal to the second; otherwise false.</returns>
-        public static bool operator>=(JID left, JID right)
-        {
-            return left.CompareTo(right) != -1;
-        }
-
-        /// <summary>
-        /// Gets and sets the username value of the JID, and returns null if it does not exist.
-        /// </summary>
-        public string User
-        {
-            get
-            {
-                parse();
-                return m_user;
-            }
-            set
-            {
-                parse();
-                m_user = value;
-                m_JID = build(m_user, m_server, m_resource);
-            }
-        }
-
-        /// <summary>
-        /// Gets and sets the XMPP server domain value.
-        /// </summary>
-        public string Server
-        {
-            get
-            {
-                parse();
-                return m_server;
-            }
-            set
-            {
-                parse();
-                m_server = value;
-                m_JID = build(m_user, m_server, m_resource);
-            }
-        }
-
-        /// <summary>
-        /// Gets and sets the resource value and returns null if it does not exist.
-        /// </summary>
-        public string Resource
-        {
-            get
-            {
-                parse();
-                return m_resource;
-            }
-            set
-            {
-                parse();
-                m_resource = value;
-                m_JID = build(m_user, m_server, m_resource);
-            }
-        }
-
-        /// <summary>
-        /// Gets the username and XMPP server domain values of the JID. For example: user at example.com
-        /// </summary>
-        public string Bare
-        {
-            get
-            {
-                parse();
-                if (m_resource == null)
-                    return m_JID;
-                return build(m_user, m_server, null);
-            }
-        }
-
-        /// <summary>
-        /// Gets the user at server JID associated with this JID, as a JID.
-        /// Slightly faster than building it yourself, since stringprep
-        /// is avoided.
-        /// </summary>
-        public JID BareJID
-        {
-            get 
-            {
-                parse();
-                if (m_resource == null)
-                    return this; // already bare
-                return new JID(m_user, m_server, null, build(m_user, m_server, null)); 
-            }
-        }
-
-
-        /// <summary>
-        /// XEP-0106 escaping.
-        /// </summary>
-        /// <returns></returns>
-        public static JID Escape(string user, string server, string resource)
-        {
-            StringBuilder sb = new StringBuilder();
-            int count = 0;
-            foreach (char c in user)
-            {
-                switch (c)
-                {
-                    case ' ':
-                        if ((count == 0) || (count == (user.Length - 1)))
-                            throw new JIDFormatException();
-                        sb.Append("\\20");
-                        break;
-                    case '"':
-                        sb.Append("\\22");
-                        break;
-                    case '&':
-                        sb.Append("\\26");
-                        break;
-                    case '\'':
-                        sb.Append("\\27");
-                        break;
-                    case '/':
-                        sb.Append("\\2f");
-                        break;
-                    case ':':
-                        sb.Append("\\3a");
-                        break;
-                    case '<':
-                        sb.Append("\\3c");
-                        break;
-                    case '>':
-                        sb.Append("\\3e");
-                        break;
-                    case '@':
-                        sb.Append("\\40");
-                        break;
-                    case '\\':
-                        sb.Append("\\5c");
-                        break;
-                    default:
-                        sb.Append(c);
-                        break;
-                }
-                count++;
-            }
-            string u = sb.ToString();
-            return new JID(u, server, resource); 
-        }
-
-        /// <summary>
-        /// Unescape the username portion of a JID, as specified in XEP-106.
-        /// </summary>
-        /// <returns></returns>
-        public string Unescape()
-        {
-            Regex re = new Regex(@"\\([2-5][0267face])");
-            string u = re.Replace(m_user, new MatchEvaluator(delegate(Match m)
-            {
-                switch (m.Groups[1].Value)
-                {
-                    case "20":
-                        return " ";
-                    case "22":
-                        return "\"";
-                    case "26":
-                        return "&";
-                    case "27":
-                        return "'";
-                    case "2f":
-                        return "/";
-                    case "3a":
-                        return ":";
-                    case "3c":
-                        return "<";
-                    case "3e":
-                        return ">";
-                    case "40":
-                        return "@";
-                    case "5c":
-                        return "\\";
-                    default:
-                        return m.Groups[0].Value;
-                }
-            }));
-            return u;
-        }
-
-        #region Implementation of IComparable
-        /// <summary>
-        /// Compares the current instance with another object of the same type.
-        /// </summary>
-        /// <param name="obj">An object to compare with this instance.</param>
-        /// <returns>A 32-bit signed integer that indicates the relative order of the comparands. The return value has these meanings:
-        /// Less than zero This instance is less than obj.
-        /// Zero This instance is equal to obj.
-        /// Greater than zero This instance is greater than obj.
-        /// </returns>
-        public int CompareTo(object obj)
-        {
-            if (obj == null)
-                return 1;
-            if (obj == (object)this)
-                return 0;
-
-            JID oj = obj as JID;
-            if (oj == null)
-                throw new ArgumentException("Comparison of JID to non-JID", "obj");
-
-            // hm.  How tricky to get?
-            // It could be that sorting by domain first is correct...
-            //return this.m_JID.CompareTo(oj.m_JID);
-            this.parse();
-            oj.parse();
-
-            int c = this.m_server.ToLower().CompareTo(oj.m_server.ToLower());
-            if (c != 0) return c;
-
-            if (this.m_user == null)
-            {
-                if (oj.m_user != null)
-                    return -1;
-            }
-            else
-            {
-                if (oj.m_user == null)
-                    return 1;
-
-                c = this.m_user.ToLower().CompareTo(oj.m_user.ToLower());
-                if (c != 0) return c;
-            }
-
-            if (this.m_resource == null)
-            {
-                return (oj.m_resource == null) ? 0 : -1;
-            }
-            return this.m_resource.CompareTo(oj.m_resource);
-        }
-        #endregion
-    }
-
-    /// <summary>
-    /// Convert a JID to and from a string, so that JIDs can be used as properties for
-    /// components, and have those properties set at design time.
-    /// </summary>
-    public class JIDTypeConverter : System.ComponentModel.TypeConverter
-    {
-        /// <summary>
-        /// Returns whether this converter can convert an object of one type to the type of this converter. 
-        /// </summary>
-        /// <param name="context"></param>
-        /// <param name="sourceType"></param>
-        /// <returns></returns>
-        public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, Type sourceType)
-        {
-            if (sourceType == null)
-            {
-                throw new ArgumentNullException("sourceType");
-            }
-            return ((sourceType == typeof(string)) || 
-                    (typeof(JID).IsAssignableFrom(sourceType) || 
-                     base.CanConvertFrom(context, sourceType)));
-        }
-
-        /// <summary>
-        /// Returns whether this converter can convert the object to the specified type. 
-        /// </summary>
-        /// <param name="context"></param>
-        /// <param name="destinationType"></param>
-        /// <returns></returns>
-        public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, Type destinationType)
-        {
-             return ((destinationType == typeof(string)) || 
-                     ((destinationType == typeof(JID)) || 
-                    base.CanConvertTo(context, destinationType)));
-        }
-
-        /// <summary>
-        /// Returns whether the given value object is valid for this type.
-        /// Empty strings are allowed, since they will map to null.
-        /// </summary>
-        /// <param name="context"></param>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public override bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value)
-        {
-            string s = value as string;
-            JID j;
-            if (s != null)
-            {
-                if (s == "")
-                    return true;
-
-                try
-                {
-                    j = new JID(s);
-                }
-                catch (JIDFormatException)
-                {
-                    return false;
-                }
-                return true;
-            }
-            j = value as JID;
-            return (j != null);
-        }
-
-        /// <summary>
-        /// Converts the given value to the type of this converter.
-        /// Empty strings are converted to null.
-        /// </summary>
-        /// <param name="context"></param>
-        /// <param name="culture"></param>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
-        {
-            if (value == null)
-                return null;
-
-            string s = value as string;
-            if (s != null)
-            {
-                if (s == "")
-                    return null;
-                return new JID(s);
-            }
-            JID j = value as JID;
-            if (j != null)
-                return j;
-            return base.ConvertFrom(context, culture, value);
-        }
-
-        /// <summary>
-        /// Converts the given value object to the specified type.
-        /// </summary>
-        /// <param name="context"></param>
-        /// <param name="culture"></param>
-        /// <param name="value"></param>
-        /// <param name="destinationType"></param>
-        /// <returns></returns>
-        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (value == null)
-                return null;
-            if (destinationType == typeof(string))
-                return value.ToString();
-            if (destinationType == typeof(JID))
-                return value;
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/client/BookmarkManager.cs b/lib/jabber-net/jabber/client/BookmarkManager.cs
deleted file mode 100644
index 9410bca..0000000
--- a/lib/jabber-net/jabber/client/BookmarkManager.cs
+++ /dev/null
@@ -1,293 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-
-using bedrock.util;
-using jabber.connection;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using System.Xml;
-
-namespace jabber.client
-{
-    /// <summary>
-    /// A new conference bookmark.
-    /// </summary>
-    /// <param name="manager"></param>
-    /// <param name="conference"></param>
-    public delegate void BookmarkConferenceDelegate(BookmarkManager manager, BookmarkConference conference);
-
-    /// <summary>
-    /// Manager bookmarks on the server, with the old-style iq:private.
-    /// TODO: add support for new-style PEP.
-    /// </summary>
-    [SVN(@"$Id$")]    
-    public class BookmarkManager : jabber.connection.StreamComponent
-	{
-        private bool m_autoPrivate = true;
-        private ConferenceManager m_confManager;
-        private Dictionary<JID, BookmarkConference> m_conferences = new Dictionary<JID, BookmarkConference>();
-
-        /// <summary>
-        /// Create
-        /// </summary>
-		public BookmarkManager()
-		{
-			InitializeComponent();
-            this.OnStreamChanged += new bedrock.ObjectHandler(BookmarkManager_OnStreamChanged);
-		}
-
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="container"></param>
-		public BookmarkManager(IContainer container) : this()
-		{
-			container.Add(this);
-		}
-
-        /// <summary>
-        /// Automatically request bookmarks using iq:private on login.
-        /// </summary>
-        [Category("Bookmarks")]
-        [Description("Automatically request bookmarks using iq:private on login.")]
-        [DefaultValue(true)]
-        public bool AutoPrivate
-        {
-            get { return m_autoPrivate; }
-            set { m_autoPrivate = value; }
-        }
-
-        /// <summary>
-        /// A conference bookmark has been .
-        /// </summary>
-        [Category("Bookmarks")]
-        [Description("A conference bookmark has been added to the list.")]
-        public event BookmarkConferenceDelegate OnConferenceAdd;
-
-        /// <summary>
-        /// A conference bookmark has been removed from the list.
-        /// </summary>
-        [Category("Bookmarks")]
-        [Description("A conference bookmark has been removed from the list.")]
-        public event BookmarkConferenceDelegate OnConferenceRemove;
-
-        /// <summary>
-        /// A ConferenceManager into which to auto-join conference rooms.
-        /// </summary>
-        [Category("Jabber")]
-        public ConferenceManager ConferenceManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a ConferenceManager
-                if ((m_confManager == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.ConferenceManager = (ConferenceManager)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(ConferenceManager));
-                }
-                return m_confManager;
-            }
-            set
-            {
-                if ((object)m_confManager == (object)value)
-                    return;
-                m_confManager = value;
-            }
-        }
-
-        private void BookmarkManager_OnStreamChanged(object sender)
-        {
-            m_stream.OnDisconnect += new bedrock.ObjectHandler(m_stream_OnDisconnect);
-            m_stream.OnError += new bedrock.ExceptionHandler(m_stream_OnError);
-            JabberClient cli = m_stream as JabberClient;
-            if (cli == null)
-                return;
-
-            cli.OnAuthenticate += new bedrock.ObjectHandler(cli_OnAuthenticate);
-        }
-
-        private void m_stream_OnError(object sender, Exception ex)
-        {
-            m_conferences.Clear();
-        }
-
-        private void m_stream_OnDisconnect(object sender)
-        {
-            m_conferences.Clear();
-        }
-
-        private void cli_OnAuthenticate(object sender)
-        {
-            if (AutoPrivate)
-            {
-                BookmarksIQ biq = new BookmarksIQ(m_stream.Document);
-                biq.Type = IQType.get;
-                m_stream.Tracker.BeginIQ(biq, GotBookmarks, null);
-            }
-        }
-
-        private void GotBookmarks(object sender, IQ iq, object state)
-        {
-            if ((iq == null) || (iq.Type != IQType.result))
-                return;
-
-            Private priv = iq.Query as Private;
-            if (priv == null)
-                return;
-
-            Bookmarks bm = priv.GetChildElement<Bookmarks>();
-            if (bm == null)
-                return;
-
-            foreach (BookmarkConference conf in bm.GetConferences())
-            {
-                if (conf.JID == null)
-                    continue;
-
-                m_conferences[conf.JID] = conf;
-                if (OnConferenceAdd != null)
-                    OnConferenceAdd(this, conf);
-                if (conf.AutoJoin && (m_confManager != null))
-                {
-                    JID rJID = conf.JID;
-                    JID roomAndNick = new JID(rJID.User, rJID.Server, conf.Nick);
-                    Room r = m_confManager.GetRoom(roomAndNick);
-                    r.Join(conf.Password);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Get the details for the given conference bookmark.
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <returns></returns>
-        public BookmarkConference this[JID jid]
-        {
-            get { return m_conferences[jid]; }
-            set
-            {
-                BookmarkConference prev = null;
-                if (value == null)
-                {
-                    if (m_conferences.TryGetValue(jid, out prev))
-                    {
-                        m_conferences.Remove(jid);
-                        prev.SetAttribute("remove", "true");
-                    }
-                    else
-                    {
-                        // no-op.  Setting null on a non-existing JID.
-                        return;
-                    }
-                }
-                else
-                {
-                    m_conferences[jid] = prev = value;
-                }
-
-                BookmarksIQ biq = new BookmarksIQ(m_stream.Document);
-                biq.Type = IQType.set;
-                Bookmarks bm = biq.Bookmarks;
-                foreach (BookmarkConference conf in m_conferences.Values)
-                {
-                    bm.AddChild((XmlElement)conf.CloneNode(true, m_stream.Document));
-                }
-                m_stream.Tracker.BeginIQ(biq, BookmarksSet, prev);
-            }
-        }
-
-        private void BookmarksSet(object sender, IQ iq, object state)
-        {
-            if ((iq == null) || (iq.Type != IQType.result))
-                return;
-
-            BookmarkConference prev = state as BookmarkConference;
-            if (prev == null)
-                return;
-
-            if (prev.GetAttribute("remove") == "true")
-            {
-                if (OnConferenceRemove != null)
-                {
-                    prev.RemoveAttribute("remove");
-                    OnConferenceRemove(this, prev);
-                }
-            }
-            else
-            {
-                if (OnConferenceAdd != null)
-                    OnConferenceAdd(this, prev);
-            }
-        }
-
-        /// <summary>
-        /// Add a conference room to the bookmark list
-        /// </summary>
-        /// <param name="jid">The room at service JID of the room</param>
-        /// <param name="name">Human-readable text</param>
-        /// <param name="autoJoin">Join on login</param>
-        /// <param name="nick">Room nickname.  May be null.</param>
-        /// <returns></returns>
-        public BookmarkConference AddConference(JID jid, string name, bool autoJoin, string nick)
-        {
-            BookmarkConference c = new BookmarkConference(m_stream.Document);
-            if (jid == null)
-                throw new ArgumentNullException("jid", "JID must not be null in a conference bookmark");
-            c.JID = jid;
-            if ((name != null) && (name != ""))
-                c.ConferenceName = name;
-            c.AutoJoin = autoJoin;
-            if ((nick != null) && (nick != ""))
-                c.Nick = nick;
-            this[jid] = c;
-            return c;
-        }
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary> 
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-
-        #endregion
-	}
-}
diff --git a/lib/jabber-net/jabber/client/JabberClient.bmp b/lib/jabber-net/jabber/client/JabberClient.bmp
deleted file mode 100644
index 3f633e8..0000000
Binary files a/lib/jabber-net/jabber/client/JabberClient.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/client/JabberClient.cs b/lib/jabber-net/jabber/client/JabberClient.cs
deleted file mode 100644
index 17caad5..0000000
--- a/lib/jabber-net/jabber/client/JabberClient.cs
+++ /dev/null
@@ -1,1031 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.Collections;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-using bedrock.net;
-
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using jabber.connection.sasl;
-
-namespace jabber.client
-{
-    /// <summary>
-    /// Informs the client that a presence packet has been received.
-    /// </summary>
-    public delegate void PresenceHandler(Object sender, Presence pres);
-    /// <summary>
-    /// Informst the client that a message has been received.
-    /// </summary>
-    public delegate void MessageHandler(Object sender, Message msg);
-    /// <summary>
-    /// Informs the client that an IQ has been received.
-    /// </summary>
-    public delegate void IQHandler(Object sender, IQ iq);
-    /// <summary>
-    /// Need more information for registration.  Return false to cancel.
-    /// </summary>
-    public delegate bool RegisterInfoHandler(Object sender, Register register);
-
-    /// <summary>
-    /// Provides a component for clients to use to access the XMPP server.
-    /// You can install this in your Toolbox, drop onto a form, a service, and so on.
-    /// This class hooks into the OnProtocol event and calls the Connect() method.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JabberClient : XmppStream
-    {
-        private static readonly object[][] DEFAULTS = new object[][] {
-            new object[] {Options.RESOURCE, "Jabber.Net"},
-            new object[] {Options.PRIORITY, 0},
-            new object[] {Options.AUTO_LOGIN, true},
-            new object[] {Options.AUTO_ROSTER, true},
-            new object[] {Options.AUTO_IQ_ERRORS, true},
-            new object[] {Options.AUTO_PRESENCE, true},
-            new object[] {Options.PROXY_PORT, 1080},
-            new object[] {Options.SRV_PREFIX, "_xmpp-client._tcp."},
-        };
-
-        private void init()
-        {
-            SetDefaults(DEFAULTS);
-
-            this.OnSASLStart += new jabber.connection.sasl.SASLProcessorHandler(JabberClient_OnSASLStart);
-            this.OnSASLEnd += new jabber.protocol.stream.FeaturesHandler(JabberClient_OnSASLEnd);
-            this.OnSASLError += new ProtocolHandler(JabberClient_OnSASLError);
-            this.OnStreamInit += new StreamHandler(JabberClient_OnStreamInit);
-        }
-
-        /// <summary>
-        /// Creates a new Jabber client and associates it with the parent window.
-        /// Required for Windows.Forms Class Composition Designer support
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public JabberClient(System.ComponentModel.IContainer container) :
-            base(container)
-        {
-            init();
-        }
-
-        /// <summary>
-        /// Creates a new JabberClient.
-        /// Required for Windows.Forms Class Composition Designer support.
-        /// </summary>
-        public JabberClient() : base()
-        {
-            init();
-        }
-
-        /*
-        /// <summary>
-        /// Create a new JabberClient, reusing an existing SocketWatcher.
-        /// </summary>
-        /// <param name="watcher">SocketWatcher to use.</param>
-        public JabberClient(SocketWatcher watcher) : base(watcher)
-        {
-            init();
-        }
-        */
-
-        /// <summary>
-        /// Informs the client that it received a presence packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received a presence packet.")]
-        public event PresenceHandler OnPresence;
-
-        /// <summary>
-        /// Informs the client that it received a message packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received a message packet.")]
-        public event MessageHandler OnMessage;
-
-        /// <summary>
-        /// Informs the client that it received an IQ packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received an IQ packet.")]
-        public event IQHandler OnIQ;
-
-        /// <summary>
-        /// Informs the client that the authentication has failed. The connection is not
-        /// terminated if there is an authentication error, and there
-        /// is at least one event handler for this event.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("Authentication failed.")]
-        public event ProtocolHandler OnAuthError;
-
-        /// <summary>
-        /// Informs the client that the presence is about to be sent.
-        /// This gives a chance to modify outbound presence (fore example, entity caps).
-        /// </summary>
-        [Category("Protocol")]
-        [Description("Presence is about to be sent.  This gives a chance to modify outbound presence (e.g. entity caps)")]
-        public event PresenceHandler OnBeforePresenceOut;
-
-        /// <summary>
-        /// Informs the client that the presence has been sent.
-        /// This gives a chance to send presence to other things, such as chat rooms.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("Informs the client that the presence has been sent.  This gives a chance to send presence to other things, such as chat rooms.")]
-        public event PresenceHandler OnAfterPresenceOut;
-
-        /// <summary>
-        /// Determines if SutoLogin is false, and if it is time to log in.
-        /// This callback will receive the results of the IQ type=get
-        /// in the jabber:iq:auth namespace.  When login is completed,
-        /// IsConnected property is set to true.  If there is a login error, the
-        /// FireAuthError() method is called.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("AutoLogin is false, and it's time to log in.")]
-        public event bedrock.ObjectHandler OnLoginRequired;
-
-        /// <summary>
-        /// Informs the client if the registration succeeded or failed.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("After calling Register(), the registration succeeded or failed.")]
-        public event IQHandler OnRegistered;
-
-        /// <summary>
-        /// Allows the user to enter registration requested information before sending to the XMPP server.
-        ///
-        /// WARNING: Make sure you do not return from this handler until the IQ is filled in.
-        /// It is now safe to call UI elements, since this callback is now on the GUI thread if
-        /// the InvokeControl is set.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("After calling Register, information about the user is required.")]
-        public event RegisterInfoHandler OnRegisterInfo;
-
-        /// <summary>
-        /// Retrieves/Sets the username to connect as.
-        /// </summary>
-        [Description("The username to connect as.")]
-        [Category("Jabber")]
-        public string User
-        {
-            get { return this[Options.USER] as string; }
-            set { this[Options.USER] = value; }
-        }
-
-        /// <summary>
-        /// Gets the priority for this connection.
-        /// </summary>
-        [Description("Priority for this connection.")]
-        [Category("Jabber")]
-        [DefaultValue(0)]
-        public int Priority
-        {
-            get { return (int)this[Options.PRIORITY]; }
-            set { this[Options.PRIORITY] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the password to use for connecting to the XMPP server.
-        /// This may be sent across the wire plaintext if the XMPP
-        /// server doesn't support digest and PlaintextAuth is set to true.
-        /// </summary>
-        [Description("The password to use for connecting.  " +
-             "This may be sent across the wire plaintext, " +
-             "if the server doesn't support digest, " +
-             "and PlaintextAuth is true")]
-        [Category("Jabber")]
-        [PasswordPropertyText]
-        public string Password
-        {
-            get { return this[Options.PASSWORD] as string; }
-            set { this[Options.PASSWORD] = value; }
-        }
-
-        /// <summary>
-        /// Allows auto-login to be used for the connection to the XMPP server if set to true.
-        /// </summary>
-        [Description("Automatically log in on connection.")]
-        [DefaultValue(true)]
-        [Category("Automation")]
-        public bool AutoLogin
-        {
-            get { return (bool)this[Options.AUTO_LOGIN]; }
-            set { this[Options.AUTO_LOGIN] = value; }
-        }
-
-        /// <summary>
-        /// Retrieves the roster on connection.
-        /// </summary>
-        [Description("Retrieves the roster on connection.")]
-        [DefaultValue(true)]
-        [Category("Automation")]
-        public bool AutoRoster
-        {
-            get { return (bool)this[Options.AUTO_ROSTER]; }
-            set { this[Options.AUTO_ROSTER] = value; }
-        }
-
-        /// <summary>
-        /// Sends 501/feature-not-implemented back to the client when an IQ
-        /// has not been handled if set to true.
-        /// </summary>
-        [Description("Automatically send back 501/feature-not-implemented to IQs that have not been handled.")]
-        [DefaultValue(true)]
-        [Category("Automation")]
-        public bool AutoIQErrors
-        {
-            get { return (bool)this[Options.AUTO_IQ_ERRORS]; }
-            set { this[Options.AUTO_IQ_ERRORS] = value; }
-        }
-
-        /// <summary>
-        /// Sends presence information when the connection has been established
-        /// if set to true.
-        /// </summary>
-        [Description("Automatically send presence on connection.")]
-        [DefaultValue(true)]
-        [Category("Automation")]
-        public bool AutoPresence
-        {
-            get { return (bool)this[Options.AUTO_PRESENCE]; }
-            set { this[Options.AUTO_PRESENCE] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the connecting resource.
-        /// Used to identify a unique connection.
-        /// </summary>
-        [Description("Gets or sets the connecting resource.  " +
-             "Used to identify a unique connection.")]
-        [DefaultValue("Jabber.Net")]
-        [Category("Jabber")]
-        public string Resource
-        {
-            get { return this[Options.RESOURCE] as string; }
-            set { this[Options.RESOURCE] = value; }
-        }
-
-        /// <summary>
-        /// Gets the stream namespace for this connection.
-        /// </summary>
-        [Browsable(false)]
-        protected override string NS
-        {
-            get { return URI.CLIENT; }
-        }
-
-        /// <summary>
-        /// Are we currently connected?
-        /// </summary>
-        [Browsable(false)]
-        [DefaultValue(false)]
-        public override bool IsAuthenticated
-        {
-            get { return base.IsAuthenticated; }
-            set
-            {
-                base.IsAuthenticated = value;
-                if (value)
-                {
-                    if (AutoRoster)
-                        GetRoster();
-                    if (AutoPresence)
-                        Presence(PresenceType.available,
-                            "online", null, Priority);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Connects to the XMPP server.  This happens asynchronously, and
-        /// could take a couple of seconds to get the full handshake
-        /// completed.  This will authenticate, send presence, and request
-        /// roster info, if the Auto* properties are set.
-        /// </summary>
-        public override void Connect()
-        {
-            this[Options.AUTO_LOGIN_THISPASS] = this[Options.AUTO_LOGIN];
-            this[Options.SERVER_ID] = this[Options.TO];
-            base.Connect();
-        }
-
-        /// <summary>
-        /// Closes down the connection.
-        /// </summary>
-        public override void Close()
-        {
-            if (IsAuthenticated)
-            {
-                Presence p = new Presence(Document);
-                p.Type = PresenceType.unavailable;
-                p.Status = "offline";
-                Write(p);
-            }
-            base.Close();
-        }
-
-        /// <summary>
-        /// Initiates the authentication process.
-        /// </summary>
-        public void Login()
-        {
-            Debug.Assert(User != null, "Username must not be null for XEP-78 authentication");
-            Debug.Assert(Password != null, "Password must not be null for XEP-78 authentication");
-            Debug.Assert(Resource != null, "Resource must not be null for XEP-78 authentication");
-
-            this[Options.AUTO_LOGIN_THISPASS] = true;
-
-            if (State == ManualSASLLoginState.Instance)
-            {
-                ProcessFeatures();
-                return;
-            }
-
-            this[Options.JID] = new JID(User, Server, Resource);
-
-            AuthIQ aiq = new AuthIQ(Document);
-            aiq.Type = IQType.get;
-            Auth a = aiq.Instruction;
-            a.Username = User;
-
-            lock (StateLock)
-            {
-                State = GetAuthState.Instance;
-            }
-            Tracker.BeginIQ(aiq, new IqCB(OnGetAuth), null);
-        }
-
-        /// <summary>
-        /// Sends a presence packet to the XMPP server.
-        /// </summary>
-        /// <param name="t">The type of presence.</param>
-        /// <param name="status">Determines the status of the presence.</param>
-        /// <param name="show">Shows the available, away, dnd and so on status.</param>
-        /// <param name="priority">Prioritizes this connection.
-        /// Higher number mean higher priority. 0 minumum, 127 max.
-        /// -1 means this is a presence-only connection.</param>
-        public void Presence(PresenceType t,
-            string status,
-            string show,
-            int priority)
-        {
-            if (IsAuthenticated)
-            {
-                if ((priority < -128) || (priority > 127))
-                {
-                    throw new ArgumentException("Priority must be -128 to 127", "priority");
-                }
-
-                Presence p = new Presence(Document);
-                if (status != null)
-                    p.Status = status;
-                if (t != PresenceType.available)
-                {
-                    p.Type = t;
-                }
-                if (show != null)
-                    p.Show = show;
-                p.Priority = priority.ToString();
-
-                if (OnBeforePresenceOut != null)
-                    OnBeforePresenceOut(this, p);
-                Write(p);
-                if (OnAfterPresenceOut != null)
-                    OnAfterPresenceOut(this, p);
-            }
-            else
-            {
-                throw new InvalidOperationException("Client must be authenticated before sending presence.");
-            }
-        }
-
-        /// <summary>
-        /// Sends a certain type of message packet to another user.
-        /// </summary>
-        /// <param name="t">The type of message.</param>
-        /// <param name="to">The JID to send the message to.</param>
-        /// <param name="body">The body of the message.</param>
-        public void Message(MessageType t,
-            string to,
-            string body)
-        {
-            if (IsAuthenticated)
-            {
-                Message msg = new Message(Document);
-                msg.Type = t;
-                msg.To = to;
-                msg.Body = body;
-                Write(msg);
-            }
-            else
-            {
-                throw new InvalidOperationException("Client must be authenticated before sending messages.");
-            }
-        }
-
-        /// <summary>
-        /// Sends a message packet to another user
-        /// </summary>
-        /// <param name="to">The JID to send the message to.</param>
-        /// <param name="body">The body of the message.</param>
-        public void Message(
-            string to,
-            string body)
-        {
-            Message(MessageType.chat, to, body);
-        }
-
-        /// <summary>
-        /// Requests a new copy of the roster.
-        /// </summary>
-        public void GetRoster()
-        {
-            if (IsAuthenticated)
-            {
-                RosterIQ riq = new RosterIQ(Document);
-                riq.Type = IQType.get;
-                Write(riq);
-            }
-            else
-            {
-                throw new InvalidOperationException("Client must be authenticated before getting roster.");
-            }
-        }
-
-
-        /// <summary>
-        /// Sends a presence subscription request and updates the roster
-        /// for a new roster contact.
-        /// </summary>
-        /// <param name="to">The JID of the contact (required)</param>
-        /// <param name="nickname">The nickname to show for the contact.</param>
-        /// <param name="groups">A list of groups to put the contact in.  May be null.  Hint: new string[] {"foo", "bar"}</param>
-        public void Subscribe(JID to, string nickname, string[] groups)
-        {
-            Debug.Assert(to != null);
-
-            RosterIQ riq = new RosterIQ(Document);
-            riq.Type = IQType.set;
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = to;
-            if (nickname != null)
-                i.Nickname = nickname;
-            if (groups != null)
-            {
-                foreach (string g in groups)
-                    i.AddGroup(g);
-            }
-            Write(riq); // don't care about result.  we should get a iq/response and a roster push.
-
-            Presence pres = new Presence(Document);
-            pres.To = to;
-            pres.Type = PresenceType.subscribe;
-            Write(pres);
-        }
-
-        /// <summary>
-        /// Removes a contact from the roster.
-        /// This will also remove the subscription for that contact being removed.
-        /// </summary>
-        /// <param name="to">The JID to remove</param>
-        public void RemoveRosterItem(JID to)
-        {
-            Debug.Assert(to != null);
-
-/*
-<iq from='juliet at example.com/balcony' type='set' id='roster_4'>
-  <query xmlns='jabber:iq:roster'>
-    <item jid='nurse at example.com' subscription='remove'/>
-  </query>
-</iq>
- */
-            RosterIQ riq = new RosterIQ(Document);
-            riq.Type = IQType.set;
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = to;
-            i.Subscription = Subscription.remove;
-            Write(riq); // don't care about result.  we should get a iq/response and a roster push.
-        }
-
-        /// <summary>
-        /// Requests a list of agents from the XMPP server.
-        /// </summary>
-        public void GetAgents()
-        {
-            DiscoInfoIQ diq = new DiscoInfoIQ(Document);
-            diq.Type = IQType.get;
-            diq.To = this.Server;
-            Tracker.BeginIQ(diq, new IqCB(GotDiscoInfo), null);
-        }
-
-        private void GotDiscoInfo(object sender, IQ iq, object state)
-        {
-            bool error = false;
-            if (iq.Type == IQType.error)
-                error = true;
-            else
-            {
-                DiscoInfo info = iq.Query as DiscoInfo;
-                if (info == null)
-                    error = true;
-                else
-                {
-                    if (!info.HasFeature(URI.DISCO_ITEMS))
-                        error = true;  // wow.  weird server.
-
-                    // TODO: stash away features for this node in discomanager?
-                }
-            }
-
-            if (error)
-            {
-                // TODO: check the error type that jabberd1.4 or XCP 2.x return
-            }
-        }
-
-
-        /// <summary>
-        /// Attempts to register a new user.  This will fire
-        /// OnRegisterInfo to retrieve information about the
-        /// new user, and OnRegistered when the registration
-        /// is completed or failed.
-        /// </summary>
-        /// <param name="jid">The user to register.</param>
-        public void Register(JID jid)
-        {
-            RegisterIQ iq = new RegisterIQ(Document);
-            Register reg = iq.Instruction;
-            iq.Type = IQType.get;
-            iq.To = jid.Server;
-
-            reg.Username = jid.User;
-            Tracker.BeginIQ(iq, new IqCB(OnGetRegister), jid);
-        }
-
-        private void OnGetRegister(object sender, IQ iq, object data)
-        {
-            if (iq == null)
-            {
-                FireOnError(new IQTimeoutException((JID) data));
-                return;
-            }
-
-            if (iq.Type == IQType.error)
-            {
-                if (OnRegistered != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnRegistered, new object[] {this, iq});
-                    else
-                        OnRegistered(this, iq);
-                }
-            }
-            else if (iq.Type == IQType.result)
-            {
-                JID jid = (JID) data;
-                iq.Type = IQType.set;
-                iq.From = null;
-                iq.To = jid.Server;
-                iq.ID = Element.NextID();
-                Register r = iq.Query as Register;
-                if (r == null)
-                    throw new BadProtocolException(iq, "Expected a register response");
-
-                jabber.protocol.x.Data xdata = r["x", URI.XDATA] as jabber.protocol.x.Data;
-                jabber.protocol.x.Field f;
-                if (xdata != null)
-                {
-                    f = xdata.GetField("username");
-                    if (f != null)
-                        f.Val = jid.User;
-                    f = xdata.GetField("password");
-                    if (f != null)
-                        f.Val = this.Password;
-                }
-                else
-                {
-                    r.Username = jid.User;
-                    r.Password = this.Password;
-                }
-
-                bool res = true;
-                if (OnRegisterInfo != null)
-                {
-                    if (InvokeRequired)
-                        // Don't use CheckedInvoke, since we want this to be synchronous
-                        res = (bool)this.InvokeControl.Invoke(OnRegisterInfo, new object[] { this, r });
-                    else
-                        res = OnRegisterInfo(this, r);
-                    if (xdata != null)
-                    {
-                        f = xdata.GetField("username");
-                        if (f != null)
-                        {
-                            this.User = f.Val;
-                        }
-                        f = xdata.GetField("password");
-                        if (f != null)
-                            this.Password = f.Val;
-                    }
-                    else
-                    {
-                        this.User = r.Username;
-                        this.Password = r.Password;
-                    }
-                }
-                if (!res)
-                {
-                    this.Close();
-                    return;
-                }
-                if (xdata != null)
-                    xdata.Type = jabber.protocol.x.XDataType.result;
-                Tracker.BeginIQ(iq, new IqCB(OnSetRegister), jid);
-            }
-        }
-
-        private void OnSetRegister(object sender, IQ iq, object data)
-        {
-            if (OnRegistered == null)
-                return;
-
-            if (InvokeRequired)
-                CheckedInvoke(OnRegistered, new object[] {this, iq});
-            else
-                OnRegistered(this, iq);
-        }
-
-        private void OnGetAuth(object sender, IQ i, object data)
-        {
-            if ((i == null) || (i.Type != IQType.result))
-            {
-                FireAuthError(i);
-                return;
-            }
-
-            Auth res = i.Query as Auth;
-            if (res == null)
-            {
-                FireOnError(new InvalidOperationException("Invalid IQ result type"));
-                return;
-            }
-
-            AuthIQ aiq = new AuthIQ(Document);
-            aiq.Type = IQType.set;
-            Auth a = aiq.Instruction;
-
-            if ((res["sequence"] != null) && (res["token"] != null))
-            {
-                a.SetZeroK(User, Password, res.Token, res.Sequence);
-            }
-            else if (res["digest"] != null)
-            {
-                a.SetDigest(User, Password, StreamID);
-            }
-            else if (res["password"] != null)
-            {
-                if (!SSLon && !this.PlaintextAuth)
-                {
-                    FireOnError(new AuthenticationFailedException("Plaintext authentication forbidden."));
-                    return;
-                }
-                a.SetAuth(User, Password);
-            }
-            else
-            {
-                FireOnError(new NotImplementedException("Authentication method not implemented for:\n" + i));
-                return;
-            }
-            if (res["resource"] != null)
-                a.Resource = Resource;
-            a.Username = User;
-
-            lock (StateLock)
-            {
-                State = SetAuthState.Instance;
-            }
-            Tracker.BeginIQ(aiq, new IqCB(OnSetAuth), null);
-        }
-
-        private void OnSetAuth(object sender, IQ i, object data)
-        {
-            if ((i == null) || (i.Type != IQType.result))
-                FireAuthError(i);
-            else
-                IsAuthenticated = true;
-        }
-
-        /// <summary>
-        /// Sorts the XML element looking for Presence, Message, and IQ packets.
-        /// </summary>
-        /// <param name="sender">The object calling this method.</param>
-        /// <param name="tag">The XML element containing a stanza.</param>
-        protected override void OnElement(object sender, System.Xml.XmlElement tag)
-        {
-            base.OnElement(sender, tag);
-
-            if (OnPresence != null)
-            {
-                Presence p = tag as Presence;
-                if (p != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnPresence, new object[] {this, p});
-                    else
-                        OnPresence(this, p);
-                    return;
-                }
-            }
-            if (OnMessage != null)
-            {
-                Message m = tag as Message;
-                if (m != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnMessage, new object[] {this, m});
-                    else
-                        OnMessage(this, m);
-                    return;
-                }
-            }
-
-            IQ i = tag as IQ;
-            if (i != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(new IQHandler(FireOnIQ) , new object[] { this, i });
-                else
-                    FireOnIQ(this, i);
-                return;
-            }
-        }
-
-        private void FireOnIQ(object sender, IQ iq)
-        {
-            // We know we're on the GUI thread.
-            if (OnIQ != null)
-                OnIQ(this, iq);
-
-            if (AutoIQErrors)
-            {
-                if (!iq.Handled &&
-                    iq.HasAttribute("from") &&   // Belt.  Suspenders.  Don't respond to roster pushes.
-                    ((iq.Type == IQType.get) || (iq.Type == IQType.set)))
-                {
-                    Write(iq.GetErrorResponse(this.Document, Error.FEATURE_NOT_IMPLEMENTED));
-                }
-            }
-        }
-
-        /// <summary>
-        /// Informs the client that an error occurred during authentication.
-        /// This is public so that manual authenticators
-        /// can fire errors using the same events.
-        /// </summary>
-        /// <param name="i">Xml element containing the error message.</param>
-        public void FireAuthError(XmlElement i)
-        {
-            if (OnAuthError != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnAuthError, new object[] { this, i });
-                else
-                    OnAuthError(this, i);
-            }
-            else
-            {
-                IQ iq = i as IQ;
-                if (iq != null)
-                    FireOnError(new IQException(iq));
-                else
-                    FireOnError(new AuthenticationFailedException(i.OuterXml));
-            }
-        }
-
-        void JabberClient_OnSASLError(object sender, XmlElement rp)
-        {
-            FireAuthError(rp);
-        }
-
-        private void LoginRequired(BaseState newState)
-        {
-            lock (StateLock)
-            {
-                State = newState;
-            }
-
-            if (OnLoginRequired != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnLoginRequired, new object[] { this });
-                else
-                    OnLoginRequired(this);
-            }
-            else
-            {
-                FireOnError(new InvalidOperationException("If AutoLogin is false, you must supply a OnLoginRequired event handler"));
-            }
-        }
-
-        private void JabberClient_OnSASLStart(Object sender, jabber.connection.sasl.SASLProcessor proc)
-        {
-            BaseState s = null;
-            lock (StateLock)
-            {
-                s = State;
-            }
-
-            // HACK: fire OnSASLStart with state of NonSASLAuthState to initiate old-style auth.
-            if (s == NonSASLAuthState.Instance)
-            {
-                if ((bool)this[Options.AUTO_LOGIN_THISPASS])
-                    Login();
-                else
-                    LoginRequired(ManualLoginState.Instance);
-            }
-            else
-            {
-                if ((bool)this[Options.AUTO_LOGIN_THISPASS])
-                {
-                    // TODO: integrate SASL params into XmppStream params
-                    proc[SASLProcessor.USERNAME] = User;
-                    proc[SASLProcessor.PASSWORD] = Password;
-                    proc[MD5Processor.REALM] = this.Server;
-                    object creds = this[KerbProcessor.USE_WINDOWS_CREDS];
-                    if (creds == null)
-                        creds = false;
-                    proc[KerbProcessor.USE_WINDOWS_CREDS] = creds.ToString();
-                }
-                else
-                {
-                    LoginRequired(ManualSASLLoginState.Instance);
-                }
-            }
-        }
-
-        private void JabberClient_OnSASLEnd(Object sender, jabber.protocol.stream.Features feat)
-        {
-            lock (StateLock)
-            {
-                State = BindState.Instance;
-            }
-            if (feat["bind", URI.BIND] != null)
-            {
-                IQ iq = new IQ(this.Document);
-                iq.Type = IQType.set;
-
-                jabber.protocol.stream.Bind bind = new jabber.protocol.stream.Bind(this.Document);
-                if ((Resource != null) && (Resource != ""))
-                    bind.Resource = Resource;
-
-                iq.AddChild(bind);
-                this.Tracker.BeginIQ(iq, new IqCB(GotResource), feat);
-            }
-            else if (feat["session", URI.SESSION] != null)
-            {
-                IQ iq = new IQ(this.Document);
-                iq.Type = IQType.set;
-                iq.AddChild(new jabber.protocol.stream.Session(this.Document));
-                this.Tracker.BeginIQ(iq, new IqCB(GotSession), feat);
-            }
-            else
-                IsAuthenticated = true;
-        }
-
-        private void GotResource(object sender, IQ iq, object state)
-        {
-
-            jabber.protocol.stream.Features feat =
-                state as jabber.protocol.stream.Features;
-
-            if (iq == null)
-            {
-                FireOnError(new AuthenticationFailedException("Timeout authenticating"));
-                return;
-            }
-            if (iq.Type != IQType.result)
-            {
-                Error err = iq.Error;
-                if (err == null)
-                    FireOnError(new AuthenticationFailedException("Unknown error binding resource"));
-                else
-                    FireOnError(new AuthenticationFailedException("Error binding resource: " + err.OuterXml));
-                return;
-            }
-
-            XmlElement bind = iq["bind", URI.BIND];
-            if (bind == null)
-            {
-                FireOnError(new AuthenticationFailedException("No binding returned.  Server implementation error."));
-                return;
-            }
-            XmlElement jid = bind["jid"];
-            if (jid == null)
-            {
-                FireOnError(new AuthenticationFailedException("No jid returned from binding.  Server implementation error."));
-                return;
-            }
-            this[Options.JID] = new JID(jid.InnerText);
-
-            if (feat["session", URI.SESSION] != null)
-            {
-                IQ iqs = new IQ(this.Document);
-                iqs.Type = IQType.set;
-                iqs.AddChild(new jabber.protocol.stream.Session(this.Document));
-                this.Tracker.BeginIQ(iqs, new IqCB(GotSession), feat);
-            }
-            else
-                IsAuthenticated = true;
-        }
-
-        private void GotSession(object sender, IQ iq, object state)
-        {
-            if ((iq != null) && (iq.Type == IQType.result))
-                IsAuthenticated = true;
-            else
-                FireOnError(new AuthenticationFailedException());
-        }
-
-        private void JabberClient_OnStreamInit(Object sender, ElementStream stream)
-        {
-            stream.AddFactory(new jabber.protocol.client.Factory());
-            stream.AddFactory(new jabber.protocol.iq.Factory());
-            stream.AddFactory(new jabber.protocol.x.Factory());
-
-        }
-    }
-
-    /// <summary>
-    /// Contains the "Getting authorization" information.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class GetAuthState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// Gets the instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new GetAuthState();
-    }
-
-    /// <summary>
-    /// Contains the "Setting authorization" information.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SetAuthState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// Gets the instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new SetAuthState();
-    }
-
-    /// <summary>
-    /// Informs the client that the JabberClient is in
-    /// the "Waiting for manual login" state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ManualLoginState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// Gets the instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new ManualLoginState();
-    }
-
-    /// <summary>
-    /// Informs the client that the JabberClient is in
-    /// the "Waiting for manual login" state, but when Login()
-    /// happens, it should try SASL.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ManualSASLLoginState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// Gets the instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new ManualSASLLoginState();
-    }
-
-}
diff --git a/lib/jabber-net/jabber/client/JabberClient.resx b/lib/jabber-net/jabber/client/JabberClient.resx
deleted file mode 100644
index 8689d66..0000000
--- a/lib/jabber-net/jabber/client/JabberClient.resx
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<root>
-    <!-- 
-            Microsoft ResX Schema 
-        
-            Version 1.3
-                
-            The primary goals of this format is to allow a simple XML format 
-            that is mostly human readable. The generation and parsing of the 
-            various data types are done through the TypeConverter classes 
-            associated with the data types.
-        
-            Example:
-        
-                ... ado.net/XML headers & schema ...
-                <resheader name="resmimetype">text/microsoft-resx</resheader>
-                <resheader name="version">1.3</resheader>
-                <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-                <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-                <data name="Name1">this is my long string</data>
-                <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-                <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-                    [base64 mime encoded serialized .NET Framework object]
-                </data>
-                <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-                    [base64 mime encoded string representing a byte array form of the .NET Framework object]
-                </data>
-        
-            There are any number of "resheader" rows that contain simple 
-            name/value pairs.
-            
-            Each data row contains a name, and value. The row also contains a 
-            type or mimetype. Type corresponds to a .NET class that support 
-            text/value conversion through the TypeConverter architecture. 
-            Classes that don't support this are serialized and stored with the 
-            mimetype set.
-                     
-            The mimetype is used for serialized objects, and tells the 
-            ResXResourceReader how to depersist the object. This is currently not 
-            extensible. For a given mimetype the value must be set accordingly:
-        
-            Note - application/x-microsoft.net.object.binary.base64 is the format 
-                   that the ResXResourceWriter will generate, however the reader can 
-                   read any of the formats listed below.
-        
-            mimetype: application/x-microsoft.net.object.binary.base64
-            value   : The object must be serialized with 
-                    : System.Serialization.Formatters.Binary.BinaryFormatter
-                    : and then encoded with base64 encoding.
-        
-            mimetype: application/x-microsoft.net.object.soap.base64
-            value   : The object must be serialized with 
-                    : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-                    : and then encoded with base64 encoding.
-            mimetype: application/x-microsoft.net.object.bytearray.base64
-            value   : The object must be serialized into a byte array 
-                    : using a System.ComponentModel.TypeConverter
-                    : and then encoded with base64 encoding.
-        -->
-    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-        <xsd:element name="root" msdata:IsDataSet="true">
-            <xsd:complexType>
-                <xsd:choice maxOccurs="unbounded">
-                    <xsd:element name="data">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-                            <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-                            <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="resheader">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" use="required" />
-                        </xsd:complexType>
-                    </xsd:element>
-                </xsd:choice>
-            </xsd:complexType>
-        </xsd:element>
-    </xsd:schema>
-    <resheader name="resmimetype">
-        <value>text/microsoft-resx</value>
-    </resheader>
-    <resheader name="version">
-        <value>1.3</value>
-    </resheader>
-    <resheader name="reader">
-        <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <resheader name="writer">
-        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <data name="$this.Name">
-        <value>JabberClient</value>
-    </data>
-    <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-        <value>False</value>
-    </data>
-</root>
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/client/PresenceManager.bmp b/lib/jabber-net/jabber/client/PresenceManager.bmp
deleted file mode 100644
index 9949a2f..0000000
Binary files a/lib/jabber-net/jabber/client/PresenceManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/client/PresenceManager.cs b/lib/jabber-net/jabber/client/PresenceManager.cs
deleted file mode 100644
index 190bdd7..0000000
--- a/lib/jabber-net/jabber/client/PresenceManager.cs
+++ /dev/null
@@ -1,566 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Collections;
-using gen = System.Collections.Generic;
-using System.Diagnostics;
-
-using bedrock.util;
-using bedrock.collections;
-
-using jabber.protocol.client;
-using jabber.protocol.x;
-using jabber.protocol.iq;
-using jabber.connection;
-
-namespace jabber.client
-{
-
-    /// <summary>
-    /// Informs the client of a change of derived primary session for a user.
-    /// </summary>
-    /// <param name="sender">The PresenceManager object that sent the update</param>
-    /// <param name="bare">The bare JID (node at domain) of the user whose presence changed</param>
-    public delegate void PrimarySessionHandler(object sender, JID bare);
-
-    /// <summary>
-    /// Specifies the presence proxy database.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PresenceManager : jabber.connection.StreamComponent, IEnumerable
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-#pragma warning disable 0414
-        private System.ComponentModel.Container components = null;
-#pragma warning restore 0414
- 
-        private Tree m_items = new Tree();
-        private CapsManager m_caps = null;
-
-        /// <summary>
-        /// Constructs a PresenceManager object and adds it to a container.
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public PresenceManager(System.ComponentModel.IContainer container) : this()
-        {
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Constructs a new PresenceManager object.
-        /// </summary>
-        public PresenceManager()
-        {
-            InitializeComponent();
-
-            this.OnStreamChanged += new bedrock.ObjectHandler(PresenceManager_OnStreamChanged);
-        }
-
-        private void PresenceManager_OnStreamChanged(object sender)
-        {
-            JabberClient cli = m_stream as JabberClient;
-            if (cli == null)
-                return;
-
-            cli.OnPresence += new PresenceHandler(GotPresence);
-            cli.OnDisconnect += new bedrock.ObjectHandler(GotDisconnect);
-        }
-
-        /// <summary>
-        /// Gets or sets the JabberClient associated with the Presence Manager.
-        /// </summary>
-        [Description("Gets or sets the JabberClient associated with the Presence Manager.")]
-        [Category("Jabber")]
-        [Browsable(false)]
-        [Obsolete("Use the Stream property instead")]
-        [ReadOnly(true)]
-        public JabberClient Client
-        {
-            get { return (JabberClient)this.Stream; }
-            set { this.Stream = value; }
-        }
-
-        /// <summary>
-        /// The CapsManager for this view
-        /// </summary>
-        [Category("Jabber")]
-        public CapsManager CapsManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a CapsManager
-                if ((m_caps == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.CapsManager = (CapsManager)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(CapsManager));
-                }
-                return m_caps;
-            }
-            set
-            {
-                if ((object)m_caps == (object)value)
-                    return;
-                m_caps = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets the current presence state as a string.
-        /// </summary>
-        /// <returns>string in the format '{bare JID}={list of presence stanzas}, ...'</returns>
-        public override string ToString()
-        {
-            return m_items.ToString();
-        }
-
-        /// <summary>
-        /// Informs the client that the primary session has changed for a user.
-        /// </summary>
-        public event PrimarySessionHandler OnPrimarySessionChange;
-
-        private void GotDisconnect(object sender)
-        {
-            lock(this)
-                m_items.Clear();
-        }
-
-        /// <summary>
-        /// Adds a new available or unavailable presence packet to the database.
-        /// </summary>
-        /// <param name="p">Presence stanza to add.</param>
-        public void AddPresence(Presence p)
-        {
-            // can't use .From, since that will cause a JID parse.
-            Debug.Assert(p.GetAttribute("from") != "",
-                "Do not call AddPresence by hand.  I can tell you are doing that because you didn't put a from address on your presence packet, and all presences from the server have a from address.");
-            GotPresence(this, p);
-        }
-
-        private void GotPresence(object sender, Presence p)
-        {
-            PresenceType t = p.Type;
-            if ((t != PresenceType.available) &&
-                (t != PresenceType.unavailable))
-                return;
-
-            JID f = p.From;
-            lock (this)
-            {
-                UserPresenceManager upm = (UserPresenceManager)m_items[f.Bare];
-
-                if (t == PresenceType.available)
-                {
-                    if (upm == null)
-                    {
-                        upm = new UserPresenceManager(f.Bare);
-                        m_items[f.Bare] = upm;
-                    }
-
-                    upm.AddPresence(p, this);
-                }
-                else
-                {
-                    if (upm != null)
-                    {
-                        upm.RemovePresence(p, this);
-                        if (upm.Count == 0)
-                        {
-                            m_items.Remove(f.Bare);
-                        }
-                    }
-                }
-            }
-        }
-
-        private void FireOnPrimarySessionChange(JID from)
-        {
-            if (OnPrimarySessionChange != null)
-                OnPrimarySessionChange(this, from);
-        }
-
-        /// <summary>
-        /// Determines if a specified JID is online with any resources.
-        /// This performs better than retrieving the particular associated presence packet.
-        /// </summary>
-        /// <param name="jid">The JID to look up.</param>
-        /// <returns>If true, the user is online; otherwise the user is offline</returns>
-        public bool IsAvailable(JID jid)
-        {
-            lock (this)
-            {
-                return (m_items[jid.Bare] != null);
-            }
-        }
-
-        /// <summary>
-        /// Gets the primary presence if given a bare JID.
-        /// If given a FQJ, returns the associated presence.
-        /// </summary>
-        public Presence this[JID jid]
-        {
-            get
-            {
-                lock (this)
-                {
-                    UserPresenceManager upm = (UserPresenceManager)m_items[jid.Bare];
-                    if (upm == null)
-                        return null;
-                    return upm[jid.Resource];
-                }
-            }
-        }
-
-        /// <summary>
-        /// Get the features associated with the JID.  If a bare JID is passed in, this will be 
-        /// a union of all of the features for all of the resources of this user.  Otherwise,
-        /// it will be the features for the given resource.
-        /// 
-        /// Requires a CapsManager to be set before use.
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <returns>Null if no features are known.</returns>
-        public StringSet GetFeatures(JID jid)
-        {
-            if (m_caps == null)
-                return null;
-
-            lock (this)
-            {
-                UserPresenceManager upm = (UserPresenceManager)m_items[jid.Bare];
-                if (upm == null)
-                    return null;
-                return upm.GetFeatures(m_caps, jid.Resource);
-            }
-        }
-
-        /// <summary>
-        /// Does the given JID implement the given feature?  Bare JID asks if any
-        /// resource of that user implements that feature.  Full JID asks if the
-        /// given resource implements that feature.
-        /// 
-        /// Requires a CapsManager to be set before use.
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <param name="featureURI"></param>
-        /// <returns>True if the feaure is implemented</returns>
-        public bool HasFeature(JID jid, string featureURI)
-        {
-            StringSet feats = GetFeatures(jid);
-            if (feats == null)
-                return false;
-            return feats[featureURI];
-        }
-
-        /// <summary>
-        /// Get the most available full JID that implements the given feature.  Unlike
-        /// most routines in PresenceManager, may also return JIDs that have negative
-        /// presence.  If a full JID is specified, this is effectively the same as
-        /// HasFeature, but null will be returned if the feature isn't implemented.
-        /// 
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <param name="featureURI"></param>
-        /// <returns>null if none found</returns>
-        public JID GetFeatureJID(JID jid, string featureURI)
-        {
-            if (jid.Resource != null)
-            {
-                if (HasFeature(jid, featureURI))
-                    return jid;
-                return null;
-            }
-
-            lock (this)
-            {
-                UserPresenceManager upm = (UserPresenceManager)m_items[jid.Bare];
-                if (upm == null)
-                    return null;
-                return upm.GetFeatureJID(m_caps, featureURI);
-            }
-        }
-
-        /// <summary>
-        /// Gets all of the current presence stanzas for the given user.
-        /// </summary>
-        /// <param name="jid">User who's presence stanzas you want.</param>
-        /// <returns>Array of presence stanzas for the given user.</returns>
-        public Presence[] GetAll(JID jid)
-        {
-            UserPresenceManager upm = (UserPresenceManager)m_items[jid.Bare];
-            if (upm == null)
-                return new Presence[0];
-            return upm.GetAll();
-        }
-
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-        #endregion
-
-        /// <summary>
-        /// Iterate over all of the JIDs we have not-unavilable presence from.
-        /// </summary>
-        /// <returns></returns>
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return new UserPresenceManagerEnumerator(m_items.Values);
-        }
-
-        private class UserPresenceManagerEnumerator : IEnumerator
-        {
-            private IEnumerator m_enum;
-
-            public UserPresenceManagerEnumerator(ICollection values)
-            {
-                m_enum = values.GetEnumerator();
-            }
-
-            #region IEnumerator Members
-            public object Current
-            {
-                get
-                {
-                    UserPresenceManager m = (UserPresenceManager)m_enum.Current;
-                    if (m == null)
-                        return null;
-                    return m.JID;
-                }
-            }
-
-            public bool MoveNext()
-            {
-                return m_enum.MoveNext();
-            }
-
-            public void Reset()
-            {
-                m_enum.Reset();
-            }
-
-            #endregion
-        }
-
-        /// <summary>
-        /// Manage the presence for all of the resources of a user.  No locking is performed,
-        /// since PresenceManager is already doing locking.
-        ///
-        /// The intent of this class is to be able to deliver the last presence stanza
-        /// from the "most available" resource.
-        /// Note that negative priority sessions are never the most available.
-        /// </summary>
-        private class UserPresenceManager
-        {
-            // List sorted by presence availability, in ascending order.
-            // most-available is always last.
-            private gen.LinkedList<Presence> m_all = new gen.LinkedList<Presence>();
-            private JID m_jid = null;
-
-            public UserPresenceManager(JID jid)
-            {
-                Debug.Assert(jid.Resource == null);
-                m_jid = jid;
-            }
-
-            public JID JID
-            {
-                get { return m_jid; }
-            }
-
-            public override string ToString()
-            {
-                System.IO.StringWriter sw = new System.IO.StringWriter();
-                sw.WriteLine("{");
-                foreach (Presence p in m_all)
-                    sw.WriteLine(p.OuterXml);
-                sw.WriteLine("}");
-                return sw.ToString();
-            }
-
-            private void Primary(Presence p, PresenceManager handler)
-            {
-                Debug.Assert((p == null) ? true : (p.IntPriority >= 0), "Primary presence is always positive priority");
-                handler.FireOnPrimarySessionChange(m_jid);
-            }
-
-            private gen.LinkedListNode<Presence> Find(string resource)
-            {
-                for (gen.LinkedListNode<Presence> n = m_all.First; n != null; n = n.Next)
-                {
-                    if (n.Value.From.Resource == resource)
-                        return n;
-                }
-                return null;
-            }
-
-            public void AddPresence(Presence p, PresenceManager handler)
-            {
-                JID from = p.From;
-                string res = from.Resource;
-                Debug.Assert(p.Type == PresenceType.available);
-
-                // If this is an update, remove the existing one.
-                // we'll add the new one back in, in the correct place.
-                gen.LinkedListNode<Presence> n = Find(res);
-                if (n != null)
-                    m_all.Remove(n);
-
-
-                gen.LinkedListNode<Presence> inserted = new gen.LinkedListNode<Presence>(p);
-                for (n = m_all.First; n != null; n = n.Next)
-                {
-                    if (p < n.Value)
-                    {
-                        m_all.AddBefore(n, inserted);
-                        break;
-                    }
-                }
-
-                // This is the highest one.
-                if (inserted.List == null)
-                {
-                    m_all.AddLast(inserted);
-                    if (p.IntPriority >= 0)
-                        Primary(p, handler);
-                }
-            }
-
-            public void RemovePresence(Presence p, PresenceManager handler)
-            {
-                JID from = p.From;
-                string res = from.Resource;
-                Debug.Assert(p.Type == PresenceType.unavailable);
-
-                gen.LinkedListNode<Presence> n = Find(res);
-
-                // unavail for a resource we haven't gotten presence from.
-                if (n == null)
-                    return;
-
-                gen.LinkedListNode<Presence> last = m_all.Last;
-                m_all.Remove(n);
-
-                if (last == n)
-                {
-                    // current high-pri.
-                    if ((m_all.Last != null) && (m_all.Last.Value.IntPriority >= 0))
-                        Primary(m_all.Last.Value, handler);
-                    else
-                    {
-                        // last non-negative presence went away
-                        if (n.Value.IntPriority >= 0)
-                            Primary(null, handler);
-                    }
-                }
-            }
-
-            public int Count
-            {
-                get { return m_all.Count; }
-            }
-
-            public Presence this[string Resource]
-            {
-                get
-                {
-                    gen.LinkedListNode<Presence> n;
-                    if (Resource == null)
-                    {
-                        // get highest non-negative for this bare JID.
-                        n = m_all.Last;
-
-                        if ((n != null) && (n.Value.IntPriority >= 0))
-                            return n.Value;
-                    }
-                    else
-                    {
-                        n = Find(Resource);
-                        if (n != null)
-                            return n.Value;
-                    }
-                    return null;
-                }
-            }
-
-            public Presence[] GetAll()
-            {
-                Presence[] all = new Presence[m_all.Count];
-                m_all.CopyTo(all, 0);
-                return all;
-            }
-
-            private StringSet GetFeatures(CapsManager caps, Presence p)
-            {
-                if (p == null)
-                    return null;
-
-                Caps c = p.GetChildElement<Caps>();
-                if (c == null)
-                    return null;
-
-                DiscoInfo di = caps[c.Version];
-                if (di == null)
-                    return null;
-
-                return di.FeatureSet;
-            }
-
-            public StringSet GetFeatures(CapsManager caps, string resource)
-            {
-                if (resource == null)
-                    return GetAllFeatures(caps);
-
-                return GetFeatures(caps, this[resource]);
-            }
-
-            public StringSet GetAllFeatures(CapsManager caps)
-            {
-                if (caps == null)
-                    throw new ArgumentNullException("caps");
-
-                StringSet features = new StringSet();
-                foreach (Presence p in m_all)
-                {
-                    StringSet f = GetFeatures(caps, p);
-                    if (f != null)
-                        features.Add(f);
-                }
-                return features;
-            }
-
-            public JID GetFeatureJID(CapsManager caps, string featureURI)
-            {
-                gen.LinkedListNode<Presence> n;
-                for (n = m_all.Last; n != null; n = n.Previous)
-                {
-                    StringSet f = GetFeatures(caps, n.Value);
-                    if ((f != null) && f.Contains(featureURI))
-                        return n.Value.From;
-                }
-                return null;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/client/PresenceManager.resx b/lib/jabber-net/jabber/client/PresenceManager.resx
deleted file mode 100644
index d5a1efd..0000000
--- a/lib/jabber-net/jabber/client/PresenceManager.resx
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<root>
-    <!-- 
-            Microsoft ResX Schema 
-        
-            Version 1.3
-                
-            The primary goals of this format is to allow a simple XML format 
-            that is mostly human readable. The generation and parsing of the 
-            various data types are done through the TypeConverter classes 
-            associated with the data types.
-        
-            Example:
-        
-                ... ado.net/XML headers & schema ...
-                <resheader name="resmimetype">text/microsoft-resx</resheader>
-                <resheader name="version">1.3</resheader>
-                <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-                <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-                <data name="Name1">this is my long string</data>
-                <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-                <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-                    [base64 mime encoded serialized .NET Framework object]
-                </data>
-                <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-                    [base64 mime encoded string representing a byte array form of the .NET Framework object]
-                </data>
-        
-            There are any number of "resheader" rows that contain simple 
-            name/value pairs.
-            
-            Each data row contains a name, and value. The row also contains a 
-            type or mimetype. Type corresponds to a .NET class that support 
-            text/value conversion through the TypeConverter architecture. 
-            Classes that don't support this are serialized and stored with the 
-            mimetype set.
-                     
-            The mimetype is used for serialized objects, and tells the 
-            ResXResourceReader how to depersist the object. This is currently not 
-            extensible. For a given mimetype the value must be set accordingly:
-        
-            Note - application/x-microsoft.net.object.binary.base64 is the format 
-                   that the ResXResourceWriter will generate, however the reader can 
-                   read any of the formats listed below.
-        
-            mimetype: application/x-microsoft.net.object.binary.base64
-            value   : The object must be serialized with 
-                    : System.Serialization.Formatters.Binary.BinaryFormatter
-                    : and then encoded with base64 encoding.
-        
-            mimetype: application/x-microsoft.net.object.soap.base64
-            value   : The object must be serialized with 
-                    : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-                    : and then encoded with base64 encoding.
-            mimetype: application/x-microsoft.net.object.bytearray.base64
-            value   : The object must be serialized into a byte array 
-                    : using a System.ComponentModel.TypeConverter
-                    : and then encoded with base64 encoding.
-        -->
-    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-        <xsd:element name="root" msdata:IsDataSet="true">
-            <xsd:complexType>
-                <xsd:choice maxOccurs="unbounded">
-                    <xsd:element name="data">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-                            <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-                            <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="resheader">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" use="required" />
-                        </xsd:complexType>
-                    </xsd:element>
-                </xsd:choice>
-            </xsd:complexType>
-        </xsd:element>
-    </xsd:schema>
-    <resheader name="resmimetype">
-        <value>text/microsoft-resx</value>
-    </resheader>
-    <resheader name="version">
-        <value>1.3</value>
-    </resheader>
-    <resheader name="reader">
-        <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <resheader name="writer">
-        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <data name="$this.Name">
-        <value>PresenceManager</value>
-    </data>
-    <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-        <value>False</value>
-    </data>
-</root>
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/client/RosterManager.bmp b/lib/jabber-net/jabber/client/RosterManager.bmp
deleted file mode 100644
index 6246d70..0000000
Binary files a/lib/jabber-net/jabber/client/RosterManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/client/RosterManager.cs b/lib/jabber-net/jabber/client/RosterManager.cs
deleted file mode 100644
index 5b1df37..0000000
--- a/lib/jabber-net/jabber/client/RosterManager.cs
+++ /dev/null
@@ -1,471 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Collections;
-using System.Diagnostics;
-
-using bedrock.collections;
-using bedrock.util;
-
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace jabber.client
-{
-    /// <summary>
-    /// Informs the client of roster items.
-    /// </summary>
-    public delegate void RosterItemHandler(object sender, Item ri);
-
-    /// <summary>
-    /// Informs the client of a subscription requests.
-    /// </summary>
-    /// <param name="manager">The RosterManager than detected the subscription</param>
-    /// <param name="ri">The affected roster item, in its current state.  Null if not found.</param>
-    /// <param name="pres">The inbound presence stanza</param>
-    public delegate void SubscriptionHandler(RosterManager manager, Item ri, Presence pres);
-
-    /// <summary>
-    /// Manages unsubscription notifications.
-    /// </summary>
-    /// <param name="manager">The RosterManager than detected the subscription</param>
-    /// <param name="remove">Set this to false to prevent the user being removed from the roster.</param>
-    /// <param name="pres">The inbound presence stanza</param>
-    public delegate void UnsubscriptionHandler(RosterManager manager, Presence pres, ref bool remove);
-
-    /// <summary>
-    /// Determines how the RosterManager deals with incoming subscriptions.
-    /// </summary>
-    public enum AutoSubscriptionHanding
-    {
-        /// <summary>
-        /// Do not do any automatic processing
-        /// </summary>
-        NONE = 0,
-        /// <summary>
-        /// Reply with a subscribed to every subscribe
-        /// </summary>
-        AllowAll,
-        /// <summary>
-        /// Reply with an unsubscribed to every subscribe
-        /// </summary>
-        DenyAll,
-        /// <summary>
-        /// If the user is either subscribed or trying to subscribe to another user,
-        /// allow the other user's subscription.
-        /// Otherwise, treat as NONE, and fire the OnSubscribe event.
-        /// </summary>
-        AllowIfSubscribed,
-    }
-
-    /// <summary>
-    /// Manages the roster of the client.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RosterManager : jabber.connection.StreamComponent, IEnumerable
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-#pragma warning disable 0414
-        private System.ComponentModel.Container components = null;
-#pragma warning restore 0414
-        private Tree m_items = new Tree();
-        private AutoSubscriptionHanding m_autoAllow = AutoSubscriptionHanding.NONE;
-        private bool m_autoSubscribe = false;
-
-        /// <summary>
-        /// Creates a new roster manager inside a container.
-        /// </summary>
-        /// <param name="container">Parent container</param>
-        public RosterManager(System.ComponentModel.IContainer container) : this()
-        {
-            // Required for Windows.Forms Class Composition Designer support
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Creates a new roster manager.
-        /// </summary>
-        public RosterManager()
-        {
-            // Required for Windows.Forms Class Composition Designer support
-            InitializeComponent();
-            this.OnStreamChanged += new bedrock.ObjectHandler(RosterManager_OnStreamChanged);
-        }
-
-        private void RosterManager_OnStreamChanged(object sender)
-        {
-            JabberClient cli = m_stream as JabberClient;
-            if (cli == null)
-                return;
-            cli.OnIQ += new IQHandler(GotIQ);
-            cli.OnPresence += new PresenceHandler(cli_OnPresence);
-            cli.OnDisconnect += new bedrock.ObjectHandler(GotDisconnect);
-        }
-
-
-        /// <summary>
-        /// Gets or sets the Jabber client associated with the Roster Manager.
-        /// </summary>
-        [Description("The JabberClient to hook up to.")]
-        [Category("Jabber")]
-        [Browsable(false)]
-        [Obsolete("Use the Stream property instead")]
-        [ReadOnly(true)]
-        public JabberClient Client
-        {
-            get { return (JabberClient) this.Stream; }
-            set { this.Stream = value; }
-        }
-
-        /// <summary>
-        /// Gets the AutoSubscription Handling value for inbound subscriptions.
-        /// </summary>
-        [Description("How to handle inbound subscriptions")]
-        [Category("Jabber")]
-        [DefaultValue(AutoSubscriptionHanding.NONE)]
-        public AutoSubscriptionHanding AutoAllow
-        {
-            get { return m_autoAllow; }
-            set { m_autoAllow = value; }
-        }
-
-        /// <summary>
-        /// Determines whether auto-subscribe is enabled or disabled for a user.
-        /// </summary>
-        [Description("Should we subscribe to a user whenever we allow a subscription from them?")]
-        [Category("Jabber")]
-        [DefaultValue(false)]
-        public bool AutoSubscribe
-        {
-            get { return m_autoSubscribe; }
-            set { m_autoSubscribe = value; }
-        }
-
-        /// <summary>
-        /// Informs the client that is has new roster items.
-        /// </summary>
-        [Description("Convenience event for new roster items.")]
-        [Category("Jabber")]
-        public event RosterItemHandler OnRosterItem;
-
-        /// <summary>
-        /// Informs the client when a roster result starts, before any OnRosterItem events fire.
-        /// This will not fire for type='set'.
-        /// </summary>
-        [Description("Roster result about to start being processed.")]
-        [Category("Jabber")]
-        public event bedrock.ObjectHandler OnRosterBegin;
-
-        /// <summary>
-        /// Informs the client that the roster has been retrieved from the XMPP server.
-        /// </summary>
-        [Description("Roster result finished being processed.")]
-        [Category("Jabber")]
-        public event bedrock.ObjectHandler OnRosterEnd;
-
-        /// <summary>
-        /// Informs the client that a subscription request was received that cannot be auto-handled.
-        /// </summary>
-        [Description("Subscription request received that cannot be auto-handled")]
-        [Category("Jabber")]
-        public event SubscriptionHandler OnSubscription;
-
-        /// <summary>
-        /// Informs the client that an Unsubscribe/Unsubscribed notification from another
-        /// user. By default, the user will be removed from the roster after this event
-        /// fires. To prevent this, you need to set the remove property to false.
-        /// </summary>
-        [Description("Unsubscribe/Unsubscribed notification from other user")]
-        [Category("Jabber")]
-        public event UnsubscriptionHandler OnUnsubscription;
-
-        /// <summary>
-        /// Returns a string that represents the current object.
-        /// </summary>
-        public override string ToString()
-        {
-            return m_items.ToString();
-        }
-
-        /// <summary>
-        /// Gets the currently-known version of a roster item for this JID.
-        /// </summary>
-        public Item this[JID jid]
-        {
-            get
-            {
-                lock (this)
-                    return (Item) m_items[jid];
-            }
-        }
-
-        /// <summary>
-        /// Gets the number of items currently in the roster.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                lock (this)
-                    return m_items.Count;
-            }
-        }
-
-        private void GotDisconnect(object sender)
-        {
-            lock (this)
-                m_items.Clear();
-        }
-
-        private void cli_OnPresence(object sender, Presence pres)
-        {
-            PresenceType typ = pres.Type;
-            switch (typ)
-            {
-            case PresenceType.available:
-            case PresenceType.unavailable:
-            case PresenceType.error:
-            case PresenceType.probe:
-                return;
-            case PresenceType.subscribe:
-                switch (m_autoAllow)
-                {
-                case AutoSubscriptionHanding.AllowAll:
-                    ReplyAllow(pres);
-                    return;
-                case AutoSubscriptionHanding.DenyAll:
-                    ReplyDeny(pres);
-                    return;
-                case AutoSubscriptionHanding.NONE:
-                    if (OnSubscription != null)
-                        OnSubscription(this, this[pres.From], pres);
-                    return;
-                case AutoSubscriptionHanding.AllowIfSubscribed:
-                    Item ri = this[pres.From];
-                    if (ri != null)
-                    {
-                        switch (ri.Subscription)
-                        {
-                        case Subscription.to:
-                            ReplyAllow(pres);
-                            return;
-                        case Subscription.from:
-                        case Subscription.both:
-                            // Almost an assert
-                            throw new InvalidOperationException("Server sent a presence subscribe for an already-subscribed contact");
-                        case Subscription.none:
-                            if (ri.Ask == Ask.subscribe)
-                            {
-                                ReplyAllow(pres);
-                                return;
-                            }
-                            break;
-                        }
-                    }
-                    if (OnSubscription != null)
-                        OnSubscription(this, ri, pres);
-                    break;
-                }
-                break;
-            case PresenceType.subscribed:
-                // the contact has given us permission to see presence updates
-                break;
-            case PresenceType.unsubscribe:
-                // the contact does not wish to see our presence updates anymore
-                // that's fine, who cares?
-                break;
-            case PresenceType.unsubscribed:
-                bool remove = true;
-                if (OnUnsubscription != null)
-                    OnUnsubscription(this, pres, ref remove);
-
-                if (remove)
-                    Remove(pres.From);
-                // the contact has taken away our permission to see presence updates
-                break;
-            }
-        }
-
-        /// <summary>
-        /// Adds a new roster item to the database.
-        /// </summary>
-        /// <param name="iq">An IQ containing a roster query.</param>
-        public void AddRoster(IQ iq)
-        {
-            GotIQ(this, iq);
-        }
-
-        private void GotIQ(object sender, IQ iq)
-        {
-            if ((iq.Query == null) ||
-                (iq.Query.NamespaceURI != jabber.protocol.URI.ROSTER) ||
-                ((iq.Type != IQType.result) && (iq.Type != IQType.set)))
-                return;
-
-            iq.Handled = true;
-            Roster r = (Roster) iq.Query;
-            if ((iq.Type == IQType.result) && (OnRosterBegin != null))
-                OnRosterBegin(this);
-
-            foreach (Item i in r.GetItems())
-            {
-                lock (this)
-                {
-                    if (i.Subscription == Subscription.remove)
-                    {
-                        m_items.Remove(i.JID);
-                    }
-                    else
-                    {
-                        if (m_items.Contains(i.JID))
-                            m_items.Remove(i.JID);
-                        m_items[i.JID] = i;
-                    }
-                }
-                if (OnRosterItem != null)
-                    OnRosterItem(this, i);
-            }
-
-            if ((iq.Type == IQType.result) && (OnRosterEnd != null))
-                OnRosterEnd(this);
-        }
-
-        public void Add(JID jid)
-        {
-            Item item = this[jid];
-            // only create a new roster item if it does not already exist
-            if (item == null) {
-                RosterIQ iq = new RosterIQ(m_stream.Document);
-                iq.Type = IQType.set;
-                Roster r = iq.Instruction;
-                item = r.AddItem();
-                item.JID = jid;
-                Write(iq);
-            }
-
-            // subscribe to presence
-            Presence sub = new Presence(m_stream.Document);
-            sub.To = jid;
-            sub.Type = PresenceType.subscribe;
-            Write(sub);
-        }
-
-        /// <summary>
-        /// Allows the subscription request and sends a subscribed to the user.
-        /// </summary>
-        /// <param name="pres">
-        /// The presence packet containing the subscription request.
-        /// </param>
-        public void ReplyAllow(Presence pres)
-        {
-            Debug.Assert(pres.Type == PresenceType.subscribe);
-            Allow(pres.From);
-        }
-
-        public void Allow(JID jid)
-        {
-            Presence reply = new Presence(m_stream.Document);
-            reply.To = jid;
-            reply.Type = PresenceType.subscribed;
-            Write(reply);
-
-            if (m_autoSubscribe)
-            {
-                Add(jid);
-            }
-        }
-
-        /// <summary>
-        /// Denies the subscription request.
-        /// </summary>
-        /// <param name="pres">
-        /// The presence packet containing the subscription request.
-        /// </param>
-        public void ReplyDeny(Presence pres)
-        {
-            Debug.Assert(pres.Type == PresenceType.subscribe);
-            Deny(pres.From);
-        }
-
-        public void Deny(JID jid)
-        {
-            Presence reply = new Presence(m_stream.Document);
-            reply.To = jid;
-            reply.Type = PresenceType.unsubscribed;
-            Write(reply);
-        }
-
-        /// <summary>
-        /// Remove a contact from the roster
-        /// </summary>
-        /// <param name="jid">Typically just a user at host JID</param>
-        public void Remove(JID jid)
-        {
-/*
-C: <iq from='juliet at example.com/balcony' type='set' id='delete_1'>
-     <query xmlns='jabber:iq:roster'>
-       <item jid='nurse at example.com' subscription='remove'/>
-     </query>
-   </iq>
- */
-            RosterIQ iq = new RosterIQ(m_stream.Document);
-            iq.Type = IQType.set;
-            Roster r = iq.Instruction;
-            Item item = r.AddItem();
-            item.JID = jid;
-            item.Subscription = Subscription.remove;
-            Write(iq);  // ignore response
-        }
-
-        /// <summary>
-        /// Modifies the roster item to look like the given roster item.
-        /// This does not modify the model,
-        /// but waits for roster pushes from the XMPP server.
-        /// </summary>
-        /// <param name="item">Roster item that will appear in the roster.</param>
-        public void Modify(Item item)
-        {
-            RosterIQ iq = new RosterIQ(m_stream.Document);
-            iq.Type = IQType.set;
-            Roster r = iq.Instruction;
-            r.AddChild(item);
-            Write(iq);  // ignore response
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-        #endregion
-
-        #region IEnumerable Members
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return m_items.Keys.GetEnumerator();
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/client/RosterManager.resx b/lib/jabber-net/jabber/client/RosterManager.resx
deleted file mode 100644
index 5413f14..0000000
--- a/lib/jabber-net/jabber/client/RosterManager.resx
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<root>
-    <!-- 
-            Microsoft ResX Schema 
-        
-            Version 1.3
-                
-            The primary goals of this format is to allow a simple XML format 
-            that is mostly human readable. The generation and parsing of the 
-            various data types are done through the TypeConverter classes 
-            associated with the data types.
-        
-            Example:
-        
-                ... ado.net/XML headers & schema ...
-                <resheader name="resmimetype">text/microsoft-resx</resheader>
-                <resheader name="version">1.3</resheader>
-                <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-                <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-                <data name="Name1">this is my long string</data>
-                <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-                <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-                    [base64 mime encoded serialized .NET Framework object]
-                </data>
-                <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-                    [base64 mime encoded string representing a byte array form of the .NET Framework object]
-                </data>
-        
-            There are any number of "resheader" rows that contain simple 
-            name/value pairs.
-            
-            Each data row contains a name, and value. The row also contains a 
-            type or mimetype. Type corresponds to a .NET class that support 
-            text/value conversion through the TypeConverter architecture. 
-            Classes that don't support this are serialized and stored with the 
-            mimetype set.
-                     
-            The mimetype is used for serialized objects, and tells the 
-            ResXResourceReader how to depersist the object. This is currently not 
-            extensible. For a given mimetype the value must be set accordingly:
-        
-            Note - application/x-microsoft.net.object.binary.base64 is the format 
-                   that the ResXResourceWriter will generate, however the reader can 
-                   read any of the formats listed below.
-        
-            mimetype: application/x-microsoft.net.object.binary.base64
-            value   : The object must be serialized with 
-                    : System.Serialization.Formatters.Binary.BinaryFormatter
-                    : and then encoded with base64 encoding.
-        
-            mimetype: application/x-microsoft.net.object.soap.base64
-            value   : The object must be serialized with 
-                    : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-                    : and then encoded with base64 encoding.
-            mimetype: application/x-microsoft.net.object.bytearray.base64
-            value   : The object must be serialized into a byte array 
-                    : using a System.ComponentModel.TypeConverter
-                    : and then encoded with base64 encoding.
-        -->
-    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-        <xsd:element name="root" msdata:IsDataSet="true">
-            <xsd:complexType>
-                <xsd:choice maxOccurs="unbounded">
-                    <xsd:element name="data">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-                            <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-                            <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="resheader">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" use="required" />
-                        </xsd:complexType>
-                    </xsd:element>
-                </xsd:choice>
-            </xsd:complexType>
-        </xsd:element>
-    </xsd:schema>
-    <resheader name="resmimetype">
-        <value>text/microsoft-resx</value>
-    </resheader>
-    <resheader name="version">
-        <value>1.3</value>
-    </resheader>
-    <resheader name="reader">
-        <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <resheader name="writer">
-        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-    </resheader>
-    <data name="$this.Name">
-        <value>RosterManager</value>
-    </data>
-    <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-        <value>False</value>
-    </data>
-</root>
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/connection/BindingStanzaStream.cs b/lib/jabber-net/jabber/connection/BindingStanzaStream.cs
deleted file mode 100644
index ff14be9..0000000
--- a/lib/jabber-net/jabber/connection/BindingStanzaStream.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using bedrock.net;
-using jabber.protocol.stream;
-
-namespace jabber.connection
-{
-	class BindingStanzaStream : HttpStanzaStream
-	{
-	    public BindingStanzaStream(IStanzaEventListener listener) : base(listener)
-	    {
-	    }
-
-	    protected override BaseSocket CreateSocket()
-	    {
-	        XEP124Socket sock = new XEP124Socket(this);
-            ProxyType pt = (ProxyType)m_listener[Options.PROXY_TYPE];
-            if (pt == ProxyType.HTTP)
-            {
-                string host = m_listener[Options.PROXY_HOST] as string;
-                int port = (int)m_listener[Options.PROXY_PORT];
-                if (port == -1)
-                    port = 80;
-                string proxy_uri = string.Format("http://{0}:{1}/", host, port);
-                sock.ProxyURI = new System.Uri(proxy_uri);
-                string user = m_listener[Options.PROXY_USER] as string;
-                if ((user != null) && (user != ""))
-                {
-                    sock.ProxyCredentials = new System.Net.NetworkCredential(user,
-                        m_listener[Options.PROXY_PW] as string);
-                }
-            }
-            return sock;
-	    }
-
-        public override void WriteStartTag(Stream stream)
-        {
-            // We don't send the <stream:stream> tag in XEP 124.
-            XEP124Socket mySock = ((XEP124Socket) Socket);
-            mySock.NS = stream.NS;
-            mySock.Write(null, 0, 0);
-        }
-
-        public override void Close(bool clean)
-        {
-            // We don't send the </stream:stream> tag in XEP 124.
-            base.Close(false);
-        }
-	}
-}
diff --git a/lib/jabber-net/jabber/connection/CapsManager.bmp b/lib/jabber-net/jabber/connection/CapsManager.bmp
deleted file mode 100644
index 4fb7089..0000000
Binary files a/lib/jabber-net/jabber/connection/CapsManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/connection/CapsManager.cs b/lib/jabber-net/jabber/connection/CapsManager.cs
deleted file mode 100644
index f247117..0000000
--- a/lib/jabber-net/jabber/connection/CapsManager.cs
+++ /dev/null
@@ -1,573 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Diagnostics;
-using System.Security.Cryptography;
-using System.Text;
-using System.Xml;
-
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using jabber.protocol.x;
-
-using bedrock.util;
-using bedrock.io;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages the entity capabilities information for the local connection as well as remote ones.
-    /// See XEP-0115, version 1.5 for details.
-    /// </summary>
-    [SVN("$Id$")]
-    public class CapsManager: StreamComponent
-    {
-        /// <summary>
-        /// Defines the default hash function to use for calculating ver attributes.
-        /// </summary>
-        public const string DEFAULT_HASH = "sha-1";
-        private const string SEP = "<";
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        private DiscoNode m_disco;
-        private string m_hash = DEFAULT_HASH;
-        private string m_ver = null;
-
-        private FileMap<DiscoInfo> m_cache = null;
-        private DiscoManager m_discoManager = null;
-
-        /// <summary>
-        /// Creates a new capability manager.
-        /// </summary>
-        public CapsManager() : this((DiscoNode)null)
-        {
-        }
-
-        /// <summary>
-        /// Creates a new capability manager and associates it with a container.
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public CapsManager(IContainer container) : this((DiscoNode)null)
-        {
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Create a CapsManager from an existing Disco Node.  Pass in null
-        /// to use a placeholder.
-        /// </summary>
-        /// <param name="node"></param>
-        public CapsManager(DiscoNode node)
-        {
-            InitializeComponent();
-            this.OnStreamChanged += new bedrock.ObjectHandler(CapsManager_OnStreamChanged);
-
-            if (node == null)
-                m_disco = new DiscoNode(new JID(null, "placeholder", null), null);
-            else
-                m_disco = node;
-        }
-
-        /// <summary>
-        /// Performs tasks associated with freeing, releasing, or resetting resources.
-        /// </summary>
-        /// <param name="disposing">
-        /// True if managed resources should be disposed; otherwise, false.
-        /// </param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        /// <summary>
-        /// The RosterManager for this view
-        /// </summary>
-        [Category("Cache")]
-        public DiscoManager DiscoManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a RosterManager
-                if ((m_discoManager == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.DiscoManager = (DiscoManager)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(DiscoManager));
-                }
-                return m_discoManager;
-            }
-            set
-            {
-                if ((object)m_discoManager == (object)value)
-                    return;
-                m_discoManager = value;
-            }
-        }
-
-        /// <summary>
-        /// The file to store a cache of all received caps into.  If no cache file is supplied,
-        /// caps queries will not be generated.
-        /// </summary>
-        [Category("Cache")]
-        public string FileName
-        {
-            get
-            {
-                if (m_cache == null)
-                    return null;
-                return m_cache.FileName;
-            }
-            set
-            {
-                if (m_cache == null)
-                {
-                    ElementFactory ef = new ElementFactory();
-                    ef.AddType(new jabber.protocol.iq.Factory());
-
-                    m_cache = new FileMap<DiscoInfo>(value, ef);
-                }
-                else
-                    m_cache.FileName = value;
-            }
-        }
-
-        /// <summary>
-        /// Adds a feature to the feature list
-        /// </summary>
-        /// <param name="feature"></param>
-        public void AddFeature(string feature)
-        {
-            m_ver = null;
-            m_disco.AddFeature(feature);
-        }
-
-        /// <summary>
-        /// Removes a feature from the feature list
-        /// </summary>
-        /// <param name="feature"></param>
-        public void RemoveFeature(string feature)
-        {
-            m_ver = null;
-            m_disco.RemoveFeature(feature);
-        }
-
-        /// <summary>
-        /// Gets or sets the current features enabled by this entity.
-        /// </summary>
-        [Category("Capabilities")]
-        [DefaultValue(null)]
-        public string[] Features
-        {
-            get
-            {
-                if (m_disco.Features == null)
-                    return new string[0];
-                return m_disco.FeatureNames;
-            }
-            set
-            {
-                m_ver = null;
-                m_disco.ClearFeatures();
-                if (value != null)
-                    foreach (string feature in value)
-                        m_disco.AddFeature(feature);
-            }
-        }
-
-        private static HashAlgorithm GetHasher(string name)
-        {
-            switch (name)
-            {
-            case null:
-                return null;
-            case "sha-1":
-                return SHA1.Create();
-            case "sha-256":
-                return SHA256.Create();
-            case "sha-512":
-                return SHA512.Create();
-            case "sha-384":
-                return SHA384.Create();
-            case "md5":
-                return MD5.Create();
-            }
-            throw new ArgumentException("Invalid hash method: " + name, "Hash");
-        }
-
-        /// <summary>
-        /// Gets or sets the hash algorithm to use.
-        /// </summary>
-        [Category("Capabilities")]
-        [DefaultValue(DEFAULT_HASH)]
-        public string Hash
-        {
-            get { return m_hash; }
-            set
-            {
-                GetHasher(value);  // throws if bad.
-                m_hash = value;
-            }
-        }
-
-        private string CalculateVer(DiscoNode n)
-        {
-            if (m_hash == null)
-                return null;
-
-            // 1. Initialize an empty string S.
-            StringBuilder S = new StringBuilder();
-
-            // 2. Sort the service discovery identities [16] by category and then by type
-            // (if it exists) and then by xml:lang (if it exists), formatted as
-            // CATEGORY '/' [TYPE] '/' [LANG] '/' [NAME]. Note that each slash is
-            // included even if the TYPE, LANG, or NAME is not included.
-            Ident[] ids = n.GetIdentities();
-            Array.Sort(ids);
-
-            // 3. For each identity, append the 'category/type/lang/name' to S, followed by
-            // the '<' character.
-            foreach (Ident id in ids)
-            {
-                S.Append(id.Key);
-                S.Append(SEP);
-            }
-
-            // 4. Sort the supported service discovery features.
-            string[] features = n.FeatureNames;
-            Array.Sort(features);
-
-            // 5. For each feature, append the feature to S, followed by the '<' character.
-            foreach (string feature in features)
-            {
-                S.Append(feature);
-                S.Append(SEP);
-            }
-
-            // 6. If the service discovery information response includes XEP-0128 data forms, 
-            // sort the forms by the FORM_TYPE (i.e., by the XML character 
-            // data of the <value/> element).
-            Data[] ext = n.Extensions;
-            if (ext != null)
-            {
-                Array.Sort(ext, new FormTypeComparer());
-                foreach (Data x in ext)  
-                {
-                    // For each extended service discovery information form:
-
-                    // 1. Append the XML character data of the FORM_TYPE field's <value/> 
-                    // element, followed by the '<' character.
-                    S.Append(x.FormType);
-                    S.Append(SEP);
-
-                    // 2. Sort the fields by the value of the "var" attribute.
-                    bedrock.collections.Tree fields = new bedrock.collections.Tree();
-                    foreach (Field f in x.GetFields())
-                        fields[f.Var] = f;
-
-                    // 3. For each field:
-                    foreach (System.Collections.DictionaryEntry entry in fields)
-                    {
-                        Field f = (Field)entry.Value;
-                        if (f.Var == "FORM_TYPE")
-                            continue;
-
-                        // 1. Append the value of the "var" attribute, followed by the '<' character.
-                        S.Append(f.Var);
-                        S.Append(SEP);
-
-                        // 2. Sort values by the XML character data of the <value/> element.
-                        string[] values = f.Vals;
-                        Array.Sort(values);
-                        foreach (string v in values)
-                        {
-                            // 3. For each <value/> element, append the XML character data, followed by the '<' character.
-                            S.Append(v);
-                            S.Append(SEP);
-                        }
-                    }
-                }
-            }
-
-            // Ensure that S is encoded according to the UTF-8 encoding (RFC 3269 [16]).
-            byte[] input = Encoding.UTF8.GetBytes(S.ToString());
-
-            // Compute the verification string by hashing S using the algorithm specified
-            // in the 'hash' attribute (e.g., SHA-1 as defined in RFC 3174 [17]). The hashed
-            // data MUST be generated with binary output and encoded using Base64 as specified
-            // in Section 4 of RFC 4648 [18] (note: the Base64 output MUST NOT include
-            // whitespace and MUST set padding bits to zero). [19]
-            HashAlgorithm hasher = GetHasher(m_hash);
-            byte[] hash = hasher.ComputeHash(input, 0, input.Length);
-            return Convert.ToBase64String(hash);
-        }
-
-        /// <summary>
-        /// Returns the calculated hash over all of the caps information.
-        /// </summary>
-        [Category("Capabilities")]
-        public string Ver
-        {
-            get
-            {
-                if (m_ver == null)
-                    m_ver = CalculateVer(m_disco);
-                return m_ver;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the node URI for this client.
-        /// </summary>
-        [Category("Capabilities")]
-        [DefaultValue(null)]
-        public string Node
-        {
-            get { return m_disco.Node; }
-            set { m_disco.Node = value; }
-        }
-
-        /// <summary>
-        /// Retrieves the node#ver to look for in queries.
-        /// </summary>
-        [Category("Capabilities")]
-        public string NodeVer
-        {
-            get { return Node + "#" + Ver; }
-        }
-
-        /// <summary>
-        /// Adds a new identity.
-        /// </summary>
-        /// <param name="category"></param>
-        /// <param name="type"></param>
-        /// <param name="lang"></param>
-        /// <param name="name"></param>
-        public void AddIdentity(string category, string type, string lang, string name)
-        {
-            m_ver = null;
-            m_disco.AddIdentity(new Ident(name, category, type, lang));
-        }
-
-        /// <summary>
-        /// Adds a new identity
-        /// </summary>
-        /// <param name="id"></param>
-        public void AddIdentity(Ident id)
-        {
-            m_ver = null;
-            m_disco.AddIdentity(id);
-        }
-
-        /// <summary>
-        /// Gets or sets all of the identities currently supported by this manager.
-        /// </summary>
-        [Category("Capabilities")]
-        [DefaultValue(null)]
-        public Ident[] Identities
-        {
-            get
-            {
-                if (m_disco.Identity == null)
-                    return new Ident[0];
-                return m_disco.GetIdentities();
-            }
-            set
-            {
-                m_ver = null;
-                m_disco.ClearIdentity();
-                if (value != null)
-                    foreach (Ident id in value)
-                        m_disco.AddIdentity(id);
-            }
-        }
-
-        private void CapsManager_OnStreamChanged(object sender)
-        {
-            m_disco.JID = m_stream.JID;
-
-            jabber.client.JabberClient jc = m_stream as jabber.client.JabberClient;
-            if (jc == null)
-                return;
-
-            jc.OnBeforePresenceOut += new jabber.client.PresenceHandler(jc_OnBeforePresenceOut);
-            jc.OnIQ += new jabber.client.IQHandler(jc_OnIQ);
-            jc.OnPresence += new jabber.client.PresenceHandler(jc_OnPresence);
-        }
-
-        private void jc_OnPresence(object sender, Presence pres)
-        {
-            if ((m_cache == null) || (m_discoManager == null))
-                return;
-            Caps c = pres["c", URI.CAPS] as Caps;
-            if (c == null)
-                return;
-            
-            // TODO: ignoring old-style caps for now.
-            if (!c.NewStyle)
-                return;
-            string ver = c.Version;
-            if ((ver == null) || (ver == ""))
-                return;
-            string node = c.Node;
-            if ((node == null) || (node == ""))
-                return;
-
-            if (m_cache.Contains(ver))
-                return;
-
-            m_discoManager.BeginGetFeatures(pres.From, c.Node + "#" + ver, GotCaps, ver);
-        }
-
-        private void GotCaps(DiscoManager m, DiscoNode node, object state)
-        {
-            // timeout
-            if (node == null)
-                return;
-
-            string ver = (string)state;
-            string calc = CalculateVer(node);
-            if (ver != calc)
-            {
-                Debug.WriteLine("WARNING: invalid caps ver hash: '" + ver + "' != '" + calc + "'");
-                if (node.Info != null)
-                    Debug.WriteLine(node.Info.OuterXml);
-                return;
-            }
-            m_cache[ver] = node.Info;
-        }
-
-        /// <summary>
-        /// Get a DiscoNode that has all of the info associated with the 
-        /// given ver hash, or null if there is none cached.
-        /// 
-        /// </summary>
-        /// <param name="ver"></param>
-        /// <returns></returns>
-        public DiscoInfo this[string ver]
-        {
-            get
-            {
-                if (m_cache == null)
-                    return null;
-                return m_cache[ver];
-            }
-            set
-            {
-                // mostly for test.
-                if (m_cache == null)
-                    return;
-                m_cache[ver] = value;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether or not this is a capabilities request.
-        /// Answers true for a bare no-node disco request, as well as
-        /// for requests to the correct hash.
-        /// </summary>
-        /// <param name="iq">XML to look through for capabilities.</param>
-        /// <returns>True if this is a capabilities request.</returns>
-        public bool IsCaps(IQ iq)
-        {
-            if (iq.Type != IQType.get)
-                return false;
-
-            DiscoInfo info = iq.Query as DiscoInfo;
-            if (info == null)
-                return false;
-
-            string node = info.Node;
-            if (node == null)
-                return true;
-
-            if (node == NodeVer)
-                return true;
-
-            return false;
-        }
-
-        /// <summary>
-        /// Take the info for this entity, and fill it in to the given DiscoInfo protocol element.
-        /// Node, identities, and features get filled in.
-        /// </summary>
-        /// <param name="info">The empty info element to fill in.</param>
-        public void FillInInfo(DiscoInfo info)
-        {
-            foreach (Ident id in Identities)
-                info.AddIdentity(id.Category, id.Type, id.Name, id.Lang);
-            foreach (string uri in Features)
-                info.AddFeature(uri);
-        }
-
-        private void jc_OnIQ(object sender, IQ iq)
-        {
-            if (!IsCaps(iq))
-                return;
-
-            DiscoInfo info = iq.Query as DiscoInfo;
-            if (info == null)
-                return;
-
-            IQ resp = iq.GetResponse(m_stream.Document);
-            info = (DiscoInfo)resp.Query;
-            FillInInfo(info);
-
-            Write(resp);
-        }
-
-        /// <summary>
-        /// Get a caps element that describes the current version, etc.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <returns></returns>
-        public Caps GetCaps(XmlDocument doc)
-        {
-            Caps caps = new Caps(doc);
-            caps.Version = Ver;
-            caps.Node = Node;
-            caps.Hash = m_hash;
-            return caps;
-        }
-
-        private void jc_OnBeforePresenceOut(object sender, Presence pres)
-        {
-            Debug.Assert(Node != null, "Node is required");
-            pres.AppendChild(GetCaps(pres.OwnerDocument));
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/CertificatePrompt.cs b/lib/jabber-net/jabber/connection/CertificatePrompt.cs
deleted file mode 100644
index 299bbcc..0000000
--- a/lib/jabber-net/jabber/connection/CertificatePrompt.cs
+++ /dev/null
@@ -1,240 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-#if !__MonoCS__
-    #define UI_OK
-#endif
-
-namespace jabber.connection
-{
-    using System;
-    using bedrock.util;
-
-#if UI_OK
-    using System.Security.Cryptography.X509Certificates;
-    using System.Net.Security;
-    using System.Windows.Forms;
-    using System.Drawing;
-#endif
-
-    /// <summary>
-    /// Intentionally-ugly form to deal with bad certificates.  Because you don't like it, you should catch XmppStream.OnInvalidCertificate,
-    /// and do something better.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class CertificatePrompt
-#if UI_OK
-        : Form
-#endif
-    {
-#if UI_OK
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-        private Label lblSubject;
-        private Label lblBegin;
-        private Label lblEnd;
-        private Button btnCancel;
-        private Button btnAllow;
-        private Button btnShow;
-        private Panel panel2;
-
-        private X509Certificate2 m_cert;
-
-        /// <summary>
-        /// Create an ugly form to prompt the user about an invalid certificate.
-        /// </summary>
-        /// <param name="cert">The invalid certificate</param>
-        /// <param name="chain">The CA chain for the cert</param>
-        /// <param name="errors">The errors associated with the certificate</param>
-        public CertificatePrompt(X509Certificate2 cert, X509Chain chain, SslPolicyErrors errors)
-        {
-            m_cert = cert;
-            InitializeComponent();
-            lblSubject.Text = m_cert.SubjectName.Name;
-            if ((errors & SslPolicyErrors.RemoteCertificateNameMismatch) == SslPolicyErrors.RemoteCertificateNameMismatch)
-                lblSubject.ForeColor = Color.Red;
-            lblBegin.Text = cert.NotBefore.ToString();
-            lblEnd.Text = cert.NotAfter.ToString();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        private void btnShow_Click(object sender, EventArgs e)
-        {
-            System.Diagnostics.Debug.Assert(!this.InvokeRequired);
-            X509Certificate2UI.DisplayCertificate(m_cert);
-            if (m_cert.Verify())
-                this.DialogResult = DialogResult.OK;
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            System.Windows.Forms.Label label1;
-            System.Windows.Forms.Label label2;
-            System.Windows.Forms.Label label3;
-            this.panel2 = new System.Windows.Forms.Panel();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.btnAllow = new System.Windows.Forms.Button();
-            this.lblSubject = new System.Windows.Forms.Label();
-            this.lblBegin = new System.Windows.Forms.Label();
-            this.lblEnd = new System.Windows.Forms.Label();
-            this.btnShow = new System.Windows.Forms.Button();
-            label1 = new System.Windows.Forms.Label();
-            label2 = new System.Windows.Forms.Label();
-            label3 = new System.Windows.Forms.Label();
-            this.panel2.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            label1.AutoSize = true;
-            label1.Location = new System.Drawing.Point(12, 9);
-            label1.Name = "label1";
-            label1.Size = new System.Drawing.Size(77, 13);
-            label1.TabIndex = 2;
-            label1.Text = "Subject Name:";
-            //
-            // label2
-            //
-            label2.AutoSize = true;
-            label2.Location = new System.Drawing.Point(12, 36);
-            label2.Name = "label2";
-            label2.Size = new System.Drawing.Size(63, 13);
-            label2.TabIndex = 3;
-            label2.Text = "Begin Date:";
-            //
-            // label3
-            //
-            label3.AutoSize = true;
-            label3.Location = new System.Drawing.Point(12, 64);
-            label3.Name = "label3";
-            label3.Size = new System.Drawing.Size(55, 13);
-            label3.TabIndex = 4;
-            label3.Text = "End Date:";
-            //
-            // panel2
-            //
-            this.panel2.Controls.Add(this.btnCancel);
-            this.panel2.Controls.Add(this.btnAllow);
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel2.Location = new System.Drawing.Point(0, 134);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(500, 44);
-            this.panel2.TabIndex = 1;
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(413, 9);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 2;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.UseVisualStyleBackColor = true;
-            //
-            // btnAllow
-            //
-            this.btnAllow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnAllow.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnAllow.Location = new System.Drawing.Point(332, 9);
-            this.btnAllow.Name = "btnAllow";
-            this.btnAllow.Size = new System.Drawing.Size(75, 23);
-            this.btnAllow.TabIndex = 1;
-            this.btnAllow.Text = "Allow Once";
-            this.btnAllow.UseVisualStyleBackColor = true;
-            //
-            // lblSubject
-            //
-            this.lblSubject.AutoSize = true;
-            this.lblSubject.Location = new System.Drawing.Point(126, 9);
-            this.lblSubject.Name = "lblSubject";
-            this.lblSubject.Size = new System.Drawing.Size(43, 13);
-            this.lblSubject.TabIndex = 5;
-            this.lblSubject.Text = "Subject";
-            //
-            // lblBegin
-            //
-            this.lblBegin.AutoSize = true;
-            this.lblBegin.Location = new System.Drawing.Point(126, 36);
-            this.lblBegin.Name = "lblBegin";
-            this.lblBegin.Size = new System.Drawing.Size(34, 13);
-            this.lblBegin.TabIndex = 6;
-            this.lblBegin.Text = "Begin";
-            //
-            // lblEnd
-            //
-            this.lblEnd.AutoSize = true;
-            this.lblEnd.Location = new System.Drawing.Point(126, 64);
-            this.lblEnd.Name = "lblEnd";
-            this.lblEnd.Size = new System.Drawing.Size(26, 13);
-            this.lblEnd.TabIndex = 7;
-            this.lblEnd.Text = "End";
-            //
-            // btnShow
-            //
-            this.btnShow.Location = new System.Drawing.Point(14, 90);
-            this.btnShow.Name = "btnShow";
-            this.btnShow.Size = new System.Drawing.Size(75, 23);
-            this.btnShow.TabIndex = 8;
-            this.btnShow.Text = "Trust...";
-            this.btnShow.UseVisualStyleBackColor = true;
-            this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
-            //
-            // CertificatePrompt
-            //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(500, 178);
-            this.Controls.Add(this.btnShow);
-            this.Controls.Add(this.lblEnd);
-            this.Controls.Add(this.lblBegin);
-            this.Controls.Add(this.lblSubject);
-            this.Controls.Add(label3);
-            this.Controls.Add(label2);
-            this.Controls.Add(label1);
-            this.Controls.Add(this.panel2);
-            this.Name = "CertificatePrompt";
-            this.Text = "Invalid Certificate";
-            this.panel2.ResumeLayout(false);
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-#endif
-
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/CertificatePrompt.resx b/lib/jabber-net/jabber/connection/CertificatePrompt.resx
deleted file mode 100644
index 1332036..0000000
--- a/lib/jabber-net/jabber/connection/CertificatePrompt.resx
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </metadata>
-  <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </metadata>
-  <metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </metadata>
-</root>
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/connection/ConferenceManager.bmp b/lib/jabber-net/jabber/connection/ConferenceManager.bmp
deleted file mode 100644
index 69d7cf7..0000000
Binary files a/lib/jabber-net/jabber/connection/ConferenceManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/connection/ConferenceManager.cs b/lib/jabber-net/jabber/connection/ConferenceManager.cs
deleted file mode 100644
index fc3679a..0000000
--- a/lib/jabber-net/jabber/connection/ConferenceManager.cs
+++ /dev/null
@@ -1,1658 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Diagnostics;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using jabber.client;
-using jabber.protocol.x;
-using System.ComponentModel.Design;
-
-namespace jabber.connection
-{
-
-    /// <summary>
-    /// An error occurred with a presence sent to a room.
-    /// </summary>
-    /// <param name="room"></param>
-    /// <param name="pres"></param>
-    public delegate void RoomPresenceHandler(Room room, Presence pres);
-
-    /// <summary>
-    /// Notifies the client that a room configuration form has been received.
-    /// </summary>
-    /// <param name="room">Room associated with the configuration.</param>
-    /// <param name="parent">Contains an x:data child with the form.</param>
-    /// <returns>null to take the defaults, otherwise the IQ response</returns>
-    public delegate IQ ConfigureRoom(Room room, IQ parent);
-
-    /// <summary>
-    /// An event, like join or leave, has happened to a room.
-    /// </summary>
-    /// <param name="room">The room the event is for</param>
-    public delegate void RoomEvent(Room room);
-
-    /// <summary>
-    /// An event, like join or leave, has happened to a room.
-    /// </summary>
-    /// <param name="room">The room the event is for</param>
-    /// <param name="state">State passed in by the caller, or null if none.</param>
-    public delegate void RoomStateEvent(Room room, object state);
-
-    /// <summary>
-    /// A participant-related callback.
-    /// </summary>
-    /// <param name="room">The room the event is for</param>
-    /// <param name="participant">The participant in the room</param>
-    public delegate void RoomParticipantEvent(Room room, RoomParticipant participant);
-
-    /// <summary>
-    /// A participantCollection-related callback.
-    /// </summary>
-    /// <param name="room">The room the event is for</param>
-    /// <param name="participants">The participants in the response</param>
-    /// <param name="state">State passed in by the caller, or null if none.</param>
-    public delegate void RoomParticipantsEvent(Room room, ParticipantCollection participants, object state);
-
-    /// <summary>
-    /// Manages a set of conference rooms
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ConferenceManager : StreamComponent
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-        private Hashtable m_rooms = new Hashtable();
-        private string m_nick = null;
-
-        /// <summary>
-        /// Creates a new conference manager.
-        /// </summary>
-        public ConferenceManager()
-        {
-            this.OnStreamChanged += new bedrock.ObjectHandler(ConferenceManager_OnStreamChanged);
-            InitializeComponent();
-        }
-
-        private void ConferenceManager_OnStreamChanged(object sender)
-        {
-            Stream.OnProtocol += new ProtocolHandler(Stream_OnProtocol);
-        }
-
-        private void Stream_OnProtocol(object sender, System.Xml.XmlElement rp)
-        {
-            if (OnInvite == null)
-                return;
-
-            Message msg = rp as Message;
-            if (msg == null)
-                return;
-/*
-<message
-    from='darkcave at macbeth.shakespeare.lit'
-    to='hecate at shakespeare.lit'>
-  <x xmlns='http://jabber.org/protocol/muc#user'>
-    <invite from='crone1 at shakespeare.lit/desktop'>
-      <reason>
-        Hey Hecate, this is the place for all good witches!
-      </reason>
-    </invite>
-    <password>cauldronburn</password>
-  </x>
-</message>
- */
-            UserX x = msg["x", URI.MUC_USER] as UserX;
-            if (x == null)
-                return;
-
-            Invite inv = x["invite", URI.MUC_USER] as Invite;
-            if (inv == null)
-                return;
-
-            Room r = GetRoom(msg.From);
-            OnInvite(r, msg);
-        }
-
-        /// <summary>
-        /// Creates a new conference manager in a container
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public ConferenceManager(IContainer container) : this()
-        {
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Performs tasks associated with freeing, releasing, or resetting resources.
-        /// </summary>
-        /// <param name="disposing">True if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Finished joining the room, including all potential configuration.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomEvent OnJoin;
-
-        /// <summary>
-        /// Finished leaving the room, or was kicked/banned, or the room server went down cleanly.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomPresenceHandler OnLeave;
-
-        /// <summary>
-        /// Error in response to a room join, nick change, or presence update.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomPresenceHandler OnPresenceError;
-
-        /// <summary>
-        /// Room configuration form received.  It is up to the listener call FinishConfig().
-        /// The IQ in the callback is the parent of the x:data element.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event ConfigureRoom OnRoomConfig;
-
-        /// <summary>
-        /// A message broadcast to all in the room
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event MessageHandler OnRoomMessage;
-
-        /// <summary>
-        /// A side-chat message.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event MessageHandler OnPrivateMessage;
-
-        /// <summary>
-        /// An admin message from the room itself.  Typically status change sorts of things
-        /// like kick/ban.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event MessageHandler OnAdminMessage;
-
-        /// <summary>
-        /// A message that was sent by this user to the room, echo'd back.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event MessageHandler OnSelfMessage;
-
-        /// <summary>
-        /// The subject of the room has been changed
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event MessageHandler OnSubjectChange;
-
-        /// <summary>
-        /// A participant has joined the room.  This will not fire for yourself.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantJoin;
-
-        /// <summary>
-        /// A participant has left the room.  This will not fire for yourself.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantLeave;
-
-        /// <summary>
-        /// A participant has changed presence, without joining or leaving the room.  This will not fire for yourself.
-        /// If set, will be added to each room created through the manager.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantPresenceChange;
-
-        /// <summary>
-        /// An invite was received.  A room object will be passed in as the sender.
-        /// </summary>
-        [Category("Manager")]
-        public event MessageHandler OnInvite;
-
-        /// <summary>
-        /// The default room nickname, if one is not specified.  If none
-        /// specified, the user name from the stream JID is used.
-        /// </summary>
-        [Category("Manager")]
-        [DefaultValue(null)]
-        public string DefaultNick
-        {
-            get 
-            { 
-                if (m_nick != null)
-                    return m_nick;
-                if ((m_stream == null) || m_stream.JID == null)
-                    return null;
-                return m_stream.JID.User;
-            }
-            set { m_nick = value; }
-        }
-
-        /// <summary>
-        /// Joins a conference room.
-        /// </summary>
-        /// <param name="roomAndNick">room at conference/nick, where "nick" is the desred nickname in the room.</param>
-        /// <returns>
-        /// If already joined, the existing room will be returned.
-        /// If not, a Room object will be returned in the joining state.
-        /// </returns>
-        public Room GetRoom(JID roomAndNick)
-        {
-            if (roomAndNick == null)
-                throw new ArgumentNullException("roomAndNick");
-
-            if (roomAndNick.Resource == null)
-                roomAndNick.Resource = DefaultNick;
-
-            Room r = (Room)m_rooms[roomAndNick];
-            if (r != null)
-                return r;
-
-            // If no resource specified, pick up the user's name from their JID
-            if (roomAndNick.Resource == null)
-                roomAndNick.Resource = m_stream.JID.User;
-
-            r = new Room(this, roomAndNick);
-            r.OnJoin += OnJoin;
-            r.OnLeave += OnLeave;
-            r.OnPresenceError += OnPresenceError;
-            r.OnRoomConfig += OnRoomConfig;
-            r.OnRoomMessage += OnRoomMessage;
-            r.OnPrivateMessage += OnPrivateMessage;
-            r.OnAdminMessage += OnAdminMessage;
-            r.OnSelfMessage += OnSelfMessage;
-            r.OnSubjectChange += OnSubjectChange;
-            r.OnParticipantJoin += OnParticipantJoin;
-            r.OnParticipantLeave += OnParticipantLeave;
-            r.OnParticipantPresenceChange += OnParticipantPresenceChange;
-
-            m_rooms[roomAndNick] = r;
-            return r;
-        }
-
-        /// <summary>
-        /// Determines whether or not the conference room is being managed
-        /// by this ConferenceManager.
-        /// </summary>
-        /// <param name="roomAndNick">Room to look for.</param>
-        /// <returns>True if the room is being managed.</returns>
-        public bool HasRoom(JID roomAndNick)
-        {
-            return m_rooms.ContainsKey(roomAndNick);
-        }
-
-        /// <summary>
-        /// Removes the room from the list.
-        /// Should most often be called by the Room.Leave() method.
-        /// If the room does not exist, no exception is thrown.
-        /// </summary>
-        /// <param name="roomAndNick">Room to remove.</param>
-        public void RemoveRoom(JID roomAndNick)
-        {
-            m_rooms.Remove(roomAndNick);
-        }
-
-        private class UniqueState
-        {
-            public string Nick;
-            public RoomStateEvent Callback;
-            public object State;
-
-            public UniqueState(string nick, RoomStateEvent callback, object state)
-            {
-                this.Nick = nick;
-                this.Callback = callback;
-                this.State = state;
-            }
-        }
-
-        /// <summary>
-        /// Get a unique room name from the given server, and create a Room
-        /// object for that room with the given nick.  You'll be called back on
-        /// "callback" when complete; the Room will be null if there was an error
-        /// or timeout.
-        ///
-        /// Note: the server should implement the feature http://jabber.org/protocol/muc#unique,
-        /// or this will return an error.  To work around, just create a room with a Guid for
-        /// a name.
-        /// </summary>
-        /// <param name="server">The server to send the request to</param>
-        /// <param name="nick">The nickname desired in the new room</param>
-        /// <param name="callback">A callback to be called when the room is created</param>
-        /// <param name="state">State object to be passed back when the callback fires</param>
-        public void GetUniqueRoom(string server, string nick, RoomStateEvent callback, object state)
-        {
-            if (server == null)
-                throw new ArgumentNullException("server");
-            if (nick == null)
-                throw new ArgumentNullException("nick");
-            if (callback == null)
-                throw new ArgumentNullException("callback");
-
-/*
-<iq from='crone1 at shakespeare.lit/desktop'
-    id='unique1'
-    to='macbeth.shakespeare.lit'
-    type='get'>
-  <unique xmlns='http://jabber.org/protocol/muc#unique'/>
-</iq>
- */
-            UniqueIQ iq = new UniqueIQ(m_stream.Document);
-            iq.To = server;
-            BeginIQ(iq, new IqCB(GotUnique), new UniqueState(nick, callback, state));
-        }
-
-        private void GotUnique(object sender, IQ iq, object state)
-        {
-            UniqueState us = (UniqueState)state;
-            if ((iq == null) || (iq.Type == IQType.error))
-            {
-                us.Callback(null, us.State);
-                return;
-            }
-
-/*
-<iq from='macbeth.shakespeare.lit'
-    id='unique1'
-    to='crone1 at shakespeare.lit/desktop'
-    type='result'>
-  <unique xmlns='http://jabber.org/protocol/muc#unique'>
-    6d9423a55f499b29ad20bf7b2bdea4f4b885ead1
-  </unique>
-</iq>
- */
-            UniqueRoom unique = (UniqueRoom)iq.Query;
-            Room r = GetRoom(new JID(unique.RoomNode, iq.From.Server, us.Nick));
-            us.Callback(r, us.State);
-        }
-    }
-
-    /// <summary>
-    /// Manages a multi-user conference room.  See XEP-0045 (http://www.xmpp.org/extensions/xep-0045.html).
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Room
-    {
-        private enum STATE
-        {
-            start,
-            join,
-            configGet,
-            configSet,
-            running,
-            leaving,
-            error
-        }
-
-        private STATE m_state = STATE.start;
-        /// <summary>
-        /// Nick JID.  room at conference/nick.
-        /// </summary>
-        private JID m_jid;
-        /// <summary>
-        /// Bare room JID.  room at conference
-        /// </summary>
-        private JID m_room;
-        //private XmppStream m_stream;
-        private bool m_default = false;
-        private ConferenceManager m_manager;
-        private Message m_subject;
-        private ParticipantCollection m_participants = new ParticipantCollection();
-        private object m_tag;
-
-        /// <summary>
-        /// Create.
-        /// </summary>
-        /// <param name="manager">The manager for this room.</param>
-        /// <param name="roomAndNick">room at conference/nick, where "nick" is the desred nickname in the room.</param>
-        internal Room(ConferenceManager manager, JID roomAndNick)
-        {
-            m_manager = manager;
-            XmppStream stream = manager.Stream;
-            m_jid = roomAndNick;
-            m_room = new JID(m_jid.User, m_jid.Server, null);
-            stream.OnProtocol += new jabber.protocol.ProtocolHandler(m_stream_OnProtocol);
-            JabberClient jc = stream as JabberClient;
-            if (jc != null)
-                jc.OnAfterPresenceOut += new jabber.client.PresenceHandler(m_stream_OnAfterPresenceOut);
-        }
-
-        /// <summary>
-        /// Finished joining the room, including all potential configuration.
-        /// </summary>
-        public event RoomEvent OnJoin;
-
-        /// <summary>
-        /// Finished leaving the room, or was kicked/banned, or the room server went down cleanly.
-        /// </summary>
-        public event RoomPresenceHandler OnLeave;
-
-        /// <summary>
-        /// Informs the client that an error in response to a room join,
-        /// nick change, or presence update has occurred.
-        /// </summary>
-        public event RoomPresenceHandler OnPresenceError;
-
-        /// <summary>
-        /// Informs the client that the room configuration form was received.
-        /// It is up to the listener to call the FinishConfig() method.
-        /// The IQ in the callback is the parent of the x:data element.
-        /// </summary>
-        public event ConfigureRoom OnRoomConfig;
-
-        /// <summary>
-        /// A message broadcast to all in the room
-        /// </summary>
-        public event MessageHandler OnRoomMessage;
-
-        /// <summary>
-        /// A message that was sent by this user to the room, echo'd back.
-        /// </summary>
-        public event MessageHandler OnSelfMessage;
-
-        /// <summary>
-        /// A side-chat message.
-        /// </summary>
-        public event MessageHandler OnPrivateMessage;
-
-        /// <summary>
-        /// An admin message from the room itself.  Typically status change sorts of things
-        /// like kick/ban.
-        /// </summary>
-        public event MessageHandler OnAdminMessage;
-
-        /// <summary>
-        /// The subject of the room has been changed
-        /// </summary>
-        public event MessageHandler OnSubjectChange;
-
-        /// <summary>
-        /// A participant has joined the room.  This will not fire for yourself.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantJoin;
-
-        /// <summary>
-        /// A participant has left the room.  This will not fire for yourself.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantLeave;
-
-        /// <summary>
-        /// A participant has changed presence, without joining or leaving the room.  This will not fire for yourself.
-        /// </summary>
-        [Category("Room")]
-        public event RoomParticipantEvent OnParticipantPresenceChange;
-
-        /// <summary>
-        /// Determines whether to use the default conference room configuration
-        /// or to retrieve the configuration form from the XMPP server.
-        /// </summary>
-        [DefaultValue(false)]
-        public bool DefaultConfig
-        {
-            get { return m_default; }
-            set { m_default = value; }
-        }
-
-        /// <summary>
-        /// The subject of the room.  Set has the side-effect of sending to the server.
-        /// </summary>
-        public string Subject
-        {
-            get { return m_subject.Subject; }
-            set
-            {
-                Message m = new Message(m_manager.Stream.Document);
-                m.To = m_room;
-                m.Type = MessageType.groupchat;
-                m.Subject = value;
-                m.Body = "/me has changed the subject to: " + value;
-                m_manager.Write(m);
-            }
-        }
-
-        /// <summary>
-        /// The full JID of the user in the room.  room at service/nick
-        /// </summary>
-        public JID RoomAndNick
-        {
-            get { return m_jid; }
-        }
-
-        /// <summary>
-        /// The bare JID of the room.  room at service
-        /// </summary>
-        public JID JID
-        {
-            get { return m_room; }
-        }
-
-        /// <summary>
-        /// Have we joined the room successfully?
-        /// </summary>
-        public bool IsParticipating
-        {
-            get { return m_state == STATE.running; }
-        }
-
-        /// <summary>
-        /// The nickname that others in the room will see for you.
-        /// Set has the side-effect of changing the nickname on the server.
-        /// </summary>
-        public string Nickname
-        {
-            get { return m_jid.Resource; }
-            set
-            {
-                m_jid = new JID(m_jid.User, m_jid.Server, value);
-                Presence p = new Presence(m_manager.Stream.Document);
-                p.To = m_jid;
-                m_manager.Write(p);
-            }
-        }
-
-        /// <summary>
-        /// Current room participants.
-        /// </summary>
-        /// <returns></returns>
-        public ParticipantCollection Participants
-        {
-            get { return m_participants; }
-        }
-
-        /// <summary>
-        /// Extra data associated with the room.
-        /// </summary>
-        public object Tag
-        {
-            get { return m_tag; }
-            set { m_tag = value; }
-        }
-
-        /// <summary>
-        /// Whenver we change presence, send the new presence to the room, including
-        /// caps etc.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="pres"></param>
-        private void m_stream_OnAfterPresenceOut(object sender, Presence pres)
-        {
-            Presence p = (Presence)pres.CloneNode(true);
-            p.To = RoomAndNick;
-            m_manager.Write(p);
-        }
-
-        private void m_stream_OnProtocol(object sender, System.Xml.XmlElement rp)
-        {
-            // There isn't always a from address.  iq:roster, for example.
-            string af = rp.GetAttribute("from");
-            if (af == "")
-                return;
-            JID from = new JID(af);
-            if (from.Bare != (string)m_room)
-                return;  // not for this room.
-
-            switch (rp.LocalName)
-            {
-            case "presence":
-                Presence p = (Presence)rp;
-                if (p.Error != null)
-                {
-                    m_state = STATE.error;
-                    if (OnPresenceError != null)
-                        OnPresenceError(this, p);
-                    return;
-                }
-
-                ParticipantCollection.Modification mod = ParticipantCollection.Modification.NONE;
-                RoomParticipant party = m_participants.Modify(p, out mod);
-
-                // if this is ours
-                if (p.From == m_jid)
-                {
-                    switch (m_state)
-                    {
-                    case STATE.join:
-                        OnJoinPresence(p);
-                        break;
-                    case STATE.leaving:
-                        OnLeavePresence(p);
-                        break;
-                    case STATE.running:
-                        if (p.Type == PresenceType.unavailable)
-                            OnLeavePresence(p);
-                        break;
-                    }
-                }
-                else
-                {
-                    switch (mod)
-                    {
-                    case ParticipantCollection.Modification.NONE:
-                        if (OnParticipantPresenceChange != null)
-                            OnParticipantPresenceChange(this, party);
-                        break;
-                    case ParticipantCollection.Modification.JOIN:
-                        if (OnParticipantJoin != null)
-                            OnParticipantJoin(this, party);
-                        break;
-                    case ParticipantCollection.Modification.LEAVE:
-                        if (OnParticipantLeave != null)
-                            OnParticipantLeave(this, party);
-                        break;
-                    }
-                }
-                break;
-            case "message":
-                Message m = (Message)rp;
-                if (m.Type == MessageType.groupchat)
-                {
-                    if (m.Subject != null)
-                    {
-                        if (OnSubjectChange != null)
-                            OnSubjectChange(this, m);
-                        m_subject = m;
-                    }
-                    else if (m.From == m_jid)
-                    {
-                        if (OnSelfMessage != null)
-                            OnSelfMessage(this, m);
-                    }
-                    else
-                    {
-                        if (OnRoomMessage != null)
-                            OnRoomMessage(this, m);
-                    }
-                }
-                else
-                {
-                    if (m.From.Resource == null)
-                    {
-                        // room notification of some kind
-                        if (OnAdminMessage != null)
-                            OnAdminMessage(this, m);
-                    }
-                    else
-                    {
-                        if (OnPrivateMessage != null)
-                            OnPrivateMessage(this, m);
-                    }
-                }
-                break;
-            case "iq":
-                // TODO: IQs the room sends to us.
-                break;
-            }
-        }
-
-        private void OnJoinPresence(Presence p)
-        {
-            // from is always us.
-/*
-<presence
-    to='crone1 at shakespeare.lit/desktop'>
-  <x xmlns='http://jabber.org/protocol/muc#user'>
-    <item affiliation='owner'
-          role='moderator'/>
-    <status code='201'/>
-  </x>
-</presence>
- */
-            UserX x = p["x", URI.MUC_USER] as UserX;
-            if (x == null)
-            {
-                // Old server.  Hope for the best.
-                if (OnJoin != null)
-                    OnJoin(this);
-                return;
-            }
-
-            if (x.HasStatus(RoomStatus.CREATED))
-            {
-                // room was created.  this must be me.
-                if (m_default || (OnRoomConfig == null))
-                    FinishConfigDefault();
-                else
-                    Configure();
-                return;
-            }
-
-            // if it wasn't created, and this is mine, we must be running.
-            m_state = STATE.running;
-            if (OnJoin != null)
-                OnJoin(this);
-        }
-
-        private void OnLeavePresence(Presence p)
-        {
-/*
-<presence
-    to='hag66 at shakespeare.lit/pda'
-    type='unavailable'>
-  <x xmlns='http://jabber.org/protocol/muc#user'>
-    <item affiliation='member' role='none'/>
-    <status code='110'/>
-  </x>
-</presence>
- */
-            // not quite an assert.  some sort of race.
-            if (p.Type != PresenceType.unavailable)
-                return;
-
-            m_manager.Stream.OnProtocol -= new jabber.protocol.ProtocolHandler(m_stream_OnProtocol);
-            jabber.client.JabberClient jc = m_manager.Stream as jabber.client.JabberClient;
-            if (jc != null)
-                jc.OnAfterPresenceOut -= new jabber.client.PresenceHandler(m_stream_OnAfterPresenceOut);
-            m_manager.RemoveRoom(m_jid); // should cause this object to GC.
-            if (OnLeave != null)
-                OnLeave(this, p);
-        }
-
-        /// <summary>
-        /// Configures the room. OnRoomConfig MUST be set first.
-        /// OnRoomConfig will be called back in the GUI thread if there is an
-        /// InvokeControl on your XmppStream.  Make sure that OnRoomConfig does not
-        /// return until it has the answer, typically by popping up a modal dialog
-        /// with the x:data form.
-        /// </summary>
-        public void Configure()
-        {
-            if (OnRoomConfig == null)
-                throw new ArgumentNullException("Must set OnRoomConfig before calling Configure()", "OnRoomConfig");
-
-/*
-<iq id='create1'
-    to='darkcave at macbeth.shakespeare.lit'
-    type='get'>
-  <query xmlns='http://jabber.org/protocol/muc#owner'/>
-</iq>
- */
-            m_state = STATE.configGet;
-            OwnerIQ iq = new OwnerIQ(m_manager.Stream.Document);
-            iq.Type = IQType.get;
-            iq.To = m_room;
-            m_manager.BeginIQ(iq, new IqCB(ConfigForm), null);
-        }
-
-        private void ConfigForm(object sender, IQ iq, object context)
-        {
-            // We should always be on the GUI thread.
-            // XmppStream should invoke before calling OnProtocol in the Tracker.
-            Debug.Assert((m_manager.Stream.InvokeControl == null) || (!m_manager.Stream.InvokeControl.InvokeRequired));
-
-            IQ resp = OnRoomConfig(this, iq);
-            if (resp == null)
-            {
-                FinishConfigDefault();
-                return;
-            }
-
-            m_state = STATE.configSet;
-            resp.To = m_room;
-            resp.Type = IQType.set;
-            resp.From = null;
-            m_manager.BeginIQ(resp, new IqCB(Configured), null);
-        }
-
-        private void Configured(object sender, IQ iq, object context)
-        {
-            if (iq.Type != IQType.result)
-            {
-                m_state = STATE.error;
-                // TODO: fire an error
-                return;
-            }
-
-            if (m_state != STATE.running)
-            {
-                // reconfigs don't call OnJoin
-                m_state = STATE.running;
-                if (OnJoin != null)
-                    OnJoin(this);
-            }
-        }
-
-        /// <summary>
-        /// Finish up configuration, taking the default room config.  Also known as
-        /// an "Instant Room".  Suitable for use if the user cancels the configuration
-        /// request, perhaps.
-        /// </summary>
-        private void FinishConfigDefault()
-        {
-/*
-<iq from='crone1 at shakespeare.lit/desktop'
-    id='create1'
-    to='darkcave at macbeth.shakespeare.lit'
-    type='set'>
-  <query xmlns='http://jabber.org/protocol/muc#owner'>
-    <x xmlns='jabber:x:data' type='submit'/>
-  </query>
-</iq>
- */
-            m_state = STATE.configSet;
-            OwnerIQ iq = new OwnerIQ(m_manager.Stream.Document);
-            iq.Type = IQType.set;
-            iq.To = m_room;
-            OwnerQuery oq = iq.Instruction;
-            Data form = oq.Form;
-            form.Type = XDataType.submit;
-            m_manager.BeginIQ(iq, new IqCB(Configured), null);
-        }
-
-        /// <summary>
-        /// Joins the room.  If the room is created, Configure() will
-        /// be called automatically.
-        /// </summary>
-        public void Join()
-        {
-            Join(null);
-        }
-
-        /// <summary>
-        /// Join a room, using a password.
-        /// </summary>
-        /// <param name="password"></param>
-        public void Join(string password)
-        {
-            if (m_state == STATE.running)
-                return;
-
-            m_state = STATE.join;
-            RoomPresence pres = new RoomPresence(m_manager.Stream.Document, m_jid);
-            if (password != null)
-                pres.X.Password = password;
-
-            m_manager.Write(pres);
-        }
-
-        /// <summary>
-        /// Exits the room.  This cleans up the entry in the ConferenceManager, as well.
-        /// </summary>
-        /// <param name="reason">Reason for leaving the room.  May be null for no reason.</param>
-        public void Leave(string reason)
-        {
-            m_state = STATE.leaving;
-
-/*
-<presence
-    to='darkcave at macbeth.shakespeare.lit/oldhag'
-    type='unavailable'>
-  <status>gone where the goblins go</status>
-</presence>
- */
-            Presence p = new Presence(m_manager.Stream.Document);
-            p.To = m_jid;
-            p.Type = PresenceType.unavailable;
-            if (reason != null)
-                p.Status = reason;
-            m_manager.Write(p);
-
-
-            // cleanup done when unavailable/110 received.
-        }
-
-        /// <summary>
-        /// Sends a message to everyone currently in the room.
-        /// </summary>
-        /// <param name="body">The message text to send.</param>
-        public void PublicMessage(string body)
-        {
-            if (m_state != STATE.running)
-                throw new InvalidOperationException("Must be in running state to send message: " + m_state.ToString());
-/*
-<message
-    to='darkcave at macbeth.shakespeare.lit'
-    type='groupchat'>
-  <body>Harpier cries: 'tis time, 'tis time.</body>
-</message>
- */
-            if (body == null)
-                throw new ArgumentNullException("body");
-            Message m = new Message(m_manager.Stream.Document);
-            m.To = m_room;
-            m.Type = MessageType.groupchat;
-            m.Body = body;
-            m_manager.Write(m);
-        }
-
-        /// <summary>
-        /// Sends a private message to a single user in the room.
-        /// </summary>
-        /// <param name="nick">The nickname of the user to send a private message to.</param>
-        /// <param name="body">The message body to send.</param>
-        public void PrivateMessage(string nick, string body)
-        {
-            if (m_state != STATE.running)
-                throw new InvalidOperationException("Must be in running state to send message: " + m_state.ToString());
-
-/*
-<message
-    to='darkcave at macbeth.shakespeare.lit/firstwitch'
-    type='chat'>
-  <body>I'll give thee a wind.</body>
-</message>
- */
-            if (nick == null)
-                throw new ArgumentNullException("nick");
-            if (body == null)
-                throw new ArgumentNullException("body");
-
-            Message m = new Message(m_manager.Stream.Document);
-            m.To = new JID(m_room.User, m_room.Server, nick);
-            m.Type = MessageType.chat;
-            m.Body = body;
-            m_manager.Write(m);
-        }
-
-        /// <summary>
-        /// Invite a user to join the room.
-        /// </summary>
-        /// <param name="invitee">The JID of the person to invite</param>
-        /// <param name="reason">The reason for the invite, or null for none.</param>
-        public void Invite(JID invitee, string reason)
-        {
-            if (m_state != STATE.running)
-                throw new InvalidOperationException("Must be in running state to send invite: " + m_state.ToString());
-
-            if (invitee == null)
-                throw new ArgumentNullException("invitee");
-/*
-<message
-    from='crone1 at shakespeare.lit/desktop'
-    to='darkcave at macbeth.shakespeare.lit'>
-  <x xmlns='http://jabber.org/protocol/muc#user'>
-    <invite to='hecate at shakespeare.lit'>
-      <reason>
-        Hey Hecate, this is the place for all good witches!
-      </reason>
-    </invite>
-  </x>
-</message>
- */
-            Message m = new Message(m_manager.Stream.Document);
-            m.To = m_room;
-            UserX x = new UserX(m_manager.Stream.Document);
-            x.AddInvite(invitee, reason);
-            m.AddChild(x);
-            m_manager.Write(m);
-        }
-
-#region Moderator use cases
-        /// <summary>
-        /// Change the role of a user in the room, by nickname.  Must be a moderator.
-        /// </summary>
-        /// <param name="nick">The nickname of the user to modify.</param>
-        /// <param name="role">The new role</param>
-        /// <param name="reason">The reason for the change</param>
-        public void ChangeRole(string nick, RoomRole role, string reason)
-        {
-            if (m_state != STATE.running)
-                throw new InvalidOperationException("Must be in running state to change role: " + m_state.ToString());
-
-            if (nick == null)
-                throw new ArgumentNullException("nick");
-            if (role == RoomRole.UNSPECIFIED)
-                throw new ArgumentNullException("role");
-/*
-<iq from='fluellen at shakespeare.lit/pda'
-    id='kick1'
-    to='harfleur at henryv.shakespeare.lit'
-    type='set'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item nick='pistol' role='none'>
-      <reason>Avaunt, you cullion!</reason>
-    </item>
-  </query>
-</iq>
-*/
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            iq.Type = IQType.set;
-            AdminQuery query = iq.Instruction;
-            AdminItem item = query.AddItem();
-            item.Nick = nick;
-            item.Role = role;
-            item.Reason = reason;
-            m_manager.BeginIQ(iq, null, null);
-        }
-
-        /// <summary>
-        /// Kick the given user from the room, based on their nickname.
-        /// </summary>
-        /// <param name="nick">The nickname of the person to kick</param>
-        /// <param name="reason">The reason for kicking, or null for none.</param>
-        public void Kick(string nick, string reason)
-        {
-            ChangeRole(nick, RoomRole.none, reason);
-        }
-
-        /// <summary>
-        /// Disallow a user from speaking; remove their "voice".
-        /// </summary>
-        /// <param name="nick">The nickname of the person to mute</param>
-        /// <param name="reason">The reason for the muting</param>
-        public void RevokeVoice(string nick, string reason)
-        {
-            ChangeRole(nick, RoomRole.visitor, reason);
-        }
-
-        /// <summary>
-        /// Un-mute a muted user.  Give them "voice".
-        /// </summary>
-        /// <param name="nick">The nicname of the person to unmute</param>
-        /// <param name="reason">The reason for the change</param>
-        public void GrantVoice(string nick, string reason)
-        {
-            ChangeRole(nick, RoomRole.participant, reason);
-        }
-
-        private class RetrieveParticipantsState
-        {
-            public RoomParticipantsEvent Callback;
-            public object State;
-
-            public RetrieveParticipantsState(RoomParticipantsEvent callback, object state)
-            {
-                this.Callback = callback;
-                this.State = state;
-            }
-        }
-
-        /// <summary>
-        /// Retrieve all of the parties with a given role.
-        /// Modify the affiliations of persons in this list, then call ModifyRoles
-        /// </summary>
-        /// <param name="role">The role to search for</param>
-        /// <param name="callback">A callback to receive the participant list</param>
-        /// <param name="state">Caller state information</param>
-        public void RetrieveListByRole(RoomRole role, RoomParticipantsEvent callback, object state)
-        {
-            if (callback == null)
-                throw new ArgumentNullException("callback");
-/*
-<iq from='bard at shakespeare.lit/globe'
-    id='voice3'
-    to='goodfolk at chat.shakespeare.lit'
-    type='get'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item role='participant'/>
-  </query>
-</iq>
-*/
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            AdminQuery query = iq.Instruction;
-            query.AddItem().Role = role;
-            m_manager.BeginIQ(iq, new IqCB(GotList), new RetrieveParticipantsState(callback, state));
-        }
-
-        private void GotList(object sender, IQ iq, object state)
-        {
-            RetrieveParticipantsState rps = (RetrieveParticipantsState)state;
-            if (iq.Type == IQType.error)
-            {
-                rps.Callback(this, null, rps.State);
-                return;
-            }
-/*
-<iq from='southampton at henryv.shakespeare.lit'
-    id='ban2'
-    to='kinghenryv at shakespeare.lit/throne'
-    type='result'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item affiliation='outcast'
-          jid='earlofcambridge at shakespeare.lit'>
-      <reason>Treason</reason>
-    </item>
-  </query>
-</iq>
-*/
-            ParticipantCollection parties = new ParticipantCollection();
-            AdminQuery query = (AdminQuery)iq.Query;
-            ParticipantCollection.Modification mod;
-            foreach (AdminItem item in query.GetItems())
-            {
-                Presence pres = new Presence(m_manager.Stream.Document);
-                pres.From = new JID(m_jid.User, m_jid.Server, item.Nick);
-                UserX x = new UserX(m_manager.Stream.Document);
-                RoomItem xi = x.RoomItem;
-                xi.Role = item.Role;
-                xi.Affiliation = item.Affiliation;
-                xi.Nick = item.Nick;
-                xi.JID = item.JID;
-                pres.AppendChild(x);
-                parties.Modify(pres, out mod);
-            }
-            rps.Callback(this, parties, rps.State);
-        }
-
-        /// <summary>
-        /// Modify the roles of the parties in this list.
-        /// To use, retrive a ParticipantCollection, change the roles
-        /// of the parties in that collection, then pass that modified
-        /// collection in here.
-        /// </summary>
-        /// <param name="parties">The modified participant collection</param>
-        /// <param name="reason">The reason for the change</param>
-        /// <param name="callback">A callback to call when complete.  Will have a null IQ if there were no changes to make.</param>
-        /// <param name="state">Caller's state information</param>
-        public void ModifyRoles(ParticipantCollection parties, string reason, IqCB callback, object state)
-        {
-/*
-<iq from='bard at shakespeare.lit/globe'
-    id='voice4'
-    to='goodfolk at chat.shakespeare.lit'
-    type='set'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item nick='Hecate'
-          role='visitor'/>
-    <item nick='rosencrantz'
-          role='participant'>
-      <reason>A worthy fellow.</reason>
-    </item>
-    <item nick='guildenstern'
-          role='participant'>
-      <reason>A worthy fellow.</reason>
-    </item>
-  </query>
-</iq>
-*/
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            iq.Type = IQType.set;
-            AdminQuery query = iq.Instruction;
-
-            int count = 0;
-            foreach (RoomParticipant party in parties)
-            {
-                if (party.Changed)
-                {
-                    count++;
-                    AdminItem item = query.AddItem();
-                    item.Nick = party.Nick;
-                    item.Role = party.Role;
-                    item.Reason = reason;
-                }
-            }
-            if (count > 0)
-                m_manager.BeginIQ(iq, callback, state);
-            else
-                callback(this, null, state);
-        }
-
-#endregion
-
-#region Admin use cases
-        /// <summary>
-        /// Change the affiliation (long-term) with the room of a user, based on their real JID.
-        /// </summary>
-        /// <param name="jid">The bare JID of the user of which to change the affiliation</param>
-        /// <param name="affiliation">The new affiliation</param>
-        /// <param name="reason">The reason for the change</param>
-        public void ChangeAffiliation(JID jid, RoomAffiliation affiliation, string reason)
-        {
-            if (m_state != STATE.running)
-                throw new InvalidOperationException("Must be in running state to change affiliation: " + m_state.ToString());
-            if (jid == null)
-                throw new ArgumentNullException("jid");
-            if (affiliation == RoomAffiliation.UNSPECIFIED)
-                throw new ArgumentNullException("affiliation");
-/*
-<iq from='kinghenryv at shakespeare.lit/throne'
-    id='ban1'
-    to='southampton at henryv.shakespeare.lit'
-    type='set'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item affiliation='outcast'
-          jid='earlofcambridge at shakespeare.lit'>
-      <reason>Treason</reason>
-    </item>
-  </query>
-</iq>
- */
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            iq.Type = IQType.set;
-            AdminQuery query = iq.Instruction;
-            AdminItem item = query.AddItem();
-            item.JID = jid;
-            item.Affiliation = affiliation;
-            item.Reason = reason;
-            m_manager.BeginIQ(iq, null, null);
-        }
-
-        /// <summary>
-        /// Ban a user from re-joining the room.  Must be an admin.
-        /// </summary>
-        /// <param name="jid">The bare JID of the user to ban</param>
-        /// <param name="reason">The reason for the shunning</param>
-        public void Ban(JID jid, string reason)
-        {
-            ChangeAffiliation(jid, RoomAffiliation.outcast, reason);
-        }
-
-        /// <summary>
-        /// Make this user a member of the room.
-        /// </summary>
-        /// <param name="jid">The bare jid of the user to grant membership to.</param>
-        /// <param name="reason"></param>
-        public void GrantMembership(JID jid, string reason)
-        {
-            ChangeAffiliation(jid, RoomAffiliation.member, reason);
-        }
-
-        /// <summary>
-        /// Remove the membership privileges of the given user
-        /// </summary>
-        /// <param name="jid">The bare jid of the user to revoke the membership of.</param>
-        /// <param name="reason"></param>
-        public void RevokeMembership(JID jid, string reason)
-        {
-            // Or "Dismember".
-            ChangeAffiliation(jid, RoomAffiliation.none, reason);
-        }
-
-        /// <summary>
-        /// Make this user a moderator of the room.
-        /// </summary>
-        /// <param name="nick">The nickname of the user to change</param>
-        public void MakeModerator(string nick)
-        {
-            ChangeRole(nick, RoomRole.moderator, null);
-        }
-
-        /// <summary>
-        /// Retrieve all of the parties with a given affiliiation.
-        /// Modify the affiliations of persons in this list, then call ModifyAffiliations
-        /// </summary>
-        /// <param name="affiliation">The affiliation to search for</param>
-        /// <param name="callback">A callback to receive the participant list</param>
-        /// <param name="state">Caller state information</param>
-        public void RetrieveListByAffiliation(RoomAffiliation affiliation, RoomParticipantsEvent callback, object state)
-        {
-            if (callback == null)
-                throw new ArgumentNullException("callback");
-/*
-<iq from='kinghenryv at shakespeare.lit/throne'
-    id='ban2'
-    to='southampton at henryv.shakespeare.lit'
-    type='get'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item affiliation='outcast'/>
-  </query>
-</iq>
-*/
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            AdminQuery query = iq.Instruction;
-            query.AddItem().Affiliation = affiliation;
-            m_manager.BeginIQ(iq, new IqCB(GotList), new RetrieveParticipantsState(callback, state));
-        }
-
-        /// <summary>
-        /// Modify the roles of the parties in this list.
-        /// To use, retrive a ParticipantCollection, change the roles
-        /// of the parties in that collection, then pass that modified
-        /// collection in here.
-        /// </summary>
-        /// <param name="parties">The modified participant collection</param>
-        /// <param name="reason">The reason for the change</param>
-        /// <param name="callback">A callback to call when complete.  Will have a null IQ if there were no changes to make.</param>
-        /// <param name="state">Caller's state information</param>
-        public void ModifyAffiliations(ParticipantCollection parties, string reason, IqCB callback, object state)
-        {
-/*
-<iq from='southampton at henryv.shakespeare.lit'
-    id='ban2'
-    to='kinghenryv at shakespeare.lit/throne'
-    type='result'>
-  <query xmlns='http://jabber.org/protocol/muc#admin'>
-    <item affiliation='outcast'
-          jid='earlofcambridge at shakespeare.lit'>
-      <reason>Treason</reason>
-    </item>
-  </query>
-</iq>
-*/
-            RoomAdminIQ iq = new RoomAdminIQ(m_manager.Stream.Document);
-            iq.To = m_room;
-            iq.Type = IQType.set;
-            AdminQuery query = iq.Instruction;
-
-            int count = 0;
-            foreach (RoomParticipant party in parties)
-            {
-                if (party.Changed && (party.RealJID != null))
-                {
-                    count++;
-                    AdminItem item = query.AddItem();
-                    item.JID = party.RealJID;
-                    item.Affiliation = party.Affiliation;
-                    item.Reason = reason;
-                }
-            }
-            if (count > 0)
-                m_manager.BeginIQ(iq, callback, state);
-            else
-                callback(this, null, state);
-        }
-#endregion
-    }
-
-    /// <summary>
-    /// A list of all of the current participants.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ParticipantCollection : IEnumerable
-    {
-        private Hashtable m_hash = new Hashtable();
-
-        internal enum Modification
-        {
-            NONE = -1,
-            JOIN,
-            LEAVE
-        }
-
-        /// <summary>
-        /// Get a participant by their room at service/nick JID.
-        /// </summary>
-        /// <param name="nickJid">room at service/nick</param>
-        /// <returns>Participant object</returns>
-        public RoomParticipant this[JID nickJid]
-        {
-            get
-            {
-                return (RoomParticipant)m_hash[nickJid];
-            }
-        }
-
-        /// <summary>
-        /// Add a participant to the list, indexed by full nick JID.
-        /// </summary>
-        /// <param name="pres">The latest presence</param>
-        /// <param name="mod">Was this a JOIN, a LEAVE, or no change?</param>
-        /// <returns>The associated participant.</returns>
-        internal RoomParticipant Modify(Presence pres, out Modification mod)
-        {
-            JID from = pres.From;
-            mod = Modification.NONE;
-            RoomParticipant party = (RoomParticipant)m_hash[from];
-            if (party != null)
-            {
-                party.Presence = pres;
-                if (pres.Type == PresenceType.unavailable)
-                {
-                    m_hash.Remove(from);
-                    mod = Modification.LEAVE;
-                }
-            }
-            else
-            {
-                party = new RoomParticipant(pres);
-                // XCP will send unavails from registered users that
-                // are not currently online.
-                if (pres.Type != PresenceType.unavailable)
-                {
-                    m_hash[from] = party;
-                    mod = Modification.JOIN;
-                }
-            }
-            return party;
-        }
-
-        /// <summary>
-        /// Get all of the participants that are in a given room role.
-        /// </summary>
-        /// <param name="role">The role to search for</param>
-        /// <returns></returns>
-        public RoomParticipant[] GetParticipantsByRole(RoomRole role)
-        {
-            ArrayList res = new ArrayList(m_hash.Count);
-            foreach (RoomParticipant party in m_hash.Values)
-            {
-                if (party.Role == role)
-                    res.Add(party);
-            }
-            return (RoomParticipant[])res.ToArray(typeof(RoomParticipant));
-        }
-
-        /// <summary>
-        /// Get all of the participants that are in a given room affiliation.
-        /// </summary>
-        /// <param name="affiliation">The role to search for</param>
-        /// <returns></returns>
-        public RoomParticipant[] GetParticipantsByAffiliation(RoomAffiliation affiliation)
-        {
-            ArrayList res = new ArrayList(m_hash.Count);
-            foreach (RoomParticipant party in m_hash.Values)
-            {
-                if (party.Affiliation == affiliation)
-                    res.Add(party);
-            }
-            return (RoomParticipant[])res.ToArray(typeof(RoomParticipant));
-        }
-
-        #region IEnumerable Members
-        /// <summary>
-        /// Enumerate over all of the participants
-        /// </summary>
-        /// <returns></returns>
-        public IEnumerator GetEnumerator()
-        {
-            return m_hash.Values.GetEnumerator();
-        }
-
-        #endregion
-    }
-
-    /// <summary>
-    /// Someone who is currently in or associated with a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomParticipant
-    {
-        private Presence m_presence;
-        private bool m_changed = false;
-
-        /// <summary>
-        /// Create a participant from the last presence received for that user.
-        /// </summary>
-        /// <param name="pres"></param>
-        public RoomParticipant(Presence pres)
-        {
-            if (pres == null)
-                throw new ArgumentNullException("Presence must nut be null", "pres");
-            m_presence = pres;
-        }
-
-        /// <summary>
-        /// Last presence received for this user.
-        /// </summary>
-        public Presence Presence
-        {
-            get { return m_presence; }
-            set
-            {
-                m_presence = value;
-                m_changed = false;
-            }
-        }
-
-        /// <summary>
-        /// Has this participant's role or affiliation been changed?
-        /// </summary>
-        public bool Changed
-        {
-            get { return m_changed; }
-        }
-
-        /// <summary>
-        /// The muc#user item in the presence.
-        /// </summary>
-        protected RoomItem Item
-        {
-            get
-            {
-                UserX x = (UserX)m_presence["x", URI.MUC_USER];
-                if (x == null)
-                    return null;
-                return x.RoomItem;
-            }
-        }
-
-        /// <summary>
-        /// Nickname of the user
-        /// </summary>
-        public string Nick
-        {
-            get { return m_presence.From.Resource; }
-        }
-
-        /// <summary>
-        /// Affiliation of the user.
-        /// </summary>
-        public RoomAffiliation Affiliation
-        {
-            get
-            {
-                RoomItem item = Item;
-                if (item == null)
-                    return RoomAffiliation.UNSPECIFIED;
-                return item.Affiliation;
-            }
-            set
-            {
-                RoomItem item = Item;
-                if (item == null)
-                    return;
-                if (item.Affiliation != value)
-                {
-                    item.Affiliation = value;
-                    m_changed = true;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Role of the user.
-        /// </summary>
-        public RoomRole Role
-        {
-            get
-            {
-                RoomItem item = Item;
-                if (item == null)
-                    return RoomRole.UNSPECIFIED;
-                return item.Role;
-            }
-            set
-            {
-                RoomItem item = Item;
-                if (item == null)
-                    return;
-                if (item.Role != value)
-                {
-                    item.Role = value;
-                    m_changed = true;
-                }
-            }
-        }
-
-        /// <summary>
-        /// room at server/nick of the user.
-        /// </summary>
-        public JID NickJID
-        {
-            get { return m_presence.From; }
-        }
-
-        /// <summary>
-        /// The real JID of the user, if this is a non-anonymous room.
-        /// </summary>
-        public JID RealJID
-        {
-            get
-            {
-/*
-<presence
-    from='darkcave at macbeth.shakespeare.lit/thirdwitch'
-    to='crone1 at shakespeare.lit/desktop'>
-  <x xmlns='http://jabber.org/protocol/muc#user'>
-    <item affiliation='none'
-          jid='hag66 at shakespeare.lit/pda'
-          role='participant'/>
-  </x>
-</presence>
- */
-                RoomItem item = Item;
-                if (item == null)
-                    return null;
-                return item.JID;
-            }
-        }
-
-        /// <summary>
-        /// The nick JID or nick (real).
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            JID nick = NickJID;
-            JID real = RealJID;
-            if (real != null)
-                return string.Format("{0} ({1})", nick, real);
-            return nick;
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/DiscoManager.bmp b/lib/jabber-net/jabber/connection/DiscoManager.bmp
deleted file mode 100644
index f69146e..0000000
Binary files a/lib/jabber-net/jabber/connection/DiscoManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/connection/DiscoManager.cs b/lib/jabber-net/jabber/connection/DiscoManager.cs
deleted file mode 100644
index 72bd4e9..0000000
--- a/lib/jabber-net/jabber/connection/DiscoManager.cs
+++ /dev/null
@@ -1,1332 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Collections;
-using System.Diagnostics;
-using System.Xml;
-using System.Threading;
-
-using bedrock.util;
-using bedrock.collections;
-
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages a service discovery (disco) identity. See <a href="http://www.xmpp.org/extensions/xep-0030.html">XEP-0030</a> for more information.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Ident : IComparable
-    {
-        private string m_name;
-        private string m_category;
-        private string m_type;
-        private string m_lang;
-
-        /// <summary>
-        /// Create a new identity from its constituent parts.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="category"></param>
-        /// <param name="type"></param>
-        /// <param name="lang"></param>
-        public Ident(string name, string category, string type, string lang)
-        {
-            m_category = (category == null) ? "" : category;
-            m_name = (name == null) ? "" : name;
-            m_type = (type == null) ? "" : type;
-            m_lang = (lang == null) ? "" : lang;
-        }
-
-        /// <summary>
-        /// Create a new, empty identity
-        /// </summary>
-        public Ident() : this("", "", "", "")
-        {
-        }
-
-        /// <summary>
-        /// Create an identity from protocol
-        /// </summary>
-        /// <param name="id"></param>
-        public Ident(DiscoIdentity id) : this(id.Named, id.Category, id.Type, id.Lang)
-        {
-        }
-
-        /// <summary>
-        /// Retrieves the string representation of the Ident (category/type/lang/name).
-        /// </summary>
-        /// <returns></returns>
-        [Category("Capabilities")]
-        public string Key
-        {
-            get
-            {
-                return string.Format("{0}/{1}/{2}/{3}", m_category, m_type, m_lang, m_name);
-            }
-        }
-
-        /// <summary>
-        /// Contains the description of the entity.
-        /// </summary>
-        [Category("Text")]
-        public string Name
-        {
-            get { return m_name; }
-            set { m_name = value; }
-        }
-
-        /// <summary>
-        /// Contains the capabilities category, such as server,
-        /// client, gateway, directory and so on.
-        /// </summary>
-        [Category("Identity")]
-        public string Category
-        {
-            get { return m_category; }
-            set { m_category = value; }
-        }
-
-        /// <summary>
-        /// Contains the entity type.
-        /// </summary>
-        [Category("Identity")]
-        public string Type
-        {
-            get { return m_type; }
-            set { m_type = value; }
-        }
-
-        /// <summary>
-        /// xml:lang language of this identity
-        /// </summary>
-        [Category("Text")]
-        public string Lang
-        {
-            get { return m_lang; }
-            set { m_lang = value; }
-        }
-
-        /// <summary>
-        /// Does this identity have the given category and type?
-        /// </summary>
-        /// <param name="category">The category to compare</param>
-        /// <param name="type">The type to compare</param>
-        /// <returns></returns>
-        public bool Matches(string category, string type)
-        {
-            return (m_category == category) && (m_type == type);
-        }
-
-        #region IComparable Members
-        /// <summary>
-        /// Compare to another identity, by comparing the string-ified versions
-        /// of each.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public int CompareTo(object obj)
-        {
-            if ((object)this == obj)
-                return 0;
-            Ident other = obj as Ident;
-            if (other == null)
-                return 1;
-            return Key.CompareTo(other.Key);
-        }
-        #endregion
-
-        /// <summary>
-        /// Is this identity equal to that one?  If two are the same except for
-        /// language, they are different by this method.
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(object obj)
-        {
-            return (this.CompareTo(obj) == 0);
-        }
-
-        /// <summary>
-        /// Hash over the string version of the identity.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            return Key.GetHashCode();
-        }
-
-        /// <summary>
-        /// A slash-separated version of the name, with the unset parts omitted.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder();
-            sb.Append(m_category);
-            sb.Append("/");
-            sb.Append(m_type);
-
-            if ((m_lang != null) && (m_lang != ""))
-            {
-                sb.Append("/");
-                sb.Append(m_lang);
-            }
-
-            if ((m_name != null) && (m_name != ""))
-            {
-                sb.Append("/");
-                sb.Append(m_name);
-            }
-
-            return sb.ToString(); ;
-        }
-    }
-
-    /// <summary>
-    /// Manages a JID and Node combination.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JIDNode
-    {
-        private JID m_jid = null;
-        private string m_node = null;
-
-        /// <summary>
-        /// Creates a new JID/Node combination.
-        /// </summary>
-        /// <param name="jid">JID to associate with JIDNode.</param>
-        /// <param name="node">Node to associate with JIDNode.</param>
-        public JIDNode(JID jid, string node)
-        {
-            this.m_jid = jid;
-            if ((node != null) && (node != ""))
-                this.m_node = node;
-        }
-
-        /// <summary>
-        /// Gets the JID.
-        /// </summary>
-        [Category("Identity")]
-        public JID JID
-        {
-            get { return m_jid; }
-            set { m_jid = value; }
-        }
-
-        /// <summary>
-        /// Gets the Node.
-        /// </summary>
-        [Category("Identity")]
-        public string Node
-        {
-            get { return m_node; }
-            set { m_node = value; }
-        }
-
-        /// <summary>
-        /// Retrieves a hash key that combines the JID and the node.
-        /// </summary>
-        /// <param name="jid">JID to use in the hash code.</param>
-        /// <param name="node">Node to use in the hash code.</param>
-        /// <returns>The hash code.</returns>
-        internal static string GetKey(string jid, string node)
-        {
-            if ((node == null) || (node == ""))
-            {
-                if (jid == null)
-                    return null;
-                return jid.ToString();
-            }
-            return jid + '\u0000' + node;
-        }
-
-        /// <summary>
-        /// Gets the JID/Node key for Hash lookup.
-        /// </summary>
-        [Browsable(false)]
-        public string Key
-        {
-            get { return GetKey(m_jid, m_node); }
-        }
-
-        /// <summary>
-        /// Determines if both the jid and the node are equal.
-        /// </summary>
-        /// <param name="obj">JIDNode to compare to.</param>
-        /// <returns>True if both the jid and the node are equal.</returns>
-        public override bool Equals(object obj)
-        {
-            JIDNode other = obj as JIDNode;
-            if (other == null)
-            {
-                return false;
-            }
-
-            return (m_jid == other.m_jid) && (m_node == other.m_node);
-        }
-
-        /// <summary>
-        /// Serves as a hash function to combine the JID and node together.
-        /// GetHashCode() is suitable for use in hashing algorithms and
-        /// data structures like a hash table.
-        /// </summary>
-        /// <returns>The hash code of this JIDNode.</returns>
-        public override int GetHashCode()
-        {
-            int code = 0;
-            if (m_jid != null)
-                code = m_jid.GetHashCode();
-            if (m_node != null)
-                code ^= m_node.GetHashCode();
-            return code;
-        }
-
-        /// <summary>
-        /// Returns a string representing the JID/Node.
-        /// </summary>
-        /// <returns>String representing the JID/Node.</returns>
-        public override string ToString()
-        {
-            return JID + "/" + Node;
-        }
-    }
-
-
-    /// <summary>
-    /// Manages the information and children of a given JID/Node combination.
-    ///
-    /// NOTE: If you have multiple connections in the same process, they all share the same Disco cache.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoNode : JIDNode, IEnumerable
-    {
-        /// <summary>
-        /// Contains the children of this node.
-        /// </summary>
-        public Set Children = null;
-        /// <summary>
-        /// Contains the Features of this node.
-        /// </summary>
-        public StringSet Features = null;
-        /// <summary>
-        /// Contains the identities of this node.
-        /// </summary>
-        public Set Identity = null;
-        private string m_name = null;
-        private bool m_pendingItems = false;
-        private bool m_pendingInfo = false;
-        private jabber.protocol.x.Data[] m_extensions;
-        private DiscoInfo m_info = null;
-
-        private ArrayList m_featureCallbacks = new ArrayList();
-        private ArrayList m_itemCallbacks = new ArrayList();
-        private ArrayList m_identCallbacks = new ArrayList();
-
-        /// <summary>
-        /// Creates a disco node.
-        /// </summary>
-        /// <param name="jid">JID associated with this JIDNode.</param>
-        /// <param name="node">node associated with this JIDNode.</param>
-        public DiscoNode(JID jid, string node)
-            : base(jid, node)
-        {
-        }
-
-        private class NodeCallback
-        {
-            public DiscoManager manager;
-            public DiscoNodeHandler callback;
-            public object state;
-
-            public NodeCallback(DiscoManager m, DiscoNodeHandler h, object s)
-            {
-                manager = m;
-                callback = h;
-                state = s;
-            }
-
-            public void Call(DiscoNode node)
-            {
-                if (callback != null)
-                    callback(manager, node, state);
-            }
-        }
-
-        /// <summary>
-        /// Add a callback for when features are received.
-        /// 
-        /// Calls the callback immediately if the features have already been retrieved.
-        /// </summary>
-        /// <param name="manager"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns>True if there were no features yet, and the callback was queued.</returns>
-        public bool AddFeatureCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
-        {
-            lock (this)
-            {
-                if (Features != null)
-                {
-                    if (callback != null)
-                        callback(manager, this, state);
-                    return false;
-                }
-                else
-                {
-                    if (callback != null)
-                        m_featureCallbacks.Add(new NodeCallback(manager, callback, state));
-                    return true;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Add a callback for when items are received.
-        /// 
-        /// Calls the callback immediately if the items have already been retrieved.
-        /// </summary>
-        /// <param name="manager"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns>True if there were no items yet, and the callback was queued.</returns>
-        public bool AddItemsCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
-        {
-            lock (this)
-            {
-                if (Children != null)
-                {
-                    if (callback != null)
-                        callback(manager, this, state);
-                    return false;
-                }
-                else
-                {
-                    if (callback != null)
-                        m_itemCallbacks.Add(new NodeCallback(manager, callback, state));
-                    return true;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Add a callback for when identities are received.
-        /// 
-        /// Calls the callback immediately if the features have already been retrieved.
-        /// </summary>
-        /// <param name="manager"></param>
-        /// <param name="callback"></param>
-        /// <param name="state"></param>
-        /// <returns>True if there were no identities yet, and the callback was queued.</returns>
-        public bool AddIdentityCallback(DiscoManager manager, DiscoNodeHandler callback, object state)
-        {
-            lock (this)
-            {
-                if (Identities != null)
-                {
-                    if (callback != null)
-                        callback(manager, this, state);
-                    return false;
-                }
-                else
-                {
-                    m_identCallbacks.Add(new NodeCallback(manager, callback, state));
-                    return true;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the string representation of the first identity.
-        /// </summary>
-        [Category("Info")]
-        public string Name
-        {
-            set { m_name = value; }
-            get
-            {
-                if (m_name != null)
-                    return m_name;
-                if (Identity != null)
-                {
-                    foreach (Ident id in Identity)
-                    {
-                        if ((id.Name != null) && (id.Name != ""))
-                            m_name = id.Name;
-                    }
-                    return m_name;
-                }
-                string n = JID;
-                if (Node != null)
-                    n += "/" + Node;
-                return n;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether or not the disco#info packet has been sent.
-        /// </summary>
-        [Category("Status")]
-        public bool PendingInfo
-        {
-            get { return m_pendingInfo; }
-        }
-
-        /// <summary>
-        /// Determines whether or not the disco#items packet has been sent.
-        /// </summary>
-        [Category("Status")]
-        public bool PendingItems
-        {
-            get { return m_pendingItems; }
-        }
-
-        /// <summary>
-        /// Retrieves the features associated with this node.
-        /// </summary>
-        [Category("Info")]
-        public string[] FeatureNames
-        {
-            get
-            {
-                if (Features == null)
-                    return new string[0];
-                return Features.GetStrings();
-            }
-        }
-
-        /// <summary>
-        /// Retrieves the disco identities of the node.
-        /// </summary>
-        [Category("Info")]
-        public string[] Identities
-        {
-            get
-            {
-                if (Identity == null)
-                    return new string[0];
-                string[] names = new string[Identity.Count];
-                int count = 0;
-                foreach (Ident i in Identity)
-                {
-                    names[count++] = i.Key;
-                }
-                return names;
-            }
-        }
-
-        /// <summary>
-        /// Retrieves an identity object for each identity of the node.
-        /// </summary>
-        /// <returns>List of identities associated with this node.</returns>
-        public Ident[] GetIdentities()
-        {
-            if (Identity == null)
-                return new Ident[0];
-
-            Ident[] ret = new Ident[Identity.Count];
-            int count = 0;
-            foreach (Ident i in Identity)
-            {
-                ret[count++] = i;
-            }
-            return ret;
-        }
-
-        /// <summary>
-        /// Determines whether or not this node has the given category and type among its identities.
-        /// </summary>
-        /// <param name="category">Category to look for.</param>
-        /// <param name="type">Type to look for.</param>
-        /// <returns>The node contains the category and the type if true.</returns>
-        public bool HasIdentity(string category, string type)
-        {
-            if (Identity == null)
-                return false;
-            foreach (Ident i in Identity)
-            {
-                if (i.Matches(category, type))
-                    return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Gets or sets the x:data extensions of the disco information.
-        /// </summary>
-        public jabber.protocol.x.Data[] Extensions
-        {
-            get
-            {
-                return m_extensions;
-            }
-            set
-            {
-                m_extensions = value;
-            }
-        }
-
-        /// <summary>
-        /// This last info result returned for this JID and node.
-        /// </summary>
-        public DiscoInfo Info
-        {
-            get { return m_info; }
-        }
-
-        /// <summary>
-        /// Determines if this node has the specified feature.
-        /// </summary>
-        /// <param name="URI">Feature to look for.</param>
-        /// <returns>The node has this feature if true.</returns>
-        public bool HasFeature(string URI)
-        {
-            if (Features == null)
-                return false;
-            return Features.Contains(URI);
-        }
-
-        private void DoCallbacks(ArrayList callbacks)
-        {
-            lock (this)
-            {
-                foreach (NodeCallback cb in callbacks)
-                    cb.Call(this);
-                callbacks.Clear();
-            }
-        }
-
-        /// <summary>
-        /// Pulls all of the data out of the given protocol response.
-        /// </summary>
-        /// <param name="info">If null, just calls callbacks</param>
-        public void AddInfo(DiscoInfo info)
-        {
-            m_info = info;
-            if (info == null)
-            {
-                AddIdentities(null);
-                AddFeatures((StringSet)null);
-                return;
-            }
-            Extensions = info.GetExtensions();
-            AddIdentities(info.GetIdentities());
-            AddFeatures(info.FeatureSet);
-        }
-
-        /// <summary>
-        /// Add a single feature to the node.
-        /// Does not fire OnFeatures, since this should mostly be used by
-        /// things that are not querying externally.
-        /// </summary>
-        /// <param name="feature">The feature URI to add</param>
-        public void AddFeature(string feature)
-        {
-            if (Features == null)
-                Features = new StringSet();
-            
-            Features.Add(feature);
-        }
-
-        /// <summary>
-        /// Remove a single feature from the node.
-        /// Does not fire OnFeatures, since this should mostly be used by
-        /// things that are not querying externally.
-        /// 
-        /// No exception should be thrown if the feature doesn't exist.
-        /// </summary>
-        /// <param name="feature">The feature URI to remove</param>
-        public void RemoveFeature(string feature)
-        {
-            if (Features == null)
-                return;
-            Features.Remove(feature);
-        }
-
-        /// <summary>
-        /// Adds these features to the node. Calls the OnFeatures event.
-        /// </summary>
-        /// <param name="features">Features to add to this node.</param>
-        [Obsolete("Use AddFeatures(StringSet)")]
-        public void AddFeatures(DiscoFeature[] features)
-        {
-            if (Features == null)
-                Features = new StringSet();
-
-            // features may be null when used from outside.
-            if (features != null)
-            {
-                foreach (DiscoFeature f in features)
-                    Features.Add(f.Var);
-            }
-
-            DoCallbacks(m_featureCallbacks);
-        }
-
-        /// <summary>
-        /// Add all of the features from the specified set.
-        /// </summary>
-        /// <param name="features"></param>
-        public void AddFeatures(StringSet features)
-        {
-            if (features != null)
-            {
-                if (Features == null)
-                    Features = new StringSet(features);
-                else
-                    Features.Add(features);
-            }
-            DoCallbacks(m_featureCallbacks);
-        }
-
-        /// <summary>
-        /// Clear out any features already in the list.
-        /// </summary>
-        public void ClearFeatures()
-        {
-            Features = null;
-        }
-
-        /// <summary>
-        /// Adds these identities to the node.
-        /// </summary>
-        /// <param name="id">Identities to add.</param>
-        public void AddIdentity(Ident id)
-        {
-            if (Identity == null)
-                Identity = new Set();
-            Identity.Add(id);
-        }
-
-        /// <summary>
-        /// Add these identities to the node.
-        /// Fires OnIdentities
-        /// </summary>
-        /// <param name="ids">Identities to add.</param>
-        public void AddIdentities(DiscoIdentity[] ids)
-        {
-            if (Identity == null)
-                Identity = new Set();
-
-            // ids may be null when used from outside.
-            if (ids != null)
-            {
-                foreach (DiscoIdentity id in ids)
-                    Identity.Add(new Ident(id));
-            }
-
-            DoCallbacks(m_identCallbacks);
-        }
-
-        /// <summary>
-        /// Clear out any identities already in the list.
-        /// </summary>
-        public void ClearIdentity()
-        {
-            Identity = null;
-        }
-
-        internal DiscoNode AddItem(DiscoManager manager, DiscoItem di)
-        {
-            DiscoNode dn = manager.GetNode(di.Jid, di.Node);
-            if ((di.Named != null) && (di.Named != ""))
-                dn.Name = di.Named;
-            Children.Add(dn);
-            return dn;
-        }
-
-        /// <summary>
-        /// Adds the given items to the cache.
-        /// </summary>
-        /// <param name="manager">The DiscoManager used to create/cache nodes</param>
-        /// <param name="items">Items to add.</param>
-        public void AddItems(DiscoManager manager, DiscoItem[] items)
-        {
-            if (Children == null)
-                Children = new Set();
-
-            // items may be null when used from outside.
-            if (items != null)
-            {
-                foreach (DiscoItem di in items)
-                    AddItem(manager, di);
-            }
-
-            DoCallbacks(m_itemCallbacks);
-        }
-
-        /// <summary>
-        /// Creates a disco#info IQ packet.
-        /// </summary>
-        /// <param name="doc">XmlDocument to create the XML elements with.</param>
-        /// <returns>XML representing the disco#info request.</returns>
-        public IQ InfoIQ(System.Xml.XmlDocument doc)
-        {
-            m_pendingInfo = true;
-            DiscoInfoIQ iiq = new DiscoInfoIQ(doc);
-            iiq.To = JID;
-            iiq.Type = IQType.get;
-            if (Node != null)
-            {
-                DiscoInfo info = iiq.Instruction;
-                info.Node = Node;
-            }
-
-            return iiq;
-        }
-
-        /// <summary>
-        /// Creates a disco#items IQ packet.
-        /// </summary>
-        /// <param name="doc">XmlDocument used to create the XML Elements.</param>
-        /// <returns>XML element representing the disco#items request.</returns>
-        public IQ ItemsIQ(System.Xml.XmlDocument doc)
-        {
-            m_pendingItems = true;
-
-            DiscoItemsIQ iiq = new DiscoItemsIQ(doc);
-            iiq.To = JID;
-            iiq.Type = IQType.get;
-            if (Node != null)
-            {
-                DiscoItems items = iiq.Instruction;
-                items.Node = Node;
-            }
-            return iiq;
-        }
-
-        #region IEnumerable Members
-        /// <summary>
-        /// Gets an enumerator across all items.
-        /// </summary>
-        /// <returns>Set enumerator to loop over.</returns>
-        public IEnumerator GetEnumerator()
-        {
-            return Children.GetEnumerator();
-        }
-        #endregion
-    }
-
-    /// <summary>
-    /// Represents a callback with a new disco node.
-    /// </summary>
-    /// <param name="sender">The DiscoManager managing this node</param>
-    /// <param name="node">The node that changed</param>
-    /// <param name="state">State passed in to the Begin request.</param>
-    public delegate void DiscoNodeHandler(DiscoManager sender, DiscoNode node, object state);
-
-    /// <summary>
-    /// Manages the discovery (disco) database.
-    /// </summary>
-    // TODO: once etags are finished, make all of this information cached on disk.
-    // TODO: cache XEP-115 client caps data to disk
-    // TODO: add negative caching
-    [SVN(@"$Id$")]
-    public class DiscoManager : StreamComponent, IEnumerable
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-#pragma warning disable 0414
-        private System.ComponentModel.Container components = null;
-#pragma warning restore 0414
-        private DiscoNode m_root = null;
-        private Tree m_items = new Tree();
-
-        /// <summary>
-        /// Creates a new DiscoManager and associates it with a parent container.
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public DiscoManager(System.ComponentModel.IContainer container) : this()
-        {
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Creates a new DiscoManager.
-        /// </summary>
-        public DiscoManager()
-        {
-            InitializeComponent();
-            this.OnStreamChanged +=new bedrock.ObjectHandler(DiscoManager_OnStreamChanged);
-        }
-
-
-        /// <summary>
-        /// Gets the root node.  This is probably the server that the client is
-        /// connected to. If the Children property of this root node is null,
-        /// the disco#items request has not returned an answer. Register on this
-        /// node's OnFeatures callback.
-        /// </summary>
-        public DiscoNode Root
-        {
-            get 
-            {
-                if (m_root != null)
-                    return m_root;
-                if (m_stream == null)
-                    return null;
-                // GetNode locks.
-                m_root = GetNode(m_stream.Server);
-                return m_root; 
-            }
-        }
-
-        /// <summary>
-        /// Creates nodes and ensure that they are cached.
-        /// </summary>
-        /// <param name="jid">JID associated with DiscoNode.</param>
-        /// <param name="node">Node associated with DiscoNode.</param>
-        /// <returns>
-        /// If DiscoNode exists, returns the found node.
-        /// Otherwise it creates the node and return it.
-        /// </returns>
-        public DiscoNode GetNode(JID jid, string node)
-        {
-            lock (m_items)
-            {
-                string key = DiscoNode.GetKey(jid, node);
-                DiscoNode n = (DiscoNode)m_items[key];
-                if (n == null)
-                {
-                    n = new DiscoNode(jid, node);
-                    m_items.Add(key, n);
-                }
-                return n;
-            }
-        }
-
-        /// <summary>
-        /// Creates nodes where only the JID is specified.
-        /// </summary>
-        /// <param name="jid">JID associated with DiscoNode.</param>
-        /// <returns>
-        /// If DiscoNode exists, returns the found node.
-        /// Otherwise it creates the node and return it.
-        /// </returns>
-        public DiscoNode GetNode(JID jid)
-        {
-            return GetNode(jid, null);
-        }
-
-        /// <summary>
-        /// Deletes the cache.
-        /// </summary>
-        public void Clear()
-        {
-            lock (m_items)
-            {
-                m_root = null;
-                m_items.Clear();
-            }
-        }
-
-        /// <summary>
-        /// Gets all of the cached nodes.
-        /// </summary>
-        /// <returns>Tree enumerator to loop over.</returns>
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return m_items.GetEnumerator();
-        }
-
-        private void DiscoManager_OnStreamChanged(object sender)
-        {
-            if (m_stream == null)
-                return;
-            m_stream.OnAuthenticate += new bedrock.ObjectHandler(m_client_OnAuthenticate);
-            m_stream.OnDisconnect += new bedrock.ObjectHandler(m_stream_OnDisconnect);
-            m_stream.OnError += new bedrock.ExceptionHandler(m_stream_OnError);
-        }
-
-        private void m_client_OnAuthenticate(object sender)
-        {
-            RequestInfo(Root);
-        }
-
-        private void m_stream_OnDisconnect(object sender)
-        {
-            Clear();
-        }
-
-        private void m_stream_OnError(object sender, Exception ex)
-        {
-            Clear();
-        }
-
-
-        private void RequestInfo(DiscoNode node)
-        {
-            lock (node)
-            {
-                if (!node.PendingInfo)
-                {
-                    IQ iq = node.InfoIQ(m_stream.Document);
-                    jabber.server.JabberService js = m_stream as jabber.server.JabberService;
-                    if (js != null)
-                        iq.From = js.ComponentID;
-                    BeginIQ(iq, new jabber.connection.IqCB(GotInfo), node);
-                }
-            }
-        }
-
-        private void RequestItems(DiscoNode node)
-        {
-            lock (node)
-            {
-                if (!node.PendingItems)
-                {
-                    IQ iq = node.ItemsIQ(m_stream.Document);
-                    jabber.server.JabberService js = m_stream as jabber.server.JabberService;
-                    if (js != null)
-                        iq.From = js.ComponentID;
-                    BeginIQ(iq, new jabber.connection.IqCB(GotItems), node);
-                }
-            }
-        }
-
-
-        private void GotInfo(object sender, IQ iq, object onode)
-        {
-            DiscoNode dn = onode as DiscoNode;
-            Debug.Assert(dn != null);
-
-            if (iq.Type == IQType.error)
-            {
-                if (dn == m_root)
-                {
-                    // root node.
-                    // Try agents.
-                    Error err = iq.Error;
-                    if (err != null)
-                    {
-                        string cond = err.Condition;
-                        if ((cond == Error.FEATURE_NOT_IMPLEMENTED) ||
-                            (cond == Error.SERVICE_UNAVAILABLE))
-                        {
-                            IQ aiq = new AgentsIQ(m_stream.Document);
-                            BeginIQ(aiq, new jabber.connection.IqCB(GotAgents), m_root);
-                            return;
-                        }
-                    }
-                }
-            }
-            if (iq.Type != IQType.result)
-            {
-                // protocol error
-                dn.AddInfo(null);
-                return;
-            }
-
-            dn.AddInfo(iq.Query as DiscoInfo);
-
-            if (dn == m_root)
-                RequestItems(m_root);
-        }
-
-        private void GotItems(object sender, IQ iq, object onode)
-        {
-            DiscoNode dn = onode as DiscoNode;
-            Debug.Assert(dn != null);
-
-            if (iq.Type != IQType.result)
-            {
-                // protocol error
-                dn.AddItems(this, null);
-                return;
-            }
-
-            DiscoItems items = iq.Query as DiscoItems;
-            if (items == null)
-            {
-                // protocol error
-                dn.AddItems(this, null);
-                return;
-            }
-
-            dn.AddItems(this, items.GetItems());
-
-            // automatically info everything we get an item for.
-            foreach (DiscoNode n in dn.Children)
-            {
-                if (n.Features == null)
-                {
-                    RequestInfo(n);
-                }
-            }
-        }
-
-        private void GotAgents(object sender, IQ iq, object onode)
-        {
-            DiscoNode dn = onode as DiscoNode;
-            Debug.Assert(dn != null);
-
-            if (iq.Type != IQType.result)
-            {
-                dn.AddItems(this, null);
-                return;
-            }
-
-            AgentsQuery aq = iq.Query as AgentsQuery;
-            if (aq == null)
-            {
-                dn.AddItems(this, null);
-                return;
-            }
-
-            if (dn.Children == null)
-                dn.Children = new Set();
-
-            foreach (Agent agent in aq.GetAgents())
-            {
-                DiscoItem di = new DiscoItem(m_stream.Document);
-                di.Jid = agent.JID;
-                di.Named = agent.AgentName;
-
-                DiscoNode child = dn.AddItem(this, di);
-                if (child.Features == null)
-                    child.Features = new StringSet();
-                if (child.Identity == null)
-                    child.Identity = new Set();
-
-                Ident id = new Ident();
-                id.Name = agent.Description;
-                switch (agent.Service)
-                {
-                case "groupchat":
-                    id.Category = "conference";
-                    id.Type = "text";
-                    child.Identity.Add(id);
-                    break;
-                case "jud":
-                    id.Category = "directory";
-                    id.Type = "user";
-                    child.Identity.Add(id);
-                    break;
-                case null:
-                case "":
-                    break;
-                default:
-                    // guess this is a transport
-                    id.Category = "gateway";
-                    id.Type = agent.Service;
-                    child.Identity.Add(id);
-                    break;
-                }
-
-                if (agent.Register)
-                    child.Features.Add(URI.REGISTER);
-                if (agent.Search)
-                    child.Features.Add(URI.SEARCH);
-                if (agent.Groupchat)
-                    child.Features.Add(URI.MUC);
-                if (agent.Transport)
-                {
-                    if (id.Category != "gateway")
-                    {
-                        Ident tid = new Ident();
-                        tid.Name = id.Name;
-                        tid.Category = "gateway";
-                        child.Identity.Add(tid);
-                    }
-                }
-
-                foreach (XmlElement ns in agent.GetElementsByTagName("ns"))
-                {
-                    child.Features.Add(ns.InnerText);
-                }
-                child.AddItems(this, null);
-                child.AddIdentities(null);
-                child.AddFeatures((StringSet)null);
-            }
-            dn.AddItems(this, null);
-            dn.AddIdentities(null);
-            dn.AddFeatures((StringSet)null);
-        }
-
-        /// <summary>
-        /// Retrieves the features associated with this node and
-        /// then calls back on the handler.
-        /// If the information is in the cache, handler gets called right now.
-        /// </summary>
-        /// <param name="node">Node to look for.</param>
-        /// <param name="handler">Callback to use afterwards.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        public void BeginGetFeatures(DiscoNode node, DiscoNodeHandler handler, object state)
-        {
-            if (node == null)
-                node = Root;
-
-            if (node.AddFeatureCallback(this, handler, state))
-                RequestInfo(node);
-        }
-
-        /// <summary>
-        /// Retrieves the features associated with this node and
-        /// then calls back on the handler.
-        /// 
-        /// If caching is specified, items already in the cache call the handler
-        /// immediately.
-        /// </summary>
-        /// <param name="jid">JID to look for.</param>
-        /// <param name="node">Node to look for.</param>
-        /// <param name="handler">Callback to use afterwards.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        /// <param name="cache">Should caching be performed on this request?</param>
-        public void BeginGetFeatures(JID jid, string node, DiscoNodeHandler handler, object state, bool cache)
-        {
-            DiscoNode dn = cache ? GetNode(jid, node) : new DiscoNode(jid, node);
-            BeginGetFeatures(dn, handler, state);
-        }
-
-        /// <summary>
-        /// Retrieves the features associated with this JID and node and
-        /// then calls back on the handler.
-        /// If the information is in the cache, handler gets called right now.
-        /// </summary>
-        /// <param name="jid">JID to look for.</param>
-        /// <param name="node">Node to look for.</param>
-        /// <param name="handler">Callback to use afterwards.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        public void BeginGetFeatures(JID jid, string node, DiscoNodeHandler handler, object state)
-        {
-            BeginGetFeatures(GetNode(jid, node), handler, state);
-        }
-
-        /// <summary>
-        /// Retrieves the child items associated with this node,
-        /// and then calls back on the handler.
-        /// If the information is in the cache, handler gets
-        /// called right now.
-        /// </summary>
-        /// <param name="node">Disco node to search.</param>
-        /// <param name="handler">Callback that gets called with the items.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        public void BeginGetItems(DiscoNode node, DiscoNodeHandler handler, object state)
-        {
-            if (node == null)
-                node = Root;
-
-            if (node.AddItemsCallback(this, handler, state))
-                RequestItems(node);
-        }
-
-        /// <summary>
-        /// Retrieves the child items associated with this node,
-        /// and then calls back on the handler.
-        /// 
-        /// If caching is specified, items already in the cache call the handler
-        /// immediately.
-        /// </summary>
-        /// <param name="jid">JID of Service to query.</param>
-        /// <param name="node">Node on the service to interact with.</param>
-        /// <param name="handler">Callback that gets called with the items.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        /// <param name="cache">Should caching be performed on this request?</param>
-        public void BeginGetItems(JID jid, string node, DiscoNodeHandler handler, object state, bool cache)
-        {
-            DiscoNode dn = cache ? GetNode(jid, node) : new DiscoNode(jid, node);
-            BeginGetItems(dn, handler, state);
-        }
-
-        /// <summary>
-        /// Retrieves the child items associated with this node and JID,
-        /// and then calls back on the handler.
-        /// If the information is in the cache, handler gets
-        /// called right now.
-        /// </summary>
-        /// <param name="jid">JID of Service to query.</param>
-        /// <param name="node">Node on the service to interact with.</param>
-        /// <param name="handler">Callback that gets called with the items.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        public void BeginGetItems(JID jid, string node, DiscoNodeHandler handler, object state)
-        {
-            BeginGetItems(GetNode(jid, node), handler, state);
-        }
-
-        private class FindServiceRequest
-        {
-            private string m_URI;
-            private DiscoNodeHandler m_handler;
-            private int m_outstanding = 0;
-
-            public FindServiceRequest(string featureURI, DiscoNodeHandler handler)
-            {
-                m_URI = featureURI;
-                m_handler = handler;
-            }
-
-            public void GotFeatures(DiscoManager manager, DiscoNode node, object state)
-            {
-
-                // yes, yes, this may call the handler more than once in multi-threaded world.  Punt for now.
-                if (m_handler != null)
-                {
-                    if (node.HasFeature(m_URI))
-                    {
-                        m_handler(manager, node, state);
-                        m_handler = null;
-                    }
-                }
-
-                if (Interlocked.Decrement(ref m_outstanding) == 0)
-                {
-                    if (m_handler != null)
-                        m_handler(manager, null, state);
-                }
-            }
-
-            public void GotRootItems(DiscoManager manager, DiscoNode node, object state)
-            {
-                m_outstanding = node.Children.Count;
-                foreach (DiscoNode n in node.Children)
-                    manager.BeginGetFeatures(n, new DiscoNodeHandler(GotFeatures), state);
-            }
-        }
-
-        /// <summary>
-        /// Finds a component that implements a given feature, which is a child of
-        /// the root. This will call back on the first match.  It will call back
-        /// with null if none are found.
-        /// </summary>
-        /// <param name="featureURI">Feature to look for.</param>
-        /// <param name="handler">Callback to use when finished.</param>
-        /// <param name="state">Context to pass back to caller when complete</param>
-        public void BeginFindServiceWithFeature(string featureURI, DiscoNodeHandler handler, object state)
-        {
-            if (handler == null)
-                return;  // prove I *didn't* call it. :)
-
-            FindServiceRequest req = new FindServiceRequest(featureURI, handler);
-            BeginGetItems(Root, new DiscoNodeHandler(req.GotRootItems), state);  // hopefully enough to prevent GC.
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/FileMap.cs b/lib/jabber-net/jabber/connection/FileMap.cs
deleted file mode 100644
index 191f8d3..0000000
--- a/lib/jabber-net/jabber/connection/FileMap.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Xml;
-
-using jabber.protocol;
-using bedrock.util;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// A dictionary backed into a file.  Any modification to the dictionary re-writes the file, so 
-    /// writes are somewhat costly.  Reads are cached lazily.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class FileMap<T>
-        where T : Element
-	{
-        private const string NS = "http://cursive.net/xml/FileMap";
-
-        private string m_fileName = null;
-        private ElementFactory m_factory = null;
-        private Dictionary<string, T> m_cache = null;
-
-        /// <summary>
-        /// Create a file map.
-        /// </summary>
-        /// <param name="fileName">Valid file name, either absoulte, or relative 
-        /// to the current working directory.</param>
-        /// <param name="factory">Element factory to create elements of a given type.  If null,
-        /// Elements will always be created, and T MUST be Element.</param>
-        public FileMap(string fileName, ElementFactory factory)
-        {
-            Factory = factory;
-            FileName = fileName;
-        }
-
-        /// <summary>
-        /// The ElementFactory that determines the type of the elements being stored.
-        /// </summary>
-        public ElementFactory Factory
-        {
-            get { return m_factory; }
-            set
-            {
-                if (value == null)
-                {
-                    if (!typeof(T).Equals(typeof(Element)))
-                        throw new ArgumentException("Factory must not be null if type is not XmlElement", "factory");
-                    m_factory = new ElementFactory();
-                }
-                else
-                    m_factory = value;
-            }
-        }
-
-        /// <summary>
-        /// The name of the file to manage.
-        /// </summary>
-        public string FileName
-        {
-            get { return m_fileName; }
-            set 
-            {
-                if (value == null)
-                    throw new ArgumentNullException("fileName");
-                if (value == "")
-                    throw new ArgumentOutOfRangeException("fileName");
-
-                lock (this)
-                {
-                    if (value == null)
-                        throw new ArgumentNullException("FileName");
-                    if (m_fileName == value)
-                        return;
-                    m_fileName = value;
-                    Read();
-                }
-            }
-        }
-
-        private void Flush()
-        {
-            Debug.Assert(m_cache != null, "m_cache should be initialized in constructor");
-
-            XmlDocument doc = new XmlDocument();
-            XmlElement fm = doc.CreateElement("fm", NS);
-            doc.AppendChild(fm);
-
-            XmlElement val;
-            lock (this)
-            {
-                foreach (KeyValuePair<string, T> kv in m_cache)
-                {
-                    val = doc.CreateElement("val", NS);
-                    val.SetAttribute("name", kv.Key);
-                    if (kv.Value != null)
-                        val.AppendChild(doc.ImportNode(kv.Value, true));
-                    fm.AppendChild(val);
-                }
-            }
-            XmlWriter xw = new XmlTextWriter(m_fileName, System.Text.Encoding.UTF8);
-            doc.WriteTo(xw);
-            xw.Close();
-        }
-
-        private void Read()
-        {
-            lock (this)
-            {
-                m_cache = new Dictionary<string, T>();
-                try
-                {
-                    XmlDocument doc = new XmlDocument();
-                    doc.Load(m_fileName);
-                    XmlElement fm = doc.DocumentElement;
-                    foreach (XmlElement val in fm.GetElementsByTagName("val"))
-                    {
-                        string name = val.GetAttribute("name");
-                        if (name == "")
-                            continue;
-                        foreach (XmlNode child in val.ChildNodes)
-                        {
-                            if (child is XmlElement)
-                            {
-                                m_cache[name] = (T)Element.AddTypes((XmlElement)child, m_factory);
-                                break;
-                            }
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    Debug.WriteLine("WARNING: " + ex.ToString());
-                }
-            }
-        }
-
-        /// <summary>
-        /// Remove the specified key and value
-        /// </summary>
-        /// <param name="key"></param>
-        /// <returns></returns>
-        public bool Remove(string key)
-        {
-            bool ret = m_cache.Remove(key);
-            if (ret)
-                Flush();
-            return ret;
-        }
-
-        /// <summary>
-        /// Get or set the XmlElement associated with the given key.
-        /// If the key already has a value, it WILL NOT be overridden; you 
-        /// MUST call Clear or Remove first.
-        /// </summary>
-        /// <param name="key"></param>
-        /// <returns></returns>
-        public T this[string key]
-        {
-            get
-            {
-                T val = null;
-                if (m_cache.TryGetValue(key, out val))
-                    return val;
-                return null;
-            }
-            set
-            {
-                if (m_cache.ContainsKey(key))
-                    return;
-                m_cache[key] = value;
-                Flush();
-            }
-        }
-
-        /// <summary>
-        /// How many key/value pairs are stored?
-        /// </summary>
-        public int Count
-        {
-            get { return m_cache.Count; }
-        }
-
-        /// <summary>
-        /// Clear all stored keys/values.
-        /// </summary>
-        public void Clear()
-        {
-            if (Count == 0)
-                return;
-            m_cache.Clear();
-            Flush();
-        }
-
-        /// <summary>
-        /// Is the given key in the map?
-        /// </summary>
-        /// <param name="key"></param>
-        /// <returns></returns>
-        public bool Contains(string key)
-        {
-            return m_cache.ContainsKey(key);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/HttpStanzaStream.cs b/lib/jabber-net/jabber/connection/HttpStanzaStream.cs
deleted file mode 100644
index ef8005e..0000000
--- a/lib/jabber-net/jabber/connection/HttpStanzaStream.cs
+++ /dev/null
@@ -1,302 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Diagnostics;
-using System.Xml;
-using bedrock.net;
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages the HTTP Polling XMPP stream.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class HttpStanzaStream : StanzaStream, ISocketEventListener
-    {
-        private AsynchElementStream m_elements = null;
-        private BaseSocket m_sock = null;
-
-        /// <summary>
-        /// The underlying socket
-        /// </summary>
-        protected BaseSocket Socket
-        {
-            get { return m_sock; }
-        }
-
-        /// <summary>
-        /// Create a new one.
-        /// </summary>
-        /// <param name="listener"></param>
-        internal HttpStanzaStream(IStanzaEventListener listener)
-            : base(listener)
-        {
-        }
-
-        /// <summary>
-        /// Determines whether or not the client is connected to the XMPP server.
-        /// </summary>
-        public override bool Connected
-        {
-            get { return m_sock.Connected; }
-        }
-
-        /// <summary>
-        /// Supports Start-TLS if SSL is enabled.
-        /// </summary>
-        public override bool SupportsTLS
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Sets up the element stream.  This is the place to add factories.
-        /// </summary>
-        public override void InitializeStream()
-        {
-            bool first = (m_elements == null);
-            m_elements = new AsynchElementStream();
-            m_elements.OnDocumentStart += new ProtocolHandler(m_elements_OnDocumentStart);
-            m_elements.OnDocumentEnd += new bedrock.ObjectHandler(m_elements_OnDocumentEnd);
-            m_elements.OnElement += new ProtocolHandler(m_elements_OnElement);
-            m_elements.OnError += new bedrock.ExceptionHandler(m_elements_OnError);
-
-            m_listener.StreamInit(m_elements);
-
-            Debug.Assert(this.Connected);
-            if (first)
-                m_sock.RequestRead();
-        }
-
-        /// <summary>
-        /// Connects the outbound socket.
-        /// </summary>
-        public override void Connect()
-        {
-            int port = (int)m_listener[Options.PORT];
-            Debug.Assert(port > 0);
-
-            m_sock = CreateSocket();
-
-
-            string to = (string)m_listener[Options.TO];
-            Debug.Assert(to != null);
-
-            string host = (string)m_listener[Options.NETWORK_HOST];
-            if ((host == null) || (host == ""))
-                host = to;
-
-            string url = (string)m_listener[Options.POLL_URL];
-            if ((url == null) || (url == ""))
-            {
-#if !__MonoCS__
-                url = Address.LookupTXT("_xmppconnect.", to, "_xmpp-client-xbosh");
-                if (url == null)
-#endif
-                    throw new ArgumentNullException("URL not found in DNS, and not specified", "URL");
-            }
-            ((IHttpSocket)m_sock).URL = url;
-
-            //Address addr = new Address(host, port);
-            m_sock.Connect(null, (string)m_listener[Options.SERVER_ID]);
-        }
-
-        /// <summary>
-        /// Create a socket of the correct type.
-        /// </summary>
-        /// <returns></returns>
-        protected abstract BaseSocket CreateSocket();
-
-        /// <summary>
-        /// Listens for an inbound connection.
-        /// </summary>
-        public override void Accept()
-        {
-            AsyncSocket s = new AsyncSocket(null, this, (bool)m_listener[Options.SSL], false);
-            s.LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as
-                System.Security.Cryptography.X509Certificates.X509Certificate2;
-
-            m_sock = s;
-            m_sock.Accept(new Address((int)m_listener[Options.PORT]));
-            m_sock.RequestAccept();
-        }
-
-        /// <summary>
-        /// Writes a string to the stream.
-        /// </summary>
-        /// <param name="str">
-        /// The string to write; this will be transcoded to UTF-8.
-        /// </param>
-        public override void Write(string str)
-        {
-            //int keep = (int)m_listener[Options.KEEP_ALIVE];
-            m_sock.Write(ENC.GetBytes(str));
-        }
-
-        /// <summary>
-        /// Writes a stream:stream start tag.
-        /// </summary>
-        /// <param name="stream">Stream containing the stream:stream packet to send.</param>
-        public override void WriteStartTag(jabber.protocol.stream.Stream stream)
-        {
-            Write(stream.StartTag());
-        }
-
-        /// <summary>
-        /// Writes a full stanza.
-        /// </summary>
-        /// <param name="elem">The stanza to write out.</param>
-        public override void Write(XmlElement elem)
-        {
-            if (m_sock is IElementSocket)
-                ((IElementSocket)m_sock).Write(elem);
-            else
-                Write(elem.OuterXml);
-        }
-
-        /// <summary>
-        /// Closes the socket connection.
-        /// </summary>
-        /// <param name="clean">Sends the stream:stream close packet if true.</param>
-        public override void Close(bool clean)
-        {
-            // TODO: socket should still be connected, excepts for races.  Revist.
-            if (clean)
-                Write("</stream:stream>");
-            m_sock.Close();
-        }
-
-#if !NO_SSL
-        /// <summary>
-        /// Negotiates Start-TLS with the other endpoint.
-        /// </summary>
-        public override void StartTLS()
-        {
-            //m_sock.StartTLS();
-            //XEP25Socket s = Sock;
-
-            //Debug.Assert(s != null);
-            //m_listener[Options.REMOTE_CERTIFICATE] = s.RemoteCertificate;
-        }
-#endif
-
-        #region ElementStream handlers
-        private void m_elements_OnDocumentStart(object sender, XmlElement rp)
-        {
-            m_listener.DocumentStarted(rp);
-        }
-
-        private void m_elements_OnDocumentEnd(object sender)
-        {
-            m_listener.DocumentEnded();
-        }
-
-        private void m_elements_OnElement(object sender, XmlElement rp)
-        {
-            m_listener.StanzaReceived(rp);
-        }
-
-        private void m_elements_OnError(object sender, Exception ex)
-        {
-            // XML parse error.
-            m_listener.Errored(ex);
-        }
-        #endregion
-
-        #region ISocketEventListener Members
-
-        void ISocketEventListener.OnInit(BaseSocket newSock)
-        {
-        }
-
-        ISocketEventListener ISocketEventListener.GetListener(BaseSocket newSock)
-        {
-            return this;
-        }
-
-        bool ISocketEventListener.OnAccept(BaseSocket newsocket)
-        {
-            m_sock = newsocket;
-            InitializeStream();
-            m_listener.Accepted();
-
-            // Don't accept any more connections until this one closes
-            // yes, it will look like we're still listening until the old sock is free'd by GC.
-            // don't want OnClose() to fire, though, so we can't close the previous sock.
-            return false;
-        }
-
-        void ISocketEventListener.OnConnect(BaseSocket sock)
-        {
-#if !NO_SSL
-            if ((bool)m_listener[Options.SSL])
-            {
-                XEP25Socket s = sock as XEP25Socket;
-
-                m_listener[Options.REMOTE_CERTIFICATE] = s.RemoteCertificate;
-            }
-#endif
-            m_listener.Connected();
-        }
-
-        void ISocketEventListener.OnClose(BaseSocket sock)
-        {
-            m_listener[Options.REMOTE_CERTIFICATE] = null;
-            m_elements = null;
-            m_listener.Closed();
-        }
-
-        void ISocketEventListener.OnError(BaseSocket sock, Exception ex)
-        {
-            m_listener[Options.REMOTE_CERTIFICATE] = null;
-            m_elements = null;
-            m_listener.Errored(ex);
-        }
-
-        bool ISocketEventListener.OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            Debug.Assert(m_listener != null);
-            Debug.Assert(m_elements != null);
-            m_listener.BytesRead(buf, offset, length);
-            m_elements.Push(buf, offset, length);
-            return true;
-        }
-
-        void ISocketEventListener.OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            m_listener.BytesWritten(buf, offset, length);
-        }
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        bool ISocketEventListener.OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return m_listener.OnInvalidCertificate(sock, certificate, chain, sslPolicyErrors);
-        }
-        #endregion
-    }
-}
-
diff --git a/lib/jabber-net/jabber/connection/HttpUploader.cs b/lib/jabber-net/jabber/connection/HttpUploader.cs
deleted file mode 100644
index d1f1202..0000000
--- a/lib/jabber-net/jabber/connection/HttpUploader.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-using System.Net;
-using System.IO;
-using System.Collections;
-
-using bedrock.util;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages HTTP Requests via XMPP (XEP-70).
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class HttpUploader
-    {
-        /// <summary>
-        /// Notifies the client that an upload has finished.
-        /// </summary>
-        public event bedrock.ObjectHandler OnUpload;
-
-        private void ResponseCallback(IAsyncResult result)
-        {
-            HttpWebRequest request  = (HttpWebRequest)result.AsyncState;
-            //request.GetResponse().GetResponseStream();
-            if (OnUpload != null)
-                OnUpload(this);
-        }
-
-        /// <summary>
-        /// Uploads a file to a given URL and verifies the HTTP request
-        /// through the XMPP server (XEP-0070).
-        /// </summary>
-        /// <param name="uri">URI to send the file to.</param>
-        /// <param name="jid">JID to send as.</param>
-        /// <param name="filename">File to send.</param>
-        public void Upload(string uri, string jid, string filename)
-        {
-            //try
-            //{
-            StreamReader reader = new StreamReader(filename);
-            HttpWebRequest request =
-                (HttpWebRequest)HttpWebRequest.Create(uri);
-
-            request.Method = "POST";
-            request.Headers.Add(HttpRequestHeader.Authorization,
-                                "x-xmpp-auth jid=\"" + jid + "\"");
-
-            StreamWriter writer = new StreamWriter(request.GetRequestStream());
-            writer.Write(reader.ReadToEnd());
-
-            reader.Close();
-
-            request.BeginGetResponse(new AsyncCallback(ResponseCallback),
-                                     request);
-            writer.Close();
-            // }
-            // catch (WebException)
-            // {
-            // }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/IQTracker.cs b/lib/jabber-net/jabber/connection/IQTracker.cs
deleted file mode 100644
index 2c1ee14..0000000
--- a/lib/jabber-net/jabber/connection/IQTracker.cs
+++ /dev/null
@@ -1,230 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.client;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Informs the client that a response to an IQ request has been received.
-    /// </summary>
-    public delegate void IqCB(object sender, IQ iq, object data);
-
-    /// <summary>
-    /// Informs the client that an IQ has timed out.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IQTimeoutException : Exception
-    {
-        /// <summary>
-        /// Creates a new timeout exception.
-        /// </summary>
-        /// <param name="message">Description of the error.</param>
-        public IQTimeoutException(string message)
-            : base(message)
-        {
-        }
-    }
-
-    ///<summary>
-    /// Represents the interface for tracking an IQ packet.
-    ///</summary>
-    [SVN(@"$Id$")]
-    public interface IIQTracker
-    {
-        ///<summary>
-        /// Does an asynchronous IQ call.
-        ///</summary>
-        ///<param name="iq">IQ packet to send.</param>
-        ///<param name="cb">Callback to execute when the result comes back.</param>
-        ///<param name="cbArg">Arguments to pass to the callback.</param>
-        void BeginIQ(IQ iq, IqCB cb, object cbArg);
-
-        ///<summary>
-        /// Does a synchronous IQ call.
-        ///</summary>
-        ///<param name="iqp">IQ packet to send.</param>
-        ///<param name="millisecondsTimeout">Time, in milliseconds, to wait for the response.</param>
-        ///<returns>The IQ packet that was sent back.</returns>
-        IQ IQ(IQ iqp, int millisecondsTimeout);
-    }
-
-    /// <summary>
-    /// Tracks outstanding IQ requests.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IQTracker: IIQTracker
-    {
-        private Dictionary<string, TrackerData> m_pending = new Dictionary<string, TrackerData>();
-        private XmppStream m_cli     = null;
-
-        /// <summary>
-        /// Creates a new IQ tracker.
-        /// </summary>
-        /// <param name="stream">The client to send/receive on</param>
-        public IQTracker(XmppStream stream)
-        {
-            m_cli = stream;
-            m_cli.OnProtocol += new jabber.protocol.ProtocolHandler(OnIQ);
-        }
-
-        private void OnIQ(object sender, XmlElement elem)
-        {
-            IQ iq = elem as IQ;
-            if (iq == null)
-                return;
-            if ((iq.Type != IQType.result) && (iq.Type != IQType.error))
-                return;
-
-            string id = iq.ID;
-            TrackerData td;
-
-            lock (m_pending)
-            {
-                if (!m_pending.TryGetValue(id, out td))
-                    return;
-
-                // this wasn't one that was being tracked.
-                if (!td.IsMatch(iq))
-                    return;
-
-                m_pending.Remove(id);
-            }
-
-            td.Call(this, iq);
-        }
-
-        /// <summary>
-        /// Starts an IQ request.
-        /// </summary>
-        /// <param name="iq">IQ to send.</param>
-        /// <param name="cb">Callback to use when a response comes back.</param>
-        /// <param name="cbArg">Arguments to the callback.</param>
-        public void BeginIQ(IQ iq, IqCB cb, object cbArg)
-        {
-            // if no callback, ignore response.
-            if (cb != null)
-            {
-                TrackerData td = new TrackerData(cb, cbArg, iq.To, iq.ID);
-                lock (m_pending)
-                {
-                    m_pending[iq.ID] = td;
-                }
-            }
-            m_cli.Write(iq);
-        }
-
-        /// <summary>
-        /// Sends an IQ request and waits for the response.
-        /// </summary>
-        /// <param name="iqp">An IQ packet to send, and wait for.</param>
-        /// <param name="millisecondsTimeout">Time to wait for response, in milliseconds</param>
-        /// <returns>An IQ in reponse to the sent IQ.</returns>
-        public IQ IQ(IQ iqp, int millisecondsTimeout)
-        {
-            AutoResetEvent are = new AutoResetEvent(false);
-            TrackerData td = new TrackerData(SignalEvent, are, iqp.To, iqp.ID);
-            string id = iqp.ID;
-            lock (m_pending)
-            {
-                m_pending[id] = td;
-            }
-            m_cli.Write(iqp);
-
-            if (!are.WaitOne(millisecondsTimeout, true))
-            {
-                throw new Exception("Timeout waiting for IQ response");
-            }
-
-            lock (m_pending)
-            {
-                IQ resp = td.Response;
-                m_pending.Remove(id);
-                return resp;
-            }
-        }
-
-        private void SignalEvent(object sender, IQ iq, object data)
-        {
-            ((AutoResetEvent)data).Set();
-        }
-
-        /// <summary>
-        /// Internal state for a pending tracker request
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class TrackerData
-        {
-            private IqCB  cb;
-            private object data;
-            private JID jid;
-            private string id;
-            private IQ response = null;
-
-            /// <summary>
-            /// Create a tracker data instance.
-            /// </summary>
-            /// <param name="callback"></param>
-            /// <param name="state"></param>
-            /// <param name="to"></param>
-            /// <param name="iq_id"></param>
-            public TrackerData(IqCB callback, object state, JID to, string iq_id)
-            {
-                Debug.Assert(callback != null);
-                cb = callback;
-                data = state;
-                jid = to;
-                id = iq_id;
-            }
-
-            /// <summary>
-            /// The response that came in.
-            /// </summary>
-            public IQ Response
-            {
-                get { return response; }
-            }
-
-            /// <summary>
-            /// Is this IQ the one we're looking for?
-            /// </summary>
-            /// <param name="iq"></param>
-            /// <returns></returns>
-            public bool IsMatch(IQ iq)
-            {
-                JID from = iq.From;
-                return (iq.ID == id) && ((jid == null) || (from == null) || (from == jid));
-            }
-
-            /// <summary>
-            /// Call the callback.
-            /// </summary>
-            /// <param name="sender"></param>
-            /// <param name="iq"></param>
-            public void Call(object sender, IQ iq)
-            {
-                response = iq;
-                cb(sender, iq, data);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/PollingStanzaStream.cs b/lib/jabber-net/jabber/connection/PollingStanzaStream.cs
deleted file mode 100644
index 952866d..0000000
--- a/lib/jabber-net/jabber/connection/PollingStanzaStream.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Xml;
-
-using bedrock.net;
-using bedrock.util;
-using jabber.protocol;
-using System.Security.Cryptography;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages the HTTP Polling XMPP stream.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PollingStanzaStream : HttpStanzaStream
-    {
-        ///<summary>
-        /// Creates a PollingStanzaStream
-        ///</summary>
-        ///<param name="listener">Listener associated with PollingStanzaStream.</param>
-        public PollingStanzaStream(IStanzaEventListener listener) : base(listener)
-        {
-        }
-
-        /// <summary>
-        /// Create a XEP25Socket.
-        /// </summary>
-        /// <returns></returns>
-        protected override BaseSocket CreateSocket()
-        {
-            return new XEP25Socket(this);
-        }
-    }
-}
-
diff --git a/lib/jabber-net/jabber/connection/PubSubManager.bmp b/lib/jabber-net/jabber/connection/PubSubManager.bmp
deleted file mode 100644
index 02dfc7f..0000000
Binary files a/lib/jabber-net/jabber/connection/PubSubManager.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/connection/PubSubManager.cs b/lib/jabber-net/jabber/connection/PubSubManager.cs
deleted file mode 100644
index eab1c91..0000000
--- a/lib/jabber-net/jabber/connection/PubSubManager.cs
+++ /dev/null
@@ -1,1164 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Xml;
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages a set of publish-subscribe (<a href="http://www.xmpp.org/extensions/xep-0060.html">XEP-60</a>) subscriptions.
-    /// The goal is to have a list of jid/node combinations, each of which is a singleton.
-    /// <example>
-    /// PubSubNode node = ps.GetNode("infobroker.corp.jabber.com", "test/foo", 10);
-    /// node.AddItemAddCallback(new ItemCB(node_OnItemAdd));
-    /// node.OnItemRemove += new ItemCB(node_OnItemRemove);
-    /// node.OnError += new bedrock.ExceptionHandler(node_OnError);
-    /// node.AutomatedSubscribe();
-    /// </example>
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubManager : StreamComponent
-    {
-        private class CBHolder
-        {
-            public string Node = null;
-            public int Max = 10;
-            public event ItemCB OnAdd;
-            public event ItemCB OnRemove;
-
-            public void FireAdd(PubSubNode node, PubSubItem item)
-            {
-                if (OnAdd != null)
-                    OnAdd(node, item);
-            }
-            public void FireRemove(PubSubNode node, PubSubItem item)
-            {
-                if (OnRemove != null)
-                    OnRemove(node, item);
-            }
-        }
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private IContainer components = null;
-        private Dictionary<JIDNode, PubSubNode> m_nodes = new Dictionary<JIDNode,PubSubNode>();
-        private Dictionary<string, CBHolder> m_callbacks = new Dictionary<string, CBHolder>();
-
-        /// <summary>
-        /// Creates a manager.
-        /// </summary>
-        public PubSubManager()
-        {
-            InitializeComponent();
-            this.OnStreamChanged += new bedrock.ObjectHandler(PubSubManager_OnStreamChanged);
-        }
-
-        /// <summary>
-        /// Creates a manager in a container.
-        /// </summary>
-        /// <param name="container">Parent container.</param>
-        public PubSubManager(IContainer container) : this()
-        {
-            container.Add(this);
-        }
-
-        private void PubSubManager_OnStreamChanged(object sender)
-        {
-            m_stream.OnProtocol += new ProtocolHandler(m_stream_OnProtocol);
-        }
-
-        private void m_stream_OnProtocol(object sender, XmlElement rp)
-        {
-            Message msg = rp as Message;
-            if (msg == null)
-                return;
-            PubSubEvent evt = msg["event", URI.PUBSUB_EVENT] as PubSubEvent;
-            if (evt == null)
-                return;
-
-            EventItems items = evt.GetChildElement<EventItems>();
-            if (items == null)
-                return;
-
-            string node = items.Node;
-            JID from = msg.From.BareJID;
-            JIDNode jn = new JIDNode(from, node);
-            PubSubNode psn = null;
-            if (!m_nodes.TryGetValue(jn, out psn))
-            {
-                CBHolder holder = null;
-                if (!m_callbacks.TryGetValue(node, out holder))
-                {
-                    Console.WriteLine("WARNING: notification received for unknown pubsub node");
-                    return;
-                }
-                psn = new PubSubNode(m_stream, from, node, holder.Max);
-                psn.OnItemAdd += holder.FireAdd;
-                psn.OnItemRemove += holder.FireRemove;
-                m_nodes[jn] = psn;
-            }
-            psn.FireItems(items);
-        }
-
-        /// <summary>
-        /// Performs tasks associated with freeing, releasing, or resetting resources.
-        /// </summary>
-        /// <param name="disposing">True if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Notifies the client that an error occurred.  If this is set, it will be copied to
-        /// each node that is created by the manager.
-        /// </summary>
-        public event bedrock.ExceptionHandler OnError;
-
-        /// <summary>
-        /// Add a handler for all inbound notifications with the given node name.
-        /// This is handy for PEP implicit subscriptions.
-        /// </summary>
-        /// <param name="node">PEP node URI</param>
-        /// <param name="addCB">Callback when items added</param>
-        /// <param name="removeCB">Callbacks when items removed</param>
-        /// <param name="maxNumber">Maximum number of items to store per node in this namespace</param>
-        public void AddNodeHandler(string node, ItemCB addCB, ItemCB removeCB, int maxNumber)
-        {
-            CBHolder holder = null;
-            if (!m_callbacks.TryGetValue(node, out holder))
-            {
-                holder = new CBHolder();
-                holder.Node = node;
-                holder.Max = maxNumber;
-                m_callbacks[node] = holder;
-            }
-            holder.OnAdd += addCB;
-            holder.OnRemove += removeCB;
-        }
-
-        /// <summary>
-        /// Remove an existing callback.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <param name="cb"></param>
-        public void RemoveNodeHandler(string node, ItemCB cb)
-        {
-            CBHolder holder = null;
-            if (m_callbacks.TryGetValue(node, out holder))
-            {
-                // tests indicate removing from a list that doesn't contain this callback is safe.
-                holder.OnAdd -= cb;
-                holder.OnRemove -= cb;
-            }
-        }
-
-        /// <summary>
-        /// Subscribes to a publish-subscribe node.
-        /// </summary>
-        /// <param name="service">Component that handles PubSub requests.</param>
-        /// <param name="node">The node on the component that the client wants to interact with.</param>
-        /// <param name="maxItems">Maximum number of items to retain.  First one to call Subscribe gets their value, for now.</param>
-        /// <returns>
-        /// The existing node will be returned if there is already a subscription.
-        /// If the node does not exist, the PubSubNode object will be returned
-        /// in a subscribing state.
-        /// </returns>
-        public PubSubNode GetNode(JID service, string node, int maxItems)
-        {
-            JIDNode jn = new JIDNode(service, node);
-            PubSubNode n = null;
-            if (m_nodes.TryGetValue(jn, out n))
-                return n;
-            n = new PubSubNode(Stream, service, node, maxItems);
-            m_nodes[jn] = n;
-            n.OnError += OnError;
-            return n;
-        }
-
-        ///<summary>
-        /// Removes the publish-subscribe node from the manager and sends a delete
-        /// node to the XMPP server.
-        ///</summary>
-        /// <param name="service">
-        /// Component that handles PubSub requests.
-        /// </param>
-        /// <param name="node">
-        /// The node on the component that the client wants to interact with.
-        /// </param>
-        /// <param name="errorHandler">
-        /// Callback for any errors with the publish-subscribe node deletion.
-        /// </param>
-        public void RemoveNode(JID service, string node, bedrock.ExceptionHandler errorHandler)
-        {
-            JIDNode jn = new JIDNode(service, node);
-
-            PubSubNode psNode = null;
-            if (m_nodes.TryGetValue(jn, out psNode))
-            {
-                m_nodes.Remove(jn);
-            }
-            else
-            {
-                psNode = new PubSubNode(Stream, service, node, 10);
-            }
-
-            psNode.OnError += errorHandler;
-
-            psNode.Delete();
-        }
-
-
-        /// <summary>
-        /// Get the default configuration of the node.
-        /// </summary>
-        /// <param name="service">JID of the pub/sub service</param>
-        /// <param name="callback">Callback.  Must not be null.  Will not be called back 
-        /// if there is an error, but instead OnError will be called.</param>
-        /// <param name="state">State information to be passed back to callback</param>
-        public void GetDefaults(JID service, IqCB callback, object state)
-        {
-            OwnerPubSubCommandIQ<OwnerDefault> iq = new OwnerPubSubCommandIQ<OwnerDefault>(m_stream.Document);
-            iq.To = service;
-            iq.Type = IQType.get;
-            BeginIQ(iq, OnDefaults, new IQTracker.TrackerData(callback, state, null, null));
-        }
-
-        private void OnDefaults(object sender, IQ iq, object data)
-        {
-            if (iq == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.DEFAULTS, "IQ timeout", null));
-                return;
-            }
-
-            if (iq.Type != IQType.result)
-            {
-                string msg = string.Format("Error configuring pubsub node: {0}", iq.Error.Condition);
-                Debug.WriteLine(msg);
-
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.DEFAULTS, msg, iq));
-                return;
-            }
-            PubSubOwner ow = iq.Query as PubSubOwner;
-            if (ow == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.DEFAULTS, "Invalid protocol", iq));
-                return;
-            }
-
-            OwnerDefault conf = ow.Command as OwnerDefault;
-            if (conf == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.DEFAULTS, "Invalid protocol", iq));
-                return;
-            }
-
-            IQTracker.TrackerData td = data as IQTracker.TrackerData;
-            td.Call(this, iq);
-        }
-    }
-
-    /// <summary>
-    /// Notifies the client about a publish-subscribe item.
-    /// </summary>
-    public delegate void ItemCB(PubSubNode node, PubSubItem item);
-
-    /// <summary>
-    /// Manages a list of items with a maximum size.  Only one item with a given ID will be in the
-    /// list at a given time.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ItemList : ArrayList
-    {
-        private Hashtable m_index = new Hashtable();
-        private PubSubNode m_node = null;
-
-        /// <summary>
-        /// Creates an item list, which will have at most some number of items.
-        /// </summary>
-        /// <param name="node">The node to which this item list applies.</param>
-        /// <param name="maxItems">Maximum size of the list.  Delete notifications will be sent if this size is exceeded.</param>
-        public ItemList(PubSubNode node, int maxItems) : base(maxItems)
-        {
-            m_node = node;
-        }
-
-        /// <summary>
-        /// Makes sure that the underlying ID index is in sync
-        /// when an item is removed.
-        /// </summary>
-        /// <param name="index">Index of PubSubItem to remove.</param>
-        public override void RemoveAt(int index)
-        {
-            PubSubItem item = (PubSubItem)this[index];
-            string id = item.GetAttribute("id");
-            if (id != "")
-            {
-                m_index.Remove(id);
-            }
-            base.RemoveAt(index);
-            m_node.ItemRemoved(item);
-
-            // renumber
-            for (int i=index; i<Count; i++)
-            {
-                item = (PubSubItem)this[i];
-                id = item.ID;
-                if (id != "")
-                    m_index[id] = i;
-            }
-        }
-
-        /// <summary>
-        /// Adds to the end of the list, replacing any item with the same ID,
-        /// or bumping the oldest item if the list is full.
-        /// </summary>
-        /// <param name="value">PubSubItem to add to the list.</param>
-        /// <returns>Index where the PubSubItem was inserted.</returns>
-        public override int Add(object value)
-        {
-            PubSubItem item = value as PubSubItem;
-            if (item == null)
-                throw new ArgumentException("Must be an XmlElement", "value");
-            string id = item.ID;
-            int i;
-            if (id == null)
-            {
-                if (Count == Capacity)
-                {
-                    RemoveAt(0);
-                }
-                i = base.Add(value);
-                m_node.ItemAdded(item);
-                return i;
-            }
-
-            // RemoveId(id);
-            if (!m_index.Contains(id) && (Count == Capacity))
-                RemoveAt(0);
-
-            i = base.Add(value);
-            m_index[id] = i;
-            m_node.ItemAdded(item);
-            return i;
-        }
-
-        /// <summary>
-        /// Removes the item with the given ID.
-        /// No exception is thrown if no item is found with that ID.
-        /// </summary>
-        /// <param name="id">ID of the item to remove</param>
-        public void RemoveId(string id)
-        {
-            object index = m_index[id];
-            if (index != null)
-                RemoveAt((int)index);
-        }
-
-        /// <summary>
-        /// Gets or sets the contents of the specified item.
-        /// </summary>
-        /// <param name="id">Id of the PubSubItem.</param>
-        /// <returns>XmlElement representing the contents of the PubSubItem.</returns>
-        public XmlElement this[string id]
-        {
-            get
-            {
-                object index = m_index[id];
-                if (index == null)
-                    return null;
-                PubSubItem item = this[(int)index] as PubSubItem;
-                if (item == null)
-                    return null;
-                return item.Contents;
-            }
-            set
-            {
-                // wrap an item around the contents.
-                PubSubItem item = new PubSubItem(value.OwnerDocument);
-                item.Contents = value;
-                item.ID = id;
-                Add(item);
-            }
-        }
-    }
-
-
-    /// <summary>
-    /// Contains the different possible operations on a publish-subscribe node.
-    /// </summary>
-    public enum Op
-    {
-        /// <summary>
-        /// Creates a node
-        /// </summary>
-        CREATE,
-        /// <summary>
-        /// Subscribes to a node
-        /// </summary>
-        SUBSCRIBE,
-        /// <summary>
-        /// Gets the current items in the node
-        /// </summary>
-        ITEMS,
-        /// <summary>
-        /// Deletes a node
-        /// </summary>
-        DELETE,
-        /// <summary>
-        /// Deletes an item from the node
-        /// </summary>
-        DELETE_ITEM,
-        /// <summary>
-        /// Publishes an item to a node
-        /// </summary>
-        PUBLISH_ITEM,
-        /// <summary>
-        /// Configure a node
-        /// </summary>
-        CONFIGURE,
-        /// <summary>
-        /// Purge all items from a node.
-        /// </summary>
-        PURGE,
-        /// <summary>
-        /// Configuration defaults
-        /// </summary>
-        DEFAULTS
-    }
-
-    /// <summary>
-    /// Informs the client that a publish-subscribe error occurred.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubException : Exception
-    {
-        /// <summary>
-        /// Contains the stanza that caused the error.
-        /// </summary>
-        public XmlElement Protocol = null;
-        /// <summary>
-        /// Contains the operation that failed.
-        /// </summary>
-        public Op Operation;
-
-        /// <summary>
-        /// Creates a new publish-subscribe exception.
-        /// </summary>
-        /// <param name="op">The operation that failed.</param>
-        /// <param name="error">A description of the error.</param>
-        /// <param name="elem">The stanza that caused the error.</param>
-        public PubSubException(Op op, string error, XmlElement elem) : base(error)
-        {
-            Operation = op;
-            Protocol = elem;
-        }
-
-        /// <summary>
-        /// Gets the error string.
-        /// </summary>
-        public override string Message
-        {
-            get
-            { return string.Format("PubSub error on {0}: {1}\r\nAssociated protocol: {2}", Operation, base.Message, Protocol); }
-        }
-    }
-
-    /// <summary>
-    /// Some event has occurred on a PubSub node.
-    /// </summary>
-    /// <param name="node"></param>
-    public delegate void NodeHandler(PubSubNode node);
-
-    /// <summary>
-    /// Manages a node to be subscribed to.  Will keep a maximum number of items.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubNode : StreamComponent, IEnumerable
-    {
-        private enum STATE
-        {
-            Start,
-            Pending,
-            Asking,
-            Running,
-            Error,
-        }
-
-        // indexed by op.
-        private STATE[] m_state = new STATE[] { STATE.Start, STATE.Start, STATE.Start, STATE.Start};
-
-        private JID         m_jid = null;
-        private string      m_node = null;
-        private ItemList    m_items = null;
-
-        ///<summary>
-        /// Retrieves the component that handles publish-subscribe requests.
-        ///</summary>
-        public JID Jid
-        {
-            get { return m_jid; }
-        }
-
-        ///<summary>
-        /// Retrieves the node to interact with as defined by XEP-60.
-        ///</summary>
-        public string Node
-        {
-            get { return m_node; }
-        }
-
-        /// <summary>
-        /// Create a Node.  Next, call Create and/or Subscribe.
-        /// </summary>
-        /// <param name="stream"></param>
-        /// <param name="jid"></param>
-        /// <param name="node"></param>
-        /// <param name="maxItems"></param>
-        internal PubSubNode(XmppStream stream, JID jid, string node, int maxItems)
-        {
-            if (stream == null)
-                throw new ArgumentException("must not be null", "stream");
-            if (node == null)
-                throw new ArgumentException("must not be null", "node");
-            if (node == "")
-                throw new ArgumentException("must not be empty", "node");
-
-            m_stream = stream;
-            m_jid = jid;
-            m_node = node;
-            m_items = new ItemList(this, maxItems);
-        }
-
-        /// <summary>
-        /// The document associated with the stream we're attached to.
-        /// </summary>
-        public XmlDocument Document
-        {
-            get { return m_stream.Document; }
-        }
-
-        /// <summary>
-        /// Determines whether or not this node is fully initialized.
-        /// </summary>
-        public bool IsInitialized
-        {
-            get { return (this[Op.CREATE] == STATE.Running) && (this[Op.SUBSCRIBE] == STATE.Running); }
-        }
-
-        /// <summary>
-        /// Has the creation request succeeded?
-        /// </summary>
-        public bool IsCreated
-        {
-            get { return this[Op.CREATE] == STATE.Running; }
-        }
-
-        /// <summary>
-        /// Informs the client that an item has been added to the node,
-        /// either on initial get or by notification.
-        /// NOTE: This may fire for the same item more than once.
-        /// </summary>
-        public event ItemCB OnItemAdd;
-
-        /// <summary>
-        /// Informs the client that an item has been deleted from the node,
-        /// either by notification or the list being full.
-        /// </summary>
-        public event ItemCB OnItemRemove;
-
-
-        /// <summary>
-        /// Informs the publisher that an item has been published 
-        /// successfully.
-        /// </summary>
-        public event ItemCB OnItemPublished;
-
-        /// <summary>
-        /// Notifies the client that an error occurred.
-        /// </summary>
-        public event bedrock.ExceptionHandler OnError;
-
-        /// <summary>
-        /// Node has finished being created, successfully.
-        /// </summary>
-        public event NodeHandler OnCreate;
-
-        private STATE this[Op op]
-        {
-            get { return m_state[(int)op]; }
-            set { m_state[(int)op] = value; }
-        }
-
-        private void FireError(Op op, string message, XmlElement protocol)
-        {
-            Debug.WriteLine(string.Format("Error {0}ing pubsub node: {1}", op, message));
-            this[op] = STATE.Error;
-
-            if (OnError != null)
-                OnError(this, new PubSubException(op, message, protocol));
-        }
-
-        internal void FireItems(EventItems items)
-        {
-            // OK, it's for us.  Might be a new one or a retraction.
-            // Shrug, even if we're sent a mix, it shouldn't hurt anything.
-
-            /*
-            <message from='pubsub.shakespeare.lit' to='bernardo at denmark.lit' id='bar'>
-              <event xmlns='http://jabber.org/protocol/pubsub#event'>
-                <items node='princely_musings'>
-                  <retract id='ae890ac52d0df67ed7cfdf51b644e901'/>
-                </items>
-              </event>
-            </message>
-             */
-            foreach (string id in items.GetRetractions())
-                m_items.RemoveId(id);
-
-            foreach (PubSubItem item in items.GetItems())
-                m_items.Add(item);
-        }
-
-        /// <summary>
-        /// Adds a handler for the OnItemAdd event, and calls the handler for any existing
-        /// items.  To prevent races, use this rather than .OnItemAdd +=.
-        /// </summary>
-        /// <param name="callback">Callback to call with every item.</param>
-        public void AddItemAddCallback(ItemCB callback)
-        {
-            if (callback == null)
-                throw new ArgumentException("Must not be null", "callback");
-
-            OnItemAdd += callback;
-            foreach (PubSubItem item in m_items)
-            {
-                callback(this, item);
-            }
-        }
-
-        /// <summary>
-        /// Creates the node then subscribes. If the creation succeeded, or if the node
-        /// already exists, retrieve the items for the node.
-        ///
-        /// This is the typical starting point.  Please make sure to register callbacks before calling
-        /// this function.
-        /// </summary>
-        public void AutomatedSubscribe()
-        {
-            lock (this)
-            {
-                if ((this[Op.SUBSCRIBE] == STATE.Start) || (this[Op.SUBSCRIBE] == STATE.Error))
-                    this[Op.SUBSCRIBE] = STATE.Pending;
-                if ((this[Op.ITEMS] == STATE.Start) || (this[Op.ITEMS] == STATE.Error))
-                    this[Op.ITEMS] = STATE.Pending;
-            }
-            Create();
-        }
-
-        /// <summary>
-        /// Creates the node with default configuration.
-        /// </summary>
-        public void Create()
-        {
-            Create(null);
-        }
-
-        /// <summary>
-        /// Creates the node using the specified configuration form.
-        /// </summary>
-        /// <param name="config">Null for the default configuration</param>
-        public void Create(jabber.protocol.x.Data config)
-        {
-            lock (this)
-            {
-                if (!NeedsAsking(this[Op.CREATE]))
-                {
-                    SubscribeIfPending();
-                    return;
-                }
-
-                this[Op.CREATE] = STATE.Asking;
-            }
-/*
-<iq type='set'
-    from='hamlet at denmark.lit/elsinore'
-    to='pubsub.shakespeare.lit'
-    id='create1'>
-    <pubsub xmlns='http://jabber.org/protocol/pubsub'>
-      <create node='princely_musings'/>
-      <configure/>
-    </pubsub>
-</iq>
- */
-            PubSubCommandIQ<Create> iq = new PubSubCommandIQ<Create>(m_stream.Document, m_node);
-            iq.To = m_jid;
-            iq.Type = IQType.set;
-            iq.Command.CreateConfiguration(config);
-            BeginIQ(iq, GotCreated, null);
-        }
-
-        private void GotCreated(object sender, IQ iq, object state)
-        {
-            if (iq.Type != IQType.result)
-            {
-                // Type=error with conflict is basically a no-op.
-                if (iq.Type != IQType.error)
-                {
-                    FireError(Op.CREATE, "Create failed, invalid protocol", iq);
-                    return;
-                }
-                Error err = iq.Error;
-                if (err == null)
-                {
-                    FireError(Op.CREATE, "Create failed, unknown error", iq);
-                    return;
-                }
-                if (err.Condition != Error.CONFLICT)
-                {
-                    FireError(Op.CREATE, "Error creating node", iq);
-                    return;
-                }
-            }
-            else
-            {
-                PubSub ps = iq.Query as PubSub;
-                if (ps != null)
-                {
-                    Create c = ps["create", URI.PUBSUB] as Create;
-                    if (c != null)
-                        m_node = c.Node;
-                }
-            }
-
-            this[Op.CREATE] = STATE.Running;
-
-            if (OnCreate != null)
-                OnCreate(this);
-
-            SubscribeIfPending();
-        }
-
-        private bool NeedsAsking(STATE state)
-        {
-            switch (state)
-            {
-            case STATE.Start:
-            case STATE.Pending:
-                return true;
-            case STATE.Asking:
-            case STATE.Running:
-                return false;
-            case STATE.Error:
-                Debug.WriteLine("Retrying create after error.  Hope you've changed perms or something in the mean time.");
-                return true;
-            }
-            return true;
-        }
-
-        private void SubscribeIfPending()
-        {
-            if (this[Op.SUBSCRIBE] == STATE.Pending)
-                Subscribe();
-        }
-
-        /// <summary>
-        /// Sends a subscription request.
-        /// Items request will be sent automatically on successful subscribe.
-        /// </summary>
-        public void Subscribe()
-        {
-            lock (this)
-            {
-                if (!NeedsAsking(this[Op.SUBSCRIBE]))
-                    return;
-
-                this[Op.SUBSCRIBE] = STATE.Asking;
-            }
-
-            PubSubIQ iq = createCommand(PubSubCommandType.subscribe);
-            addInfo(iq);
-            BeginIQ(iq, GotSubscribed, null);
-            // don't parallelize getItems, in case sub fails.
-        }
-
-        private PubSubIQ createCommand(PubSubCommandType type)
-        {
-            PubSubIQ iq = new PubSubIQ(m_stream.Document, type, m_node);
-            iq.To = m_jid;
-            iq.Type = IQType.set;
-
-            return iq;
-        }
-
-        private void addInfo(PubSubIQ iq)
-        {
-            Subscribe sub = (Subscribe) iq.Command;
-            sub.JID = m_stream.JID;
-        }
-
-        private void GotSubscribed(object sender, IQ iq, object state)
-        {
-            if (iq.Type != IQType.result)
-            {
-                FireError(Op.SUBSCRIBE, "Subscription failed", iq);
-                return;
-            }
-
-            PubSub ps = iq.Query as PubSub;
-            if (ps == null)
-            {
-                FireError(Op.SUBSCRIBE, "Invalid protocol", iq);
-                return;
-            }
-
-            PubSubSubscriptionType subType;
-            PubSubSubscription sub = ps["subscription", URI.PUBSUB] as PubSubSubscription;
-            if (sub != null)
-                subType = sub.Type;
-            else
-            {
-                XmlElement ent = ps["entity", URI.PUBSUB];
-                if (ent == null)
-                {
-                    FireError(Op.SUBSCRIBE, "Invalid protocol", iq);
-                    return;
-                }
-                string s = ent.GetAttribute("subscription");
-                if (s == "")
-                    subType = PubSubSubscriptionType.NONE_SPECIFIED;
-                else
-                    subType = (PubSubSubscriptionType)Enum.Parse(typeof(PubSubSubscriptionType), s);
-            }
-
-            switch (subType)
-            {
-            case PubSubSubscriptionType.NONE_SPECIFIED:
-            case PubSubSubscriptionType.subscribed:
-                break;
-            case PubSubSubscriptionType.pending:
-                FireError(Op.SUBSCRIBE, "Subscription pending authorization", iq);
-                return;
-            case PubSubSubscriptionType.unconfigured:
-                FireError(Op.SUBSCRIBE, "Subscription configuration required.  Not implemented yet.", iq);
-                return;
-            }
-
-            this[Op.SUBSCRIBE] = STATE.Running;
-            GetItemsIfPending();
-        }
-
-        private void GetItemsIfPending()
-        {
-            if (this[Op.ITEMS] == STATE.Pending)
-                GetItems();
-        }
-
-        /// <summary>
-        /// Gets the items from the node on the XMPP server.
-        /// </summary>
-        public void GetItems()
-        {
-            lock (this)
-            {
-                if (!NeedsAsking(this[Op.ITEMS]))
-                    return;
-                this[Op.ITEMS] = STATE.Asking;
-            }
-            PubSubIQ piq = new PubSubIQ(m_stream.Document, PubSubCommandType.items, m_node);
-            piq.To = m_jid;
-            piq.Type = IQType.get;
-            BeginIQ(piq, GotItems, null);
-        }
-
-        private void GotItems(object sender, IQ iq, object state)
-        {
-            if (iq.Type != IQType.result)
-            {
-                FireError(Op.ITEMS, "Error retrieving items", iq);
-                return;
-            }
-
-            PubSub ps = iq["pubsub", URI.PUBSUB] as PubSub;
-            if (ps == null)
-            {
-                FireError(Op.ITEMS, "Invalid pubsub protocol", iq);
-                return;
-            }
-            PubSubItemCommand items = ps["items", URI.PUBSUB] as PubSubItemCommand;
-            if (items == null)
-            {
-                // That doesn't really hurt us, I guess.  No items.  Keep going.
-                this[Op.ITEMS] = STATE.Running;
-                return;
-            }
-
-            if (items.Node != m_node)
-            {
-                FireError(Op.ITEMS, "Non-matching node.  Probably a server bug.", iq);
-                return;
-            }
-
-            foreach (PubSubItem item in items.GetItems())
-                m_items.Add(item);
-
-            this[Op.ITEMS] = STATE.Running;
-        }
-
-        /// <summary>
-        /// Notifies the client that an item has been add to this PubSubNode.
-        /// </summary>
-        /// <param name="item">Item that was added.</param>
-        public void ItemAdded(PubSubItem item)
-        {
-            if (OnItemAdd != null)
-                OnItemAdd(this, item);
-        }
-
-        /// <summary>
-        /// Notifies the client that an item has been removed from this PubSubNode.
-        /// </summary>
-        /// <param name="item">Item that was removed.</param>
-        public void ItemRemoved(PubSubItem item)
-        {
-            if (OnItemRemove != null)
-                OnItemRemove(this, item);
-        }
-
-        /// <summary>
-        /// Returns the contents of the specified item
-        /// </summary>
-        /// <param name="id">Index of the element to retrieve.</param>
-        /// <returns>XmlElement contents.</returns>
-        public XmlElement this[string id]
-        {
-            get { return m_items[id]; }
-            set
-            {
-                // TODO: publish, and reset ID when it comes back.
-                m_items[id] = value;
-            }
-        }
-
-        /// <summary>
-        /// Unsubscribes from the node.
-        /// </summary>
-        public void Unsubscribe()
-        {
-            PubSubIQ iq = createCommand(PubSubCommandType.unsubscribe);
-            BeginIQ(iq, GotUnsubsribed, null);
-        }
-
-        private void GotUnsubsribed(object sender, IQ iq, object data)
-        {
-            //TODO: Report back error
-        }
-
-        /// <summary>
-        /// Deletes the node from the XMPP server.
-        /// </summary>
-        public void Delete()
-        {
-            OwnerPubSubCommandIQ<OwnerDelete> iq = new OwnerPubSubCommandIQ<OwnerDelete>(m_stream.Document);
-            iq.To = m_jid;
-            iq.Type = IQType.set;
-            iq.Command.Node = m_node;
-            BeginIQ(iq, GotDelete, null);
-        }
-
-        private void GotDelete(object sender, IQ iq, object data)
-        {
-            if (iq.Type != IQType.result)
-            {
-                FireError(Op.DELETE, "Delete failed", iq);
-                return;
-            }
-        }
-
-        /// <summary>
-        /// Deletes a single item from the XMPP server.
-        /// </summary>
-        /// <param name="id">Id of item.</param>
-        public void DeleteItem(string id)
-        {
-            PubSubIQ iq = createCommand(PubSubCommandType.retract);
-            Retract retract = (Retract)iq.Command;
-            retract.AddItem(id);
-            BeginIQ(iq, OnDeleteNode, null);
-        }
-
-        private void OnDeleteNode(object sender, IQ iq, object data)
-        {
-            if (iq.Type != IQType.result)
-            {
-                string msg = string.Format("Error deleting pubsub item: {0}", iq.Error.Condition);
-                Debug.WriteLine(msg);
-
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.DELETE_ITEM, msg, iq));
-                return;
-            }
-        }
-
-        /// <summary>
-        /// Delete all items from a node at once.
-        /// </summary>
-        public void Purge()
-        {
-            OwnerPubSubCommandIQ<OwnerPurge> iq = new OwnerPubSubCommandIQ<OwnerPurge>(m_stream.Document);
-            iq.To = m_jid;
-            iq.Type = IQType.set;
-            iq.Command.Node = m_node;
-            BeginIQ(iq, GotPurge, null);
-
-        }
-
-        private void GotPurge(object sender, IQ iq, object data)
-        {
-            if (iq.Type != IQType.result)
-            {
-                FireError(Op.PURGE, "Purge failed", iq);
-                return;
-            }
-        }
-
-        /// <summary>
-        /// Publishes an item to the node.
-        /// </summary>
-        /// <param name="id">If null, the server will assign an item ID.</param>
-        /// <param name="contents">The XML inside the item.  Should be in a new namespace.</param>
-        public void PublishItem(string id, XmlElement contents)
-        {
-            PubSubIQ iq = createCommand(PubSubCommandType.publish);
-            Publish pub = (Publish)iq.Command;
-            PubSubItem item = new PubSubItem(m_stream.Document);
-            if (id != null)
-                item.ID = id;
-            item.AddChild(contents);
-            pub.AddChild(item);
-            BeginIQ(iq, new IqCB(OnPublished), item);
-        }
-
-        private void OnPublished(object sender, IQ iq, object data)
-        {
-            if (iq.Type != IQType.result)
-            {
-                string msg = string.Format("Error publishing pubsub item: {0}", iq.Error.Condition);
-                Debug.WriteLine(msg);
-
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.PUBLISH_ITEM, msg, iq));
-                return;
-            }
-
-            // TODO: if an item is returned, it will have a new item id.
-            if (OnItemPublished != null)
-                OnItemPublished(this, (PubSubItem)data);
-        }
-
-        /// <summary>
-        /// Request configuration form as the owner
-        /// </summary>
-        /// <param name="callback">Callback.  Must not be null.  Will not be called back 
-        /// if there is an error, but instead OnError will be called.</param>
-        /// <param name="state">State information to be passed back to callback</param>
-        public void Configure(IqCB callback, object state)
-        {
-            OwnerPubSubCommandIQ<OwnerConfigure> iq = new OwnerPubSubCommandIQ<OwnerConfigure>(m_stream.Document);
-            iq.To = m_jid;
-            iq.Type = IQType.get;
-            iq.Command.Node = m_node;
-            BeginIQ(iq, OnConfigure, new IQTracker.TrackerData(callback, state, null, null));
-        }
-
-        private void OnConfigure(object sender, IQ iq, object data)
-        {
-            if (iq == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.CONFIGURE, "IQ timeout", null));
-                return;
-            }
-
-            if (iq.Type != IQType.result)
-            {
-                string msg = string.Format("Error configuring pubsub node: {0}", iq.Error.Condition);
-                Debug.WriteLine(msg);
-
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.CONFIGURE, msg, iq));
-                return;
-            }
-            PubSubOwner ow = iq.Query as PubSubOwner;
-            if (ow == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.CONFIGURE, "Invalid protocol", iq));
-                return;
-            }
-
-            OwnerConfigure conf = ow.Command as OwnerConfigure;
-            if (conf == null)
-            {
-                if (OnError != null)
-                    OnError(this, new PubSubException(Op.CONFIGURE, "Invalid protocol", iq));
-                return;
-            }
-
-            IQTracker.TrackerData td = data as IQTracker.TrackerData;
-            td.Call(this, iq);
-        }
-
-        #region IEnumerable Members
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return m_items.GetEnumerator();
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/SocketStanzaStream.cs b/lib/jabber-net/jabber/connection/SocketStanzaStream.cs
deleted file mode 100644
index 5e5743d..0000000
--- a/lib/jabber-net/jabber/connection/SocketStanzaStream.cs
+++ /dev/null
@@ -1,467 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.Xml;
-
-using bedrock.net;
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Contains the types of proxies Jabber-Net supports.  This is only for socket connections.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum ProxyType
-    {
-        /// <summary>
-        /// no proxy
-        /// </summary>
-        None,
-        /// <summary>
-        /// SOCKS4 as in http://archive.socks.permeo.com/protocol/socks4.protocol
-        /// </summary>
-        Socks4,
-        /// <summary>
-        /// SOCKS5 as in http://archive.socks.permeo.com/rfc/rfc1928.txt
-        /// </summary>
-        Socks5,
-        /// <summary>
-        /// HTTP CONNECT
-        /// </summary>
-        HTTP,
-    }
-
-
-    /// <summary>
-    /// "Standard" XMPP socket for outbound connections.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SocketStanzaStream : StanzaStream, ISocketEventListener
-    {
-        private AsynchElementStream m_elements = null;
-        private BaseSocket          m_sock     = null;
-        private BaseSocket          m_accept   = null;
-        private Timer               m_timer    = null;
-
-        /// <summary>
-        /// Create a new one.
-        /// </summary>
-        /// <param name="listener"></param>
-        internal SocketStanzaStream(IStanzaEventListener listener) : base(listener)
-        {
-            m_timer = new Timer(new TimerCallback(DoKeepAlive), null, Timeout.Infinite, Timeout.Infinite);
-        }
-
-        /// <summary>
-        /// Determines if the socket is connected.
-        /// </summary>
-        public override bool Connected
-        {
-            get { return ASock.Connected;  }
-        }
-
-        /// <summary>
-        /// Determines whether or not Jabber-Net supports StartTLS.
-        /// </summary>
-        public override bool SupportsTLS
-        {
-            get
-            {
-#if NO_SSL
-                return false;
-#else
-                return true;
-#endif
-            }
-        }
-
-        /// <summary>
-        /// Determines whether or not Jabber-Net supports compression.
-        /// </summary>
-        public override bool SupportsCompression
-        {
-            get
-            {
-                try
-                {
-#if ZLIB_NET
-                    return bedrock.io.ZlibStream.Supported;
-#else
-                    return false;
-#endif
-                }
-                catch
-                {
-                    Debug.WriteLine("WARNING: zlib.net.dll missing!");
-                    return false;
-                }
-            }
-        }
-
-        private AsyncSocket ASock
-        {
-            get
-            {
-                if (m_sock is ProxySocket)
-                    return ((ProxySocket)m_sock).Socket as AsyncSocket;
-                else
-                    return m_sock as AsyncSocket;
-            }
-        }
-
-        /// <summary>
-        /// Initializes the element stream.  This is the place to add factories.
-        /// </summary>
-        public override void InitializeStream()
-        {
-            bool first = (m_elements == null);
-            m_elements = new AsynchElementStream();
-            m_elements.OnDocumentStart += new ProtocolHandler(m_elements_OnDocumentStart);
-            m_elements.OnDocumentEnd += new bedrock.ObjectHandler(m_elements_OnDocumentEnd);
-            m_elements.OnElement += new ProtocolHandler(m_elements_OnElement);
-            m_elements.OnError += new bedrock.ExceptionHandler(m_elements_OnError);
-
-            m_listener.StreamInit(m_elements);
-
-            Debug.Assert(this.Connected);
-            if (first)
-                m_sock.RequestRead();
-
-        }
-
-        /// <summary>
-        /// Connects to the XMPP server.
-        /// </summary>
-        public override void Connect()
-        {
-            m_elements = null;
-            int port = (int)m_listener[Options.PORT];
-            Debug.Assert(port > 0);
-            //m_sslOn = m_ssl;
-
-            ProxySocket proxy = null;
-            ProxyType pt = (ProxyType)m_listener[Options.PROXY_TYPE];
-            switch (pt)
-            {
-            case ProxyType.Socks4:
-                proxy = new Socks4Proxy(this);
-                break;
-
-            case ProxyType.Socks5:
-                proxy = new Socks5Proxy(this);
-                break;
-
-            case ProxyType.HTTP:
-                proxy = new ShttpProxy(this);
-                break;
-
-                /*
-            case ProxyType.HTTP_Polling:
-                XEP25Socket j25s = new XEP25Socket(this);
-                if (m_ProxyHost != null)
-                {
-                    System.Net.WebProxy wp = new System.Net.WebProxy();
-                    wp.Address = new Uri("http://" + m_ProxyHost + ":" + m_ProxyPort);
-                    if (m_ProxyUsername != null)
-                    {
-                        wp.Credentials = new System.Net.NetworkCredential(m_ProxyUsername, m_ProxyPassword);
-                    }
-                    j25s.Proxy = wp;
-                }
-                j25s.URL = m_server;
-                m_sock = j25s;
-                break;
-                */
-            case ProxyType.None:
-                m_sock = new AsyncSocket(null, this, (bool)m_listener[Options.SSL], false);
-
-                ((AsyncSocket)m_sock).LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as
-                    System.Security.Cryptography.X509Certificates.X509Certificate2;
-
-                ((AsyncSocket)m_sock).CertificateGui = (bool)m_listener[Options.CERTIFICATE_GUI];
-                break;
-
-            default:
-                throw new ArgumentException("no handler for proxy type: " + pt, "ProxyType");
-            }
-
-            if (proxy != null)
-            {
-                proxy.Socket = new AsyncSocket(null, proxy, (bool)m_listener[Options.SSL], false);
-                ((AsyncSocket)proxy.Socket).LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as
-                    System.Security.Cryptography.X509Certificates.X509Certificate2;
-
-                proxy.Host = m_listener[Options.PROXY_HOST] as string;
-                proxy.Port = (int)m_listener[Options.PROXY_PORT];
-                proxy.Username = m_listener[Options.PROXY_USER] as string;
-                proxy.Password = m_listener[Options.PROXY_PW] as string;
-                m_sock = proxy;
-            }
-
-            string to = (string)m_listener[Options.TO];
-            Debug.Assert(to != null);
-
-            string host = (string)m_listener[Options.NETWORK_HOST];
-            if ((host == null) || (host == ""))
-            {
-#if __MonoCS__
-                host = to;
-#else
-                try
-                {
-                    Address.LookupSRV((string)m_listener[Options.SRV_PREFIX], to, ref host, ref port);
-                }
-                catch
-                {
-                    Debug.WriteLine("WARNING: netlib.Dns.dll missing");
-                    host = to;
-                }
-#endif
-            }
-
-            Address addr = new Address(host, port);
-            m_sock.Connect(addr, (string)m_listener[Options.SERVER_ID]);
-        }
-
-        /// <summary>
-        /// Listens for an inbound connection.
-        /// </summary>
-        public override void Accept()
-        {
-            if (m_accept == null)
-            {
-                m_accept = new AsyncSocket(null, this, (bool)m_listener[Options.SSL], false);
-                ((AsyncSocket)m_accept).LocalCertificate = m_listener[Options.LOCAL_CERTIFICATE] as
-                    System.Security.Cryptography.X509Certificates.X509Certificate2;
-
-                Address addr = new Address((string)m_listener[Options.NETWORK_HOST],
-                    (int)m_listener[Options.PORT]);
-
-                m_accept.Accept(addr);
-            }
-            m_accept.RequestAccept();
-        }
-
-        /// <summary>
-        /// Determines if the method Accept() can be called now.
-        /// </summary>
-        public override bool Acceptable
-        {
-            get
-            {
-                return (m_accept != null);
-            }
-        }
-
-        /// <summary>
-        /// Writes the given string to the socket after UTF-8 encoding.
-        /// </summary>
-        /// <param name="str">String to write out.</param>
-        public override void Write(string str)
-        {
-            int keep = (int)m_listener[Options.CURRENT_KEEP_ALIVE];
-            if (keep > 0)
-                m_timer.Change(keep, keep);
-            m_sock.Write(ENC.GetBytes(str));
-        }
-
-        /// <summary>
-        /// Writes a stream:stream.
-        /// </summary>
-        /// <param name="stream">Stream containing the stream:stream packet to send.</param>
-        public override void WriteStartTag(jabber.protocol.stream.Stream stream)
-        {
-            Write(stream.StartTag());
-        }
-
-        /// <summary>
-        /// Writes a full stanza.
-        /// </summary>
-        /// <param name="elem">XML stanza to write.</param>
-        public override void Write(XmlElement elem)
-        {
-            if (m_sock is IElementSocket)
-                ((IElementSocket)m_sock).Write(elem);
-            else
-                Write(elem.OuterXml);
-        }
-
-        /// <summary>
-        /// Closes the session with the XMPP server.
-        /// </summary>
-        /// <param name="clean">Sends the close stanza to the XMPP server if true.</param>
-        public override void Close(bool clean)
-        {
-            // Note: socket should still be connected, excepts for races.  Revist.
-            if (clean)
-                Write("</stream:stream>");
-            m_sock.Close();
-        }
-
-        private void DoKeepAlive(object state)
-        {
-            if ((m_sock != null) && this.Connected && ((int)m_listener[Options.CURRENT_KEEP_ALIVE] > 0))
-                m_sock.Write(new byte[] { 32 });
-        }
-
-#if !NO_SSL
-        /// <summary>
-        /// Negotiates Start-TLS with the other endpoint.
-        /// </summary>
-        public override void StartTLS()
-        {
-            m_sock.StartTLS();
-            AsyncSocket s = ASock;
-
-            Debug.Assert(s != null);
-            m_listener[Options.REMOTE_CERTIFICATE] = s.RemoteCertificate;
-        }
-#endif
-
-        /// <summary>
-        /// Starts compressing outgoing traffic for this connection with the XMPP server.
-        /// </summary>
-        public override void StartCompression()
-        {
-            m_sock.StartCompression();
-        }
-
-        #region ElementStream handlers
-        private void m_elements_OnDocumentStart(object sender, XmlElement rp)
-        {
-            m_listener.DocumentStarted(rp);
-        }
-
-        private void m_elements_OnDocumentEnd(object sender)
-        {
-            m_listener.DocumentEnded();
-        }
-
-        private void m_elements_OnElement(object sender, XmlElement rp)
-        {
-            m_listener.StanzaReceived(rp);
-        }
-
-        private void m_elements_OnError(object sender, Exception ex)
-        {
-            // XML parse error.
-            m_timer.Change(Timeout.Infinite, Timeout.Infinite);
-            m_listener.Errored(ex);
-        }
-        #endregion
-
-        #region ISocketEventListener Members
-
-        void ISocketEventListener.OnInit(BaseSocket newSock)
-        {
-        }
-
-        ISocketEventListener ISocketEventListener.GetListener(BaseSocket newSock)
-        {
-            return this;
-        }
-
-        bool ISocketEventListener.OnAccept(BaseSocket newsocket)
-        {
-            m_sock = newsocket;
-            InitializeStream();
-            m_listener.Accepted();
-
-            // Don't accept any more connections until this one closes
-            // yes, it will look like we're still listening until the old sock is free'd by GC.
-            // don't want OnClose() to fire, though, so we can't close the previous sock.
-            return false;
-        }
-
-        void ISocketEventListener.OnConnect(BaseSocket sock)
-        {
-#if !NO_SSL
-            if ((bool)m_listener[Options.SSL])
-            {
-                AsyncSocket s = sock as AsyncSocket;
-                m_listener[Options.REMOTE_CERTIFICATE] = s.RemoteCertificate;
-            }
-#endif
-            m_listener.Connected();
-        }
-
-        void ISocketEventListener.OnClose(BaseSocket sock)
-        {
-            //System.Windows.Forms.Application.DoEvents();
-            //System.Threading.Thread.Sleep(1000);
-            m_listener[Options.REMOTE_CERTIFICATE] = null;
-            //m_elements = null;
-            m_timer.Change(Timeout.Infinite, Timeout.Infinite);
-            m_listener.Closed();
-        }
-
-        void ISocketEventListener.OnError(BaseSocket sock, Exception ex)
-        {
-            m_listener[Options.REMOTE_CERTIFICATE] = null;
-            //m_elements = null;
-            m_timer.Change(Timeout.Infinite, Timeout.Infinite);
-            m_listener.Errored(ex);
-        }
-
-        bool ISocketEventListener.OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            int tim = (int)m_listener[Options.KEEP_ALIVE];
-            if (tim > 0)
-                m_timer.Change(tim, tim);
-
-            m_listener.BytesRead(buf, offset, length);
-            try
-            {
-                m_elements.Push(buf, offset, length);
-            }
-            catch (Exception e)
-            {
-                ((ISocketEventListener)this).OnError(sock, e);
-                sock.Close();
-                return false;
-            }
-            return true;
-        }
-
-        void ISocketEventListener.OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            int tim = (int)m_listener[Options.KEEP_ALIVE];
-            if (tim > 0)
-                m_timer.Change(tim, tim);
-
-            m_listener.BytesWritten(buf, offset, length);
-        }
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        bool ISocketEventListener.OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return m_listener.OnInvalidCertificate(sock, certificate, chain, sslPolicyErrors);
-        }
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/StanzaStream.cs b/lib/jabber-net/jabber/connection/StanzaStream.cs
deleted file mode 100644
index 5b02907..0000000
--- a/lib/jabber-net/jabber/connection/StanzaStream.cs
+++ /dev/null
@@ -1,296 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Text;
-using System.Xml;
-
-using bedrock.net;
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Specifies the connection type, such as socket, polling, and so on.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum ConnectionType
-    {
-        /// <summary>
-        /// Uses "Normal" XMPP socket
-        /// </summary>
-        Socket,
-        /// <summary>
-        /// Uses HTTP Polling, as in http://www.xmpp.org/extensions/xep-0025.html
-        /// </summary>
-        HTTP_Polling,
-        /// <summary>
-        /// Uses HTTP Binding, as in http://www.xmpp.org/extensions/xep-0124.html
-        /// </summary>
-        HTTP_Binding
-    }
-
-    /// <summary>
-    /// Listens for stanza and connection events
-    /// </summary>
-    [SVN(@"$Id$")]
-    public interface IStanzaEventListener
-    {
-        /// <summary>
-        /// Gets or sets properties on the listener.
-        /// </summary>
-        /// <param name="prop">Property name.  Look at the Options class for some ideas.</param>
-        /// <returns></returns>
-        object this[string prop]
-        {
-            get;
-            set;
-        }
-
-        /// <summary>
-        /// Notifies the user that one of the properties has changed.
-        /// </summary>
-        event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
-
-        /// <summary>
-        /// Informs the client that the connection to the XMPP server has finished.
-        /// Time to send the stream:stream packet.
-        /// </summary>
-        void Connected();
-
-        /// <summary>
-        /// Informs the client that a new connection from the server has been accepted.
-        /// Wait for a stream:stream.
-        /// </summary>
-        void Accepted();
-
-        /// <summary>
-        /// Informs the client that text was read from the XMPP server.
-        /// Use for debugging only.
-        /// Will NOT be complete nodes at a time.
-        /// </summary>
-        /// <param name="buf">Buffer containing the data read.</param>
-        /// <param name="offset">Where in the buffer the read data begins.</param>
-        /// <param name="len">Length of the data read.</param>
-        void BytesRead(byte[] buf, int offset, int len);
-
-        /// <summary>
-        /// Informs the client that text was written to the server.
-        /// Use for debugging only. Will NOT be complete nodes at a time.
-        /// </summary>
-        /// <param name="buf">Bytes to write out.</param>
-        /// <param name="offset">The index in the buffer to start getting bytes.</param>
-        /// <param name="len">The amount of bytes to write out.</param>
-        void BytesWritten(byte[] buf, int offset, int len);
-
-        /// <summary>
-        /// Informs the client that a new stream was initialized.
-        /// You can add your packet factories to it.
-        /// </summary>
-        /// <param name="stream">The stream that was initialized.</param>
-        void StreamInit(ElementStream stream);
-
-        /// <summary>
-        /// Notifies the client that an error has occurred.
-        /// </summary>
-        /// <param name="e">The exception that caused the error.</param>
-        void Errored(Exception e);
-
-        /// <summary>
-        /// Notifies the client that the session has been closed.
-        /// </summary>
-        void Closed();
-
-        /// <summary>
-        /// Informs the client that a doc start tag has been received.
-        /// This may be "synthetic" for some backends.
-        /// </summary>
-        /// <param name="elem">XML element containing the start tag.</param>
-        void DocumentStarted(XmlElement elem);
-
-        /// <summary>
-        /// Receives the closing stream:stream.  Probably mostly equivalent to Closed(),
-        /// except if the stream is still open, you should close it at this point.
-        /// May not be called for some backends.
-        /// </summary>
-        void DocumentEnded();
-
-        /// <summary>
-        /// Receives an XML element such as stream:features and so on.
-        /// </summary>
-        /// <param name="elem">The XML Element received.</param>
-        void StanzaReceived(XmlElement elem);
-
-        /// <summary>
-        /// An invalid peer certificate was sent during SSL/TLS neogtiation.
-        /// </summary>
-        /// <param name="sock">The socket that experienced the error</param>
-        /// <param name="certificate">The bad certificate</param>
-        /// <param name="chain">The chain of CAs for the cert</param>
-        /// <param name="sslPolicyErrors">A bitfield for the erorrs in the certificate.</param>
-        /// <returns>True if the cert should be accepted anyway.</returns>
-        bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors);
-    }
-
-    /// <summary>
-    /// Manages the base stream for reading and writing full stanzas.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class StanzaStream
-    {
-        /// <summary>
-        /// Text encoding.  Always UTF-8 for XMPP.
-        /// </summary>
-        protected readonly Encoding ENC = Encoding.UTF8;
-
-        /// <summary>
-        /// Notifies the client that an event has occurred.
-        /// </summary>
-        protected IStanzaEventListener m_listener = null;
-
-        /// <summary>
-        /// Creates a StanzaStream.
-        /// </summary>
-        /// <param name="kind">Connection type, such as socket, polling, and so on.</param>
-        /// <param name="listener">Connection event listeners.</param>
-        /// <returns>StanzaStream used to connect to an XMPP server and send stanzas.</returns>
-        public static StanzaStream Create(ConnectionType kind, IStanzaEventListener listener)
-        {
-            switch (kind)
-            {
-            case ConnectionType.Socket:
-                return new SocketStanzaStream(listener);
-            case ConnectionType.HTTP_Polling:
-                return new PollingStanzaStream(listener);
-            case ConnectionType.HTTP_Binding:
-                return new BindingStanzaStream(listener);
-            default:
-                throw new NotImplementedException("Proxy type not implemented yet: " + kind.ToString());
-            }
-        }
-
-        /// <summary>
-        /// Creates a new stanza stream.
-        /// </summary>
-        /// <param name="listener">Event listener associated with the new stanza stream.</param>
-        protected StanzaStream(IStanzaEventListener listener)
-        {
-            Debug.Assert(listener != null);
-            m_listener = listener;
-        }
-
-        /// <summary>
-        /// Starts the outbound connection to the XMPP server.
-        /// </summary>
-        abstract public void Connect();
-
-        /// <summary>
-        /// Listens for an inbound connection.  Only implemented by socket types for now.
-        /// </summary>
-        virtual public void Accept()
-        {
-            throw new NotImplementedException("Accept not implemented on this stream type");
-        }
-
-        /// <summary>
-        /// Determines whether or not the client can call the Accept() method.
-        /// </summary>
-        virtual public bool Acceptable
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Starts the TLS handshake.
-        /// </summary>
-        virtual public void StartTLS()
-        {
-            throw new NotImplementedException("Start-TLS not implemented on this stream type");
-        }
-
-        /// <summary>
-        /// Starts the compression on the connection.
-        /// </summary>
-        virtual public void StartCompression()
-        {
-            throw new NotImplementedException("Start-TLS not implemented on this stream type");
-        }
-
-        /// <summary>
-        /// Initializes a new stream:stream.
-        /// </summary>
-        virtual public void InitializeStream()
-        {
-        }
-
-        /// <summary>
-        /// Writes a stream:stream start tag.
-        /// Some underlying implementations will ignore this,
-        /// but may pull out pertinent data.
-        /// </summary>
-        /// <param name="stream">Stream containing the start tag.</param>
-        abstract public void WriteStartTag(jabber.protocol.stream.Stream stream);
-
-        /// <summary>
-        /// Writes an entire XML element.
-        /// </summary>
-        /// <param name="elem">XML element to write out.</param>
-        abstract public void Write(XmlElement elem);
-
-        /// <summary>
-        /// Writes a raw string.
-        /// </summary>
-        /// <param name="str">String to write out.</param>
-        abstract public void Write(string str);
-
-        /// <summary>
-        /// Closes the session with the XMPP server.
-        /// </summary>
-        /// <param name="clean">If true, send the stream:stream close packet.</param>
-        abstract public void Close(bool clean);
-
-        /// <summary>
-        /// Determines whether or not the client is connected to the XMPP server.
-        /// </summary>
-        abstract public bool Connected
-        {
-            get;
-        }
-
-        /// <summary>
-        /// Determines whether or not Jabber-Net supports TLS.
-        /// </summary>
-        virtual public bool SupportsTLS
-        {
-            get { return false; }
-        }
-
-        /// <summary>
-        /// Determines whether or not this stream supports compression (XEP-0138).
-        /// </summary>
-        virtual public bool SupportsCompression
-        {
-            get { return false; }
-        }
-    }
-
-    /// <summary>
-    /// Informs the client that something happened on a StanzaStream.
-    /// </summary>
-    public delegate void StanzaStreamHandler(object sender, StanzaStream stream);
-}
diff --git a/lib/jabber-net/jabber/connection/States.cs b/lib/jabber-net/jabber/connection/States.cs
deleted file mode 100644
index 711e351..0000000
--- a/lib/jabber-net/jabber/connection/States.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Represents the base class for all states.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class BaseState
-    {
-    }
-
-    /// <summary>
-    /// Specifies the state is up and running.  If subclasses change the
-    /// state transition approach, they should end at the RunningState state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RunningState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the running state.
-        /// </summary>
-        public static readonly BaseState Instance = new RunningState();
-    }
-
-    /// <summary>
-    /// Specifies the state is not connected.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ClosedState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the closed state.
-        /// </summary>
-        public static readonly BaseState Instance = new ClosedState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in the process of connecting such as
-    /// DNS lookup, socket setup, and so on.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ConnectingState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the connecting state.
-        /// </summary>
-        public static readonly BaseState Instance = new ConnectingState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in the "connected socket" state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ConnectedState : BaseState
-    {
-        /// <summary>
-        /// The instance that is always used.
-        /// </summary>
-        public static readonly BaseState Instance = new ConnectedState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in the "stream:stream has been received" state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StreamState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the XMPP stream state.
-        /// </summary>
-        public static readonly BaseState Instance = new StreamState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in a closing state.
-    /// A close was requested, but hasn't yet finalized.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ClosingState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance for the closing state.
-        /// </summary>
-        public static readonly BaseState Instance = new ClosingState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in a paused state waiting for reconnect timeout.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ReconnectingState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the reconnecting state.
-        /// </summary>
-        public static readonly BaseState Instance = new ReconnectingState();
-    }
-
-    /// <summary>
-    /// Specifies the state is in the "Accepting incoming socket connections" state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AcceptingState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the accepting state.
-        /// </summary>
-        public static readonly BaseState Instance = new AcceptingState();
-    }
-    /// <summary>
-    /// Specifies the state is in Old-style auth, iq:auth or handshake.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class NonSASLAuthState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the non SASL authentication state.
-        /// </summary>
-        public static readonly BaseState Instance = new NonSASLAuthState();
-    }
-    /// <summary>
-    /// Specifies the state is in waiting for the server to send the features element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ServerFeaturesState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the server features state.
-        /// </summary>
-        public static readonly BaseState Instance = new ServerFeaturesState();
-    }
-    /// <summary>
-    /// Specifies the state is in Start-TLS.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StartTLSState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the Start-TLS state.
-        /// </summary>
-        public static readonly BaseState Instance = new StartTLSState();
-    }
-    /// <summary>
-    /// Specifies the state is in the compression state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class CompressionState : BaseState
-    {
-        /// <summary>
-        /// The instance that is always used.
-        /// </summary>
-        public static readonly BaseState Instance = new CompressionState();
-    }
-    /// <summary>
-    /// Specifies the state is in SASL Authentication.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SASLState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance of the SASL state.
-        /// </summary>
-        public static readonly BaseState Instance = new SASLState();
-    }
-    /// <summary>
-    /// Specifies the state is in the SASL Authentication has finished state.
-    /// Restarting the stream for the last time.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SASLAuthedState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance for the SASL authentication state.
-        /// </summary>
-        public static readonly BaseState Instance = new SASLAuthedState();
-    }
-    /// <summary>
-    /// SASL Authentication failed.  On some servers you can re-try, or register.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SASLFailedState : BaseState
-    {
-        /// <summary>
-        /// The instance that is always used.
-        /// </summary>
-        public static readonly BaseState Instance = new SASLFailedState();
-    }
-    /// <summary>
-    /// Specifies the state is in the "Binding session" state.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BindState : BaseState
-    {
-        /// <summary>
-        /// Returns the instance for the Bind state.
-        /// </summary>
-        public static readonly BaseState Instance = new BindState();
-    }
-
-}
diff --git a/lib/jabber-net/jabber/connection/StreamComponent.cs b/lib/jabber-net/jabber/connection/StreamComponent.cs
deleted file mode 100644
index 194aa6e..0000000
--- a/lib/jabber-net/jabber/connection/StreamComponent.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Xml;
-
-using bedrock.util;
-using System.Diagnostics;
-using jabber.protocol.client;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Manages the XmppStream as a component.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class StreamComponent : System.ComponentModel.Component
-    {
-        /// <summary>
-        /// Finds the first component that subclasses XmppStream in Visual Studio
-        /// during runtime.
-        /// </summary>
-        /// <param name="host">
-        /// Calls GetService(typeof(IDesignerHost)) on your control to get this.
-        /// </param>
-        /// <returns>Null if none found</returns>
-        public static XmppStream GetStreamFromHost(IDesignerHost host)
-        {
-            return (XmppStream)GetComponentFromHost(host, typeof(XmppStream));
-        }
-
-        /// <summary>
-        /// Finds the first component that subclasses the given type at runtime.
-        /// </summary>
-        /// <param name="host">Call GetService(typeof(IDesignerHost)) on your control to get this.</param>
-        /// <param name="type">The type to search for.</param>
-        /// <returns>Null if none found</returns>
-        public static Component GetComponentFromHost(IDesignerHost host, Type type)
-        {
-            if (host == null)
-                return null;
-            Debug.Assert(type != null);
-            Component root = host.RootComponent as Component;
-            if (root == null)
-                return null;
-
-            foreach (Component c in root.Container.Components)
-            {
-                if (type.IsAssignableFrom(c.GetType()))
-                    return c;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Retrieves the XmppStream for this control.
-        /// Set at design time when a subclass control is dragged onto a form.
-        /// </summary>
-        protected XmppStream m_stream = null;
-
-        /// <summary>
-        /// Informs the client that the XmppStream was changed.
-        /// Often at design time, the object will be this StreamComponent.
-        /// </summary>
-        public event bedrock.ObjectHandler OnStreamChanged;
-
-        /// <summary>
-        /// Gets and sets the JabberClient or JabberService XMPP stream value.
-        /// </summary>
-        [Description("The JabberClient or JabberService to hook up to.")]
-        [Category("Jabber")]
-        public virtual XmppStream Stream
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get an XmppStream control
-                // from the environment.
-                if ((this.m_stream == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.Stream = GetStreamFromHost(host);
-                }
-                return m_stream;
-            }
-            set
-            {
-                if ((object)m_stream != (object)value)
-                {
-                    m_stream = value;
-                    if (OnStreamChanged != null)
-                        OnStreamChanged(this);
-                }
-            }
-        }
-
-        private JID m_overrideFrom = null;
-
-        /// <summary>
-        /// Override the from address that will be stamped on outbound packets.
-        /// Unless your server implemets XEP-193, you shouldn't use this for 
-        /// client connections.
-        /// </summary>
-        public JID OverrideFrom
-        {
-            get { return m_overrideFrom; }
-            set { m_overrideFrom = value; }
-        }
-
-        /// <summary>
-        /// Write the specified stanza to the stream.
-        /// If the from address hasn't been set, and an OverrideFrom has been set,
-        /// the from address will be set to the value of OverrideFrom.
-        /// </summary>
-        /// <param name="elem"></param>
-        public void Write(XmlElement elem)
-        {
-            if ((m_overrideFrom != null) && (elem.GetAttribute("from") == ""))
-                elem.SetAttribute("from", m_overrideFrom);
-            m_stream.Write(elem);
-        }
-
-        ///<summary>
-        /// Does an asynchronous IQ call.
-        /// If the from address hasn't been set, and an OverrideFrom has been set,
-        /// the from address will be set to the value of OverrideFrom.
-        ///</summary>
-        ///<param name="iq">IQ packet to send.</param>
-        ///<param name="cb">Callback to execute when the result comes back.</param>
-        ///<param name="cbArg">Arguments to pass to the callback.</param>
-        public void BeginIQ(IQ iq, IqCB cb, object cbArg)
-        {
-            if ((m_overrideFrom != null) && (iq.From == null))
-                iq.From = m_overrideFrom;
-            m_stream.Tracker.BeginIQ(iq, cb, cbArg);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/XmppStream.cs b/lib/jabber-net/jabber/connection/XmppStream.cs
deleted file mode 100644
index 5159d19..0000000
--- a/lib/jabber-net/jabber/connection/XmppStream.cs
+++ /dev/null
@@ -1,1774 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Diagnostics;
-using System.IO;
-using System.Threading;
-using System.Security.Cryptography;
-using System.Xml;
-using bedrock.util;
-
-using jabber.protocol;
-using jabber.protocol.stream;
-using jabber.connection.sasl;
-
-using System.Security.Cryptography.X509Certificates;
-
-namespace jabber.connection
-{
-    /// <summary>
-    /// Informs the client about events that happen on an ElementStream.
-    /// </summary>
-    public delegate void StreamHandler(Object sender, ElementStream stream);
-
-    /// <summary>
-    /// Manages option names.  These must be well-formed XML element names.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class Options
-    {
-        /// <summary>
-        /// Contains the default namespace for this connection.
-        /// </summary>
-        public const string NAMESPACE = "namespace";
-
-        /// <summary>
-        /// Contains the network hostname or IP address of the XMPP server to connect to.
-        /// </summary>
-        public const string NETWORK_HOST = "network_host";
-        /// <summary>
-        /// Contains the identity of the item that the client is connecting to.
-        /// For components, the component ID.
-        /// </summary>
-        public const string TO = "to";
-        /// <summary>
-        /// Contains the server identity that is expected on the X.509 certificate
-        /// from the XMPP server.
-        /// </summary>
-        public const string SERVER_ID    = "tls.cn";
-        /// <summary>
-        /// Determines the keep-alive interval in seconds.
-        /// </summary>
-        public const string KEEP_ALIVE   = "keep_alive";
-        /// <summary>
-        /// Don't start keep-alives until we're fully authenticated.  This is what the SocketStanzaStream actually checks.
-        /// </summary>
-        public const string CURRENT_KEEP_ALIVE = "current_keep_alive";
-        /// <summary>
-        /// Contains the port number to connect to or to listen on.
-        /// </summary>
-        public const string PORT         = "port";
-        /// <summary>
-        /// Uses SSL on connection if set to true.
-        /// </summary>
-        public const string SSL          = "ssl";
-        /// <summary>
-        /// Uses Start-TLS on connection if set to true and
-        /// the server supports it.
-        /// </summary>
-        public const string AUTO_TLS     = "tls.auto";
-        /// <summary>
-        /// Starts the XMPP stream compression (XEP-138) on connection
-        /// if set to true.
-        /// </summary>
-        public const string AUTO_COMPRESS = "compress.auto";
-        /// <summary>
-        /// Allows plaintext authentication for connecting to the XMPP server.
-        /// </summary>
-        public const string PLAINTEXT    = "plaintext";
-        /// <summary>
-        /// Attempts a SASL connection if set to true and the feature is available
-        /// from the XMPP server. If the server doesn't support SASL, the connection
-        /// will move to a fallback mechanism.
-        /// </summary>
-        public const string SASL = "sasl";
-        /// <summary>
-        /// Requires SASL authentication on this connection if set to true.
-        /// There is no fallback mechanism. If the server doesn't support SASL,
-        /// the connection attempt will fail.
-        /// </summary>
-        public const string REQUIRE_SASL = "sasl.require";
-        /// <summary>
-        /// Contains the list of SASL Mechanisms such as Digest-MD5, Plain and so on.
-        /// </summary>
-        public const string SASL_MECHANISMS = "sasl.mechanisms";
-
-        /// <summary>
-        /// Contains the username to connect as.
-        /// </summary>
-        public const string USER     = "user";
-        /// <summary>
-        /// Contains the password for the user, or secret for the component.
-        /// </summary>
-        public const string PASSWORD = "password";
-        /// <summary>
-        /// Contains the connecting resource which is used to identify a unique connection.
-        /// </summary>
-        public const string RESOURCE = "resource";
-        /// <summary>
-        /// Contains the presence default priority for this connection.
-        /// </summary>
-        public const string PRIORITY = "priority";
-        /// <summary>
-        /// Contains the DNS Service/Protocol to prepend to domain.
-        /// Example: _xmpp-client._tcp.
-        /// </summary>
-        public const string SRV_PREFIX = "srv.prefix";
-        /// <summary>
-        /// Allows auto-login to be used for the connection to the XMPP server
-        /// if set to true.
-        /// </summary>
-        public const string AUTO_LOGIN    = "auto.login";
-        /// <summary>
-        /// This pass through the login process, can we login?
-        /// This option is set/reset by the framework.
-        /// </summary>
-        public const string AUTO_LOGIN_THISPASS = "auto.login.thispass";
-        /// <summary>
-        /// Retrieves the roster items from the XMPP server on
-        /// connection if set to true.
-        /// </summary>
-        public const string AUTO_ROSTER   = "auto.roster";
-        /// <summary>
-        /// Sends back 501/feature-not-implemented to the XMPP server if
-        /// there are IQs that have not been handled if set to true.
-        /// </summary>
-        public const string AUTO_IQ_ERRORS   = "auto.iq_errors";
-        /// <summary>
-        /// Sends the presence on connection if set to true.
-        /// </summary>
-        public const string AUTO_PRESENCE = "auto.presence";
-
-        /// <summary>
-        /// Contains the certificate for our side of the SSL/TLS negotiation.
-        /// </summary>
-        public const string LOCAL_CERTIFICATE   = "certificate.local";
-        /// <summary>
-        /// Contains the remote certificate that the XMPP server sent to the client.
-        /// </summary>
-        public const string REMOTE_CERTIFICATE  = "certificate.remote";
-        /// <summary>
-        /// Uses x509 selection dialog box when a certificate is requested
-        /// if set to true.
-        /// </summary>
-        public const string CERTIFICATE_GUI = "certificate.gui";
-        /// <summary>
-        /// Contains the number of seconds to wait before attempting a reconnect.
-        /// </summary>
-        public const string RECONNECT_TIMEOUT   = "reconnect_timeout";
-        /// <summary>
-        /// Determines the connection type (sockets, HTTP polling, or HTTP binding).
-        /// </summary>
-        public const string CONNECTION_TYPE     = "connection";
-        /// <summary>
-        /// Contains the URL to poll on, or bind to.
-        /// </summary>
-        public const string POLL_URL            = "poll.url";
-        /// <summary>
-        /// Connects to the XMPP server or listen for connections.
-        /// </summary>
-        public const string COMPONENT_DIRECTION = "component.dir";
-        /// <summary>
-        /// Contains the logical JID associated with this connection.
-        /// </summary>
-        public const string JID = "jid";
-
-        /// <summary>
-        /// Contains the proxy type, such as none, SOCKS5 and so on.
-        /// </summary>
-        public const string PROXY_TYPE = "proxy.type";
-        /// <summary>
-        /// Contains the hostname or IP address of the proxy.
-        /// </summary>
-        public const string PROXY_HOST = "proxy.host";
-        /// <summary>
-        /// Contains the port number for the proxy.
-        /// </summary>
-        public const string PROXY_PORT = "proxy.port";
-        /// <summary>
-        /// Contains the username for the proxy server.
-        /// </summary>
-        public const string PROXY_USER = "proxy.user";
-        /// <summary>
-        /// Contains the password for the proxy server.
-        /// </summary>
-        public const string PROXY_PW   = "proxy.password";
-        /// <summary>
-        /// Override the from address, in a component/service connection.
-        /// </summary>
-        public const string OVERRIDE_FROM = "override_from";
-    }
-
-    /// <summary>
-    /// Manages the XMPP stream of the connection.
-    /// </summary>
-    [SVN(@"$Id$")]
-    abstract public class XmppStream :
-        System.ComponentModel.Component,
-        IStanzaEventListener
-    {
-        private static readonly object[][] DEFAULTS = new object[][] {
-            new object[] {Options.TO, "jabber.com"},
-            new object[] {Options.KEEP_ALIVE, 30000},
-            new object[] {Options.CURRENT_KEEP_ALIVE, -1},
-            new object[] {Options.PORT, 5222},
-            new object[] {Options.RECONNECT_TIMEOUT, 30000},
-            new object[] {Options.PROXY_PORT, 1080},
-            new object[] {Options.SSL, false},
-            new object[] {Options.SASL, true},
-            new object[] {Options.REQUIRE_SASL, false},
-            new object[] {Options.PLAINTEXT, false},
-            new object[] {Options.AUTO_TLS, true},
-            new object[] {Options.AUTO_COMPRESS, true},
-
-#if __MonoCS__
-            new object[] {Options.CERTIFICATE_GUI, false},
-#else
-            new object[] {Options.CERTIFICATE_GUI, true},
-#endif
-            new object[] {Options.PROXY_TYPE, ProxyType.None},
-            new object[] {Options.CONNECTION_TYPE, ConnectionType.Socket},
-        };
-
-        /// <summary>
-        /// Contains the character encoding for the XMPP stream.
-        /// Currently, it is set to UTF-8.
-        /// </summary>
-        protected static readonly System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-
-        private StanzaStream m_stanzas = null;
-        private IQTracker m_tracker = null;
-
-        private XmlDocument m_doc        = new XmlDocument();
-        private BaseState   m_state      = ClosedState.Instance;
-        private IDictionary m_properties = new Hashtable();
-
-        private string m_streamID = null;
-        private object m_stateLock = new object();
-        private ArrayList m_callbacks = new ArrayList();
-
-        private Timer m_reconnectTimer = null;
-        private bool m_reconnect = false;
-        private bool m_sslOn = false;
-        private bool m_compressionOn = false;
-
-        private XmlNamespaceManager m_ns;
-        private ISynchronizeInvoke m_invoker = null;
-
-        // XMPP v1 stuff
-        private string m_serverVersion = null;
-        private SASLProcessor m_saslProc = null;
-        private Features m_features = null; // the last features tag received.
-
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-#pragma warning disable 0414
-        private System.ComponentModel.Container components = new System.ComponentModel.Container();
-#pragma warning restore 0414
-        
-        /// <summary>
-        /// Creates a new XMPP stream and associates it with the parent control.
-        /// </summary>
-        /// <param name="container">Parent control.</param>
-        public XmppStream(System.ComponentModel.IContainer container) : this()
-        {
-            container.Add(this);
-        }
-
-        /// <summary>
-        /// Sets defaults in bulk.
-        /// </summary>
-        /// <param name="defaults">Array of objects to replace to defaults with.</param>
-        protected void SetDefaults(object[][] defaults)
-        {
-            foreach (object[] def in defaults)
-            {
-                this[(string)def[0]] = def[1];
-            }
-        }
-
-        /// <summary>
-        /// Creates a new SocketElementStream.
-        /// </summary>
-        public XmppStream()
-        {
-            m_ns = new XmlNamespaceManager(m_doc.NameTable);
-            m_tracker = new IQTracker(this);
-
-            SetDefaults(DEFAULTS);
-        }
-
-        /// <summary>
-        /// Sets or retrieves a connection property.
-        /// You have to know the type of the property based on the name.
-        /// For example, PORT is an integer.
-        /// </summary>
-        /// <param name="prop">The property to get or set.</param>
-        /// <returns></returns>
-        public object this[string prop]
-        {
-            get
-            {
-                if (!m_properties.Contains(prop))
-                    return null;
-                return m_properties[prop];
-            }
-            set
-            {
-                m_properties[prop] = value;
-                if (PropertyChanged != null)
-                {
-                    PropertyChanged(this, new PropertyChangedEventArgs(prop));
-                }
-            }
-        }
-
-        /// <summary>
-        /// Informs the client that a property changed on the instance.
-        /// </summary>
-        public event PropertyChangedEventHandler PropertyChanged;
-
-        /*
-        /// <summary>
-        /// Create a SocketElementStream out of an accepted socket.
-        /// </summary>
-        /// <param name="aso"></param>
-        public XmppStream(BaseSocket aso)
-        {
-            m_accept = m_sock = null;
-            if (aso is AsyncSocket)
-            {
-                m_watcher = ((AsyncSocket)aso).SocketWatcher;
-            }
-            m_ns = new XmlNamespaceManager(m_doc.NameTable);
-            m_timer = new Timer(new TimerCallback(DoKeepAlive), null, Timeout.Infinite, Timeout.Infinite);
-            InitializeStream();
-            m_state = jabber.connection.AcceptingState.Instance;
-        }
-
-        /// <summary>
-        /// Create a SocketElementStream with an existing SocketWatcher, so that you can do
-        /// lots of concurrent connections.
-        /// </summary>
-        /// <param name="watcher"></param>
-        public XmppStream(SocketWatcher watcher)
-        {
-            m_watcher = watcher;
-            m_ns = new XmlNamespaceManager(m_doc.NameTable);
-            m_timer = new Timer(new TimerCallback(DoKeepAlive), null, Timeout.Infinite, Timeout.Infinite);
-        }
-        */
-
-        /// <summary>
-        /// Informs the client when text has been written to the XMPP server.
-        /// Use for debugging only.
-        /// Will NOT be complete nodes at a time.
-        /// </summary>
-        [Category("Debug")]
-        public event bedrock.TextHandler OnWriteText;
-
-        /// <summary>
-        /// Informs the client that text was read from the server.
-        /// Use for debugging only. Will NOT be complete nodes at a time.
-        /// </summary>
-        [Category("Debug")]
-        public event bedrock.TextHandler OnReadText;
-
-        /// <summary>
-        /// Informs the client that a new stream has been inialized.
-        /// You can add your packet factories to the new stream.
-        /// NOTE: You may NOT make calls to the GUI in this callback, unless you
-        /// call Invoke.  Make sure you add your packet factories before
-        /// calling Invoke, however.
-        /// </summary>
-        [Category("Stream")]
-        public event StreamHandler OnStreamInit;
-
-        /// <summary>
-        /// Informs the client that an error occurred when processing.
-        /// The connection has been closed.
-        /// </summary>
-        [Category("Stream")]
-        public event bedrock.ExceptionHandler OnError;
-
-        /// <summary>
-        /// Notifies the client about every jabber packet.
-        /// This is a union of the OnPresence, OnMessage, and OnIQ methods.
-        /// Use this *or* the other 3 methods, but not both, as a matter of style.
-        /// </summary>
-        [Category("Stream")]
-        public event ProtocolHandler OnProtocol;
-
-        /// <summary>
-        /// Notifies the client that the stream header, as a packet,
-        /// has been received.  Can be called multiple  times for
-        /// a single session, with XMPP.
-        /// </summary>
-        [Category("Stream")]
-        public event ProtocolHandler OnStreamHeader;
-
-        /// <summary>
-        /// Notifies the client that the SASL handshake has started.
-        /// </summary>
-        protected event SASLProcessorHandler OnSASLStart;
-
-        /// <summary>
-        /// Gets notified of the end of a SASL handshake.
-        /// </summary>
-        protected event FeaturesHandler OnSASLEnd;
-
-        /// <summary>
-        /// Gets notified when SASL login fails.
-        /// </summary>
-        protected event ProtocolHandler OnSASLError;
-
-        /// <summary>
-        /// Informs the client that it received a stream:error packet.
-        /// </summary>
-        [Category("Stream")]
-        [Description("We received stream:error packet.")]
-        public event ProtocolHandler OnStreamError;
-
-        /// <summary>
-        /// Informs the client that the connection is complete and the user is authenticated.
-        /// </summary>
-        [Category("Stream")]
-        public event bedrock.ObjectHandler OnAuthenticate;
-
-        /// <summary>
-        /// Informs the client that the connection is connected,
-        /// but no stream:stream has been sent yet.
-        /// </summary>
-        [Category("Stream")]
-        public event StanzaStreamHandler OnConnect;
-
-        /// <summary>
-        /// Informs the client that the connection is disconnected.
-        /// </summary>
-        [Category("Stream")]
-        public event bedrock.ObjectHandler OnDisconnect;
-
-        /// <summary>
-        /// An invalid cert was received from the other side.  Set this event and return true to
-        /// use the cert anyway.  If the event is not set, an ugly user interface will be displayed.
-        /// </summary>
-        [Category("Stream")]
-        public event System.Net.Security.RemoteCertificateValidationCallback OnInvalidCertificate;
-
-        /// <summary>
-        /// Gets the tracker for sending IQ packets.
-        /// </summary>
-        [Browsable(false)]
-        public IIQTracker Tracker
-        {
-            get { return m_tracker; }
-        }
-
-        /// <summary>
-        /// Gets or sets the name of the XMPP server to connect to.
-        /// </summary>
-        [Description("Gets or sets the name of the XMPP server to connect to.")]
-        [DefaultValue("jabber.com")]
-        [Category("Jabber")]
-        public virtual string Server
-        {
-            get { return this[Options.TO] as string; }
-            set { this[Options.TO] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the network host address to use on the "to" attribute
-        /// of the stream:stream. You can put the network hostname or IP address
-        /// of the XMPP server to connect to. If none is specified, the Server will
-        /// be used. Eventually, when SRV is supported, this will be deprecated.
-        /// </summary>
-        [Description("")]
-        [DefaultValue(null)]
-        [Category("Jabber")]
-        public string NetworkHost
-        {
-            get { return this[Options.NETWORK_HOST] as string; }
-            set { this[Options.NETWORK_HOST] = value; }
-        }
-
-        /// <summary>
-        /// Specifies the TCP port to connect to.
-        /// </summary>
-        [Description("Specifies the TCP port to connect to.")]
-        [DefaultValue(5222)]
-        [Category("Jabber")]
-        public int Port
-        {
-            get { return (int)this[Options.PORT]; }
-            set { this[Options.PORT] = value; }
-        }
-
-        /// <summary>
-        /// Specifies whether plaintext authentication is used for connecting
-        /// to the XMPP server.
-        /// </summary>
-        [Description("Allow plaintext authentication?")]
-        [DefaultValue(false)]
-        [Category("Jabber")]
-        public bool PlaintextAuth
-        {
-            get { return (bool)this[Options.PLAINTEXT]; }
-            set { this[Options.PLAINTEXT] = value; }
-        }
-
-        /// <summary>
-        /// Determines whether or not the current connection is secured with SSL/TLS.
-        /// </summary>
-        [Browsable(false)]
-        public bool SSLon
-        {
-            get { return m_sslOn; }
-        }
-
-        /// <summary>
-        /// Gets the JID from the connection.
-        /// </summary>
-        [Browsable(false)]
-        public JID JID
-        {
-            // Make sure to set this option in subclasses.
-            get
-            {
-                object j = this[Options.JID];
-                if (j == null)
-                    return null;
-                if (j is JID)
-                    return (JID)j;
-                if (j is string)
-                    return new JID((string)j);
-                Debug.Assert(false, "Unknown JID type", j.GetType().ToString());
-                return null;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether or not the current connection uses
-        /// XMPP stream compression (XEP-138).
-        /// </summary>
-        [Browsable(false)]
-        public bool CompressionOn
-        {
-            get { return m_compressionOn; }
-        }
-
-        /// <summary>
-        /// Determines whether SSL3/TLS1 authentication is used when a user
-        /// connects to the XMPP server.
-        /// </summary>
-        [Description("Do SSL3/TLS1 on startup.")]
-        [DefaultValue(false)]
-        [Category("Jabber")]
-        public bool SSL
-        {
-            get { return (bool)this[Options.SSL]; }
-            set { this[Options.SSL] = value; }
-        }
-
-        /// <summary>
-        /// Allows Start-TLS on connection if the server supports it and if set to true.
-        /// </summary>
-        [Browsable(false)]
-        public bool AutoStartTLS
-        {
-            get { return (bool)this[Options.AUTO_TLS]; }
-            set { this[Options.AUTO_TLS] = value; }
-        }
-
-        /// <summary>
-        /// Allows start compression on connection if the server supports it and
-        /// is set to true.
-        /// </summary>
-        [Browsable(false)]
-        public bool AutoStartCompression
-        {
-            get { return (bool)this[Options.AUTO_COMPRESS]; }
-            set { this[Options.AUTO_COMPRESS] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the certificate to be used for the local
-        /// side of sockets when SSL is enabled.
-        /// </summary>
-        [Browsable(false)]
-        public X509Certificate LocalCertificate
-        {
-            get { return this[Options.LOCAL_CERTIFICATE] as X509Certificate; }
-            set { this[Options.LOCAL_CERTIFICATE] = value; }
-        }
-
-        /// <summary>
-        /// Sets the certificate to be used for accept sockets.  To
-        /// generate a test .pfx file using OpenSSL, add this to
-        /// openssl.conf:
-        ///   <blockquote>
-        ///   [ serverex ]
-        ///   extendedKeyUsage=1.3.6.1.5.5.7.3.1
-        ///   </blockquote>
-        /// and run the following commands:
-        ///   <blockquote>
-        ///   openssl req -new -x509 -newkey rsa:1024 -keyout
-        ///     privkey.pem -out key.pem -extensions serverex
-        ///   openssl pkcs12 -export -in key.pem -inkey privkey.pem
-        ///     -name localhost -out localhost.pfx
-        ///   </blockquote>
-        /// If you leave the certificate null, and you are doing
-        /// Accept, the SSL class will try to find a default server
-        /// certificate on your box.
-        /// </summary>
-        /// <param name="filename">A .pfx or .cer file.</param>
-        /// <param name="password">The password, if this is a .pfx
-        /// file, null if .cer file.</param>
-        public void SetCertificateFile(string filename,
-                                       string password)
-        {
-            this[Options.LOCAL_CERTIFICATE] = new X509Certificate2(filename, password);
-        }
-
-        /// <summary>
-        /// Calls Invoke() for all callbacks on this control.
-        /// </summary>
-        [Description("Invoke all callbacks on this control")]
-        [DefaultValue(null)]
-        [Category("Jabber")]
-        public ISynchronizeInvoke InvokeControl
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get
-                // an invoke control from the environment.  VB
-                // programmers can't seem to follow directions.
-                if ((this.m_invoker == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    if (host != null)
-                    {
-                        object root = host.RootComponent;
-                        if ((root != null) && (root is ISynchronizeInvoke))
-                        {
-                            m_invoker = (ISynchronizeInvoke)root;
-                            // TODO: fire some sort of propertyChanged event,
-                            // so that old code gets cleaned up correctly.
-                        }
-                    }
-                }
-                return m_invoker;
-            }
-            set { m_invoker = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the keep-alive interval in seconds.
-        /// </summary>
-        [Description("Gets or sets the keep-alive interval in seconds")]
-        [Category("Jabber")]
-        [DefaultValue(20f)]
-        public float KeepAlive
-        {
-            get { return ((int)this[Options.KEEP_ALIVE]) / 1000f; }
-            set { this[Options.KEEP_ALIVE] = (int)(value * 1000f); }
-        }
-
-        /// <summary>
-        /// Gets or sets the number of seconds before automatically
-        /// reconnecting if the connection drops.
-        /// -1 to disable, 0 for immediate.
-        /// </summary>
-        [Description("Automatically reconnect a connection.")]
-        [DefaultValue(30)]
-        [Category("Automation")]
-        public float AutoReconnect
-        {
-            get { return ((int)this[Options.RECONNECT_TIMEOUT]) / 1000f; }
-            set { this[Options.RECONNECT_TIMEOUT] = (int)(value * 1000f); }
-        }
-
-        /// <summary>
-        /// Gets or sets the proxy type, such as none, SOCKS5 and so on.
-        /// </summary>
-        [Description("Gets or sets the proxy type, such as none, SOCKS5 and so on.")]
-        [DefaultValue(ProxyType.None)]
-        [Category("Proxy")]
-        public ProxyType Proxy
-        {
-            get { return (ProxyType)this[Options.PROXY_TYPE]; }
-            set { this[Options.PROXY_TYPE] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the connection type, such as Socket, HTTP polling and so on.
-        /// </summary>
-        [Description("Gets or sets the connection type, such as Socket, HTTP polling and so on.")]
-        [DefaultValue(ConnectionType.Socket)]
-        [Category("Proxy")]
-        public ConnectionType Connection
-        {
-            get { return (ConnectionType)this[Options.CONNECTION_TYPE]; }
-            set { this[Options.CONNECTION_TYPE] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the hostname running the proxy.
-        /// </summary>
-        [Description("Gets or sets the hostname running the proxy.")]
-        [DefaultValue(null)]
-        [Category("Proxy")]
-        public string ProxyHost
-        {
-            get { return this[Options.PROXY_HOST] as string; }
-            set { this[Options.PROXY_HOST] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the port number of the proxy host.
-        /// </summary>
-        [Description("Gets or sets the port number of the proxy host.")]
-        [DefaultValue(1080)]
-        [Category("Proxy")]
-        public int ProxyPort
-        {
-            get { return (int)this[Options.PROXY_PORT]; }
-            set { this[Options.PROXY_PORT] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the authentication username for the SOCKS5 proxy.
-        /// </summary>
-        [Description("Gets or sets the authentication username for the SOCKS5 proxy.")]
-        [DefaultValue(null)]
-        [Category("Proxy")]
-        public string ProxyUsername
-        {
-            get { return this[Options.PROXY_USER] as string; }
-            set { this[Options.PROXY_USER] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the authentication password for the SOCKS5 proxy.
-        /// </summary>
-        [Description("the auth password for the socks5 proxy")]
-        [DefaultValue(null)]
-        [Category("Proxy")]
-        public string ProxyPassword
-        {
-            get { return this[Options.PROXY_PW] as string; }
-            set { this[Options.PROXY_PW] = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the ID attribute from the
-        /// stream:stream element sent by the XMPP server.
-        /// </summary>
-        [Browsable(false)]
-        [DefaultValue(null)]
-        public string StreamID
-        {
-            get { return m_streamID; }
-            set { m_streamID = value; }
-        }
-
-        /// <summary>
-        /// Retrieves the outbound document.
-        /// </summary>
-        [Browsable(false)]
-        public XmlDocument Document
-        {
-            get { return m_doc; }
-        }
-
-        /// <summary>
-        /// Gets or sets the current state of the connection.
-        /// Lock on StateLock before accessing.
-        /// </summary>
-        [Browsable(false)]
-        protected virtual BaseState State
-        {
-            get { return m_state; }
-            set { m_state = value;
-            // Debug.WriteLine("New state: " + m_state.ToString());
-            }
-        }
-
-        /// <summary>
-        /// Gets the lock for the state information.
-        /// </summary>
-        [Browsable(false)]
-        protected object StateLock
-        {
-            get { return m_stateLock; }
-        }
-
-        /// <summary>
-        /// Gets or sets the state to authenticated.  Locks on StateLock
-        /// </summary>
-        [Browsable(false)]
-        [DefaultValue(false)]
-        public virtual bool IsAuthenticated
-        {
-            get
-            {
-                lock (StateLock)
-                {
-                    return (State == RunningState.Instance);
-                }
-            }
-            set
-            {
-                bool close = false;
-                lock (StateLock)
-                {
-                    if (value)
-                    {
-                        State = RunningState.Instance;
-                    }
-                    else
-                        close = true;
-                }
-                if (close)
-                    Close();
-                if (value && (OnAuthenticate != null))
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnAuthenticate, new object[] { this });
-                    else
-                        OnAuthenticate(this);
-                }
-                this[Options.CURRENT_KEEP_ALIVE] = this[Options.KEEP_ALIVE];
-            }
-        }
-
-        /// <summary>
-        /// Returns the namespace for this connection.
-        /// </summary>
-        [Browsable(false)]
-        protected abstract string NS
-        {
-            get;
-        }
-
-        /// <summary>
-        /// Determines whether or not SASL is required for connecting to the XMPP server.
-        /// </summary>
-        [Description("Determines if SASL is required for connecting to the XMPP server.")]
-        [DefaultValue(false)]
-        public bool RequiresSASL
-        {
-            get { return (bool)this[Options.REQUIRE_SASL]; }
-            set { this[Options.REQUIRE_SASL] = value; }
-        }
-
-        /// <summary>
-        /// Gets the version number of the XMPP server.
-        /// </summary>
-        [Description("Gets the version number of the XMPP server.")]
-        [DefaultValue(null)]
-        public string ServerVersion
-        {
-            get { return m_serverVersion; }
-        }
-
-        /// <summary>
-        /// Writes just the start tag of the given XML element.
-        /// Typically only used for <stream:stream>.
-        /// </summary>
-        /// <param name="elem"><stream:stream%gt; XML element.</param>
-        public void WriteStartTag(jabber.protocol.stream.Stream elem)
-        {
-            m_stanzas.WriteStartTag(elem);
-        }
-
-        /// <summary>
-        /// Sends the given packet to the server.
-        /// </summary>
-        /// <param name="elem">The XML element to send.</param>
-        public virtual void Write(XmlElement elem)
-        {
-            m_stanzas.Write(elem);
-        }
-
-        /// <summary>
-        /// Sends a raw string.
-        /// </summary>
-        /// <param name="str">The string to send.</param>
-        public void Write(string str)
-        {
-            m_stanzas.Write(str);
-        }
-
-        /// <summary>
-        /// Starts connecting to the XMPP server.  This is done asyncronously.
-        /// </summary>
-        public virtual void Connect()
-        {
-            this[Options.CURRENT_KEEP_ALIVE] = -1;
-            m_stanzas = StanzaStream.Create(this.Connection, this);
-            lock (StateLock)
-            {
-                State = ConnectingState.Instance;
-                m_reconnect = ((int)this[Options.RECONNECT_TIMEOUT] >= 0);
-            }
-            m_stanzas.Connect();
-        }
-
-        /// <summary>
-        /// Listens for connections from the XMPP server and is used for components only.
-        /// </summary>
-        protected virtual void Accept()
-        {
-            if ((m_stanzas == null) || (!m_stanzas.Acceptable))
-                m_stanzas = StanzaStream.Create(this.Connection, this);
-            lock (StateLock)
-            {
-                this.State = AcceptingState.Instance;
-                m_reconnect = ((int)this[Options.RECONNECT_TIMEOUT] >= 0);
-            }
-            m_stanzas.Accept();
-        }
-
-        /// <summary>
-        /// If autoReconnect is on, start the timer for reconnect now.
-        /// </summary>
-        private void TryReconnect()
-        {
-            // close was not requested, or autoreconnect turned on.
-            if (m_reconnect)
-            {
-                if (m_reconnectTimer != null)
-                    m_reconnectTimer.Dispose();
-
-                m_reconnectTimer = new System.Threading.Timer(
-                        new System.Threading.TimerCallback(Reconnect),
-                        null,
-                        (int)this[Options.RECONNECT_TIMEOUT],
-                        System.Threading.Timeout.Infinite);
-            }
-        }
-
-        /// <summary>
-        /// Closes down the connection with the XMPP server with a clean shutdown.
-        /// </summary>
-        public virtual void Close()
-        {
-            Close(true);
-        }
-
-        /// <summary>
-        /// Closes down the connection.
-        /// </summary>
-        /// <param name="clean">True for graceful shutdown</param>
-        public virtual void Close(bool clean)
-        {
-            bool doClose = false;
-            bool doStream = false;
-
-
-            lock (StateLock)
-            {
-                // if close is called, never try to reconnect.
-                m_reconnect = false;
-
-                if ((State == RunningState.Instance) && (clean))
-                {
-                    doStream = true;
-                }
-                if (m_state != ClosedState.Instance)
-                {
-                    State = ClosingState.Instance;
-                    doClose = true;
-                }
-            }
-
-            if ((m_stanzas != null) && m_stanzas.Connected && doClose)
-            {
-                m_stanzas.Close(doStream);
-            }
-            else
-            {
-                Debug.WriteLine("Cannot close a socket before it is open");
-                //FireOnError(new InvalidOperationException("Cannot close a socket before it is open"));
-            }
-        }
-
-        /// <summary>
-        /// Invokes the given method on the Invoker, and does some exception handling.
-        /// </summary>
-        /// <param name="method">Method to call on the invoker thread.</param>
-        /// <param name="args">Arguments to pass to the method.</param>
-        protected void CheckedInvoke(MulticastDelegate method, object[] args)
-        {
-            try
-            {
-                Debug.Assert(m_invoker != null, "Check for this.InvokeControl == null before calling CheckedInvoke");
-                Debug.Assert(m_invoker.InvokeRequired, "Check for InvokeRequired before calling CheckedInvoke");
-
-                m_invoker.BeginInvoke(method, args);
-            }
-            catch (System.Reflection.TargetInvocationException e)
-            {
-                Debug.WriteLine("Exception passed along by XmppStream: " + e.ToString());
-                throw e.InnerException;
-            }
-            catch (Exception e)
-            {
-                Debug.WriteLine("Exception in XmppStream: " + e.ToString());
-                throw;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether or not a callback needs to be on the GUI thread.
-        /// </summary>
-        /// <returns>
-        /// True if the invoke control is set and the current thread
-        /// is not the GUI thread.
-        /// </returns>
-        protected bool InvokeRequired
-        {
-            get
-            {
-                if (m_invoker == null)
-                    return false;
-                return m_invoker.InvokeRequired;
-            }
-        }
-
-        /// <summary>
-        /// Informs the client that the first tag of the XML document has been received.
-        /// </summary>
-        /// <param name="sender">Caller of this function.</param>
-        /// <param name="elem">The XML element that was received.</param>
-        protected virtual void OnDocumentStart(object sender, System.Xml.XmlElement elem)
-        {
-            bool hack = false;
-
-            if (elem is jabber.protocol.stream.Stream)
-            {
-                jabber.protocol.stream.Stream str = elem as jabber.protocol.stream.Stream;
-
-                m_streamID = str.ID;
-                m_serverVersion = str.Version;
-
-                // See XMPP-core section 4.4.1.  We'll accept 1.x
-                if (m_serverVersion.StartsWith("1."))
-                {
-                    lock (m_stateLock)
-                    {
-                        if (State == SASLState.Instance)
-                            // already authed.  last stream restart.
-                            State = SASLAuthedState.Instance;
-                        else
-                            State = jabber.connection.ServerFeaturesState.Instance;
-                    }
-                }
-                else
-                {
-                    lock (m_stateLock)
-                    {
-                        State = NonSASLAuthState.Instance;
-                    }
-                    hack = true;
-                }
-                if (OnStreamHeader != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnStreamHeader, new object[] { this, elem });
-                    else
-                        OnStreamHeader(this, elem);
-                }
-                CheckAll(elem);
-
-                if (hack && (OnSASLStart != null))
-                {
-                    OnSASLStart(this, null); // Hack.  Old-style auth for jabberclient.
-                }
-            }
-        }
-
-        /// <summary>
-        /// Handle the last set of stream:features we have received, 
-        /// based on the current state.
-        /// </summary>
-        protected virtual void ProcessFeatures()
-        {
-            // don't do starttls if we're already on an SSL socket.
-            // bad server setup, but no skin off our teeth, we're already
-            // SSL'd.  Also, start-tls won't work when polling.
-            if ((bool)this[Options.AUTO_TLS] &&
-                (m_features.StartTLS != null) &&
-                (!m_sslOn) &&
-                m_stanzas.SupportsTLS)
-            {
-                // start-tls
-                lock (m_stateLock)
-                {
-                    State = StartTLSState.Instance;
-                }
-                this.Write(new StartTLS(m_doc));
-                return;
-            }
-
-            Compression comp = m_features.Compression;
-            if ((bool)this[Options.AUTO_COMPRESS] &&
-                (comp != null) &&
-                comp.HasMethod("zlib") &&
-                (!m_compressionOn) &&
-                m_stanzas.SupportsCompression)
-            {
-                // start compression
-                lock (m_stateLock)
-                {
-                    State = CompressionState.Instance;
-                }
-                Compress c = new Compress(m_doc);
-                c.Method = "zlib";
-                this.Write(c);
-                return;
-            }
-
-            // not authenticated yet.  Note: we'll get a stream:features
-            // after the last sasl restart, so we shouldn't try to iq:auth
-            // at that point.
-            if (!IsAuthenticated)
-            {
-                Mechanisms ms = m_features.Mechanisms;
-                m_saslProc = null;
-
-                MechanismType types = MechanismType.NONE;
-
-                if (ms != null)
-                {
-                    // if SASL_MECHANISMS is set in the options, it is the limited set
-                    // of mechanisms we're willing to try.  Mask them off of the offered set.
-                    object smt = this[Options.SASL_MECHANISMS];
-                    if (smt != null)
-                        types = (MechanismType)smt & ms.Types;
-                    else
-                        types = ms.Types;
-                }
-
-                // If we're doing SASL, and there are mechanisms implemented by both
-                // client and server.
-                if ((types != MechanismType.NONE) && ((bool)this[Options.SASL]))
-                {
-                    lock (m_stateLock)
-                    {
-                        State = SASLState.Instance;
-                    }
-                    m_saslProc = SASLProcessor.createProcessor(types, m_sslOn || (bool)this[Options.PLAINTEXT], ms);
-                    if (m_saslProc == null)
-                    {
-                        FireOnError(new NotImplementedException("No implemented mechanisms in: " + types.ToString()));
-                        return;
-                    }
-                    if (OnSASLStart != null)
-                        OnSASLStart(this, m_saslProc);
-                    lock (m_stateLock)
-                    {
-                        // probably manual authentication
-                        if (State != SASLState.Instance)
-                            return;
-                    }
-
-                    try
-                    {
-                        Step s = m_saslProc.step(null, this.Document);
-                        if (s != null)
-                            this.Write(s);
-                    }
-                    catch (Exception e)
-                    {
-                        FireOnError(new SASLException(e.Message));
-                        return;
-                    }
-                }
-
-                if (m_saslProc == null)
-                { // no SASL mechanisms.  Try iq:auth.
-                    if ((bool)this[Options.REQUIRE_SASL])
-                    {
-                        FireOnError(new SASLException("No SASL mechanisms available"));
-                        return;
-                    }
-                    lock (m_stateLock)
-                    {
-                        State = NonSASLAuthState.Instance;
-                    }
-                    if (OnSASLStart != null)
-                        OnSASLStart(this, null); // HACK: old-style auth for jabberclient.
-                }
-            }
-        }
-
-        /// <summary>
-        /// Informs the client that an XML element was received and
-        /// invokes the OnProtocol event.
-        /// </summary>
-        /// <param name="sender">The object that called this method.</param>
-        /// <param name="tag">XML element that contains the new tag.</param>
-        protected virtual void OnElement(object sender, System.Xml.XmlElement tag)
-        {
-            //Debug.WriteLine(tag.OuterXml);
-
-            if (tag is jabber.protocol.stream.Error)
-            {
-                // Stream error.  Race condition!  Two cases:
-                // 1) OnClose has already fired, in which case we are in ClosedState, and the reconnect timer is pending.
-                // 2) OnClose hasn't fired, in which case we trick it into not starting the reconnect timer.
-                lock (m_stateLock)
-                {
-                    if (m_state != ClosedState.Instance)
-                    {
-                        State = ClosingState.Instance;
-                    }
-                    else if (m_reconnectTimer != null)
-                    {
-                        Debug.WriteLine("Disposing of timer");
-                        m_reconnectTimer.Dispose();
-                    }
-                }
-
-                if (OnStreamError != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnStreamError, new object[] { this, tag });
-                    else
-                        OnStreamError(this, tag);
-                }
-                return;
-            }
-
-            if (State == ServerFeaturesState.Instance)
-            {
-                Features f = tag as Features;
-                if (f == null)
-                {
-                    FireOnError(new InvalidOperationException("Expecting stream:features from a version='1.0' server"));
-                    return;
-                }
-                m_features = f;
-                ProcessFeatures();
-                return;
-            }
-            else if (State == SASLState.Instance)
-            {
-                if (tag is Success)
-                {
-                    // restart the stream again
-                    SendNewStreamHeader();
-                }
-                else if (tag is SASLFailure)
-                {
-                    m_saslProc = null;
-
-                    lock (m_stateLock)
-                    {
-                        State = SASLFailedState.Instance;
-                    }
-                    SASLFailure sf = tag as SASLFailure;
-                    // TODO: I18N
-                    if (OnSASLError != null)
-                    {
-                        m_reconnect = false;
-                        OnSASLError(this, sf);
-                    }
-                    else
-                        FireOnError(new SASLException("SASL failure: " + sf.InnerXml));
-                    return;
-                }
-                else if (tag is Step)
-                {
-                    try
-                    {
-                        Step s = m_saslProc.step(tag as Step, this.Document);
-                        if (s != null)
-                            Write(s);
-                    }
-                    catch (Exception e)
-                    {
-                        FireOnError(new SASLException(e.Message));
-                        return;
-                    }
-                }
-                else
-                {
-                    m_saslProc = null;
-                    FireOnError(new SASLException("Invalid SASL protocol"));
-                    return;
-                }
-            }
-            else if (State == StartTLSState.Instance)
-            {
-                switch (tag.Name)
-                {
-                case "proceed":
-                    if (!StartTLS())
-                        return;
-                    SendNewStreamHeader();
-                    break;
-                case "failure":
-                    FireOnError(new AuthenticationFailedException());
-                    return;
-                }
-            }
-            else if (State == CompressionState.Instance)
-            {
-                switch (tag.Name)
-                {
-                case "compressed":
-                    if (!StartCompression())
-                        return;
-                    SendNewStreamHeader();
-                    break;
-                case "failure":
-                    CompressionFailure fail = tag as CompressionFailure;
-#if ZLIB_NET
-                    FireOnError(new bedrock.io.CompressionFailedException(fail.Error));
-#else
-                    FireOnError(new IOException(fail.Error));
-#endif
-                    return;
-                }
-
-            }
-            else if (State == SASLAuthedState.Instance)
-            {
-                Features f = tag as Features;
-                if (f == null)
-                {
-                    FireOnError(new InvalidOperationException("Expecting stream:features from a version='1.0' server"));
-                    return;
-                }
-                if (OnSASLEnd != null)
-                    OnSASLEnd(this, f);
-                m_saslProc = null;
-            }
-            else
-            {
-                if (OnProtocol != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnProtocol, new object[] { this, tag });
-                    else
-                        OnProtocol(this, tag);
-                }
-            }
-            CheckAll(tag);
-        }
-
-        /// <summary>
-        /// Begins the TLS handshake, either client-side or server-side.
-        /// </summary>
-        /// <returns>True if StartTLS worked.</returns>
-        protected bool StartTLS()
-        {
-            try
-            {
-                m_stanzas.StartTLS();
-            }
-            catch (Exception e)
-            {
-                m_reconnect = false;
-                if (e.InnerException != null)
-                    FireOnError(e.InnerException);
-                else
-                    FireOnError(e);
-                return false;
-            }
-            m_sslOn = true;
-            return true;
-        }
-
-        /// <summary>
-        /// Begins compressing the XMPP stream.
-        /// </summary>
-        /// <returns>If True, compression was successful, otherwise False.</returns>
-        protected bool StartCompression()
-        {
-            try
-            {
-                m_stanzas.StartCompression();
-            }
-            catch (Exception e)
-            {
-                m_reconnect = false;
-                FireOnError(e);
-                return false;
-            }
-            m_compressionOn = true;
-            return true;
-        }
-
-        /// <summary>
-        /// Gets ready for a new stream:stream by starting a new XML document.
-        /// Needed after Start-TLS or compression, for example.
-        /// </summary>
-        protected void InitializeStream()
-        {
-            try
-            {
-                m_stanzas.InitializeStream();
-            }
-            catch (Exception e)
-            {
-                FireOnError(e);
-            }
-        }
-
-        /// <summary>
-        /// Sends a new XMPP stream header.
-        /// </summary>
-        protected void SendNewStreamHeader()
-        {
-            jabber.protocol.stream.Stream str = new jabber.protocol.stream.Stream(m_doc, NS);
-            str.To = new JID((string)this[Options.TO]);
-            str.Version = "1.0";
-            m_stanzas.WriteStartTag(str);
-            InitializeStream();
-        }
-
-        /// <summary>
-        /// Informs the client of XMPP stream errors through the OnError event.
-        /// </summary>
-        /// <param name="e">Error that occurred.</param>
-        protected void FireOnError(Exception e)
-        {
-            m_reconnect = false;
-
-            // ignore spurious IO errors on shutdown.
-            if (((State == ClosingState.Instance) || (State == ClosedState.Instance)) &&
-                ((e is System.IO.IOException) || (e.InnerException is System.IO.IOException)))
-                return;
-
-            if (OnError != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnError, new object[] { this, e });
-                else
-                    OnError(this, e);
-            }
-
-            if ((State != ClosingState.Instance) && (State == ClosedState.Instance))
-                Close(false);
-        }
-
-        private void Reconnect(object state)
-        {
-            // prevent double-connects
-            if (this.State == ClosedState.Instance)
-                Connect();
-        }
-
-        /// <summary>
-        /// Registers a callback, so that if a packet arrives that matches the given xpath expression,
-        /// the callback fires.  Use <see cref="AddNamespace"/> to add namespace prefixes.
-        /// </summary>
-        /// <example>jc.AddCallback("self::iq[@type='result']/roster:query", new ProtocolHandler(GotRoster));</example>
-        /// <param name="xpath">The xpath expression to search for</param>
-        /// <param name="cb">The callback to call when the xpath matches</param>
-        /// <returns>A guid that can be used to unregister the callback</returns>
-        public Guid AddCallback(string xpath, ProtocolHandler cb)
-        {
-            CallbackData cbd = new CallbackData(xpath, cb);
-            m_callbacks.Add(cbd);
-            return cbd.Guid;
-        }
-
-        /// <summary>
-        /// Removes a callback added with <see cref="AddCallback"/>.
-        /// </summary>
-        /// <param name="guid">GUID representing the callback to remove.</param>
-        public void RemoveCallback(Guid guid)
-        {
-            int count = 0;
-            foreach (CallbackData cbd in m_callbacks)
-            {
-                if (cbd.Guid == guid)
-                {
-                    m_callbacks.RemoveAt(count);
-                    return;
-                }
-                count++;
-            }
-            throw new ArgumentException("Unknown Guid", "guid");
-        }
-
-        /// <summary>
-        /// Adds a namespace prefix, for use with callback xpath expressions added
-        /// with <see cref="AddCallback"/>.
-        /// </summary>
-        /// <param name="prefix">The prefix to use.</param>
-        /// <param name="uri">The URI associated with the prefix.</param>
-        public void AddNamespace(string prefix, string uri)
-        {
-            m_ns.AddNamespace(prefix, uri);
-        }
-
-        private void CheckAll(XmlElement elem)
-        {
-            foreach (CallbackData cbd in m_callbacks)
-            {
-                cbd.Check(this, elem);
-            }
-        }
-
-        private class CallbackData
-        {
-            private Guid m_guid = Guid.NewGuid();
-            private ProtocolHandler m_cb;
-            private string m_xpath;
-
-            public CallbackData(string xpath, ProtocolHandler cb)
-            {
-                Debug.Assert(cb != null);
-                m_cb = cb;
-                m_xpath = xpath;
-            }
-
-            public Guid Guid
-            {
-                get { return m_guid; }
-            }
-
-            public string XPath
-            {
-                get { return m_xpath; }
-            }
-
-            public void Check(XmppStream sender, XmlElement elem)
-            {
-                try
-                {
-                    XmlNode n = elem.SelectSingleNode(m_xpath, sender.m_ns);
-                    if (n != null)
-                    {
-                        if (sender.InvokeRequired)
-                            sender.CheckedInvoke(m_cb, new object[] { sender, elem });
-                        else
-                            m_cb(sender, elem);
-                    }
-                }
-                catch (Exception e)
-                {
-                    sender.FireOnError(e);
-                }
-            }
-        }
-
-        #region IStanzaEventListener Members
-
-        void IStanzaEventListener.Connected()
-        {
-            lock (m_stateLock)
-            {
-                this.State = ConnectedState.Instance;
-                if ((bool)this[Options.SSL])
-                    m_sslOn = true;
-            }
-
-            if (OnConnect != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnConnect, new Object[] { this, m_stanzas });
-                else
-                    OnConnect(this, m_stanzas);
-            }
-
-            SendNewStreamHeader();
-        }
-
-        void IStanzaEventListener.Accepted()
-        {
-            lock (StateLock)
-            {
-                Debug.Assert(this.State == AcceptingState.Instance, this.State.GetType().ToString());
-
-                this.State = ConnectedState.Instance;
-            }
-
-            if (OnConnect != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnConnect, new object[] { this, m_stanzas });
-                else
-                {
-                    // Um.  This cast might not be right, but I don't want to break backward compatibility
-                    // if I don't have to by changing the delegate interface.
-                    OnConnect(this, m_stanzas);
-                }
-            }
-        }
-
-        void IStanzaEventListener.BytesRead(byte[] buf, int offset, int count)
-        {
-            if (OnReadText != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnReadText, new object[] { this, ENC.GetString(buf, offset, count) });
-                else
-                    OnReadText(this, ENC.GetString(buf, offset, count));
-            }
-        }
-
-        void IStanzaEventListener.BytesWritten(byte[] buf, int offset, int count)
-        {
-            if (OnWriteText != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnWriteText, new object[] { this, ENC.GetString(buf, offset, count) });
-                else
-                    OnWriteText(this, ENC.GetString(buf, offset, count));
-            }
-        }
-
-        void IStanzaEventListener.StreamInit(ElementStream stream)
-        {
-            if (OnStreamInit != null)
-            {
-                // Race condition.  Make sure not to make GUI calls in OnStreamInit
-                /*
-                if (InvokeRequired)
-                    CheckedInvoke(OnStreamInit, new object[] { this, stream });
-                else
-              */
-                    OnStreamInit(this, stream);
-            }
-        }
-
-        void IStanzaEventListener.Errored(Exception ex)
-        {
-            m_reconnect = false;
-
-            lock (m_stateLock)
-            {
-                State = ClosedState.Instance;
-                if ((m_stanzas != null) && (!m_stanzas.Acceptable))
-                    m_stanzas = null;
-            }
-
-            if (OnError != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnError, new object[] { this, ex });
-                else
-                    OnError(this, ex);
-            }
-
-            // TODO: Figure out what the "good" errors are, and try to
-            // reconnect.  There are too many "bad" errors to just let this fly.
-            //TryReconnect();
-        }
-
-        void IStanzaEventListener.Closed()
-        {
-            lock (StateLock)
-            {
-                State = ClosedState.Instance;
-                if ((m_stanzas != null) && (!m_stanzas.Acceptable))
-                    m_stanzas = null;
-                m_sslOn = false;
-                m_compressionOn = false;
-            }
-
-            if (OnDisconnect != null)
-            {
-                if (InvokeRequired)
-                    CheckedInvoke(OnDisconnect, new object[] { this });
-                else
-                    OnDisconnect(this);
-            }
-
-            TryReconnect();
-        }
-
-        void IStanzaEventListener.DocumentStarted(XmlElement elem)
-        {
-            // The OnDocumentStart logic stays outside the listener, so that it can be
-            // more easily overriden by subclasses.
-            OnDocumentStart(m_stanzas, elem);
-        }
-
-        void IStanzaEventListener.DocumentEnded()
-        {
-            lock (StateLock)
-            {
-                State = ClosingState.Instance;
-                // TODO: Validate this, with current parser:
-
-                // No need to close stream any more.  AElfred does this for us, even though
-                // the docs say it doesn't.
-
-                //if (m_sock != null)
-                //m_sock.Close();
-            }
-        }
-
-        void IStanzaEventListener.StanzaReceived(XmlElement elem)
-        {
-            // The OnElement logic stays outside the listener, so that it can be
-            // more easily overriden by subclasses.
-                OnElement(m_stanzas, elem);
-        }
-
-        private bool ShowCertificatePrompt(object sender,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-#if !__MonoCS__
-            CertificatePrompt cp = new CertificatePrompt((X509Certificate2)certificate, chain, sslPolicyErrors);
-            return (cp.ShowDialog() == System.Windows.Forms.DialogResult.OK);
-#else
-            return false;
-#endif
-        }
-
-        bool IStanzaEventListener.OnInvalidCertificate(bedrock.net.BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            if (OnInvalidCertificate != null)
-            {
-                if ((m_invoker == null) || (!m_invoker.InvokeRequired))
-                    return OnInvalidCertificate(sock, certificate, chain, sslPolicyErrors);
-                try
-                {
-                    // Note: can't use CheckedInvoke here, since we need the return value.  We'll wait for the response.
-                    return (bool)m_invoker.Invoke(OnInvalidCertificate, new object[] { sock, certificate, chain, sslPolicyErrors });
-                }
-                catch (Exception e)
-                {
-                    Debug.WriteLine("Exception passed along by XmppStream: " + e.ToString());
-                    return false;
-                }
-            }
-            if ((m_invoker == null) || (!m_invoker.InvokeRequired))
-                return ShowCertificatePrompt(sock, certificate, chain, sslPolicyErrors);
-
-            return (bool)m_invoker.Invoke(new System.Net.Security.RemoteCertificateValidationCallback(ShowCertificatePrompt), new object[]{ sock, certificate, chain, sslPolicyErrors });
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/XmppStream.resx b/lib/jabber-net/jabber/connection/XmppStream.resx
deleted file mode 100644
index f598e3c..0000000
--- a/lib/jabber-net/jabber/connection/XmppStream.resx
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<root>
-        <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-                <xsd:element name="root" msdata:IsDataSet="true">
-                        <xsd:complexType>
-                                <xsd:choice maxOccurs="unbounded">
-                                        <xsd:element name="data">
-                                                <xsd:complexType>
-                                                        <xsd:sequence>
-                                                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                                                                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-                                                        </xsd:sequence>
-                                                        <xsd:attribute name="name" type="xsd:string" />
-                                                        <xsd:attribute name="type" type="xsd:string" />
-                                                        <xsd:attribute name="mimetype" type="xsd:string" />
-                                                </xsd:complexType>
-                                        </xsd:element>
-                                        <xsd:element name="resheader">
-                                                <xsd:complexType>
-                                                        <xsd:sequence>
-                                                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                                                        </xsd:sequence>
-                                                        <xsd:attribute name="name" type="xsd:string" use="required" />
-                                                </xsd:complexType>
-                                        </xsd:element>
-                                </xsd:choice>
-                        </xsd:complexType>
-                </xsd:element>
-        </xsd:schema>
-        <resheader name="ResMimeType">
-                <value>text/microsoft-resx</value>
-        </resheader>
-        <resheader name="Version">
-                <value>1.0.0.0</value>
-        </resheader>
-        <resheader name="Reader">
-                <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-        </resheader>
-        <resheader name="Writer">
-                <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-        </resheader>
-</root>
diff --git a/lib/jabber-net/jabber/connection/sasl/ExternalProcessor.cs b/lib/jabber-net/jabber/connection/sasl/ExternalProcessor.cs
deleted file mode 100644
index 2460467..0000000
--- a/lib/jabber-net/jabber/connection/sasl/ExternalProcessor.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.stream;
-
-namespace jabber.connection.sasl
-{
-    /// <summary>
-    /// SASL Mechanism EXTERNAL as specified in XEP-0178.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ExternalProcessor : SASLProcessor
-    {
-        /// <summary>
-        /// Perform the next step
-        /// </summary>
-        /// <param name="s">Null if it's the initial response</param>
-        /// <param name="doc">Document to create Steps in</param>
-        /// <returns></returns>
-        public override Step step(Step s, XmlDocument doc)
-        {
-            Debug.Assert(s == null);
-            Auth a = new Auth(doc);
-            a.Mechanism = MechanismType.EXTERNAL;
-            return a;
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/sasl/KerbProcessor.cs b/lib/jabber-net/jabber/connection/sasl/KerbProcessor.cs
deleted file mode 100644
index 63078d9..0000000
--- a/lib/jabber-net/jabber/connection/sasl/KerbProcessor.cs
+++ /dev/null
@@ -1,798 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Runtime.InteropServices;
-using System.Security.Principal;
-using System.Xml;
-using jabber.protocol.stream;
-using HANDLE = System.IntPtr;
-
-using bedrock.util;
-
-namespace jabber.connection.sasl
-{
-
-    ///<summary>
-    /// Uses Kerberos authentication ot log into XMPP server.
-    ///</summary>
-    [SVN(@"$Id$")]
-    public class KerbProcessor : SASLProcessor
-    {
-        /// <summary>
-        /// Should we use the existing Windows (kerberos) credentials?
-        /// </summary>
-        public const string USE_WINDOWS_CREDS = "USE_WINDOWS_CREDS";
-
-        private readonly SSPIHelper kerbClient;
-        ///<summary>
-        /// Creates a new KerbProcessor
-        ///</summary>
-        ///<param name="remotePrincipal">Remote principal that represents the XMPP server.</param>
-        public KerbProcessor(string remotePrincipal)
-        {
-            kerbClient = new SSPIHelper(remotePrincipal);
-        }
-
-        /// <summary>
-        /// Perform the next step
-        /// </summary>
-        /// <param name="s">Null if it's the initial response</param>
-        /// <param name="doc">Document to create Steps in</param>
-        /// <returns>XML to send to the XMPP server.</returns>
-        public override Step step(Step s, XmlDocument doc)
-        {
-            byte[] outBytes;
-            byte[] inBytes = null;
-
-            Step returnStep;
-
-            if (s == null)
-            {
-                // First step.
-                returnStep = new Auth(doc);
-                ((Auth)returnStep).Mechanism = MechanismType.GSSAPI;
-
-                SetCredentials();
-            }
-            else
-            {
-                returnStep = new Response(doc);
-                inBytes = s.Bytes;
-            }
-
-            kerbClient.ExecuteKerberos(inBytes, out outBytes);
-            returnStep.Bytes = outBytes;
-
-            return returnStep;
-        }
-
-        private void SetCredentials()
-        {
-            // Username should be in the form of "DOMAIN\USERNAME"
-            // If it isn't, we'll assume it is the username and get
-            // the domain from somewhere else.
-            string username = this[USERNAME];
-            int sepIndex = username.IndexOf('\\');
-            kerbClient.Username = username.Substring(sepIndex + 1);
-
-            if (sepIndex != -1)
-                kerbClient.Domain = username.Substring(0, sepIndex);
-            else
-            {
-                // Domain wasn't specified. Use the current user's domain.
-                string currentName = WindowsIdentity.GetCurrent().Name;
-                kerbClient.Domain = currentName.Substring(0, currentName.IndexOf('\\'));
-            }
-            kerbClient.Password = this[PASSWORD];
-            kerbClient.UseWindowsCreds = Boolean.Parse(this[USE_WINDOWS_CREDS]);
-        }
-    }
-
-    internal enum SecBufferType
-    {
-        SECBUFFER_VERSION = 0,
-        SECBUFFER_EMPTY = 0,
-        SECBUFFER_DATA = 1,
-        SECBUFFER_TOKEN = 2,
-        SECBUFFER_PADDING = 9,
-        SECBUFFER_STREAM = 10
-    }
-    /*
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SecHandle //=PCtxtHandle
-    {
-        uint dwLower;
-        uint dwUpper;
-    }
-    */
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SecBuffer : IDisposable
-    {
-        public int cbBuffer;
-        public int BufferType;
-        public IntPtr pvBuffer;
-
-
-        public SecBuffer(int bufferSize)
-        {
-            cbBuffer = bufferSize;
-            BufferType = (int)SecBufferType.SECBUFFER_TOKEN;
-            pvBuffer = Marshal.AllocHGlobal(bufferSize);
-        }
-
-        public SecBuffer(byte[] secBufferBytes)
-        {
-            cbBuffer = secBufferBytes.Length;
-            BufferType = (int)SecBufferType.SECBUFFER_TOKEN;
-            pvBuffer = Marshal.AllocHGlobal(cbBuffer);
-            Marshal.Copy(secBufferBytes, 0, pvBuffer, cbBuffer);
-        }
-
-        public SecBuffer(byte[] secBufferBytes, SecBufferType bufferType)
-        {
-            BufferType = (int)bufferType;
-
-            if (secBufferBytes != null && secBufferBytes.Length != 0)
-            {
-                cbBuffer = secBufferBytes.Length;
-                pvBuffer = Marshal.AllocHGlobal(cbBuffer);
-                Marshal.Copy(secBufferBytes, 0, pvBuffer, cbBuffer);
-            }
-            else
-            {
-                cbBuffer = 0;
-                pvBuffer = HANDLE.Zero;
-            }
-        }
-
-        public void Dispose()
-        {
-            if (pvBuffer != IntPtr.Zero)
-            {
-                Marshal.FreeHGlobal(pvBuffer);
-                pvBuffer = IntPtr.Zero;
-            }
-        }
-    }
-
-    internal struct MultipleSecBufferHelper
-    {
-        public byte[] Buffer;
-        public SecBufferType BufferType;
-
-        public MultipleSecBufferHelper(byte[] buffer, SecBufferType bufferType)
-        {
-            Buffer = buffer;
-            BufferType = bufferType;
-        }
-    };
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SecBufferDesc : IDisposable
-    {
-
-        public int ulVersion;
-        public int cBuffers;
-        public IntPtr pBuffers; //Point to SecBuffer
-
-        public SecBufferDesc(int bufferSize)
-        {
-            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
-            cBuffers = 1;
-            SecBuffer ThisSecBuffer = new SecBuffer(bufferSize);
-            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(ThisSecBuffer));
-            Marshal.StructureToPtr(ThisSecBuffer, pBuffers, false);
-        }
-
-        public SecBufferDesc(byte[] secBufferBytes)
-        {
-            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
-            cBuffers = 1;
-            SecBuffer ThisSecBuffer = new SecBuffer(secBufferBytes);
-            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(ThisSecBuffer));
-            Marshal.StructureToPtr(ThisSecBuffer, pBuffers, false);
-        }
-
-        internal SecBufferDesc(MultipleSecBufferHelper[] secBufferBytesArray)
-        {
-            if (secBufferBytesArray == null || secBufferBytesArray.Length == 0)
-            {
-                throw new ArgumentException("secBufferBytesArray cannot be null or 0 length");
-            }
-
-            ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
-            cBuffers = secBufferBytesArray.Length;
-
-            //Allocate memory for SecBuffer Array....
-            pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(SecBuffer)) * cBuffers);
-
-            for (int Index = 0; Index < secBufferBytesArray.Length; Index++)
-            {
-                //Super hack: Now allocate memory for the individual SecBuffers
-                //and just copy the bit values to the SecBuffer array!!!
-                SecBuffer ThisSecBuffer = new SecBuffer(secBufferBytesArray[Index].Buffer,
-                    secBufferBytesArray[Index].BufferType);
-
-                //We will write out bits in the following order:
-                //int cbBuffer;
-                //int BufferType;
-                //pvBuffer;
-                //Note: that we won't be releasing the memory allocated by ThisSecBuffer until we
-                //are disposed...
-                int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
-                Marshal.WriteInt32(pBuffers, CurrentOffset, ThisSecBuffer.cbBuffer);
-
-                int length = CurrentOffset + Marshal.SizeOf(ThisSecBuffer.cbBuffer);
-                Marshal.WriteInt32(pBuffers, length, ThisSecBuffer.BufferType);
-
-                length = CurrentOffset + Marshal.SizeOf(ThisSecBuffer.cbBuffer) +
-                         Marshal.SizeOf(ThisSecBuffer.BufferType);
-                Marshal.WriteIntPtr(pBuffers, length, ThisSecBuffer.pvBuffer);
-            }
-        }
-
-        public void Dispose()
-        {
-            if (pBuffers != IntPtr.Zero)
-            {
-                if (cBuffers == 1)
-                {
-                    SecBuffer ThisSecBuffer =
-                        (SecBuffer)Marshal.PtrToStructure(pBuffers, typeof(SecBuffer));
-                    ThisSecBuffer.Dispose();
-                }
-                else
-                {
-                    // Since we aren't sending any messages using the kerberos encrypt/decrypt.
-                    // The 1st buffer is going to be empty. We can skip it.
-                    for (int Index = 1; Index < cBuffers; Index++)
-                    {
-                        //The bits were written out the following order:
-                        //int cbBuffer;
-                        //int BufferType;
-                        //pvBuffer;
-                        //What we need to do here is to grab a hold of the pvBuffer allocate by the individual
-                        //SecBuffer and release it...
-                        int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
-
-                        int totalLength = CurrentOffset + Marshal.SizeOf(typeof(int)) +
-                                          Marshal.SizeOf(typeof(int));
-                        IntPtr SecBufferpvBuffer = Marshal.ReadIntPtr(pBuffers, totalLength);
-                        Marshal.FreeHGlobal(SecBufferpvBuffer);
-                    }
-                }
-
-                Marshal.FreeHGlobal(pBuffers);
-                pBuffers = IntPtr.Zero;
-            }
-        }
-
-        public byte[] GetSecBufferByteArray()
-        {
-            byte[] Buffer = null;
-
-            if (pBuffers == IntPtr.Zero)
-            {
-                throw new InvalidOperationException("Object has already been disposed!!!");
-            }
-
-            if (cBuffers == 1)
-            {
-                SecBuffer ThisSecBuffer = (SecBuffer)Marshal.PtrToStructure(pBuffers, typeof(SecBuffer));
-
-                if (ThisSecBuffer.cbBuffer > 0)
-                {
-                    Buffer = new byte[ThisSecBuffer.cbBuffer];
-                    Marshal.Copy(ThisSecBuffer.pvBuffer, Buffer, 0, ThisSecBuffer.cbBuffer);
-                }
-            }
-            else
-            {
-                int BytesToAllocate = 0;
-
-                for (int Index = 0; Index < cBuffers; Index++)
-                {
-                    //The bits were written out the following order:
-                    //int cbBuffer;
-                    //int BufferType;
-                    //pvBuffer;
-                    //What we need to do here calculate the total number of bytes we need to copy...
-                    int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
-                    BytesToAllocate += Marshal.ReadInt32(pBuffers, CurrentOffset);
-                }
-
-                Buffer = new byte[BytesToAllocate];
-
-                for (int Index = 0, BufferIndex = 0; Index < cBuffers; Index++)
-                {
-                    //The bits were written out the following order:
-                    //int cbBuffer;
-                    //int BufferType;
-                    //pvBuffer;
-                    //Now iterate over the individual buffers and put them together into a
-                    //byte array...
-                    int CurrentOffset = Index * Marshal.SizeOf(typeof(SecBuffer));
-                    int BytesToCopy = Marshal.ReadInt32(pBuffers, CurrentOffset);
-                    int length = CurrentOffset + Marshal.SizeOf(typeof(int)) + Marshal.SizeOf(typeof(int));
-                    IntPtr SecBufferpvBuffer = Marshal.ReadIntPtr(pBuffers, length);
-                    Marshal.Copy(SecBufferpvBuffer, Buffer, BufferIndex, BytesToCopy);
-                    BufferIndex += BytesToCopy;
-                }
-            }
-
-            return (Buffer);
-        }
-    }
-
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SECURITY_INTEGER
-    {
-        public uint LowPart;
-        public int HighPart;
-        public SECURITY_INTEGER(int dummy)
-        {
-            LowPart = 0;
-            HighPart = 0;
-        }
-    };
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SECURITY_HANDLE
-    {
-        public uint LowPart;
-        public uint HighPart;
-        public SECURITY_HANDLE(int dummy)
-        {
-            LowPart = HighPart = 0;
-        }
-    };
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SecPkgContext_Sizes
-    {
-        public uint cbMaxToken;
-        public uint cbMaxSignature;
-        public uint cbBlockSize;
-        public uint cbSecurityTrailer;
-    };
-
-    [StructLayout(LayoutKind.Sequential)]
-    internal struct SEC_WINNT_AUTH_IDENTITY
-    {
-        public string User;
-        public int UserLength;
-        public string Domain;
-        public int DomainLength;
-        public string Password;
-        public int PasswordLength;
-        public int Flags;
-    }
-
-    internal class SSPIHelper
-    {
-        public const int TOKEN_QUERY = 0x00008;
-        public const uint SEC_E_OK = 0;
-        public const uint SEC_E_INVALID_HANDLE = 0x80090301;
-        public const uint SEC_E_LOGON_DENIED = 0x8009030C;
-        public const uint SEC_I_CONTINUE_NEEDED = 0x90312;
-        public const uint SEC_I_COMPLETE_NEEDED = 0x90313;
-        public const uint SEC_I_COMPLETE_AND_CONTINUE = 0x90314;
-
-        public const uint SECQOP_WRAP_NO_ENCRYPT = 0x80000001;
-
-        const int SECPKG_CRED_OUTBOUND = 2;
-        private const int SECURITY_NETWORK_DREP = 0x0;
-        const int MAX_TOKEN_SIZE = 12288;
-        //For AcquireCredentialsHandle in 3er Parameter "fCredentialUse"
-
-        SECURITY_HANDLE _hOutboundCred = new SECURITY_HANDLE(0);
-        public SECURITY_HANDLE _hClientContext = new SECURITY_HANDLE(0);
-
-        public const int ISC_REQ_DELEGATE = 0x00000001;
-        public const int ISC_REQ_MUTUAL_AUTH = 0x00000002;
-        public const int ISC_REQ_REPLAY_DETECT = 0x00000004;
-        public const int ISC_REQ_SEQUENCE_DETECT = 0x00000008;
-        public const int ISC_REQ_CONFIDENTIALITY = 0x00000010;
-        public const int ISC_REQ_USE_SESSION_KEY = 0x00000020;
-        public const int ISC_REQ_PROMPT_FOR_CREDS = 0x00000040;
-        public const int ISC_REQ_USE_SUPPLIED_CREDS = 0x00000080;
-        public const int ISC_REQ_ALLOCATE_MEMORY = 0x00000100;
-        public const int ISC_REQ_USE_DCE_STYLE = 0x00000200;
-        public const int ISC_REQ_DATAGRAM = 0x00000400;
-        public const int ISC_REQ_CONNECTION = 0x00000800;
-        public const int ISC_REQ_CALL_LEVEL = 0x00001000;
-        public const int ISC_REQ_FRAGMENT_SUPPLIED = 0x00002000;
-        public const int ISC_REQ_EXTENDED_ERROR = 0x00004000;
-        public const int ISC_REQ_STREAM = 0x00008000;
-        public const int ISC_REQ_INTEGRITY = 0x00010000;
-        public const int ISC_REQ_IDENTIFY = 0x00020000;
-        public const int ISC_REQ_NULL_SESSION = 0x00040000;
-        public const int ISC_REQ_MANUAL_CRED_VALIDATION = 0x00080000;
-        public const int ISC_REQ_RESERVED1 = 0x00100000;
-        public const int ISC_REQ_FRAGMENT_TO_FIT = 0x00200000;
-
-        public const int SECPKG_ATTR_SIZES = 0;
-
-        public const int STANDARD_CONTEXT_ATTRIBUTES = ISC_REQ_MUTUAL_AUTH;
-
-        bool _bGotClientCredentials = false;
-
-        [DllImport("secur32", CharSet = CharSet.Auto)]
-        static extern uint AcquireCredentialsHandle(
-            string pszPrincipal, //SEC_CHAR*
-            string pszPackage, //SEC_CHAR* //"Kerberos","NTLM","Negotiative"
-            int fCredentialUse,
-            IntPtr PAuthenticationID,//_LUID AuthenticationID,//pvLogonID, //PLUID
-            ref SEC_WINNT_AUTH_IDENTITY pAuthData,//PVOID
-            int pGetKeyFn, //SEC_GET_KEY_FN
-            IntPtr pvGetKeyArgument, //PVOID
-            ref SECURITY_HANDLE phCredential, //SecHandle //PCtxtHandle ref
-            ref SECURITY_INTEGER ptsExpiry); //PTimeStamp //TimeStamp ref
-
-        [DllImport("secur32", CharSet = CharSet.Auto)]
-        static extern uint AcquireCredentialsHandle(
-            string pszPrincipal, //SEC_CHAR*
-            string pszPackage, //SEC_CHAR* //"Kerberos","NTLM","Negotiative"
-            int fCredentialUse,
-            IntPtr PAuthenticationID,//_LUID AuthenticationID,//pvLogonID, //PLUID
-            IntPtr pAuthData,//PVOID
-            int pGetKeyFn, //SEC_GET_KEY_FN
-            IntPtr pvGetKeyArgument, //PVOID
-            ref SECURITY_HANDLE phCredential, //SecHandle //PCtxtHandle ref
-            ref SECURITY_INTEGER ptsExpiry); //PTimeStamp //TimeStamp ref
-
-        [DllImport("secur32", CharSet = CharSet.Auto, SetLastError = true)]
-        static extern uint InitializeSecurityContext(
-            ref SECURITY_HANDLE phCredential,//PCredHandle
-            IntPtr phContext, //PCtxtHandle
-            string pszTargetName,
-            int fContextReq,
-            int Reserved1,
-            int TargetDataRep,
-            IntPtr pInput, //PSecBufferDesc SecBufferDesc
-            int Reserved2,
-            out SECURITY_HANDLE phNewContext, //PCtxtHandle
-            out SecBufferDesc pOutput, //PSecBufferDesc SecBufferDesc
-            out uint pfContextAttr, //managed ulong == 64 bits!!!
-            out SECURITY_INTEGER ptsExpiry); //PTimeStamp
-
-        [DllImport("secur32", CharSet = CharSet.Auto, SetLastError = true)]
-        static extern uint InitializeSecurityContext(
-            ref SECURITY_HANDLE phCredential,//PCredHandle
-            ref SECURITY_HANDLE phContext, //PCtxtHandle
-            string pszTargetName,
-            int fContextReq,
-            int Reserved1,
-            int TargetDataRep,
-            ref SecBufferDesc SecBufferDesc, //PSecBufferDesc SecBufferDesc
-            int Reserved2,
-            out SECURITY_HANDLE phNewContext, //PCtxtHandle
-            out SecBufferDesc pOutput, //PSecBufferDesc SecBufferDesc
-            out uint pfContextAttr, //managed ulong == 64 bits!!!
-            out SECURITY_INTEGER ptsExpiry); //PTimeStamp
-
-        /*
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        static extern int AcceptSecurityContext(ref SECURITY_HANDLE phCredential,
-                                                IntPtr phContext,
-                                                ref SecBufferDesc pInput,
-                                                uint fContextReq,
-                                                uint TargetDataRep,
-                                                out SECURITY_HANDLE phNewContext,
-                                                out SecBufferDesc pOutput,
-                                                out uint pfContextAttr,    //managed ulong == 64 bits!!!
-                                                out SECURITY_INTEGER ptsTimeStamp);
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        static extern int AcceptSecurityContext(ref SECURITY_HANDLE phCredential,
-                                                ref SECURITY_HANDLE phContext,
-                                                ref SecBufferDesc pInput,
-                                                uint fContextReq,
-                                                uint TargetDataRep,
-                                                out SECURITY_HANDLE phNewContext,
-                                                out SecBufferDesc pOutput,
-                                                out uint pfContextAttr,    //managed ulong == 64 bits!!!
-                                                out SECURITY_INTEGER ptsTimeStamp);
-        */
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int ImpersonateSecurityContext(ref SECURITY_HANDLE phContext);
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int QueryContextAttributes(ref SECURITY_HANDLE phContext,
-                                                        uint ulAttribute,
-                                                        out SecPkgContext_Sizes pContextAttributes);
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int EncryptMessage(ref SECURITY_HANDLE phContext,
-                                                uint fQOP,        //managed ulong == 64 bits!!!
-                                                ref SecBufferDesc pMessage,
-                                                uint MessageSeqNo);    //managed ulong == 64 bits!!!
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int DecryptMessage(ref SECURITY_HANDLE phContext,
-                                                 ref SecBufferDesc pMessage,
-                                                 uint MessageSeqNo,
-                                                 out uint pfQOP);
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int MakeSignature(ref SECURITY_HANDLE phContext,          // Context to use
-                                                uint fQOP,         // Quality of Protection
-                                                ref SecBufferDesc pMessage,        // Message to sign
-                                                uint MessageSeqNo);      // Message Sequence Num.
-
-        [DllImport("secur32.Dll", CharSet = CharSet.Auto, SetLastError = false)]
-        public static extern int VerifySignature(ref SECURITY_HANDLE phContext,          // Context to use
-                                                ref SecBufferDesc pMessage,        // Message to sign
-                                                uint MessageSeqNo,            // Message Sequence Num.
-                                                out uint pfQOP);      // Quality of Protection
-
-
-        readonly string _sAccountName = WindowsIdentity.GetCurrent().Name;
-
-        public SSPIHelper()
-        {
-
-        }
-
-        public SSPIHelper(string sRemotePrincipal)
-        {
-            _sAccountName = sRemotePrincipal;
-        }
-
-        private string sUsername;
-        public string Username
-        {
-            set { sUsername = value; }
-            get { return sUsername; }
-        }
-        private string sDomain;
-        public string Domain
-        {
-            set { sDomain = value; }
-            get { return sDomain; }
-        }
-        private string sPassword;
-        public string Password
-        {
-            set { sPassword = value; }
-            get { return sPassword; }
-        }
-
-        private bool bUseWindowsCreds = false;
-        public bool UseWindowsCreds
-        {
-            set { bUseWindowsCreds = value; }
-            get { return bUseWindowsCreds; }
-        }
-
-        public void ExecuteKerberos(byte[] inToken, out byte[] outToken)
-        {
-            if (InitializeKerberosStage)
-            {
-                InitializeClient(inToken, out outToken);
-            }
-            else
-            {
-                if (inToken == null)
-                {
-                    throw new Exception("Kerberos failure: Incoming bytes can't be null.");
-                }
-
-                DecryptMessage(0, inToken, out outToken);
-
-                inToken = new byte[] { 0x01, 0x00, 0x00, 0x00 };
-                EncryptMessage(inToken, out outToken);
-            }
-        }
-
-        private void InitializeClient(byte[] serverToken, out byte[] clientToken)
-        {
-            clientToken = null;
-
-            SECURITY_INTEGER ClientLifeTime = new SECURITY_INTEGER(0);
-
-            if (!_bGotClientCredentials)
-            {
-                uint returnValue;
-
-                if (!UseWindowsCreds)
-                {
-                    SEC_WINNT_AUTH_IDENTITY ident = new SEC_WINNT_AUTH_IDENTITY();
-                    ident.User = Username;
-                    ident.UserLength = ident.User.Length;
-                    ident.Domain = Domain;
-                    ident.DomainLength = ident.Domain.Length;
-                    ident.Password = Password;
-                    ident.PasswordLength = ident.Password.Length;
-                    ident.Flags = 0x1;
-
-                    returnValue = AcquireCredentialsHandle(null, "Kerberos", SECPKG_CRED_OUTBOUND,
-                                                               IntPtr.Zero, ref ident, 0, IntPtr.Zero,
-                                                               ref _hOutboundCred, ref ClientLifeTime);
-                }
-                else
-                {
-                    returnValue = AcquireCredentialsHandle(null, "Kerberos", SECPKG_CRED_OUTBOUND,
-                                                           HANDLE.Zero, HANDLE.Zero, 0, HANDLE.Zero,
-                                                           ref _hOutboundCred, ref ClientLifeTime);
-                }
-
-                if (returnValue != SEC_E_OK)
-                {
-                    throw new Exception("Couldn't acquire client credentials");
-                }
-
-                _bGotClientCredentials = true;
-            }
-
-            uint ss;
-
-            SecBufferDesc ClientToken = new SecBufferDesc(MAX_TOKEN_SIZE);
-
-            try
-            {
-                uint ContextAttributes;
-
-                if (serverToken == null)
-                {
-                    ss = InitializeSecurityContext(ref _hOutboundCred,
-                        IntPtr.Zero,
-                        _sAccountName,// null string pszTargetName,
-                        STANDARD_CONTEXT_ATTRIBUTES,
-                        0,//int Reserved1,
-                        SECURITY_NETWORK_DREP, //int TargetDataRep
-                        IntPtr.Zero,    //Always zero first time around...
-                        0, //int Reserved2,
-                        out _hClientContext, //pHandle CtxtHandle = SecHandle
-                        out ClientToken,//ref SecBufferDesc pOutput, //PSecBufferDesc
-                        out ContextAttributes,//ref int pfContextAttr,
-                        out ClientLifeTime); //ref IntPtr ptsExpiry ); //PTimeStamp
-
-                }
-                else
-                {
-                    SecBufferDesc ServerToken = new SecBufferDesc(serverToken);
-
-                    try
-                    {
-                        ss = InitializeSecurityContext(ref _hOutboundCred,
-                            ref _hClientContext,
-                            _sAccountName,// null string pszTargetName,
-                            STANDARD_CONTEXT_ATTRIBUTES,
-                            0,//int Reserved1,
-                            SECURITY_NETWORK_DREP,//int TargetDataRep
-                            ref ServerToken,    //Always zero first time around...
-                            0, //int Reserved2,
-                            out _hClientContext, //pHandle CtxtHandle = SecHandle
-                            out ClientToken,//ref SecBufferDesc pOutput, //PSecBufferDesc
-                            out ContextAttributes,//ref int pfContextAttr,
-                            out ClientLifeTime); //ref IntPtr ptsExpiry ); //PTimeStamp
-                    }
-                    finally
-                    {
-                        ServerToken.Dispose();
-                    }
-                }
-
-                if (ss == SEC_E_LOGON_DENIED)
-                {
-                    throw new Exception("Bad username, password or domain.");
-                }
-                else if (ss != SEC_E_OK && ss != SEC_I_CONTINUE_NEEDED)
-                {
-                    throw new Exception("InitializeSecurityContext() failed!!!");
-                }
-
-                clientToken = ClientToken.GetSecBufferByteArray();
-            }
-            finally
-            {
-                ClientToken.Dispose();
-            }
-
-            InitializeKerberosStage = ss != SEC_E_OK;
-        }
-
-        private bool bInitializeKerberosStage = true;
-        private bool InitializeKerberosStage
-        {
-            get { return bInitializeKerberosStage; }
-            set { bInitializeKerberosStage = value; }
-        }
-
-        public void EncryptMessage(byte[] message, out byte[] encryptedBuffer)
-        {
-            encryptedBuffer = null;
-
-            SECURITY_HANDLE EncryptionContext = _hClientContext;
-
-            SecPkgContext_Sizes ContextSizes;
-
-            if (QueryContextAttributes(ref EncryptionContext,
-                   SECPKG_ATTR_SIZES, out ContextSizes) != SEC_E_OK)
-            {
-                throw new Exception("QueryContextAttribute() failed!!!");
-            }
-
-            MultipleSecBufferHelper[] ThisSecHelper = new MultipleSecBufferHelper[]
-                    {
-                        new MultipleSecBufferHelper(new byte[ContextSizes.cbSecurityTrailer],
-                                                    SecBufferType.SECBUFFER_TOKEN),
-                        new MultipleSecBufferHelper(message, SecBufferType.SECBUFFER_DATA),
-                        new MultipleSecBufferHelper(new byte[ContextSizes.cbBlockSize],
-                                                    SecBufferType.SECBUFFER_PADDING)
-                    };
-
-            SecBufferDesc DescBuffer = new SecBufferDesc(ThisSecHelper);
-
-            try
-            {
-                if (EncryptMessage(ref EncryptionContext,
-                        SECQOP_WRAP_NO_ENCRYPT, ref DescBuffer, 0) != SEC_E_OK)
-                {
-                    throw new Exception("EncryptMessage() failed!!!");
-                }
-
-                encryptedBuffer = DescBuffer.GetSecBufferByteArray();
-            }
-            finally
-            {
-                DescBuffer.Dispose();
-            }
-        }
-
-        public void DecryptMessage(int messageLength, byte[] encryptedBuffer, out byte[] decryptedBuffer)
-        {
-            decryptedBuffer = null;
-
-            SECURITY_HANDLE DecryptionContext = _hClientContext;
-
-            byte[] EncryptedMessage = new byte[messageLength];
-            Array.Copy(encryptedBuffer, 0, EncryptedMessage, 0, messageLength);
-
-            int SecurityTrailerLength = encryptedBuffer.Length - messageLength;
-
-            byte[] SecurityTrailer = new byte[SecurityTrailerLength];
-            Array.Copy(encryptedBuffer, messageLength, SecurityTrailer, 0, SecurityTrailerLength);
-
-            MultipleSecBufferHelper[] ThisSecHelper = new MultipleSecBufferHelper[]
-                    {
-                        new MultipleSecBufferHelper(EncryptedMessage, SecBufferType.SECBUFFER_DATA),
-                        new MultipleSecBufferHelper(SecurityTrailer, SecBufferType.SECBUFFER_STREAM)
-                    };
-
-            SecBufferDesc DescBuffer = new SecBufferDesc(ThisSecHelper);
-            try
-            {
-                uint EncryptionQuality;
-
-                if (DecryptMessage(ref DecryptionContext, ref DescBuffer, 0, out EncryptionQuality) != SEC_E_OK)
-                {
-                    throw new Exception("DecryptMessage() failed!!!");
-                }
-
-                decryptedBuffer = new byte[messageLength];
-                Array.Copy(DescBuffer.GetSecBufferByteArray(), 0, decryptedBuffer, 0, messageLength);
-            }
-            finally
-            {
-                DescBuffer.Dispose();
-            }
-        }
-    }
-}
-
-
diff --git a/lib/jabber-net/jabber/connection/sasl/MD5Processor.cs b/lib/jabber-net/jabber/connection/sasl/MD5Processor.cs
deleted file mode 100644
index 7afa5d7..0000000
--- a/lib/jabber-net/jabber/connection/sasl/MD5Processor.cs
+++ /dev/null
@@ -1,339 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Security.Cryptography;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.IO;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.stream;
-
-namespace jabber.connection.sasl
-{
-    /// <summary>
-    /// RFC2831 DIGEST-MD5 SASL mechanism
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class MD5Processor : SASLProcessor
-    {
-        /// <summary>
-        /// Private members
-        /// </summary>
-        private string  m_response;
-        private string  m_realm;
-        private string  m_username;
-        private string  m_password;
-        private string  m_nonce;
-        private string  m_cnonce;
-        private int     m_nc;
-        private string  m_ncString;
-        private string  m_qop;
-        private string  m_charset;
-        private string  m_authzid;
-
-        private readonly MD5CryptoServiceProvider MD5 = new MD5CryptoServiceProvider();
-        private readonly Regex CSV = new Regex(@"(?<tag>[^= \t\r\n]+)=(?:(?<data>[^,"" \t\r\n]+)|(?:""(?<data>[^""]*)"")),?",
-                RegexOptions.ExplicitCapture);
-
-        /// <summary>
-        /// DIGEST-MD5 Realm
-        /// </summary>
-        public const string REALM = "realm";
-        /// <summary>
-        /// DIGEST-MD5 nonce
-        /// </summary>
-        public const string NONCE = "nonce";
-        /// <summary>
-        /// DIGEST-MD5 qop
-        /// </summary>
-        public const string QOP = "qop";
-        /// <summary>
-        /// DIGEST-MD5 charset
-        /// </summary>
-        public const string CHARSET = "charset";
-        /// <summary>
-        /// DIGEST-MD5 algorithm
-        /// </summary>
-        public const string ALGORITHM = "algorithm";
-        /// <summary>
-        /// DIGEST-MD5 authorization id
-        /// </summary>
-        public const string AUTHZID = "authzid";
-
-        /// <summary>
-        /// The directives that are required to be set on the SASLProcessor in OnSASLStart
-        /// </summary>
-        public static readonly string[] s_requiredDirectives = {USERNAME, PASSWORD};
-
-        private static readonly Encoding ENC = System.Text.Encoding.UTF8;
-
-        /// <summary>
-        ///
-        /// </summary>
-        public MD5Processor() : base()
-        {
-            m_nc = 0;
-        }
-
-        /// <summary>
-        /// Process the next DIGEST-MD5 step.
-        /// </summary>
-        /// <param name="s">The previous step.  Null for the first step</param>
-        /// <param name="doc">Document to create next step in.</param>
-        /// <returns></returns>
-        /// <exception cref="AuthenticationFailedException">Thrown if authentication fails</exception>
-        public override Step step(Step s, XmlDocument doc)
-        {
-            Step resp = null;
-
-            if (s == null)
-            { // first step
-                Auth a = new Auth(doc);
-                a.Mechanism = MechanismType.DIGEST_MD5;
-                return a;
-            }
-
-            Debug.Assert(s is Challenge);
-            populateDirectives(ENC.GetString(s.Bytes));
-            validateStartDirectives();
-
-
-            resp = new Response(doc);
-            if (this["rspauth"] == null)  // we haven't authenticated yet
-            {
-                generateResponseString();
-                resp.Bytes = generateResponse();
-            }
-            else // we have authenticated
-            {
-                // make sure what is in rspauth is correct
-                if (!validateResponseAuth())
-                {
-                    throw new AuthenticationFailedException();
-                }
-            }
-            return resp;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="decoded"></param>
-        private void populateDirectives(string decoded)
-        {
-            MatchCollection coll = CSV.Matches(decoded);
-            foreach (Match m in coll)
-            {
-                this[m.Groups["tag"].Value] = m.Groups["data"].Value;
-            }
-        }
-
-
-        /// <summary>
-        ///
-        /// </summary>
-        ///
-        private void validateStartDirectives()
-        {
-            Object n;
-            string temp;
-            if ( (n = this[USERNAME]) != null)
-            {
-                temp = n.ToString();
-                m_username = ENC.GetString(ENC.GetBytes(temp));
-            }
-            else
-            {
-                throw new MissingDirectiveException("Missing SASL username directive");
-            }
-            if ( (n = this[PASSWORD]) != null)
-            {
-                temp = n.ToString();
-                m_password = ENC.GetString(ENC.GetBytes(temp));
-            }
-            else
-            {
-                throw new MissingDirectiveException("Missing SASL password directive");
-            }
-
-            if ( (n = this[REALM]) != null)
-            {
-                m_realm = n.ToString();
-            }
-            else
-            {
-                throw new InvalidServerChallengeException("Missing SASL realm");
-            }
-            if ( (n = this[NONCE]) != null)
-            {
-                m_nonce = n.ToString();
-            }
-            else
-            {
-                throw new InvalidServerChallengeException("Missing nonce directive");
-            }
-            if ( (n = this[QOP]) != null)
-            {
-                m_qop = n.ToString();
-            }
-            else
-            {
-                throw new InvalidServerChallengeException("Missing qop directive");
-            }
-            if ( (n = this[CHARSET]) != null)
-            {
-                m_charset = n.ToString();
-            }
-            if ( (n = this[AUTHZID]) != null)
-            {
-                m_authzid = n.ToString();
-            }
-        }
-
-        /// <summary>
-        /// Generates the entrire response to send to the server
-        /// </summary>
-        /// <returns></returns>
-        private byte[] generateResponse()
-        {
-            StringBuilder sb = new StringBuilder();
-            sb.Append("username=\"");
-            sb.Append(m_username);
-            sb.Append("\",");
-            sb.Append("realm=\"");
-            sb.Append(m_realm);
-            sb.Append("\",");
-            sb.Append("nonce=\"");
-            sb.Append(m_nonce);
-            sb.Append("\",");
-            sb.Append("cnonce=\"");
-            sb.Append(m_cnonce);
-            sb.Append("\",");
-            sb.Append("nc=");
-            sb.Append(m_ncString);
-            sb.Append(",");
-            sb.Append("qop=");
-            sb.Append(m_qop);
-            sb.Append(",");
-            sb.Append("digest-uri=\"");
-            sb.Append("xmpp/");
-            sb.Append(m_realm);
-            sb.Append("\",");
-            sb.Append("response=");
-            sb.Append(m_response);
-            sb.Append(",");
-            sb.Append("charset=");
-            sb.Append(m_charset);
-            return ENC.GetBytes(sb.ToString());
-        }
-        /// <summary>
-        /// Generates the MD5 hash that goes in the response attribute of the
-        /// response sent to the server.
-        /// </summary>
-        private void generateResponseString()
-        {
-            // here is where we do the md5 foo
-            ASCIIEncoding AE = new ASCIIEncoding();
-            byte[] H1, H2, H3, temp;
-            string A1, A2, A3, uri, p1, p2;
-
-            uri = "xmpp/" + m_realm;
-            Random r = new Random();
-            int v = r.Next(1024);
-
-            StringBuilder sb = new StringBuilder();
-            sb.Append(v.ToString());
-            sb.Append(":");
-            sb.Append(m_username);
-            sb.Append(":");
-            sb.Append(m_password);
-
-            m_cnonce = HexString(AE.GetBytes(sb.ToString())).ToLower();
-
-            m_nc++;
-            m_ncString = m_nc.ToString().PadLeft(8,'0');
-
-            sb.Remove(0,sb.Length);
-            sb.Append(m_username);
-            sb.Append(":");
-            sb.Append(m_realm);
-            sb.Append(":");
-            sb.Append(m_password);
-            H1 = MD5.ComputeHash(AE.GetBytes(sb.ToString()));
-
-            sb.Remove(0, sb.Length);
-            sb.Append(":");
-            sb.Append(m_nonce);
-            sb.Append(":");
-            sb.Append(m_cnonce);
-
-            if (m_authzid != null)
-            {
-                sb.Append(":");
-                sb.Append(m_authzid);
-            }
-            A1 = sb.ToString();
-
-            MemoryStream ms = new MemoryStream();
-            ms.Write(H1,0,16);
-            temp = AE.GetBytes(A1);
-            ms.Write(temp,0,temp.Length);
-            ms.Seek(0,System.IO.SeekOrigin.Begin);
-            H1 = MD5.ComputeHash(ms);
-
-            sb.Remove(0,sb.Length);
-            sb.Append("AUTHENTICATE:");
-            sb.Append(uri);
-            if (m_qop.CompareTo("auth") != 0)
-            {
-                sb.Append(":00000000000000000000000000000000");
-            }
-            A2 = sb.ToString();
-            H2 = AE.GetBytes(A2);
-            H2 = MD5.ComputeHash(H2);
-
-            // create p1 and p2 as the hex representation of H1 and H2
-            p1 = HexString(H1).ToLower();
-            p2 = HexString(H2).ToLower();
-
-            sb.Remove(0, sb.Length);
-            sb.Append(p1);
-            sb.Append(":");
-            sb.Append(m_nonce);
-            sb.Append(":");
-            sb.Append(m_ncString);
-            sb.Append(":");
-            sb.Append(m_cnonce);
-            sb.Append(":");
-            sb.Append(m_qop);
-            sb.Append(":");
-            sb.Append(p2);
-
-            A3 = sb.ToString();
-            H3 = MD5.ComputeHash(AE.GetBytes(A3));
-            m_response = HexString(H3).ToLower();
-        }
-
-        private bool validateResponseAuth()
-        {
-            //TODO:  We need to validate the respauth's value by going through the responseString
-            //function again
-            return true;
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/sasl/PlainProcessor.cs b/lib/jabber-net/jabber/connection/sasl/PlainProcessor.cs
deleted file mode 100644
index c5ca385..0000000
--- a/lib/jabber-net/jabber/connection/sasl/PlainProcessor.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.stream;
-
-namespace jabber.connection.sasl
-{
-    /// <summary>
-    /// SASL Mechanism PLAIN as specified in RFC 2595.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PlainProcessor : SASLProcessor
-    {
-        /// <summary>
-        /// Perform the next step
-        /// </summary>
-        /// <param name="s">Null if it's the initial response</param>
-        /// <param name="doc">Document to create Steps in</param>
-        /// <returns></returns>
-        public override Step step(Step s, XmlDocument doc)
-        {
-            Debug.Assert(s == null);
-            Auth a = new Auth(doc);
-            a.Mechanism = MechanismType.PLAIN;
-            MemoryStream ms = new MemoryStream();
-
-            // message = [authorize-id] NUL authenticate-id NUL password
-
-            // Skip authzid.
-            ms.WriteByte(0);
-            string u = this[USERNAME];
-            if ((u == null) || (u == ""))
-                throw new SASLException("Username required");
-            byte[] bu = System.Text.Encoding.UTF8.GetBytes(u);
-            ms.Write(bu, 0, bu.Length);
-            ms.WriteByte(0);
-            string p = this[PASSWORD];
-            if ((p == null) || (p == ""))
-                throw new SASLException("Password required");
-            byte[] pu = System.Text.Encoding.UTF8.GetBytes(p);
-            ms.Write(pu, 0, pu.Length);
-
-            a.Bytes = ms.ToArray();
-            return a;
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/connection/sasl/SASLProcessor.cs b/lib/jabber-net/jabber/connection/sasl/SASLProcessor.cs
deleted file mode 100644
index 2cbf5a6..0000000
--- a/lib/jabber-net/jabber/connection/sasl/SASLProcessor.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.Xml;
-using System.Text;
-
-using bedrock.util;
-using jabber.protocol.stream;
-
-namespace jabber.connection.sasl
-{
-    /// <summary>
-    /// A SASL processor instance has been created.  Fill it with information, like USERNAME and PASSWORD.
-    /// </summary>
-    public delegate void SASLProcessorHandler(Object sender, SASLProcessor proc);
-
-    /// <summary>
-    /// Some sort of SASL error
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SASLException : ApplicationException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="message"></param>
-        public SASLException(string message) : base(message){}
-
-        /// <summary>
-        ///
-        /// </summary>
-        public SASLException() : base(){}
-    }
-
-    /// <summary>
-    /// Authentication failed.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AuthenticationFailedException : SASLException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        public AuthenticationFailedException() : base()
-        {}
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="message"></param>
-        public AuthenticationFailedException(string message) : base(message)
-        {}
-    }
-
-    /// <summary>
-    /// A required directive wasn't supplied.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class MissingDirectiveException : SASLException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="message"></param>
-        public MissingDirectiveException(string message) : base(message)
-        {}
-    }
-
-    /// <summary>
-    /// Server sent an invalid challenge
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidServerChallengeException : SASLException
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="message"></param>
-        public InvalidServerChallengeException(string message) : base(message)
-        {}
-    }
-    /// <summary>
-    /// Summary description for SASLProcessor.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class SASLProcessor
-    {
-        /// <summary>
-        /// SASL username
-        /// </summary>
-        public const string USERNAME = "username";
-        /// <summary>
-        /// SASL password
-        /// </summary>
-        public const string PASSWORD = "password";
-
-
-        /// <summary>
-        ///
-        /// </summary>
-        private Hashtable m_directives = new Hashtable();
-
-        /// <summary>
-        ///
-        /// </summary>
-        public SASLProcessor()
-        {
-        }
-
-        /// <summary>
-        /// Create a new SASLProcessor, of the best type possible
-        /// </summary>
-        /// <param name="mt">The types the server implements</param>
-        /// <param name="plaintextOK">Is it ok to select insecure types?</param>
-        /// <param name="mechs">The mechanisms supported by the server</param>
-        /// <returns></returns>
-        public static SASLProcessor createProcessor(MechanismType mt, bool plaintextOK, Mechanisms mechs)
-        {
-            if ((mt & MechanismType.EXTERNAL) == MechanismType.EXTERNAL)
-            {
-                return new ExternalProcessor();
-            }
-            if ((mt & MechanismType.GSSAPI) == MechanismType.GSSAPI)
-            {
-                string RemotePrincipal = "";
-                foreach (Mechanism mechanism in mechs.GetMechanisms())
-                {
-                    if (mechanism.MechanismName == "GSSAPI")
-                    {
-                        RemotePrincipal = mechanism.GetAttribute("kerb:principal");
-                        break;
-                    }
-                }
-                return new KerbProcessor(RemotePrincipal);
-            }
-            if ((mt & MechanismType.DIGEST_MD5) == MechanismType.DIGEST_MD5)
-            {
-                return new MD5Processor();
-            }
-            else if (plaintextOK && ((mt & MechanismType.PLAIN) == MechanismType.PLAIN))
-            {
-                return new PlainProcessor();
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Data for performing SASL challenges and responses.
-        /// </summary>
-        public string this[string directive]
-        {
-            get { return (string) m_directives[directive]; }
-            set { m_directives[directive] = value; }
-        }
-
-        /// <summary>
-        /// Perform the next step
-        /// </summary>
-        /// <param name="s">Null if it's the initial response</param>
-        /// <param name="doc">Document to create Steps in</param>
-        /// <returns></returns>
-        public abstract Step step(Step s, XmlDocument doc);
-
-        /// <summary>
-        /// byte array as a hex string, two chars per byte.
-        /// </summary>
-        /// <param name="buf">Byte array</param>
-        /// <returns></returns>
-        protected static string HexString(byte[] buf)
-        {
-            StringBuilder sb = new StringBuilder();
-            foreach (byte b in buf)
-            {
-                sb.Append(b.ToString("x2"));
-            }
-            return sb.ToString();
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/AsynchElementStream.cs b/lib/jabber-net/jabber/protocol/AsynchElementStream.cs
deleted file mode 100644
index b1d9575..0000000
--- a/lib/jabber-net/jabber/protocol/AsynchElementStream.cs
+++ /dev/null
@@ -1,398 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.Diagnostics;
-using System.Xml;
-
-using xpnet;
-
-using bedrock.io;
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Summary description for AsynchElementStream.
-    /// TODO: combine with ElementStream, since there's only one impl now.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AsynchElementStream : ElementStream
-    {
-        private static System.Text.Encoding utf = System.Text.Encoding.UTF8;
-
-        private BufferAggregate m_buf   = new BufferAggregate();
-        private Encoding m_enc   = new UTF8Encoding();
-        private NS m_ns    = new NS();
-        private XmlElement m_elem  = null;
-        private XmlElement m_root  = null;
-        private bool m_cdata = false;
-
-        /// <summary>
-        /// Create an instance.
-        /// </summary>
-        public AsynchElementStream()
-        {
-        }
-
-        /// <summary>
-        /// Put bytes into parser.  Used by test routines, only, for convenience.
-        /// </summary>
-        /// <param name="buf"></param>
-        public void Push(byte[] buf)
-        {
-            Push(buf, 0, buf.Length);
-        }
-
-        /// <summary>
-        /// Put bytes into the parser.
-        /// </summary>
-        /// <param name="buf">The bytes to put into the parse stream</param>
-        /// <param name="offset">Offset into buf to start at</param>
-        /// <param name="length">Number of bytes to write</param>
-        public void Push(byte[] buf, int offset, int length)
-        {
-            // or assert, really, but this is a little nicer.
-            if (length == 0)
-                return;
-
-            // No locking is required.  Read() won't get called again
-            // until this method returns.  Keep in mind that we're
-            // already on a thread in a ThreadPool, which is created
-            // and managed by System.IO at the end of the day.
-
-            // TODO: only do this copy if we have a partial token at the
-            // end of parsing.
-            byte[] copy = new byte[length];
-            System.Buffer.BlockCopy(buf, offset, copy, 0, length);
-            m_buf.Write(copy);
-
-            byte[] b = m_buf.GetBuffer();
-            int off = 0;
-            TOK tok = TOK.END_TAG;
-            ContentToken ct = new ContentToken();
-
-            try
-            {
-                while (off < b.Length)
-                {
-
-
-                    if (m_cdata)
-                        tok = m_enc.tokenizeCdataSection(b, off, b.Length, ct);
-                    else
-                        tok = m_enc.tokenizeContent(b, off, b.Length, ct);
-
-                    switch (tok)
-                    {
-                    case TOK.EMPTY_ELEMENT_NO_ATTS:
-                    case TOK.EMPTY_ELEMENT_WITH_ATTS:
-                        StartTag(b, off, ct, tok);
-                        EndTag(b, off, ct, tok);
-                        break;
-                    case TOK.START_TAG_NO_ATTS:
-                    case TOK.START_TAG_WITH_ATTS:
-                        StartTag(b, off, ct, tok);
-                        break;
-                    case TOK.END_TAG:
-                        EndTag(b, off, ct, tok);
-                        break;
-                    case TOK.DATA_CHARS:
-                    case TOK.DATA_NEWLINE:
-                        AddText(utf.GetString(b, off, ct.TokenEnd - off));
-                        break;
-                    case TOK.CHAR_REF:
-                    case TOK.MAGIC_ENTITY_REF:
-                        AddText(new string(new char[] { ct.RefChar1 }));
-                        break;
-                    case TOK.CHAR_PAIR_REF:
-                        AddText(new string(new char[] {ct.RefChar1,
-                                                              ct.RefChar2}));
-                        break;
-                    case TOK.COMMENT:
-                        if (m_elem != null)
-                        {
-                            // <!-- 4
-                            //  --> 3
-                            int start = off + 4*m_enc.MinBytesPerChar;
-                            int end = ct.TokenEnd - off -
-                                    7*m_enc.MinBytesPerChar;
-                            string text = utf.GetString(b, start, end);
-                            m_elem.AppendChild(m_doc.CreateComment(text));
-                        }
-                        break;
-                    case TOK.CDATA_SECT_OPEN:
-                        m_cdata = true;
-                        break;
-                    case TOK.CDATA_SECT_CLOSE:
-                        m_cdata = false;
-                        break;
-                    case TOK.XML_DECL:
-                        // thou shalt use UTF8, and XML version 1.
-                        // i shall ignore evidence to the contrary...
-
-                        // TODO: Throw an exception if these assuptions are
-                        // wrong
-                        break;
-                    case TOK.ENTITY_REF:
-                    case TOK.PI:
-                        throw new System.NotImplementedException("Token type not implemented: " + tok);
-                    }
-                    off = ct.TokenEnd;
-                    ct.clearAttributes();
-                }
-            }
-            catch (PartialTokenException)
-            {
-                // Console.WriteLine("PartialTokenException: " + System.Text.Encoding.UTF8.GetString(copy));
-                // ignored;
-            }
-            catch (ExtensibleTokenException)
-            {
-                // ignored;
-            }
-            catch (xpnet.InvalidTokenException e)
-            {
-                throw new XMLParseException(e, this, buf, offset, length);
-            }
-            catch (Exception e)
-            {
-                throw new Exception("Unexpected exception", e);
-            }
-            finally
-            {
-                m_buf.Clear(off);
-                ct.clearAttributes();
-            }
-        }
-
-        private void StartTag(byte[] buf, int offset,
-                              ContentToken ct, TOK tok)
-        {
-            int colon;
-            string name;
-            string prefix;
-            Hashtable ht = new Hashtable();
-
-            m_ns.PushScope();
-
-            // if i have attributes
-            if ((tok == TOK.START_TAG_WITH_ATTS) ||
-                (tok == TOK.EMPTY_ELEMENT_WITH_ATTS))
-            {
-                int start;
-                int end;
-                string val;
-                for (int i=0; i<ct.getAttributeSpecifiedCount(); i++)
-                {
-                    start = ct.getAttributeNameStart(i);
-                    end = ct.getAttributeNameEnd(i);
-                    name = utf.GetString(buf, start, end - start);
-
-                    start = ct.getAttributeValueStart(i);
-                    end =  ct.getAttributeValueEnd(i);
-                    val = utf.GetString(buf, start, end - start);
-
-                    // <foo b='&'/>
-                    // <foo b='&amp;'
-                    // TODO: if val includes &, it gets double-escaped
-                    if (name.StartsWith("xmlns:"))
-                    {
-                        colon = name.IndexOf(':');
-                        prefix = name.Substring(colon+1);
-                        m_ns.AddNamespace(prefix, val);
-                    }
-                    else if (name == "xmlns")
-                    {
-                        m_ns.AddNamespace(string.Empty, val);
-                    }
-                    ht.Add(name, val);
-                }
-            }
-
-            name = utf.GetString(buf,
-                                 offset + m_enc.MinBytesPerChar,
-                                 ct.NameEnd - offset - m_enc.MinBytesPerChar);
-            colon = name.IndexOf(':');
-            string ns = "";
-            prefix = "";
-            if (colon > 0)
-            {
-                prefix = name.Substring(0, colon);
-                name = name.Substring(colon + 1);
-                ns = m_ns.LookupNamespace(prefix);
-            }
-            else
-            {
-                ns = m_ns.DefaultNamespace;
-            }
-
-            XmlQualifiedName q = new XmlQualifiedName(name, ns);
-            XmlElement elem = m_factory.GetElement(prefix, q, m_doc);
-
-
-            foreach (string attrname in ht.Keys)
-            {
-                colon = attrname.IndexOf(':');
-                if (colon > 0)
-                {
-                    prefix = attrname.Substring(0, colon);
-                    name = attrname.Substring(colon+1);
-
-                    XmlAttribute attr = m_doc.CreateAttribute(prefix,
-                                                              name,
-                                                              m_ns.LookupNamespace(prefix));
-                    attr.InnerXml = (string)ht[attrname];
-                    elem.SetAttributeNode(attr);
-                }
-                else
-                {
-                    XmlAttribute attr = m_doc.CreateAttribute(attrname);
-                    attr.InnerXml = (string)ht[attrname];
-                    elem.SetAttributeNode(attr);
-                }
-            }
-
-
-            if (m_root == null)
-            {
-                m_root = elem;
-                FireOnDocumentStart(m_root);
-            }
-            else
-            {
-                if (m_elem != null)
-                    m_elem.AppendChild(elem);
-                m_elem = elem;
-            }
-        }
-
-        private void EndTag(byte[] buf, int offset,
-                            ContentToken ct, TOK tok)
-        {
-            m_ns.PopScope();
-
-            if (m_elem == null)
-            {// end of doc
-                FireOnDocumentEnd();
-                return;
-            }
-
-            string name = null;
-
-            if ((tok == TOK.EMPTY_ELEMENT_WITH_ATTS) ||
-                (tok == TOK.EMPTY_ELEMENT_NO_ATTS))
-                name = utf.GetString(buf,
-                                     offset + m_enc.MinBytesPerChar,
-                                     ct.NameEnd - offset -
-                                     m_enc.MinBytesPerChar);
-            else
-                name = utf.GetString(buf,
-                                     offset + m_enc.MinBytesPerChar*2,
-                                     ct.NameEnd - offset -
-                                     m_enc.MinBytesPerChar*2);
-
-
-            if (m_elem.Name != name)
-                throw new XmlException("Invalid end tag: " + name +
-                                       " != " + m_elem.Name);
-
-            XmlElement parent = (XmlElement)m_elem.ParentNode;
-            if (parent == null)
-            {
-                FireOnElement(m_elem);
-            }
-            m_elem = parent;
-        }
-
-        private void AddText(string text)
-        {
-            if (m_elem != null)
-            {
-                m_elem.AppendChild(m_doc.CreateTextNode(text));
-            }
-        }
-
-        /// <summary>
-        /// There was an error parsing XML.  What was the context?
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class XMLParseException : Exception
-        {
-            private string m_context = null;
-
-            /// <summary>
-            /// Some XML parsing error occurred.  Wrap it, and generate a little more context, so that we can try
-            /// to figure out where the actual error happened.
-            /// </summary>
-            /// <param name="innerException"></param>
-            /// <param name="stream"></param>
-            /// <param name="buf"></param>
-            /// <param name="offset"></param>
-            /// <param name="length"></param>
-            public XMLParseException(Exception innerException, AsynchElementStream stream, byte[] buf, int offset, int length)
-                : base("Parsing exception", innerException)
-            {
-                XmlElement e = stream.m_elem;
-                XmlElement last = null;
-                System.Text.StringBuilder sb = new System.Text.StringBuilder();
-
-                while (e != null)
-                {
-                    last = e;
-                    e = e.ParentNode as XmlElement;
-                }
-
-                if (last != null)
-                {
-                    sb.Append("Outer element: ");
-                    sb.Append(last.OuterXml);
-                    sb.Append("\n");
-                }
-                else
-                {
-                    sb.Append("Root stanza\n");
-                }
-
-                sb.Append("New text (note: it's normal to see what looks like extra close tags here): ");
-                try
-                {
-                    sb.Append(AsynchElementStream.utf.GetString(buf, offset, length));
-                }
-                catch (Exception)
-                {
-                    sb.Append("Error in UTF8 decode: ");
-                    sb.Append(Element.HexString(buf, offset, length));
-                }
-                m_context = sb.ToString();
-            }
-            /// <summary>
-            /// More context of where the error ocurred
-            /// </summary>
-            public string Context
-            {
-                get { return m_context; }
-            }
-
-            /// <summary>
-            /// String representation.
-            /// </summary>
-            /// <returns></returns>
-            public override string ToString()
-            {
-                return base.ToString() + "\n----------\n\nContext:\n" + m_context;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/Element.cs b/lib/jabber-net/jabber/protocol/Element.cs
deleted file mode 100644
index 305bbf0..0000000
--- a/lib/jabber-net/jabber/protocol/Element.cs
+++ /dev/null
@@ -1,958 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.Diagnostics;
-using System.Reflection;
-using System.Security.Cryptography;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// An enum that should translate "_" into "-" for use externally.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DashAttribute : Attribute
-    {
-        /// <summary>
-        /// This is just a flag attribute.
-        /// </summary>
-        public DashAttribute()
-        {
-        }
-    }
-
-    /// <summary>
-    /// An XmlElement with type-safe accessors.  This class is not much use by itself,
-    /// but provides a number of utility functions for its descendants.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Element : XmlElement
-    {
-        /// <summary>
-        /// UTF-8 encoding used throughout.
-        /// </summary>
-        protected static readonly Encoding ENCODING = Encoding.UTF8;
-
-        /// <summary>
-        /// Fix up bad namespaces that don't need to be sent on XML streams.
-        /// jabber:client and jabber:component:accept are removed from the root element,
-        /// and empty namespace declarations are removed throughout.
-        /// </summary>
-        private static readonly Regex s_RemoveNS = 
-            new Regex("(?:(?<=^[^>]*)( xmlns=\"(?:jabber:client|jabber:component:accept)\")| xmlns=\"\")",
-                      RegexOptions.Compiled);
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Element(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname.Name, qname.Namespace, doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="doc"></param>
-        public Element(string localName, XmlDocument doc) :
-            base("", localName, "", doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="namespaceURI"></param>
-        /// <param name="doc"></param>
-        public Element(string localName, string namespaceURI, XmlDocument doc) :
-            base("", localName, namespaceURI, doc)
-        {
-        }
-
-        /// <summary>
-        /// Returns the first child element with the given type.
-        /// 
-        /// You might expect this to be slower than this["name", "uri"], but it's 
-        /// probably actually faster, since that code has to check several different
-        /// things, and this code can just do a type comparison.
-        /// </summary>
-        /// <typeparam name="T">The type of child to search for</typeparam>
-        /// <returns>The first child with the given type, or null if none found</returns>
-        public T GetChildElement<T>()
-            where T : XmlElement
-        {
-            for (XmlNode node = this.FirstChild; node != null; node = node.NextSibling)
-            {
-                if (node is T)
-                    return (T)node;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// The xml:lang of this element.
-        /// </summary>
-        public string Lang
-        {
-            get
-            {
-                if (!HasAttribute("lang", URI.XML))
-                    return null;
-                return GetAttribute("lang", URI.XML);
-            }
-            set
-            {
-                if (HasAttribute("lang", URI.XML))
-                    RemoveAttribute("lang", URI.XML);
-                if (value != null)
-                {
-                    XmlAttribute attr = OwnerDocument.CreateAttribute("xml:lang", URI.XML);
-                    attr.Value = value;
-                    this.Attributes.Append(attr);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Add a child element.  The element can be from a different document.
-        /// </summary>
-        /// <param name="value"></param>
-        public void AddChild(XmlElement value)
-        {
-            if (this.OwnerDocument == value.OwnerDocument)
-            {
-                this.AppendChild(value);
-            }
-            else
-            {
-                this.AppendChild(this.OwnerDocument.ImportNode(value, true));
-            }
-        }
-
-        /// <summary>
-        /// Get a string representation of this element and its children, with the default
-        /// namespace stripped off if and only if it is jabber:client or jabber:component:accept.
-        /// </summary>
-        public override string OuterXml
-        {
-            get
-            {
-                return s_RemoveNS.Replace(base.OuterXml, "");
-            }
-        }
-
-        /// <summary>
-        /// The implementation of OuterXml from XmlElement, without removing the jabber:client
-        /// namespace.  Needed for Stream.
-        /// </summary>
-        protected string OriginalOuterXml
-        {
-            get { return base.OuterXml; }
-        }
-
-        /// <summary>
-        /// Returns an XmlNodeList containing a list of child elements that match the specified localname and namespace URI.
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="namespaceURI"></param>
-        /// <returns></returns>
-        public override XmlNodeList GetElementsByTagName(string localName, string namespaceURI)
-        {
-            return new ElementList(this, localName, namespaceURI);
-        }
-
-        /// <summary>
-        /// Returns an XmlNodeList containing a list of child elements that match the specified localname.
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <returns></returns>
-        public override XmlNodeList GetElementsByTagName(string localName)
-        {
-            return new ElementList(this, localName);
-        }
-
-        /// <summary>
-        /// Get a list of child elements that have the specified type.
-        /// </summary>
-        /// <typeparam name="T">The type of element to search for</typeparam>
-        /// <returns>A typed element list</returns>
-        public TypedElementList<T> GetElements<T>()
-            where T : XmlElement
-        {
-            return new TypedElementList<T>(this);
-        }
-
-        /// <summary>
-        /// Gett he text contents of the first sub-element with the specified type
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <returns></returns>
-        protected string GetElem<T>()
-            where T : Element
-        {
-            T e = GetChildElement<T>();
-            if (e == null)
-                return null;
-            if (!e.HasChildNodes)
-                return null;
-            return e.InnerText;
-        }
-
-        /// <summary>
-        /// Get the text contents of a sub-element.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns></returns>
-        protected string GetElem(string name)
-        {
-            XmlElement e = this[name];
-            if (e == null)
-                return null;
-            if (!e.HasChildNodes)
-                return null;
-            return e.InnerText;
-        }
-
-        /// <summary>
-        /// Sets the text contents of a sub-element with a specified type.
-        /// Creates the element if it doesn't exist.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public T SetElem<T>(string value)
-            where T : Element
-        {
-            T result = GetOrCreateElement<T>();
-            result.RemoveAll();
-            if (value != null)
-                result.InnerText = value;
-            return result;
-        }
-
-        /// <summary>
-        /// Sets the text contents of a sub-element.
-        /// Note: Do not use this if you want the sub-element to have a type that is not XmlElement.
-        /// Instead use <see cref="SetElem(string,string,Type)"/>
-        /// </summary>
-        /// <param name="name">The element tag.</param>
-        /// <param name="value">The inner text of the element.</param>
-        protected void SetElem(string name, string value)
-        {
-            XmlElement e = GetOrCreateElement(name, null, null);
-            e.RemoveAll();
-
-            if (value != null)
-                e.InnerText = value;
-        }
-
-        /// <summary>
-        /// Sets the text contents of a sub-element.
-        /// </summary>
-        /// <param name="name">The element tag.</param>
-        /// <param name="value">The inner text of the element.</param>
-        /// <param name="typeToCreate">If the element doesn't exist, create it with this type.  If null, then just use an XmlElement.</param>
-        protected void SetElem(string name, string value, Type typeToCreate)
-        {
-            XmlElement e = GetOrCreateElement(name, null, typeToCreate);
-            e.RemoveAll();
-
-            if (value != null)
-                e.InnerText = value;
-        }
-
-        /// <summary>
-        /// Create an element that is a child of this element, of the specified type.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <returns></returns>
-        protected T CreateChildElement<T>()
-            where T : Element
-        {
-            // Note: It would be cool to just do new T(OwnerDocument), but you can only call
-            // parameter-less constructors in generic-land.
-            ConstructorInfo constructor = typeof(T).GetConstructor(new Type[] { typeof(XmlDocument) });
-            Debug.Assert(constructor != null, "Type " + typeof(T).ToString() + " does not have a constructor taking an XmlDocument");
-            T c = (T)constructor.Invoke(new object[] { this.OwnerDocument });
-            AppendChild(c);
-            return c;
-        }
-
-        /// <summary>
-        /// If a child element exists with the given type, return it.  Otherwise,
-        /// gin up a new instance of the given type, add it as a child, 
-        /// and return the result.
-        /// 
-        /// This should not have the performance impact of GetOrCreateElement.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <returns></returns>
-        protected T GetOrCreateElement<T>()
-            where T : Element
-        {
-            T c = GetChildElement<T>();
-            if (c == null)
-                c = CreateChildElement<T>();
-            return c;
-        }
-
-        /// <summary>
-        /// If the named element exists as a child, return it.  Otherwise, gin up
-        /// a new instance of the given class (which must be a subclass of XmlElement)
-        /// add it as a child, and return the result.  Will often be paired with
-        /// ReplaceChild as the setter.
-        /// </summary>
-        /// <remarks>
-        /// This seems kind of around-the-barn.  Wish there was an easier way to do this,
-        /// rather than having to get the constructor, and whatnot.  Hopefully it won't
-        /// be called all that often, so the speed issue won't be too bad.
-        /// </remarks>
-        /// <param name="name"></param>
-        /// <param name="xmlns">Namespace URI.  Null to use parent's.</param>
-        /// <param name="typeToCreate">If the element doesn't exist, create it with this type.  If null, then just use an XmlElement.</param>
-        /// <returns></returns>
-        protected XmlElement GetOrCreateElement(string name, string xmlns, Type typeToCreate)
-        {
-            string ns = (xmlns!=null) ? xmlns : NamespaceURI;
-            XmlElement child = this[name, ns];
-            if (child != null)
-                return child;
-
-            if (typeToCreate == null)
-                child = this.OwnerDocument.CreateElement(name, ns);
-            else
-            {
-                Debug.Assert(typeToCreate.IsSubclassOf(typeof(XmlElement)));
-
-                ConstructorInfo constructor = typeToCreate.GetConstructor(new Type[] { typeof(XmlDocument) });
-                Debug.Assert(constructor != null);
-                child = constructor.Invoke(new object[] { this.OwnerDocument }) as XmlElement;
-                Debug.Assert(child != null);
-            }
-
-            this.AppendChild(child);
-            return child;
-        }
-
-        /// <summary>
-        /// Replaces the first element that has the specified type.
-        /// </summary>
-        /// <typeparam name="T">The type of sub-element to find</typeparam>
-        /// <param name="elem">The element to replace; if this is null, the old element is just deleted</param>
-        /// <returns>The replaced element</returns>
-        protected T ReplaceChild<T>(T elem)
-            where T : Element
-        {
-            T old = GetChildElement<T>();
-            if (old != null)
-                this.RemoveChild(old);
-            if (elem != null)
-                AddChild(elem);
-            return old;
-        }
-
-        /// <summary>
-        /// Replaces the first element that has the same name
-        /// with the passed in element.
-        /// </summary>
-        /// <param name="elem">The new element</param>
-        /// <returns>The replaced element</returns>
-        protected XmlElement ReplaceChild(XmlElement elem)
-        {
-            XmlElement old = this[elem.Name, elem.NamespaceURI];
-            if (old != null)
-            {
-                this.RemoveChild(old);
-            }
-            if (elem != null)
-                AddChild(elem);
-            return old;
-        }
-
-        /// <summary>
-        /// Remove a child element of the specified type
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <returns></returns>
-        protected T RemoveElem<T>()
-            where T : Element
-        {
-            T e = GetChildElement<T>();
-            if (e != null)
-                this.RemoveChild(e);
-            return e;
-        }
-
-        /// <summary>
-        /// Remove a child element
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns>The old element, or null if it didn't exist.</returns>
-        protected XmlElement RemoveElem(string name)
-        {
-            XmlElement e = this[name];
-            if (e != null)
-                this.RemoveChild(e);
-            return e;
-        }
-
-        /// <summary>
-        /// Remove each of the child elements with the specified type.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        protected void RemoveElems<T>()
-            where T : Element
-        {
-            foreach (T child in GetElements<T>())
-                this.RemoveChild(child);
-        }
-
-        /// <summary>
-        /// Removes all of the matching elements from this element.
-        /// </summary>
-        /// <param name="name">Element local name</param>
-        protected void RemoveElems(string name)
-        {
-            XmlNodeList nl = this.ChildNodes;
-            foreach (XmlNode n in nl)
-            {
-                if (n.NodeType != XmlNodeType.Element)
-                    continue;
-                if (n.Name == name)
-                    this.RemoveChild(n);
-            }
-        }
-        /// <summary>
-        /// Removes all of the matching elements from this element.
-        /// </summary>
-        /// <param name="name">Element local name</param>
-        /// <param name="namespaceURI">Element namespace URI.</param>
-        protected void RemoveElems(string name, string namespaceURI)
-        {
-            XmlNodeList nl = this.ChildNodes;
-            foreach (XmlNode n in nl)
-            {
-                if (n.NodeType != XmlNodeType.Element)
-                    continue;
-                if ((n.Name == name) && (n.NamespaceURI == namespaceURI))
-                    this.RemoveChild(n);
-            }
-        }
-
-        /// <summary>
-        /// I think GetAttribute should return null if the attribute is not found.
-        /// Use carefully, when translating to external semantics.
-        /// </summary>
-        /// <param name="name"></param>
-        protected string GetAttr(string name)
-        {
-            if (!HasAttribute(name))
-                return null;
-            return GetAttribute(name);
-        }
-
-        /// <summary>
-        /// I think calling SetAttr with null or "" should remove the attribute.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="value"></param>
-        protected void SetAttr(string name, string value)
-        {
-            if ((value == null) || (value == ""))
-                // testing shows this is safe for non-existing attributes.
-                RemoveAttribute(name);
-            else
-                SetAttribute(name, value);
-        }
-
-        /// <summary>
-        /// Get the value of an attribute, as a value in the given Enum type.
-        /// The specified enum should have a member with value -1, which will
-        /// be returned if the attribute doesn't exist or is in the wrong format.
-        /// </summary>
-        /// <typeparam name="T">The enum type</typeparam>
-        /// <param name="name">The attribute name</param>
-        /// <returns>The enum value</returns>
-        protected T GetEnumAttr<T>(string name)
-        {
-            string a = this.GetAttribute(name);
-            return EnumParser.Parse<T>(a);
-        }
-
-        /// <summary>
-        /// Get the value of an attribute, as a value in the given Enum type.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="enumType"></param>
-        /// <returns></returns>
-        protected object GetEnumAttr(string name, Type enumType)
-        {
-            string a = this.GetAttribute(name);
-            return EnumParser.Parse(a, enumType);
-        }
-
-        /// <summary>
-        /// Set the value of an attribute, with the value being a enum instance.
-        /// The enum in question should have an entry with int value -1, which
-        /// corresponds to no attribute.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="value"></param>
-        protected void SetEnumAttr(string name, object value)
-        {
-            if ((value == null) || ((int)value == -1))
-            {
-                RemoveAttribute(name);
-                return;
-            }
-            SetAttribute(name, EnumParser.ToString(value));
-        }
-
-        /// <summary>
-        /// Get the value of a given attribute, as an integer.  Returns -1 for
-        /// most errors.   TODO: should this throw exceptions?
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns></returns>
-        protected int GetIntAttr(string name)
-        {
-            string a = this.GetAttribute(name);
-            if ((a == null) || (a.Length == 0))
-                return -1;
-            try
-            {
-                return int.Parse(a);
-            }
-            catch (FormatException)
-            {
-                return -1;
-            }
-            catch (OverflowException)
-            {
-                return -1;
-            }
-        }
-        /// <summary>
-        /// Set the value of a given attribute, as an integer.  Use -1
-        /// to remove the attribute.
-        /// </summary>
-        /// <param name="name">The attribute name</param>
-        /// <param name="val">The integer to set</param>
-        /// <returns></returns>
-        protected void SetIntAttr(string name, int val)
-        {
-            if (val < 0)
-                // testing shows this is safe for non-existing attributes.
-                RemoveAttribute(name);
-            else
-                SetAttribute(name, val.ToString());
-        }
-
-        /// <summary>
-        /// Get the value of a given attribute, as an unsigned long.  Returns -1L for
-        /// most errors.   TODO: should this throw exceptions?
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns></returns>
-        protected long GetLongAttr(string name)
-        {
-            string a = this.GetAttribute(name);
-            if ((a == null) || (a.Length == 0))
-                return -1L;
-            try
-            {
-                return long.Parse(a);
-            }
-            catch (FormatException)
-            {
-                return -1L;
-            }
-            catch (OverflowException)
-            {
-                return -1L;
-            }
-        }
-        /// <summary>
-        /// Set the value of a given attribute, as a long  Use -1L
-        /// to remove the attribute.
-        /// </summary>
-        /// <param name="name">The attribute name</param>
-        /// <param name="val">The integer to set</param>
-        /// <returns></returns>
-        protected void SetLongAttr(string name, long val)
-        {
-            if (val == -1L)
-                // testing shows this is safe for non-existing attributes.
-                RemoveAttribute(name);
-            else
-                SetAttribute(name, val.ToString());
-        }
-        
-        /// <summary>
-        /// Get an attribute cast to DateTime, using the DateTime profile
-        /// of XEP-82.
-        /// </summary>
-        /// <param name="name"></param>
-        /// <returns>DateTime.MinValue if attribute not found.</returns>
-        /// <exception cref="FormatException">Invalid format</exception>
-        protected DateTime GetDateTimeAttr(string name)
-        {
-            string val = GetAttr(name);
-            if (val == null)
-                return DateTime.MinValue;
-            return DateTimeProfile(val);
-        }
-
-        /// <summary>
-        /// Set with DateTime.MinValue to remove the attribute
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="value"></param>
-        protected void SetDateTimeAttr(string name, DateTime value)
-        {
-            if (value == DateTime.MinValue)
-                // testing shows this is safe for non-existing attributes.
-                RemoveAttribute(name);
-            else
-                SetAttribute(name, DateTimeProfile(value));
-        }
-
-        /// <summary>
-        /// Convert the given array of bytes into a string, having two characters
-        /// for each byte, corresponding to the hex representation of that byte.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <returns></returns>
-        public static string HexString(byte[] buf)
-        {
-            // it seems like there ought to be a better way to do this.
-            StringBuilder sb = new StringBuilder();
-            foreach (byte b in buf)
-            {
-                sb.Append(b.ToString("x2"));
-            }
-            return sb.ToString();
-        }
-        /// <summary>
-        /// Convert the given array of bytes into a string, having two characters
-        /// for each byte, corresponding to the hex representation of that byte.
-        /// </summary>
-        /// <param name="buf">The byte buffer</param>
-        /// <param name="offset">The offset into the buffer for the start</param>
-        /// <param name="length">The number of bytes to read, starting at the offset.</param>
-        /// <returns></returns>
-        public static string HexString(byte[] buf, int offset, int length)
-        {
-            // it seems like there ought to be a better way to do this.
-            StringBuilder sb = new StringBuilder();
-            for (int i=offset; i < length; i++)
-            {
-                sb.Append(buf[i].ToString("x2"));
-            }
-            return sb.ToString();
-        }
-
-        /// <summary>
-        /// Compute the SHA1 hash of the id and secret concatenated together.
-        /// </summary>
-        /// <param name="id">UTF8-encoded id</param>
-        /// <param name="secret">UTF8-encoded secret</param>
-        /// <returns></returns>
-        public static string ShaHash(string id, string secret)
-        {
-            Debug.Assert(id != null);
-            Debug.Assert(secret != null);
-            SHA1 sha = SHA1.Create();
-            byte[] hash = sha.ComputeHash(ENCODING.GetBytes(id + secret));
-            return HexString(hash);
-        }
-
-        /// <summary>
-        /// Compute a 0K hash
-        /// </summary>
-        /// <param name="password">The secret to hash in</param>
-        /// <param name="token">The token to permute the hash</param>
-        /// <param name="sequence">Number of times to hash</param>
-        /// <returns></returns>
-        public static string ZeroK(string password, string token, int sequence)
-        {
-            Debug.Assert(password != null);
-            Debug.Assert(token != null);
-            SHA1 sha = SHA1.Create();
-            string hash = HexString(sha.ComputeHash(ENCODING.GetBytes(password)));
-            hash = HexString(sha.ComputeHash(ENCODING.GetBytes(hash + token)));
-            for (int i = 0; i < sequence; i++)
-            {
-                hash = HexString(sha.ComputeHash(ENCODING.GetBytes(hash)));
-            }
-            return hash;
-        }
-
-        /// <summary>
-        /// Return a DateTime version of the given Jabber date.  Example date: 20020504T20:39:42
-        /// </summary>
-        /// <param name="dt">The pseudo-ISO-8601 formatted date (no milliseconds)</param>
-        /// <returns>A (usually UTC) DateTime</returns>
-        public static DateTime JabberDate(string dt)
-        {
-            if ((dt == null) || (dt == ""))
-                return DateTime.MinValue;
-            try
-            {
-                return new DateTime(int.Parse(dt.Substring(0, 4)),
-                                    int.Parse(dt.Substring(4, 2)),
-                                    int.Parse(dt.Substring(6, 2)),
-                                    int.Parse(dt.Substring(9,2)),
-                                    int.Parse(dt.Substring(12,2)),
-                                    int.Parse(dt.Substring(15,2)));
-            }
-            catch
-            {
-                return DateTime.MinValue;
-            }
-        }
-        /// <summary>
-        /// Get a jabber-formated date for the DateTime.   Example date: 20020504T20:39:42
-        /// </summary>
-        /// <param name="dt">The (usually UTC) DateTime to format</param>
-        /// <returns>The pseudo-ISO-8601 formatted date (no milliseconds)</returns>
-        public static string JabberDate(DateTime dt)
-        {
-            return string.Format("{0:yyyy}{0:MM}{0:dd}T{0:HH}:{0:mm}:{0:ss}", dt);
-        }
-
-        /// <summary>
-        /// XEP-82 Date/Time profile: http://www.xmpp.org/extensions/xep-0082.html#sect-id2601974
-        /// CCYY-MM-DDThh:mm:ss[.sss]TZD
-        /// 1969-07-21T02:56:15Z
-        /// </summary>
-        /// <param name="dt"></param>
-        /// <returns></returns>
-        public static DateTime DateTimeProfile(string dt)
-        {
-            string[] fmts =
-            {
-                "yyyy-MM-dd",
-                "yyyy-MM-ddTHH:mm:sszzz",
-                "yyyy-MM-ddTHH:mm:ss.fffzzz",
-                "HH:mm:ss",
-                "HH:mm:ss.fff",
-                "HH:mm:sszzz",
-                "HH:mm:ss.fffzzz",
-            };
-            string arg = dt.Replace("Z", "+00:00");
-            return DateTime.ParseExact(arg, fmts, null, System.Globalization.DateTimeStyles.AdjustToUniversal);
-        }
-
-        /// <summary>
-        /// XEP-82 Date/Time profile: http://www.xmpp.org/extensions/xep-0082.html#sect-id2601974
-        /// CCYY-MM-DDThh:mm:ss[.sss]TZD
-        /// 1969-07-21T02:56:15Z
-        /// </summary>
-        /// <param name="dt"></param>
-        /// <returns></returns>
-        public static string DateTimeProfile(DateTime dt)
-        {
-            return dt.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
-        }
-
-        /// <summary>
-        /// The XML for the packet.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return this.OuterXml;
-        }
-
-        /// <summary>
-        /// Return just the start tag for the element.
-        /// </summary>
-        /// <returns></returns>
-        public string StartTag()
-        {
-            StringBuilder sb = new StringBuilder("<");
-            sb.Append(this.Name);
-            if (this.NamespaceURI != null)
-            {
-                sb.Append(" xmlns");
-                if (this.Prefix != null)
-                {
-                    sb.Append(":");
-                    sb.Append(this.Prefix);
-                }
-                sb.Append("=\"");
-                sb.Append(this.NamespaceURI);
-                sb.Append("\"");
-            }
-            foreach (XmlAttribute attr in this.Attributes)
-            {
-                sb.Append(" ");
-                sb.Append(attr.Name);
-                sb.Append("=\"");
-                sb.Append(attr.Value);
-                sb.Append("\"");
-            }
-            sb.Append(">");
-            return sb.ToString();
-        }
-
-        /// <summary>
-        /// Get the first child element of this element.
-        /// </summary>
-        /// <returns>null if none found.</returns>
-        public XmlElement GetFirstChildElement()
-        {
-            foreach (XmlNode n in this)
-            {
-                if (n.NodeType == XmlNodeType.Element)
-                    return (XmlElement) n;
-            }
-            return null;
-        }
-
-        private static readonly Type[] s_constructor_parms =
-            new Type[]
-            {
-                typeof(string),
-                typeof(XmlQualifiedName),
-                typeof(XmlDocument)
-            };
-
-        /// <summary>
-        /// Clone this node, preserving type information.
-        /// </summary>
-        /// <param name="deep">Clone child nodes too?</param>
-        /// <returns>Cloned node, with type info intact</returns>
-        public override XmlNode CloneNode(bool deep)
-        {
-            return CloneNode(deep, this.OwnerDocument);
-        }
-
-        /// <summary>
-        /// Clone this node into the target document, preserving type information.
-        /// </summary>
-        /// <param name="deep"></param>
-        /// <param name="doc"></param>
-        /// <returns></returns>
-        public XmlNode CloneNode(bool deep, XmlDocument doc)
-        {
-            ConstructorInfo ci = this.GetType().GetConstructor(s_constructor_parms);
-            if (ci == null)
-                return doc.ImportNode(this, deep);
-            if (ci.DeclaringType != this.GetType())
-            {
-                Debug.WriteLine("Bad type: " + ci.DeclaringType.ToString());
-            }
-            XmlElement el = (Element)ci.Invoke(new object[] { this.Prefix, new XmlQualifiedName(this.LocalName, this.NamespaceURI), doc });
-            if (el.GetType() != this.GetType())
-            {
-                Debug.Assert(el.GetType() == this.GetType());
-            }
-
-            if (el.IsEmpty != this.IsEmpty)
-                el.IsEmpty = this.IsEmpty;
-
-
-            if (this.HasAttributes)
-            {
-                foreach (XmlAttribute attr in this.Attributes)
-                    el.Attributes.Append((XmlAttribute)doc.ImportNode(attr, true));
-            }
-
-            if (deep)
-            {
-                foreach (XmlNode n in this.ChildNodes)
-                {
-                    if (n is Element)
-                    {
-                        el.AppendChild(((Element)n).CloneNode(deep, doc));
-                    }
-                    else
-                    {
-                        el.AppendChild(doc.ImportNode(n, deep));
-                    }
-                }
-            }
-            return el;
-        }
-
-        /// <summary>
-        /// Convert the given source element to typed subclasses of Element, according
-        /// to the given ElementFactory.
-        /// </summary>
-        /// <param name="source"></param>
-        /// <param name="factory"></param>
-        /// <returns></returns>
-        public static Element AddTypes(XmlElement source, ElementFactory factory)
-        {
-            if (source is Element)
-                return (Element)source; // assume all kids are converted already.
-
-            XmlDocument doc = source.OwnerDocument;
-            XmlQualifiedName qn = new XmlQualifiedName(source.Name, source.NamespaceURI);
-            Element el = factory.GetElement(source.Prefix, qn, doc);
-
-            el.IsEmpty = source.IsEmpty;
-
-            if (source.HasAttributes)
-            {
-                foreach (XmlAttribute attr in source.Attributes)
-                    el.Attributes.Append((XmlAttribute)attr.CloneNode(true));
-            }
-
-            foreach (XmlNode n in source.ChildNodes)
-            {
-                if (n is XmlElement)
-                    el.AppendChild(AddTypes((XmlElement)n, factory));
-                else
-                    el.AppendChild(n.CloneNode(true));
-            }
-
-            return el;
-        }
-
-        /// <summary>
-        /// System-wide one-up counter, for numbering packets.
-        /// </summary>
-        static int s_counter = 0;
-        /// <summary>
-        /// Reset the packet ID counter.  This is ONLY to be used for test cases!   No locking!
-        /// </summary>
-        [Conditional("DEBUG")]
-        public static void ResetID()
-        {
-            s_counter = 0;
-        }
-
-        /// <summary>
-        /// Increment the ID counter, and get the new value.
-        /// </summary>
-        /// <returns>The new ID.</returns>
-        public static string NextID()
-        {
-            System.Threading.Interlocked.Increment(ref s_counter);
-            return "JN_" + s_counter.ToString();
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/ElementFactory.cs b/lib/jabber-net/jabber/protocol/ElementFactory.cs
deleted file mode 100644
index e4879d6..0000000
--- a/lib/jabber-net/jabber/protocol/ElementFactory.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-using System.Reflection;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Qname to type mapping.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class QnameType
-    {
-        /// <summary>
-        /// Element name
-        /// </summary>
-        protected internal string Name;
-        /// <summary>
-        /// Element namespace URI
-        /// </summary>
-        protected internal string NS;
-        /// <summary>
-        /// Type to create for NS/Name pair
-        /// </summary>
-        protected internal Type  ElementType;
-
-        /// <summary>
-        /// Create a QnameType
-        /// </summary>
-        /// <param name="name"></param>
-        /// <param name="ns"></param>
-        /// <param name="typ"></param>
-        public QnameType(string name, string ns, Type typ)
-        {
-            this.Name  = name;
-            this.NS    = ns;
-            this.ElementType = typ;
-        }
-
-        /// <summary>
-        /// Is this the same qname by element name and namespace?
-        /// </summary>
-        /// <param name="obj"></param>
-        /// <returns></returns>
-        public override bool Equals(object obj)
-        {
-            if (obj == (object)this)
-                return true;
-            QnameType other = obj as QnameType;
-            if (other == null)
-                return false;
-            return (other.Name == Name) && (other.NS == NS);
-        }
-
-        /// <summary>
-        /// Get a hash over the name and namespace.
-        /// </summary>
-        /// <returns></returns>
-        public override int GetHashCode()
-        {
-            return ToString().GetHashCode();
-        }
-
-        /// <summary>
-        /// Namespace|Name
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return NS + "|" + Name;
-        }
-    }
-
-    /// <summary>
-    /// Interface for packet factories to implement.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public interface IPacketTypes
-    {
-        /// <summary>
-        /// QName to type mappings.
-        /// </summary>
-        QnameType[] Types { get; }
-    }
-
-    /// <summary>
-    /// A ElementFactory is a class that knows how to create packet instances of
-    /// a wide variety of different types.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ElementFactory
-    {
-        private Hashtable m_types = new Hashtable();
-        private static readonly Type[] s_constructorTypes =
-            new Type[] { typeof(string),
-                           typeof(XmlQualifiedName),
-                           typeof(XmlDocument) };
-        /// <summary>
-        /// Add a type to the packet factory.
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="ns"></param>
-        /// <param name="t"></param>
-        public void AddType(string localName, string ns, Type t)
-        {
-            Debug.Assert(t.IsSubclassOf(typeof(Element)));
-            ConstructorInfo ci = t.GetConstructor(s_constructorTypes);
-            Debug.Assert(ci != null);
-            AddType(new XmlQualifiedName(localName, ns), ci);
-        }
-        /// <summary>
-        /// Add a type to the packet factory.
-        /// </summary>
-        /// <param name="qname"></param>
-        /// <param name="t"></param>
-        public void AddType(XmlQualifiedName qname, Type t)
-        {
-            Debug.Assert(t.IsSubclassOf(typeof(Element)));
-            ConstructorInfo ci = t.GetConstructor(s_constructorTypes);
-            Debug.Assert(ci != null);
-            AddType(qname, ci);
-        }
-        /// <summary>
-        /// Add a type to the packet factory.
-        /// </summary>
-        /// <param name="qname"></param>
-        /// <param name="ci"></param>
-        public void AddType(XmlQualifiedName qname, ConstructorInfo ci)
-        {
-            Debug.Assert(ci != null);
-            if (m_types.Contains(qname))
-                Debug.WriteLine("Warning: overriding existing packet factory: " + qname.ToString());
-            m_types[qname] = ci;
-        }
-        /// <summary>
-        /// Add a type to the packet factory.
-        /// </summary>
-        /// <param name="list"></param>
-        public void AddType(IPacketTypes list)
-        {
-            foreach (QnameType qn in list.Types)
-            {
-                this.AddType(qn.Name, qn.NS, qn.ElementType);
-            }
-        }
-        /*
-        public void AddType(ElementFactory pf)
-        {
-            foreach (DictionaryEntry ent in (IDictionary)pf.m_types)
-            {
-                m_types.Add(ent.Key, ent.Value);
-            }
-        }
-*/
-        /// <summary>
-        /// Create an element of the appropriate type, based on the qname of the packet.
-        /// </summary>
-        /// <param name="prefix">The namespace prefix for the element</param>
-        /// <param name="qname">The namespaceURI/element name pair</param>
-        /// <param name="doc">The document to create the element in.</param>
-        /// <returns></returns>
-        public Element GetElement(string prefix, XmlQualifiedName qname, XmlDocument doc)
-        {
-            ConstructorInfo ci = (ConstructorInfo) m_types[qname];
-            if (ci == null)
-            {
-                return new Element(prefix, qname, doc);
-            }
-            return (Element) ci.Invoke
-                (new object[] {prefix, qname, doc});
-        }
-
-        /// <summary>
-        /// Get a constructor for the appropriate type for the given qname.
-        /// </summary>
-        public ConstructorInfo this[XmlQualifiedName qname]
-        {
-            get { return (ConstructorInfo) m_types[qname]; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/ElementList.cs b/lib/jabber-net/jabber/protocol/ElementList.cs
deleted file mode 100644
index 05f49ea..0000000
--- a/lib/jabber-net/jabber/protocol/ElementList.cs
+++ /dev/null
@@ -1,332 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Xml;
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Replacement for XmlElementList that removes the safety belt of checking for changes during traversal,
-    /// but removes the big old memory leak in MS's implementation.  Also, only returns first-level children,
-    /// rather than all children below here with the given name.  Thanks, MS.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ElementList : XmlNodeList
-    {
-        private XmlElement m_parent = null;
-        private string m_name = null;
-        private string m_uri = null;
-
-        /// <summary>
-        /// Create an element list that is for all child elements.
-        /// </summary>
-        /// <param name="parent">Parent to search</param>
-        public ElementList(XmlElement parent)
-        {
-            m_parent = parent;
-        }
-
-        /// <summary>
-        /// Create an element list that is for all child elements with the given name;
-        /// </summary>
-        /// <param name="parent"></param>
-        /// <param name="name"></param>
-        public ElementList(XmlElement parent, string name)
-            : this(parent)
-        {
-            m_name = name;
-        }
-
-        /// <summary>
-        /// Create an element list that is for all child elements with the given name and namespace URI.
-        /// </summary>
-        /// <param name="parent"></param>
-        /// <param name="name"></param>
-        /// <param name="namespaceURI"></param>
-        public ElementList(XmlElement parent, string name, string namespaceURI)
-            : this(parent)
-        {
-            m_name = name;
-            m_uri = namespaceURI;
-        }
-
-        /// <summary>
-        /// Get the next node in the enumeration.  Pass in null to start.
-        /// </summary>
-        /// <param name="start">Starting point for search.</param>
-        /// <returns></returns>
-        public XmlNode GetNextNode(XmlNode start)
-        {
-            XmlNode n = (start == null) ? m_parent.FirstChild : start.NextSibling;
-            while ((n != null) && !this.IsMatch(n))
-            {
-                n = n.NextSibling;
-            }
-            return n;
-        }
-
-        private bool IsMatch(XmlNode curNode)
-        {
-            if (curNode.NodeType != XmlNodeType.Element)
-                return false;
-
-            if (m_name == null)
-                return true;
-
-            if (m_uri == null)
-                return (curNode.LocalName == m_name);
-
-            return (curNode.LocalName == m_name) && (curNode.NamespaceURI == m_uri);
-        }
-
-        /// <summary>
-        /// Enumerate over the matching children.
-        /// </summary>
-        /// <returns></returns>
-        public override System.Collections.IEnumerator GetEnumerator()
-        {
-            return new ElementListEnumerator(this);
-        }
-
-        /// <summary>
-        /// Gets the number of matching children.
-        /// </summary>
-        public override int Count
-        {
-            get
-            {
-                int c = 0;
-                XmlNode n = null;
-                while ((n = GetNextNode(n)) != null)
-                {
-                    c++;
-                }
-                return c;
-            }
-        }
-
-        /*
-         * This breaks the Mono build, and shouldn't be necessary, since
-         * the base class implements exactly this.
-        /// <summary>
-        /// Retrieve a given child.
-        /// </summary>
-        public override XmlNode this[int i]
-        {
-            get { return Item(i); }
-        }
-        */
-
-        /// <summary>
-        /// Retrieve a given child.
-        /// </summary>
-        /// <param name="index"></param>
-        /// <returns></returns>
-        public override XmlNode Item(int index)
-        {
-            int c = 0;
-            XmlNode n = m_parent.FirstChild;
-            while (n != null)
-            {
-                if (c == index)
-                    return n;
-                c++;
-                n = GetNextNode(n);
-            }
-            return null;
-        }
-
-        private class ElementListEnumerator : IEnumerator
-        {
-            private ElementList m_list;
-            private XmlNode m_cur = null;
-
-            public ElementListEnumerator(ElementList list)
-            {
-                m_list = list;
-            }
-
-            #region IEnumerator Members
-
-            public void Reset()
-            {
-                m_cur = null;
-            }
-
-            public object Current
-            {
-                get { return m_cur; }
-            }
-
-            public bool MoveNext()
-            {
-                m_cur = m_list.GetNextNode(m_cur);
-                return (m_cur != null);
-            }
-
-            #endregion
-        }
-    }
-
-    /// <summary>
-    /// Parameterized version of ElementList.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class TypedElementList<T> : XmlNodeList, System.Collections.Generic.IEnumerable<T>
-        where T : XmlElement
-    {
-        private XmlElement m_parent = null;
-
-        /// <summary>
-        /// Create an element list that is for all child elements with the specified type
-        /// </summary>
-        /// <param name="parent"></param>
-        public TypedElementList(XmlElement parent)
-        {
-            m_parent = parent;
-        }
-
-        /// <summary>
-        /// Get the next node in the enumeration.  Pass in null to start.
-        /// </summary>
-        /// <param name="start">Starting point for search.</param>
-        /// <returns></returns>
-        public T GetNextNode(T start)
-        {
-            XmlNode n = (start == null) ? m_parent.FirstChild : start.NextSibling;
-            while ((n != null) && !(n is T))
-            {
-                n = n.NextSibling;
-            }
-            return (T)n;
-        }
-
-        /// <summary>
-        /// Enumerate over the matching children.
-        /// </summary>
-        /// <returns></returns>
-        public override System.Collections.IEnumerator GetEnumerator()
-        {
-            return new TypedElementListEnumerator(this);
-        }
-
-        System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator()
-        {
-            return new TypedElementListEnumerator(this);
-        }
-
-        /// <summary>
-        /// Gets the number of matching children.
-        /// </summary>
-        public override int Count
-        {
-            get
-            {
-                int c = 0;
-                T n = null;
-                while ((n = GetNextNode(n)) != null)
-                {
-                    c++;
-                }
-                return c;
-            }
-        }
-
-        /// <summary>
-        /// Retrieve a given child.
-        /// </summary>
-        /// <param name="index"></param>
-        /// <returns></returns>
-        public override XmlNode Item(int index)
-        {
-            int c = 0;
-            T n = null;
-            while ((n = GetNextNode(n)) != null)
-            {
-                if (c == index)
-                    return n;
-                c++;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Create an aray from the list.
-        /// </summary>
-        /// <returns></returns>
-        public T[] ToArray()
-        {
-            T[] array = new T[Count];
-            int i = 0;
-            foreach (T item in this)
-            {
-                //T item = (T)o;
-                array[i++] = item;
-            }
-            return array;
-        }
-
-        private class TypedElementListEnumerator : IEnumerator, System.Collections.Generic.IEnumerator<T>
-        {
-            private TypedElementList<T> m_list;
-            private T m_cur = null;
-
-            public TypedElementListEnumerator(TypedElementList<T> list)
-            {
-                m_list = list;
-            }
-
-            #region IEnumerator Members
-
-            public void Reset()
-            {
-                m_cur = null;
-            }
-
-            public object Current
-            {
-                get { return m_cur; }
-            }
-
-            public bool MoveNext()
-            {
-                m_cur = m_list.GetNextNode(m_cur);
-                return (m_cur != null);
-            }
-
-            #endregion
-
-            #region IEnumerator<T> Members
-
-            T System.Collections.Generic.IEnumerator<T>.Current
-            {
-                get { return m_cur; }
-            }
-
-            #endregion
-
-            #region IDisposable Members
-
-            public void Dispose()
-            {
-                
-            }
-
-            #endregion
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/ElementStream.cs b/lib/jabber-net/jabber/protocol/ElementStream.cs
deleted file mode 100644
index 50741ca..0000000
--- a/lib/jabber-net/jabber/protocol/ElementStream.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-using System.IO;
-using System.Threading;
-using System.Xml;
-
-using bedrock.io;
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// A packet was received.  The specified element will likely be a sub-class
-    /// of XmlElement, if the packet is found in the packet factory.
-    /// </summary>
-    public delegate void ProtocolHandler(Object sender, System.Xml.XmlElement rp);
-
-    /// <summary>
-    /// Async XML parsing, according to jabber protocol rules of "interesting".
-    /// The root node fires IElementStreamListener.OnDocumentStart(), and each
-    /// direct child of the root fires IElementStreamListener.OnTag().
-    ///
-    /// TODO: Combine with AsyncElementStream, since there's only one impl.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ElementStream
-    {
-        /// <summary>
-        /// The document to create elements in
-        /// </summary>
-        protected XmlDocument m_doc;
-
-        /// <summary>
-        /// The element factory.
-        /// </summary>
-        protected ElementFactory m_factory = new ElementFactory();
-
-        /// <summary>
-        /// The document started.  This will have a full element, even
-        /// though only the start tag has been received.
-        /// </summary>
-        public event ProtocolHandler OnDocumentStart;
-
-        /// <summary>
-        /// The document has completed.
-        /// TODO: This isn't fired as often as it needs to be, yet.
-        /// </summary>
-        public event bedrock.ObjectHandler OnDocumentEnd;
-
-        /// <summary>
-        /// A protocol element (child of the doc root) has been received.
-        /// </summary>
-        public event ProtocolHandler OnElement;
-
-        /// <summary>
-        /// An XML parsing error occurred.
-        /// </summary>
-        public event bedrock.ExceptionHandler OnError;
-
-        /// <summary>
-        /// Create a parser that will report events to the listener.
-        /// </summary>
-        protected ElementStream()
-        {
-            m_doc = new XmlDocument();
-            m_factory.AddType(new jabber.protocol.stream.Factory());
-        }
-
-        /// <summary>
-        /// The document being read into.  This document is used for creating nodes,
-        /// but does not actually contain the nodes.
-        /// </summary>
-        public XmlDocument Document
-        {
-            get { return m_doc; }
-        }
-
-        /// <summary>
-        /// Add PacketFactories to get XmlElements with type-safe accessors, for
-        /// all of the namespaces you care about.
-        /// </summary>
-        /// <param name="pf"></param>
-        public void AddFactory(IPacketTypes pf)
-        {
-            m_factory.AddType(pf);
-        }
-
-        /// <summary>
-        /// Add a type to the packet factory.
-        /// </summary>
-        /// <param name="localName">Local Name (e.g. query)</param>
-        /// <param name="ns">Namespace URI (e.g. jabber:iq:roster)</param>
-        /// <param name="t">Type to create</param>
-        public void AddType(string localName, string ns, Type t)
-        {
-            m_factory.AddType(localName, ns, t);
-        }
-
-        /// <summary>
-        /// Fire the OnDocumentStart event
-        /// </summary>
-        /// <param name="stream"></param>
-        protected void FireOnDocumentStart(XmlElement stream)
-        {
-            if (OnDocumentStart != null)
-                OnDocumentStart(this, stream);
-        }
-
-        /// <summary>
-        /// Fire the OnElement event
-        /// </summary>
-        /// <param name="elem"></param>
-        protected void FireOnElement(XmlElement elem)
-        {
-            if (OnElement != null)
-                OnElement(this, elem);
-        }
-
-        /// <summary>
-        /// Fire the OnDocumentEnd event
-        /// </summary>
-        protected void FireOnDocumentEnd()
-        {
-            if (OnDocumentEnd != null)
-                OnDocumentEnd(this);
-        }
-
-        /// <summary>
-        /// Fire the OnError event
-        /// </summary>
-        /// <param name="ex">The exception that was thrown</param>
-        protected void FireOnError(Exception ex)
-        {
-            if (OnError != null)
-                OnError(this, ex);
-        }
-
-        /// <summary>
-        /// Get an element by name using the current factory.
-        /// </summary>
-        /// <param name="name">The element name to use</param>
-        /// <param name="ns">The namespace URI of the element to get</param>
-        /// <returns></returns>
-        public Element GetElement(string name, string ns)
-        {
-            XmlQualifiedName q = new XmlQualifiedName(name, ns);
-            return m_factory.GetElement("", q, m_doc);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/EnumParser.cs b/lib/jabber-net/jabber/protocol/EnumParser.cs
deleted file mode 100644
index ab65ac2..0000000
--- a/lib/jabber-net/jabber/protocol/EnumParser.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Reflection;
-using System.Diagnostics;
-
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// How should the marked-up entity be rendered in XML?  Only used
-    /// for enums that are going to be put in attributes at the moment.
-    /// TODO: support namespaces, use for element definitions.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [AttributeUsage(AttributeTargets.Field)]
-    public class XMLAttribute : Attribute
-    {
-        private string m_name;
-
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="name"></param>
-        public XMLAttribute(string name)
-        {
-            m_name = name;
-        }
-
-        /// <summary>
-        /// The string to use when converting to and from XML.
-        /// </summary>
-        public string Name
-        {
-            get { return m_name; }
-        }
-    }
-
-    /// <summary>
-    /// Parse enums
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EnumParser
-	{
-        private static Dictionary<Type, Dictionary<string, object>> s_vals = 
-            new Dictionary<Type, Dictionary<string, object>>();
-
-        private static Dictionary<Type, Dictionary<object, string>> s_strings =
-            new Dictionary<Type, Dictionary<object, string>>();
-
-        private static bool IsDash(Type t)
-        {
-            object[] da = t.GetCustomAttributes(typeof(DashAttribute), false);
-            return (da.Length > 0);
-        }
-
-        private static Dictionary<string, object> GetValHash(Type t)
-        {
-            Dictionary<string, object> map = null;
-            if (!s_vals.TryGetValue(t, out map))
-            {
-                s_vals[t] = map = new Dictionary<string, object>();
-                bool dash = IsDash(t);
-
-                FieldInfo[] fields = t.GetFields(BindingFlags.Public | BindingFlags.Static);
-                foreach (FieldInfo fi in fields)
-                {
-                    object[] attrs = fi.GetCustomAttributes(typeof(XMLAttribute), false);
-                    object val = fi.GetValue(null);
-                    if (attrs.Length > 0)
-                    {
-                        string name = ((XMLAttribute)attrs[0]).Name;
-                        map[name] = val;
-                    }
-                    if (dash)
-                        map[fi.Name.Replace("_", "-")] = val;
-                    else
-                        map[fi.Name] = val;
-                }
-            }
-            return map;
-        }
-
-        private static Dictionary<object, string> GetStringHash(Type t)
-        {
-            Dictionary<object, string> map = null;
-            string name;
-
-            if (!s_strings.TryGetValue(t, out map))
-            {
-                s_strings[t] = map = new Dictionary<object, string>();
-
-                bool dash = IsDash(t);
-
-                FieldInfo[] fields = t.GetFields(BindingFlags.Public | BindingFlags.Static);
-                foreach (FieldInfo fi in fields)
-                {
-                    object[] attrs = fi.GetCustomAttributes(typeof(XMLAttribute), false);
-                    object val = fi.GetValue(null);
-                    if (attrs.Length > 0)
-                        name = ((XMLAttribute)attrs[0]).Name;
-                    else
-                    {
-                        if (dash)
-                            name = fi.Name.Replace('_', '-');
-                        else
-                            name = fi.Name;
-                    }
-                    map[val] = name;
-                }
-            }
-            return map;
-        }
-
-        /// <summary>
-        /// Parse a string into an enum value for the given type T.  
-        /// Any errors map to -1.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public static T Parse<T>(string value)
-        {
-            if (!typeof(T).IsEnum)
-                throw new ArgumentException("Type must be enum");
-
-            Dictionary<string, object> map = GetValHash(typeof(T));
-            object val = null;
-            if (!map.TryGetValue(value, out val))
-                return (T)(object)(-1);
-            return (T)val;
-        }
-
-        /// <summary>
-        /// Parse a string into an enum value for the given type.  
-        /// Any errors map to -1.
-        /// </summary>
-        /// <param name="value"></param>
-        /// <param name="t"></param>
-        /// <returns></returns>
-        public static object Parse(string value, Type t)
-        {
-            if (!t.IsEnum)
-                throw new ArgumentException("Type must be enum");
-
-            Dictionary<string, object> map = GetValHash(t);
-            object val = null;
-            if (!map.TryGetValue(value, out val))
-                return (object)(-1);
-            return val;
-        }
-
-        /// <summary>
-        /// Convert an enum value into its string representation.
-        /// any -1 value gets mapped to null.
-        /// </summary>
-        /// <param name="value"></param>
-        /// <returns></returns>
-        public static string ToString(object value)
-        {
-            Type t = value.GetType();
-            if (!t.IsEnum)
-                throw new ArgumentException("Type must be enum");
-
-            if ((int)value == -1)
-                return null;
-
-            Dictionary<object, string> map = GetStringHash(t);
-            string val = null;
-            bool found = map.TryGetValue(value, out val);
-            Debug.Assert(found, "Tried to convert an unknown enum value to string");
-            return val;
-        }
-	}
-}
diff --git a/lib/jabber-net/jabber/protocol/NS.cs b/lib/jabber-net/jabber/protocol/NS.cs
deleted file mode 100644
index 6b6f45e..0000000
--- a/lib/jabber-net/jabber/protocol/NS.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Collections;
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Namespace stack.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class NS
-    {
-        private Stack m_stack = new Stack();
-
-        /// <summary>
-        /// Create a new stack, primed with xmlns and xml as prefixes.
-        /// </summary>
-        public NS()
-        {
-            PushScope();
-            AddNamespace("xmlns", URI.XMLNS);
-            AddNamespace("xml", URI.XML);
-        }
-
-        /// <summary>
-        /// Declare a new scope, typically at the start of each element
-        /// </summary>
-        public void PushScope()
-        {
-            m_stack.Push(new Hashtable());
-        }
-
-        /// <summary>
-        /// Pop the current scope off the stack.  Typically at the end of each element.
-        /// </summary>
-        public void PopScope()
-        {
-            m_stack.Pop();
-        }
-
-        /// <summary>
-        /// Add a namespace to the current scope.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="uri"></param>
-        public void AddNamespace(string prefix, string uri)
-        {
-            Hashtable h = (Hashtable)m_stack.Peek();
-            h[prefix] = uri;
-        }
-
-        /// <summary>
-        /// Lookup a prefix to find a namespace.  Searches down the stack, starting at the current scope.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <returns></returns>
-        public string LookupNamespace(string prefix)
-        {
-            foreach (Hashtable ht in m_stack)
-            {
-                if ((ht.Count > 0) && (ht.ContainsKey(prefix)))
-                    return (string)ht[prefix];
-            }
-            return "";
-        }
-
-        /// <summary>
-        /// The current default namespace.
-        /// </summary>
-        public string DefaultNamespace
-        {
-            get { return LookupNamespace(string.Empty); }
-        }
-
-        /// <summary>
-        /// Debug output only.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder();
-
-            foreach (Hashtable ht in m_stack)
-            {
-                sb.Append("---\n");
-                foreach (string k in ht.Keys)
-                {
-                    sb.Append(string.Format("{0}={1}\n", k, ht[k]));
-                }
-            }
-            return sb.ToString();
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/Packet.cs b/lib/jabber-net/jabber/protocol/Packet.cs
deleted file mode 100644
index 60aa6b0..0000000
--- a/lib/jabber-net/jabber/protocol/Packet.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-using System.Text;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Packets that have to/from information.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Packet : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Packet(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="doc"></param>
-        public Packet(string localName, XmlDocument doc) :
-            base(localName, URI.CLIENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// The TO address
-        /// </summary>
-        public JID To
-        {
-            get { return (JID)this.GetAttr("to"); }
-            set { SetAttr("to", value); }
-        }
-
-        /// <summary>
-        ///  The FROM address
-        /// </summary>
-        public JID From
-        {
-            get { return (JID)this.GetAttr("from"); }
-            set { SetAttr("from", value); }
-        }
-
-        /// <summary>
-        /// The packet ID.
-        /// </summary>
-        public string ID
-        {
-            get { return this.GetAttr("id"); }
-            set { this.SetAttr("id", value); }
-        }
-
-        /// <summary>
-        /// Swap the To and the From addresses.
-        /// </summary>
-        public virtual void Swap()
-        {
-            string tmp = this.GetAttribute("to");
-            this.SetAttribute("to", this.GetAttribute("from"));
-            this.SetAttribute("from", tmp);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/SynchElementStream.cs b/lib/jabber-net/jabber/protocol/SynchElementStream.cs
deleted file mode 100644
index 0221b3c..0000000
--- a/lib/jabber-net/jabber/protocol/SynchElementStream.cs
+++ /dev/null
@@ -1,177 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.IO;
-using System.Xml;
-
-using jabber.protocol;
-using bedrock.util;
-
-using Org.System.Xml.Sax;
-using Org.System.Xml.Sax.Helpers;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Summary description for SynchElementStream.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SynchElementStream : ElementStream, IContentHandler, IErrorHandler
-    {
-        private XmlElement m_stanza = null;
-
-        /// <summary>
-        /// Create a parser that reads from the input stream synchronously, in a single thread.
-        /// </summary>
-        /// <param name="input"></param>
-        public SynchElementStream(Stream input) : base(input)
-        {
-        }
-
-        /// <summary>
-        /// Start parsing.  WARNING: this blocks until the stream is disconnected or end stream:stream is received.
-        /// </summary>
-        public void Start()
-        {
-            try
-            {
-                IXmlReader reader = new AElfred.SaxDriver();
-                reader.SetFeature(Constants.NamespacesFeature, true);
-                reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-parameter-entities", false);
-                reader.SetFeature(AElfred.SaxDriver.FEATURE + "external-general-entities", false);
-                reader.ErrorHandler = this;
-                reader.ContentHandler = this;
-                InputSource inSource = new StreamInputSource(m_stream);
-                inSource.Encoding = "UTF-8";
-                reader.Parse(inSource);
-            }
-            catch (Exception e)
-            {
-                FireOnError(e);
-            }
-        }
-
-        private string Prefix(string qName)
-        {
-            string[] parts = qName.Split(new char[] {':'});
-            return (parts.Length == 2) ? parts[0] : "";
-        }
-
-        #region IContentHandler Members
-
-        void IContentHandler.StartDocument()
-        {
-        }
-
-        void IContentHandler.SkippedEntity(string name)
-        {
-        }
-
-        void IContentHandler.StartElement(string uri, string localName, string qName, IAttributes atts)
-        {
-            XmlQualifiedName q  = new XmlQualifiedName(localName, uri);
-
-            XmlElement elem = m_factory.GetElement(Prefix(qName), q, m_doc);
-            for (int i=0; i<atts.Length; i++)
-            {
-                XmlAttribute a = m_doc.CreateAttribute(Prefix(atts.GetQName(i)),
-                    atts.GetLocalName(i),
-                    atts.GetUri(i));
-                a.AppendChild(m_doc.CreateTextNode(atts.GetValue(i)));
-                elem.SetAttributeNode(a);
-            }
-
-            if ((elem.LocalName != "stream") || (elem.NamespaceURI != URI.STREAM))
-            {
-                if (m_stanza != null)
-                    m_stanza.AppendChild(elem);
-                m_stanza = elem;
-            }
-            else
-            {
-                FireOnDocumentStart(elem);
-            }
-        }
-
-        void IContentHandler.EndPrefixMapping(string prefix)
-        {
-            // TODO:  Add SynchElementStream.EndPrefixMapping implementation
-        }
-
-        void IContentHandler.SetDocumentLocator(ILocator locator)
-        {
-            // TODO:  Add SynchElementStream.SetDocumentLocator implementation
-        }
-
-        void IContentHandler.EndElement(string uri, string localName, string qName)
-        {
-            XmlElement last = m_stanza;
-            if (last != null)
-            {
-                m_stanza = (XmlElement) m_stanza.ParentNode;
-                if (m_stanza == null)
-                    FireOnElement(last);
-            }
-        }
-
-        void IContentHandler.EndDocument()
-        {
-            FireOnDocumentEnd();
-        }
-
-        void IContentHandler.Characters(char[] ch, int start, int length)
-        {
-            if (m_stanza != null)
-            {
-                m_stanza.AppendChild(
-                    m_doc.CreateTextNode(new string(ch, start, length)));
-            }
-        }
-
-        void IContentHandler.IgnorableWhitespace(char[] ch, int start, int length)
-        {
-        }
-
-        void IContentHandler.StartPrefixMapping(string prefix, string uri)
-        {
-        }
-
-        void IContentHandler.ProcessingInstruction(string target, string data)
-        {
-        }
-
-        #endregion
-
-        #region IErrorHandler Members
-
-        void IErrorHandler.FatalError(ParseError error)
-        {
-            FireOnError(new SaxParseException(error));
-        }
-
-        void IErrorHandler.Warning(ParseError error)
-        {
-            Debug.WriteLine("XML parse warning: " + error.Message + " at line number: " + error.LineNumber);
-        }
-
-        void IErrorHandler.Error(ParseError error)
-        {
-            FireOnError(new SaxParseException(error));
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/URI.cs b/lib/jabber-net/jabber/protocol/URI.cs
deleted file mode 100644
index b60fbdc..0000000
--- a/lib/jabber-net/jabber/protocol/URI.cs
+++ /dev/null
@@ -1,267 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using bedrock.util;
-
-namespace jabber.protocol
-{
-    /// <summary>
-    /// Namespace constants for http://etherx.jabber.org/streams.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class URI
-    {
-        /// <summary>
-        /// Namespace for the prefix "xmlns".
-        /// </summary>
-        public const string XMLNS = "http://www.w3.org/2000/xmlns/";
-        /// <summary>
-        /// Namespace for the prefix "xml", like xml:lang.
-        /// </summary>
-        public const string XML = "http://www.w3.org/XML/1998/namespace";
-        /// <summary>
-        /// XHTML namespace, for <body> element
-        /// </summary>
-        public const string XHTML  = "http://www.w3.org/1999/xhtml";
-        /// <summary>
-        /// XHTML-IM namespace, for <html> element
-        /// </summary>
-        public const string XHTML_IM = "http://jabber.org/protocol/xhtml-im";
-        /// <summary>
-        /// stream:stream
-        /// </summary>
-        public const string STREAM = "http://etherx.jabber.org/streams";
-        /// <summary>
-        /// Start-TLS feature namespace
-        /// </summary>
-        public const string START_TLS = "urn:ietf:params:xml:ns:xmpp-tls";
-        /// <summary>
-        /// XEP-138 compression feature namespace.  Not the same as for the protocol!
-        /// </summary>
-        public const string COMPRESS_FEATURE = "http://jabber.org/features/compress";
-        /// <summary>
-        /// XEP-138 compression protocol namespace.  Not the same as the feature!
-        /// </summary>
-        public const string COMPRESS = "http://jabber.org/protocol/compress";
-        /// <summary>
-        /// SASL feature namespace
-        /// </summary>
-        public const string SASL = "urn:ietf:params:xml:ns:xmpp-sasl";
-        /// <summary>
-        /// Start a session
-        /// </summary>
-        public const string SESSION = "urn:ietf:params:xml:ns:xmpp-session";
-        /// <summary>
-        /// Bind a resource
-        /// </summary>
-        public const string BIND = "urn:ietf:params:xml:ns:xmpp-bind";
-        /// <summary>
-        /// Stanza errors.  See RFC 3920, section 9.3.
-        /// </summary>
-        public const string STANZA_ERROR = "urn:ietf:params:xml:ns:xmpp-stanzas";
-        /// <summary>
-        /// Stream errors.  See RFC 3920, section 4.7.
-        /// </summary>
-        public const string STREAM_ERROR = "urn:ietf:params:xml:ns:xmpp-streams";
-        /// <summary>
-        /// Jabber client connections
-        /// </summary>
-        public const string CLIENT = "jabber:client";
-        /// <summary>
-        /// Jabber HTTP Binding connections
-        /// </summary>
-        public const string HTTP_BIND = "http://jabber.org/protocol/httpbind";
-        /// <summary>
-        /// Jabber component connections
-        /// </summary>
-        public const string ACCEPT = "jabber:component:accept";
-        /// <summary>
-        /// Jabber component connections, from the router
-        /// </summary>
-        public const string CONNECT = "jabber:component:connect";
-        /// <summary>
-        /// S2S connection
-        /// </summary>
-        public const string SERVER = "jabber:server";
-        /// <summary>
-        /// S2S dialback
-        /// </summary>
-        public const string DIALBACK = "jabber:server:dialback";
-        // IQ
-        /// <summary>
-        /// Authentication
-        /// </summary>
-        public const string AUTH     = "jabber:iq:auth";
-        /// <summary>
-        /// Roster manipulation
-        /// </summary>
-        public const string ROSTER   = "jabber:iq:roster";
-        /// <summary>
-        /// Register users
-        /// </summary>
-        public const string REGISTER = "jabber:iq:register";
-        /// <summary>
-        /// Out-of-band (file transfer)
-        /// </summary>
-        public const string OOB      = "jabber:iq:oob";
-        /// <summary>
-        /// Server agents
-        /// </summary>
-        public const string AGENTS   = "jabber:iq:agents";
-        /// <summary>
-        /// Client or server current time
-        /// </summary>
-        public const string TIME     = "jabber:iq:time";
-        /// <summary>
-        /// Last activity
-        /// </summary>
-        public const string LAST     = "jabber:iq:last";
-        /// <summary>
-        /// Client or server version
-        /// </summary>
-        public const string VERSION  = "jabber:iq:version";
-        /// <summary>
-        /// Jabber Browsing
-        /// </summary>
-        public const string BROWSE   = "jabber:iq:browse";
-        /// <summary>
-        /// Profile information
-        /// </summary>
-        public const string VCARD    = "vcard-temp";
-
-        /// <summary>
-        /// Geographic locaiotn (lat/long).
-        /// See XEP-80 (http://www.xmpp.org/extensions/xep-0080.html)
-        /// </summary>
-        public const string GEOLOC   = "http://jabber.org/protocol/geoloc";
-
-        /// <summary>
-        /// Discover items from an entity.
-        /// </summary>
-        public const string DISCO_ITEMS = "http://jabber.org/protocol/disco#items";
-        /// <summary>
-        /// Discover info about an entity item.
-        /// </summary>
-        public const string DISCO_INFO = "http://jabber.org/protocol/disco#info";
-
-        // X
-        /// <summary>
-        /// Offline message timestamping.
-        /// </summary>
-        public const string XDELAY   = "jabber:x:delay";
-        /// <summary>
-        /// Modern, XEP-0203 delay.
-        /// </summary>
-        public const string DELAY    = "urn:xmpp:delay";
-        /// <summary>
-        /// Out-of-band (file transfer)
-        /// </summary>
-        public const string XOOB     = "jabber:x:oob";
-        /// <summary>
-        /// Send roster entries to another user.
-        /// </summary>
-        public const string XROSTER  = "jabber:x:roster";
-        /// <summary>
-        /// The jabber:x:event namespace qualifies extensions used to request and respond to
-        /// events relating to the delivery, display, and composition of messages.
-        /// </summary>
-        public const string XEVENT = "jabber:x:event";
-        /// <summary>
-        /// jabber:x:data, as described in XEP-0004.
-        /// </summary>
-        public const string XDATA = "jabber:x:data";
-
-        /// <summary>
-        /// jabber:iq:search.
-        /// See XEP-55 (http://www.xmpp.org/extensions/xep-0055.html)
-        /// </summary>
-        public const string SEARCH = "jabber:iq:search";
-
-        /// <summary>
-        /// Multi-user chat.
-        /// See XEP-45 (http://www.xmpp.org/extensions/xep-0045.html)
-        /// </summary>
-        public const string MUC = "http://jabber.org/protocol/muc";
-        /// <summary>
-        /// Multi-user chat user functions.
-        /// See XEP-45 (http://www.xmpp.org/extensions/xep-0045.html)
-        /// </summary>
-        public const string MUC_USER = "http://jabber.org/protocol/muc#user";
-        /// <summary>
-        /// Multi-user chat admin functions.
-        /// See XEP-45 (http://www.xmpp.org/extensions/xep-0045.html)
-        /// </summary>
-        public const string MUC_ADMIN = "http://jabber.org/protocol/muc#admin";
-        /// <summary>
-        /// Multi-user chat owner functions.
-        /// See XEP-45 (http://www.xmpp.org/extensions/xep-0045.html)
-        /// </summary>
-        public const string MUC_OWNER = "http://jabber.org/protocol/muc#owner";
-        /// <summary>
-        /// Multi-user chat; request a unique room name.
-        /// See XEP-45 (http://www.xmpp.org/extensions/xep-0045.html)
-        /// </summary>
-        public const string MUC_UNIQUE = "http://jabber.org/protocol/muc#unique";
-
-        /// <summary>
-        /// Entity Capabilities.
-        /// See XEP-115 (http://www.xmpp.org/extensions/xep-0115.html)
-        /// </summary>
-        public const string CAPS = "http://jabber.org/protocol/caps";
-
-        /// <summary>
-        /// Publish/Subscribe
-        /// See XEP-0060 (http://www.xmpp.org/extensions/xep-0060.html)
-        /// </summary>
-        public const string PUBSUB = "http://jabber.org/protocol/pubsub";
-
-        /// <summary>
-        /// Publish/Subscribe, Owner use cases
-        /// See XEP-0060 (http://www.xmpp.org/extensions/xep-0060.html)
-        /// </summary>
-        public const string PUBSUB_OWNER = "http://jabber.org/protocol/pubsub#owner";
-
-        /// <summary>
-        /// Pub/Sub node configuration.
-        /// See XEP-0060 (http://www.xmpp.org/extensions/xep-0060.html)
-        /// </summary>
-        public const string PUBSUB_NODE_CONFIG = "http://jabber.org/protocol/pubsub#node_config";
-
-        /// <summary>
-        /// Publish/Subscribe Event
-        /// See XEP-0060 (http://www.xmpp.org/extensions/xep-0060.html)
-        /// </summary>
-        public const string PUBSUB_EVENT = "http://jabber.org/protocol/pubsub#event";
-
-        /// <summary>
-        /// Publish/Subscribe Errors
-        /// See XEP-0060 (http://www.xmpp.org/extensions/xep-0060.html)
-        /// </summary>
-        public const string PUBSUB_ERRORS = "http://jabber.org/protocol/pubsub#errors";
-
-        /// <summary>
-        /// Bookmarks.
-        /// See XEP-0048 (http://www.xmpp.org/extensions/xep-0048.html)
-        /// </summary>
-        public const string BOOKMARKS = "storage:bookmarks";
-
-        /// <summary>
-        /// Private storage.
-        /// See XEP-0049 (http://www.xmpp.org/extensions/xep-0049.html)
-        /// </summary>
-        public const string PRIVATE = "jabber:iq:private";
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/accept/Factory.cs b/lib/jabber-net/jabber/protocol/accept/Factory.cs
deleted file mode 100644
index f10a311..0000000
--- a/lib/jabber-net/jabber/protocol/accept/Factory.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.accept
-{
-    /// <summary>
-    /// A packet factory for the jabber:component:accept namespace.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Factory : IPacketTypes
-    {
-        private static QnameType[] s_qnt = new QnameType[]
-        {
-            new QnameType("handshake", URI.ACCEPT, typeof(Handshake)),
-            new QnameType("route",     URI.ACCEPT, typeof(Route)),
-            new QnameType("xdb",       URI.ACCEPT, typeof(Xdb)),
-            new QnameType("log",       URI.ACCEPT, typeof(Log)),
-            new QnameType("handshake", URI.CONNECT, typeof(Handshake)),
-            new QnameType("route",     URI.CONNECT, typeof(Route)),
-            new QnameType("xdb",       URI.CONNECT, typeof(Xdb)),
-            new QnameType("log",       URI.CONNECT, typeof(Log))
-        };
-        QnameType[] IPacketTypes.Types { get { return s_qnt; } }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/accept/Handshake.cs b/lib/jabber-net/jabber/protocol/accept/Handshake.cs
deleted file mode 100644
index ce20595..0000000
--- a/lib/jabber-net/jabber/protocol/accept/Handshake.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.accept
-{
-    /// <summary>
-    /// The handshake tag, including digest calculation.  Call SetAuth() to calculate
-    /// the SHA1 hash.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Handshake : jabber.protocol.Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Handshake(XmlDocument doc) : base("handshake", doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Handshake(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Set the auth information for this handshake tag,
-        /// performing the digest operation.
-        /// </summary>
-        /// <param name="secret"></param>
-        /// <param name="streamID"></param>
-        public void SetAuth(string secret, string streamID)
-        {
-            this.Digest = ShaHash(streamID, secret);
-        }
-
-        /// <summary>
-        /// The digest.
-        /// </summary>
-        public string Digest
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/accept/Log.cs b/lib/jabber-net/jabber/protocol/accept/Log.cs
deleted file mode 100644
index 0cd0039..0000000
--- a/lib/jabber-net/jabber/protocol/accept/Log.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.accept
-{
-    /// <summary>
-    /// The type field in a log tag.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum LogType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// type='warn'
-        /// </summary>
-        warn,
-        /// <summary>
-        /// type='info'
-        /// </summary>
-        info,
-        /// <summary>
-        /// type='verbose'
-        /// </summary>
-        verbose,
-        /// <summary>
-        /// type='debug'
-        /// </summary>
-        debug
-    }
-
-    /// <summary>
-    /// The log packet.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Log : jabber.protocol.Packet
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Log(XmlDocument doc) : base("log", doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Log(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The element inside the route tag.
-        /// </summary>
-        public XmlElement Element
-        {
-            get { return this["element"]; }
-            set { AddChild(value); }
-        }
-
-        /// <summary>
-        /// The type attribute
-        /// </summary>
-        public LogType Type
-        {
-            get { return GetEnumAttr<LogType>("type"); }
-            set { SetEnumAttr("type", value); }
-        }
-
-        /// <summary>
-        /// The namespace for logging
-        /// </summary>
-        public string NS
-        {
-            get { return GetAttribute("ns"); }
-            set { SetAttribute("ns", value); }
-        }
-
-        /// <summary>
-        /// The server thread this came from
-        /// </summary>
-        public string Thread
-        {
-            get { return GetAttribute("thread"); }
-            set { SetAttribute("thread", value); }
-        }
-
-        /// <summary>
-        /// Time sent.
-        /// </summary>
-        public DateTime Timestamp
-        {
-            get { return JabberDate(GetAttribute("timestamp")); }
-            set { SetAttribute("timestamp", JabberDate(value)); }
-        }
-
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/accept/Route.cs b/lib/jabber-net/jabber/protocol/accept/Route.cs
deleted file mode 100644
index 3dc9180..0000000
--- a/lib/jabber-net/jabber/protocol/accept/Route.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.accept
-{
-    /// <summary>
-    /// The type field in a route tag.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum RouteType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// type='error'
-        /// </summary>
-        error,
-        /// <summary>
-        /// type='auth'
-        /// </summary>
-        auth,
-        /// <summary>
-        /// type='session'
-        /// </summary>
-        session
-    }
-
-    /// <summary>
-    /// The route packet.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Route : jabber.protocol.Packet
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Route(XmlDocument doc) : base("route", doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Route(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The element inside the route tag.
-        /// </summary>
-        public XmlElement Contents
-        {
-            get { return (XmlElement) this.FirstChild; }
-            set
-            {
-                this.InnerXml = "";
-                AddChild(value);
-            }
-        }
-
-        /// <summary>
-        /// The type attribute
-        /// </summary>
-        public RouteType Type
-        {
-            get { return GetEnumAttr<RouteType>("type"); }
-            set { SetEnumAttr("type", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/accept/Xdb.cs b/lib/jabber-net/jabber/protocol/accept/Xdb.cs
deleted file mode 100644
index d86eb5f..0000000
--- a/lib/jabber-net/jabber/protocol/accept/Xdb.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.accept
-{
-    /// <summary>
-    /// The type attribute
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum XdbType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// type='get'
-        /// </summary>
-        get,
-        /// <summary>
-        /// type='set'
-        /// </summary>
-        set,
-        /// <summary>
-        /// type='result'
-        /// </summary>
-        result,
-        /// <summary>
-        /// type='error'
-        /// </summary>
-        error
-    }
-
-    /// <summary>
-    /// The action attribute.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum XdbAction
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// action='check'
-        /// </summary>
-        check,
-        /// <summary>
-        /// action='insert'
-        /// </summary>
-        insert
-    }
-
-    /// <summary>
-    /// The XDB packet.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Xdb : jabber.protocol.Packet
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Xdb(XmlDocument doc) : base("xdb", doc)
-        {
-            ID = NextID();
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Xdb(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The contents of the XDB packet
-        /// </summary>
-        public XmlElement Contents
-        {
-            get { return (XmlElement) this.FirstChild; }
-            set
-            {
-                this.InnerXml = "";
-                AddChild(value);
-            }
-        }
-
-        /// <summary>
-        /// The type attribute
-        /// </summary>
-        public XdbType Type
-        {
-            get { return GetEnumAttr<XdbType>("type"); }
-            set { SetEnumAttr("type", value); }
-        }
-
-        /// <summary>
-        /// The action attribute
-        /// </summary>
-        public XdbAction Action
-        {
-            get { return GetEnumAttr<XdbAction>("action"); }
-            set { SetEnumAttr("action", value); }
-        }
-
-        /// <summary>
-        /// The namespace to store/retrive from.
-        /// </summary>
-        public string NS
-        {
-            get { return GetAttribute("ns"); }
-            set { SetAttribute("ns", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/client/Error.cs b/lib/jabber-net/jabber/protocol/client/Error.cs
deleted file mode 100644
index 6da56c8..0000000
--- a/lib/jabber-net/jabber/protocol/client/Error.cs
+++ /dev/null
@@ -1,428 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.client
-{
-    /*
-    /// <summary>
-    /// Error codes for IQ and message
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum ErrorCode
-    {
-        /// <summary>
-        ///  None specified.
-        /// </summary>
-        none = -1,
-        /// <summary>
-        /// Gone (302)
-        /// </summary>
-        GONE = 302,
-        /// <summary>
-        /// Bad request (400)
-        /// </summary>
-        BAD_REQUEST             = 400,
-        /// <summary>
-        /// Unauthorized (401)
-        /// </summary>
-        UNAUTHORIZED            = 401,
-        /// <summary>
-        /// Payment required (402)
-        /// </summary>
-        PAYMENT_REQUIRED        = 402,
-        /// <summary>
-        /// Forbidden (403)
-        /// </summary>
-        FORBIDDEN               = 403,
-        /// <summary>
-        /// Not found (404)
-        /// </summary>
-        NOT_FOUND               = 404,
-        /// <summary>
-        /// Not allowed (405)
-        /// </summary>
-        NOT_ALLOWED             = 405,
-        /// <summary>
-        /// Not acceptable (406)
-        /// </summary>
-        NOT_ACCEPTABLE          = 406,
-        /// <summary>
-        /// Registration required (407)
-        /// </summary>
-        REGISTRATION_REQUIRED   = 407,
-        /// <summary>
-        /// Request timeout (408)
-        /// </summary>
-        REQUEST_TIMEOUT         = 408,
-        /// <summary>
-        /// Conflict (409)
-        /// </summary>
-        CONFLICT                = 409,
-        /// <summary>
-        /// Internal server error (500)
-        /// </summary>
-        INTERNAL_SERVER_ERROR   = 500,
-        /// <summary>
-        /// Not implemented (501)
-        /// </summary>
-        NOT_IMPLEMENTED         = 501,
-        /// <summary>
-        /// Remote server error (502)
-        /// </summary>
-        REMOTE_SERVER_ERROR     = 502,
-        /// <summary>
-        /// Service unavailable (503)
-        /// </summary>
-        SERVICE_UNAVAILABLE     = 503,
-        /// <summary>
-        /// Remote server timeout (504)
-        /// </summary>
-        REMOTE_SERVER_TIMEOUT   = 504,
-        /// <summary>
-        /// Disconnected (510)
-        /// </summary>
-        DISCONNECTED            = 510
-    }
-     */
-
-    /// <summary>
-    /// See RFC 3920, section 9.3.2.  These are the possible error types.
-    /// </summary>
-    public enum ErrorType
-    {
-        /// <summary>
-        /// None specified (protocol error)
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// do not retry (the error is unrecoverable)
-        /// </summary>
-        cancel,
-        /// <summary>
-        /// proceed (the condition was only a warning)
-        /// </summary>
-        @continue,
-        /// <summary>
-        /// retry after changing the data sent
-        /// </summary>
-        modify,
-        /// <summary>
-        /// retry after providing credentials
-        /// </summary>
-        auth,
-        /// <summary>
-        /// retry after waiting (the error is temporary)
-        /// </summary>
-        wait
-    }
-
-
-    /// <summary>
-    /// Error IQ
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IQError : IQ
-    {
-        /// <summary>
-        /// Create an error IQ with the given code and message.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="condition"></param>
-        public IQError(XmlDocument doc, string condition) : base(doc)
-        {
-            this.Type = IQType.error;
-            Error e = Error.GetStanzaError(doc, condition);
-            this.AppendChild(e);
-        }
-    }
-
-    /// <summary>
-    /// Error in a message or IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Error : Element
-    {
-        /// <summary>
-        /// modify      400
-        /// </summary>
-        public const string BAD_REQUEST = "bad-request";
-        /// <summary>
-        /// cancel      409
-        /// </summary>
-        public const string CONFLICT = "conflict";
-        /// <summary>
-        /// cancel  501
-        /// </summary>
-        public const string FEATURE_NOT_IMPLEMENTED = "feature-not-implemented";
-        /// <summary>
-        /// auth    403
-        /// </summary>
-        public const string FORBIDDEN = "forbidden";
-        /// <summary>
-        ///     modify  302 (permanent)
-        /// </summary>
-        public const string GONE = "gone";
-        /// <summary>
-        ///     wait    500
-        /// </summary>
-        public const string INTERNAL_SERVER_ERROR = "internal-server-error";
-        /// <summary>
-        ///     cancel  404
-        /// </summary>
-        public const string ITEM_NOT_FOUND = "item-not-found";
-        /// <summary>
-        ///     modify  400
-        /// </summary>
-        public const string JID_MALFORMED = "jid-malformed";
-        /// <summary>
-        ///     modify  406
-        /// </summary>
-        public const string NOT_ACCEPTABLE = "not-acceptable";
-        /// <summary>
-        ///     cancel  405
-        /// </summary>
-        public const string NOT_ALLOWED = "not-allowed";
-        /// <summary>
-        ///     auth    401
-        /// </summary>
-        public const string NOT_AUTHORIZED = "not-authorized";
-        /// <summary>
-        ///     auth    402
-        /// </summary>
-        public const string PAYMENT_REQUIRED = "payment-required";
-        /// <summary>
-        ///     wait    404
-        /// </summary>
-        public const string RECIPIENT_UNAVAILABLE = "recipient-unavailable";
-        /// <summary>
-        ///     modify  302 (temporary)
-        /// </summary>
-        public const string REDIRECT = "redirect";
-        /// <summary>
-        ///     auth    407
-        /// </summary>
-        public const string REGISTRATION_REQUIRED = "registration-required";
-        /// <summary>
-        ///     cancel  404
-        /// </summary>
-        public const string REMOTE_SERVER_NOT_FOUND = "remote-server-not-found";
-        /// <summary>
-        ///     wait    504
-        /// </summary>
-        public const string REMOTE_SERVER_TIMEOUT = "remote-server-timeout";
-        /// <summary>
-        ///     wait    500
-        /// </summary>
-        public const string RESOURCE_CONSTRAINT = "resource-constraint";
-        /// <summary>
-        ///     cancel  503
-        /// </summary>
-        public const string SERVICE_UNAVAILABLE = "service-unavailable";
-        /// <summary>
-        ///     auth    407
-        /// </summary>
-        public const string SUBSCRIPTION_REQUIRED = "subscription-required";
-        /// <summary>
-        ///     [any]   500
-        /// </summary>
-        public const string UNDEFINED_CONDITION = "undefined-condition";
-        /// <summary>
-        ///     wait    400
-        /// </summary>
-        public const string UNEXPECTED_REQUEST = "unexpected-request";
-
-        private static System.Collections.Hashtable s_errors = new System.Collections.Hashtable();
-        private struct CodeType
-        {
-            public int Code;
-            public ErrorType Type;
-            public CodeType(int code, ErrorType type)
-            {
-                Code = code;
-                Type = type;
-            }
-        }
-
-        static Error()
-        {
-            // See XEP-86.  (http://www.xmpp.org/extensions/xep-0086.html)
-            s_errors.Add(BAD_REQUEST, new CodeType(400, ErrorType.modify));
-            s_errors.Add(CONFLICT, new CodeType(409, ErrorType.cancel));
-            s_errors.Add(FEATURE_NOT_IMPLEMENTED, new CodeType(501, ErrorType.cancel));
-            s_errors.Add(FORBIDDEN, new CodeType(403, ErrorType.auth));
-            s_errors.Add(GONE, new CodeType(302, ErrorType.modify));
-            s_errors.Add(INTERNAL_SERVER_ERROR, new CodeType(500, ErrorType.wait));
-            s_errors.Add(ITEM_NOT_FOUND, new CodeType(404, ErrorType.cancel));
-            s_errors.Add(JID_MALFORMED, new CodeType(400, ErrorType.modify));
-            s_errors.Add(NOT_ACCEPTABLE, new CodeType(406, ErrorType.modify));
-            s_errors.Add(NOT_ALLOWED, new CodeType(405, ErrorType.cancel));
-            s_errors.Add(NOT_AUTHORIZED, new CodeType(401, ErrorType.auth));
-            s_errors.Add(PAYMENT_REQUIRED, new CodeType(402, ErrorType.auth));
-            s_errors.Add(RECIPIENT_UNAVAILABLE, new CodeType(404, ErrorType.wait));
-            s_errors.Add(REDIRECT, new CodeType(302, ErrorType.modify));
-            s_errors.Add(REGISTRATION_REQUIRED, new CodeType(407, ErrorType.auth));
-            s_errors.Add(REMOTE_SERVER_NOT_FOUND, new CodeType(404, ErrorType.cancel));
-            s_errors.Add(REMOTE_SERVER_TIMEOUT, new CodeType(504, ErrorType.wait));
-            s_errors.Add(RESOURCE_CONSTRAINT, new CodeType(500, ErrorType.wait));
-            s_errors.Add(SERVICE_UNAVAILABLE, new CodeType(503, ErrorType.cancel));
-            s_errors.Add(SUBSCRIPTION_REQUIRED, new CodeType(407, ErrorType.auth));
-            s_errors.Add(UNDEFINED_CONDITION, new CodeType(500, ErrorType.NONE));
-            s_errors.Add(UNEXPECTED_REQUEST, new CodeType(400, ErrorType.wait));
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Error(XmlDocument doc) : base("error", doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Error(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create an error element with the element name of the error condition.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public static Error GetStanzaError(XmlDocument doc, string condition)
-        {
-            if (!s_errors.Contains(condition))
-                throw new ArgumentException("Unknown condition: " + condition, "condition");
-
-            CodeType ct = (CodeType) s_errors[condition];
-            return GetStanzaError(doc, ct.Type, ct.Code, condition);
-        }
-
-        /// <summary>
-        /// Get an error element with a urn:ietf:params:xml:ns:xmpp-stanzas condition.
-        /// Likely, you want the GetStanzaError(doc, condition) instead.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="type"></param>
-        /// <param name="code"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public static Error GetStanzaError(XmlDocument doc, ErrorType type, int code, string condition)
-        {
-            Error error = new Error(doc);
-            error.ErrorType = type;
-            error.Code = code;
-            error.AppendChild(doc.CreateElement(condition, URI.STANZA_ERROR));
-            return error;
-        }
-
-        /// <summary>
-        /// Get an error stanza with a urn:ietf:params:xml:ns:xmpp-streams condition.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="type"></param>
-        /// <param name="code"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public static Error GetStreamError(XmlDocument doc, ErrorType type, int code, string condition)
-        {
-            Error error = new Error(doc);
-            error.ErrorType = type;
-            error.Code = code;
-            error.AppendChild(doc.CreateElement(condition, URI.STREAM));
-            return error;
-        }
-
-        /// <summary>
-        /// The error code, as an integer.
-        /// </summary>
-        public int Code
-        {
-            get { return GetIntAttr("code"); }
-            set { this.SetAttribute("code", value.ToString()); }
-        }
-
-        /// <summary>
-        /// The type of the error
-        /// </summary>
-        public ErrorType ErrorType
-        {
-            get { return this.GetEnumAttr<ErrorType>("type"); }
-            set { this.SetEnumAttr("type", value); }
-        }
-
-        /// <summary>
-        /// The inner error condition element.
-        /// </summary>
-        public string Condition
-        {
-            get
-            {
-                foreach (XmlNode n in this.ChildNodes)
-                {
-                    if (n.NodeType != XmlNodeType.Element)
-                        continue;
-                    if ((n.NamespaceURI != URI.STANZA_ERROR) &&
-                        (n.NamespaceURI != URI.STREAM_ERROR))
-                        continue;
-                    return n.LocalName;
-                }
-                // uh-oh.  Old-school error.  See section 3 of XEP-86.
-                switch (this.Code)
-                {
-                case 302: return REDIRECT;
-                case 400: return BAD_REQUEST;
-                case 401: return NOT_AUTHORIZED;
-                case 402: return PAYMENT_REQUIRED;
-                case 403: return FORBIDDEN;
-                case 404: return ITEM_NOT_FOUND;
-                case 405: return NOT_ALLOWED;
-                case 406: return NOT_ACCEPTABLE;
-                case 407: return REGISTRATION_REQUIRED;
-                case 408: return REMOTE_SERVER_TIMEOUT;
-                case 409: return CONFLICT;
-                case 500: return INTERNAL_SERVER_ERROR;
-                case 501: return FEATURE_NOT_IMPLEMENTED;
-                case 502: return SERVICE_UNAVAILABLE;
-                case 503: return SERVICE_UNAVAILABLE;
-                case 504: return REMOTE_SERVER_TIMEOUT;
-                case 510: return SERVICE_UNAVAILABLE;
-                }
-                // best we can do.
-                return UNDEFINED_CONDITION;
-            }
-            set { this.InnerXml = ""; this.AddChild(GetStanzaError(this.OwnerDocument, value)); }
-        }
-
-        /// <summary>
-        /// The error message.  Not used anymore (not I18N).
-        /// </summary>
-        public string Message
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/client/Factory.cs b/lib/jabber-net/jabber/protocol/client/Factory.cs
deleted file mode 100644
index d8e48fa..0000000
--- a/lib/jabber-net/jabber/protocol/client/Factory.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.client
-{
-    /// <summary>
-    /// ElementFactory for the jabber:client namespace.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Factory : IPacketTypes
-    {
-        private static QnameType[] s_qnt = new QnameType[]
-        {
-            new QnameType("presence", URI.CLIENT, typeof(jabber.protocol.client.Presence)),
-            new QnameType("message",  URI.CLIENT, typeof(jabber.protocol.client.Message)),
-            new QnameType("iq",       URI.CLIENT, typeof(jabber.protocol.client.IQ)),
-            new QnameType("error",    URI.CLIENT, typeof(jabber.protocol.client.Error)),
-            // meh.  jabber protocol really isn't right WRT to namespaces.
-            new QnameType("presence", URI.ACCEPT, typeof(jabber.protocol.client.Presence)),
-            new QnameType("message",  URI.ACCEPT, typeof(jabber.protocol.client.Message)),
-            new QnameType("iq",       URI.ACCEPT, typeof(jabber.protocol.client.IQ)),
-            new QnameType("error",    URI.ACCEPT, typeof(jabber.protocol.client.Error))
-        };
-        QnameType[] IPacketTypes.Types { get { return s_qnt; } }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/client/IQ.cs b/lib/jabber-net/jabber/protocol/client/IQ.cs
deleted file mode 100644
index de7ca33..0000000
--- a/lib/jabber-net/jabber/protocol/client/IQ.cs
+++ /dev/null
@@ -1,230 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.client
-{
-    /// <summary>
-    /// IQ type attribute
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum IQType
-    {
-        /// <summary>
-        /// type='get'
-        /// </summary>
-        get,
-        /// <summary>
-        /// type='set'
-        /// </summary>
-        set,
-        /// <summary>
-        /// type='result'
-        /// </summary>
-        result,
-        /// <summary>
-        /// type='error'
-        /// </summary>
-        error
-    }
-
-    /// <summary>
-    /// All IQ packets start here.  The Query property holds the interesting part.
-    /// There should usually be a convenience class next to the Query type, which
-    /// creates an IQ with the appropriate type of query inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IQ : Packet
-    {
-        private bool m_handled = false;
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public IQ(XmlDocument doc) : base("iq", doc)
-        {
-            ID   = NextID();
-            Type = IQType.get;  // get better errors than when there is no type specified.
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public IQ(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(qname.Name, doc) // Note:  *NOT* base(prefix, qname, doc), so that xpath matches are easier
-        {
-        }
-
-        /// <summary>
-        /// Has this IQ been handled?  Set automatically by GetResponse and GetErrorResponse.  If this is not
-        /// set to true, Jabber-Net will respond automatically with a 501 error.
-        /// </summary>
-        public bool Handled
-        {
-            get { return m_handled; }
-            set { m_handled = value; }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public IQType Type
-        {
-            get { return GetEnumAttr<IQType>("type"); }
-            set 
-            {
-                IQType cur = this.Type;
-                if (cur == value)
-                    return;
-
-                if (value == IQType.error)
-                {
-                    this.InnerXml = "";
-                    this.GetOrCreateElement<Error>();
-                }
-                SetEnumAttr("type", value);
-            }
-        }
-
-        /// <summary>
-        /// IQ error.
-        /// </summary>
-        public Error Error
-        {
-            get { return GetChildElement<Error>(); }
-            set
-            {
-                this.Type = IQType.error;
-                ReplaceChild<Error>(value);
-            }
-        }
-
-        /// <summary>
-        /// The query tag inside, regardless of namespace.
-        /// If the iq contains something other than query,
-        /// use normal XmlElement routines.
-        /// </summary>
-        public XmlElement Query
-        {
-            get { return this.GetFirstChildElement(); }
-            set { this.InnerXml = ""; this.AddChild(value); }
-        }
-
-#if __MonoCS__
-#pragma warning disable 0809
-#endif
-        /// <summary>
-        /// Swap the To and the From addresses.
-        /// Obsolete: Use GetResponse or GetErrorResponse, now, for IQs.
-        /// </summary>
-        [Obsolete("Use GetResponse or GetErrorResponse, now.")]
-        public override void Swap()
-        {
-            base.Swap();
-        }
-#if __MonoCS__
-#pragma warning restore 0809
-#endif
-
-        /// <summary>
-        /// Swap the to and from, set the type to result.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <returns></returns>
-        public IQ GetResponse(XmlDocument doc)
-        {
-            IQ resp = new IQ(doc);
-            resp.From = this.To;
-            resp.To = this.From;
-            resp.ID = this.ID;
-            resp.Type = IQType.result;
-
-            XmlElement q = this.Query;
-            if (q != null)
-            {
-                if (q is Element)
-                    resp.AppendChild((XmlElement)((Element)q).CloneNode(true, doc));
-                else
-                    resp.AppendChild(doc.ImportNode(q, true));
-            }
-
-            this.Handled = true;
-            return resp;
-        }
-
-        /// <summary>
-        /// Respond to this IQ with an error.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="condition"></param>
-        /// <returns></returns>
-        public IQ GetErrorResponse(XmlDocument doc, string condition)
-        {
-            IQ resp = new IQError(doc, condition);
-            resp.From = this.To;
-            resp.To = this.From;
-            resp.ID = this.ID;
-            resp.Type = IQType.error;
-
-            XmlElement q = this.Query;
-            if (q != null)
-            {
-                if (q is Element)
-                    resp.AppendChild((XmlElement)((Element)q).CloneNode(true, doc));
-                else
-                    resp.AppendChild(doc.ImportNode(q, true));
-            }
-
-            this.Handled = true;
-            return resp;
-        }
-    }
-
-    /// <summary>
-    /// An IQ subclass that allows typed access to its first child,
-    /// through the Instruction property.
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    [SVN(@"$Id$")]
-    public class TypedIQ<T> : IQ
-        where T : Element
-    {
-        /// <summary>
-        /// Create an IQ to send out, with an instance of the specified
-        /// type as a child.
-        /// </summary>
-        /// <param name="doc"></param>
-        public TypedIQ(XmlDocument doc) : base(doc)
-        {
-            CreateChildElement<T>();
-        }
-
-        /// <summary>
-        /// The child element (often "query") with the command for this IQ.
-        /// </summary>
-        public T Instruction
-        {
-            get { return GetChildElement<T>(); }
-            set { ReplaceChild<T>(value); }
-        }
-    }
-
-}
diff --git a/lib/jabber-net/jabber/protocol/client/Message.cs b/lib/jabber-net/jabber/protocol/client/Message.cs
deleted file mode 100644
index 6954e94..0000000
--- a/lib/jabber-net/jabber/protocol/client/Message.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.client
-{
-    /// <summary>
-    /// Message type attribute
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum MessageType
-    {
-        /// <summary>
-        /// Normal message
-        /// </summary>
-        normal = -1,
-        /// <summary>
-        /// Error message
-        /// </summary>
-        error,
-        /// <summary>
-        /// Chat (one-to-one) message
-        /// </summary>
-        chat,
-        /// <summary>
-        /// Groupchat
-        /// </summary>
-        groupchat,
-        /// <summary>
-        /// Headline
-        /// </summary>
-        headline
-    }
-    /// <summary>
-    /// A client-to-client message.
-    /// TODO: Some XHTML is supported by setting the .Html property,
-    /// but extra xmlns="" get put everywhere at the moment.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Message : Packet
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Message(XmlDocument doc) : base("message", doc)
-        {
-            ID = NextID();
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Message(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(qname.Name, doc)  // Note:  *NOT* base(prefix, qname, doc), so that xpath matches are easier
-        {
-        }
-
-        /// <summary>
-        /// The message type attribute
-        /// </summary>
-        public MessageType Type
-        {
-            get { return (MessageType) GetEnumAttr("type", typeof(MessageType)); }
-            set
-            {
-                if (value == MessageType.normal)
-                    RemoveAttribute("type");
-                else
-                    SetAttribute("type", value.ToString());
-            }
-        }
-
-        private void NormalizeHtml(XmlElement body, string html)
-        {
-            XmlDocument d = new XmlDocument();
-            d.LoadXml("<html xmlns='" + URI.XHTML + "'>" + html + "</html>");
-            foreach (XmlNode node in d.DocumentElement.ChildNodes)
-            {
-                body.AppendChild(this.OwnerDocument.ImportNode(node, true));
-            }
-        }
-
-        /// <summary>
-        /// On set, creates both an html element, and a body element, which will
-        /// have the de-html'd version of the html element.
-        /// </summary>
-        public string Html
-        {
-            get
-            {
-                // Thanks, Mr. Postel.
-                XmlElement h = this["html"];
-                if (h == null)
-                    return "";
-                XmlElement b = h["body"];
-                if (b == null)
-                    return "";
-                string xml = b.InnerXml;
-                // HACK: yeah, yeah, I know.
-                return xml.Replace(" xmlns=\"" + URI.XHTML + "\"", "");
-            }
-            set
-            {
-                XmlElement html = GetOrCreateElement("html", URI.XHTML_IM, null);
-                XmlElement body = html["body", URI.XHTML];
-                if (body == null)
-                {
-                    body =  this.OwnerDocument.CreateElement(null, "body", URI.XHTML);
-                    html.AppendChild(body);
-                }
-                else
-                    body.RemoveAll();
-                NormalizeHtml(body, value);
-                this.Body = body.InnerText;
-            }
-        }
-
-        /// <summary>
-        /// The message body
-        /// </summary>
-        public string Body
-        {
-            get { return GetElem("body"); }
-            set { SetElem("body", value); }
-        }
-
-        /// <summary>
-        /// The message thread
-        /// TODO: some help to generate these, please.
-        /// </summary>
-        public string Thread
-        {
-            get { return GetElem("thread"); }
-            set { SetElem("thread", value); }
-        }
-        /// <summary>
-        /// The message subject
-        /// </summary>
-        public string Subject
-        {
-            get { return GetElem("subject"); }
-            set { SetElem("subject", value); }
-        }
-        /// <summary>
-        /// The first x tag, regardless of namespace.
-        /// </summary>
-        [Obsolete("This almost certainly doesn't do what you want.")]
-        public XmlElement X
-        {
-            get { return this["x"]; }
-            set { this.AddChild(value); }
-        }
-
-        /// <summary>
-        /// Message error.
-        /// </summary>
-        public Error Error
-        {
-            get { return GetChildElement<Error>(); }
-            set
-            {
-                this.Type = MessageType.error;
-                ReplaceChild<Error>(value);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/client/Presence.cs b/lib/jabber-net/jabber/protocol/client/Presence.cs
deleted file mode 100644
index c832f80..0000000
--- a/lib/jabber-net/jabber/protocol/client/Presence.cs
+++ /dev/null
@@ -1,362 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.x;
-
-namespace jabber.protocol.client
-{
-    /// <summary>
-    /// Presence type attribute
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum PresenceType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        available = -1,
-        /// <summary>
-        /// May I subscribe to you?
-        /// </summary>
-        subscribe,
-        /// <summary>
-        /// Yes, you may subscribe.
-        /// </summary>
-        subscribed,
-        /// <summary>
-        /// Unsubscribe from this entity.
-        /// </summary>
-        unsubscribe,
-        /// <summary>
-        /// No, you may not subscribe.
-        /// </summary>
-        unsubscribed,
-        /// <summary>
-        /// Offline
-        /// </summary>
-        unavailable,
-        /// <summary>
-        /// server-side only.
-        /// </summary>
-        probe,
-        /// <summary>
-        /// A presence error.
-        /// </summary>
-        error,
-        /// <summary>
-        /// Invisible presence: we're unavailable to them, but still see
-        /// theirs.
-        /// </summary>
-        invisible
-    }
-
-    /// <summary>
-    /// Client presence packet.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Presence : Packet, IComparable<Presence>, IComparable
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Presence(XmlDocument doc) :
-            base("presence", doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Presence(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(qname.Name, doc)  // Note:  *NOT* base(prefix, qname, doc), so that xpath matches are easier
-        {
-        }
-
-        /// <summary>
-        /// Presence type
-        /// </summary>
-        public PresenceType Type
-        {
-            get { return (PresenceType) GetEnumAttr("type", typeof(PresenceType)); }
-            set
-            {
-                if (value == PresenceType.available)
-                    RemoveAttribute("type");
-                else
-                    SetAttribute("type", value.ToString());
-            }
-        }
-
-        /// <summary>
-        /// Presence status
-        /// </summary>
-        public string Status
-        {
-            get { return GetElem("status"); }
-            set { SetElem("status", value); }
-        }
-
-        /// <summary>
-        /// Presence show
-        /// </summary>
-        public string Show
-        {
-            get { return GetElem("show"); }
-            set { SetElem("show", value); }
-        }
-
-        /// <summary>
-        /// Priority for this resource.
-        /// </summary>
-        public string Priority
-        {
-            get { return GetElem("priority"); }
-            set { SetElem("priority", value); }
-        }
-
-        /// <summary>
-        /// An integer version of the priority, constrained to -128..127.  0 if there was no priority element or it wasn't an integer.
-        /// </summary>
-        public int IntPriority
-        {
-            get
-            {
-                String pri = Priority;
-                if ((pri == null) || (pri == ""))
-                    return 0;
-                try
-                {
-                    int i = int.Parse(pri);
-                    if (i < -128)
-                        return -128;
-                    if (i > 127)
-                        return 127;
-                    return i;
-                }
-                catch (Exception)
-                {
-                    return 0;
-                }
-            }
-            set
-            {
-                SetElem("priority", value.ToString());
-            }
-        }
-
-        /// <summary>
-        /// Presence error.
-        /// </summary>
-        public Error Error
-        {
-            get { return (Error) this["error"]; }
-            set
-            {
-                this.Type = PresenceType.error;
-                ReplaceChild(value);
-            }
-        }
-
-        private static int IntShow(string show)
-        {
-            switch (show)
-            {
-            case "dnd":
-                return 0;
-            case "xa":
-                return 1;
-            case "away":
-                return 2;
-            case "chat":
-                return 4;
-            default:
-                return 3;
-            }
-        }
-        
-        /// <summary>
-        /// Date/Time stamp that the presence was originially received by the sending
-        /// server, if this presence is in response to a probe.
-        /// </summary>
-        public DateTime Stamp
-        {
-            get
-            {
-                jabber.protocol.x.ModernDelay md = GetChildElement<jabber.protocol.x.ModernDelay>();
-                if (md != null)
-                    return md.Stamp;
-                jabber.protocol.x.Delay delay = GetChildElement<jabber.protocol.x.Delay>();
-                if (delay != null)
-                    return delay.Stamp;
-                return DateTime.MinValue;
-            }
-            set
-            {
-                jabber.protocol.x.ModernDelay md = GetChildElement<jabber.protocol.x.ModernDelay>();
-                if (md != null)
-                {
-                    md.Stamp = value;
-                    return;
-                }
-                jabber.protocol.x.Delay delay = GetChildElement<jabber.protocol.x.Delay>();
-                if (delay != null)
-                {
-                    delay.Stamp = value;
-                    return;
-                }
-                md = new jabber.protocol.x.ModernDelay(this.OwnerDocument);
-                md.Stamp = value;
-                this.AddChild(md);
-            }
-        }
-
-        /// <summary>
-        /// If there is a stamp, returns it, otherwise looks for and adds a new stamp element.
-        /// This method should never be called for presence that is to be sent out, since it 
-        /// will add non-standard protocol to the presence.
-        /// </summary>
-        public DateTime ReceivedTime
-        {
-            get
-            {
-                DateTime dt = this.Stamp;
-                if (dt != DateTime.MinValue)
-                    return dt;
-                const string RECEIVED = "http://cursive.net/protocol/received";
-                XmlElement el = this["x", RECEIVED];
-                if (el != null)
-                    return Element.DateTimeProfile(el.InnerText);
-                dt = DateTime.Now;
-                el = OwnerDocument.CreateElement("x", RECEIVED);
-                el.InnerText = Element.DateTimeProfile(dt);
-                this.AppendChild(el);
-                return dt;
-            }
-        }
-
-        /// <summary>
-        /// Compare two presences (from the same bare JID, but from
-        /// different resources), to determine which is "more
-        /// available".
-        /// </summary>
-        /// <param name="first"></param>
-        /// <param name="second"></param>
-        /// <returns></returns>
-        public static bool operator<(Presence first, Presence second)
-        {
-            return (((IComparable<Presence>)first).CompareTo(second) == -1);
-        }
-
-        /// <summary>
-        /// Compare two presences (from the same bare JID, but from
-        /// different resources), to determine which is "more
-        /// available".
-        /// </summary>
-        /// <param name="first"></param>
-        /// <param name="second"></param>
-        /// <returns></returns>
-        public static bool operator>(Presence first, Presence second)
-        {
-            return (((IComparable<Presence>)first).CompareTo(second) == 1);
-        }
-
-        #region IComparable<Presence> Members
-
-        /// <summary>
-        /// Compare this presence element with another, first by priority, 
-        /// then by show, then by time received.
-        /// </summary>
-        /// <param name="other"></param>
-        /// <returns>
-        ///    Less than zero 
-        ///     This object is less than the other parameter.
-        ///    Zero 
-        ///     This object is equal to other. 
-        ///    Greater than zero 
-        ///     This object is greater than other. 
-        /// </returns>
-        public int CompareTo(Presence other)
-        {
-            /*
-            Less than zero 
-             This object is less than the other parameter.
- 
-            Zero 
-             This object is equal to other. 
- 
-            Greater than zero 
-             This object is greater than other. 
-
-             */
-            if ((object)this == (object)other)
-                return 0;
-
-            if (other == null)
-                return 1;
-
-            int tp = this.IntPriority;
-            int op = other.IntPriority;
-            if (tp > op)
-                return 1;
-            if (tp < op)
-                return -1;
-
-            // equal priority
-            int ts = IntShow(this.Show);
-            int os = IntShow(other.Show);
-
-            if (ts > os)
-                return 1;
-            if (ts < os)
-                return -1;
-
-            // equal show
-            return this.ReceivedTime.CompareTo(other.ReceivedTime);
-        }
-
-        #endregion
-
-        #region IComparable Members
-
-        /// <summary>
-        /// Compare this presence element with another, first by priority, 
-        /// then by show, then by time received.
-        /// </summary>
-        /// <param name="other"></param>
-        /// <returns>
-        ///    Less than zero 
-        ///     This object is less than the other parameter.
-        ///    Zero 
-        ///     This object is equal to other. 
-        ///    Greater than zero 
-        ///     This object is greater than other. 
-        /// </returns>
-        public int CompareTo(object other)
-        {
-            if (other is Presence)
-                return CompareTo((Presence)other);
-            return 1;
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/client/ProtocolException.cs b/lib/jabber-net/jabber/protocol/client/ProtocolException.cs
deleted file mode 100644
index 8f00f0c..0000000
--- a/lib/jabber-net/jabber/protocol/client/ProtocolException.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.client
-{
-    /// <summary>
-    /// Invalid protocol received.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BadProtocolException : Exception
-    {
-        private XmlElement m_proto = null;
-        private string m_msg = null;
-
-        /// <summary>
-        /// Create a protocol exception
-        /// </summary>
-        /// <param name="badProtocol">The protocol that was bad.  Typically the top-most (stanza) element.</param>
-        /// <param name="message">An optional message.  May be null.</param>
-        public BadProtocolException(XmlElement badProtocol, string message)
-        {
-            m_proto = badProtocol;
-            m_msg = message;
-        }
-
-        /// <summary>
-        /// Gets a message that describes the current exception.
-        /// </summary>
-        public override string Message
-        {
-            get
-            {
-                if (m_msg == null)
-                    return string.Format("Invalid protocol: {0}", m_proto.OuterXml);
-                return string.Format("Invalid protocol ({0}): {1}", m_proto.OuterXml, m_msg);
-            }
-        }
-    }
-
-    /// <summary>
-    /// A jabber error, in an IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class IQException : Exception
-    {
-        // TODO: fix this up for new error codes.
-        private int m_code;
-        private string m_message;
-
-        /// <summary>
-        /// An authorization exception from an IQ.
-        /// TODO: Add constructor for code/message
-        /// TODO: understand v1 errors
-        /// </summary>
-        /// <param name="iq"></param>
-        public IQException(IQ iq)
-        {
-            if (iq == null)
-            {
-                //timeout
-                m_code = 504;
-                m_message = "Request timed out";
-            }
-            else
-            {
-                Error e = iq.Error;
-                m_code = e.Code;
-                m_message = e.InnerText;
-            }
-        }
-
-        /// <summary>
-        /// The Jabber error number
-        /// </summary>
-        public int Code
-        {
-            get { return m_code; }
-        }
-
-        /// <summary>
-        /// The text description of the message
-        /// </summary>
-        public string Description
-        {
-            get { return m_message; }
-        }
-
-        /// <summary>
-        /// Return the error code and message.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return string.Format("Error {0}: {1}", m_code, m_message);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Agents.cs b/lib/jabber-net/jabber/protocol/iq/Agents.cs
deleted file mode 100644
index c11d0b0..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Agents.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    // <pre>
-    // <iq from='jabber.org' id='jcl_17' to='hildjj at jabber.org/Work' type='result'>
-    //   <query xmlns='jabber:iq:agents'>
-    //     <agent jid='users.jabber.org'>
-    //       <name>Jabber User Directory</name>
-    //       <service>jud</service>
-    //       <search/>
-    //       <register/>
-    //     </agent>
-    //   </query>
-    // </iq>
-    // </pre>
-    /// <summary>
-    /// IQ packet with an agents query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AgentsIQ : jabber.protocol.client.TypedIQ<AgentsQuery>
-    {
-        /// <summary>
-        /// Create an agents IQ packet.
-        /// </summary>
-        /// <param name="doc"></param>
-        public AgentsIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An agents query element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AgentsQuery : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public AgentsQuery(XmlDocument doc) : base("query", URI.AGENTS, doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public AgentsQuery(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Add an agent to the list
-        /// </summary>
-        /// <returns></returns>
-        public Agent AddAgent()
-        {
-            return CreateChildElement<Agent>();
-        }
-
-        /// <summary>
-        /// Get the list of agents
-        /// </summary>
-        /// <returns></returns>
-        public Agent[] GetAgents()
-        {
-            return GetElements<Agent>().ToArray();
-        }
-    }
-
-    /// <summary>
-    /// Agent items
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Agent : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Agent(XmlDocument doc) : base("agent", URI.AGENTS, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Agent(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The agent's JID
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { this.SetAttr("jid", value.ToString()); }
-        }
-
-        /// <summary>
-        /// The agent's name
-        /// </summary>
-        public string AgentName
-        {
-            get { return GetElem("name"); }
-            set { SetElem("name", value); }
-        }
-
-        /// <summary>
-        /// The agent's description
-        /// </summary>
-        public string Description
-        {
-            get { return GetElem("description"); }
-            set { SetElem("description", value); }
-        }
-
-        /// <summary>
-        /// Is the agent a transport?
-        /// </summary>
-        public bool Transport
-        {
-            get { return this["transport"] != null; }
-            set
-            {
-                if (value)
-                {
-                    SetElem("transport", null);
-                }
-                else
-                {
-                    RemoveElem("transport");
-                }
-            }
-        }
-
-        /// <summary>
-        /// Is the agent for groupchat?
-        /// </summary>
-        public bool Groupchat
-        {
-            get { return this["groupchat"] != null; }
-            set
-            {
-                if (value)
-                {
-                    SetElem("groupchat", null);
-                }
-                else
-                {
-                    RemoveElem("groupchat");
-                }
-            }
-        }
-
-        /// <summary>
-        /// The agent service name.
-        /// </summary>
-        public string Service
-        {
-            get { return GetElem("service"); }
-            set { SetElem("service", value); }
-        }
-
-        /// <summary>
-        /// Is the agent a registrar?
-        /// </summary>
-        public bool Register
-        {
-            get { return this["register"] != null; }
-            set
-            {
-                if (value)
-                {
-                    SetElem("register", null);
-                }
-                else
-                {
-                    RemoveElem("register");
-                }
-            }
-        }
-
-        /// <summary>
-        /// Is the agent for JUD?
-        /// </summary>
-        public bool Search
-        {
-            get { return this["search"] != null; }
-            set
-            {
-                if (value)
-                {
-                    SetElem("search", null);
-                }
-                else
-                {
-                    RemoveElem("search");
-                }
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Auth.cs b/lib/jabber-net/jabber/protocol/iq/Auth.cs
deleted file mode 100644
index 2d0be22..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Auth.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Security.Cryptography;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// An auth IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AuthIQ : jabber.protocol.client.TypedIQ<Auth>
-    {
-        /// <summary>
-        /// Create an Auth IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public AuthIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Client authentication, with digest support.  Call SetAuth() to compute
-    /// the digest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Auth : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Auth(XmlDocument doc) :
-            base("query", URI.AUTH, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Auth(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Set the authentication information.
-        /// TODO: 0k
-        /// </summary>
-        /// <param name="username">The user name.  NOT the JID.</param>
-        /// <param name="password">The user's password.</param>
-        /// <param name="StreamID">The id from the stream:stream
-        /// that the server sent, or null for plaintext.</param>
-        public void SetDigest(string username, string password, string StreamID)
-        {
-            Debug.Assert(username != null);
-            Debug.Assert(password != null);
-            Debug.Assert(StreamID != null);
-            this.Username = username;
-            this.Digest = ShaHash(StreamID, password);
-        }
-        /// <summary>
-        /// Set the authentication information, for plaintext auth.
-        /// </summary>
-        /// <param name="username">The user name.  NOT the JID.</param>
-        /// <param name="password">The user's password.</param>
-        public void SetAuth(string username, string password)
-        {
-            Debug.Assert(username != null);
-            Debug.Assert(password != null);
-            this.Username = username;
-            this.Password = password;
-        }
-
-        /// <summary>
-        /// Set the zero-knowledge information for this iq.
-        /// </summary>
-        /// <param name="username"></param>
-        /// <param name="password"></param>
-        /// <param name="token"></param>
-        /// <param name="sequence"></param>
-        public void SetZeroK(string username,
-            string password,
-            string token,
-            int    sequence)
-        {
-            Debug.Assert(username != null);
-            this.Username = username;
-            this.Hash = Element.ZeroK(password, token, sequence);
-        }
-
-        /// <summary>
-        /// The user's account name.  NOT the JID.
-        /// </summary>
-        public string Username
-        {
-            get { return GetElem("username"); }
-            set { SetElem("username", value); }
-        }
-
-        /// <summary>
-        /// The plaintext password.
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-
-        /// <summary>
-        /// SHA1 hash of the StreamID and the password.
-        /// </summary>
-        public string Digest
-        {
-            get { return GetElem("digest"); }
-            set { SetElem("digest", value); }
-        }
-
-        /// <summary>
-        /// The resource to connect with.
-        /// </summary>
-        public string Resource
-        {
-            get { return GetElem("resource"); }
-            set { SetElem("resource", value); }
-        }
-
-        /// <summary>
-        /// Gets the zero-k token.
-        /// </summary>
-        public string Token
-        {
-            get { return GetElem("token"); }
-            set { SetElem("token", value); }
-        }
-
-        /// <summary>
-        /// Zero-k sequence
-        /// </summary>
-        public int Sequence
-        {
-            get { return Int32.Parse(GetElem("sequence")); }
-            set { SetElem("sequence", value.ToString()); }
-        }
-
-        /// <summary>
-        /// Zero-k hash.  NOT DIGEST!
-        /// </summary>
-        public string Hash
-        {
-            get { return GetElem("hash"); }
-            set { SetElem("hash", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Bookmarks.cs b/lib/jabber-net/jabber/protocol/iq/Bookmarks.cs
deleted file mode 100644
index 6bca23f..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Bookmarks.cs
+++ /dev/null
@@ -1,344 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// An IQ in jabber:iq:private, with a bookmarks body.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BookmarksIQ : PrivateIQ
-	{
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public BookmarksIQ(XmlDocument doc) : base(doc)
-        {
-            this.Instruction.AddChild(new Bookmarks(doc));
-        }
-
-        /// <summary>
-        /// Get the bookmarks element.
-        /// </summary>
-        public Bookmarks Bookmarks
-        {
-            get { return this.Instruction.GetChildElement<Bookmarks>(); }
-        }
-	}
-
-    /// <summary>
-    /// The bookmarks to be stored.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Bookmarks : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public Bookmarks(XmlDocument doc) :
-            base("storage", URI.BOOKMARKS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Bookmarks(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Get all of the URLs contained in the bookmark list.
-        /// </summary>
-        /// <returns></returns>
-        public BookmarkURL[] GetUrls()
-        {
-            return this.GetElements<BookmarkURL>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a URL bookmark
-        /// </summary>
-        /// <param name="URL">The URL to add</param>
-        /// <param name="name">Descriptive text</param>
-        /// <returns></returns>
-        public BookmarkURL AddURL(string URL, string name)
-        {
-            BookmarkURL u = new BookmarkURL(this.OwnerDocument);
-            u.URL = URL;
-            u.URLName = name;
-            this.AddChild(u);
-            return u;
-        }
-
-        /// <summary>
-        /// Get all of the conferences contained in the bookmark list.
-        /// </summary>
-        /// <returns></returns>
-        public BookmarkConference[] GetConferences()
-        {
-            return this.GetElements<BookmarkConference>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a conference room to the bookmark list
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <param name="name"></param>
-        /// <param name="autoJoin"></param>
-        /// <param name="nick"></param>
-        /// <returns></returns>
-        public BookmarkConference AddConference(JID jid, string name, bool autoJoin, string nick)
-        {
-            BookmarkConference c = new BookmarkConference(this.OwnerDocument);
-            c.JID = jid;
-            c.ConferenceName = name;
-            c.AutoJoin = autoJoin;
-            if (nick != null)
-                c.Nick = nick;
-            this.AddChild(c);
-            return c;
-        }
-
-        /// <summary>
-        /// Get all of the notes contained in the bookmark list.
-        /// </summary>
-        /// <returns></returns>
-        public BookmarkNote[] GetNotes()
-        {
-            return this.GetElements<BookmarkNote>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a note to the bookmark list.
-        /// </summary>
-        /// <param name="jid"></param>
-        /// <param name="text"></param>
-        /// <returns></returns>
-        public BookmarkNote AddNote(JID jid, string text)
-        {
-            BookmarkNote n = new BookmarkNote(this.OwnerDocument);
-            n.JID = jid;
-            n.Text = text;
-            this.AddChild(n);
-            return n;
-        }
-    }
-
-    /// <summary>
-    /// A URL stored in bookmarks.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BookmarkURL : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public BookmarkURL(XmlDocument doc) :
-            base("url", URI.BOOKMARKS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public BookmarkURL(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The HTTP or HTTPS URL of the web page, according to spec.
-        /// In practice, any URI.
-        /// </summary>
-        public string URL
-        {
-            get { return GetAttr("url"); }
-            set { SetAttr("url", value); }
-        }
-
-        /// <summary>
-        /// A friendly name for the bookmark.
-        /// </summary>
-        public string URLName
-        {
-            get { return GetAttr("name"); }
-            set { SetAttr("name", value); }
-        }
-    }
-
-    /// <summary>
-    /// A conference room name stored in bookmarks
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BookmarkConference : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public BookmarkConference(XmlDocument doc) :
-            base("conference", URI.BOOKMARKS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public BookmarkConference(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Should the room be joined on startup?
-        /// </summary>
-        public bool AutoJoin
-        {
-            get 
-            {
-                string aj = GetAttr("autojoin");
-                return (aj == "true") || (aj == "1");
-            }
-            set 
-            {
-                if (value)
-                    SetAttr("autojoin", "true");
-                else
-                    RemoveAttribute("autojoin");
-            }
-        }
-
-        /// <summary>
-        /// The room at service JID of the room.
-        /// </summary>
-        public JID JID
-        {
-            get { return (JID)GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// A friendly name for the bookmark.
-        /// </summary>
-        public string ConferenceName
-        {
-            get { return GetAttr("name"); }
-            set { SetAttr("name", value); }
-        }
-
-        /// <summary>
-        /// The user's preferred roomnick for the chatroom.
-        /// </summary>
-        public string Nick
-        {
-            get { return GetElem("nick");  }
-            set { SetElem("nick", value);  }
-        }
-
-        /// <summary>
-        /// Plain-text string for the password needed to enter a password-protected room. 
-        /// For security reasons, use of this element is NOT RECOMMENDED.
-        /// 
-        /// TODO: should this be marked Obsolete?
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-    }
-
-    /// <summary>
-    /// A note stored in bookmarks.  Un-specified, but hinted at in version 1.1 of XEP-48.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BookmarkNote : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public BookmarkNote(XmlDocument doc) :
-            base("note", URI.BOOKMARKS, doc)
-        {
-            Modified = Created = DateTime.UtcNow;
-        }
-
-        /// <summary>
-        /// Create for inbound.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public BookmarkNote(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The JID to which the note pertains.
-        /// </summary>
-        public JID JID
-        {
-            get { return (JID)GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The UTC date/time the note was created.
-        /// </summary>
-        public DateTime Created
-        {
-            get { return GetDateTimeAttr("cdate"); }
-            set { SetDateTimeAttr("cdate", value); }
-        }
-
-        /// <summary>
-        /// The UTC date/time the note last modified.
-        /// </summary>
-        public DateTime Modified
-        {
-            get { return GetDateTimeAttr("mdate"); }
-            set { SetDateTimeAttr("mdate", value); }
-        }
-
-        /// <summary>
-        /// The text of the note.
-        /// </summary>
-        public string Text
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Browse.cs b/lib/jabber-net/jabber/protocol/iq/Browse.cs
deleted file mode 100644
index 53975de..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Browse.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Security.Cryptography;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// An browse IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BrowseIQ : jabber.protocol.client.TypedIQ<Browse>
-    {
-        /// <summary>
-        /// Create a Browse IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public BrowseIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Browse IQ query.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Browse : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Browse(XmlDocument doc) :
-            base("query", URI.BROWSE, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Browse(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The full JabberID of the entity described.
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttribute("jid"); }
-            set { SetAttribute("jid", value.ToString()); }
-        }
-
-        /// <summary>
-        /// One of the categories from the category list, or a non-standard category prefixed with the string "x-".
-        /// </summary>
-        public string Category
-        {
-            get { return GetAttribute("category"); }
-            set { SetAttribute("category", value); }
-        }
-
-        /// <summary>
-        /// One of the official types from the specified category, or a non-standard type prefixed with the string "x-".
-        /// </summary>
-        public string Type
-        {
-            get { return GetAttribute("type"); }
-            set { SetAttribute("type", value); }
-        }
-
-        /// <summary>
-        /// A friendly name that may be used in a user interface.
-        /// </summary>
-        public string BrowseName
-        {
-            get { return GetAttribute("name"); }
-            set { SetAttribute("name", value); }
-        }
-
-        /// <summary>
-        /// A string containing the version of the node, equivalent to the response provided to a
-        /// query in the 'jabber:iq:version' namespace. This is useful for servers, especially for lists of services
-        /// (see the 'service/serverlist' category/type above).
-        /// </summary>
-        public string Version
-        {
-            get { return GetAttribute("version"); }
-            set { SetAttribute("version", value); }
-        }
-
-        /// <summary>
-        /// Sub-items of this item
-        /// </summary>
-        /// <returns></returns>
-        public Browse[] GetItems()
-        {
-            return GetElements<Browse>().ToArray();
-        }
-
-        /// <summary>
-        /// Add an item to the sub-item list.
-        /// </summary>
-        /// <returns></returns>
-        public Browse AddItem()
-        {
-            return CreateChildElement<Browse>();
-        }
-
-        /// <summary>
-        /// The namespaces advertised by this item.
-        /// </summary>
-        /// <returns></returns>
-        public string[] GetNamespaces()
-        {
-            XmlNodeList nl = GetElementsByTagName("ns", URI.BROWSE);
-            string[] items = new string[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                items[i] = n.InnerText;
-                i++;
-            }
-            return items;
-        }
-
-        /// <summary>
-        /// Add a namespace to the namespaces supported by this item.
-        /// </summary>
-        /// <param name="ns"></param>
-        public void AddNamespace(string ns)
-        {
-            XmlElement e = this.OwnerDocument.CreateElement(null, "ns", URI.BROWSE);
-            e.InnerText = ns;
-            this.AppendChild(e);
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Disco.cs b/lib/jabber-net/jabber/protocol/iq/Disco.cs
deleted file mode 100644
index b2bc63b..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Disco.cs
+++ /dev/null
@@ -1,552 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.x;
-using bedrock.collections;
-
-namespace jabber.protocol.iq
-{
-    /*
-     * <iq
-     *     type='result'
-     *     from='shakespeare.lit'
-     *     to='romeo at montague.net/orchard'
-     *     id='items1'>
-     *   <query xmlns='http://jabber.org/protocol/disco#items' node='music'>
-     *     <item
-     *         jid='people.shakespeare.lit'
-     *         name='Directory of Characters'/>
-     *     <item
-     *         jid='plays.shakespeare.lit'
-     *         name='Play-Specific Chatrooms'/>
-     * </iq>
-     */
-    /// <summary>
-    /// IQ packet with a disco#items query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoItemsIQ : jabber.protocol.client.TypedIQ<DiscoItems>
-    {
-        /// <summary>
-        /// Create a disco#items IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoItemsIQ(XmlDocument doc) : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// The node on the query.
-        /// </summary>
-        public string Node
-        {
-            get { return this.Instruction.Node; }
-            set { this.Instruction.Node = value; }
-        }
-    }
-
-    /// <summary>
-    /// IQ packet with a disco#info query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoInfoIQ : jabber.protocol.client.TypedIQ<DiscoInfo>
-    {
-        /// <summary>
-        /// Create a disco#items IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoInfoIQ(XmlDocument doc) : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// The node on the query.
-        /// </summary>
-        public string Node
-        {
-            get {return this.Instruction.Node; }
-            set { this.Instruction.Node = value; }
-        }
-    }
-
-    /*
-     * <iq
-     *     type='result'
-     *     from='plays.shakespeare.lit'
-     *     to='romeo at montague.net/orchard'
-     *     id='info1'>
-     *   <query xmlns='http://jabber.org/protocol/disco#info'>
-     *     <identity
-     *         category='conference'
-     *         type='text'
-     *         name='Play-Specific Chatrooms'/>
-     *     <identity
-     *         category='directory'
-     *         type='room'
-     *         name='Play-Specific Chatrooms'/>
-     * 
-     *     <feature var='gc-1.0'/>
-     *     <feature var='http://jabber.org/protocol/muc'/>
-     *     <feature var='jabber:iq:register'/>
-     *     <feature var='jabber:iq:search'/>
-     *     <feature var='jabber:iq:time'/>
-     *     <feature var='jabber:iq:version'/>
-     *   </query>
-     * </iq>
-     */
-
-
-    /// <summary>
-    /// A disco#items query element.
-    /// See <a href="http://www.xmpp.org/extensions/xep-0030.html">XEP-0030</a> for more information.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoItems : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoItems(XmlDocument doc) : base("query", URI.DISCO_ITEMS, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public DiscoItems(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The sub-address of the discovered entity.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// Add a disco item
-        /// </summary>
-        /// <returns></returns>
-        public DiscoItem AddItem()
-        {
-            return CreateChildElement<DiscoItem>();
-        }
-
-        /// <summary>
-        /// List of disco items
-        /// </summary>
-        /// <returns></returns>
-        public DiscoItem[] GetItems()
-        {
-            return GetElements<DiscoItem>().ToArray();
-        }
-    }
-
-    /// <summary>
-    /// Actions for iq/set in the disco#items namespace.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum DiscoAction
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// Remove this item
-        /// </summary>
-        remove,
-        /// <summary>
-        /// Update this item
-        /// </summary>
-        update
-    }
-
-    /// <summary>
-    /// An item inside a disco#items result.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoItem : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoItem(XmlDocument doc) : base("item", URI.DISCO_ITEMS, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public DiscoItem(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The Jabber ID associated with the item.
-        /// </summary>
-        public JID Jid
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value.ToString()); }
-        }
-
-        /// <summary>
-        /// The user-visible name of this node
-        /// </summary>
-        public string Named
-        {
-            get { return GetAttr("name"); }
-            set { SetAttr("name", value); }
-        }
-
-        /// <summary>
-        /// The sub-node associated with this item.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// Actions for iq/set in the disco#items namespace.
-        /// </summary>
-        public DiscoAction Action
-        {
-            get { return GetEnumAttr<DiscoAction>("action"); }
-            set { SetEnumAttr("action", value); }
-        }
-    }
-
-/*
-<iq
-    type='result'
-    from='balconyscene at plays.shakespeare.lit'
-    to='juliet at capulet.com/balcony'
-    id='info2'>
-  <query xmlns='http://jabber.org/protocol/disco#info'>
-    <identity
-        category='conference'
-        type='text'
-        name='Romeo and Juliet, Act II, Scene II'/>
-    <feature var='gc-1.0'/>
-    <feature var='http://jabber.org/protocol/muc'/>
-    <feature var='http://jabber.org/protocol/feature-neg'/>
-    <feature var='muc-password'/>
-    <feature var='muc-hidden'/>
-    <feature var='muc-temporary'/>
-    <feature var='muc-open'/>
-    <feature var='muc-unmoderated'/>
-    <feature var='muc-nonanonymous'/>
-    <x xmlns='jabber:x:data' type='result'>
-      <field var='FORM_TYPE' type='hidden'>
-        <value>http://jabber.org/network/serverinfo</value>
-      </field>
-      <field var='c2s_port'>
-        <value>5222</value>
-      </field>
-    </x>
-  </query>
-</iq>
-*/
-    /// <summary>
-    /// The information associated with a disco node.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoInfo : Element
-    {
-        private StringSet m_features = null;
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoInfo(XmlDocument doc) : base("query", URI.DISCO_INFO, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public DiscoInfo(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The sub-node associated with this item.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// Add an identity
-        /// </summary>
-        /// <param name="category">The category of the identity.  Required.</param>
-        /// <param name="discoType">The sub-type</param>
-        /// <param name="name">A human-readable string</param>
-        /// <param name="language">The xml:lang, or null to take the requestor's default</param>
-        /// <returns></returns>
-        public DiscoIdentity AddIdentity(string category, string discoType, string name, string language)
-        {
-            DiscoIdentity i = CreateChildElement<DiscoIdentity>();
-            i.Category = category;
-            i.Type = discoType;
-            i.Named = name;
-            i.Lang = language;
-            return i;
-        }
-
-        /// <summary>
-        /// List of identities
-        /// </summary>
-        /// <returns></returns>
-        public DiscoIdentity[] GetIdentities()
-        {
-            return GetElements<DiscoIdentity>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a feature
-        /// </summary>
-        /// <returns></returns>
-        public DiscoFeature AddFeature(string featureURI)
-        {
-            DiscoFeature i = CreateChildElement<DiscoFeature>();
-            i.Var = featureURI;
-            if (m_features != null)
-                m_features.Add(featureURI);
-            return i;
-        }
-
-        /// <summary>
-        /// List of features
-        /// </summary>
-        /// <returns></returns>
-        public DiscoFeature[] GetFeatures()
-        {
-            return GetElements<DiscoFeature>().ToArray();
-        }
-
-        /// <summary>
-        /// Is the given feature URI supported by this entity?
-        /// </summary>
-        /// <param name="featureURI">The URI to check</param>
-        /// <returns></returns>
-        public bool HasFeature(string featureURI)
-        {
-            if (m_features != null)
-                return m_features.Contains(featureURI);
-
-            foreach (DiscoFeature feat in GetElements<DiscoFeature>())
-            {
-                if (feat.Var == featureURI)
-                    return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Clear all of the features from the 
-        /// </summary>
-        public void ClearFeatures()
-        {
-            this.RemoveElems<DiscoFeature>();
-            m_features = null;
-        }
-
-        /// <summary>
-        /// Get or set a compressed set of features.
-        /// Setting this has the side-effect of removing all existing features, and
-        /// replacing them with the specified ones.
-        /// </summary>
-        public StringSet FeatureSet
-        {
-            get
-            {
-                if (m_features == null)
-                {
-                    m_features = new StringSet();
-                    foreach (DiscoFeature f in GetElements<DiscoFeature>())
-                        m_features.Add(f.Var);
-                }
-                return m_features;
-            }
-            set
-            {
-                ClearFeatures();
-                m_features = new StringSet();
-                foreach (string s in value)
-                    AddFeature(s);
-            }
-        }
-
-        /// <summary>
-        /// Create a XEP-0128 x:data extension, or return the first existing one.
-        /// </summary>
-        /// <returns></returns>
-        public Data CreateExtension()
-        {
-            Data d = GetOrCreateElement<Data>();
-            d.Type = XDataType.result;
-            return d;
-        }
-
-        /// <summary>
-        /// Get or set the first XEP-0128 x:data extension.
-        /// </summary>
-        public Data Extension
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild<Data>(value); }
-        }
-
-        /// <summary>
-        /// In the unlikely event that there are multiple extensions, we need to be able
-        /// to retrieve all of them.  
-        /// </summary>
-        /// <returns></returns>
-        public Data[] GetExtensions()
-        {
-            return GetElements<Data>().ToArray();
-        }
-
-        /// <summary>
-        /// Get the extension with the given XEP-0068 form type.
-        /// </summary>
-        /// <param name="formType">The value of the FORM_TYPE field to search for.</param>
-        /// <returns>null if none found</returns>
-        public Data GetExtension(string formType)
-        {
-            foreach (Data d in GetElements<Data>())
-            {
-                if (d.FormType == formType)
-                    return d;
-            }
-            return null;
-        }
-    }
-
-    /// <summary>
-    /// The identitiy associated with a disco node.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoIdentity : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoIdentity(XmlDocument doc) : base("identity", URI.DISCO_INFO, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public DiscoIdentity(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The user-visible name of this node
-        /// </summary>
-        public string Named
-        {
-            get { return GetAttr("name"); }
-            set { SetAttr("name", value); }
-        }
-
-        /// <summary>
-        /// The category of the node
-        /// </summary>
-        public string Category
-        {
-            get { return GetAttr("category"); }
-            set { SetAttr("category", value); }
-        }
-
-        /// <summary>
-        /// The type of the node
-        /// </summary>
-        public string Type
-        {
-            get { return GetAttr("type"); }
-            set { SetAttr("type", value); }
-        }
-
-    }
-
-    /// <summary>
-    /// A feature associated with a disco node.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class DiscoFeature : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public DiscoFeature(XmlDocument doc) : base("feature", URI.DISCO_INFO, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public DiscoFeature(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The namespace name or feature name.
-        /// </summary>
-        public string Var
-        {
-            get { return GetAttr("var"); }
-            set { SetAttr("var", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Factory.cs b/lib/jabber-net/jabber/protocol/iq/Factory.cs
deleted file mode 100644
index a1c9450..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Factory.cs
+++ /dev/null
@@ -1,151 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// ElementFactory for all currently supported IQ namespaces.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Factory : IPacketTypes
-    {
-        private static QnameType[] s_qnt = new QnameType[]
-        {
-            new QnameType("query", URI.AUTH,     typeof(jabber.protocol.iq.Auth)),
-            new QnameType("query", URI.REGISTER, typeof(jabber.protocol.iq.Register)),
-            new QnameType("query", URI.ROSTER,   typeof(jabber.protocol.iq.Roster)),
-            new QnameType("item",  URI.ROSTER,   typeof(jabber.protocol.iq.Item)),
-            new QnameType("group", URI.ROSTER,   typeof(jabber.protocol.iq.Group)),
-            new QnameType("query", URI.AGENTS,   typeof(jabber.protocol.iq.AgentsQuery)),
-            new QnameType("agent", URI.AGENTS,   typeof(jabber.protocol.iq.Agent)),
-            new QnameType("query", URI.OOB,      typeof(jabber.protocol.iq.OOB)),
-            new QnameType("query", URI.TIME,     typeof(jabber.protocol.iq.Time)),
-            new QnameType("query", URI.VERSION,  typeof(jabber.protocol.iq.Version)),
-            new QnameType("query", URI.LAST,     typeof(jabber.protocol.iq.Last)),
-            new QnameType("item",  URI.BROWSE,   typeof(jabber.protocol.iq.Browse)),
-            new QnameType("geoloc",URI.GEOLOC,   typeof(jabber.protocol.iq.GeoLoc)),
-            
-            
-            new QnameType("query",      URI.PRIVATE,   typeof(jabber.protocol.iq.Private)),
-            new QnameType("storage",    URI.BOOKMARKS, typeof(jabber.protocol.iq.Bookmarks)),
-            new QnameType("url",        URI.BOOKMARKS, typeof(jabber.protocol.iq.BookmarkURL)),
-            new QnameType("conference", URI.BOOKMARKS, typeof(jabber.protocol.iq.BookmarkConference)),
-            new QnameType("note",       URI.BOOKMARKS, typeof(jabber.protocol.iq.BookmarkNote)),
-
-            // VCard
-            new QnameType("vCard", URI.VCARD, typeof(jabber.protocol.iq.VCard)),
-            new QnameType("N",     URI.VCARD, typeof(jabber.protocol.iq.VCard.VName)),
-            new QnameType("ORG",   URI.VCARD, typeof(jabber.protocol.iq.VCard.VOrganization)),
-            new QnameType("TEL",   URI.VCARD, typeof(jabber.protocol.iq.VCard.VTelephone)),
-            new QnameType("EMAIL", URI.VCARD, typeof(jabber.protocol.iq.VCard.VEmail)),
-            new QnameType("GEO",   URI.VCARD, typeof(jabber.protocol.iq.VCard.VGeo)),
-            new QnameType("PHOTO", URI.VCARD, typeof(jabber.protocol.iq.VCard.VPhoto)),
-            new QnameType("ADR", URI.VCARD, typeof(jabber.protocol.iq.VCard.VAddress)),
-
-            // Disco
-            new QnameType("query",    URI.DISCO_ITEMS, typeof(jabber.protocol.iq.DiscoItems)),
-            new QnameType("item",     URI.DISCO_ITEMS, typeof(jabber.protocol.iq.DiscoItem)),
-            new QnameType("query",    URI.DISCO_INFO, typeof(jabber.protocol.iq.DiscoInfo)),
-            new QnameType("identity", URI.DISCO_INFO, typeof(jabber.protocol.iq.DiscoIdentity)),
-            new QnameType("feature",  URI.DISCO_INFO, typeof(jabber.protocol.iq.DiscoFeature)),
-
-            // PubSub
-            new QnameType("pubsub",        URI.PUBSUB, typeof(jabber.protocol.iq.PubSub)),
-            new QnameType("affiliations",  URI.PUBSUB, typeof(jabber.protocol.iq.Affiliations)),
-            new QnameType("create",        URI.PUBSUB, typeof(jabber.protocol.iq.Create)),
-            new QnameType("items",         URI.PUBSUB, typeof(jabber.protocol.iq.Items)),
-            new QnameType("publish",       URI.PUBSUB, typeof(jabber.protocol.iq.Publish)),
-            new QnameType("retract",       URI.PUBSUB, typeof(jabber.protocol.iq.Retract)),
-            new QnameType("subscribe",     URI.PUBSUB, typeof(jabber.protocol.iq.Subscribe)),
-            new QnameType("subscriptions", URI.PUBSUB, typeof(jabber.protocol.iq.Subscriptions)),
-            new QnameType("unsubscribe",   URI.PUBSUB, typeof(jabber.protocol.iq.Unsubscribe)),
-
-            new QnameType("configure",     URI.PUBSUB, typeof(jabber.protocol.iq.Configure)),
-            new QnameType("options",       URI.PUBSUB, typeof(jabber.protocol.iq.PubSubOptions)),
-            new QnameType("affiliation",   URI.PUBSUB, typeof(jabber.protocol.iq.Affiliation)),
-            new QnameType("item",          URI.PUBSUB, typeof(jabber.protocol.iq.PubSubItem)),
-            new QnameType("subscription",  URI.PUBSUB, typeof(jabber.protocol.iq.PubSubSubscription)),
-
-            // Pubsub event notifications
-            new QnameType("event",         URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.PubSubEvent)),
-            new QnameType("associate",     URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventAssociate)),
-            new QnameType("collection",    URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventCollection)),
-            new QnameType("configuration", URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventConfiguration)),
-            new QnameType("disassociate",  URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventDisassociate)),
-            new QnameType("items",         URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventItems)),
-            new QnameType("item",          URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.PubSubItem)),
-            new QnameType("purge",         URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventPurge)),
-            new QnameType("retract",       URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventRetract)),
-            new QnameType("subscription",  URI.PUBSUB_EVENT, typeof(jabber.protocol.iq.EventSubscription)),
-
-            // Pubsub owner use cases
-            new QnameType("pubsub",        URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.PubSubOwner)),
-            new QnameType("affiliations",  URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerAffliliations)),
-            new QnameType("affiliation",   URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerAffiliation)),
-            new QnameType("configure",     URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerConfigure)),
-            new QnameType("default",       URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerDefault)),
-            new QnameType("delete",        URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerDelete)),
-            new QnameType("purge",         URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerPurge)),
-            new QnameType("subscriptions", URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.OwnerSubscriptions)),
-            new QnameType("subscription",  URI.PUBSUB_OWNER, typeof(jabber.protocol.iq.PubSubSubscription)),
-
-            // Pubsub errors
-            new QnameType("closed-node",                    URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.ClosedNode)),
-            new QnameType("configuration-required",         URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.ConfigurationRequired)),
-            new QnameType("invalid-jid",                    URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.InvalidJID)),
-            new QnameType("invalid-options",                URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.InvalidOptions)),
-            new QnameType("invalid-payload",                URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.InvalidPayload)),
-            new QnameType("invalid-subid",                  URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.InvalidSubid)),
-            new QnameType("item-forbidden",                 URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.ItemForbidden)),
-            new QnameType("item-required",                  URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.ItemRequired)),
-            new QnameType("jid-required",                   URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.JIDRequired)),
-            new QnameType("max-items-exceeded",             URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.MaxItemsExceeded)),
-            new QnameType("max-nodes-exceeded",             URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.MaxNodesExceeded)),
-            new QnameType("nodeid-required",                URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.NodeIDRequired)),
-            new QnameType("not-in-roster-group",            URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.NotInRosterGroup)),
-            new QnameType("not-subscribed",                 URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.NotSubscribed)),
-            new QnameType("payload-too-big",                URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.PayloadTooBig)),
-            new QnameType("payload-required",               URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.PayloadRequired)),
-            new QnameType("pending-subscription",           URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.PendingSubscription)),
-            new QnameType("presence-subscription-required", URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.PresenceSubscriptionRequired)),
-            new QnameType("subid-required",                 URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.SubidRequired)),
-            new QnameType("unsupported",                    URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.Unsupported)),
-            new QnameType("unsupported-access-model",       URI.PUBSUB_ERRORS, typeof(jabber.protocol.iq.UnsupportedAccessModel)),
-
-            // Multi-user chat
-            new QnameType("x",       URI.MUC, typeof(jabber.protocol.iq.RoomX)),
-            new QnameType("history", URI.MUC, typeof(jabber.protocol.iq.History)),
-
-            new QnameType("x",       URI.MUC_USER, typeof(jabber.protocol.iq.UserX)),
-            new QnameType("decline", URI.MUC_USER, typeof(jabber.protocol.iq.Decline)),
-            new QnameType("invite",  URI.MUC_USER, typeof(jabber.protocol.iq.Invite)),
-            new QnameType("destroy", URI.MUC_USER, typeof(jabber.protocol.iq.Destroy)),
-            new QnameType("item",    URI.MUC_USER, typeof(jabber.protocol.iq.RoomItem)),
-            new QnameType("actor",   URI.MUC_USER, typeof(jabber.protocol.iq.RoomActor)),
-
-            new QnameType("query",   URI.MUC_ADMIN, typeof(jabber.protocol.iq.AdminQuery)),
-            new QnameType("item",    URI.MUC_ADMIN, typeof(jabber.protocol.iq.AdminItem)),
-
-            new QnameType("query",   URI.MUC_OWNER, typeof(jabber.protocol.iq.OwnerQuery)),
-            new QnameType("destroy", URI.MUC_OWNER, typeof(jabber.protocol.iq.OwnerDestroy)),
-        };
-
-        QnameType[] IPacketTypes.Types { get { return s_qnt; } }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/GeoLoc.cs b/lib/jabber-net/jabber/protocol/iq/GeoLoc.cs
deleted file mode 100644
index 964a0c9..0000000
--- a/lib/jabber-net/jabber/protocol/iq/GeoLoc.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Diagnostics;
-using System.Security.Cryptography;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// A GeoLoc IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class GeoLocIQ : jabber.protocol.client.TypedIQ<GeoLoc>
-    {
-        /// <summary>
-        /// Create a GeoLoc IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public GeoLocIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Geographic location.  See http://www.xmpp.org/extensions/xep-0080.html.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class GeoLoc : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public GeoLoc(XmlDocument doc) :
-            base("geoloc", URI.GEOLOC, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public GeoLoc(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        ///  Altitude above/below sea level, in meters.
-        /// </summary>
-        public double Altitude
-
-        {
-            get { return double.Parse(GetElem("alt")); }
-            set { SetElem("alt", value.ToString()); }
-        }
-
-        /// <summary>
-        /// Assuming decimal degrees to true north.
-        /// Note: this is being further specified in the XEP.
-        /// </summary>
-        public double Bearing
-        {
-            get { return double.Parse(GetElem("bearing")); }
-            set { SetElem("bearing", value.ToString()); }
-        }
-
-        /// <summary>
-        /// GPS datum, defaults to WGS84.
-        /// </summary>
-        public string Datum
-        {
-            get
-            {
-                string datum = GetElem("datum");
-                if ((datum == null) || (datum == ""))
-                    datum = "WGS84";
-                return datum;
-            }
-            set { SetElem("datum", value); }
-        }
-
-        /// <summary>
-        /// A natural-language description of the location.
-        /// </summary>
-        public string Description
-        {
-            get { return GetElem("description"); }
-            set { SetElem("description", value); }
-        }
-
-        /// <summary>
-        /// Horizontal GPS error in arc minutes.
-        /// </summary>
-        public double Error
-        {
-            get { return double.Parse(GetElem("error")); }
-            set { SetElem("error", value.ToString()); }
-        }
-
-        /// <summary>
-        /// Latitude in decimal degrees North.
-        /// </summary>
-        public double Latitude
-        {
-            get { return double.Parse(GetElem("lat")); }
-            set { SetElem("lat", value.ToString()); }
-        }
-
-        /// <summary>
-        /// Longitude in decimal degrees East.
-        /// </summary>
-        public double Longitude
-        {
-            get { return double.Parse(GetElem("lon")); }
-            set { SetElem("lon", value.ToString()); }
-        }
-
-        /// <summary>
-        /// UTC timestamp specifying the moment when the reading was taken.
-        /// </summary>
-        public DateTime Timestamp
-        {
-            get { return DateTimeProfile(GetElem("timestamp")); }
-            set { SetElem("timestamp", DateTimeProfile(value)); }
-        }
-
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Last.cs b/lib/jabber-net/jabber/protocol/iq/Last.cs
deleted file mode 100644
index 17aa73b..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Last.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /*
-     *  <iq id='l4' type='result' from='user at host'>
-     *    <query xmlns='jabber:iq:last' seconds='903'>
-     *      Heading home
-     *    </query>
-     *  </iq>
-     */
-    /// <summary>
-    /// IQ packet with an Last query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class LastIQ : jabber.protocol.client.TypedIQ<Last>
-    {
-        /// <summary>
-        /// Create a Last IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public LastIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A Last query element, which requests the last activity from an entity.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Last : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Last(XmlDocument doc) : base("query", URI.LAST, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Last(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The message inside the Last element.
-        /// </summary>
-        public string Message
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-
-        /// <summary>
-        /// How many seconds since the last activity.
-        /// </summary>
-        public int Seconds
-        {
-            get { return GetIntAttr("seconds");}
-            set { SetAttribute("seconds", value.ToString()); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/MUC.cs b/lib/jabber-net/jabber/protocol/iq/MUC.cs
deleted file mode 100644
index 863ad1a..0000000
--- a/lib/jabber-net/jabber/protocol/iq/MUC.cs
+++ /dev/null
@@ -1,1145 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-
-namespace jabber.protocol.iq
-{
-#region enums
-    /// <summary>
-    /// Affiliation with a MUC room, per user.
-    /// </summary>
-    public enum RoomAffiliation
-    {
-        /// <summary>
-        /// No attribute specified
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// Administrator
-        /// </summary>
-        admin = 0,
-        /// <summary>
-        /// Member
-        /// </summary>
-        member,
-        /// <summary>
-        /// No affiliation
-        /// </summary>
-        none,
-        /// <summary>
-        /// Banned
-        /// </summary>
-        outcast,
-        /// <summary>
-        /// Room owner
-        /// </summary>
-        owner,
-    }
-
-    /// <summary>
-    /// Current role in the room.  Initial role is set by affiliation, if it exits.
-    /// </summary>
-    public enum RoomRole
-    {
-        /// <summary>
-        /// No attribute specified
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// Room moderator.  Can grant/revoke voice
-        /// </summary>
-        moderator = 0,
-        /// <summary>
-        /// No role
-        /// </summary>
-        none,
-        /// <summary>
-        /// Can speak
-        /// </summary>
-        participant,
-        /// <summary>
-        /// Can listen
-        /// </summary>
-        visitor,
-    }
-
-    /// <summary>
-    /// Possible room status values.
-    /// </summary>
-    public enum RoomStatus
-    {
-        /// <summary>
-        /// An invalid or unknown RoomStatus
-        /// </summary>
-        UNKNOWN = -1,
-
-        /// <summary>
-        /// Inform user that any occupant is allowed to see the user's full JID.
-        /// </summary>
-        NON_ANONYMOUS_JOIN = 100,
-
-        /// <summary>
-        /// Inform user that his or her affiliation changed while not in the room
-        /// </summary>
-        AFILLIATION_CHANGE = 101,
-
-        /// <summary>
-        /// Inform occupants that room now shows unavailable members
-        /// </summary>
-        SHOW_UNAVAILABLE = 102,
-
-        /// <summary>
-        /// Inform occupants that room now does not show unavailable members
-        /// </summary>
-        NO_SHOW_UNAVAILABLE = 103,
-
-        /// <summary>
-        /// Inform occupants that a non-privacy-related room configuration change has occurred
-        /// </summary>
-        PRIVACY_CHANGE = 104,
-
-        /// <summary>
-        /// Inform user that presence refers to one of its own room occupants
-        /// </summary>
-        SELF = 110,
-
-        /// <summary>
-        /// Inform occupants that room logging is now enabled
-        /// </summary>
-        LOGGING_ENABLED = 170,
-
-        /// <summary>
-        /// Inform occupants that room logging is now disabled
-        /// </summary>
-        LOGGING_DISABLED = 171,
-
-        /// <summary>
-        /// Inform occupants that the room is now non-anonymous
-        /// </summary>
-        NON_ANONYMOUS = 172,
-
-        /// <summary>
-        /// Inform occupants that the room is now semi-anonymous
-        /// </summary>
-        SEMI_ANONYMOUS = 173,
-
-        /// <summary>
-        /// Inform occupants that the room is now fully-anonymous
-        /// </summary>
-        ANONYMOUS = 174,
-
-        /// <summary>
-        /// Inform user that a new room has been created
-        /// </summary>
-        CREATED = 201,
-
-        /// <summary>
-        /// Inform user that service has assigned or modified occupant's roomnick
-        /// </summary>
-        NICK_CHANGED = 210,
-
-        /// <summary>
-        /// Inform user that he or she has been banned from the room
-        /// </summary>
-        BANNED = 301,
-
-        /// <summary>
-        /// Inform all occupants of new room nickname
-        /// </summary>
-        NEW_NICK = 303,
-
-        /// <summary>
-        /// Inform user that he or she has been kicked from the room
-        /// </summary>
-        KICKED = 307,
-
-        /// <summary>
-        /// Inform user that he or she is being removed from the room
-        /// because of an affiliation change
-        /// </summary>
-        REMOVED_AFFILIATION = 321,
-
-        /// <summary>
-        /// Inform user that he or she is being removed from the room
-        /// because the room has been changed to members-only and the user
-        /// is not a member
-        /// </summary>
-        REMOVED_NONMEMBER = 322,
-
-        /// <summary>
-        /// Inform user that he or she is being removed from the room
-        /// because of a system shutdown
-        /// </summary>
-        REMOVED_SHUTDOWN = 332,
-    }
-#endregion
-
-#region base protocol
-    /// <summary>
-    /// Presence to join a multi-user chat.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomPresence : jabber.protocol.client.Presence
-    {
-        /// <summary>
-        /// Create, taking default room history, with no password.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="roomAndNick">A jid of the form room at conferenceServer/nick, where nick is the desired
-        /// room nickname for this user</param>
-        public RoomPresence(XmlDocument doc, JID roomAndNick)
-            : base(doc)
-        {
-            this.To = roomAndNick;
-            this.CreateChildElement<RoomX>();
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="roomAndNick"></param>
-        /// <param name="password">Null for non-password rooms</param>
-        /// TODO: getHistory?
-        public RoomPresence(XmlDocument doc, JID roomAndNick, string password)
-            : base(doc)
-        {
-            this.To = roomAndNick;
-            this.CreateChildElement<RoomX>().Password = password;
-        }
-
-        /// <summary>
-        /// The X tag denoting MUC-ness.  Use this to access passord and history
-        /// after creation.
-        /// </summary>
-        public RoomX X
-        {
-            get { return GetChildElement<RoomX>(); }
-            set { ReplaceChild<RoomX>(value); }
-        }
-    }
-
-
-    /// <summary>
-    /// X tag for presence when joining a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomX : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public RoomX(XmlDocument doc)
-            : base("x", URI.MUC, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public RoomX(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Password to join room.  Null for no password.
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-
-        /// <summary>
-        /// Add a history element, or return the existing one.
-        /// </summary>
-        /// <returns></returns>
-        public History AddHistory()
-        {
-            return GetOrCreateElement<History>();
-        }
-
-        /// <summary>
-        /// History options
-        /// </summary>
-        public History History
-        {
-            get { return GetChildElement<History>(); }
-            set { this.ReplaceChild<History>(value); }
-        }
-    }
-
-    /// <summary>
-    /// How much history to retrieve upon joining a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class History : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public History(XmlDocument doc)
-            : base("history", URI.MUC, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public History(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Maximum number of characters.  -1 if not specified.
-        /// </summary>
-        public int MaxChars
-        {
-            get { return GetIntAttr("maxchars"); }
-            set { SetIntAttr("maxchars", value); }
-        }
-        /// <summary>
-        /// Maximum number of stanzas.  -1 if not specified.
-        /// </summary>
-        public int MaxStanzas
-        {
-            get { return GetIntAttr("maxstanzas"); }
-            set { SetIntAttr("maxstanzas", value); }
-        }
-        /// <summary>
-        /// Number of seconds of history to retreive.
-        /// </summary>
-        public int Seconds
-        {
-            get { return GetIntAttr("seconds"); }
-            set { SetIntAttr("seconds", value); }
-        }
-        /// <summary>
-        /// Date of earliest history desired.
-        /// DateTime.MinValue for not specified.
-        /// </summary>
-        public DateTime since
-        {
-            get { return GetDateTimeAttr("since"); }
-            set { SetDateTimeAttr("since", value); }
-        }
-    }
-#endregion
-
-
-#region Users
-    /// <summary>
-    /// Information about users
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class UserX : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public UserX(XmlDocument doc)
-            : base("x", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public UserX(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Add a decline element, or return the existing one.
-        /// </summary>
-        /// <returns></returns>
-        public Decline AddDecline()
-        {
-            return GetOrCreateElement<Decline>();
-        }
-
-        /// <summary>
-        /// Invite was declined
-        /// </summary>
-        public Decline Decline
-        {
-            get { return GetChildElement<Decline>(); }
-            set { ReplaceChild<Decline>(value); }
-        }
-
-        /// <summary>
-        /// Add a destroy element, or return the existing one.
-        /// </summary>
-        /// <returns></returns>
-        public Destroy AddDestroy()
-        {
-            return GetOrCreateElement<Destroy>();
-        }
-
-        /// <summary>
-        /// Room was destroyed
-        /// </summary>
-        public Destroy Destroy
-        {
-            get { return GetChildElement<Destroy>();  }
-            set { ReplaceChild<Destroy>(value); }
-        }
-
-        /// <summary>
-        /// The list of invites
-        /// </summary>
-        public Invite[] GetInvites()
-        {
-            return GetElements<Invite>().ToArray();
-        }
-
-        /// <summary>
-        /// Add new invite
-        /// </summary>
-        /// <param name="to">Who to send the invite to?</param>
-        /// <param name="reason">Why?  Null if none.</param>
-        /// <returns></returns>
-        public Invite AddInvite(JID to, string reason)
-        {
-            Invite inv = CreateChildElement<Invite>();
-            inv.To = to;
-            if (reason != null)
-                inv.Reason = reason;
-            return inv;
-        }
-
-        /// <summary>
-        /// Add a room item element, or return the existing one.
-        /// </summary>
-        /// <returns></returns>
-        public RoomItem AddRoomItem()
-        {
-            return GetOrCreateElement<RoomItem>();
-        }
-
-        /// <summary>
-        /// The associated item
-        /// </summary>
-        public RoomItem RoomItem
-        {
-            get { return GetChildElement<RoomItem>(); }
-            set { ReplaceChild<RoomItem>(value); }
-        }
-
-        /// <summary>
-        /// The password to join the room.
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-
-        /// <summary>
-        /// Sorted list of statuses of the request.
-        /// </summary>
-        /// <exception cref="FormatException">Invalid code</exception>
-        public RoomStatus[] Status
-        {
-            get
-            {
-                XmlNodeList nl = this.GetElementsByTagName("status");
-                RoomStatus[] ret = new RoomStatus[nl.Count];
-                int i = 0;
-                foreach (XmlElement status in nl)
-                {
-                    try
-                    {
-                        ret[i] = (RoomStatus)int.Parse(status.GetAttribute("code"));
-                    }
-                    catch
-                    {
-                        ret[i] = RoomStatus.UNKNOWN;
-                    }
-                    i++;
-                }
-                Array.Sort(ret);
-                return ret;
-            }
-            set
-            {
-                RemoveElems("status");
-                foreach (RoomStatus i in value)
-                {
-                    XmlElement status = this.OwnerDocument.CreateElement("status");
-                    status.SetAttribute("code", ((int)i).ToString());
-                    this.AppendChild(status);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Did we receive a given status?
-        /// </summary>
-        /// <param name="status"></param>
-        /// <returns></returns>
-        public bool HasStatus(RoomStatus status)
-        {
-            string s = ((int)status).ToString();
-            XmlNodeList nl = this.GetElementsByTagName("status");
-            foreach (XmlElement stat in nl)
-            {
-                if (s == stat.GetAttribute("code"))
-                    return true;
-            }
-            return false;
-        }
-    }
-
-    /// <summary>
-    /// Invitee Declines Invitation
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Decline : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Decline(XmlDocument doc)
-            : base("decline", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Decline(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The From address
-        /// </summary>
-        public JID From
-        {
-            get
-            {
-                string from = this.GetAttr("from");
-                if (from == null)
-                    return null;
-                return new JID(from);
-            }
-            set { SetAttr("from", (string)value); }
-        }
-
-        /// <summary>
-        /// The TO address
-        /// </summary>
-        public JID To
-        {
-            get
-            {
-                string to = this.GetAttr("to");
-                if (to == null)
-                    return null;
-                return new JID(to);
-            }
-            set { SetAttr("to", (string)value); }
-        }
-
-        /// <summary>
-        /// The reason the invitation was declined.  May be null.
-        /// </summary>
-        public string Reason
-        {
-            get { return GetElem("reason"); }
-            set { SetElem("reason", value); }
-        }
-    }
-
-    /// <summary>
-    /// An invite to a room
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Invite : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Invite(XmlDocument doc)
-            : base("invite", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Invite(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The From address
-        /// </summary>
-        public JID From
-        {
-            get
-            {
-                string from = this.GetAttr("from");
-                if (from == null)
-                    return null;
-                return new JID(from);
-            }
-            set { SetAttr("from", (string)value); }
-        }
-
-        /// <summary>
-        /// The TO address
-        /// </summary>
-        public JID To
-        {
-            get
-            {
-                string to = this.GetAttr("to");
-                if (to == null)
-                    return null;
-                return new JID(to);
-            }
-            set { SetAttr("to", (string)value); }
-        }
-
-        /// <summary>
-        /// The reason the invitation was declined.  May be null.
-        /// </summary>
-        public string Reason
-        {
-            get { return GetElem("reason"); }
-            set { SetElem("reason", value); }
-        }
-    }
-
-    /// <summary>
-    /// A room was destroyed
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Destroy : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Destroy(XmlDocument doc)
-            : base("destroy", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Destroy(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The JID of the destroyer
-        /// </summary>
-        public JID JID
-        {
-            get
-            {
-                string jid = this.GetAttr("jid");
-                if (jid == null)
-                    return null;
-                return new JID(jid);
-            }
-            set { SetAttr("jid", (string)value); }
-        }
-
-        /// <summary>
-        /// The reason the room was destroyed.  May be null.
-        /// </summary>
-        public string Reason
-        {
-            get { return GetElem("reason"); }
-            set { SetElem("reason", value); }
-        }
-    }
-
-    /// <summary>
-    /// Item associated with a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomItem : AdminItem
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public RoomItem(XmlDocument doc)
-            : base("item", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public RoomItem(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// This is a continuation from 1-to-1 chat.  Not widely implemented yet.
-        /// </summary>
-        public bool Continue
-        {
-            get
-            {
-                XmlElement c = this["continue", URI.MUC_USER];
-                return (c != null);
-            }
-            set
-            {
-                if (value)
-                    GetOrCreateElement("continue", URI.MUC_USER, null);
-                else
-                    RemoveElem("continue");
-            }
-        }
-    }
-
-    /// <summary>
-    /// The JID associated with an item
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomActor : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public RoomActor(XmlDocument doc)
-            : base("actor", URI.MUC_USER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public RoomActor(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The JID of the destroyer
-        /// </summary>
-        public JID JID
-        {
-            get
-            {
-                string jid = this.GetAttr("jid");
-                if (jid == null)
-                    return null;
-                return new JID(jid);
-            }
-            set { SetAttr("jid", (string)value); }
-        }
-    }
-#endregion
-
-#region admin
-    /// <summary>
-    /// An IQ with a AdminQuery inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RoomAdminIQ : jabber.protocol.client.TypedIQ<AdminQuery>
-    {
-        /// <summary>
-        /// Create a admin IQ, with a single muc#admin query element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public RoomAdminIQ(XmlDocument doc)
-            : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Moderator use cases
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AdminQuery : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public AdminQuery(XmlDocument doc)
-            : base("query", URI.MUC_ADMIN, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public AdminQuery(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The list of invites
-        /// </summary>
-        public AdminItem[] GetItems()
-        {
-            XmlNodeList nl = GetElementsByTagName("item", URI.MUC_ADMIN);
-            AdminItem[] items = new AdminItem[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                items[i] = (AdminItem)n;
-                i++;
-            }
-            return items;
-        }
-
-        /// <summary>
-        /// Add new item
-        /// </summary>
-        /// <returns></returns>
-        public AdminItem AddItem()
-        {
-            AdminItem item = new AdminItem(this.OwnerDocument);
-            this.AddChild(item);
-            return item;
-        }
-    }
-
-
-    /// <summary>
-    /// Item associated with a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AdminItem : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public AdminItem(XmlDocument doc)
-            : base("item", URI.MUC_ADMIN, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public AdminItem(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Pass through.  I really wish C# would let me just call grand-superclass constructors.
-        /// </summary>
-        /// <param name="localName"></param>
-        /// <param name="namespaceURI"></param>
-        /// <param name="doc"></param>
-        protected AdminItem(string localName, string namespaceURI, XmlDocument doc)
-            : base(localName, namespaceURI, doc)
-        {
-        }
-
-        /// <summary>
-        /// The JID associated with this item
-        /// </summary>
-        public RoomActor Actor
-        {
-            get { return GetOrCreateElement("actor", null, typeof(RoomActor)) as RoomActor; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// The reason the room was destroyed.  May be null.
-        /// </summary>
-        public string Reason
-        {
-            get { return GetElem("reason"); }
-            set { SetElem("reason", value); }
-        }
-
-        /// <summary>
-        /// The affiliation of the item
-        /// </summary>
-        public RoomAffiliation Affiliation
-        {
-            get { return (RoomAffiliation)GetEnumAttr("affiliation", typeof(RoomAffiliation)); }
-            set { SetEnumAttr("affiliation", value); }
-        }
-
-        /// <summary>
-        /// The role of the item
-        /// </summary>
-        public RoomRole Role
-        {
-            get { return (RoomRole)GetEnumAttr("role", typeof(RoomRole)); }
-            set { SetEnumAttr("role", value); }
-        }
-
-        /// <summary>
-        /// The JID of the item
-        /// </summary>
-        public JID JID
-        {
-            get
-            {
-                string jid = this.GetAttr("jid");
-                if (jid == null)
-                    return null;
-                return new JID(jid);
-            }
-            set { SetAttr("jid", (string)value); }
-        }
-
-        /// <summary>
-        /// The nickname of the item
-        /// </summary>
-        public string Nick
-        {
-            get { return GetAttr("nick"); }
-            set { SetAttr("nick", value); }
-        }
-    }
-#endregion
-
-#region owner
-    /// <summary>
-    /// IQ with an OwnerQuery inside
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerIQ : jabber.protocol.client.TypedIQ<OwnerQuery>
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerIQ(XmlDocument doc)
-            : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// The query element inside an owner IQ.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerQuery : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerQuery(XmlDocument doc)
-            : base("query", URI.MUC_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerQuery(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The jabber:x:data form for configuration
-        /// </summary>
-        public jabber.protocol.x.Data Form
-        {
-            get { return GetOrCreateElement("x", URI.XDATA, typeof(jabber.protocol.x.Data)) as jabber.protocol.x.Data; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// Should we destroy the room?
-        /// </summary>
-        public OwnerDestroy Destroy
-        {
-            get { return GetOrCreateElement("destroy", URI.MUC_OWNER, typeof(OwnerDestroy)) as OwnerDestroy; }
-            set { ReplaceChild(value); }
-        }
-    }
-
-    /// <summary>
-    /// Destroy the room
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerDestroy : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerDestroy(XmlDocument doc)
-            : base("destroy", URI.MUC_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerDestroy(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Password to destroy room.  Null for no password.
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-
-        /// <summary>
-        /// Reason to destroy room.  Null for no reason.
-        /// </summary>
-        public string Reason
-        {
-            get { return GetElem("reason"); }
-            set { SetElem("reason", value); }
-        }
-
-        /// <summary>
-        /// The JID of the destroyer.
-        /// </summary>
-        public JID JID
-        {
-            get
-            {
-                string jid = this.GetAttr("jid");
-                if (jid == null)
-                    return null;
-                return new JID(jid);
-            }
-            set { SetAttr("jid", (string)value); }
-        }
-    }
-#endregion
-
-    /// <summary>
-    /// Request for a unique room name.  Seems like just using a GUID on the
-    /// create request would be enough, but it's in XEP-45.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class UniqueIQ : jabber.protocol.client.IQ
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public UniqueIQ(XmlDocument doc)
-            : base(doc)
-        {
-            AppendChild(new UniqueRoom(doc));
-        }
-    }
-
-    /// <summary>
-    /// A unique name for a room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class UniqueRoom : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public UniqueRoom(XmlDocument doc)
-            : base("unique", URI.MUC_UNIQUE, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public UniqueRoom(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The room name returned by the server.  Note: must add conference server to this,
-        /// it is just the node.
-        /// </summary>
-        public string RoomNode
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/OOB.cs b/lib/jabber-net/jabber/protocol/iq/OOB.cs
deleted file mode 100644
index 8e7fcff..0000000
--- a/lib/jabber-net/jabber/protocol/iq/OOB.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /*
-     * <iq type="set" to="horatio at denmark" from="sailor at sea" id="i_oob_001">
-     *   <query xmlns="jabber:iq:oob">
-     *     <url>http://denmark/act4/letter-1.html</url>
-     *     <desc>There's a letter for you sir.</desc>
-     *   </query>
-     * </iq>
-     */
-    /// <summary>
-    /// IQ packet with an oob query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OobIQ : jabber.protocol.client.TypedIQ<OOB>
-    {
-        /// <summary>
-        /// Create an OOB IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OobIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An oob query element for file transfer.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OOB : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public OOB(XmlDocument doc) : base("query", URI.OOB, doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OOB(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// URL to send/receive from
-        /// </summary>
-        public string Url
-        {
-            get { return GetElem("url"); }
-            set { SetElem("url", value); }
-        }
-
-        /// <summary>
-        /// File description
-        /// </summary>
-        public string Desc
-        {
-            get { return GetElem("desc"); }
-            set { SetElem("desc", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Private.cs b/lib/jabber-net/jabber/protocol/iq/Private.cs
deleted file mode 100644
index 167fc74..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Private.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// Private storage IQ.
-    /// See XEP-0049 (http://www.xmpp.org/extensions/xep-0049.html)
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PrivateIQ : jabber.protocol.client.TypedIQ<Private>
-    {
-        /// <summary>
-        /// Create an IQ for the jabber:iq:private namespace.
-        /// Make sure to add a body to the query before sending.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PrivateIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Private storage query.
-    /// See XEP-0049 (http://www.xmpp.org/extensions/xep-0049.html)
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Private : Element
-    {
-        /// <summary>
-        /// Create for outbound
-        /// </summary>
-        /// <param name="doc"></param>
-        public Private(XmlDocument doc) : 
-            base("query", URI.PRIVATE, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Private(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/PubSub.cs b/lib/jabber-net/jabber/protocol/iq/PubSub.cs
deleted file mode 100644
index 7c0559c..0000000
--- a/lib/jabber-net/jabber/protocol/iq/PubSub.cs
+++ /dev/null
@@ -1,1278 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.x;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// Different pubsub operations
-    /// </summary>
-    public enum PubSubCommandType
-    {
-        /// <summary>
-        /// Retrieve the affiliations.  See: http://www.xmpp.org/extensions/xep-0060.html#entity-affiliations
-        /// </summary>
-        affiliations,
-        /// <summary>
-        /// Create a node. See: http://www.xmpp.org/extensions/xep-0060.html#owner-create
-        /// </summary>
-        create,
-        /// <summary>
-        /// Retrieve the items for a node. See http://www.xmpp.org/extensions/xep-0060.html#subscriber-retrieve
-        /// </summary>
-        items,
-        /// <summary>
-        /// Publish to a node.  See http://www.xmpp.org/extensions/xep-0060.html#publisher-publish
-        /// </summary>
-        publish,
-        /// <summary>
-        /// Delete an item from a node.  See: http://www.xmpp.org/extensions/xep-0060.html#publisher-delete
-        /// </summary>
-        retract,
-        /// <summary>
-        /// Subscribe to a node. See: http://www.xmpp.org/extensions/xep-0060.html#subscriber-subscribe
-        /// </summary>
-        subscribe,
-        /// <summary>
-        /// Retrieve subscriptions.  See: http://www.xmpp.org/extensions/xep-0060.html#entity-subscriptions
-        /// </summary>
-        subscriptions,
-        /// <summary>
-        /// Unsubscribe from a node.  See: http://www.xmpp.org/extensions/xep-0060.html#subscriber-unsubscribe
-        /// </summary>
-        unsubscribe,
-        /// <summary>
-        /// Delete a node. See: http://www.xmpp.org/extensions/xep-0060.html#owner-delete
-        /// </summary>
-        delete,
-
-        /// <summary>
-        /// Collection modification
-        /// </summary>
-        collection,
-        /// <summary>
-        /// Node configuration change
-        /// </summary>
-        configuration,
-        /// <summary>
-        /// All items purged
-        /// </summary>
-        purge,
-        /// <summary>
-        /// A new subscription
-        /// </summary>
-        subscription,
-
-        /// <summary>
-        /// Owner configuring the node
-        /// </summary>
-        configure,
-        /// <summary>
-        /// Owner-level defaults, in a "default" element.  "default" is a C# keyword, though.
-        /// </summary>
-        defaults
-    }
-
-    /// <summary>
-    /// A PubSub IQ
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubIQ : jabber.protocol.client.TypedIQ<PubSub>
-    {
-        /// <summary>
-        /// Create a pubsub IQ, with a single pubsub query element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubIQ(XmlDocument doc) : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a pubsub IQ, with a pubusub query element and the given subelement.
-        /// </summary>
-        /// <param name="doc">Document to create in</param>
-        /// <param name="command">The pubsub command</param>
-        /// <param name="node">Add this as a node attrbute of the command</param>
-        public PubSubIQ(XmlDocument doc, PubSubCommandType command, string node)
-            : base(doc)
-        {
-            PubSubCommand cmd = null;
-            switch (command)
-            {
-            case PubSubCommandType.affiliations:
-                cmd = new Affiliations(doc);
-                break;
-            case PubSubCommandType.create:
-                cmd = new Create(doc);
-                break;
-            case PubSubCommandType.items:
-                cmd = new Items(doc);
-                break;
-            case PubSubCommandType.publish:
-                cmd = new Publish(doc);
-                break;
-            case PubSubCommandType.retract:
-                cmd = new Retract(doc);
-                break;
-            case PubSubCommandType.subscribe:
-                cmd = new Subscribe(doc);
-                break;
-            case PubSubCommandType.subscriptions:
-                cmd = new Subscriptions(doc);
-                break;
-            case PubSubCommandType.unsubscribe:
-                cmd = new Unsubscribe(doc);
-                break;
-            default:
-                throw new ArgumentException("Command not understood: " + command.ToString(), "command");
-            }
-
-            if (node != null)
-                cmd.Node = node;
-            this.Instruction.AppendChild(cmd);
-        }
-
-        /// <summary>
-        /// Get the command from the pubsub element.
-        /// </summary>
-        public PubSubCommand Command
-        {
-            get
-            {
-                PubSub ps = this.Instruction;
-                if (ps == null)
-                    return null;
-                return ps.Command;
-            }
-        }
-    }
-
-    /// <summary>
-    /// A type-safe PubSub IQ.
-    /// </summary>
-    /// <typeparam name="T">The type of command to create</typeparam>
-    [SVN(@"$Id$")]
-    public class PubSubCommandIQ<T> : jabber.protocol.client.TypedIQ<TypedPubSub<T>>
-        where T : PubSubCommand
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubCommandIQ(XmlDocument doc)
-            : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// Create, with node
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="node"></param>
-        public PubSubCommandIQ(XmlDocument doc, string node)
-            : base(doc)
-        {
-            Command.Node = node;
-        }
-
-        /// <summary>
-        /// The command inside the pubsub element.
-        /// </summary>
-        public T Command
-        {
-            get { return Instruction.Command; }
-            set { Instruction.Command = value; }
-        }
-    }
-
-    /// <summary>
-    /// A type-safe pubsub element.
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    [SVN(@"$Id$")]
-    public class TypedPubSub<T> : Element
-        where T : PubSubCommand
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public TypedPubSub(XmlDocument doc)
-            : base("pubsub", URI.PUBSUB, doc)
-        {
-            CreateChildElement<T>();
-        }
-
-        /// <summary>
-        /// The pubsub command
-        /// </summary>
-        public T Command
-        {
-            get { return GetChildElement<T>(); }
-            set { ReplaceChild<T>(value); }
-        }
-
-        /// <summary>
-        /// The type of pubsub command
-        /// </summary>
-        public PubSubCommandType CommandType
-        {
-            get { return Command.CommandType; }
-        }
-    }
-
-    /// <summary>
-    /// Publish/Subscribe.  See XEP-60: http://www.xmpp.org/extensions/xep-0060.html
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSub : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSub(XmlDocument doc) : base("pubsub", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSub(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The PubSub command associated with this instruction
-        /// </summary>
-        public PubSubCommand Command
-        {
-            get { return GetChildElement<PubSubCommand>(); }
-        }
-    }
-
-    /// <summary>
-    /// A PubSub command
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class PubSubCommand : Element
-    {
-        /// <summary>
-        /// Create a pubsub command.  Should not be called directly.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        protected PubSubCommand(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for outbound, in the namespace of the parent element,
-        /// then attach to the parent element.
-        /// </summary>
-        /// <param name="elementName">The name of the element to create</param>
-        /// <param name="parent">The parent element</param>
-        public PubSubCommand(string elementName, XmlElement parent)
-            : base(elementName, parent.NamespaceURI, parent.OwnerDocument)
-        {
-            parent.AppendChild(this);
-        }
-
-        /// <summary>
-        /// Create a pubsub command.  Should not be called directly.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="ns"></param>
-        /// <param name="doc"></param>
-        protected PubSubCommand(string prefix, string ns, XmlDocument doc)
-            : base(prefix, ns, doc)
-        {
-        }
-
-        /// <summary>
-        /// The node this command applies to.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public abstract PubSubCommandType CommandType
-        {
-            get;
-        }
-    }
-
-
-    /// <summary>
-    /// Retrieve the affiliations.  See: http://www.xmpp.org/extensions/xep-0060.html#entity-affiliations
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Affiliations : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Affiliations(XmlDocument doc)
-            : base("affiliations", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Affiliations(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.affiliations; }
-        }
-
-        /// <summary>
-        /// Retrieve all of the affiliations
-        /// </summary>
-        /// <returns></returns>
-        public Affiliation[] GetAffiliations()
-        {
-            return GetElements<Affiliation>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a new affiliation to the list.
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        public Affiliation AddAffiliation(AffiliationType type, string node)
-        {
-            Affiliation afil = CreateChildElement<Affiliation>();
-            afil.Type = type;
-            afil.Node = node;
-            return afil;
-        }
-    }
-
-    /// <summary>
-    /// What affiliation does an entity have with respect to a node?
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum AffiliationType
-    {
-        /// <summary>
-        /// No affiliation specified
-        /// </summary>
-        NONE_SPECIFIED=-1,
-        /// <summary>
-        /// Can receive
-        /// </summary>
-        member=0,
-        /// <summary>
-        /// No affiliation
-        /// </summary>
-        none,
-        /// <summary>
-        /// Can't join
-        /// </summary>
-        outcast,
-        /// <summary>
-        /// All permisions
-        /// </summary>
-        owner,
-        /// <summary>
-        /// Can publish
-        /// </summary>
-        publisher,
-    }
-
-    /// <summary>
-    /// The actual affiliation.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Affiliation : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Affiliation(XmlDocument doc)
-            : base("affiliation", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new instance for output, specifying the namespace.  This 
-        /// exists for things in pubsub#owner.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="namespaceURI"></param>
-        public Affiliation(XmlDocument doc, string namespaceURI)
-            : base("affiliation", namespaceURI, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Affiliation(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The node this affiliation applies to.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttribute("node"); }
-            set { SetAttribute("node", value); }
-        }
-
-        /// <summary>
-        /// Which affiliation?
-        /// </summary>
-        public AffiliationType Type
-        {
-            get { return GetEnumAttr<AffiliationType>("affiliation"); }
-            set { SetEnumAttr("affiliation", value); }
-        }
-
-    }
-
-    /// <summary>
-    /// Create a node. See: http://www.xmpp.org/extensions/xep-0060.html#owner-create
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Create : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Create(XmlDocument doc)
-            : base("create", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Create(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.create; }
-        }
-
-        /// <summary>
-        /// Does the element have a configure sibling?
-        /// </summary>
-        public bool HasConfigure
-        {
-            get
-            {
-                Configure config = GetConfiguration();
-                return (config != null);
-            }
-            set
-            {
-                Configure config = GetConfiguration();
-                if (value)
-                {
-                    if (config != null)
-                        return;
-                    config = new Configure(this.OwnerDocument);
-                    ParentNode.AppendChild(config);
-                }
-                else
-                {
-                    if (config == null)
-                        return;
-                    ParentNode.RemoveChild(config);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Get the configuration.  Null if none exists.
-        /// </summary>
-        public Configure GetConfiguration()
-        {
-            return ParentNode["configure", URI.PUBSUB] as Configure;
-        }
-
-        /// <summary>
-        /// Add a (or return a pre-exisitng) configuration section to the creation request, complete with x:data.
-        /// </summary>
-        /// <returns>The x:data form</returns>
-        public Data CreateConfiguration()
-        {
-            return CreateConfiguration(null);
-        }
-
-        /// <summary>
-        /// Add a configuration section to the creation request, using the given x:data.
-        /// </summary>
-        /// <param name="form"></param>
-        /// <returns></returns>
-        public Data CreateConfiguration(Data form)
-        {
-            Configure config = GetConfiguration();
-            if (config == null)
-            {
-                config = new Configure(this.OwnerDocument);
-                ParentNode.AppendChild(config);
-            }
-            return config.CreateForm(form);
-        }
-    }
-
-    /// <summary>
-    /// Configuring a pubsub node.  If the default is desired, it will be empty.  Otherwise it will contain an x:data.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Configure : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Configure(XmlDocument doc) : base("configure", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Configure(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.configuration; }
-        }
-
-        /// <summary>
-        /// Create or return the existing x:data form, with the appropriate form type.
-        /// </summary>
-        /// <returns></returns>
-        public Data CreateForm()
-        {
-            Data x = GetChildElement<Data>();
-            if (x == null)
-            {
-                x = CreateChildElement<Data>();
-                x.FormType = URI.PUBSUB_NODE_CONFIG;
-            }
-            return x;
-        }
-
-        /// <summary>
-        /// Add the given form to the configuration, removing any existing form, and ensuring that the
-        /// form type is correct.
-        /// </summary>
-        /// <param name="form"></param>
-        /// <returns></returns>
-        public Data CreateForm(Data form)
-        {
-            ReplaceChild<Data>(form);
-            if (form != null)
-            {
-                form.FormType = URI.PUBSUB_NODE_CONFIG;
-                form.Type = XDataType.submit;
-            }
-            return form;
-        }
-    }
-
-    /// <summary>
-    /// Commands that deal with items.
-    /// </summary>
-    public abstract class PubSubItemCommand : PubSubCommand
-    {
-        /// <summary>
-        /// Create a pubsub command.  Should not be called directly.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        protected PubSubItemCommand(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a pubsub command.  Should not be called directly.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="ns"></param>
-        /// <param name="doc"></param>
-        protected PubSubItemCommand(string prefix, string ns, XmlDocument doc)
-            : base(prefix, ns, doc)
-        {
-        }
-
-        /// <summary>
-        /// Retrieve all of the items
-        /// </summary>
-        /// <returns></returns>
-        public PubSubItem[] GetItems()
-        {
-            return GetElements<PubSubItem>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a new item to the list
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public PubSubItem AddItem(string id)
-        {
-            PubSubItem item = CreateChildElement<PubSubItem>();
-            item.ID = id;
-            return item;
-        }
-    }
-
-
-    /// <summary>
-    /// Retrieve the items for a node. See http://www.xmpp.org/extensions/xep-0060.html#subscriber-retrieve
-    /// Note: this same type is used for event notifications, in the pubsub#event namespace
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Items : PubSubItemCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Items(XmlDocument doc)
-            : base("items", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Items(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.items; }
-        }
-
-        /// <summary>
-        /// The subscription ID these items apply to.
-        /// </summary>
-        public string SubID
-        {
-            get { return GetAttr("subid"); }
-            set { SetAttr("subid", value); }
-        }
-
-        /// <summary>
-        /// The maximum number of items to return
-        /// </summary>
-        public int MaxItems
-        {
-            get { return GetIntAttr("max_items"); }
-            set { SetIntAttr("max_items", value); }
-        }
-    }
-
-
-    /// <summary>
-    /// The items in a node
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubItem : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubItem(XmlDocument doc)
-            : base("item", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new instance for output, specifying the namespace.  This 
-        /// exists for things in pubsub#event.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="namespaceURI"></param>
-        public PubSubItem(XmlDocument doc, string namespaceURI)
-            : base("item", namespaceURI, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSubItem(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The node of the published item, when doing hierachical subscribes
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// The item id number
-        /// </summary>
-        public string ID
-        {
-            get { return GetAttr("id"); }
-            set { SetAttr("id", value); }
-        }
-
-        /// <summary>
-        /// The actual contents to publish.  Make sure to set a namespace!
-        /// </summary>
-        public XmlElement Contents
-        {
-            get { return GetFirstChildElement(); }
-            set { this.InnerXml = ""; this.AddChild(value); }
-        }
-    }
-
-    /// <summary>
-    /// Publish to a node.  See http://www.xmpp.org/extensions/xep-0060.html#publisher-publish
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Publish : PubSubItemCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Publish(XmlDocument doc)
-            : base("publish", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Publish(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.publish; }
-        }
-    }
-
-    /// <summary>
-    /// Delete an item from a node.  See: http://www.xmpp.org/extensions/xep-0060.html#publisher-delete
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Retract : PubSubItemCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Retract(XmlDocument doc)
-            : base("retract", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Retract(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.retract; }
-        }
-
-        /// <summary>
-        /// When in an event, there may be an ID as an attribute.
-        /// </summary>
-        public string ID
-        {
-            get { return GetAttr("id"); }
-            set { SetAttr("id", value); }
-        }
-
-        /// <summary>
-        /// Don notifications?
-        /// </summary>
-        public bool Notify
-        {
-            get
-            {
-                string notify = GetAttribute("notify");
-                if (notify == "true")
-                    return true;
-                if (notify == "1")
-                    return true;
-                return false;
-            }
-            set { SetAttribute("notify", value ? "true": "false"); }
-        }
-    }
-
-    /// <summary>
-    /// Subscribe to a node. See: http://www.xmpp.org/extensions/xep-0060.html#subscriber-subscribe
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Subscribe : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Subscribe(XmlDocument doc)
-            : base("subscribe", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Subscribe(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.subscribe; }
-        }
-
-        /// <summary>
-        /// The Jabber ID for this subscription
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// Does the element have a options sibling?
-        /// </summary>
-        public bool HasOptions
-        {
-            get
-            {
-                PubSubOptions opts = GetOptions();
-                return (opts != null);
-            }
-            set
-            {
-                PubSubOptions opts = GetOptions();
-                if (value)
-                {
-                    if (opts != null)
-                        return;
-                    opts = new PubSubOptions(this.OwnerDocument);
-                    ParentNode.AppendChild(opts);
-                }
-                else
-                {
-                    if (opts == null)
-                        return;
-                    ParentNode.RemoveChild(opts);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Get the configuration.  Null if none exists.
-        /// </summary>
-        public PubSubOptions GetOptions()
-        {
-            return ParentNode["options", URI.PUBSUB] as PubSubOptions;
-        }
-    }
-
-    /// <summary>
-    /// PubSub subscription options
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubOptions : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubOptions(XmlDocument doc)
-            : base("options", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSubOptions(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The node these options apply to.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// The Jabber ID these options apply to.
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The subscription ID these options apply to.
-        /// </summary>
-        public string SubID
-        {
-            get { return GetAttr("subid"); }
-            set { SetAttr("subid", value); }
-        }
-
-
-        /// <summary>
-        /// Does the element have an XData child?
-        /// </summary>
-        public bool HasXData
-        {
-            get { return (GetXData() != null); }
-            set
-            {
-                if (value)
-                    GetOrCreateElement<Data>().Type = XDataType.submit;
-                else
-                    RemoveElem<Data>();
-            }
-        }
-
-        /// <summary>
-        /// Get the XData child, if it exists.
-        /// </summary>
-        /// <returns></returns>
-        public Data GetXData()
-        {
-            return GetChildElement<Data>();
-        }
-
-    }
-
-    /// <summary>
-    /// Retrieve subscriptions.  See: http://www.xmpp.org/extensions/xep-0060.html#entity-subscriptions
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Subscriptions : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Subscriptions(XmlDocument doc)
-            : base("subscriptions", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new instance for output, specifying the namespace.  This 
-        /// exists for things in pubsub#owner.
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="namespaceURI"></param>
-        public Subscriptions(XmlDocument doc, string namespaceURI)
-            : base("subscriptions", namespaceURI, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Subscriptions(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.subscriptions; }
-        }
-
-        /// <summary>
-        /// Retrieve all of the subscriptions
-        /// </summary>
-        /// <returns></returns>
-        public PubSubSubscription[] GetSubscriptions()
-        {
-            return GetElements<PubSubSubscription>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a new subscription to the list
-        /// </summary>
-        /// <returns></returns>
-        public PubSubSubscription AddSubscription()
-        {
-            return CreateChildElement<PubSubSubscription>();
-        }
-    }
-
-
-    /// <summary>
-    /// A single subscription
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubSubscription : Element
-    {
-      /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubSubscription(XmlDocument doc)
-            : base("subscription", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSubSubscription(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The node these options apply to.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// The Jabber ID these options apply to.
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The subscription ID these options apply to.
-        /// </summary>
-        public string SubID
-        {
-            get { return GetAttr("subid"); }
-            set { SetAttr("subid", value); }
-        }
-
-        /// <summary>
-        /// The subscription state
-        /// </summary>
-        public PubSubSubscriptionType Type
-        {
-            get { return GetEnumAttr<PubSubSubscriptionType>("subscription"); }
-            set { SetEnumAttr("subscription", value); }
-        }
-    }
-
-    /// <summary>
-    /// The subscription state of a given pubsub node.
-    /// </summary>
-    public enum PubSubSubscriptionType
-    {
-        /// <summary>
-        /// No type given
-        /// </summary>
-        NONE_SPECIFIED = -1,
-        /// <summary>
-        /// No subscription
-        /// </summary>
-        none = 0,
-        /// <summary>
-        /// Sub is pending
-        /// </summary>
-        pending,
-        /// <summary>
-        /// Subscribed
-        /// </summary>
-        subscribed,
-        /// <summary>
-        /// Subscription needs to be configured
-        /// </summary>
-        unconfigured
-    }
-
-    /// <summary>
-    /// Unsubscribe from a node.  See: http://www.xmpp.org/extensions/xep-0060.html#subscriber-unsubscribe
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Unsubscribe : PubSubCommand
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Unsubscribe(XmlDocument doc)
-            : base("unsubscribe", URI.PUBSUB, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Unsubscribe(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What type of command?
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.unsubscribe; }
-        }
-
-        /// <summary>
-        /// The Jabber ID these options apply to.
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The subscription ID these options apply to.
-        /// </summary>
-        public string SubID
-        {
-            get { return GetAttr("subid"); }
-            set { SetAttr("subid", value); }
-        }
-    }
-
-
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/PubSubErrors.cs b/lib/jabber-net/jabber/protocol/iq/PubSubErrors.cs
deleted file mode 100644
index 584cd0d..0000000
--- a/lib/jabber-net/jabber/protocol/iq/PubSubErrors.cs
+++ /dev/null
@@ -1,779 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using jabber;
-using jabber.protocol;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// For nodes with a node access model of "whitelist", if the requesting 
-    /// entity is not on the whitelist then the service MUST return a 
-    /// not-allowed error, specifying a pubsub-specific error condition of closed-node.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ClosedNode : Element
-	{
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public ClosedNode(XmlDocument doc)
-            : base("closed-node", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public ClosedNode(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-	}
-
-    /// <summary>
-    /// The node must be configured.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ConfigurationRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public ConfigurationRequired(XmlDocument doc)
-            : base("configuration-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public ConfigurationRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-    /// <summary>
-    /// An invalid JID was specified
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidJID : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public InvalidJID(XmlDocument doc)
-            : base("invalid-jid", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public InvalidJID(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Invalid options were specified
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidOptions : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public InvalidOptions(XmlDocument doc)
-            : base("invalid-options", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public InvalidOptions(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An invalid item was specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidPayload : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public InvalidPayload(XmlDocument doc)
-            : base("invalid-payload", URI.PUBSUB_ERRORS, doc)
-        {
-            
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public InvalidPayload(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An invalid ID was specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidSubid : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public InvalidSubid(XmlDocument doc)
-            : base("invalid-subid", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public InvalidSubid(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An item was forbidden.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ItemForbidden : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public ItemForbidden(XmlDocument doc)
-            : base("item-forbidden", URI.PUBSUB_ERRORS, doc)
-        {
-            // lambda, the forbidden function
-            // cf: http://snurl.com/2gduz 
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public ItemForbidden(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An item was required, but was not specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ItemRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public ItemRequired(XmlDocument doc)
-            : base("item-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public ItemRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A JID was required, but not specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JIDRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public JIDRequired(XmlDocument doc)
-            : base("jid-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public JIDRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// The maximum number of items was exceeded.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class MaxItemsExceeded : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public MaxItemsExceeded(XmlDocument doc)
-            : base("max-items-exceeded", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public MaxItemsExceeded(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// The maximum number of nodes was exceeded.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class MaxNodesExceeded : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public MaxNodesExceeded(XmlDocument doc)
-            : base("max-nodes-exceeded", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public MaxNodesExceeded(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// The node was required, but not specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class NodeIDRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public NodeIDRequired(XmlDocument doc)
-            : base("nodeid-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public NodeIDRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-    /// <summary>
-    /// Not allowed to subscribe, because you aren't in one of the correct roster
-    /// groups of the publisher.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class NotInRosterGroup : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public NotInRosterGroup(XmlDocument doc)
-            : base("not-in-roster-group", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public NotInRosterGroup(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// You must be subscribed to perform this function.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class NotSubscribed : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public NotSubscribed(XmlDocument doc)
-            : base("not-subscribed", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public NotSubscribed(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// The item is too large.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PayloadTooBig : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PayloadTooBig(XmlDocument doc)
-            : base("payload-too-big", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PayloadTooBig(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An item is required, but was not specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PayloadRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PayloadRequired(XmlDocument doc)
-            : base("payload-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PayloadRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-    /// <summary>
-    /// The subscription is pending.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PendingSubscription : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PendingSubscription(XmlDocument doc)
-            : base("pending-subscription", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PendingSubscription(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// You must be subscribed first.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PresenceSubscriptionRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PresenceSubscriptionRequired(XmlDocument doc)
-            : base("presence-subscription-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PresenceSubscriptionRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// An subscription ID is required, but was not specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SubidRequired : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public SubidRequired(XmlDocument doc)
-            : base("subid-required", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public SubidRequired(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-    
-    /// <summary>
-    /// Supported features
-    /// </summary>
-    [SVN(@"$Id$")]
-    [Dash]
-    public enum PubSubFeature
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// Access authorizations
-        /// </summary>
-        access_authorize,
-        /// <summary>
-        /// Open Access
-        /// </summary>
-        access_open,
-        /// <summary>
-        /// Presence-based access control
-        /// </summary>
-        access_presence,
-        /// <summary>
-        /// Roster-based access control
-        /// </summary>
-        access_roster,
-        /// <summary>
-        /// Whitelist-based access control
-        /// </summary>
-        access_whitelist,
-        /// <summary>
-        /// Auto-creation of nodes
-        /// </summary>
-        auto_create,
-        /// <summary>
-        /// Auto-subscription to nodes
-        /// </summary>
-        auto_subscribe,
-        /// <summary>
-        /// Collection support
-        /// </summary>
-        collections,
-        /// <summary>
-        /// Configuration
-        /// </summary>
-        config_node,
-        /// <summary>
-        /// Create and configure atomically
-        /// </summary>
-        create_and_configure,
-        /// <summary>
-        /// Node creation
-        /// </summary>
-        create_nodes,
-        /// <summary>
-        /// Delete items
-        /// </summary>
-        delete_any,
-        /// <summary>
-        /// Delete nodes
-        /// </summary>
-        delete_nodes,
-        /// <summary>
-        /// Notify on some criteria, only
-        /// </summary>
-        filtered_notifications,
-        /// <summary>
-        /// Process pending subscription requests
-        /// </summary>
-        get_pending,
-        /// <summary>
-        /// The server can create unused node names
-        /// </summary>
-        instant_nodes,
-        /// <summary>
-        /// Items have IDs
-        /// </summary>
-        item_ids,
-        /// <summary>
-        /// Geting the last published item
-        /// </summary>
-        last_published,
-        /// <summary>
-        /// Time-based subscriptions are supported.
-        /// </summary>
-        leased_subscription,
-        /// <summary>
-        /// Node owners may manage subscriptions
-        /// </summary>
-        manage_subscriptions,
-        /// <summary>
-        /// The member affiliation is supported
-        /// </summary>
-        member_affiliation,
-        /// <summary>
-        /// Node meta-data is supported.
-        /// </summary>
-        meta_data,
-        /// <summary>
-        /// Node owners may modify affiliations.
-        /// </summary>
-        modify_affiliations,
-        /// <summary>
-        /// A single leaf node may be associated with multiple collections
-        /// </summary>
-        multi_collection,
-        /// <summary>
-        /// A single entity may subscribe to a node multiple times.
-        /// </summary>
-        multi_subscribe,
-        /// <summary>
-        /// The outcast affiliation is supported
-        /// </summary>
-        outcast_affiliation,
-        /// <summary>
-        /// Persistent items are supported.
-        /// </summary>
-        persistent_items,
-        /// <summary>
-        /// Presence-based delivery of event notifications is supported
-        /// </summary>
-        presence_notifications,
-        /// <summary>
-        /// Authorized contacts are automatically subscribed to a user's virtual pubsub service.
-        /// </summary>
-        presence_subscribe,
-        /// <summary>
-        /// Publishing items is supported (note: not valid for collection nodes).
-        /// </summary>
-        publish,
-        /// <summary>
-        /// Publishing an item with options is supported.
-        /// </summary>
-        publish_options,
-        /// <summary>
-        /// The publisher affiliation is supported.
-        /// </summary>
-        publisher_affiliation,
-        /// <summary>
-        /// Purging of nodes is supported.
-        /// </summary>
-        purge_nodes,
-        /// <summary>
-        /// Item retraction is supported.
-        /// </summary>
-        retract_items,
-        /// <summary>
-        /// Retrieval of current affiliations is supported.
-        /// </summary>
-        retrieve_affiliations,
-        /// <summary>
-        /// Retrieval of default node configuration is supported.
-        /// </summary>
-        retrieve_default,
-        /// <summary>
-        /// Item retrieval is supported.
-        /// </summary>
-        retrieve_items,
-        /// <summary>
-        /// Retrieval of current subscriptions is supported.
-        /// </summary>
-        retrieve_subscriptions,
-        /// <summary>
-        /// Subscribing and unsubscribing are supported.
-        /// </summary>
-        subscribe,
-        /// <summary>
-        /// Configuration of subscription options is supported.
-        /// </summary>
-        subscription_options,
-        /// <summary>
-        /// Notification of subscription state changes is supported.
-        /// </summary>
-        subscription_notifications,
-    }
-
-    /// <summary>
-    /// An unsupported protocol was used.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Unsupported : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public Unsupported(XmlDocument doc)
-            : base("unsupported", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Unsupported(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Which feature was unsupported?
-        /// </summary>
-        public PubSubFeature Feature
-        {
-            get { return GetEnumAttr<PubSubFeature>("feature"); }
-            set { SetEnumAttr("feature", value); }
-        }
-    }
-
-    /// <summary>
-    /// An invalid access model was specified.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class UnsupportedAccessModel : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public UnsupportedAccessModel(XmlDocument doc)
-            : base("unsupported-access-model", URI.PUBSUB_ERRORS, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public UnsupportedAccessModel(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/PubSubEvent.cs b/lib/jabber-net/jabber/protocol/iq/PubSubEvent.cs
deleted file mode 100644
index 5ef571a..0000000
--- a/lib/jabber-net/jabber/protocol/iq/PubSubEvent.cs
+++ /dev/null
@@ -1,459 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// Publish/Subscribe.  See XEP-60: http://www.xmpp.org/extensions/xep-0060.html
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubEvent : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubEvent(XmlDocument doc)
-            : base("event", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSubEvent(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The PubSub command associated with this instruction
-        /// </summary>
-        public PubSubCommand Command
-        {
-            get { return GetChildElement<PubSubCommand>(); }
-        }
-    }
-
-    /// <summary>
-    /// Notification for item deletion.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventRetract : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventRetract(XmlDocument doc)
-            : base("retract", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventRetract(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// When in an event, there may be an ID as an attribute.
-        /// </summary>
-        public string ID
-        {
-            get { return GetAttr("id"); }
-            set { SetAttr("id", value); }
-        }
-    }
-
-    /// <summary>
-    /// 
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventCollection : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventCollection(XmlDocument doc)
-            : base("collection", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventCollection(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// A collection notification
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.collection; }
-        }
-
-        /// <summary>
-        /// The new node associated with the collection
-        /// </summary>
-        public EventAssociate Associate
-        {
-            get { return GetChildElement<EventAssociate>(); }
-            set { ReplaceChild<EventAssociate>(value); }
-        }
-        /// <summary>
-        /// The node removed from the collection
-        /// </summary>
-        public EventDisassociate Disassociate
-        {
-            get { return GetChildElement<EventDisassociate>(); }
-            set { ReplaceChild <EventDisassociate>(value); }
-        }
-    }
-
-    /// <summary>
-    /// Nodes added to a collection
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventAssociate : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventAssociate(XmlDocument doc)
-            : base("associate", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventAssociate(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The new node name
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// An x:data form that describes the new node
-        /// </summary>
-        public jabber.protocol.x.Data MetaData
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild<jabber.protocol.x.Data>(value); }
-        }
-    }
-
-    /// <summary>
-    /// Nodes removed from a collection
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventDisassociate : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventDisassociate(XmlDocument doc)
-            : base("disassociate", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventDisassociate(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The removed node name
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-    }
-
-    /// <summary>
-    /// Pubsub items notification.  This is the main reason for XEP-60 to have been written.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventItems : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventItems(XmlDocument doc)
-            : base("items", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventItems(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Retrieve all of the new items
-        /// </summary>
-        /// <returns></returns>
-        public PubSubItem[] GetItems()
-        {
-            return GetElements<PubSubItem>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a new item to the list
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public PubSubItem AddItem(string id)
-        {
-            PubSubItem item = new PubSubItem(OwnerDocument, URI.PUBSUB_EVENT);
-            AddChild(item);
-            item.ID = id;
-            return item;
-        }
-
-        /// <summary>
-        /// Get a list of id's of deleted items.
-        /// </summary>
-        /// <returns></returns>
-        public string[] GetRetractions()
-        {
-            TypedElementList<EventRetract> nl = GetElements<EventRetract>();
-            string[] ids = new string[nl.Count];
-            int i = 0;
-            foreach (EventRetract item in nl)
-                ids[i++] = item.ID;
-            return ids;
-        }
-
-        /// <summary>
-        /// Add a new item to the list
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        public EventRetract AddRetract(string id)
-        {
-            EventRetract item = CreateChildElement<EventRetract>();
-            item.ID = id;
-            return item;
-        }
-
-        /// <summary>
-        /// A configuration event
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.items; }
-        }
-    }
-
-    /// <summary>
-    /// New node configuration
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventConfiguration : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventConfiguration(XmlDocument doc)
-            : base("configuration", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventConfiguration(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// A configuration event
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.configuration; }
-        }
-
-        /// <summary>
-        /// An x:data form that describes the new configuration
-        /// </summary>
-        public jabber.protocol.x.Data MetaData
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild<jabber.protocol.x.Data>(value); }
-        }
-    }
-
-    /// <summary>
-    /// All of the items in a node have been deleted.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventPurge : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventPurge(XmlDocument doc)
-            : base("purge", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventPurge(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// A purge event
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.purge; }
-        }
-    }
-
-    /// <summary>
-    /// Subscription state has changed
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EventSubscription : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public EventSubscription(XmlDocument doc)
-            : base("subscription", URI.PUBSUB_EVENT, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public EventSubscription(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// A subscription event
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.subscription; }
-        }
-
-        /// <summary>
-        /// When does this subscription expire?  DateTime.MIN_VALUE for none.
-        /// </summary>
-        public DateTime Expiry
-        {
-            get { return GetDateTimeAttr("expiry"); }
-            set { SetDateTimeAttr("expiry", value); }
-        }
-
-        /// <summary>
-        /// The JID of the subscriber
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The ID of the subscription
-        /// </summary>
-        public string SubscriptionID
-        {
-            get { return GetAttr("subid"); }
-            set { SetAttr("subid", value); }
-        }
-
-        /// <summary>
-        /// The subscription state
-        /// </summary>
-        public PubSubSubscriptionType Subscription
-        {
-            get { return GetEnumAttr<PubSubSubscriptionType>("subscription"); }
-            set { SetEnumAttr("subscription", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/PubSubOwner.cs b/lib/jabber-net/jabber/protocol/iq/PubSubOwner.cs
deleted file mode 100644
index f4fb170..0000000
--- a/lib/jabber-net/jabber/protocol/iq/PubSubOwner.cs
+++ /dev/null
@@ -1,419 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Text;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// A type-safe PubSub IQ for owner actions.
-    /// </summary>
-    /// <typeparam name="T">The type of command to create</typeparam>
-    [SVN(@"$Id$")]
-    public class OwnerPubSubCommandIQ<T> : jabber.protocol.client.TypedIQ<OwnerPubSub<T>>
-        where T : PubSubCommand
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerPubSubCommandIQ(XmlDocument doc)
-            : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// Create, with node
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="node"></param>
-        public OwnerPubSubCommandIQ(XmlDocument doc, string node)
-            : base(doc)
-        {
-            Command.Node = node;
-        }
-
-        /// <summary>
-        /// The command inside the pubsub element.
-        /// </summary>
-        public T Command
-        {
-            get { return Instruction.Command; }
-            set { Instruction.Command = value; }
-        }
-    }
-
-    /// <summary>
-    /// A type-safe pubsub element.
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    [SVN(@"$Id$")]
-    public class OwnerPubSub<T> : Element
-        where T : PubSubCommand
-    {
-        /// <summary>
-        /// Create
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerPubSub(XmlDocument doc)
-            : base("pubsub", URI.PUBSUB_OWNER, doc)
-        {
-            CreateChildElement<T>();
-        }
-
-        /// <summary>
-        /// The pubsub command
-        /// </summary>
-        public T Command
-        {
-            get { return GetChildElement<T>(); }
-            set { ReplaceChild<T>(value); }
-        }
-
-        /// <summary>
-        /// The type of pubsub command
-        /// </summary>
-        public PubSubCommandType CommandType
-        {
-            get { return Command.CommandType; }
-        }
-    }
-
-    /// <summary>
-    /// The pubsub container for owner operations.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PubSubOwner : Element
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public PubSubOwner(XmlDocument doc)
-            : base("pubsub", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public PubSubOwner(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The command inside.
-        /// </summary>
-        public PubSubCommand Command
-        {
-            get { return GetChildElement<PubSubCommand>(); }
-        }
-
-        /// <summary>
-        /// The type of the included command
-        /// </summary>
-        public PubSubCommandType CommandType
-        {
-            get { return Command.CommandType; }
-        }
-    }
-
-    /// <summary>
-    /// Affiliations of all folks associated with a node
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerAffliliations : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerAffliliations(XmlDocument doc)
-            : base("affiliations", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerAffliliations(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Affiliations command
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.affiliations; }
-        }
-
-        /// <summary>
-        /// Retrieve all of the affiliations
-        /// </summary>
-        /// <returns></returns>
-        public OwnerAffiliation[] GetAffiliations()
-        {
-            return GetElements<OwnerAffiliation>().ToArray();
-        }
-
-        /// <summary>
-        /// Add a new affiliation to the list.
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        public OwnerAffiliation AddAffiliation(AffiliationType type, string node)
-        {
-            OwnerAffiliation afil = CreateChildElement<OwnerAffiliation>();
-            afil.Type = type;
-            afil.Node = node;
-            return afil;
-        }
-    }
-
-    /// <summary>
-    /// An affiliation for another user, retrieved by the owner.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerAffiliation : Affiliation
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerAffiliation(XmlDocument doc)
-            : base(doc, URI.PUBSUB_OWNER)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerAffiliation(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The JID of the affiliate.
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { SetAttr("jid", value); }
-        }
-    }
-
-    /// <summary>
-    /// Owner-level configuration
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerConfigure : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerConfigure(XmlDocument doc)
-            : base("configure", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerConfigure(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Configure
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.configure; }
-        }
-
-        /// <summary>
-        /// An x:data form that describes the node
-        /// </summary>
-        public jabber.protocol.x.Data MetaData
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild<jabber.protocol.x.Data>(value); }
-        }
-    }
-
-    /// <summary>
-    /// The default configuration parameters
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerDefault : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerDefault(XmlDocument doc)
-            : base("default", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerDefault(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Configure
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.defaults; }
-        }
-
-        /// <summary>
-        /// An x:data form that describes the node
-        /// </summary>
-        public jabber.protocol.x.Data MetaData
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild<jabber.protocol.x.Data>(value); }
-        }
-    }
-
-    /// <summary>
-    /// Delete a node
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerDelete : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerDelete(XmlDocument doc)
-            : base("delete", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerDelete(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Delete
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.delete; }
-        }
-    }
-
-    /// <summary>
-    /// Purge all items from a node
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerPurge : PubSubCommand
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerPurge(XmlDocument doc)
-            : base("purge", URI.PUBSUB_OWNER, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerPurge(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Purge
-        /// </summary>
-        public override PubSubCommandType CommandType
-        {
-            get { return PubSubCommandType.purge;  }
-        }
-    }
-
-    /// <summary>
-    /// The subscription list
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OwnerSubscriptions : Subscriptions
-    {
-        /// <summary>
-        /// Create for outbound.
-        /// </summary>
-        /// <param name="doc"></param>
-        public OwnerSubscriptions(XmlDocument doc)
-            : base(doc, URI.PUBSUB_OWNER)
-        {
-        }
-
-        /// <summary>
-        /// Create for inbound
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnerSubscriptions(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-    }
-
-}
-    
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/protocol/iq/Register.cs b/lib/jabber-net/jabber/protocol/iq/Register.cs
deleted file mode 100644
index 1a061e1..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Register.cs
+++ /dev/null
@@ -1,278 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-
-    /// <summary>
-    /// IQ packet with a register query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RegisterIQ : jabber.protocol.client.TypedIQ<Register>
-    {
-        /// <summary>
-        /// Create a Register IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public RegisterIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// User registration
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Register : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Register(XmlDocument doc) :
-            base("query", URI.REGISTER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Register(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Instructions to the user.
-        /// </summary>
-        public string Instructions
-        {
-            get { return GetElem("instructions"); }
-            set { SetElem("instructions", value); }
-        }
-
-        /// <summary>
-        /// Username to register
-        /// </summary>
-        public string Username
-        {
-            get { return GetElem("username"); }
-            set { SetElem("username", value); }
-        }
-
-        /// <summary>
-        /// User nickname
-        /// </summary>
-        public string Nick
-        {
-            get { return GetElem("nick"); }
-            set { SetElem("nick", value); }
-        }
-
-        /// <summary>
-        /// User password
-        /// </summary>
-        public string Password
-        {
-            get { return GetElem("password"); }
-            set { SetElem("password", value); }
-        }
-
-        /// <summary>
-        /// The name element.... what's this for?
-        /// </summary>
-        public string JName
-        {
-            get { return GetElem("name"); }
-            set { SetElem("name", value); }
-        }
-
-        /// <summary>
-        /// The first name
-        /// </summary>
-        public string First
-        {
-            get { return GetElem("first"); }
-            set { SetElem("first", value); }
-        }
-
-        /// <summary>
-        /// Last name
-        /// </summary>
-        public string Last
-        {
-            get { return GetElem("last"); }
-            set { SetElem("last", value); }
-        }
-
-        /// <summary>
-        /// E-mail address
-        /// TODO: add format checking?
-        /// </summary>
-        public string Email
-        {
-            get { return GetElem("email"); }
-            set { SetElem("email", value); }
-        }
-
-        /// <summary>
-        /// User's mailing address
-        /// </summary>
-        public string Address
-        {
-            get { return GetElem("address"); }
-            set { SetElem("address", value); }
-        }
-
-        /// <summary>
-        /// User's city
-        /// </summary>
-        public string City
-        {
-            get { return GetElem("city"); }
-            set { SetElem("city", value); }
-        }
-
-        /// <summary>
-        /// User's state
-        /// </summary>
-        public string State
-        {
-            get { return GetElem("state"); }
-            set { SetElem("state", value); }
-        }
-
-        /// <summary>
-        /// User's zip code
-        /// </summary>
-        public string Zip
-        {
-            get { return GetElem("zip"); }
-            set { SetElem("zip", value); }
-        }
-
-        /// <summary>
-        /// User's phone number
-        /// </summary>
-        public string Phone
-        {
-            get { return GetElem("phone"); }
-            set { SetElem("phone", value); }
-        }
-
-        /// <summary>
-        /// URL for user
-        /// </summary>
-        public string Url
-        {
-            get { return GetElem("url"); }
-            set { SetElem("url", value); }
-        }
-
-        /// <summary>
-        /// Current date
-        /// </summary>
-        public string Date
-        {
-            get { return GetElem("date"); }
-            set { SetElem("date", value); }
-        }
-
-        /// <summary>
-        /// Miscellaneous information
-        /// </summary>
-        public string Misc
-        {
-            get { return GetElem("misc"); }
-            set { SetElem("misc", value); }
-        }
-
-        /// <summary>
-        /// Text... what is this used for?
-        /// </summary>
-        public string Text
-        {
-            get { return GetElem("text"); }
-            set { SetElem("text", value); }
-        }
-
-        /// <summary>
-        /// Public key?
-        /// </summary>
-        public string Key
-        {
-            get { return GetElem("key"); }
-            set { SetElem("key", value); }
-        }
-
-        /// <summary>
-        /// Is the user already registered?
-        /// </summary>
-        public bool Registered
-        {
-            get { return (this["registered"] != null); }
-            set
-            {
-                if (value)
-                {
-                    SetElem("registered", null);
-                }
-                else
-                {
-                    XmlNode child = this["registered"];
-                    if (child != null)
-                        RemoveChild(child);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Remove the current user.
-        /// </summary>
-        public bool Remove
-        {
-            get { return GetElem("remove") != null; }
-            set
-            {
-                if (value)
-                {
-                    SetElem("remove", null);
-                }
-                else
-                {
-                    XmlNode child = this["remove"];
-                    if (child != null)
-                        RemoveChild(child);
-                }
-            }
-        }
-
-        /// <summary>
-        /// The x:data form for the registration request.  Null if none specified.
-        /// </summary>
-        public jabber.protocol.x.Data Form
-        {
-            get { return GetChildElement<jabber.protocol.x.Data>(); }
-            set { ReplaceChild <jabber.protocol.x.Data>(value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Roster.cs b/lib/jabber-net/jabber/protocol/iq/Roster.cs
deleted file mode 100644
index 0e8a9d2..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Roster.cs
+++ /dev/null
@@ -1,300 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// IQ packet with a roster query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RosterIQ : jabber.protocol.client.TypedIQ<Roster>
-    {
-        /// <summary>
-        /// Create a roster IQ.
-        /// </summary>
-        /// <param name="doc"></param>
-        public RosterIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A roster query element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Roster : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Roster(XmlDocument doc) : base("query", URI.ROSTER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Roster(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Add a roster item
-        /// </summary>
-        /// <returns></returns>
-        public Item AddItem()
-        {
-            return CreateChildElement<Item>();
-        }
-
-        /// <summary>
-        /// List of roster items
-        /// </summary>
-        /// <returns></returns>
-        public Item[] GetItems()
-        {
-            return GetElements<Item>().ToArray();
-        }
-    }
-
-    /// <summary>
-    /// The current status of the subscription related to this item.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum Subscription
-    {
-        /// <summary>
-        /// No subscription state has been specified.
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// Subscription to this person.  They are a lurkee.
-        /// </summary>
-        to,
-        /// <summary>
-        /// Subscription from this person.  They are a lurker.
-        /// </summary>
-        from,
-        /// <summary>
-        /// subscriptions in both ways.
-        /// </summary>
-        both,
-        /// <summary>
-        /// No subscription yet.  Often an Ask on this item.
-        /// </summary>
-        none,
-        /// <summary>
-        /// Remove this subscription from the local roster.
-        /// </summary>
-        remove,
-    }
-
-    /// <summary>
-    /// An optional attribute specifying the current status of a request to this contact.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum Ask
-    {
-        /// <summary>
-        /// No Ask specified.
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// this entity is asking to subscribe to that contact's presence
-        /// </summary>
-        subscribe,
-        /// <summary>
-        /// this entity is asking unsubscribe from that contact's presence
-        /// </summary>
-        unsubscribe
-    }
-
-    /// <summary>
-    /// Roster items.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Item : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Item(XmlDocument doc) : base("item", URI.ROSTER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Item(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Item JID
-        /// </summary>
-        public JID JID
-        {
-            get { return GetAttr("jid"); }
-            set { this.SetAttr("jid", value); }
-        }
-
-        /// <summary>
-        /// The user's nick
-        /// </summary>
-        public string Nickname
-        {
-            get { return GetAttr("name"); }
-            set { SetAttr("name", value); }
-        }
-
-        /// <summary>
-        /// How are we subscribed?
-        /// </summary>
-        public Subscription Subscription
-        {
-            get { return GetEnumAttr<Subscription>("subscription"); }
-            set { SetEnumAttr("subscription", value); }
-        }
-
-        /// <summary>
-        /// Pending?
-        /// </summary>
-        public Ask Ask
-        {
-            get { return GetEnumAttr<Ask>("ask"); }
-            set { SetEnumAttr("ask", value); }
-        }
-
-        /// <summary>
-        /// Add an item group, or return an existing group with the given name
-        /// </summary>
-        /// <returns></returns>
-        public Group AddGroup(string name)
-        {
-            Group g = GetGroup(name);
-            if (g == null)
-            {
-                g = CreateChildElement<Group>();
-                g.GroupName = name;
-            }
-            return g;
-        }
-
-        /// <summary>
-        /// Remove a group of the given name.  Does nothing if that group is not found.
-        /// </summary>
-        /// <param name="name"></param>
-        public void RemoveGroup(string name)
-        {
-            foreach (Group g in GetElements<Group>())
-            {
-                if (g.GroupName == name)
-                {
-                    this.RemoveChild(g);
-                    return;
-                }
-            }
-        }
-
-        /// <summary>
-        /// List of item groups
-        /// </summary>
-        /// <returns></returns>
-        public Group[] GetGroups()
-        {
-            return GetElements<Group>().ToArray();
-        }
-
-        /// <summary>
-        /// Is this item in the specified group?
-        /// </summary>
-        /// <param name="name">The name of the group to check</param>
-        /// <returns></returns>
-        public bool HasGroup(string name)
-        {
-            foreach (Group g in GetElements<Group>())
-            {
-                if (g.GroupName == name)
-                    return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Get the group object of the given name in this item.
-        /// If there is no group of that name, returns null.
-        /// </summary>
-        /// <param name="name">The name of the group to return</param>
-        /// <returns>null if none found.</returns>
-        public Group GetGroup(string name)
-        {
-            foreach (Group g in GetElements<Group>())
-            {
-                if (g.GroupName == name)
-                    return g;
-            }
-            return null;
-        }
-    }
-
-    /// <summary>
-    /// Roster item groups.  <group>GroupName</group>
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Group : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Group(XmlDocument doc) : base("group", URI.ROSTER, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Group(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Name of the group.
-        /// </summary>
-        public string GroupName
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Time.cs b/lib/jabber-net/jabber/protocol/iq/Time.cs
deleted file mode 100644
index 7e7b35d..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Time.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /*
-     * <iq type="result" to="romeo at montague.net/orchard"
-     *                   from="juliet at capulet.com/balcony"
-     *                   id="i_time_001">
-     *   <query xmlns="jabber:iq:time">
-     *     <utc>20020214T23:55:06</utc>
-     *     <tz>WET</tz>
-     *     <display>14 Feb 2002 11:55:06 PM</display>
-     *   </query>
-     * </iq>
-     */
-    /// <summary>
-    /// IQ packet with an time query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class TimeIQ : jabber.protocol.client.TypedIQ<Time>
-    {
-        /// <summary>
-        /// Create a time IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public TimeIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A time query element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Time : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Time(XmlDocument doc) : base("query", URI.TIME, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Time(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Set the current UTC, TZ, and Display based on the machine's current settings/locale.
-        /// </summary>
-        public void SetCurrentTime()
-        {
-            DateTime dt = DateTime.Now;
-            UTC = dt.ToUniversalTime();
-            TZ = TimeZone.CurrentTimeZone.IsDaylightSavingTime(dt) ?
-                TimeZone.CurrentTimeZone.DaylightName : TimeZone.CurrentTimeZone.StandardName;
-            Display = dt.ToLongDateString() + " " + dt.ToLongTimeString();
-        }
-
-        /// <summary>
-        /// Universal coordinated time.  (More or less GMT).
-        /// </summary>
-        public DateTime UTC
-        {
-            get { return JabberDate(GetElem("utc")); }
-            set { SetElem("utc", JabberDate(value)); }
-        }
-
-        /// <summary>
-        /// Timezone
-        /// </summary>
-        //TODO: return System.TimeZone?
-        public string TZ
-        {
-            get { return GetElem("tz"); }
-            set { SetElem("tz", value); }
-        }
-
-        /// <summary>
-        /// Human-readable date/time.
-        /// </summary>
-        public string Display
-        {
-            get { return GetElem("display"); }
-            set { SetElem("display", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/VCard.cs b/lib/jabber-net/jabber/protocol/iq/VCard.cs
deleted file mode 100644
index e760728..0000000
--- a/lib/jabber-net/jabber/protocol/iq/VCard.cs
+++ /dev/null
@@ -1,965 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-// http://www.xmpp.org/extensions/xep-0054.html
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// Type of telephone number.
-    /// </summary>
-    public enum TelephoneType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        unknown = -1,
-        /// <summary>
-        /// voice
-        /// </summary>
-        voice,
-        /// <summary>
-        /// fax
-        /// </summary>
-        fax,
-        /// <summary>
-        /// pager
-        /// </summary>
-        pager,
-        /// <summary>
-        /// voice mail
-        /// </summary>
-        msg,
-        /// <summary>
-        /// mobile
-        /// </summary>
-        cell,
-        /// <summary>
-        /// video phone
-        /// </summary>
-        video,
-        /// <summary>
-        /// Bulletin Board System
-        /// </summary>
-        bbs,
-        /// <summary>
-        /// Modem
-        /// </summary>
-        modem,
-        /// <summary>
-        /// ISDN
-        /// </summary>
-        isdn,
-        /// <summary>
-        /// dunno.
-        /// </summary>
-        pcs
-    };
-
-    /// <summary>
-    /// Telephone location
-    /// </summary>
-    public enum TelephoneLocation
-    {
-        /// <summary>
-        /// Home
-        /// </summary>
-        home,
-        /// <summary>
-        /// Work
-        /// </summary>
-        work,
-        /// <summary>
-        /// Unknown
-        /// </summary>
-        unknown
-    }
-
-    /// <summary>
-    /// Address location
-    /// </summary>
-    public enum AddressLocation
-    {
-        /// <summary>
-        /// Home
-        /// </summary>
-        home,
-        /// <summary>
-        /// Work
-        /// </summary>
-        work,
-        /// <summary>
-        /// Unknown
-        /// </summary>
-        unknown
-    }
-
-    /// <summary>
-    /// Email type attribute
-    /// </summary>
-    public enum EmailType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        NONE = -1,
-        /// <summary>
-        /// Home
-        /// </summary>
-        home,
-        /// <summary>
-        /// Work
-        /// </summary>
-        work,
-        /// <summary>
-        /// Internet
-        /// </summary>
-        internet,
-        /// <summary>
-        /// x400
-        /// </summary>
-        x400
-    }
-
-    /// <summary>
-    /// IQ packet with a version query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class VCardIQ : jabber.protocol.client.TypedIQ<VCard>
-    {
-        /// <summary>
-        /// Create a vCard IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public VCardIQ(XmlDocument doc) : base(doc)
-        {
-        }
-
-        /// <summary>
-        /// returns the vCard element for this iq.
-        /// </summary>
-        public VCard VCard
-        {
-            get { return Instruction; }
-        }
-    }
-
-    /// <summary>
-    /// A vCard element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class VCard : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public VCard(XmlDocument doc) : base("vCard", URI.VCARD, doc)
-        {
-        //  SetElem("PRODID", "jabber-net: " + this.GetType().Assembly.FullName);
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public VCard(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Full name of the individual, as a single string
-        /// </summary>
-        public string FullName
-        {
-            get { return GetElem("FN"); }
-            set { SetElem("FN", value); }
-        }
-
-        /// <summary>
-        /// Pieces of the name, split apart
-        /// </summary>
-        public VName ComplexName
-        {
-            get { return this["N"] as VName; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// Person's nick name.  This might be a good choice for a default roster nick,
-        /// for instance.
-        /// </summary>
-        public string Nickname
-        {
-            get { return GetElem("NICKNAME"); }
-            set { SetElem("NICKNAME", value); }
-        }
-
-        /// <summary>
-        /// User's photograph
-        /// </summary>
-        public VPhoto Photo
-        {
-            get { return this["PHOTO"] as VPhoto; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// Date of birth
-        /// </summary>
-        public DateTime Birthday
-        {
-            get { return DateTime.Parse(GetElem("BDAY")); }
-            set { SetElem("BDAY", string.Format("yyyy-MM-dd", value)); }
-        }
-
-        /// <summary>
-        /// Associated URL
-        /// </summary>
-        public System.Uri Url
-        {
-            get
-            {
-                string url = GetElem("URL");
-                if ((url == null) || (url == ""))
-                    return null;
-                try
-                {
-                    Uri uri = new Uri(url);
-                    return uri;
-                }
-                catch (UriFormatException)
-                {
-                    return null;
-                }
-            }
-            set { SetElem("URL", value.ToString()); }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public VOrganization Organization
-        {
-            get { return this["ORG"] as VOrganization; }
-            set { this.ReplaceChild(value); }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public string Title
-        {
-            get { return GetElem("TITLE"); }
-            set { SetElem("TITLE", value); }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public string Role
-        {
-            get { return GetElem("ROLE"); }
-            set { SetElem("ROLE", value); }
-        }
-
-        /// <summary>
-        /// Jabber ID
-        /// </summary>
-        public JID JabberId
-        {
-            get { return GetElem("JABBERID"); }
-            set { SetElem("JABBERID", value); }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        public string Description
-        {
-            get { return GetElem("DESC"); }
-            set { SetElem("DESC", value); }
-        }
-
-        /// <summary>
-        /// List of telephone numbers
-        /// </summary>
-        /// <returns></returns>
-        public VTelephone[] GetTelephoneList()
-        {
-            XmlNodeList nl = GetElementsByTagName("TEL", URI.VCARD);
-            VTelephone[] numbers = new VTelephone[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                numbers[i] = (VTelephone) n;
-                i++;
-            }
-            return numbers;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="type"></param>
-        /// <param name="location"></param>
-        /// <returns></returns>
-        public VTelephone GetTelephone(TelephoneType type, TelephoneLocation location)
-        {
-            foreach (VTelephone tel in GetTelephoneList())
-            {
-                if ((tel.Location == location) && (tel.Type == type))
-                    return tel;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// List of addresses
-        /// </summary>
-        /// <returns></returns>
-        public VAddress[] GetAddressList()
-        {
-            XmlNodeList nl = GetElementsByTagName("ADR", URI.VCARD);
-            VAddress[] addresses = new VAddress[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                addresses[i] = (VAddress) n;
-                i++;
-            }
-            return addresses;
-        }
-
-        /// <summary>
-        /// Get the address for the given location.
-        /// </summary>
-        /// <param name="location"></param>
-        /// <returns></returns>
-        public VAddress GetAddress(AddressLocation location)
-        {
-            foreach (VAddress adr in GetAddressList())
-            {
-                if (adr.Location == location)
-                    return adr;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// List of Email addresses
-        /// </summary>
-        /// <returns></returns>
-        public VEmail[] GetEmailList()
-        {
-            XmlNodeList nl = GetElementsByTagName("EMAIL", URI.VCARD);
-            VEmail[] emails = new VEmail[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                emails[i] = (VEmail)n;
-                i++;
-            }
-            return emails;
-        }
-
-        /// <summary>
-        /// Get the email address for the given type.
-        /// </summary>
-        /// <param name="type"></param>
-        /// <returns></returns>
-        public VEmail GetEmail(EmailType type)
-        {
-            foreach (VEmail email in GetEmailList())
-            {
-                if (email.Type == type)
-                    return email;
-            }
-            return null;
-        }
-
-        /// <summary>
-        ///  Sets the email address for the given type.
-        /// </summary>
-        /// <param name="email"></param>
-        public void SetEmail(VEmail email)
-        {
-            VEmail existing = GetEmail(email.Type);
-            if (existing == null)
-            {
-                AddChild(email);
-            }
-            else
-            {
-                existing.UserId = email.UserId;
-            }
-        }
-
-        /// <summary>
-        /// Get the internet email address (default)
-        /// </summary>
-        /// <returns></returns>
-        public string Email
-        {
-            get
-            {
-                VEmail vemail = GetEmail(EmailType.internet);
-                return vemail == null ? null : vemail.UserId;
-            }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VName : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VName(XmlDocument doc) : base("N", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VName(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// Given (first) name
-            /// </summary>
-            public string Given
-            {
-                get { return GetElem("GIVEN"); }
-                set { SetElem("GIVEN", value); }
-            }
-
-            /// <summary>
-            /// Family (last) name
-            /// </summary>
-            public string Family
-            {
-                get { return GetElem("FAMILY"); }
-                set { SetElem("FAMILY", value); }
-            }
-
-            /// <summary>
-            /// Middle name
-            /// </summary>
-            public string Middle
-            {
-                get { return GetElem("MIDDLE"); }
-                set { SetElem("MIDDLE", value); }
-            }
-        }
-
-        /// <summary>
-        /// vCard Org Element
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VOrganization : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VOrganization(XmlDocument doc) : base("ORG", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VOrganization(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// Orginization Name
-            /// </summary>
-            public string OrgName
-            {
-                get { return GetElem("ORGNAME"); }
-                set { SetElem("ORGNAME", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Unit
-            {
-                get { return GetElem("ORGUNIT"); }
-                set { SetElem("ORGUNIT", value); }
-            }
-        }
-
-        /// <summary>
-        /// vCard Telephone Element
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VTelephone : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VTelephone(XmlDocument doc) : base("TEL", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VTelephone(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// Phone number
-            /// </summary>
-            public string Number
-            {
-                get { return GetElem("NUMBER"); }
-                set { SetElem("NUMBER", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public TelephoneType Type
-            {
-                get
-                {
-                    if (this["VOICE"] != null) return TelephoneType.voice;
-                    else if (this["FAX"] != null) return TelephoneType.fax;
-                    else if (this["MSG"] != null) return TelephoneType.msg;
-                    else return TelephoneType.unknown;
-                }
-                set
-                {
-                    RemoveElem("VOICE");
-                    RemoveElem("FAX");
-                    RemoveElem("MSG");
-
-                    switch (value)
-                    {
-                        case TelephoneType.voice:
-                            SetElem("VOICE", null);
-                            break;
-                        case TelephoneType.fax:
-                            SetElem("FAX", null);
-                            break;
-                        case TelephoneType.msg:
-                            SetElem("MSG", null);
-                            break;
-                    }
-                }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public TelephoneLocation Location
-            {
-                get
-                {
-                    if (this["WORK"] != null) return TelephoneLocation.work;
-                    else if (this["HOME"] != null) return TelephoneLocation.home;
-                    else return TelephoneLocation.unknown;
-                }
-                set
-                {
-                    this.RemoveElem("WORK");
-                    this.RemoveElem("HOME");
-
-                    switch (value)
-                    {
-                        case TelephoneLocation.work:
-                            SetElem("WORK", null);
-                            break;
-                        case TelephoneLocation.home:
-                            SetElem("HOME", null);
-                            break;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// vCard Address Element
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VAddress : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VAddress(XmlDocument doc) : base("ADR", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VAddress(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Street
-            {
-                get { return GetElem("STREET"); }
-                set { SetElem("STREET", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Locality
-            {
-                get { return GetElem("LOCALITY"); }
-                set { SetElem("LOCALITY", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Region
-            {
-                get { return GetElem("REGION"); }
-                set { SetElem("REGION", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string PostalCode
-            {
-                get { return GetElem("PCODE"); }
-                set { SetElem("PCODE", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Country
-            {
-                get { return GetElem("CTRY"); }
-                set { SetElem("CTRY", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public string Extra
-            {
-                get { return GetElem("EXTADD"); }
-                set { SetElem("EXTADD", value); }
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            public AddressLocation Location
-            {
-                get
-                {
-                    if (this["WORK"] != null) return AddressLocation.work;
-                    else if (this["HOME"] != null) return AddressLocation.home;
-                    else return AddressLocation.unknown;
-                }
-                set
-                {
-                    this.RemoveElem("WORK");
-                    this.RemoveElem("HOME");
-
-                    switch (value)
-                    {
-                        case AddressLocation.work:
-                            SetElem("WORK", null);
-                            break;
-                        case AddressLocation.home:
-                            SetElem("HOME", null);
-                            break;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// vCard Email Element
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VEmail : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VEmail(XmlDocument doc) : base("EMAIL", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VEmail(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// The e-mail address
-            /// </summary>
-            public string UserId
-            {
-                get { return GetElem("USERID"); }
-                set { SetElem("USERID", value); }
-            }
-
-            /// <summary>
-            /// Is this the preferred e-mail address?
-            /// </summary>
-            public bool IsPreferred
-            {
-                get { return (this["PREF"] != null); }
-                set
-                {
-                    if (value)
-                        SetElem("PREF", null);
-                    else
-                        RemoveElem("PREF");
-                }
-            }
-
-            /// <summary>
-            /// What kind of address is this?
-            /// </summary>
-            public EmailType Type
-            {
-                get
-                {
-                    if (this["HOME"] != null) return EmailType.home;
-                    else if (this["WORK"] != null) return EmailType.work;
-                    else if (this["INTERNET"] != null) return EmailType.internet;
-                    else if (this["X400"] != null) return EmailType.x400;
-                    else return EmailType.NONE;
-                }
-                set
-                {
-                    RemoveElem("HOME");
-                    RemoveElem("WORK");
-                    RemoveElem("INTERNET");
-                    RemoveElem("X400");
-
-                    switch (value)
-                    {
-                        case EmailType.home:
-                            SetElem("HOME", null);
-                            break;
-                        case EmailType.work:
-                            SetElem("WORK", null);
-                            break;
-                        case EmailType.internet:
-                            SetElem("INTERNET", null);
-                            break;
-                        case EmailType.x400:
-                            SetElem("X400", null);
-                            break;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Geographic location
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VGeo : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VGeo(XmlDocument doc) : base("GEO", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VGeo(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// Latitude
-            /// </summary>
-            public double Lat
-            {
-                get { return double.Parse(GetElem("LAT")); }
-                set { SetElem("LAT", string.Format("{0:6f}", value)); }
-            }
-
-            /// <summary>
-            /// Longitude
-            /// </summary>
-            public double Lon
-            {
-                get { return double.Parse(GetElem("LON")); }
-                set { SetElem("LON", string.Format("{0:6f}", value)); }
-            }
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class VPhoto : Element
-        {
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="doc"></param>
-            public VPhoto(XmlDocument doc) : base("PHOTO", URI.VCARD, doc)
-            {
-            }
-
-            /// <summary>
-            ///
-            /// </summary>
-            /// <param name="prefix"></param>
-            /// <param name="qname"></param>
-            /// <param name="doc"></param>
-            public VPhoto(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                base(prefix, qname, doc)
-            {
-            }
-
-            /// <summary>
-            /// The MIME type of the image.  Must be set before
-            /// calling Image.set.
-            /// </summary>
-            public System.Drawing.Imaging.ImageFormat ImageType
-            {
-                get 
-                {
-                    System.Drawing.Imaging.ImageFormat def = System.Drawing.Imaging.ImageFormat.Png;
-
-                    // Strip off all but everything after the last slash,
-                    // if any.
-                    string t = GetElem("TYPE");
-                    if ((t == null) || (t == ""))
-                        return def;
-                    string[] parts = t.Split("/".ToCharArray());
-                    if (parts.Length == 0)
-                        return def;
-                    t = parts[parts.Length - 1].ToLower();
-                    switch (t)
-                    {
-                        case "jpeg":
-                        case "jpg":
-                            return System.Drawing.Imaging.ImageFormat.Jpeg;
-                        case "png":
-                            return System.Drawing.Imaging.ImageFormat.Png;
-                        case "bmp":
-                            return System.Drawing.Imaging.ImageFormat.Bmp;
-                        case "gif":
-                            return System.Drawing.Imaging.ImageFormat.Gif;
-                        case "tif":
-                        case "tiff":
-                            return System.Drawing.Imaging.ImageFormat.Tiff;
-                    }
-                    return def;
-                }
-                set { SetElem("TYPE", value.ToString().ToLower()); }
-            }
-
-            /// <summary>
-            /// The bytes associated with the picture
-            /// </summary>
-            public byte[] BinVal
-            {
-                get
-                {
-                    string b64 = GetElem("BINVAL");
-                    if (b64 == null)
-                        return null;
-                    return Convert.FromBase64String(b64);
-                }
-                set { SetElem("BINVAL", Convert.ToBase64String(value)); }
-            }
-
-            /// <summary>
-            /// An Image representation of the bytes in the picture.
-            /// The MimeType MUST be set before calling set.
-            /// </summary>
-            public System.Drawing.Image Image
-            {
-                get
-                {
-                    byte[] bin = this.BinVal;
-                    if (bin == null)
-                        return null;
-                    System.IO.MemoryStream ms = new System.IO.MemoryStream(bin);
-                    return System.Drawing.Image.FromStream(ms);
-                }
-                set
-                {
-                    System.IO.MemoryStream ms = new System.IO.MemoryStream();
-                    Image.Save(ms, this.ImageType);
-                    this.BinVal = ms.GetBuffer();
-                }
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/iq/Version.cs b/lib/jabber-net/jabber/protocol/iq/Version.cs
deleted file mode 100644
index a8ebd01..0000000
--- a/lib/jabber-net/jabber/protocol/iq/Version.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.iq
-{
-    /// <summary>
-    /// IQ packet with a version query element inside.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class VersionIQ : jabber.protocol.client.TypedIQ<Version>
-    {
-        /// <summary>
-        /// Create a version IQ
-        /// </summary>
-        /// <param name="doc"></param>
-        public VersionIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A time query element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Version : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Version(XmlDocument doc) : base("query", URI.VERSION, doc)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Version(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Name of the entity.
-        /// </summary>
-        public string EntityName
-        {
-            get { return GetElem("name"); }
-            set { SetElem("name", value); }
-        }
-
-        /// <summary>
-        /// Enitity version.  (Version was a keyword, or something)
-        /// </summary>
-        public string Ver
-        {
-            get { return GetElem("version"); }
-            set { SetElem("version", value); }
-        }
-
-        /// <summary>
-        /// Operating system of the entity.
-        /// </summary>
-        public string OS
-        {
-            get { return GetElem("os"); }
-            set { SetElem("os", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Bind.cs b/lib/jabber-net/jabber/protocol/stream/Bind.cs
deleted file mode 100644
index d142564..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Bind.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// Bind start after binding
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Bind : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Bind(XmlDocument doc) :
-            base("", new XmlQualifiedName("bind", jabber.protocol.URI.BIND), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Bind(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The resource to bind to.  Null says for the server to pick.
-        /// </summary>
-        public string Resource
-        {
-            get { return GetElem("resource"); }
-            set { SetElem("resource", value); }
-        }
-
-        /// <summary>
-        /// The JID that the server selected for us.
-        /// </summary>
-        public string JID
-        {
-            get { return GetElem("jid"); }
-            set { SetElem("jid", value); }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Compression.cs b/lib/jabber-net/jabber/protocol/stream/Compression.cs
deleted file mode 100644
index feaf9e4..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Compression.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// XEP-138 compression.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Compression : Element
-    {
-        /// <summary>
-        /// Create a new compression feature element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public Compression(XmlDocument doc) :
-            base("", new XmlQualifiedName("compression", jabber.protocol.URI.COMPRESS_FEATURE), doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new compression element.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Compression(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The list of methods offered by the server.  Typically today, this will be one string: "zlib".
-        /// </summary>
-        public string[] Methods
-        {
-            get
-            {
-                XmlNodeList nl = GetElementsByTagName("method", URI.COMPRESS_FEATURE);
-                string[] meths = new string[nl.Count];
-                int i=0;
-                foreach (XmlElement m in nl)
-                {
-                    meths[i] = m.InnerText;
-                    i++;
-                }
-                return meths;
-            }
-            set
-            {
-                this.RemoveElems("method", URI.COMPRESS_FEATURE);
-                foreach (string m in value)
-                    SetElem("method", m);
-            }
-        }
-
-        /// <summary>
-        /// Does this compression element have the given method in it?
-        /// </summary>
-        /// <param name="method">The method to search for.  Typically: "zlib"</param>
-        /// <returns></returns>
-        public bool HasMethod(string method)
-        {
-            foreach (XmlElement meth in GetElementsByTagName("method", URI.COMPRESS_FEATURE))
-            {
-                if (meth.InnerText == method)
-                    return true;
-            }
-            return false;
-        }
-    }
-
-    /// <summary>
-    /// XEP-138 compression failure.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class CompressionFailure : Element
-    {
-        /// <summary>
-        /// Create a new compression element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public CompressionFailure(XmlDocument doc) :
-            base("", new XmlQualifiedName("failure", jabber.protocol.URI.COMPRESS), doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new compression element.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public CompressionFailure(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The error described by this failure.  One of:
-        /// setup-failed
-        /// processing-failed
-        /// unsupported-method
-        /// </summary>
-        public string Error
-        {
-            get { return GetFirstChildElement().Name; }
-            set
-            {
-                this.RemoveAll();
-                this.AddChild(this.OwnerDocument.CreateElement(value));
-            }
-        }
-    }
-
-    /// <summary>
-    /// XEP-138 compression start.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Compress : Element
-    {
-        /// <summary>
-        /// Create a new compress element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public Compress(XmlDocument doc) :
-            base("", new XmlQualifiedName("compress", jabber.protocol.URI.COMPRESS), doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new compress element.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Compress(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// What compression method should be used?
-        /// </summary>
-        public string Method
-        {
-            get { return GetElem("method"); }
-            set { SetElem("method", value); }
-        }
-    }
-
-
-    /// <summary>
-    /// XEP-138 compression success.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Compressed : Element
-    {
-        /// <summary>
-        /// Create a new compression element.
-        /// </summary>
-        /// <param name="doc"></param>
-        public Compressed(XmlDocument doc) :
-            base("", new XmlQualifiedName("compressed", jabber.protocol.URI.COMPRESS), doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a new compression element.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Compressed(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Error.cs b/lib/jabber-net/jabber/protocol/stream/Error.cs
deleted file mode 100644
index 07603aa..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Error.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// Stream error packet.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Error : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Error(XmlDocument doc) : base("stream", new XmlQualifiedName("error", URI.STREAM), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Error(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The error message
-        /// </summary>
-        public string Message
-        {
-            get { return this.InnerText; }
-            set { this.InnerXml = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Factory.cs b/lib/jabber-net/jabber/protocol/stream/Factory.cs
deleted file mode 100644
index b5a04ff..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Factory.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// ElementFactory for http://etherx.jabber.org/streams
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Factory : jabber.protocol.IPacketTypes
-    {
-        private static QnameType[] s_qnt = new QnameType[]
-        {
-            new QnameType("stream",     URI.STREAM,    typeof(Stream)),
-            new QnameType("error",      URI.STREAM,    typeof(Error)),
-            new QnameType("features",   URI.STREAM,    typeof(Features)),
-
-            new QnameType("starttls",   URI.START_TLS, typeof(StartTLS)),
-            new QnameType("proceed",    URI.START_TLS, typeof(Proceed)),
-            new QnameType("failure",    URI.START_TLS, typeof(TLSFailure)),
-
-            new QnameType("compression", URI.COMPRESS_FEATURE, typeof(Compression)),
-            new QnameType("failure",    URI.COMPRESS,  typeof(CompressionFailure)),
-            new QnameType("compress",   URI.COMPRESS,  typeof(Compressed)),
-            new QnameType("compressed", URI.COMPRESS,  typeof(Compressed)),
-
-            new QnameType("mechanisms", URI.SASL,      typeof(Mechanisms)),
-            new QnameType("mechanism",  URI.SASL,      typeof(Mechanism)),
-            new QnameType("auth",       URI.SASL,      typeof(Auth)),
-            new QnameType("challenge",  URI.SASL,      typeof(Challenge)),
-            new QnameType("response",   URI.SASL,      typeof(Response)),
-            new QnameType("failure",    URI.SASL,      typeof(SASLFailure)),
-            new QnameType("abort",      URI.SASL,      typeof(Abort)),
-            new QnameType("success",    URI.SASL,      typeof(Success)),
-
-            new QnameType("session",    URI.SESSION,   typeof(Session)),
-            new QnameType("bind",       URI.BIND,      typeof(Bind)),
-
-            new QnameType("body",       URI.HTTP_BIND, typeof(Body)),
-        };
-        QnameType[] IPacketTypes.Types { get { return s_qnt; } }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Features.cs b/lib/jabber-net/jabber/protocol/stream/Features.cs
deleted file mode 100644
index 28cdd7a..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Features.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// Stream Features handler
-    /// </summary>
-    public delegate void FeaturesHandler(Object sender, Features feat);
-
-    /// <summary>
-    /// Stream features.  Will only be set by a version="1.0" or higher XMPP server.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Features : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Features(XmlDocument doc) :
-            base("stream", new XmlQualifiedName("features", jabber.protocol.URI.STREAM), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Features(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The starttls element, or null if none found.
-        /// </summary>
-        public StartTLS StartTLS
-        {
-            get { return this["starttls", jabber.protocol.URI.START_TLS] as StartTLS; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// The SASL mechanisms, or null if none found.
-        /// </summary>
-        public Mechanisms Mechanisms
-        {
-            get { return this["mechanisms", jabber.protocol.URI.SASL] as Mechanisms; }
-            set { ReplaceChild(value); }
-        }
-
-        /// <summary>
-        /// The compression element, or null if none found.
-        /// </summary>
-        public Compression Compression
-        {
-            get { return this["compression", jabber.protocol.URI.COMPRESS_FEATURE] as Compression; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/HttpBind.cs b/lib/jabber-net/jabber/protocol/stream/HttpBind.cs
deleted file mode 100644
index b317f59..0000000
--- a/lib/jabber-net/jabber/protocol/stream/HttpBind.cs
+++ /dev/null
@@ -1,461 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// These error conditions may be read by constrained clients. 
-    /// They are used for connection manager problems, abstracting stream errors, 
-    /// communication problems between the connection manager and the server, 
-    /// and invalid client requests (binding syntax errors, possible attacks, etc.)
-    /// </summary>
-    [Dash]
-    public enum ConditionType
-    {
-        /// <summary>
-        ///  None specified
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// The target domain specified in the 'to' attribute or the target host or
-        /// port specified in the 'route' attribute is no longer serviced by 
-        /// the connection manager.
-        /// </summary>
-        host_gone,
-        /// <summary>
-        /// The target domain specified in the 'to' attribute or the target host
-        /// or port specified in the 'route' attribute is unknown to the connection manager.
-        /// </summary>
-        host_unknown,
-        /// <summary>
-        /// The initialization element lacks a 'to' or 'route' attribute (or the 
-        /// attribute has no value) but the connection manager requires one.
-        /// </summary>
-        improper_addressing,
-        /// <summary>
-        /// The connection manager has experienced an internal error that prevents 
-        /// it from servicing the request.
-        /// </summary>
-        internal_server_error,
-        /// <summary>
-        /// The connection manager was unable to connect to, or unable to 
-        /// connect securely to, or has lost its connection to, the server.
-        /// </summary>
-        remote_connection_failed,
-        /// <summary>
-        /// Encapsulates an error in the protocol being transported.
-        /// </summary>
-        remote_stream_error,
-        /// <summary>
-        /// The connection manager does not operate at this URI 
-        /// (e.g., the connection manager accepts only SSL or TLS connections at 
-        /// some https: URI rather than the http: URI requested by the client). 
-        /// The client may try POSTing to the URI in the content of the <uri/> child element.
-        /// </summary>
-        see_other_uri,
-        /// <summary>
-        /// The connection manager is being shut down. All active HTTP sessions are
-        /// being terminated. No new sessions can be created.
-        /// </summary>
-        system_shutdown,
-        /// <summary>
-        /// The error is not one of those defined herein; the connection manager SHOULD 
-        /// include application-specific information in the content of the <body/> wrapper.
-        /// </summary>
-        undefined_condition
-    };
-
-    /// <summary>
-    /// Is this an error or a termination?
-    /// </summary>
-    public enum BodyType
-    {
-        /// <summary>
-        /// None specified
-        /// </summary>
-        UNSPECIFIED = -1,
-        /// <summary>
-        /// Error encapsulated in response
-        /// </summary>
-        error,
-        /// <summary>
-        /// Terminate the stream
-        /// </summary>
-        terminate
-    };
-    
-    /// <summary>
-    /// An HTTP Binding body element, which encapsulates stanzas.
-    /// See XEP-124 and XEP-206 for details.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Body : Element
-    {
-        /// <summary>
-        /// Create for outbound
-        /// </summary>
-        /// <param name="doc"></param>
-        public Body(XmlDocument doc) : base("body", URI.HTTP_BIND, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create inbound instance
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Body(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The child elements of the body.  0 or more stanzas.
-        /// </summary>
-        public ElementList Contents
-        {
-            get { return new ElementList(this); }
-            set
-            {
-                InnerXml = "";
-                foreach (XmlElement el in value)
-                    AddChild(el);
-            }
-        }
-
-        /// <summary>
-        /// The content encodings that server can handle.
-        /// </summary>
-        public string[] Accept
-        {
-            get { return GetAttr("accept").Split(new char[] {','}); }
-            set { SetAttr("accept", string.Join(",", value)); }
-        }
-
-        /// <summary>
-        /// Acknowledgement of a given RID.
-        /// </summary>
-        public long Ack
-        {
-            get { return GetLongAttr("ack"); }
-            set { SetLongAttr("ack", value); }
-        }
-
-        /// <summary>
-        /// Stream ID for digest auth calculations
-        /// </summary>
-        public string AuthID
-        {
-            get { return GetAttr("authid"); }
-            set { SetAttr("authid", value); }
-        }
-
-        /// <summary>
-        /// The charsets supported by the server.  Almost always just UTF8, if it exists.
-        /// </summary>
-        public string[] Charsets
-        {
-            get { return GetAttr("accept").Split(new char[] {' '}); }
-            set { SetAttr("accept", string.Join(" ", value)); }
-        }
-
-        /// <summary>
-        /// The error condition, if this is an error.
-        /// </summary>
-        public ConditionType Condition
-        {
-            get { return GetEnumAttr<ConditionType>("condition"); }
-            set { SetEnumAttr("condition", value); }
-        }
-
-        /// <summary>
-        /// 
-        /// </summary>
-        public string Content
-        {
-            get { return GetAttr("content"); }
-            set { SetAttr("content", value); }
-        }
-
-        /// <summary>
-        /// A client MAY include a 'from' attribute to enable the 
-        /// connection manager to forward its identity to the server.
-        /// </summary>
-        public string From
-        {
-            get { return GetAttr("from"); }
-            set { SetAttr("from", value); }
-        }
-
-        /// <summary>
-        /// This attribute specifies the maximum number of requests the connection manager 
-        /// is allowed to keep waiting at any one time during the session. If the client 
-        /// is not able to use HTTP Pipelining then this SHOULD be set to "1".
-        /// </summary>
-        public int Hold
-        {
-            get { return GetIntAttr("hold"); }
-            set { SetIntAttr("hold", value); }
-        }
-
-        /// <summary>
-        /// This attribute specifies the longest allowable inactivity period (in seconds). 
-        /// This enables the client to ensure that the periods with no requests pending 
-        /// are never too long (see Polling Sessions and Inactivity).
-        /// </summary>
-        public int Inactivity
-        {
-            get { return GetIntAttr("inactivity"); }
-            set { SetIntAttr("inactivity", value); }
-        }
-        
-        /// <summary>
-        /// The client MUST set the 'key' attribute of all subsequent requests to the 
-        /// value of the next key in the generated sequence (decrementing from K(n-1) 
-        /// towards K(1) with each request sent).
-        /// </summary>
-        public string Key
-        {
-            get { return GetAttr("key"); }
-            set { SetAttr("key", value); }
-        }
-        
-        /// <summary>
-        /// If the connection manager supports session pausing (see Inactivity) then it 
-        /// SHOULD advertise that to the client by including a 'maxpause' attribute in 
-        /// the session creation response element. The value of the attribute indicates 
-        /// the maximum length of a temporary session pause (in seconds) that a client
-        /// MAY request.
-        /// </summary>
-        public int MaxPause
-        {
-            get { return GetIntAttr("maxpause"); }
-            set { SetIntAttr("maxpause", value); }
-        }
-        
-        /// <summary>
-        /// The client MUST set the 'newkey' attribute of the first request in the session to the value K(n).
-        /// </summary>
-        public string NewKey
-        {
-            get { return GetAttr("newkey"); }
-            set { SetAttr("newkey", value); }
-        }
-        
-        /// <summary>
-        /// If a client encounters an exceptional temporary situation during which it 
-        /// will be unable to send requests to the connection manager for a period of 
-        /// time greater than the maximum inactivity period (e.g., while a runtime 
-        /// environment changes from one web page to another), and if the connection 
-        /// manager included a 'maxpause' attribute in its Session Creation Response,
-        /// then the client MAY request a temporary increase to the maximum inactivity 
-        /// period by including a 'pause' attribute in a request.
-        /// </summary>
-        public int Pause
-        {
-            get { return GetIntAttr("pause"); }
-            set { SetIntAttr("pause", value); }
-        }
-        
-        /// <summary>
-        /// This attribute specifies the shortest allowable polling interval (in seconds). 
-        /// This enables the client to not send empty request elements more often than desired.
-        /// </summary>
-        public int Polling
-        {
-            get { return GetIntAttr("polling"); }
-            set { SetIntAttr("polling", value); }
-        }
-        
-        /// <summary>
-        /// After receiving a request with an 'ack' value less than the 'rid' of the last
-        /// request that it has already responded to, the connection manager MAY inform 
-        /// the client of the situation by sending its next response immediately instead
-        /// of waiting until it has stanzas to send to the client (e.g., if some time
-        /// has passed since it responded). In this case it SHOULD include a 'report'
-        /// attribute set to one greater than the 'ack' attribute it received from the 
-        /// client, and a 'time' attribute set to the number of milliseconds since it 
-        /// sent the response associated with the 'report' attribute.
-        /// </summary>
-        public int Report
-        {
-            get { return GetIntAttr("report"); }
-            set { SetIntAttr("report", value); }
-        }
-        
-        /// <summary>
-        /// This attribute enables the connection manager to limit the number of 
-        /// simultaneous requests the client makes. The RECOMMENDED values are 
-        /// either "2" or one more than the value of the 'hold' attribute specified 
-        /// in the session request.
-        /// </summary>
-        public int Requests
-        {
-            get { return GetIntAttr("requests"); }
-            set { SetIntAttr("requests", value); }
-        }
-
-        /// <summary>
-        /// Request ID.  Needs to start out random, and increment by one for each new BOSH
-        /// request.
-        /// </summary>
-        public long RID
-        {
-            get { return GetLongAttr("rid"); }
-            set { SetLongAttr("rid", value); }
-        }
-
-        /// <summary>
-        /// connection manager MAY be configured to enable sessions with more than one 
-        /// server in different domains.  When requesting a session with such a 'proxy' 
-        /// connection manager, a client SHOULD include a 'route' attribute that 
-        /// specifies the protocol, hostname, and port of the server with which it 
-        /// wants to communicate, formatted as "proto:host:port" 
-        /// (e.g., "xmpp:jabber.org:9999").
-        /// </summary>
-        public string Route
-        {
-            get { return GetAttr("route"); }
-            set { SetAttr("route", value); }
-        }
-
-        /// <summary>
-        /// A client MAY include a 'secure' attribute to specify that communications 
-        /// between the connection manager and the server must be "secure". (Note: The
-        /// 'secure' attribute is of type xs:boolean (see XML Schema Part 2) and the 
-        /// default value is "false". [17]) If a connection manager receives a session
-        /// request with the 'secure' attribute set to "true" or "1", then it MUST 
-        /// respond to the client with a remote-connection-failed error as soon as it
-        /// determines that it cannot communicate in a secure way with the server.
-        /// </summary>
-        public bool Secure
-        {
-            get
-            {
-                string s = GetAttr("secure");
-                switch (s)
-                {
-                case "true":
-                    return true;
-                case "1":
-                    return true;
-                default:
-                    return false;
-                }
-            }
-            set
-            {
-                if (value)
-                    SetAttr("secure", "true");
-                else
-                    SetAttr("secure", null);
-            }
-        }
-
-        /// <summary>
-        /// Stream ID
-        /// </summary>
-        public string SID
-        {
-            get { return GetAttr("sid"); }
-            set { SetAttr("sid", value); }
-        }
-        
-        /// <summary>
-        /// If a connection manager supports the multi-streams feature, it MUST 
-        /// include a 'stream' attribute in its Session Creation Response. If a
-        /// client does not receive the 'stream' attribute then it MUST assume 
-        /// that the connection manager does not support the feature. [22]
-        /// 
-        /// The 'stream' attribute identifies the first stream to be opened for 
-        /// the session. The value of each 'stream' attribute MUST be an opaque 
-        /// and unpredictable name that is unique within the context of the 
-        /// connection manager application.
-        /// </summary>
-        public string Stream
-        {
-            get { return GetAttr("stream"); }
-            set { SetAttr("stream", value); }
-        }
-        
-        /// <summary>
-        /// After receiving a request with an 'ack' value less than the 'rid' 
-        /// of the last request that it has already responded to, the connection 
-        /// manager MAY inform the client of the situation by sending its next
-        /// response immediately instead of waiting until it has stanzas to
-        /// send to the client (e.g., if some time has passed since it responded).
-        /// In this case it SHOULD include a 'report' attribute set to one greater
-        /// than the 'ack' attribute it received from the client, and a 'time' 
-        /// attribute set to the number of milliseconds since it sent the response
-        /// associated with the 'report' attribute.
-        /// </summary>
-        public int Time
-        {
-            get { return GetIntAttr("time"); }
-            set { SetIntAttr("time", value); }
-        }
-
-        /// <summary>
-        /// This attribute specifies the target domain of the first stream.
-        /// </summary>
-        public string To
-        {
-            get { return GetAttr("to"); }
-            set { SetAttr("to", value); }
-        }
-
-        /// <summary>
-        /// At any time, the client MAY gracefully terminate the session by sending a <body/> 
-        /// element with a 'type' attribute set to "terminate". The termination request 
-        /// MAY include one or more stanzas that the connection manager MUST forward to 
-        /// the server to ensure graceful logoff.
-        /// </summary>
-        public BodyType Type
-        {
-            get { return GetEnumAttr<BodyType>("type"); }
-            set { SetEnumAttr("type", value); }         
-        }
-        
-        /// <summary>
-        /// This attribute specifies the highest version of the BOSH protocol 
-        /// that the client supports. The numbering scheme is "major.minor" 
-        /// (where the minor number MAY be incremented higher than a single digit, 
-        /// so it MUST be treated as a separate integer). Note: The 'ver' attribute 
-        /// should not be confused with the version of any protocol being transported.
-        /// </summary>
-        public string Ver
-        {
-            get { return GetAttr("ver"); }
-            set { SetAttr("ver", value); }
-        }
-
-        /// <summary>
-        /// This attribute specifies the longest time (in seconds) that the connection
-        /// manager is allowed to wait before responding to any request during the session. 
-        /// This enables the client to limit the delay before it discovers any network failure, 
-        /// and to prevent its HTTP/TCP connection from expiring due to inactivity.
-        /// </summary>
-        public int Wait
-        {
-            get { return GetIntAttr("wait"); }
-            set { SetIntAttr("wait", value); }
-        }
-   }
-}
\ No newline at end of file
diff --git a/lib/jabber-net/jabber/protocol/stream/SASL.cs b/lib/jabber-net/jabber/protocol/stream/SASL.cs
deleted file mode 100644
index 1a22713..0000000
--- a/lib/jabber-net/jabber/protocol/stream/SASL.cs
+++ /dev/null
@@ -1,559 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// SASL mechanisms registered with IANA as of 5/16/2004.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [Flags]
-    public enum MechanismType
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        NONE = 0,
-        /// <summary>
-        /// LIMITED  [RFC2222]   IESG <iesg at ietf.org>
-        /// </summary>
-        KERBEROS_V4 = (1 << 0),
-        /// <summary>
-        /// COMMON   [RFC2222]   IESG <iesg at ietf.org>
-        /// </summary>
-        GSSAPI = (1 << 1),
-        /// <summary>
-        /// OBSOLETE [RFC2444]   IESG <iesg at ietf.org>
-        /// </summary>
-        SKEY  = (1 << 2),
-        /// <summary>
-        /// COMMON   [RFC2222]   IESG <iesg at ietf.org>
-        /// </summary>
-        EXTERNAL = (1 << 3),
-        /// <summary>
-        /// LIMITED  [RFC2195]   IESG <iesg at ietf.org>
-        /// </summary>
-        CRAM_MD5 = (1 << 4),
-        /// <summary>
-        /// COMMON   [RFC2245]   IESG <iesg at ietf.org>
-        /// </summary>
-        ANONYMOUS = (1 << 5),
-        /// <summary>
-        /// COMMON   [RFC2444]   IESG <iesg at ietf.org>
-        /// </summary>
-        OTP = (1 << 6),
-        /// <summary>
-        /// LIMITED  [Leach]     Paul Leach <paulle at microsoft.com>
-        /// </summary>
-        GSS_SPNEGO = (1 << 7),
-        /// <summary>
-        /// COMMON   [RFC2595]   IESG <iesg at ietf.org>
-        /// </summary>
-        PLAIN = (1 << 8),
-        /// <summary>
-        /// COMMON   [RFC2808]   Magnus Nystrom <magnus at rsasecurity.com>
-        /// </summary>
-        SECURID = (1 << 9),
-        /// <summary>
-        /// LIMITED  [Leach]     Paul Leach <paulle at microsoft.com>
-        /// </summary>
-        NTLM = (1 << 10),
-        /// <summary>
-        /// LIMITED  [Gayman]    Mark G. Gayman <mgayman at novell.com>
-        /// </summary>
-        NMAS_LOGIN = (1 << 11),
-        /// <summary>
-        /// LIMITED  [Gayman]    Mark G. Gayman <mgayman at novell.com>
-        /// </summary>
-        NMAS_AUTHEN = (1 << 12),
-        /// <summary>
-        /// COMMON   [RFC2831]   IESG <iesg at ietf.org>
-        /// </summary>
-        DIGEST_MD5 = (1 << 13),
-        /// <summary>
-        /// [RFC3163]  robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_U_RSA_SHA1_ENC = (1 << 14),
-        /// <summary>
-        /// COMMON   [RFC3163]   robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_M_RSA_SHA1_ENC = (1 << 15),
-        /// <summary>
-        /// COMMON   [RFC3163]   robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_U_DSA_SHA1 = (1 << 16),
-        /// <summary>
-        /// COMMON   [RFC3163]   robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_M_DSA_SHA1 = (1 << 17),
-        /// <summary>
-        /// COMMON   [RFC3163]   robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_U_ECDSA_SHA1 = (1 << 18),
-        /// <summary>
-        /// COMMON   [RFC3163]   robert.zuccherato at entrust.com
-        /// </summary>
-        ISO_9798_M_ECDSA_SHA1 = (1 << 19),
-        /// <summary>
-        /// COMMON   [Josefsson] Simon Josefsson <simon at josefsson.org>
-        /// </summary>
-        KERBEROS_V5 = (1 << 20),
-        /// <summary>
-        /// LIMITED  [Brimhall]  Vince Brimhall <vbrimhall at novell.com>
-        /// </summary>
-        NMAS_SAMBA_AUTH = (1 << 21)
-    }
-
-    /// <summary>
-    /// SASL mechanisms in stream features.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Mechanisms : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Mechanisms(XmlDocument doc) :
-            base("", new XmlQualifiedName("mechanisms", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Mechanisms(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The SASL mechanisms valid for this stream.
-        /// </summary>
-        /// <returns></returns>
-        public Mechanism[] GetMechanisms()
-        {
-            XmlNodeList nl = GetElementsByTagName("mechanism", URI.SASL);
-            Mechanism[] items = new Mechanism[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                items[i] = (Mechanism) n;
-                i++;
-            }
-            return items;
-        }
-
-        /// <summary>
-        /// A bitmap of all of the implemented types.
-        /// </summary>
-        public MechanismType Types
-        {
-            get
-            {
-                MechanismType ret = MechanismType.NONE;
-                foreach (Mechanism m in GetMechanisms())
-                {
-                    ret |= m.MechanismType;
-                }
-                return ret;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Stores SASL mechanisms in stream features.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Mechanism : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Mechanism(XmlDocument doc) :
-            base("", new XmlQualifiedName("mechanism", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Mechanism(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The IANA-registered SASL mechanism name.
-        /// </summary>
-        public string MechanismName
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-
-        /// <summary>
-        /// SASL mechanism, as an enum
-        /// </summary>
-        public MechanismType MechanismType
-        {
-            get { return GetMechanismType(MechanismName); }
-            set { MechanismName = GetMechanism(value); }
-        }
-
-        /// <summary>
-        /// The SASL mechanism, as an enum.
-        /// </summary>
-        public static MechanismType GetMechanismType(string name)
-        {
-            switch (name)
-            {
-                case "KERBEROS_V4":
-                    return MechanismType.KERBEROS_V4;
-                case "GSSAPI":
-                    return MechanismType.GSSAPI;
-                case "SKEY":
-                    return MechanismType.SKEY;
-                case "EXTERNAL":
-                    return MechanismType.EXTERNAL;
-                case "CRAM-MD5":
-                    return MechanismType.CRAM_MD5;
-                case "ANONYMOUS":
-                    return MechanismType.ANONYMOUS;
-                case "OTP":
-                    return MechanismType.OTP;
-                case "GSS-SPNEGO":
-                    return MechanismType.GSS_SPNEGO;
-                case "PLAIN":
-                    return MechanismType.PLAIN;
-                case "SECURID":
-                    return MechanismType.SECURID;
-                case "NTLM":
-                    return MechanismType.NTLM;
-                case "NMAS_LOGIN":
-                    return MechanismType.NMAS_LOGIN;
-                case "NMAS_AUTHEN":
-                    return MechanismType.NMAS_AUTHEN;
-                case "DIGEST-MD5":
-                    return MechanismType.DIGEST_MD5;
-                case "9798-U-RSA-SHA1-ENC":
-                    return MechanismType.ISO_9798_U_RSA_SHA1_ENC;
-                case "9798-M-RSA-SHA1-ENC":
-                    return MechanismType.ISO_9798_M_RSA_SHA1_ENC;
-                case "9798-U-DSA-SHA1":
-                    return MechanismType.ISO_9798_U_DSA_SHA1;
-                case "9798-M-DSA-SHA1":
-                    return MechanismType.ISO_9798_M_DSA_SHA1;
-                case "9798-U-ECDSA-SHA1":
-                    return MechanismType.ISO_9798_U_ECDSA_SHA1;
-                case "9798-M-ECDSA-SHA1":
-                    return MechanismType.ISO_9798_M_ECDSA_SHA1;
-                case "KERBEROS_V5":
-                    return MechanismType.KERBEROS_V5;
-                case "NMAS-SAMBA-AUTH":
-                    return MechanismType.NMAS_SAMBA_AUTH;
-                default:
-                    return MechanismType.NONE;
-            }
-        }
-
-        /// <summary>
-        /// The SASL mechanism, as a string.
-        /// </summary>
-        public static string GetMechanism(MechanismType type)
-        {
-            switch (type)
-            {
-                case MechanismType.KERBEROS_V4:
-                    return "KERBEROS_V4";
-                case MechanismType.GSSAPI:
-                    return "GSSAPI";
-                case MechanismType.SKEY:
-                    return "SKEY";
-                case MechanismType.EXTERNAL:
-                    return "EXTERNAL";
-                case MechanismType.CRAM_MD5:
-                    return "CRAM-MD5";
-                case MechanismType.ANONYMOUS:
-                    return "ANONYMOUS";
-                case MechanismType.OTP:
-                    return "OTP";
-                case MechanismType.GSS_SPNEGO:
-                    return "GSS-SPNEGO";
-                case MechanismType.PLAIN:
-                    return "PLAIN";
-                case MechanismType.SECURID:
-                    return "SECURID";
-                case MechanismType.NTLM:
-                    return "NTLM";
-                case MechanismType.NMAS_LOGIN:
-                    return "NMAS_LOGIN";
-                case MechanismType.NMAS_AUTHEN:
-                    return "NMAS_AUTHEN";
-                case MechanismType.DIGEST_MD5:
-                    return "DIGEST-MD5";
-                case MechanismType.ISO_9798_U_RSA_SHA1_ENC:
-                    return "9798-U-RSA-SHA1-ENC";
-                case MechanismType.ISO_9798_M_RSA_SHA1_ENC:
-                    return "9798-M-RSA-SHA1-ENC";
-                case MechanismType.ISO_9798_U_DSA_SHA1:
-                    return "9798-U-DSA-SHA1";
-                case MechanismType.ISO_9798_M_DSA_SHA1:
-                    return "9798-M-DSA-SHA1";
-                case MechanismType.ISO_9798_U_ECDSA_SHA1:
-                    return "9798-U-ECDSA-SHA1";
-                case MechanismType.ISO_9798_M_ECDSA_SHA1:
-                    return "9798-M-ECDSA-SHA1";
-                case MechanismType.KERBEROS_V5:
-                    return "KERBEROS_V5";
-                case MechanismType.NMAS_SAMBA_AUTH:
-                    return "NMAS-SAMBA-AUTH";
-                default:
-                    return null;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Auth, Challenge, and Response.
-    /// </summary>
-    public abstract class Step : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Step(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The innards of the step.  If it is "=", it
-        /// means an intentionally blank response, not one waiting for a challenge.
-        /// </summary>
-        public byte[] Bytes
-        {
-            get
-            {
-                string it = this.InnerText;
-                if (it == "")
-                    return null;
-                if (it == "=")
-                    return new byte[0];
-                return Convert.FromBase64String(it);
-            }
-            set
-            {
-                if (value == null)
-                    this.InnerText = "";
-                else if (value.Length == 0)
-                    this.InnerText = "=";
-                else
-                    this.InnerText = Convert.ToBase64String(value);
-            }
-        }
-    }
-
-    /// <summary>
-    /// First phase of SASL auth.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Auth : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Auth(XmlDocument doc) :
-            base("", new XmlQualifiedName("auth", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Auth(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The chosen mechanism
-        /// </summary>
-        public MechanismType Mechanism
-        {
-            get
-            {
-                string m = GetAttribute("mechanism");
-                return jabber.protocol.stream.Mechanism.GetMechanismType(m);
-            }
-            set
-            {
-                string m = jabber.protocol.stream.Mechanism.GetMechanism(value);
-                SetAttribute("mechanism", m);
-            }
-        }
-    }
-    /// <summary>
-    /// Subsequent phases of SASL auth sent by server.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Challenge : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Challenge(XmlDocument doc) :
-            base("", new XmlQualifiedName("challenge", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Challenge(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// First phase of SASL auth.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Response : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Response(XmlDocument doc) :
-            base("", new XmlQualifiedName("response", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Response(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// SASL auth failed.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class SASLFailure : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public SASLFailure(XmlDocument doc) :
-            base("", new XmlQualifiedName("failure", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public SASLFailure(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Abort SASL auth.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Abort : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Abort(XmlDocument doc) :
-            base("", new XmlQualifiedName("abort", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Abort(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// SASL auth successfult.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Success : Step
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Success(XmlDocument doc) :
-            base("", new XmlQualifiedName("success", jabber.protocol.URI.SASL), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Success(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Session.cs b/lib/jabber-net/jabber/protocol/stream/Session.cs
deleted file mode 100644
index 740f43c..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Session.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// Session start after binding
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Session : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Session(XmlDocument doc) :
-            base("", new XmlQualifiedName("session", jabber.protocol.URI.SESSION), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Session(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/StartTLS.cs b/lib/jabber-net/jabber/protocol/stream/StartTLS.cs
deleted file mode 100644
index e5dc860..0000000
--- a/lib/jabber-net/jabber/protocol/stream/StartTLS.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// Start-TLS in stream features.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StartTLS : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public StartTLS(XmlDocument doc) :
-            base("", new XmlQualifiedName("starttls", jabber.protocol.URI.START_TLS), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public StartTLS(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Is starttls required?
-        /// </summary>
-        public bool Required
-        {
-            get { return this["required"] != null; }
-            set
-            {
-                if (value)
-                {
-                    if (this["required"] == null)
-                    {
-                        SetElem("required", null);
-                    }
-                }
-                else
-                {
-                    if (this["required"] != null)
-                    {
-                        RemoveElem("required");
-                    }
-                }
-            }
-        }
-    }
-
-    /// <summary>
-    /// Start-TLS proceed.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Proceed : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Proceed(XmlDocument doc) :
-            base("", new XmlQualifiedName("proceed", jabber.protocol.URI.START_TLS), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Proceed(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-
-    /// <summary>
-    /// Start-TLS failure.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class TLSFailure : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="xmlns"></param>
-        public TLSFailure(XmlDocument doc, string xmlns) :
-            base("", new XmlQualifiedName("failure", jabber.protocol.URI.START_TLS), doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public TLSFailure(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/stream/Stream.cs b/lib/jabber-net/jabber/protocol/stream/Stream.cs
deleted file mode 100644
index bdd2823..0000000
--- a/lib/jabber-net/jabber/protocol/stream/Stream.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Security.Cryptography;
-using System.Xml;
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.stream
-{
-    /// <summary>
-    /// The fabled stream:stream packet.  Id's get assigned automatically on allocation.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Stream : Packet
-    {
-        private static readonly RandomNumberGenerator RNG = RandomNumberGenerator.Create();
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        /// <param name="xmlns"></param>
-        public Stream(XmlDocument doc, string xmlns) :
-            base("stream", new XmlQualifiedName("stream", jabber.protocol.URI.STREAM), doc)
-        {
-            byte[] buf = new byte[4];
-            RNG.GetBytes(buf);
-            ID = HexString(buf);
-            NS = xmlns;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Stream(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Default stream namespace.  xmlns=''.
-        /// </summary>
-        public string NS
-        {
-            get { return this.GetAttribute("xmlns"); }
-            set { this.SetAttribute("xmlns", value); }
-        }
-
-        /// <summary>
-        /// The version attribute.  "1.0" for an XMPP-core-compliant stream.
-        /// </summary>
-        public string Version
-        {
-            get { return this.GetAttribute("version"); }
-            set { this.SetAttribute("version", value); }
-        }
-
-        /// <summary>
-        /// Make sure that the namespace from this stream gets output.
-        /// </summary>
-        public override string OuterXml
-        {
-            get { return this.OriginalOuterXml; }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/x/Caps.cs b/lib/jabber-net/jabber/protocol/x/Caps.cs
deleted file mode 100644
index d7aa7c5..0000000
--- a/lib/jabber-net/jabber/protocol/x/Caps.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-
-using bedrock.util;
-
-
-namespace jabber.protocol.x
-{
-    /// <summary>
-    /// Entity Capabilities.  See http://www.xmpp.org/extensions/xep-0115.html.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Caps : Element
-    {
-        private static readonly char[] SPLIT = " ".ToCharArray();
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Caps(XmlDocument doc)
-            : base("c", URI.CAPS, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Caps(string prefix, XmlQualifiedName qname, XmlDocument doc)
-            : base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The URI that describes the entity.
-        /// </summary>
-        public string Node
-        {
-            get { return GetAttr("node"); }
-            set { SetAttr("node", value); }
-        }
-
-        /// <summary>
-        /// The version of the entity.
-        /// </summary>
-        public string Version
-        {
-            get { return GetAttr("ver"); }
-            set { SetAttr("ver", value); }
-        }
-
-        /// <summary>
-        /// The hash type being used, or null for pre-v1.5 of XEP-115.
-        /// </summary>
-        public string Hash
-        {
-            get { return GetAttr("hash"); }
-            set { SetAttr("hash", value); }
-        }
-
-        /// <summary>
-        /// Is this a new-style (post v1.5) caps?
-        /// </summary>
-        public bool NewStyle
-        {
-            get { return HasAttribute("hash"); }
-        }
-
-        /// <summary>
-        /// The extensions currently on in the entity.
-        /// </summary>
-        [Obsolete]
-        public string[] Extensions
-        {
-            get { return GetAttr("ext").Split(SPLIT); }
-            set
-            {
-                if (value.Length == 0)
-                {
-                    if (this.HasAttribute("ext"))
-                        RemoveAttribute("ext");
-                }
-                else
-                    SetAttr("ext", string.Join(" ", value));
-            }
-        }
-
-        /// <summary>
-        /// All of the combinations of node#ver, node#ext.
-        /// </summary>
-        [Obsolete]
-        public string[] DiscoInfoNodes
-        {
-            get
-            {
-                string[] exts = Extensions;
-                string[] nodes = new string[exts.Length + 1];
-                int count = 0;
-                nodes[count] = Node + "#" + Version;
-                foreach (string ext in exts)
-                {
-                    nodes[++count] = Node + "#" + ext;
-                }
-
-                return nodes;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/x/Data.cs b/lib/jabber-net/jabber/protocol/x/Data.cs
deleted file mode 100644
index d96d384..0000000
--- a/lib/jabber-net/jabber/protocol/x/Data.cs
+++ /dev/null
@@ -1,640 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.x
-{
-    /// <summary>
-    /// XData types.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum XDataType
-    {
-        /// <summary>
-        /// This packet contains a form to fill out. Display it to the user (if your program can).
-        /// </summary>
-        form,
-        /// <summary>
-        /// The form is filled out, and this is the data that is being returned from the form.
-        /// </summary>
-        submit,
-        /// <summary>
-        /// Data results being returned from a search, or some other query.
-        /// </summary>
-        result,
-        /// <summary>
-        /// A form was cancelled.
-        /// </summary>
-        cancel
-    }
-
-    /// <summary>
-    /// Compare two x:data forms by form type.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class FormTypeComparer : System.Collections.Generic.Comparer<Data>
-    {
-        /// <summary>
-        /// Compare two x:data forms by form type
-        /// </summary>
-        /// <param name="x"></param>
-        /// <param name="y"></param>
-        /// <returns></returns>
-        public override int Compare(Data x, Data y)
-        {
-            return string.Compare(x.FormType, y.FormType);
-        }
-    }
-
-    /// <summary>
-    /// jabber:x:data support, as in http://www.xmpp.org/extensions/xep-0004.html.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Data : Element
-    {
-        /// <summary>
-        /// XEP-68 field that describes the type of the form.
-        /// </summary>
-        public const string FORM_TYPE = "FORM_TYPE";
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Data(XmlDocument doc) : base("x", URI.XDATA, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Data(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-
-        /// <summary>
-        /// Form instructions.
-        /// </summary>
-        public string Instructions
-        {
-            get { return GetElem("instructions"); }
-            set { SetElem("instructions", value); }
-        }
-
-        /// <summary>
-        /// The form title, for display at the top of a window.
-        /// </summary>
-        public string Title
-        {
-            get { return GetElem("title"); }
-            set { SetElem("title", value); }
-        }
-
-        /// <summary>
-        /// Type of this XData.
-        /// </summary>
-        public XDataType Type
-        {
-            get { return (XDataType)GetEnumAttr("type", typeof(XDataType)); }
-            set { SetAttribute("type", value.ToString());}
-        }
-
-        /// <summary>
-        /// List of form fields
-        /// </summary>
-        /// <returns></returns>
-        public Field[] GetFields()
-        {
-            XmlNodeList nl = GetElementsByTagName("field", URI.XDATA);
-            Field[] fields = new Field[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                fields[i] = (Field) n;
-                i++;
-            }
-            return fields;
-        }
-
-        /// <summary>
-        /// Add a form field
-        /// </summary>
-        /// <returns></returns>
-        public Field AddField()
-        {
-            Field f = new Field(this.OwnerDocument);
-            AddChild(f);
-            return f;
-        }
-
-        /// <summary>
-        /// Add a form field, with just the field name.
-        /// </summary>
-        /// <param name="var">Variable name</param>
-        /// <returns></returns>
-        public Field AddField(string var)
-        {
-            Field f = new Field(this.OwnerDocument);
-            if (var != null)
-                f.Var = var;
-            AddChild(f);
-            return f;
-        }
-
-        /// <summary>
-        /// Add a form field
-        /// </summary>
-        /// <param name="var">Variable name</param>
-        /// <param name="typ">Field Type</param>
-        /// <param name="label">Field label</param>
-        /// <param name="val">Field value</param>
-        /// <param name="desc">Description</param>
-        /// <returns></returns>
-        public Field AddField(string var, FieldType typ, string label, string val, string desc)
-        {
-            Field f = new Field(this.OwnerDocument);
-            if (var != null)
-                f.Var = var;
-            if (label != null)
-                f.Label = label;
-            f.Type = typ;
-            if (val != null)
-                f.Val = val;
-            if (desc != null)
-                f.Desc = desc;
-
-            AddChild(f);
-            return f;
-        }
-
-        /// <summary>
-        /// Get a field with the specified variable name.
-        /// </summary>
-        /// <param name="var"></param>
-        /// <returns></returns>
-        public Field GetField(string var)
-        {
-            XmlNodeList nl = GetElementsByTagName("field", URI.XDATA);
-            foreach (XmlNode n in nl)
-            {
-                Field f = (Field) n;
-                if (f.Var == var)
-                    return f;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Remove the first field with the var specified
-        /// </summary>
-        /// <param name="var"></param>
-        /// <returns></returns>
-        public Field RemoveField(string var)
-        {
-            XmlNodeList nl = GetElementsByTagName("field", URI.XDATA);
-            foreach (XmlNode n in nl)
-            {
-                Field f = (Field)n;
-                if (f.Var == var)
-                    return (Field)this.RemoveChild(f);
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// The XEP-68 type of this form.
-        /// </summary>
-        public string FormType
-        {
-            get 
-            {
-                Field f = GetField(FORM_TYPE);
-                if (f == null)
-                    return null;
-                return f.Val;
-            }
-            set
-            {
-                if (value == null)
-                {
-                    RemoveField(FORM_TYPE);
-                    return;
-                }
-                Field f = GetField(FORM_TYPE);
-                if (f == null)
-                    f = this.AddField(FORM_TYPE, FieldType.hidden, null, value, null);
-                else
-                    f.Val = value;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Types of fields.  This enum doesn't exactly match the XEP,
-    /// since most of the field types aren't valid identifiers in C#.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum FieldType
-    {
-        /// <summary>
-        /// Single-line text, and default.
-        /// </summary>
-        text_single,
-        /// <summary>
-        /// Password-style single line text.  Text obscured by *'s.
-        /// </summary>
-        text_private,
-        /// <summary>
-        /// Multi-line text
-        /// </summary>
-        text_multi,
-        /// <summary>
-        /// Multi-select list
-        /// </summary>
-        list_multi,
-        /// <summary>
-        /// Single-select list
-        /// </summary>
-        list_single,
-        /// <summary>
-        /// Checkbox
-        /// </summary>
-        boolean,
-        /// <summary>
-        /// Fixed text.
-        /// </summary>
-        Fixed,
-        /// <summary>
-        /// Hidden field.  Value is returned to sender as sent.
-        /// </summary>
-        hidden,
-        /// <summary>
-        /// Jabber ID.
-        /// </summary>
-        jid_single,
-        /// <summary>
-        /// A list of jabber ID's.
-        /// </summary>
-        jid_multi
-    }
-
-    /// <summary>
-    /// Form field.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Field : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Field(XmlDocument doc) : base("field", URI.XDATA, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Field(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Field type.
-        /// </summary>
-        public FieldType Type
-        {
-            get
-            {
-                switch (GetAttribute("type"))
-                {
-                    case "text-single":
-                        return FieldType.text_single;
-                    case "text-private":
-                        return FieldType.text_private;
-                    case "text-multi":
-                        return FieldType.text_multi;
-                    case "list-multi":
-                        return FieldType.list_multi;
-                    case "list-single":
-                        return FieldType.list_single;
-                    case "boolean":
-                        return FieldType.boolean;
-                    case "fixed":
-                        return FieldType.Fixed;
-                    case "hidden":
-                        return FieldType.hidden;
-                    case "jid-single":
-                        return FieldType.jid_single;
-                    case "jid-multi":
-                        return FieldType.jid_multi;
-                    default:
-                        throw new ArgumentException("Unknown x:data field type: " + GetAttribute("type"));
-                }
-            }
-            set
-            {
-                switch (value)
-                {
-                    case FieldType.text_single:
-                        SetAttribute("type", "text-single");
-                        break;
-                    case FieldType.text_private:
-                        SetAttribute("type", "text-private");
-                        break;
-                    case FieldType.text_multi:
-                        SetAttribute("type", "text-multi");
-                        break;
-                    case FieldType.list_multi:
-                        SetAttribute("type", "list-multi");
-                        break;
-                    case FieldType.list_single:
-                        SetAttribute("type", "list-single");
-                        break;
-                    case FieldType.boolean:
-                        SetAttribute("type", "boolean");
-                        break;
-                    case FieldType.Fixed:
-                        SetAttribute("type", "fixed");
-                        break;
-                    case FieldType.hidden:
-                        SetAttribute("type", "hidden");
-                        break;
-                    case FieldType.jid_single:
-                        SetAttribute("type", "jid-single");
-                        break;
-                    case FieldType.jid_multi:
-                        SetAttribute("type", "jid-multi");
-                        break;
-                    default:
-                        throw new ArgumentException("Unknown x:data field type: " + value);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Field label.  Will return Var if no label is found.
-        /// </summary>
-        public string Label
-        {
-            get
-            {
-                string lbl = GetAttribute("label");
-                if (lbl == null)
-                    lbl = Var;
-                return lbl;
-            }
-            set { SetAttribute("label", value); }
-        }
-
-        /// <summary>
-        /// Field variable name.
-        /// </summary>
-        public string Var
-        {
-            get { return GetAttribute("var"); }
-            set { SetAttribute("var", value); }
-        }
-
-        /// <summary>
-        /// Is this a required field?
-        /// </summary>
-        public bool IsRequired
-        {
-            get { return this["required"] != null; }
-            set
-            {
-                if (value)
-                    this.SetElem("required", null);
-                else
-                    this.RemoveElem("required");
-            }
-        }
-
-        /// <summary>
-        /// The field value.
-        /// </summary>
-        public string Val
-        {
-            get { return GetElem("value"); }
-            set { SetElem("value", value); }
-        }
-
-        /// <summary>
-        /// Value for type='boolean' fields
-        /// </summary>
-        public bool BoolVal
-        {
-            get
-            {
-                string sval = Val;
-                return !((sval == null) || (sval == "0"));
-            }
-            set
-            {
-                Val = value ? "1" : "0";
-            }
-        }
-
-        /// <summary>
-        /// Values for type='list-multi' fields
-        /// </summary>
-        public string[] Vals
-        {
-            get
-            {
-                XmlNodeList nl = GetElementsByTagName("value", URI.XDATA);
-                string[] results = new string[nl.Count];
-                int i=0;
-                foreach (XmlElement el in nl)
-                {
-                    results[i++] = el.InnerText;
-                }
-                return results;
-            }
-            set
-            {
-                RemoveElems("value", URI.XDATA);
-                foreach (string s in value)
-                {
-                    XmlElement val = this.OwnerDocument.CreateElement("value", URI.XDATA);
-                    val.InnerText = s;
-                    this.AppendChild(val);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Is the given value in Vals?
-        /// </summary>
-        /// <param name="val"></param>
-        /// <returns></returns>
-        public bool IsValSet(string val)
-        {
-            XmlNodeList nl = GetElementsByTagName("value", URI.XDATA);
-            foreach (XmlElement el in nl)
-            {
-                if (el.InnerText == val)
-                    return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Add a value to a multi-value field.
-        /// </summary>
-        /// <param name="newvalue"></param>
-        public void AddValue(string newvalue)
-        {
-            XmlElement val = this.OwnerDocument.CreateElement("value", URI.XDATA);
-            val.InnerText = newvalue;
-            this.AppendChild(val);
-        }
-
-        /// <summary>
-        /// The field description
-        /// </summary>
-        public string Desc
-        {
-            get { return GetElem("desc"); }
-            set { SetElem("desc", value); }
-        }
-
-        /// <summary>
-        /// List of field options
-        /// </summary>
-        /// <returns></returns>
-        public Option[] GetOptions()
-        {
-            XmlNodeList nl = GetElementsByTagName("option", URI.XDATA);
-            Option[] options = new Option[nl.Count];
-            int i=0;
-            foreach (XmlNode n in nl)
-            {
-                options[i] = (Option) n;
-                i++;
-            }
-            return options;
-        }
-
-        /// <summary>
-        /// Add a field option
-        /// </summary>
-        /// <returns></returns>
-        public Option AddOption()
-        {
-            Option o = new Option(this.OwnerDocument);
-            AddChild(o);
-            return o;
-        }
-
-        /// <summary>
-        /// Add a field option, with a value
-        /// </summary>
-        /// <param name="val">Value of the option</param>
-        /// <returns></returns>
-        public Option AddOption(String val)
-        {
-            Option o = new Option(this.OwnerDocument);
-            AddChild(o);
-            o.Val = val;
-            return o;
-        }
-
-        /// <summary>
-        /// Add a field option, with a value
-        /// </summary>
-        /// <param name="label">Label for the option</param>
-        /// <param name="val">Value of the option</param>
-        /// <returns></returns>
-        public Option AddOption(String label, String val)
-        {
-            Option o = new Option(this.OwnerDocument);
-            AddChild(o);
-            o.Val = val;
-            o.Label = label;
-            return o;
-        }
-    }
-
-    /// <summary>
-    /// Field options, for list-single and list-multi type fields.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Option : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Option(XmlDocument doc) : base("option", URI.XDATA, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Option(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// Option label
-        /// </summary>
-        public string Label
-        {
-            get { return GetAttribute("label"); }
-            set { SetAttribute("label", value); }
-        }
-
-        /// <summary>
-        /// The option value.
-        /// </summary>
-        public string Val
-        {
-            get { return GetElem("value"); }
-            set { SetElem("value", value); }
-        }
-
-        /// <summary>
-        /// Return the label for this option, so that a ComboBox.ObjectCollection can manage these directly.
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            string l = Label;
-            if (l != "")
-                return l;
-            return Val;
-        }
-
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/x/Delay.cs b/lib/jabber-net/jabber/protocol/x/Delay.cs
deleted file mode 100644
index aa4c437..0000000
--- a/lib/jabber-net/jabber/protocol/x/Delay.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.x
-{
-    /// <summary>
-    /// A delay x element.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Delay : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Delay(XmlDocument doc) : base("x", URI.XDELAY, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Delay(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// From whom?
-        /// </summary>
-        public string From
-        {
-            get { return GetAttribute("from"); }
-            set { SetAttribute("from", value); }
-        }
-
-        /// <summary>
-        /// Date/time stamp.
-        /// </summary>
-        public DateTime Stamp
-        {
-            get { return JabberDate(GetAttribute("stamp")); }
-            set { SetAttribute("stamp", JabberDate(value)); }
-        }
-
-        /// <summary>
-        /// Description
-        /// </summary>
-        public string Desc
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        }
-    }
-
-    /// <summary>
-    /// A modern, XEP-0203 delay element
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ModernDelay : Element
-    {
-/*
- <delay xmlns='urn:xmpp:delay'
-     from='capulet.com'
-     stamp='2002-09-10T23:08:25Z'>
-    Offline Storage
-  </delay>
-*/
-        /// <summary>
-        ///Create a delay element for sending
-        /// </summary>
-        /// <param name="doc"></param>
-        public ModernDelay(XmlDocument doc) : base("delay", URI.DELAY, doc)
-        {
-        }
-
-        /// <summary>
-        /// Create a delay element from the received stream.
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public ModernDelay(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// From whom?
-        /// </summary>
-        public string From
-        {
-            get { return GetAttribute("from"); }
-            set { SetAttribute("from", value); }
-        }
-
-        /// <summary>
-        /// Date/time stamp.
-        /// </summary>
-        public DateTime Stamp
-        {
-            get { return Element.DateTimeProfile(GetAttribute("stamp")); }
-            set { SetAttribute("stamp", Element.DateTimeProfile(value)); }
-        }
-
-        /// <summary>
-        /// Description
-        /// </summary>
-        public string Desc
-        {
-            get { return this.InnerText; }
-            set { this.InnerText = value; }
-        } 
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/x/Event.cs b/lib/jabber-net/jabber/protocol/x/Event.cs
deleted file mode 100644
index 153f2cc..0000000
--- a/lib/jabber-net/jabber/protocol/x/Event.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-
-using bedrock.util;
-
-namespace jabber.protocol.x
-{
-    /// <summary>
-    /// Types of events
-    /// </summary>
-    [Flags]
-    [SVN(@"$Id$")]
-    public enum EventType
-    {
-        /// <summary>
-        /// No event type specified.
-        /// </summary>
-        NONE = 0,
-        /// <summary>
-        /// Indicates that the message has been stored offline by the server, because the
-        /// intended recipient is not available. This event is to be raised by the Jabber server.
-        /// </summary>
-        offline = 1,
-        /// <summary>
-        /// Indicates that the message has been delivered to the recipient. This signifies
-        /// that the message has reached the Jabber client, but does not necessarily mean
-        /// that the message has been displayed. This event is to be raised by the Jabber client.
-        /// </summary>
-        delivered = 2,
-        /// <summary>
-        /// Once the message has been received by the Jabber client, it may be displayed
-        /// to the user. This event indicates that the message has been displayed, and is
-        /// to be raised by the Jabber client. Even if a message is displayed multiple times,
-        /// this event should only be raised once.
-        /// </summary>
-        displayed = 4,
-        /// <summary>
-        /// In threaded chat conversations, this indicates that the recipient is composing
-        /// a reply to a message that was just sent. The event is to be raised by the Jabber
-        /// client. A Jabber client is allowed to raise this event multiple times in response
-        /// to the same request, providing that a specific sequence is followed.
-        /// </summary>
-        composing = 8
-    }
-
-    /// <summary>
-    /// A event x element, described by XEP-0022.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Event : Element
-    {
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="doc"></param>
-        public Event(XmlDocument doc) : base("x", URI.XEVENT, doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public Event(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-            base(prefix, qname, doc)
-        {
-        }
-
-        /// <summary>
-        /// The message to which this event refers.
-        /// </summary>
-        public string ID
-        {
-            get { return GetElem("id"); }
-            set { SetElem("id", value); }
-        }
-
-        /// <summary>
-        /// The type of the event.
-        /// </summary>
-        public EventType Type
-        {
-            get
-            {
-                EventType res = EventType.NONE;
-                if (IsOffline) res |= EventType.offline;
-                if (IsDelivered) res |= EventType.delivered;
-                if (IsDisplayed) res |= EventType.displayed;
-                if (IsComposing) res |= EventType.composing;
-                return res;
-            }
-            set
-            {
-                IsOffline = ((value & EventType.offline) == EventType.offline);
-                IsDelivered = ((value & EventType.delivered) == EventType.delivered);
-                IsDisplayed = ((value & EventType.displayed) == EventType.displayed);
-                IsComposing = ((value & EventType.composing) == EventType.composing);
-            }
-        }
-
-        /// <summary>
-        /// Indicates that the message has been stored offline by the server, because the
-        /// intended recipient is not available. This event is to be raised by the Jabber server.
-        /// </summary>
-        public bool IsOffline
-        {
-            get { return this["offline"] != null; }
-            set
-            {
-                if (value)
-                    this.SetElem("offline", null);
-                else
-                    this.RemoveElem("offline");
-            }
-        }
-        /// <summary>
-        /// Indicates that the message has been delivered to the recipient. This signifies
-        /// that the message has reached the Jabber client, but does not necessarily mean
-        /// that the message has been displayed. This event is to be raised by the Jabber client.
-        /// </summary>
-        public bool IsDelivered
-        {
-            get { return this["delivered"] != null; }
-            set
-            {
-                if (value)
-                    this.SetElem("delivered", null);
-                else
-                    this.RemoveElem("delivered");
-            }
-        }
-        /// <summary>
-        /// Once the message has been received by the Jabber client, it may be displayed
-        /// to the user. This event indicates that the message has been displayed, and is
-        /// to be raised by the Jabber client. Even if a message is displayed multiple times,
-        /// this event should only be raised once.
-        /// </summary>
-        public bool IsDisplayed
-        {
-            get { return this["displayed"] != null; }
-            set
-            {
-                if (value)
-                    this.SetElem("displayed", null);
-                else
-                    this.RemoveElem("displayed");
-            }
-        }
-        /// <summary>
-        /// In threaded chat conversations, this indicates that the recipient is composing
-        /// a reply to a message that was just sent. The event is to be raised by the Jabber
-        /// client. A Jabber client is allowed to raise this event multiple times in response
-        /// to the same request, providing that a specific sequence is followed.
-        /// </summary>
-        public bool IsComposing
-        {
-            get { return this["composing"] != null; }
-            set
-            {
-                if (value)
-                    this.SetElem("composing", null);
-                else
-                    this.RemoveElem("composing");
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/jabber/protocol/x/Factory.cs b/lib/jabber-net/jabber/protocol/x/Factory.cs
deleted file mode 100644
index 779af59..0000000
--- a/lib/jabber-net/jabber/protocol/x/Factory.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace jabber.protocol.x
-{
-    /// <summary>
-    /// ElementFactory for all currently supported IQ namespaces.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Factory : IPacketTypes
-    {
-        private static QnameType[] s_qnt = new QnameType[]
-        {
-                    new QnameType("x",     URI.XDELAY,    typeof(jabber.protocol.x.Delay)),
-                    new QnameType("x",     URI.XEVENT,    typeof(jabber.protocol.x.Event)),
-                    new QnameType("x",     URI.XOOB,      typeof(jabber.protocol.iq.OOB)),
-                    new QnameType("x",     URI.XROSTER,   typeof(jabber.protocol.iq.Roster)),
-                    new QnameType("item",  URI.XROSTER,   typeof(jabber.protocol.iq.Item)),
-                    new QnameType("group", URI.XROSTER,   typeof(jabber.protocol.iq.Group)),
-
-                    new QnameType("x",     URI.XDATA,     typeof(jabber.protocol.x.Data)),
-                    new QnameType("field", URI.XDATA,     typeof(jabber.protocol.x.Field)),
-                    new QnameType("option",URI.XDATA,     typeof(jabber.protocol.x.Option)),
-
-                    new QnameType("c",     URI.CAPS,      typeof(jabber.protocol.x.Caps)),
-        };
-        QnameType[] IPacketTypes.Types { get { return s_qnt; } }
-    }
-}
diff --git a/lib/jabber-net/jabber/server/JabberService.bmp b/lib/jabber-net/jabber/server/JabberService.bmp
deleted file mode 100644
index 39e44ba..0000000
Binary files a/lib/jabber-net/jabber/server/JabberService.bmp and /dev/null differ
diff --git a/lib/jabber-net/jabber/server/JabberService.cs b/lib/jabber-net/jabber/server/JabberService.cs
deleted file mode 100644
index 45bdda6..0000000
--- a/lib/jabber-net/jabber/server/JabberService.cs
+++ /dev/null
@@ -1,466 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Threading;
-using System.Xml;
-
-using bedrock.net;
-using bedrock.util;
-
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.accept;
-using jabber.protocol.stream;
-
-namespace jabber.server
-{
-    /// <summary>
-    /// Type of connection to the server, with respect to jabberd.
-    /// This list will grow over time to include
-    /// queued connections, direct (in-proc) connections, etc.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum ComponentType
-    {
-        /// <summary>
-        /// Jabberd will accept the connetion; the component will
-        /// initiate the connection.  </summary>
-        Accept,
-        /// <summary>
-        /// Jabberd will connect to the component; jabberd will
-        /// initiate the connection.  </summary>
-        Connect
-    }
-
-    /// <summary>
-    /// Received a route element
-    /// </summary>
-    public delegate void RouteHandler(object sender, jabber.protocol.accept.Route route);
-
-    /// <summary>
-    /// Received an XDB element.
-    /// </summary>
-    public delegate void XdbHandler(object sender, jabber.protocol.accept.Xdb xdb);
-
-    /// <summary>
-    /// Received a Log element.
-    /// </summary>
-    public delegate void LogHandler(object sender, jabber.protocol.accept.Log log);
-
-    /// <summary>
-    /// Summary description for ServerComponent.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JabberService : jabber.connection.XmppStream
-    {
-        private static readonly object[][] DEFAULTS = new object[][] {
-            new object[] {Options.COMPONENT_DIRECTION, ComponentType.Accept},
-            new object[] {Options.PORT, 7400},
-            new object[] {Options.OVERRIDE_FROM, null},
-        };
-
-        private void init()
-        {
-            SetDefaults(DEFAULTS);
-            this.OnStreamInit += new jabber.connection.StreamHandler(JabberService_OnStreamInit);
-            this.OnSASLStart += new jabber.connection.sasl.SASLProcessorHandler(JabberService_OnSASLStart);
-        }
-
-        /// <summary>
-        /// Create a a connect component.
-        /// </summary>
-        public JabberService() : base()
-        {
-            init();
-        }
-
-        /// <summary>
-        /// Create an accept component.  (Component connects to server)
-        /// </summary>
-        /// <param name="host">Jabberd host to connect to</param>
-        /// <param name="port">Jabberd port to connect to</param>
-        /// <param name="name">Component name</param>
-        /// <param name="secret">Component secret</param>
-        public JabberService(string host,
-            int port,
-            string name,
-            string secret) : base()
-        {
-            init();
-            this.ComponentID = name;
-            this.NetworkHost = host;
-            this.Port = port;
-
-            this[Options.PASSWORD] = secret;
-            this[Options.COMPONENT_DIRECTION] = ComponentType.Accept;
-        }
-
-        /// <summary>
-        /// Create a connect component. (Server connects to component)
-        /// </summary>
-        /// <param name="port">Port jabberd will connect to</param>
-        /// <param name="name">Component name</param>
-        /// <param name="secret">Component secret</param>
-        public JabberService(int port, string name, string secret) : base()
-        {
-            init();
-            this.ComponentID = name;
-            this.Port = port;
-
-            this[Options.PASSWORD] = secret;
-            this[Options.COMPONENT_DIRECTION] = ComponentType.Connect;
-        }
-
-        /// <summary>
-        /// We received a route packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received a route packet.")]
-        public event RouteHandler OnRoute;
-
-        /// <summary>
-        /// We received an XDB packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received an XDB packet.")]
-        public event XdbHandler OnXdb;
-
-        /// <summary>
-        /// We received a Log packet.
-        /// </summary>
-        [Category("Protocol")]
-        [Description("We received a Log packet.")]
-        public event LogHandler OnLog;
-
-        /// <summary>
-        /// The service name.  Needs to be in the id attribute in the
-        /// jabber.xml file.  </summary>
-        [Description("The service name.  The id attribute in the jabber.xml file.")]
-        [DefaultValue(null)]
-        [Category("Component")]
-        public string ComponentID
-        {
-            get { return (string)this[Options.TO]; }
-            set
-            {
-                this[Options.JID] = value;
-                this[Options.TO] = value;
-            }
-        }
-
-        /// <summary>
-        /// Should not be used for components.  Set NetworkHost instead.
-        /// </summary>
-        [Description("The name of the Jabber server.")]
-        [DefaultValue("jabber.com")]
-        [Category("Jabber")]
-        [Browsable(false)]
-        [Obsolete]
-        public override string Server
-        {
-            get { return base.NetworkHost; }
-            set { base.NetworkHost = value; }
-        }
-
-        /// <summary>
-        /// Component secret.
-        /// </summary>
-        [Description("Component secret.")]
-        [DefaultValue(null)]
-        [Category("Component")]
-        [PasswordPropertyText]
-        public string Secret
-        {
-            get { return (string)this[Options.PASSWORD]; }
-            set { this[Options.PASSWORD] = value; }
-        }
-
-        /// <summary>
-        /// Is this an outgoing connection (base_accept), or an incoming
-        /// connection (base_connect).
-        /// </summary>
-        [Description("Is this an outgoing connection (base_accept), or an incoming connection (base_connect).")]
-        [DefaultValue(ComponentType.Accept)]
-        [Category("Component")]
-        public ComponentType Type
-        {
-            get { return (ComponentType)this[Options.COMPONENT_DIRECTION]; }
-            set
-            {
-                if ((ComponentType)this[Options.COMPONENT_DIRECTION] != value)
-                {
-                    this[Options.COMPONENT_DIRECTION] = value;
-                    if ((ComponentType)this[Options.COMPONENT_DIRECTION] == ComponentType.Connect)
-                    {
-                        this.AutoReconnect = 0;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// The stream namespace for this connection.
-        /// </summary>
-        [Browsable(false)]
-        protected override string NS
-        {
-            get
-            {
-                return (this.Type == ComponentType.Accept) ? URI.ACCEPT : URI.CONNECT;
-            }
-        }
-
-        /// <summary>
-        /// Override the from address that is stamped on all outbound stanzas that 
-        /// have no from address.
-        /// </summary>
-        public JID OverrideFrom
-        {
-            get { return this[Options.OVERRIDE_FROM] as JID; }
-            set { this[Options.OVERRIDE_FROM] = value; }
-        }
-
-        /// <summary>
-        /// Connect to the jabberd, or wait for it to connect to us.
-        /// Either way, this call returns immediately.
-        /// </summary>
-        /// <param name="address">The address to connect to.</param>
-        public void Connect(bedrock.net.Address address)
-        {
-            this.NetworkHost = address.Hostname;
-            this.Port = address.Port;
-
-            Connect();
-        }
-
-        /// <summary>
-        /// Connect to the jabberd, or wait for it to connect to us.
-        /// Either way, this call returns immediately.
-        /// </summary>
-        public override void Connect()
-        {
-            this[Options.SERVER_ID] = this[Options.NETWORK_HOST];
-            this[Options.JID] = new JID((string)this[Options.TO]);
-            if (this.Type == ComponentType.Accept)
-                base.Connect();
-            else
-            {
-                Accept();
-            }
-        }
-
-        /// <summary>
-        /// Make sure there's a from address, then write the stanza.
-        /// </summary>
-        /// <param name="elem">The stanza to write</param>
-        public override void Write(XmlElement elem)
-        {
-            if (State == RunningState.Instance)
-            {
-                if (elem.GetAttribute("from") == "")
-                {
-                    JID from = this[Options.OVERRIDE_FROM] as JID;
-                    if (from == null)
-                        from = this.ComponentID;
-
-                    elem.SetAttribute("from", from);
-                }
-            }
-            base.Write(elem);
-        }
-
-        /// <summary>
-        /// Got the stream:stream.  Start the handshake.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="tag"></param>
-        protected override void OnDocumentStart(object sender, System.Xml.XmlElement tag)
-        {
-            base.OnDocumentStart(sender, tag);
-            if (this.Type == ComponentType.Connect)
-            {
-                lock (StateLock)
-                {
-                    State = HandshakingState.Instance;
-                }
-
-                jabber.protocol.stream.Stream str = new jabber.protocol.stream.Stream(this.Document, NS);
-                str.To = this.ComponentID;
-                this.StreamID = str.ID;
-                if (ServerVersion.StartsWith("1."))
-                    str.Version = "1.0";
-
-
-                WriteStartTag(str);
-
-                if (ServerVersion.StartsWith("1."))
-                {
-                    Features f = new Features(this.Document);
-                    if (AutoStartTLS && !SSLon && (this[Options.LOCAL_CERTIFICATE] != null))
-                        f.StartTLS = new StartTLS(this.Document);
-                    Write(f);
-                }
-            }
-        }
-
-        private void Handshake(System.Xml.XmlElement tag)
-        {
-            Handshake hs = tag as Handshake;
-
-            if (hs == null)
-            {
-                FireOnError(new System.Security.SecurityException("Bad protocol.  Needs handshake, got: " + tag.OuterXml));
-                return;
-            }
-
-            if (this.Type == ComponentType.Accept)
-                IsAuthenticated = true;
-            else
-            {
-                string test = hs.Digest;
-                string good = Element.ShaHash(StreamID, this.Secret);
-                if (test == good)
-                {
-                    IsAuthenticated = true;
-                    Write(new Handshake(this.Document));
-                }
-                else
-                {
-                    Write(new Error(this.Document));
-                    FireOnError(new System.Security.SecurityException("Bad handshake."));
-                }
-            }
-        }
-
-        /// <summary>
-        /// Received an element.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="tag"></param>
-        protected override void OnElement(object sender, System.Xml.XmlElement tag)
-        {
-            lock (StateLock)
-            {
-                StartTLS start = tag as StartTLS;
-                if (start != null)
-                {
-                    State = ConnectedState.Instance;
-                    InitializeStream();
-                    this.Write(new Proceed(this.Document));
-                    this.StartTLS();
-                    return;
-                }
-                if (State == HandshakingState.Instance)
-                {
-                    // sets IsConnected
-                    Handshake(tag);
-                    return;
-                }
-            }
-
-            base.OnElement(sender, tag);
-
-            if (OnRoute != null)
-            {
-                Route route = tag as Route;
-                if (route != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnRoute, new object[] {this, route});
-                    else
-                        OnRoute(this, route);
-                }
-            }
-            // TODO: add XdbTracker stuff
-            if (OnXdb != null)
-            {
-                Xdb xdb = tag as Xdb;
-                if (xdb != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnXdb, new object[] {this, xdb});
-                    else
-                        OnXdb(this, xdb);
-                }
-            }
-            if (OnLog != null)
-            {
-                Log log = tag as Log;
-                if (log != null)
-                {
-                    if (InvokeRequired)
-                        CheckedInvoke(OnLog, new object[] {this, log});
-                    else
-                        OnLog(this, log);
-                }
-            }
-        }
-
-        private void JabberService_OnSASLStart(object sender, jabber.connection.sasl.SASLProcessor proc)
-        {
-            jabber.connection.BaseState s = null;
-            lock (StateLock)
-            {
-                s = State;
-            }
-
-            if (s == jabber.connection.NonSASLAuthState.Instance)
-            {
-                lock (StateLock)
-                {
-                    State = HandshakingState.Instance;
-                }
-
-                if (this.Type == ComponentType.Accept)
-                {
-                    Handshake hand = new Handshake(this.Document);
-                    hand.SetAuth(this.Secret, StreamID);
-                    Write(hand);
-                }
-            }
-        }
-
-        private void JabberService_OnStreamInit(Object sender, ElementStream stream)
-        {
-            stream.AddFactory(new jabber.protocol.accept.Factory());
-        }
-    }
-
-    /// <summary>
-    /// Waiting for handshake result.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class HandshakingState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// The instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new HandshakingState();
-    }
-
-    /// <summary>
-    /// Waiting for socket connection.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class AcceptingState : jabber.connection.BaseState
-    {
-        /// <summary>
-        /// The instance that is always used.
-        /// </summary>
-        public static readonly jabber.connection.BaseState Instance = new AcceptingState();
-    }
-}
diff --git a/lib/jabber-net/jabber/server/JabberService.resx b/lib/jabber-net/jabber/server/JabberService.resx
deleted file mode 100644
index 7e32396..0000000
--- a/lib/jabber-net/jabber/server/JabberService.resx
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<root>
-	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-		<xsd:element name="root" msdata:IsDataSet="true">
-			<xsd:complexType>
-				<xsd:choice maxOccurs="unbounded">
-					<xsd:element name="data">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" />
-							<xsd:attribute name="type" type="xsd:string" />
-							<xsd:attribute name="mimetype" type="xsd:string" />
-						</xsd:complexType>
-					</xsd:element>
-					<xsd:element name="resheader">
-						<xsd:complexType>
-							<xsd:sequence>
-								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-							</xsd:sequence>
-							<xsd:attribute name="name" type="xsd:string" use="required" />
-						</xsd:complexType>
-					</xsd:element>
-				</xsd:choice>
-			</xsd:complexType>
-		</xsd:element>
-	</xsd:schema>
-	<resheader name="ResMimeType">
-		<value>text/microsoft-resx</value>
-	</resheader>
-	<resheader name="Version">
-		<value>1.0.0.0</value>
-	</resheader>
-	<resheader name="Reader">
-		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-	<resheader name="Writer">
-		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-	</resheader>
-</root>
diff --git a/lib/jabber-net/jabber/server/XdbTracker.cs b/lib/jabber-net/jabber/server/XdbTracker.cs
deleted file mode 100644
index 0896712..0000000
--- a/lib/jabber-net/jabber/server/XdbTracker.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Diagnostics;
-using System.Xml;
-
-using bedrock.util;
-using jabber.protocol.accept;
-
-namespace jabber.server
-{
-    /// <summary>
-    /// Received a response to an XDB request.
-    /// </summary>
-    public delegate void XdbCB(object sender, Xdb xdb, object data);
-
-    /// <summary>
-    /// Track outstanding XDB requests.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XdbTracker
-    {
-        // this hash doesn't need concurrency control, i don't think,
-        // since no id will be re-used.
-        private Hashtable       m_pending = new Hashtable();
-        private JabberService   m_comp    = null;
-
-        /// <summary>
-        /// Create a new XDB tracker
-        /// </summary>
-        /// <param name="comp">The component to send/receive on</param>
-        public XdbTracker(JabberService comp)
-        {
-            m_comp = comp;
-            m_comp.OnXdb += new XdbHandler(OnXdb);
-        }
-
-        /// <summary>
-        /// Received an XDB element on Component.
-        /// Is this a response to a tracked request?
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="xdb"></param>
-        private void OnXdb(object sender, Xdb xdb)
-        {
-            string id = xdb.ID;
-            TrackerData td;
-
-            lock (m_pending)
-            {
-                td = (TrackerData) m_pending[id];
-
-                // this wasn't one that was being tracked.
-                if (td == null)
-                {
-                    return;
-                }
-                m_pending.Remove(id);
-            }
-
-            // don't need to check for null.  protected by assert below.
-            td.cb(this, xdb, td.data);
-        }
-
-        /// <summary>
-        /// Start an XDB request.
-        /// </summary>
-        /// <param name="owner"></param>
-        /// <param name="ns"></param>
-        /// <param name="cb"></param>
-        /// <param name="cbArg"></param>
-        public void BeginXdbGet(string owner, string ns,
-            XdbCB cb, object cbArg)
-        {
-            BeginXdb(null, XdbType.get, owner, ns, XdbAction.NONE, cb, cbArg);
-        }
-
-        /// <summary>
-        /// Start an XDB request.
-        /// </summary>
-        /// <param name="root"></param>
-        /// <param name="owner"></param>
-        /// <param name="ns"></param>
-        /// <param name="cb"></param>
-        /// <param name="cbArg"></param>
-        public void BeginXdbSet(XmlElement root, string owner, string ns,
-            XdbCB cb, object cbArg)
-        {
-            BeginXdb(root, XdbType.set, owner, ns, XdbAction.NONE, cb, cbArg);
-        }
-
-        /// <summary>
-        /// Start an XDB request.
-        /// </summary>
-        /// <param name="root"></param>
-        /// <param name="xtype"></param>
-        /// <param name="owner"></param>
-        /// <param name="ns"></param>
-        /// <param name="cb"></param>
-        /// <param name="cbArg"></param>
-        public void BeginXdb(XmlElement root, XdbType xtype,
-            string owner, string ns,
-            XdbCB cb, object cbArg)
-        {
-            BeginXdb(root, xtype, owner, ns, XdbAction.NONE, cb, cbArg);
-        }
-
-        /// <summary>
-        /// Start an XDB request.
-        /// </summary>
-        /// <param name="root"></param>
-        /// <param name="xtype"></param>
-        /// <param name="owner"></param>
-        /// <param name="ns"></param>
-        /// <param name="action"></param>
-        /// <param name="cb"></param>
-        /// <param name="cbArg"></param>
-        public void BeginXdb(XmlElement root, XdbType xtype,
-            string owner, string ns, XdbAction action,
-            XdbCB cb, object cbArg)
-        {
-            Debug.Assert(owner != null);
-            Debug.Assert(ns    != null);
-            Xdb xdb  = new Xdb(m_comp.Document);
-            xdb.NS   = ns;
-            xdb.Type = xtype;
-            xdb.To   = owner;
-            xdb.From = m_comp.ComponentID;
-            if (action != XdbAction.NONE)
-                xdb.Action = action;
-            if (root != null)
-                xdb.AddChild(root);
-            // if no callback, ignore response.
-            if (cb != null)
-            {
-                TrackerData td = new TrackerData();
-                td.cb   = cb;
-                td.data = cbArg;
-                lock (m_pending)
-                {
-                    m_pending[xdb.ID] = td;
-                }
-            }
-            m_comp.Write(xdb);
-        }
-
-        private class TrackerData
-        {
-            public XdbCB  cb;
-            public object data;
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/AssemblyInfo.cs b/lib/jabber-net/muzzle/AssemblyInfo.cs
deleted file mode 100644
index 3e5a5f5..0000000
--- a/lib/jabber-net/muzzle/AssemblyInfo.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.1433
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("Muzzle library")]
-[assembly: AssemblyDescription("GUI helper functions to be used with Jabber-Net.")]
-[assembly: AssemblyCompany("Cursive Systems, Inc.")]
-[assembly: AssemblyProduct("jabber-net")]
-[assembly: AssemblyCopyright("Copyright (c) Cursive, Inc. 2000-2008")]
-[assembly: AssemblyVersion("2.0.0.613")]
-[assembly: AssemblyDelaySign(false)]
-[assembly: CLSCompliant(true)]
-[assembly: AssemblyKeyFile("../../../jabbernet.key")]
-
-
diff --git a/lib/jabber-net/muzzle/BottomScrollRichText.cs b/lib/jabber-net/muzzle/BottomScrollRichText.cs
deleted file mode 100644
index 9fe388a..0000000
--- a/lib/jabber-net/muzzle/BottomScrollRichText.cs
+++ /dev/null
@@ -1,414 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Runtime.InteropServices;
-
-using bedrock.util;
-using System.Diagnostics;
-
-namespace muzzle
-{
-
-    /// <summary>
-    /// Summary description for BottomScrollRichText.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class BottomScrollRichText : System.Windows.Forms.RichTextBox
-    {
-        private const int SB_HORZ             = 0;
-        private const int SB_VERT             = 1;
-        private const int SB_CTL              = 2;
-        private const int SB_BOTH             = 3;
-
-        private const int SB_LINEUP           = 0;
-        private const int SB_LINELEFT         = 0;
-        private const int SB_LINEDOWN         = 1;
-        private const int SB_LINERIGHT        = 1;
-        private const int SB_PAGEUP           = 2;
-        private const int SB_PAGELEFT         = 2;
-        private const int SB_PAGEDOWN         = 3;
-        private const int SB_PAGERIGHT        = 3;
-        private const int SB_THUMBPOSITION    = 4;
-        private const int SB_THUMBTRACK       = 5;
-        private const int SB_TOP              = 6;
-        private const int SB_LEFT             = 6;
-        private const int SB_BOTTOM           = 7;
-        private const int SB_RIGHT            = 7;
-        private const int SB_ENDSCROLL        = 8;
-
-        private const int SIF_RANGE           = 0x0001;
-        private const int SIF_PAGE            = 0x0002;
-        private const int SIF_POS             = 0x0004;
-        private const int SIF_DISABLENOSCROLL = 0x0008;
-        private const int SIF_TRACKPOS        = 0x0010;
-        private const int SIF_ALL             = (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS);
-
-        private const int WM_HSCROLL          = 0x0114;
-        private const int WM_VSCROLL          = 0x0115;
-
-        private const int EM_SETSCROLLPOS = 0x0400 + 222;
-
-        private const int CCHILDREN_SCROLLBAR = 5;
-        private const int STATE_SYSTEM_INVISIBLE   = 0x00008000;
-        private const int STATE_SYSTEM_OFFSCREEN   = 0x00010000;
-        private const int STATE_SYSTEM_PRESSED     = 0x00000008;
-        private const int STATE_SYSTEM_UNAVAILABLE = 0x00000001;
-
-        private const uint OBJID_CLIENT  = 0xFFFFFFFC;
-        private const uint OBJID_VSCROLL = 0xFFFFFFFB;
-        private const uint OBJID_HSCROLL = 0xFFFFFFFA;
-
-        private bool m_bottom = true;
-        private int m_maxLines = 500;
-
-        /// <summary>
-        /// Maximum number of lines to keep
-        /// </summary>
-        [Category("Appearance")]
-        public int MaxLines
-        {
-            get { return m_maxLines; }
-            set { m_maxLines = value; }
-        }
-
-        [StructLayout(LayoutKind.Sequential)]
-        private struct SCROLLINFO
-        {
-            public int  cbSize;
-            public uint fMask;
-            public int  nMin;
-            public int  nMax;
-            public uint nPage;
-            public int  nPos;
-            public int  nTrackPos;
-        }
-
-        [StructLayout(LayoutKind.Sequential)]
-        private struct RECT
-        {
-            public int left;
-            public int top;
-            public int right;
-            public int bottom;
-        }
-
-        [StructLayout(LayoutKind.Sequential)]
-        private struct SCROLLBARINFO
-        {
-            public int cbSize;
-            public RECT rcScrollBar;
-            public int dxyLineButton;
-            public int xyThumbTop;
-            public int xyThumbBottom;
-            public int reserved;
-            [MarshalAs(UnmanagedType.ByValArray, SizeConst=CCHILDREN_SCROLLBAR+1)]
-            public int[] rgstate;
-        }
-
-        [StructLayout(LayoutKind.Sequential)]
-        private class POINT
-        {
-            public int x;
-            public int y;
-
-            public POINT()
-            {
-            }
-
-            public POINT(int x, int y)
-            {
-                this.x = x;
-                this.y = y;
-            }
-        }
-
-        [DllImport("user32", CharSet=CharSet.Auto)]
-        private static extern bool GetScrollRange(IntPtr hWnd, int nBar, out int lpMinPos, out int lpMaxPos);
-
-        [DllImport("user32", CharSet=CharSet.Auto)]
-        private static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, POINT lParam);
-
-        [DllImport("user32", CharSet=CharSet.Auto)]
-        private static extern bool GetScrollInfo(IntPtr hWnd, int nBar, ref SCROLLINFO lpsi);
-
-        [DllImport("user32", CharSet=CharSet.Auto)]
-        private static extern int SetScrollInfo(IntPtr hWnd, int fnBar, ref SCROLLINFO lpsi, bool fRedraw);
-
-        [DllImport("user32", SetLastError=true, EntryPoint="GetScrollBarInfo")]
-        private static extern int GetScrollBarInfo(IntPtr hWnd, uint idObject, ref SCROLLBARINFO psbi);
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.Container components = null;
-
-        /// <summary>
-        /// Create a RichText that can scroll to the bottom easily.
-        /// </summary>
-        public BottomScrollRichText()
-        {
-            // This call is required by the Windows.Forms Form Designer.
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Is the text currently scrolled to the bottom?
-        /// </summary>
-        public bool IsAtBottom
-        {
-            get { return m_bottom; }
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            components = new System.ComponentModel.Container();
-        }
-        #endregion
-
-        /// <summary>
-        /// The message pump.  Overriden to catch the WM_VSCROLL events.
-        /// </summary>
-        /// <param name="m"></param>
-        protected override void WndProc(ref Message m)
-        {
-            if (m.Msg == WM_VSCROLL)
-            {
-                SCROLLINFO si = GetScroll();
-                m_bottom = (si.nPos + si.nPage + 5 >= si.nMax);
-            }
-            base.WndProc(ref m);
-        }
-
-        /// <summary>
-        /// Clear the text, and scroll back to the top.
-        /// </summary>
-        public void ClearAndScroll()
-        {
-            this.Text = "";
-            this.Select(0, 0);
-            this.ScrollToCaret();
-            m_bottom = true;
-
-            //SendMessage(this.Handle, EM_SETSCROLLPOS, 0, new POINT(0, 0));
-        }
-
-        private SCROLLINFO GetScroll()
-        {
-            SCROLLINFO si = new SCROLLINFO();
-            si.cbSize = Marshal.SizeOf(si);
-            si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;
-            GetScrollInfo(this.Handle, SB_VERT, ref si);
-            return si;
-        }
-
-        private SCROLLBARINFO GetBars()
-        {
-            SCROLLBARINFO si = new SCROLLBARINFO();
-            si.cbSize = Marshal.SizeOf(si);
-            int ret = GetScrollBarInfo(this.Handle, OBJID_VSCROLL, ref si);
-            if (ret == 0)
-                Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
-            return si;
-        }
-
-        /// <summary>
-        /// Scroll to the bottom of the current text.
-        /// </summary>
-        public void ScrollToBottom()
-        {
-            SCROLLBARINFO sbi = GetBars();
-            if (sbi.rgstate[0] == 0)
-            {
-                SCROLLINFO si = GetScroll();
-                SendMessage(this.Handle, EM_SETSCROLLPOS, 0, new POINT(0, si.nMax - (int)si.nPage + 5));
-            }
-        }
-
-        private static string EscapeRTF(string plain)
-        {
-            System.Text.StringBuilder sb = new System.Text.StringBuilder(plain.Length);
-
-            char state = 'c';
-
-            foreach (char c in plain)
-            {
-                if (state == 'r')
-                {
-                    if (c == '\n')
-                        state = 'n';
-                    else
-                    {
-                        state = 'c';
-                    }
-                }
-                else if (state == 'n')
-                {
-                    state = 'c';
-                }
-
-                if (state == 'c')
-                {
-                    if (c > 127)
-                    {
-                        sb.Append(@"\u");
-                        sb.Append((int)c);
-                        sb.Append('?');
-                    }
-                    else
-                    {
-                        switch (c)
-                        {
-                            case '{':
-                            case '}':
-                            case '\\':
-                                sb.Append('\\');
-                                sb.Append(c);
-                                break;
-                            case '\r':
-                                sb.Append("\\\r\n");
-                                state = 'r';
-                                break;
-                            case '\n':
-                                sb.Append("\\\r\n");
-                                state = 'n';
-                                break;
-                            default:
-                                sb.Append(c);
-                                break;
-                        }
-                    }
-                }
-            }
-            return sb.ToString();
-        }
-
-        private static string RTFColor(Color c)
-        {
-            return String.Format("\\red{0}\\green{1}\\blue{2};", c.R, c.G, c.B);
-        }
-
-        /// <summary>
-        /// Append text with the given color to the end of the text area.
-        /// Side effect: the existing selection is modified.  Save the selection
-        /// if you want to keep it.
-        /// </summary>
-        /// <param name="c"></param>
-        /// <param name="text"></param>
-        public void AppendText(Color c, string text)
-        {
-            this.SelectionLength = 0;
-            this.SelectionStart = this.TextLength;
-            string rtf = "{\\rtf1\\ansi{{\\colortbl ;" + RTFColor(c) +
-                               "}\\cf1 " + EscapeRTF(text) + "}";
-            this.SelectedRtf = rtf;
-        }
-
-        /// <summary>
-        /// Append text.  If we were at the bottom, scroll to the bottom.  Otherwise leave the scroll position
-        /// where it is.
-        /// </summary>
-        /// <param name="text"></param>
-        public void AppendMaybeScroll(string text)
-        {
-            bool bottom = m_bottom;
-            this.AppendText(text);
-            if (bottom)
-                ScrollToBottom();
-        }
-
-        /// <summary>
-        /// Add a line that has a colored tag string, followed by a space, followed by
-        /// a chunk of text in the default color, followed by a newline.
-        ///
-        /// Note: Although this seems kind of random, it's needed in several places.
-        /// </summary>
-        /// <param name="tagColor">The color to use for the tag</param>
-        /// <param name="tag">The tag string</param>
-        /// <param name="text">The main text</param>
-        public void AppendMaybeScroll(Color tagColor, string tag, string text)
-        {
-            this.SuspendLayout();
-
-            // This should always be called on the GUI thread, right?
-            // Assume so.  No locking.
-
-            bool bottom = m_bottom;
-            int start = 0;
-            int len = 0;
-            if (!bottom)
-            {
-                start = this.SelectionStart;
-                len = this.SelectionLength;
-            }
-
-            AppendText(tagColor, tag);
-            AppendText(" ");
-            AppendText(ForeColor, text);
-            AppendText("\r\n");
-
-            string[] lines = this.Lines;
-            if (lines.Length > m_maxLines)
-            {
-                int rm = 0;
-                bool ro = this.ReadOnly;
-                this.ReadOnly = false;
-                for (int i = 0; i < (lines.Length - m_maxLines); i++)
-                {
-                    rm += lines[i].Length + 1;
-                }
-                this.Select(0, rm);
-                this.SelectedText = "";
-                this.ReadOnly = ro;
-            }
-
-            if (bottom)
-            {
-                ScrollToBottom();
-                this.SelectionStart = this.TextLength;
-                this.SelectionLength = 0;
-            }
-            else
-            {
-                this.SelectionStart = start;
-                this.SelectionLength = len;
-            }
-
-            this.ResumeLayout();
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/ChatHistory.cs b/lib/jabber-net/muzzle/ChatHistory.cs
deleted file mode 100644
index 3a83214..0000000
--- a/lib/jabber-net/muzzle/ChatHistory.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing;
-
-using bedrock.util;
-
-using jabber;
-using jabber.client;
-
-namespace muzzle
-{
-    /// <summary>
-    /// Keep track of the history of a conversation or room.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ChatHistory : BottomScrollRichText
-    {
-        // TODO: create a manager class that knows these prefs, and sets them easily every time.
-        private Color m_sendColor = Color.Blue;
-        private Color m_recvColor = Color.Red;
-        private Color m_actionColor = Color.Purple;
-        private Color m_presenceColor = Color.Green;
-
-        private string m_nick;
-
-
-        /// <summary>
-        /// Create.  Make sure to set Client and From, at least.
-        /// </summary>
-        public ChatHistory()
-        {
-        }
-
-
-        /// <summary>
-        /// Nickname for the associated user.  If null, the resource will be used (e.g. MUC).
-        /// </summary>
-        public string Nickname
-        {
-            get { return m_nick; }
-            set { m_nick = value; }
-        }
-
-        /// <summary>
-        /// Insert the given message into the history.  The timestamp on the message will be used, if
-        /// included, otherwise the current time will be used.
-        /// Messages without bodies will be ignored.
-        /// </summary>
-        /// <param name="msg"></param>
-        public void InsertMessage(jabber.protocol.client.Message msg)
-        {
-            string body = msg.Body;
-            if (body == null)
-                return;  // typing indicator, e.g.
-
-            string nick = (m_nick == null) ? msg.From.Resource : m_nick;
-            AppendMaybeScroll(m_recvColor, nick + ":", body);
-        }
-
-        /// <summary>
-        /// We sent some text; insert it.
-        /// </summary>
-        /// <param name="text"></param>
-        public void InsertSend(string text)
-        {
-            AppendMaybeScroll(m_sendColor, "Me:", text);
-        }
-
-        private void m_cli_OnPresence(object sender, jabber.protocol.client.Presence pres)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-
-        }
-        #endregion
-
-    }
-}
diff --git a/lib/jabber-net/muzzle/ClientLogin.cs b/lib/jabber-net/muzzle/ClientLogin.cs
deleted file mode 100644
index e57657a..0000000
--- a/lib/jabber-net/muzzle/ClientLogin.cs
+++ /dev/null
@@ -1,663 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Windows.Forms;
-using System.Xml;
-
-using bedrock.util;
-using jabber.connection;
-using jabber.connection.sasl;
-
-namespace muzzle
-{
-    /// <summary>
-    /// A login form for client connections.
-    /// </summary>
-    /// <example>
-    /// ClientLogin l = new ClientLogin(jc);
-    ///
-    /// if (l.ShowDialog(this) == DialogResult.OK)
-    /// {
-    ///     jc.Connect();
-    /// }
-    /// </example>
-    [SVN(@"$Id$")]
-    public class ClientLogin : OptionForm
-    {
-        private System.Windows.Forms.CheckBox cbSSL;
-        private System.Windows.Forms.TabControl tabControl1;
-        /// <summary>
-        /// The basic configuration tab.
-        /// </summary>
-        protected TabPage tpBasic;
-        private System.Windows.Forms.TextBox txtPass;
-        private System.Windows.Forms.TextBox txtServer;
-        private System.Windows.Forms.TextBox txtUser;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.TabPage tpNetwork;
-        private System.Windows.Forms.NumericUpDown numPort;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.TextBox txtNetworkHost;
-        private System.Windows.Forms.TabPage tpProxy;
-        private System.Windows.Forms.Label label6;
-        private System.Windows.Forms.ComboBox cmbProxy;
-        private System.Windows.Forms.Label label7;
-        private System.Windows.Forms.Label label8;
-        private System.Windows.Forms.Label label9;
-        private System.Windows.Forms.Label label10;
-        private System.Windows.Forms.NumericUpDown numProxyPort;
-        private System.Windows.Forms.TextBox txtProxyUser;
-        private System.Windows.Forms.TextBox txtProxyPassword;
-        private System.Windows.Forms.TextBox txtProxyHost;
-        private System.Windows.Forms.CheckBox cbPlaintext;
-        private TabPage tpConnection;
-        private TextBox txtURL;
-        private Label label12;
-        private ComboBox cmbConnectionType;
-        private CheckBox cbUseWinCreds;
-        private Label label11;
-
-        /// <summary>
-        /// Create a Client Login dialog box
-        /// </summary>
-        public ClientLogin() : base()
-        {
-            //
-            // Required for Windows Form Designer support
-            //
-            InitializeComponent();
-#if NO_SSL
-            cbSSL.Visible = false;
-#endif
-
-            for (ProxyType pt=ProxyType.None; pt <= ProxyType.HTTP; pt++)
-            {
-                cmbProxy.Items.Add(pt);
-            }
-            cmbProxy.SelectedItem = ProxyType.None;
-
-            for (ConnectionType ct=ConnectionType.Socket; ct <= ConnectionType.HTTP_Binding; ct++)
-            {
-                cmbConnectionType.Items.Add(ct);
-            }
-            cmbConnectionType.SelectedItem = ConnectionType.Socket;
-
-            cbSSL.Tag = Options.SSL;
-            txtPass.Tag = Options.PASSWORD;
-            txtServer.Tag = Options.TO;
-            txtUser.Tag = Options.USER;
-            numPort.Tag = Options.PORT;
-            txtNetworkHost.Tag = Options.NETWORK_HOST;
-            cmbProxy.Tag = Options.PROXY_TYPE;
-            numProxyPort.Tag = Options.PROXY_PORT;
-            txtProxyUser.Tag = Options.PROXY_USER;
-            txtProxyPassword.Tag = Options.PROXY_PW;
-            txtProxyHost.Tag = Options.PROXY_HOST;
-            cbPlaintext.Tag = Options.PLAINTEXT;
-            txtURL.Tag = Options.POLL_URL;
-            cmbConnectionType.Tag = Options.CONNECTION_TYPE;
-            cbUseWinCreds.Tag = KerbProcessor.USE_WINDOWS_CREDS;
-        }
-
-        /// <summary>
-        /// Log in to the server
-        /// </summary>
-        /// <param name="cli">The JabberClient instance to connect</param>
-        /// <param name="propertyFile">The name of an XML file to store properties in.</param>
-        /// <returns>True if the user clicked OK, false on cancel</returns>
-        public static bool Login(jabber.client.JabberClient cli, string propertyFile)
-        {
-            return new ClientLogin(cli).Login(propertyFile);
-        }
-
-        /// <summary>
-        /// Create a Client Login dialog box than manages the connection properties of a particular client
-        /// connection.
-        /// </summary>
-        /// <param name="cli">The client connection to modify</param>
-        public ClientLogin(jabber.client.JabberClient cli) : this()
-        {
-            this.Xmpp = cli;
-        }
-
-        #region Windows Form Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.txtServer = new System.Windows.Forms.TextBox();
-            this.txtUser = new System.Windows.Forms.TextBox();
-            this.cbSSL = new System.Windows.Forms.CheckBox();
-            this.numPort = new System.Windows.Forms.NumericUpDown();
-            this.tabControl1 = new System.Windows.Forms.TabControl();
-            this.tpBasic = new System.Windows.Forms.TabPage();
-            this.cbUseWinCreds = new System.Windows.Forms.CheckBox();
-            this.cbPlaintext = new System.Windows.Forms.CheckBox();
-            this.txtPass = new System.Windows.Forms.TextBox();
-            this.label4 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label1 = new System.Windows.Forms.Label();
-            this.tpNetwork = new System.Windows.Forms.TabPage();
-            this.txtNetworkHost = new System.Windows.Forms.TextBox();
-            this.label5 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.tpConnection = new System.Windows.Forms.TabPage();
-            this.txtURL = new System.Windows.Forms.TextBox();
-            this.label12 = new System.Windows.Forms.Label();
-            this.cmbConnectionType = new System.Windows.Forms.ComboBox();
-            this.label11 = new System.Windows.Forms.Label();
-            this.tpProxy = new System.Windows.Forms.TabPage();
-            this.txtProxyPassword = new System.Windows.Forms.TextBox();
-            this.txtProxyUser = new System.Windows.Forms.TextBox();
-            this.numProxyPort = new System.Windows.Forms.NumericUpDown();
-            this.txtProxyHost = new System.Windows.Forms.TextBox();
-            this.label10 = new System.Windows.Forms.Label();
-            this.label9 = new System.Windows.Forms.Label();
-            this.label8 = new System.Windows.Forms.Label();
-            this.label7 = new System.Windows.Forms.Label();
-            this.label6 = new System.Windows.Forms.Label();
-            this.cmbProxy = new System.Windows.Forms.ComboBox();
-            ((System.ComponentModel.ISupportInitialize)(this.error)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numPort)).BeginInit();
-            this.tabControl1.SuspendLayout();
-            this.tpBasic.SuspendLayout();
-            this.tpNetwork.SuspendLayout();
-            this.tpConnection.SuspendLayout();
-            this.tpProxy.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numProxyPort)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // txtServer
-            // 
-            this.txtServer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtServer.Location = new System.Drawing.Point(72, 72);
-            this.txtServer.Name = "txtServer";
-            this.txtServer.Size = new System.Drawing.Size(189, 20);
-            this.txtServer.TabIndex = 5;
-            this.tip.SetToolTip(this.txtServer, "The name of the Jabber server");
-            this.txtServer.Validated += new System.EventHandler(this.onValidated);
-            this.txtServer.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            // 
-            // txtUser
-            // 
-            this.txtUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtUser.Location = new System.Drawing.Point(72, 8);
-            this.txtUser.Name = "txtUser";
-            this.txtUser.Size = new System.Drawing.Size(189, 20);
-            this.txtUser.TabIndex = 1;
-            this.txtUser.Tag = "";
-            this.tip.SetToolTip(this.txtUser, "The user portion of the JID only.");
-            this.txtUser.Validated += new System.EventHandler(this.onValidated);
-            this.txtUser.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            // 
-            // cbSSL
-            // 
-            this.cbSSL.AccessibleDescription = "";
-            this.cbSSL.Location = new System.Drawing.Point(8, 64);
-            this.cbSSL.Name = "cbSSL";
-            this.cbSSL.Size = new System.Drawing.Size(48, 24);
-            this.cbSSL.TabIndex = 4;
-            this.cbSSL.Text = "SSL";
-            this.tip.SetToolTip(this.cbSSL, "Connect using old-style Secure Socket Layer encryption");
-            this.cbSSL.CheckedChanged += new System.EventHandler(this.cbSSL_CheckedChanged);
-            // 
-            // numPort
-            // 
-            this.numPort.Location = new System.Drawing.Point(88, 10);
-            this.numPort.Maximum = new decimal(new int[] {
-            65535,
-            0,
-            0,
-            0});
-            this.numPort.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.numPort.Name = "numPort";
-            this.numPort.Size = new System.Drawing.Size(94, 20);
-            this.numPort.TabIndex = 1;
-            this.tip.SetToolTip(this.numPort, "TCP port to connect on");
-            this.numPort.Value = new decimal(new int[] {
-            5222,
-            0,
-            0,
-            0});
-            // 
-            // tabControl1
-            // 
-            this.tabControl1.Controls.Add(this.tpBasic);
-            this.tabControl1.Controls.Add(this.tpNetwork);
-            this.tabControl1.Controls.Add(this.tpConnection);
-            this.tabControl1.Controls.Add(this.tpProxy);
-            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tabControl1.Location = new System.Drawing.Point(0, 0);
-            this.tabControl1.Name = "tabControl1";
-            this.tabControl1.SelectedIndex = 0;
-            this.tabControl1.Size = new System.Drawing.Size(292, 182);
-            this.tabControl1.TabIndex = 0;
-            // 
-            // tpBasic
-            // 
-            this.tpBasic.Controls.Add(this.cbUseWinCreds);
-            this.tpBasic.Controls.Add(this.cbPlaintext);
-            this.tpBasic.Controls.Add(this.txtPass);
-            this.tpBasic.Controls.Add(this.txtServer);
-            this.tpBasic.Controls.Add(this.txtUser);
-            this.tpBasic.Controls.Add(this.label4);
-            this.tpBasic.Controls.Add(this.label2);
-            this.tpBasic.Controls.Add(this.label1);
-            this.tpBasic.Location = new System.Drawing.Point(4, 22);
-            this.tpBasic.Name = "tpBasic";
-            this.tpBasic.Size = new System.Drawing.Size(284, 156);
-            this.tpBasic.TabIndex = 0;
-            this.tpBasic.Text = "Basic";
-            // 
-            // cbUseWinCreds
-            // 
-            this.cbUseWinCreds.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.cbUseWinCreds.Location = new System.Drawing.Point(8, 130);
-            this.cbUseWinCreds.Name = "cbUseWinCreds";
-            this.cbUseWinCreds.Size = new System.Drawing.Size(268, 17);
-            this.cbUseWinCreds.TabIndex = 7;
-            this.cbUseWinCreds.Text = "Use Windows credentials or a client certificate";
-            this.tip.SetToolTip(this.cbUseWinCreds, "Attempt to do single sign-on using Kerberos/GSSAPI or an X.509 certificate from t" +
-                    "he Windows certificate store.");
-            this.cbUseWinCreds.CheckedChanged += new System.EventHandler(this.cbUseWinCreds_CheckedChanged);
-            // 
-            // cbPlaintext
-            // 
-            this.cbPlaintext.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.cbPlaintext.Location = new System.Drawing.Point(8, 104);
-            this.cbPlaintext.Name = "cbPlaintext";
-            this.cbPlaintext.Size = new System.Drawing.Size(268, 20);
-            this.cbPlaintext.TabIndex = 6;
-            this.cbPlaintext.Text = "Allow plaintext authentication";
-            this.tip.SetToolTip(this.cbPlaintext, "Allow sending plaintext passwords over non-encrypted channels.  Do not use in pro" +
-                    "duction!");
-            // 
-            // txtPass
-            // 
-            this.txtPass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtPass.Location = new System.Drawing.Point(72, 40);
-            this.txtPass.Name = "txtPass";
-            this.txtPass.PasswordChar = '*';
-            this.txtPass.Size = new System.Drawing.Size(189, 20);
-            this.txtPass.TabIndex = 3;
-            this.tip.SetToolTip(this.txtPass, "The password for this user.  Not used if \"Use Windows credentials or a client cer" +
-                    "tificate\" is set.");
-            this.txtPass.Validated += new System.EventHandler(this.onValidated);
-            this.txtPass.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            // 
-            // label4
-            // 
-            this.label4.Location = new System.Drawing.Point(8, 39);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(64, 23);
-            this.label4.TabIndex = 2;
-            this.label4.Text = "Password:";
-            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label2
-            // 
-            this.label2.Location = new System.Drawing.Point(8, 71);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(48, 23);
-            this.label2.TabIndex = 4;
-            this.label2.Text = "Server:";
-            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label1
-            // 
-            this.label1.Location = new System.Drawing.Point(8, 7);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(48, 23);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "User:";
-            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // tpNetwork
-            // 
-            this.tpNetwork.Controls.Add(this.txtNetworkHost);
-            this.tpNetwork.Controls.Add(this.label5);
-            this.tpNetwork.Controls.Add(this.cbSSL);
-            this.tpNetwork.Controls.Add(this.numPort);
-            this.tpNetwork.Controls.Add(this.label3);
-            this.tpNetwork.Location = new System.Drawing.Point(4, 22);
-            this.tpNetwork.Name = "tpNetwork";
-            this.tpNetwork.Size = new System.Drawing.Size(284, 156);
-            this.tpNetwork.TabIndex = 2;
-            this.tpNetwork.Text = "Network";
-            // 
-            // txtNetworkHost
-            // 
-            this.txtNetworkHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtNetworkHost.Location = new System.Drawing.Point(88, 37);
-            this.txtNetworkHost.Name = "txtNetworkHost";
-            this.txtNetworkHost.Size = new System.Drawing.Size(184, 20);
-            this.txtNetworkHost.TabIndex = 3;
-            this.tip.SetToolTip(this.txtNetworkHost, "An alternate connect host.  If this is not specified, a DNS SRV lookup will be at" +
-                    "tempted.  If that fails, the Server will be connected to.");
-            // 
-            // label5
-            // 
-            this.label5.Location = new System.Drawing.Point(8, 36);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(80, 23);
-            this.label5.TabIndex = 2;
-            this.label5.Text = "Network Host:";
-            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label3
-            // 
-            this.label3.Location = new System.Drawing.Point(8, 9);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(80, 23);
-            this.label3.TabIndex = 0;
-            this.label3.Text = "Port:";
-            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // tpConnection
-            // 
-            this.tpConnection.Controls.Add(this.txtURL);
-            this.tpConnection.Controls.Add(this.label12);
-            this.tpConnection.Controls.Add(this.cmbConnectionType);
-            this.tpConnection.Controls.Add(this.label11);
-            this.tpConnection.Location = new System.Drawing.Point(4, 22);
-            this.tpConnection.Name = "tpConnection";
-            this.tpConnection.Size = new System.Drawing.Size(284, 156);
-            this.tpConnection.TabIndex = 3;
-            this.tpConnection.Text = "Connection";
-            // 
-            // txtURL
-            // 
-            this.txtURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtURL.Enabled = false;
-            this.txtURL.Location = new System.Drawing.Point(50, 40);
-            this.txtURL.Name = "txtURL";
-            this.txtURL.Size = new System.Drawing.Size(222, 20);
-            this.txtURL.TabIndex = 3;
-            this.tip.SetToolTip(this.txtURL, "The URL to connect on for binding or polling.  TXT lookup will be done if none is" +
-                    " specified.");
-            // 
-            // label12
-            // 
-            this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(14, 43);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(32, 13);
-            this.label12.TabIndex = 2;
-            this.label12.Text = "URL:";
-            // 
-            // cmbConnectionType
-            // 
-            this.cmbConnectionType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.cmbConnectionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbConnectionType.Location = new System.Drawing.Point(50, 9);
-            this.cmbConnectionType.Name = "cmbConnectionType";
-            this.cmbConnectionType.Size = new System.Drawing.Size(222, 21);
-            this.cmbConnectionType.TabIndex = 1;
-            this.tip.SetToolTip(this.cmbConnectionType, "Prefer \"Socket\", unless your firewall won\'t allow connections.  Then try \"Binding" +
-                    "\".");
-            this.cmbConnectionType.SelectedIndexChanged += new System.EventHandler(this.cmbConnectionType_SelectedIndexChanged);
-            // 
-            // label11
-            // 
-            this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(10, 12);
-            this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(34, 13);
-            this.label11.TabIndex = 0;
-            this.label11.Text = "Type:";
-            // 
-            // tpProxy
-            // 
-            this.tpProxy.Controls.Add(this.txtProxyPassword);
-            this.tpProxy.Controls.Add(this.txtProxyUser);
-            this.tpProxy.Controls.Add(this.numProxyPort);
-            this.tpProxy.Controls.Add(this.txtProxyHost);
-            this.tpProxy.Controls.Add(this.label10);
-            this.tpProxy.Controls.Add(this.label9);
-            this.tpProxy.Controls.Add(this.label8);
-            this.tpProxy.Controls.Add(this.label7);
-            this.tpProxy.Controls.Add(this.label6);
-            this.tpProxy.Controls.Add(this.cmbProxy);
-            this.tpProxy.Location = new System.Drawing.Point(4, 22);
-            this.tpProxy.Name = "tpProxy";
-            this.tpProxy.Size = new System.Drawing.Size(284, 156);
-            this.tpProxy.TabIndex = 1;
-            this.tpProxy.Text = "Proxy";
-            // 
-            // txtProxyPassword
-            // 
-            this.txtProxyPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtProxyPassword.Enabled = false;
-            this.txtProxyPassword.Location = new System.Drawing.Point(72, 117);
-            this.txtProxyPassword.Name = "txtProxyPassword";
-            this.txtProxyPassword.PasswordChar = '*';
-            this.txtProxyPassword.Size = new System.Drawing.Size(200, 20);
-            this.txtProxyPassword.TabIndex = 9;
-            this.tip.SetToolTip(this.txtProxyPassword, "Proxy authentication password.");
-            // 
-            // txtProxyUser
-            // 
-            this.txtProxyUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtProxyUser.Enabled = false;
-            this.txtProxyUser.Location = new System.Drawing.Point(72, 90);
-            this.txtProxyUser.Name = "txtProxyUser";
-            this.txtProxyUser.Size = new System.Drawing.Size(200, 20);
-            this.txtProxyUser.TabIndex = 7;
-            this.tip.SetToolTip(this.txtProxyUser, "Proxy authentication user name.");
-            // 
-            // numProxyPort
-            // 
-            this.numProxyPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.numProxyPort.Enabled = false;
-            this.numProxyPort.Location = new System.Drawing.Point(72, 63);
-            this.numProxyPort.Maximum = new decimal(new int[] {
-            65535,
-            0,
-            0,
-            0});
-            this.numProxyPort.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.numProxyPort.Name = "numProxyPort";
-            this.numProxyPort.Size = new System.Drawing.Size(200, 20);
-            this.numProxyPort.TabIndex = 5;
-            this.tip.SetToolTip(this.numProxyPort, "Proxy server\'s port number");
-            this.numProxyPort.Value = new decimal(new int[] {
-            1080,
-            0,
-            0,
-            0});
-            // 
-            // txtProxyHost
-            // 
-            this.txtProxyHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtProxyHost.Enabled = false;
-            this.txtProxyHost.Location = new System.Drawing.Point(72, 36);
-            this.txtProxyHost.Name = "txtProxyHost";
-            this.txtProxyHost.Size = new System.Drawing.Size(200, 20);
-            this.txtProxyHost.TabIndex = 3;
-            this.tip.SetToolTip(this.txtProxyHost, "Proxy server to connect to");
-            // 
-            // label10
-            // 
-            this.label10.Location = new System.Drawing.Point(8, 116);
-            this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(64, 23);
-            this.label10.TabIndex = 8;
-            this.label10.Text = "Password:";
-            this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label9
-            // 
-            this.label9.Location = new System.Drawing.Point(8, 89);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(64, 23);
-            this.label9.TabIndex = 6;
-            this.label9.Text = "User:";
-            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label8
-            // 
-            this.label8.Location = new System.Drawing.Point(8, 62);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(64, 23);
-            this.label8.TabIndex = 4;
-            this.label8.Text = "Port:";
-            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label7
-            // 
-            this.label7.Location = new System.Drawing.Point(8, 35);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(64, 23);
-            this.label7.TabIndex = 2;
-            this.label7.Text = "Server:";
-            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // label6
-            // 
-            this.label6.Location = new System.Drawing.Point(8, 7);
-            this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(64, 23);
-            this.label6.TabIndex = 0;
-            this.label6.Text = "Type:";
-            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            // 
-            // cmbProxy
-            // 
-            this.cmbProxy.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                        | System.Windows.Forms.AnchorStyles.Right)));
-            this.cmbProxy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cmbProxy.Location = new System.Drawing.Point(72, 8);
-            this.cmbProxy.Name = "cmbProxy";
-            this.cmbProxy.Size = new System.Drawing.Size(200, 21);
-            this.cmbProxy.TabIndex = 1;
-            this.tip.SetToolTip(this.cmbProxy, "The type of proxy to use.  Prefer \"None\", if possible.");
-            this.cmbProxy.SelectedIndexChanged += new System.EventHandler(this.cmbProxy_SelectedIndexChanged);
-            // 
-            // ClientLogin
-            // 
-            this.ClientSize = new System.Drawing.Size(292, 222);
-            this.Controls.Add(this.tabControl1);
-            this.MinimizeBox = false;
-            this.Name = "ClientLogin";
-            this.Text = "Login";
-            this.Controls.SetChildIndex(this.tabControl1, 0);
-            ((System.ComponentModel.ISupportInitialize)(this.error)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numPort)).EndInit();
-            this.tabControl1.ResumeLayout(false);
-            this.tpBasic.ResumeLayout(false);
-            this.tpBasic.PerformLayout();
-            this.tpNetwork.ResumeLayout(false);
-            this.tpNetwork.PerformLayout();
-            this.tpConnection.ResumeLayout(false);
-            this.tpConnection.PerformLayout();
-            this.tpProxy.ResumeLayout(false);
-            this.tpProxy.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numProxyPort)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-
-        private void cbSSL_CheckedChanged(object sender, System.EventArgs e)
-        {
-            if (cbSSL.Checked)
-            {
-                if (numPort.Value == 5222)
-                    numPort.Value = 5223;
-            }
-            else
-            {
-                if (numPort.Value == 5223)
-                    numPort.Value = 5222;
-            }
-        }
-
-        private void cmbConnectionType_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            bool socket = (cmbConnectionType.SelectedIndex == 0);
-            bool prox = (cmbProxy.SelectedIndex != 0);
-            txtURL.Enabled = !socket;
-
-            txtNetworkHost.Enabled = socket;
-            cbSSL.Enabled = socket;
-            numPort.Enabled = socket;
-
-            txtProxyHost.Enabled = prox;
-            numProxyPort.Enabled = prox;
-            txtProxyUser.Enabled = prox;
-            txtProxyPassword.Enabled = prox;
-        }
-
-        private void cmbProxy_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            bool prox = (cmbProxy.SelectedIndex != 0);
-            txtProxyHost.Enabled = prox;
-            numProxyPort.Enabled = prox;
-            txtProxyUser.Enabled = prox;
-            txtProxyPassword.Enabled = prox;
-        }
-
-        private void Required_Validating(object sender, CancelEventArgs e)
-        {
-            this.Required(sender, e);
-        }
-
-        private void onValidated(object sender, EventArgs e)
-        {
-            this.ClearError(sender, e);
-        }
-
-        private void cbUseWinCreds_CheckedChanged(object sender, EventArgs e)
-        {
-            if (cbUseWinCreds.Checked)
-            {
-                txtUser.Clear();
-                txtPass.Clear();
-                this.ClearError(txtUser, null);
-                this.ClearError(txtPass, null);
-            }
-			txtUser.Enabled = txtPass.Enabled = !cbUseWinCreds.Checked;
-		}
-    }
-}
diff --git a/lib/jabber-net/muzzle/ComponentLogin.cs b/lib/jabber-net/muzzle/ComponentLogin.cs
deleted file mode 100644
index 2abe362..0000000
--- a/lib/jabber-net/muzzle/ComponentLogin.cs
+++ /dev/null
@@ -1,277 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Windows.Forms;
-using System.Xml;
-
-using bedrock.util;
-
-using jabber.connection;
-using jabber.server;
-
-namespace muzzle
-{
-    /// <summary>
-    /// A login form for client connections.
-    /// </summary>
-    /// <example>
-    /// ComponentLogin l = new ComponentLogin(jc);
-    ///
-    /// if (l.ShowDialog(this) == DialogResult.OK)
-    /// {
-    ///     jc.Connect();
-    /// }
-    /// </example>
-    [SVN(@"$Id$")]
-    public class ComponentLogin : OptionForm
-    {
-
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.TextBox txtUser;
-        private System.Windows.Forms.TextBox txtServer;
-        private System.Windows.Forms.NumericUpDown numPort;
-        private System.Windows.Forms.TextBox txtPass;
-        private ComboBox cmbType;
-        private Label label5;
-
-        /// <summary>
-        /// Create a Client Login dialog box
-        /// </summary>
-        public ComponentLogin()
-        {
-            //
-            // Required for Windows Form Designer support
-            //
-            InitializeComponent();
-
-            for (ComponentType ct=ComponentType.Accept; ct <= ComponentType.Connect; ct++)
-            {
-                cmbType.Items.Add(ct);
-            }
-            cmbType.SelectedItem = ComponentType.Accept;
-
-            txtUser.Tag = Options.TO;
-            txtServer.Tag = Options.NETWORK_HOST;
-            numPort.Tag = Options.PORT;
-            txtPass.Tag = Options.PASSWORD;
-            cmbType.Tag = Options.COMPONENT_DIRECTION;
-        }
-
-        /// <summary>
-        /// Log in to the server
-        /// </summary>
-        /// <param name="service">The JabberClient instance to connect</param>
-        /// <param name="propertyFile">The name of an XML file to store properties in.</param>
-        /// <returns>True if the user clicked OK, false on cancel</returns>
-        public static bool Login(jabber.server.JabberService service, string propertyFile)
-        {
-            return new ComponentLogin(service).Login(propertyFile);
-        }
-
-        /// <summary>
-        /// Create a Client Login dialog box that manages a component
-        /// </summary>
-        /// <param name="service">The component to manage</param>
-        public ComponentLogin(jabber.server.JabberService service) : this()
-        {
-            this.Xmpp = service;
-        }
-
-#region Windows Form Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.txtUser = new System.Windows.Forms.TextBox();
-            this.txtServer = new System.Windows.Forms.TextBox();
-            this.numPort = new System.Windows.Forms.NumericUpDown();
-            this.txtPass = new System.Windows.Forms.TextBox();
-            this.label4 = new System.Windows.Forms.Label();
-            this.cmbType = new System.Windows.Forms.ComboBox();
-            this.label5 = new System.Windows.Forms.Label();
-            ((System.ComponentModel.ISupportInitialize)(this.error)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numPort)).BeginInit();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            this.label1.Location = new System.Drawing.Point(8, 7);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(48, 23);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "Host:";
-            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            //
-            // label2
-            //
-            this.label2.Location = new System.Drawing.Point(8, 63);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(48, 23);
-            this.label2.TabIndex = 4;
-            this.label2.Text = "ID:";
-            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            //
-            // label3
-            //
-            this.label3.Location = new System.Drawing.Point(8, 35);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(48, 23);
-            this.label3.TabIndex = 2;
-            this.label3.Text = "Port:";
-            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            //
-            // txtUser
-            //
-            this.txtUser.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtUser.Location = new System.Drawing.Point(56, 64);
-            this.txtUser.Name = "txtUser";
-            this.txtUser.Size = new System.Drawing.Size(220, 20);
-            this.txtUser.TabIndex = 5;
-            this.tip.SetToolTip(this.txtUser, "Service ID for this component");
-            this.txtUser.Validated += new System.EventHandler(this.onValidated);
-            this.txtUser.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            //
-            // txtServer
-            //
-            this.txtServer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtServer.Location = new System.Drawing.Point(56, 8);
-            this.txtServer.Name = "txtServer";
-            this.txtServer.Size = new System.Drawing.Size(220, 20);
-            this.txtServer.TabIndex = 1;
-            this.tip.SetToolTip(this.txtServer, "DNS name or IP address of router to connect to.  Not required if in Listen mode.");
-            this.txtServer.Validated += new System.EventHandler(this.onValidated);
-            this.txtServer.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            //
-            // numPort
-            //
-            this.numPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.numPort.Location = new System.Drawing.Point(56, 36);
-            this.numPort.Maximum = new decimal(new int[] {
-            65535,
-            0,
-            0,
-            0});
-            this.numPort.Minimum = new decimal(new int[] {
-            1,
-            0,
-            0,
-            0});
-            this.numPort.Name = "numPort";
-            this.numPort.Size = new System.Drawing.Size(220, 20);
-            this.numPort.TabIndex = 3;
-            this.tip.SetToolTip(this.numPort, "TCP port to connect to, or port to listen on if in Listen mode.");
-            this.numPort.Value = new decimal(new int[] {
-            7400,
-            0,
-            0,
-            0});
-            //
-            // txtPass
-            //
-            this.txtPass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtPass.Location = new System.Drawing.Point(56, 92);
-            this.txtPass.Name = "txtPass";
-            this.txtPass.PasswordChar = '*';
-            this.txtPass.Size = new System.Drawing.Size(220, 20);
-            this.txtPass.TabIndex = 7;
-            this.tip.SetToolTip(this.txtPass, "Secret shared with router");
-            this.txtPass.Validated += new System.EventHandler(this.onValidated);
-            this.txtPass.Validating += new System.ComponentModel.CancelEventHandler(this.Required_Validating);
-            //
-            // label4
-            //
-            this.label4.Location = new System.Drawing.Point(8, 91);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(48, 23);
-            this.label4.TabIndex = 6;
-            this.label4.Text = "Secret:";
-            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            //
-            // cmbType
-            //
-            this.cmbType.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.cmbType.Location = new System.Drawing.Point(56, 118);
-            this.cmbType.Name = "cmbType";
-            this.cmbType.Size = new System.Drawing.Size(221, 21);
-            this.cmbType.TabIndex = 9;
-            //
-            // label5
-            //
-            this.label5.Location = new System.Drawing.Point(8, 116);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(48, 23);
-            this.label5.TabIndex = 8;
-            this.label5.Text = "Type:";
-            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            //
-            // ComponentLogin
-            //
-            this.ClientSize = new System.Drawing.Size(292, 266);
-            this.Controls.Add(this.label5);
-            this.Controls.Add(this.txtPass);
-            this.Controls.Add(this.cmbType);
-            this.Controls.Add(this.numPort);
-            this.Controls.Add(this.txtServer);
-            this.Controls.Add(this.txtUser);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
-            this.Name = "ComponentLogin";
-            this.Text = "Connection";
-            this.Controls.SetChildIndex(this.label1, 0);
-            this.Controls.SetChildIndex(this.label2, 0);
-            this.Controls.SetChildIndex(this.label3, 0);
-            this.Controls.SetChildIndex(this.label4, 0);
-            this.Controls.SetChildIndex(this.txtUser, 0);
-            this.Controls.SetChildIndex(this.txtServer, 0);
-            this.Controls.SetChildIndex(this.numPort, 0);
-            this.Controls.SetChildIndex(this.cmbType, 0);
-            this.Controls.SetChildIndex(this.txtPass, 0);
-            this.Controls.SetChildIndex(this.label5, 0);
-            ((System.ComponentModel.ISupportInitialize)(this.error)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numPort)).EndInit();
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-#endregion
-
-        private void Required_Validating(object sender, CancelEventArgs e)
-        {
-            this.Required(sender, e);
-        }
-
-        private void onValidated(object sender, EventArgs e)
-        {
-            this.ClearError(sender, e);
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/InputBox.cs b/lib/jabber-net/muzzle/InputBox.cs
deleted file mode 100644
index 1bbd250..0000000
--- a/lib/jabber-net/muzzle/InputBox.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
-
-using bedrock.util;
-
-namespace muzzle
-{
-
-    /// <summary>
-    /// A generic input getter dialog.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InputBox : Form
-    {
-        private Label label1;
-        private TextBox textBox1;
-        private Button btnOK;
-        private Button btnCancel;
-        private Panel panel1;
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Create
-        /// </summary>
-        public InputBox()
-        {
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.label1 = new System.Windows.Forms.Label();
-            this.textBox1 = new System.Windows.Forms.TextBox();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.panel1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // label1
-            //
-            this.label1.AutoSize = true;
-            this.label1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.label1.Location = new System.Drawing.Point(0, 0);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(35, 16);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "label1";
-            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-            //
-            // textBox1
-            //
-            this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.textBox1.Location = new System.Drawing.Point(35, 0);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(184, 20);
-            this.textBox1.TabIndex = 1;
-            //
-            // btnOK
-            //
-            this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(75, 42);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 1;
-            this.btnOK.Text = "OK";
-            //
-            // btnCancel
-            //
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(156, 42);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 2;
-            this.btnCancel.Text = "Cancel";
-            //
-            // panel1
-            //
-            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this.panel1.Controls.Add(this.textBox1);
-            this.panel1.Controls.Add(this.label1);
-            this.panel1.Location = new System.Drawing.Point(12, 10);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(219, 26);
-            this.panel1.TabIndex = 0;
-            //
-            // InputBox
-            //
-            this.AcceptButton = this.btnOK;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(243, 77);
-            this.Controls.Add(this.panel1);
-            this.Controls.Add(this.btnCancel);
-            this.Controls.Add(this.btnOK);
-            this.Name = "InputBox";
-            this.panel1.ResumeLayout(false);
-            this.panel1.PerformLayout();
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Pop up the input box with the given parameters
-        /// </summary>
-        /// <param name="title">The text of the window title</param>
-        /// <param name="prompt">Prompt value.  Include colon if desired.</param>
-        /// <param name="defaultValue">Initial value of the input box</param>
-        /// <returns></returns>
-        public DialogResult ShowDialog(string title, string prompt, string defaultValue)
-        {
-            this.Text = title;
-            label1.Text = prompt;
-            textBox1.Text = defaultValue;
-            return this.ShowDialog();
-        }
-
-        /// <summary>
-        /// The value entered by the user
-        /// </summary>
-        public string Value
-        {
-            get { return textBox1.Text; }
-            set { textBox1.Text = value; }
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/JidMulti.cs b/lib/jabber-net/muzzle/JidMulti.cs
deleted file mode 100644
index 5594499..0000000
--- a/lib/jabber-net/muzzle/JidMulti.cs
+++ /dev/null
@@ -1,226 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
-
-using bedrock.util;
-
-namespace muzzle
-{
-    /// <summary>
-    /// Summary description for JidMulti.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class JidMulti : System.Windows.Forms.UserControl
-    {
-        private System.Windows.Forms.ListBox lstJID;
-        private System.Windows.Forms.ToolTip tip;
-        private System.Windows.Forms.ErrorProvider error;
-        private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Button btnRemove;
-        private System.Windows.Forms.Button btnAdd;
-        private System.Windows.Forms.TextBox txtEntry;
-        private System.ComponentModel.IContainer components;
-
-        /// <summary>
-        /// Create a JidMulti control
-        /// </summary>
-        public JidMulti()
-        {
-            // This call is required by the Windows.Forms Form Designer.
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-        /// <summary>
-        /// Add a range of JIDs or strings to the list.
-        /// </summary>
-        /// <param name="range"></param>
-        public void AddRange(object[] range)
-        {
-            lstJID.Items.AddRange(range);
-        }
-
-        /// <summary>
-        /// Get the list of JIDs in the control currently.
-        /// </summary>
-        /// <returns></returns>
-        public string[] GetValues()
-        {
-            string[] vals = new string[lstJID.Items.Count];
-            for (int i=0; i < vals.Length; i++)
-            {
-                vals[i] = lstJID.Items[i].ToString();
-            }
-            return vals;
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            this.lstJID = new System.Windows.Forms.ListBox();
-            this.tip = new System.Windows.Forms.ToolTip(this.components);
-            this.error = new System.Windows.Forms.ErrorProvider();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.btnRemove = new System.Windows.Forms.Button();
-            this.btnAdd = new System.Windows.Forms.Button();
-            this.txtEntry = new System.Windows.Forms.TextBox();
-            this.panel1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // lstJID
-            //
-            this.lstJID.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.lstJID.IntegralHeight = false;
-            this.lstJID.Location = new System.Drawing.Point(0, 32);
-            this.lstJID.Name = "lstJID";
-            this.lstJID.Size = new System.Drawing.Size(256, 88);
-            this.lstJID.Sorted = true;
-            this.lstJID.TabIndex = 0;
-            this.lstJID.SelectedIndexChanged += new System.EventHandler(this.lstJID_SelectedIndexChanged);
-            //
-            // error
-            //
-            this.error.ContainerControl = this;
-            //
-            // panel1
-            //
-            this.panel1.Controls.Add(this.btnRemove);
-            this.panel1.Controls.Add(this.btnAdd);
-            this.panel1.Controls.Add(this.txtEntry);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel1.Location = new System.Drawing.Point(0, 0);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(256, 32);
-            this.panel1.TabIndex = 4;
-            //
-            // btnRemove
-            //
-            this.btnRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnRemove.Location = new System.Drawing.Point(232, 5);
-            this.btnRemove.Name = "btnRemove";
-            this.btnRemove.Size = new System.Drawing.Size(24, 23);
-            this.btnRemove.TabIndex = 6;
-            this.btnRemove.Text = "-";
-            this.tip.SetToolTip(this.btnRemove, "Remove from the list the Jabber ID on the left");
-            this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
-            //
-            // btnAdd
-            //
-            this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnAdd.Location = new System.Drawing.Point(208, 5);
-            this.btnAdd.Name = "btnAdd";
-            this.btnAdd.Size = new System.Drawing.Size(24, 23);
-            this.btnAdd.TabIndex = 5;
-            this.btnAdd.Text = "+";
-            this.tip.SetToolTip(this.btnAdd, "Add to the list the Jabber ID to the left");
-            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
-            //
-            // txtEntry
-            //
-            this.txtEntry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                | System.Windows.Forms.AnchorStyles.Right)));
-            this.txtEntry.Location = new System.Drawing.Point(0, 6);
-            this.txtEntry.Name = "txtEntry";
-            this.txtEntry.Size = new System.Drawing.Size(184, 20);
-            this.txtEntry.TabIndex = 4;
-            this.txtEntry.Text = "";
-            this.tip.SetToolTip(this.txtEntry, "Enter a Jabber ID here, and press the + or - button to add or remove it from the " +
-                "list.");
-            //
-            // JidMulti
-            //
-            this.Controls.Add(this.lstJID);
-            this.Controls.Add(this.panel1);
-            this.Name = "JidMulti";
-            this.Size = new System.Drawing.Size(256, 120);
-            this.panel1.ResumeLayout(false);
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-        private void btnAdd_Click(object sender, System.EventArgs e)
-        {
-            this.Cursor = Cursors.WaitCursor;
-            try
-            {
-                jabber.JID jid = new jabber.JID(txtEntry.Text);
-                lstJID.Items.Add(jid);
-                txtEntry.Clear();
-                error.SetError(txtEntry, null);
-            }
-            catch
-            {
-                error.SetError(txtEntry, "Invalid JID");
-            }
-            this.Cursor = Cursors.Default;
-        }
-
-        private void btnRemove_Click(object sender, System.EventArgs e)
-        {
-            this.Cursor = Cursors.WaitCursor;
-            try
-            {
-                jabber.JID jid = new jabber.JID(txtEntry.Text);
-                int i = 0;
-                foreach (object o in lstJID.Items)
-                {
-                    if (jid.Equals(o))
-                    {
-                        lstJID.Items.RemoveAt(i);
-                        txtEntry.Clear();
-                        error.SetError(txtEntry, null);
-                        break;
-                    }
-                    i++;
-                }
-            }
-            catch (Exception ex)
-            {
-                error.SetError(txtEntry, "Invalid JID: " + ex.ToString());
-            }
-            this.Cursor = Cursors.Default;
-        }
-
-        private void lstJID_SelectedIndexChanged(object sender, System.EventArgs e)
-        {
-            if (lstJID.SelectedIndex >= 0)
-                txtEntry.Text = lstJID.Items[lstJID.SelectedIndex].ToString();
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/Litmus.cs b/lib/jabber-net/muzzle/Litmus.cs
deleted file mode 100644
index e3edf6d..0000000
--- a/lib/jabber-net/muzzle/Litmus.cs
+++ /dev/null
@@ -1,272 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Windows.Forms;
-
-using bedrock.util;
-
-namespace muzzle
-{
-    /// <summary>
-    /// How should colors be picked?
-    /// </summary>
-    public enum LitmusColorScheme
-    {
-        /// <summary>
-        /// Just shades of blue
-        /// </summary>
-        Blue,
-        /// <summary>
-        /// More colors for non-ASCII
-        /// </summary>
-        Multicolor
-    }
-    /// <summary>
-    /// Litmus is like StripChart, but shows a graphical representation of protocol going by.
-    /// This was inspired by DW & Craig's suggestion that the next generation protocol should
-    /// just be shades of blue.
-    ///
-    /// Good gracious.  Did I really take the time to write this?
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Litmus : System.Windows.Forms.UserControl
-    {
-        private int               m_hist  = -1;
-        private int               m_max   = 0;
-        private bool              m_pause = false;
-        private Queue             m_list  = new Queue(100);
-        private LitmusColorScheme m_scheme = LitmusColorScheme.Blue;
-        private System.Windows.Forms.PictureBox pictureBox1;
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.Container components = null;
-
-        /// <summary>
-        /// Create a new Litmus object
-        /// </summary>
-        public Litmus()
-        {
-            // This call is required by the Windows.Forms Form Designer.
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-        /// <summary>
-        /// Color scheme to use.
-        /// </summary>
-        [Description("Color scheme to use")]
-        [DefaultValue(LitmusColorScheme.Blue)]
-        [Category("Chart")]
-        public LitmusColorScheme ColorScheme
-        {
-            get
-            {
-                return m_scheme;
-            }
-            set
-            {
-                m_scheme = value;
-            }
-        }
-        /// <summary>
-        /// Number of points to show.  -1 means all
-        /// </summary>
-        [Description("Number of points to show.  -1 means all")]
-        [DefaultValue(-1)]
-        [Category("Chart")]
-        public int History
-        {
-            get
-            {
-                return m_hist;
-            }
-            set
-            {
-                m_hist = value;
-            }
-        }
-        /// <summary>
-        /// Don't update the display for now.  Useful for bulk loads.
-        /// </summary>
-        public bool Paused
-        {
-            get
-            {
-                return m_pause;
-            }
-            set
-            {
-                m_pause = value;
-                ReDraw();
-            }
-        }
-
-        /// <summary>
-        /// Clear all data in the window
-        /// </summary>
-        public void Clear()
-        {
-            m_list.Clear();
-            ReDraw();
-        }
-
-        /// <summary>
-        /// Add a string to the window.  Each byte will become roughly a
-        /// pixel with color based on the byte's value.
-        /// </summary>
-        /// <param name="text"></param>
-        public void AddText(string text)
-        {
-            if (m_hist != -1)
-                while (m_list.Count > m_hist)
-                    m_list.Dequeue();
-            byte[] buf = System.Text.Encoding.UTF8.GetBytes(text);
-            m_list.Enqueue(buf);
-            if (buf.Length > m_max)
-                m_max = buf.Length;
-            ReDraw();
-        }
-
-        /// <summary>
-        /// Add bytes to the window.  Each byte will become roughly a
-        /// pixel with color based on the byte's value.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="offset"></param>
-        /// <param name="length"></param>
-        public void AddBytes(byte[] buf, int offset, int length)
-        {
-            if (m_hist != -1)
-                while (m_list.Count > m_hist)
-                    m_list.Dequeue();
-            byte[] copy = new byte[length];
-            Array.Copy(buf, offset, copy, 0, length);
-            m_list.Enqueue(copy);
-            if (length > m_max)
-                m_max = length;
-            ReDraw();
-        }
-        private void ReDraw()
-        {
-            if (m_pause)
-                return;
-            Bitmap bm = new Bitmap(this.Width, this.Height);
-            Graphics g = Graphics.FromImage(bm);
-            g.SmoothingMode = SmoothingMode.AntiAlias;
-            g.Clear(this.BackColor);
-            SolidBrush brush = new SolidBrush(this.ForeColor);
-            float h = this.Height;
-            float w = this.Width;
-            float stripw = w / ((float)m_list.Count - 1F);
-            float striph = h / ((float)m_max  - 1F);
-            int sc = 0;
-            int cc = 0;
-            switch (m_scheme)
-            {
-                case LitmusColorScheme.Blue:
-                    foreach (byte[] buf in m_list)
-                    {
-                        cc = 0;
-                        foreach (byte b in buf)
-                        {
-                            /*
-                            */
-                            brush.Color = Color.FromArgb(0, 0, 255 - b);
-                            g.FillRectangle(brush, sc * stripw, cc * striph, stripw, striph);
-                            cc++;
-                        }
-                        sc++;
-                    }
-                    break;
-                case LitmusColorScheme.Multicolor:
-                    foreach (byte[] buf in m_list)
-                    {
-                        cc = 0;
-                        foreach (byte b in buf)
-                        {
-                            if (b == 0)
-                                brush.Color = Color.White;
-                            else if (b < 65)
-                                brush.Color = Color.FromArgb(b * 4 - 1, 0, 0);
-                            else if (b < 128)
-                                brush.Color = Color.FromArgb(0, 0, b * 2);
-                            else
-                                brush.Color = Color.FromArgb(0, (b - 128) * 2, 0);
-                            g.FillRectangle(brush, sc * stripw, cc * striph, stripw, striph);
-                            cc++;
-                        }
-                        sc++;
-                    }
-                    break;
-            }
-            pictureBox1.Image = bm;
-        }
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.SuspendLayout();
-            //
-            // pictureBox1
-            //
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(150, 150);
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            //
-            // Litmus
-            //
-            this.Controls.AddRange(new System.Windows.Forms.Control[] {
-                                                                          this.pictureBox1});
-            this.Name = "Litmus";
-            this.Resize += new System.EventHandler(this.Litmus_Resize);
-            this.Load += new System.EventHandler(this.Litmus_Load);
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-        private void Litmus_Load(object sender, System.EventArgs e)
-        {
-            ReDraw();
-        }
-        private void Litmus_Resize(object sender, System.EventArgs e)
-        {
-            ReDraw();
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/OptionForm.cs b/lib/jabber-net/muzzle/OptionForm.cs
deleted file mode 100644
index ba48d69..0000000
--- a/lib/jabber-net/muzzle/OptionForm.cs
+++ /dev/null
@@ -1,501 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using System.Xml;
-
-using bedrock.util;
-using jabber.connection;
-
-namespace muzzle
-{
-    /// <summary>
-    /// Base class for forms that configure XmppStream subclasses.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class OptionForm : Form
-    {
-        private Button btnCancel;
-        private Button btnOK;
-        private Panel panel1;
-
-        private XmppStream m_xmpp;
-        private Hashtable m_extra = new Hashtable();
-
-        /// <summary>
-        /// ToolTips.
-        /// </summary>
-        protected ToolTip tip;
-        /// <summary>
-        /// Error notifications.
-        /// </summary>
-        protected ErrorProvider error;
-        private IContainer components;
-
-        /// <summary>
-        /// Create new form
-        /// </summary>
-        protected OptionForm()
-        {
-            InitializeComponent();
-			this.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
-        }
-
-        /// <summary>
-        /// Create new form.
-        /// </summary>
-        /// <param name="xmpp"></param>
-        protected OptionForm(XmppStream xmpp)
-            : this()
-        {
-            m_xmpp = xmpp;
-        }
-
-
-        /// <summary>
-        /// The client connection to manage
-        /// </summary>
-        public XmppStream Xmpp
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a JabberClient
-                if ((m_xmpp == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    if (host == null)
-                        return null;
-                    m_xmpp = StreamComponent.GetStreamFromHost(host);
-                }
-                return m_xmpp;
-            }
-            set
-            {
-                m_xmpp = value;
-                if (!DesignMode)
-                    ReadXmpp();
-            }
-        }
-
-        private void WriteValues(Control parent, XmppStream stream)
-        {
-            if (parent.Tag != null)
-            {
-                stream[(string)parent.Tag] = GetControlValue(parent);
-            }
-            if (parent.HasChildren)
-            {
-                foreach (Control child in parent.Controls)
-                {
-                    WriteValues(child, stream);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Write to the XmppStream the current values.
-        /// </summary>
-        protected void WriteXmpp()
-        {
-            if (m_xmpp != null)
-                WriteValues(this, m_xmpp);
-        }
-
-        /// <summary>
-        /// Write the configuration values to the given XmppStream.
-        /// </summary>
-        /// <param name="stream">The stream to configure</param>
-        public void Configure(XmppStream stream)
-        {
-            WriteValues(this, stream);
-        }
-
-        private void WriteElem(XmlElement root, Control c)
-        {
-            if (c.Tag != null)
-            {
-                root.AppendChild(root.OwnerDocument.CreateElement((string)c.Tag)).InnerText =
-                    GetControlValue(c).ToString();
-            }
-            if (c.HasChildren)
-            {
-                foreach (Control child in c.Controls)
-                {
-                    WriteElem(root, child);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Write the current connection properties to an XML config file.
-        /// TODO: Replace this with a better ConfigFile implementation that can write.
-        /// </summary>
-        /// <param name="file"></param>
-        public void WriteToFile(string file)
-        {
-            XmlDocument doc = new XmlDocument();
-            string name = "JabberClient";
-            if (m_xmpp != null)
-                name = m_xmpp.GetType().Name;
-            XmlElement root = (XmlElement)doc.CreateElement(name);
-            doc.AppendChild(root);
-
-            WriteElem(root, this);
-
-            foreach (DictionaryEntry ent in m_extra)
-            {
-                root.AppendChild(doc.CreateElement((string)ent.Key)).InnerText = ent.Value.ToString();
-            }
-
-            XmlTextWriter xw = new XmlTextWriter(file, System.Text.Encoding.UTF8);
-            xw.Formatting = Formatting.Indented;
-            doc.WriteContentTo(xw);
-            xw.Close();
-        }
-
-        private void ReadControls(Control parent)
-        {
-            if (parent == null)
-                return;
-            if (m_xmpp == null)
-                return;
-
-            if (parent.Tag != null)
-                SetControlValue(parent, m_xmpp[(string)parent.Tag]);
-            if (parent.HasChildren)
-            {
-                foreach (Control child in parent.Controls)
-                {
-                    ReadControls(child);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Read current values from the XmppStream
-        /// </summary>
-        protected void ReadXmpp()
-        {
-            ReadControls(this);
-        }
-
-        /// <summary>
-        /// Read connection properties from the given file,
-        /// pop up the dialog to see if the user wants to change them,
-        /// save the changes, and
-        /// connect to the server.
-        /// </summary>
-        /// <param name="propertyFile">The name of the file to store connection information in.</param>
-        /// <returns>True if the user hit OK, otherwise false</returns>
-        public bool Login(string propertyFile)
-        {
-            if (this.Xmpp == null)
-                throw new ArgumentNullException("Client must be set", "Xmpp");
-            if (propertyFile != null)
-                ReadFromFile(propertyFile);
-            if (ShowDialog() != DialogResult.OK)
-                return false;
-            if (propertyFile != null)
-                WriteToFile(propertyFile);
-            this.Xmpp.Connect();
-            return true;
-        }
-
-        /// <summary>
-        /// Set the connection properties from an XML config file.
-        /// TODO: Replace this with a better ConfigFile implementation that can write.
-        /// </summary>
-        /// <param name="file"></param>
-        public void ReadFromFile(string file)
-        {
-            XmlDocument doc = new XmlDocument();
-            try
-            {
-                doc.Load(file);
-            }
-            catch (XmlException)
-            {
-                return;
-            }
-            catch (System.IO.FileNotFoundException)
-            {
-                return;
-            }
-
-            XmlElement root = doc.DocumentElement;
-            if (root == null)
-                return;
-            foreach (XmlNode node in root.ChildNodes)
-            {
-                XmlElement elem = node as XmlElement;
-                if (elem == null)
-                    continue;
-                try
-                {
-                    this[elem.Name] = elem.InnerText;
-                }
-                catch (ArgumentException)
-                {
-                    // ignored
-                }
-            }
-            WriteXmpp();
-        }
-
-        private Control FindComponentByTag(Control parent, string tag)
-        {
-            if ((string)parent.Tag == tag)
-                return parent;
-            if (parent.HasChildren)
-            {
-                foreach (Control c in parent.Controls)
-                {
-                    Control possible = FindComponentByTag(c, tag);
-                    if (possible != null)
-                        return possible;
-                }
-            }
-            return null;
-        }
-
-        private object GetControlValue(Control c)
-        {
-            if (c == null)
-                return null;
-            CheckBox chk = c as CheckBox;
-            if (chk != null)
-                return chk.Checked;
-            TextBox txt = c as TextBox;
-            if (txt != null)
-                return txt.Text;
-            ComboBox cmb = c as ComboBox;
-            if (cmb != null)
-                return cmb.SelectedItem;
-            NumericUpDown num = c as NumericUpDown;
-            if (num != null)
-                return (int)num.Value;
-            throw new ArgumentException("Control with no tag", c.Name);
-        }
-
-        private void SetControlValue(Control c, object val)
-        {
-            CheckBox chk = c as CheckBox;
-            if (chk != null)
-            {
-                if (val is bool)
-                    chk.Checked = (bool)val;
-                else if (val is string)
-                    chk.Checked = bool.Parse((string)val);
-                return;
-            }
-            TextBox txt = c as TextBox;
-            if (txt != null)
-            {
-                txt.Text = (string)val;
-                return;
-            }
-            ComboBox cmb = c as ComboBox;
-            if (cmb != null)
-            {
-                if (cmb.SelectedItem.GetType().IsAssignableFrom(val.GetType()))
-                    cmb.SelectedItem = val;
-                else if (val is string)
-                {
-                    cmb.SelectedItem = Enum.Parse(cmb.SelectedItem.GetType(), (string)val);
-                }
-                return;
-            }
-            NumericUpDown num = c as NumericUpDown;
-            if (num != null)
-            {
-                if (val is int)
-                    num.Value = (int)val;
-                else if (val is string)
-                {
-                    num.Value = int.Parse((string)val);
-                }
-
-                return;
-            }
-        }
-
-        /// <summary>
-        /// Set/Get the value of an option, as it currently exists in a control.
-        /// </summary>
-        /// <param name="option"></param>
-        /// <returns></returns>
-        public object this[string option]
-        {
-            get
-            {
-                Control c = FindComponentByTag(this, option);
-                if (c == null)
-                {
-                    if (m_extra.Contains(option))
-                        return m_extra[option];
-                    return null;
-                }
-                return GetControlValue(c);
-            }
-            set
-            {
-                Control c = FindComponentByTag(this, option);
-                if (c == null)
-                {
-                    //throw new ArgumentException("Unknown option", option);
-                    m_extra[option] = value;
-                }
-                else
-                    SetControlValue(c, value);
-            }
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.tip = new System.Windows.Forms.ToolTip(this.components);
-            this.error = new System.Windows.Forms.ErrorProvider(this);
-            this.panel1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.CausesValidation = false;
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(228, 8);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(48, 23);
-            this.btnCancel.TabIndex = 1;
-            this.btnCancel.Text = "Cancel";
-            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
-            //
-            // btnOK
-            //
-            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnOK.Location = new System.Drawing.Point(172, 8);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(48, 23);
-            this.btnOK.TabIndex = 0;
-            this.btnOK.Text = "OK";
-            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
-            //
-            // panel1
-            //
-            this.panel1.CausesValidation = false;
-            this.panel1.Controls.Add(this.btnCancel);
-            this.panel1.Controls.Add(this.btnOK);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel1.Location = new System.Drawing.Point(0, 226);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(292, 40);
-            this.panel1.TabIndex = 1000;
-            //
-            // error
-            //
-            this.error.ContainerControl = this;
-            //
-            // OptionForm
-            //
-            this.AcceptButton = this.btnOK;
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(292, 266);
-            this.Controls.Add(this.panel1);
-            this.Name = "OptionForm";
-            this.Text = "OptionForm";
-            this.Load += new System.EventHandler(this.OptionForm_Load);
-            this.panel1.ResumeLayout(false);
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-        /// <summary>
-        /// This field is required.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected void Required(object sender, System.ComponentModel.CancelEventArgs e)
-        {
-            TextBox box = (TextBox)sender;
-            if (!box.Enabled)
-                return;
-            if ((box.Text == null) || (box.Text == ""))
-            {
-                e.Cancel = true;
-                error.SetError(box, "Required");
-            }
-        }
-
-        /// <summary>
-        /// Clear any error blinkies.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        public void ClearError(object sender, System.EventArgs e)
-        {
-            error.SetError((Control)sender, "");
-        }
-
-        private void btnOK_Click(object sender, EventArgs e)
-        {
-            if (!this.ValidateChildren())
-                return;
-
-            WriteXmpp();
-
-            this.DialogResult = DialogResult.OK;
-            this.Close();
-        }
-
-        private void btnCancel_Click(object sender, EventArgs e)
-        {
-            this.DialogResult = DialogResult.Cancel;
-            this.Close();
-        }
-
-        private void OptionForm_Load(object sender, EventArgs e)
-        {
-            if (!DesignMode)
-                ReadXmpp();
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/RosterTree.cs b/lib/jabber-net/muzzle/RosterTree.cs
deleted file mode 100644
index 4a69e36..0000000
--- a/lib/jabber-net/muzzle/RosterTree.cs
+++ /dev/null
@@ -1,699 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Drawing;
-using System.Diagnostics;
-using System.Windows.Forms;
-
-using bedrock.collections;
-using bedrock.util;
-using jabber;
-using jabber.client;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace muzzle
-{
-    /// <summary>
-    /// A TreeView optimized for showing Jabber roster items.  Make sure that the
-    /// form you drop this on has a JabberClient, a PresenceManager, and a RosterManager
-    /// on the form first, and this widget will automatically connect to them.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class RosterTree : System.Windows.Forms.TreeView
-    {
-        // image list offsets
-        private const int OFFLINE    = 0;
-        private const int ONLINE     = 1;
-        private const int AWAY       = 2;
-        private const int XA         = 3;
-        private const int DND        = 4;
-        private const int CHATTY     = 5;
-        private const int EXPANDED   = 6;
-        private const int COLLAPSED  = 7;
-
-        private const string UNFILED = "Unfiled";
-
-        private RosterManager   m_roster = null;
-        private PresenceManager m_pres   = null;
-        private JabberClient    m_client = null;
-
-        private IDictionary m_groups = new SkipList();
-        private IDictionary m_items  = new SkipList();
-
-        private System.Windows.Forms.ImageList il;
-        private System.Windows.Forms.ToolTip tt;
-        private Color m_statusColor = Color.Teal;
-
-        private System.ComponentModel.IContainer components;
-
-        /// <summary>
-        /// Create a new RosterTree
-        /// </summary>
-        public RosterTree()
-        {
-            // This call is required by the Windows.Forms Form Designer.
-            InitializeComponent();
-            this.ImageIndex = 1;
-            this.ImageList = il;
-            this.ShowRootLines = false;
-            this.ShowLines = false;
-            this.Sorted = true;
-
-            this.AllowDrop = true;
-            this.ItemDrag += new ItemDragEventHandler(RosterTree_ItemDrag);
-            this.DragEnter += new DragEventHandler(RosterTree_DragEnter);
-            this.DragOver += new DragEventHandler(RosterTree_DragOver);
-            this.DragDrop += new DragEventHandler(RosterTree_DragDrop);
-            this.AfterSelect += new TreeViewEventHandler(RosterTree_AfterSelect);
-            this.DrawMode = TreeViewDrawMode.OwnerDrawText;
-            this.DrawNode += new DrawTreeNodeEventHandler(RosterTree_DrawNode);
-        }
-
-        private void RosterTree_AfterSelect(object sender, TreeViewEventArgs e)
-        {
-        }
-
-        private void DrawGroup(DrawTreeNodeEventArgs e)
-        {
-            GroupNode node = (GroupNode)e.Node;
-            string counts = String.Format("({0}/{1})", node.Current, node.Total);
-
-            if (node.IsSelected)
-            {
-                string newText = node.GroupName + " " + counts;
-                e.DrawDefault = true;
-                if (node.Text != newText)
-                    node.Text = newText;
-                return;
-            }
-            Graphics g = e.Graphics;
-            Brush fg = new SolidBrush(this.ForeColor);
-            Brush stat_fg = new SolidBrush(this.StatusColor);
-
-            g.DrawString(node.GroupName, this.Font, fg, new Point(e.Bounds.Left, e.Bounds.Top), StringFormat.GenericTypographic);
-            if (node.Total > 0)
-            {
-                SizeF name_size = g.MeasureString(node.GroupName, this.Font);
-                g.DrawString(counts, this.Font, stat_fg, new PointF(e.Bounds.Left + name_size.Width, e.Bounds.Top), StringFormat.GenericTypographic);
-            }
-        }
-
-        private void DrawItem(DrawTreeNodeEventArgs e)
-        {
-            ItemNode node = (ItemNode)e.Node;
-            if (node.IsSelected)
-            {
-                e.DrawDefault = true;
-                return;
-            }
-
-            Graphics g = e.Graphics;
-            Brush fg = new SolidBrush(this.ForeColor);
-            Brush stat_fg = new SolidBrush(this.StatusColor);
-
-            g.DrawString(node.Nickname, this.Font, fg, new Point(e.Bounds.Left, e.Bounds.Top), StringFormat.GenericTypographic);
-            if (node.Status != null)
-            {
-                SizeF nick_size = g.MeasureString(node.Nickname, this.Font);
-                g.DrawString("(" + node.Status + ")", this.Font, stat_fg, new PointF(e.Bounds.Left + nick_size.Width, e.Bounds.Top), StringFormat.GenericTypographic);
-            }
-        }
-
-
-        private void RosterTree_DrawNode(object sender, DrawTreeNodeEventArgs e)
-        {
-            if (e.Node is GroupNode)
-                DrawGroup(e);
-            else if (e.Node is ItemNode)
-                DrawItem(e);
-            else
-                e.DrawDefault = true; // or assert(false)
-        }
-
-        private GroupNode GetDropGroup(DragEventArgs e)
-        {
-            if (!e.Data.GetDataPresent(typeof(ItemNode)))
-                return null;
-
-            Point pt = this.PointToClient(new Point(e.X, e.Y));
-            TreeNode node = this.GetNodeAt(pt);
-            while (!(node is GroupNode) && (node != null))
-            {
-                node = node.Parent;
-            }
-            if (node == null)
-                return null;
-
-            ItemNode item = e.Data.GetData(typeof(ItemNode)) as ItemNode;
-            if (item.Parent == node)
-                return null;
-            return (GroupNode)node;
-        }
-
-        private void RosterTree_DragDrop(object sender, DragEventArgs e)
-        {
-            GroupNode group = GetDropGroup(e);
-            if (group == null)
-                return;
-            ItemNode item = e.Data.GetData(typeof(ItemNode)) as ItemNode;
-            GroupNode parent = (GroupNode)item.Parent;
-            Item i = (Item)item.Item.CloneNode(true, m_client.Document);
-            i.RemoveGroup(parent.GroupName);
-            i.AddGroup(group.GroupName);
-            m_roster.Modify(i);
-        }
-
-
-        private void RosterTree_DragOver(object sender, DragEventArgs e)
-        {
-            if (GetDropGroup(e) == null)
-                e.Effect = DragDropEffects.None;
-            else
-                e.Effect = DragDropEffects.Move;
-        }
-
-
-        private void RosterTree_DragEnter(object sender, DragEventArgs e)
-        {
-            if (e.Data.GetDataPresent(typeof(ItemNode)))
-                e.Effect = DragDropEffects.Move;
-            else
-                e.Effect = DragDropEffects.None;
-        }
-
-        private void RosterTree_ItemDrag(object sender, ItemDragEventArgs e)
-        {
-            if (e.Item is ItemNode)
-                this.DoDragDrop(e.Item, DragDropEffects.Move);
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RosterTree));
-            this.il = new System.Windows.Forms.ImageList(this.components);
-            this.tt = new System.Windows.Forms.ToolTip(this.components);
-            this.SuspendLayout();
-            //
-            // il
-            //
-            this.il.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("il.ImageStream")));
-            this.il.TransparentColor = System.Drawing.Color.Magenta;
-            this.il.Images.SetKeyName(0, "");
-            this.il.Images.SetKeyName(1, "");
-            this.il.Images.SetKeyName(2, "");
-            this.il.Images.SetKeyName(3, "");
-            this.il.Images.SetKeyName(4, "");
-            this.il.Images.SetKeyName(5, "");
-            this.il.Images.SetKeyName(6, "");
-            this.il.Images.SetKeyName(7, "");
-            this.il.Images.SetKeyName(8, "blank");
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-        /// <summary>
-        /// The RosterManager for this view
-        /// </summary>
-        [Category("Managers")]
-        public RosterManager RosterManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a RosterManager
-                if ((m_roster == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.RosterManager = (RosterManager)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(RosterManager));
-                }
-                return m_roster;
-            }
-            set
-            {
-                if ((object)m_roster == (object)value)
-                    return;
-                m_roster = value;
-                if (m_roster != null)
-                {
-                    m_roster.OnRosterBegin += new bedrock.ObjectHandler(m_roster_OnRosterBegin);
-                    m_roster.OnRosterEnd += new bedrock.ObjectHandler(m_roster_OnRosterEnd);
-                    m_roster.OnRosterItem += new RosterItemHandler(m_roster_OnRosterItem);
-                }
-            }
-        }
-
-        /// <summary>
-        /// The PresenceManager for this view
-        /// </summary>
-        [Category("Managers")]
-        public PresenceManager PresenceManager
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a PresenceManager
-                if ((m_pres == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost) base.GetService(typeof(IDesignerHost));
-                    this.PresenceManager = (PresenceManager)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(PresenceManager));
-                }
-                return m_pres;
-            }
-            set
-            {
-                if ((object)m_pres == (object)value)
-                    return;
-                m_pres = value;
-                if (m_pres != null)
-                    m_pres.OnPrimarySessionChange += new PrimarySessionHandler(m_pres_OnPrimarySessionChange);
-            }
-        }
-
-        /// <summary>
-        /// The PresenceManager for this view
-        /// </summary>
-        [Category("Managers")]
-        public JabberClient Client
-        {
-            get
-            {
-                // If we are running in the designer, let's try to auto-hook a JabberClient
-                if ((m_client == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost) base.GetService(typeof(IDesignerHost));
-                    this.Client = (JabberClient)jabber.connection.StreamComponent.GetComponentFromHost(host, typeof(JabberClient));
-                }
-                return m_client;
-            }
-            set
-            {
-                if ((object)m_client == (object)value)
-                    return;
-                m_client = value;
-                if (m_client != null)
-                    m_client.OnDisconnect += new bedrock.ObjectHandler(m_client_OnDisconnect);
-            }
-        }
-
-        /// <summary>
-        /// Color to draw status text with.  Not applicable until .Net 2.0.
-        /// </summary>
-        [Category("Appearance")]
-        public Color StatusColor
-        {
-            get { return m_statusColor; }
-            set { m_statusColor = value; }
-        }
-
-        /// <summary>
-        /// Should we draw status text next to each roster item?  Not applicable until .Net 2.0.
-        /// </summary>
-        [Category("Appearance")]
-        [DefaultValue(true)]
-        public bool DrawStatus
-        {
-            get
-            {
-                return (this.DrawMode == TreeViewDrawMode.OwnerDrawText);
-            }
-            set
-            {
-                if (value)
-                    this.DrawMode = TreeViewDrawMode.OwnerDrawText;
-                else
-                    this.DrawMode = TreeViewDrawMode.Normal;
-            }
-        }
-
-        /// <summary>
-        /// The group names for the roster
-        /// </summary>
-        public string[] Groups
-        {
-            get
-            {
-                string[] g = new string[m_groups.Count];
-                m_groups.Keys.CopyTo(g, 0);
-                return g;
-            }
-        }
-
-        /// <summary>
-        /// Add a new, empty group, if this group doesn't exist, otherwise a no-op.
-        /// </summary>
-        /// <param name="groupName"></param>
-        public TreeNode AddGroup(string groupName)
-        {
-            Group g = new Group(m_client.Document);
-            g.GroupName = groupName;
-            return AddGroupNode(g);
-        }
-
-        private void m_roster_OnRosterBegin(object sender)
-        {
-            this.BeginUpdate();
-        }
-
-        private void m_roster_OnRosterEnd(object sender)
-        {
-            this.EndUpdate();
-        }
-
-        /// <summary>
-        /// After a group node is expanded, change to the down-triangle image.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnAfterExpand(TreeViewEventArgs e)
-        {
-            e.Node.ImageIndex = EXPANDED;
-            e.Node.SelectedImageIndex = EXPANDED;
-
-            base.OnAfterExpand (e);
-        }
-
-        /// <summary>
-        /// After a group node is collapsed, change to the right-triangle image.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnAfterCollapse(TreeViewEventArgs e)
-        {
-            e.Node.ImageIndex = COLLAPSED;
-            e.Node.SelectedImageIndex = COLLAPSED;
-
-            base.OnAfterCollapse (e);
-        }
-
-        /// <summary>
-        /// When mousing over a node, show a tooltip with the full JID.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnMouseMove(MouseEventArgs e)
-        {
-            base.OnMouseMove(e);
-            ItemNode node = this.GetNodeAt(e.X, e.Y) as ItemNode;
-            if (node == null)
-            { // none selected, or a group
-                tt.SetToolTip(this, "");
-                return;
-            }
-            if (node.JID.ToString() != tt.GetToolTip(this))
-            {
-                tt.SetToolTip(this, node.JID.ToString());
-            }
-        }
-
-        private GroupNode AddGroupNode(Group g)
-        {
-            GroupNode gn = (GroupNode)m_groups[g.GroupName];
-            if (gn == null)
-            {
-                gn = new GroupNode(g);
-                m_groups.Add(g.GroupName, gn);
-                this.Nodes.Add(gn);
-            }
-            return gn;
-        }
-
-        private void m_roster_OnRosterItem(object sender, jabber.protocol.iq.Item ri)
-        {
-            bool remove = (ri.Subscription == Subscription.remove);
-
-            LinkedList nodelist = (LinkedList)m_items[ri.JID.ToString()];
-            if (nodelist == null)
-            {
-                // First time through.
-                if (!remove)
-                {
-                    nodelist = new LinkedList();
-                    m_items.Add(ri.JID.ToString(), nodelist);
-                }
-            }
-            else
-            {
-                // update to an existing item.  remove all of them, and start over.
-                foreach (ItemNode i in nodelist)
-                {
-                    GroupNode gn = i.Parent as GroupNode;
-                    i.Remove();
-                    if ((gn != null) && (gn.Nodes.Count == 0))
-                    {
-                        m_groups.Remove(gn.GroupName);
-                        gn.Remove();
-                    }
-                }
-                nodelist.Clear();
-                if (remove)
-                    m_items.Remove(ri.JID.ToString());
-            }
-
-            if (remove)
-                return;
-
-            // add the new ones back
-            Hashtable ghash = new Hashtable();
-            Group[] groups = ri.GetGroups();
-            for (int i=groups.Length-1; i>=0; i--)
-            {
-                if (groups[i].GroupName == "")
-                    groups[i].GroupName = UNFILED;
-            }
-
-            if (groups.Length == 0)
-            {
-                groups = new Group[] { new Group(ri.OwnerDocument) };
-                groups[0].GroupName = UNFILED;
-            }
-
-            foreach (Group g in groups)
-            {
-                GroupNode gn = AddGroupNode(g);
-                // might have the same group twice.
-                if (ghash.Contains(g.GroupName))
-                    continue;
-                ghash.Add(g.GroupName, g);
-
-                ItemNode i = new ItemNode(ri);
-                i.ChangePresence(m_pres[ri.JID]);
-                nodelist.Add(i);
-                gn.Nodes.Add(i);
-            }
-        }
-
-        private void m_client_OnDisconnect(object sender)
-        {
-            this.Nodes.Clear();
-            m_groups.Clear();
-            m_items.Clear();
-        }
-
-
-        private void m_pres_OnPrimarySessionChange(object sender, JID bare)
-        {
-            Presence pres = m_pres[bare];
-            LinkedList nodelist = (LinkedList) m_items[bare.ToString()];
-            if (nodelist == null)
-                return;
-
-            foreach (ItemNode n in nodelist)
-            {
-                n.ChangePresence(pres);
-            }
-        }
-
-
-        /// <summary>
-        /// A TreeNode to hold a Roster Group
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class GroupNode : TreeNode
-        {
-            private jabber.protocol.iq.Group m_group;
-
-            /// <summary>
-            /// Create a GroupNode
-            /// </summary>
-            /// <param name="rg"></param>
-            public GroupNode(jabber.protocol.iq.Group rg) : base(rg.GroupName, COLLAPSED, COLLAPSED)
-            {
-                m_group = rg;
-            }
-
-            /// <summary>
-            /// The name of the group
-            /// </summary>
-            public string GroupName
-            {
-                get { return m_group.GroupName; }
-            }
-
-            /// <summary>
-            /// Total number of members of the group
-            /// </summary>
-            public int Total
-            {
-                // TODO: what if we're not showing offline?
-                get { return this.Nodes.Count; }
-            }
-
-            /// <summary>
-            /// Current number of online members of the group
-            /// </summary>
-            public int Current
-            {
-                get
-                {
-                    int count = 0;
-                    foreach (ItemNode i in this.Nodes)
-                    {
-                        if (i.ImageIndex != OFFLINE)
-                            count++;
-                    }
-                    return count;
-                }
-            }
-        }
-
-        /// <summary>
-        /// A TreeNode to hold a RosterItem
-        /// </summary>
-        [SVN(@"$Id$")]
-        public class ItemNode : TreeNode
-        {
-            private jabber.protocol.iq.Item m_item;
-            private string m_status = null;
-            private string m_nick = null;
-
-            /// <summary>
-            /// Create an ItemNode
-            /// </summary>
-            /// <param name="ri">The roster item to create from</param>
-            public ItemNode(jabber.protocol.iq.Item ri)
-            {
-                m_item = ri;
-                m_nick = ri.Nickname;
-                if ((m_nick == null) || (m_nick == ""))
-                {
-                    m_nick = ri.JID.User;
-                    if ((m_nick == null) || (m_nick == ""))
-                        m_nick = ri.JID.ToString(); // punt.
-                }
-                this.Text = m_nick;
-            }
-
-            /// <summary>
-            /// The JID of this Roster Item
-            /// </summary>
-            public JID JID
-            {
-                get { return m_item.JID; }
-            }
-
-            /// <summary>
-            /// Roster nickname for this user.
-            /// </summary>
-            public string Nickname
-            {
-                get { return m_nick; }
-            }
-
-            /// <summary>
-            /// Last presence status for this item
-            /// </summary>
-            public string Status
-            {
-                get { return m_status; }
-            }
-
-            /// <summary>
-            /// The roster item.  Please make a clone before using it.
-            /// </summary>
-            public Item Item
-            {
-                get { return m_item; }
-            }
-
-            /// <summary>
-            /// Update this roster item with new presence information
-            /// </summary>
-            /// <param name="p"></param>
-            public void ChangePresence(Presence p)
-            {
-                SelectedImageIndex = ImageIndex = getPresenceImage(p);
-
-                string txt = null;
-                if ((p == null) || (p.Status == null) || (p.Status == ""))
-                {
-                    txt = m_nick;
-                    m_status = null;
-                }
-                else
-                {
-                    m_status = p.Status;
-                    txt = m_nick + " (" + m_status + ")";
-                }
-                if (Text != txt)
-                    Text = txt;
-            }
-
-            private static int getPresenceImage(Presence p)
-            {
-                if ((p == null) || (p.Type == PresenceType.unavailable))
-                    return OFFLINE;
-
-                switch (p.Show)
-                {
-                    case null:
-                    case "":
-                        return ONLINE;
-                    case "away":
-                        return AWAY;
-                    case "xa":
-                        return XA;
-                    case "dnd":
-                        return DND;
-                    case "chat":
-                        return CHATTY;
-                }
-
-                return OFFLINE;
-            }
-        }
-
-    }
-}
diff --git a/lib/jabber-net/muzzle/StreamControl.cs b/lib/jabber-net/muzzle/StreamControl.cs
deleted file mode 100644
index 63cc8ec..0000000
--- a/lib/jabber-net/muzzle/StreamControl.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Text;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Xml;
-
-using bedrock.util;
-using jabber;
-using jabber.connection;
-using jabber.protocol.client;
-
-namespace muzzle
-{
-    /// <summary>
-    /// A UserControl that references an XmppStream.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StreamControl : System.Windows.Forms.UserControl
-    {
-        /// <summary>
-        /// The XmppStream for this control.  Set at design time when a subclass control is dragged onto a form.
-        /// </summary>
-        protected XmppStream m_stream = null;
-
-        /// <summary>
-        /// The XmppStream was changed.  Often at design time.  The object will be this StreamControl.
-        /// </summary>
-        public event bedrock.ObjectHandler OnStreamChanged;
-
-        /// <summary>
-        /// The JabberClient or JabberService to hook up to.
-        /// </summary>
-        [Description("The JabberClient or JabberService to hook up to.")]
-        [Category("Jabber")]
-        public virtual XmppStream Stream
-        {
-            get
-            {
-                // If we are running in the designer, let's try to get an XmppStream control
-                // from the environment.
-                if ((this.m_stream == null) && DesignMode)
-                {
-                    IDesignerHost host = (IDesignerHost)base.GetService(typeof(IDesignerHost));
-                    this.Stream = StreamComponent.GetStreamFromHost(host);
-                }
-                return m_stream;
-            }
-            set
-            {
-                if ((object)m_stream != (object)value)
-                {
-                    m_stream = value;
-                    if (OnStreamChanged != null)
-                        OnStreamChanged(this);
-                }
-            }
-        }
-
-        private JID m_overrideFrom = null;
-
-        /// <summary>
-        /// Override the from address that will be stamped on outbound packets.
-        /// Unless your server implemets XEP-193, you shouldn't use this for 
-        /// client connections.
-        /// </summary>
-        public JID OverrideFrom
-        {
-            get { return m_overrideFrom; }
-            set { m_overrideFrom = value; }
-        }
-
-        /// <summary>
-        /// Write the specified stanza to the stream.
-        /// </summary>
-        /// <param name="elem"></param>
-        public void Write(XmlElement elem)
-        {
-            if ((m_overrideFrom != null) && (elem.GetAttribute("from") == ""))
-                elem.SetAttribute("from", m_overrideFrom);
-            m_stream.Write(elem);
-        }
-
-        ///<summary>
-        /// Does an asynchronous IQ call.
-        /// If the from address hasn't been set, and an OverrideFrom has been set,
-        /// the from address will be set to the value of OverrideFrom.
-        ///</summary>
-        ///<param name="iq">IQ packet to send.</param>
-        ///<param name="cb">Callback to execute when the result comes back.</param>
-        ///<param name="cbArg">Arguments to pass to the callback.</param>
-        public void BeginIQ(IQ iq, IqCB cb, object cbArg)
-        {
-            if ((m_overrideFrom != null) && (iq.From == null))
-                iq.From = m_overrideFrom;
-            m_stream.Tracker.BeginIQ(iq, cb, cbArg);
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/StripChart.cs b/lib/jabber-net/muzzle/StripChart.cs
deleted file mode 100644
index baa0539..0000000
--- a/lib/jabber-net/muzzle/StripChart.cs
+++ /dev/null
@@ -1,755 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
-using System.Diagnostics;
-using System.Threading;
-
-using bedrock.util;
-
-namespace muzzle
-{
-    /// <summary>
-    /// How should the chart be rendered?
-    /// </summary>
-    public enum ChartStyle
-    {
-        /// <summary>
-        /// Bar char
-        /// </summary>
-        Bar,
-        /// <summary>
-        /// Lines
-        /// </summary>
-        Line,
-        /// <summary>
-        /// Points
-        /// </summary>
-        Point
-    }
-
-    // TODO: Add vertical scrolling as an option.
-    /// <summary>
-    /// A StripChart is a scrolling window showing a set number of data points.
-    /// As new points are added, old points get shifted along.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class StripChart : System.Windows.Forms.UserControl
-    {
-        private bool       m_first     = true;
-        private float      m_min       = 0F;
-        private float      m_max       = 100F;
-        private float      m_last      = 0F;
-        private double     m_mean      = 0F;
-        private double     m_var_s     = 0F;
-        private long       m_count     = 0;
-
-        private int        m_hist      = 100;
-        private int        m_pointSize = 5;
-        private bool       m_auto      = true;
-        private bool       m_label     = true;
-        private bool       m_zero      = true;
-        private bool       m_showLast  = false;
-        private bool       m_showStats = false;
-        private string     m_title     = null;
-        private Queue      m_list      = new Queue(100);
-        private ChartStyle m_style     = ChartStyle.Bar;
-        private Color      m_textColor = Color.Red;
-        private Color      m_zeroColor = Color.Black;
-        private Color      m_statsColor = Color.Wheat;
-        private System.Windows.Forms.PictureBox pictureBox1;
-
-        private static float[] s_sampleData = new float[] {
-            .9800F,
-            .7572F,
-            .8259F,
-            .3314F,
-            .6175F,
-            .9606F,
-            .7810F,
-            .7958F,
-            .4636F,
-            .0264F };
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.Container components = null;
-
-        /// <summary>
-        /// Create a stripchart.
-        /// </summary>
-        public StripChart()
-        {
-            // This call is required by the Windows.Forms Form Designer.
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if( components != null )
-                    components.Dispose();
-            }
-            base.Dispose( disposing );
-        }
-
-        /// <summary>
-        /// Display the last value sent to the chart, in the upper right.
-        /// </summary>
-        [Description("Display the last value sent to the chart, in the upper right.")]
-        [DefaultValue(false)]
-        [Category("Chart")]
-        public bool ShowLastValue
-        {
-            get { return m_showLast; }
-            set
-            {
-                if (m_showLast != value)
-                {
-                    m_showLast = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Display the mean and standard deviation, graphically.
-        /// </summary>
-        [Description("Display the mean and standard deviation, graphically.")]
-        [DefaultValue(false)]
-        [Category("Chart")]
-        public bool ShowStatistics
-        {
-            get { return m_showStats; }
-            set
-            {
-                if (m_showStats != value)
-                {
-                    m_showStats = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Title to display in the chart.  Null for none.
-        /// </summary>
-        [Description("Title to display in the chart.  Null for none.")]
-        [DefaultValue(null)]
-        [Category("Chart")]
-        public string Title
-        {
-            get { return m_title; }
-            set
-            {
-                if (m_title != value)
-                {
-                    m_title = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// The size of points, when in point style.  Ignored otherwise.
-        /// </summary>
-        [Description("The size of points, when in point style.  Ignored otherwise.")]
-        [DefaultValue(5)]
-        [Category("Chart")]
-        public int PointSize
-        {
-            get
-            {
-                return m_pointSize;
-            }
-            set
-            {
-                if (m_pointSize != value)
-                {
-                    m_pointSize = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Chart drawing style.
-        /// </summary>
-        [Description("Chart drawing style")]
-        [DefaultValue(ChartStyle.Bar)]
-        [Category("Chart")]
-        public ChartStyle Style
-        {
-            get
-            {
-                return m_style;
-            }
-            set
-            {
-                if (m_style != value)
-                {
-                    m_style = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Initial minimum value shown
-        /// </summary>
-        [Description("Initial minimum value shown")]
-        [DefaultValue(0F)]
-        [Category("Chart")]
-        public float Min
-        {
-            get
-            {
-                return m_min;
-            }
-            set
-            {
-                if (m_min != value)
-                {
-                    m_min = value;
-                    DesignReDraw();
-                }
-            }
-        }
-        /// <summary>
-        /// Initial maximum value shown
-        /// </summary>
-        [Description("Initial maximum value shown")]
-        [DefaultValue(100F)]
-        [Category("Chart")]
-        public float Max
-        {
-            get
-            {
-                return m_max;
-            }
-            set
-            {
-                if (m_max != value)
-                {
-                    m_max = value;
-                    DesignReDraw();
-                }
-            }
-        }
-        /// <summary>
-        /// Reset min and max as necessary to show all points.
-        /// This must be set before adding any points.
-        /// </summary>
-        [Description("Reset min and max as necessary to show all points.  " +
-             "This must be set before adding any points.")]
-        [DefaultValue(true)]
-        [Category("Chart")]
-        public bool AutoScale
-        {
-            get
-            {
-                return m_auto;
-            }
-            set
-            {
-                m_auto = value;
-            }
-        }
-
-        /// <summary>
-        /// Draw labels with min and max of chart.  Useful with AutoSize set to true.
-        /// </summary>
-        [Description("Draw labels with min and max of chart.  Useful with AutoSize set to true.")]
-        [DefaultValue(true)]
-        [Category("Chart")]
-        public bool Labels
-        {
-            get
-            {
-                return m_label;
-            }
-            set
-            {
-                if (m_label != value)
-                {
-                    m_label = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Draw a line at zero?
-        /// </summary>
-        [Description("Draw a line at zero?")]
-        [DefaultValue(true)]
-        [Category("Chart")]
-        public bool ZeroLine
-        {
-            get
-            {
-                return m_zero;
-            }
-            set
-            {
-                if (m_zero != value)
-                {
-                    m_zero = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Number of points to show
-        /// </summary>
-        [Description("Number of points to show")]
-        [DefaultValue(100)]
-        [Category("Chart")]
-        public int History
-        {
-            get
-            {
-                return m_hist;
-            }
-            set
-            {
-                if (m_hist != value)
-                {
-                    m_hist = value;
-                    lock (m_list)
-                    {
-                        while (m_list.Count > m_hist)
-                            m_list.Dequeue();
-                    }
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Color to draw the min/max value in, if Labels is true
-        /// </summary>
-        [Description("Color to draw the min/max value in, if Labels is true")]
-        [DefaultValue("Red")]
-        [Category("Appearance")]
-        public Color TextColor
-        {
-            get
-            {
-                return m_textColor;
-            }
-            set
-            {
-                if (m_textColor != value)
-                {
-                    m_textColor = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Color to draw zero line in, if ZeroLine is true
-        /// </summary>
-        [Description("Color to draw zero line in, if ZeroLine is true")]
-        [DefaultValue("Black")]
-        [Category("Appearance")]
-        public Color ZeroColor
-        {
-            get
-            {
-                return m_zeroColor;
-            }
-            set
-            {
-                if (m_zeroColor != value)
-                {
-                    m_zeroColor = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Color to draw the min/max value in, if Labels is true
-        /// </summary>
-        [Description("Color to draw the standard deviation range in, if ShowStats is true")]
-        [DefaultValue("Wheat")]
-        [Category("Appearance")]
-        public Color StatsColor
-        {
-            get
-            {
-                return m_statsColor;
-            }
-            set
-            {
-                if (m_statsColor != value)
-                {
-                    m_statsColor = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-
-        /// <summary>
-        /// Foreground color
-        /// </summary>
-        public override Color ForeColor
-        {
-            get
-            {
-                return base.ForeColor;
-            }
-            set
-            {
-                if (base.ForeColor != value)
-                {
-                    base.ForeColor = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Background color
-        /// </summary>
-        public override Color BackColor
-        {
-            get
-            {
-                return base.BackColor;
-            }
-            set
-            {
-                if (base.BackColor != value)
-                {
-                    base.BackColor = value;
-                    pictureBox1.BackColor = value;
-                    DesignReDraw();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Add a point to the strip chart.  If more than the history size are already
-        /// in the chart, extras are dropped.
-        /// </summary>
-        /// <param name="val">The value to add</param>
-        public void AddPoint(float val)
-        {
-            lock (m_list)
-            {
-                while (m_list.Count >= m_hist)
-                    m_list.Dequeue();
-                m_list.Enqueue(val);
-            }
-            m_last = val;
-            if (m_auto)
-            {
-                if (val > m_max)
-                    m_max = val;
-                if (val < m_min)
-                    m_min = val;
-            }
-
-            if (m_showStats)
-            {
-                // See:  http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Algorithm_III
-                m_count++;
-                double delta = val - m_mean;
-                m_mean += delta / (double)m_count;
-                m_var_s += delta * (val - m_mean);
-            }
-            if (!DesignMode)
-                ReDraw();
-        }
-
-        /// <summary>
-        /// The last value inserted into the chart.
-        /// </summary>
-        [Browsable(false)]
-        public float Last
-        {
-            get { return m_last; }
-        }
-
-        /// <summary>
-        /// Clear all of the points from the chart
-        /// </summary>
-        public void Clear()
-        {
-            lock(m_list)
-                m_list.Clear();
-            ReDraw();
-        }
-
-        /// <summary>
-        /// Save the current image to the specified filename.
-        /// </summary>
-        /// <param name="filename"></param>
-        public void SaveTo(string filename)
-        {
-            pictureBox1.Image = ReDrawNoInvoke();
-            pictureBox1.Image.Save(filename);
-        }
-
-        private void DesignReDraw()
-        {
-            if (!DesignMode)
-                return;
-            lock (m_list)
-            {
-                bool cleanup = false;
-                double mean = m_mean;
-                double var_s = m_var_s;
-                if (m_list.Count == 0)
-                {
-                    cleanup = true;
-                    foreach (float x in s_sampleData)
-                        AddPoint(m_min + (x * (m_max - m_min)));
-                }
-                ExecReDraw();
-                if (cleanup)
-                {
-                    m_list.Clear();
-                    m_mean = mean;
-                    m_var_s = var_s;
-                }
-            }
-        }
-
-        private void ReDraw()
-        {
-            if (DesignMode)
-                ExecReDraw();
-            else
-            {
-                Thread t = new Thread(new ThreadStart(ExecReDraw));
-                t.IsBackground = true;
-                t.Start();
-            }
-        }
-
-        private delegate void BMCB(Bitmap bm);
-
-        private void BitBlt(Bitmap bm)
-        {
-            pictureBox1.Image = bm;
-        }
-
-        private Bitmap ReDrawNoInvoke()
-        {
-            Font font = this.Font;
-            int fh = font.Height + 2;
-
-            if ((this.Width == 0) || (this.Height == 0)) return null;
-
-            float    h  = this.Height - (2*fh);
-            float    w  = this.Width;
-            float    s  = m_max - m_min;
-            if (s <= float.Epsilon)
-                return null;
-
-            if ((this.Height <= 0) || (this.Width <= 0))
-                return null;
-
-            Bitmap   bm = new Bitmap(this.Width, this.Height);
-            Graphics g  = Graphics.FromImage(bm);
-            g.SmoothingMode     = SmoothingMode.AntiAlias;
-            g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
-            g.Clear(BackColor);
-            lock (m_list)
-            {
-                if (m_list.Count > 0)
-                {
-                    float stripw = w / ((float)m_hist - 1F);
-                    Debug.Assert(s != 0);
-                    float y   = 0F;
-                    int count = 0;
-
-                    // this is kinda ugly, because of the repeated code.
-                    // But it's better, perf-wise, than repeating the switch statement
-                    // every time through the loop.
-                    switch (m_style)
-                    {
-                    case ChartStyle.Bar:
-                        RectangleF[] rects = new RectangleF[m_list.Count];
-                        foreach (float val in m_list)
-                        {
-                            y = h * (1 - (val - m_min) / s) + fh;
-                            rects[count] = new RectangleF(count * stripw, y, stripw, h - y);
-                            count++;
-                        }
-                        g.FillRectangles(new SolidBrush(ForeColor), rects);
-                        break;
-                    case ChartStyle.Point:
-                        Brush brush = new SolidBrush(ForeColor);
-                        float p2 = fh - (m_pointSize / 2F);
-                        foreach (float val in m_list)
-                        {
-                            y = h * (1 - (val - m_min) / s) + p2;
-                            g.FillEllipse(brush, count * stripw, y, m_pointSize, m_pointSize);
-                            count++;
-                        }
-                        break;
-                    case ChartStyle.Line:
-                        if (m_list.Count > 1)
-                        {
-                            PointF[] points = new PointF[m_list.Count];
-                            foreach (float val in m_list)
-                            {
-                                y = h * (1 - (val - m_min) / s) + fh;
-                                points[count] = new PointF(count * stripw, y);
-                                count++;
-                            }
-                            g.DrawLines(new Pen(ForeColor), points);
-                        }
-                        break;
-                    }
-                }
-            }
-            Brush textBrush = new SolidBrush(m_textColor);
-
-            if (m_zero)
-            {
-                float y = h * (1 + m_min / s) + fh;
-                g.DrawLine(new Pen(m_zeroColor, 1F), 0, y, w, y);
-            }
-            if (m_showStats)
-            {
-                float y = (float)(h * (1 - (m_mean - m_min) / s) + fh);
-                Color stats_color = Color.FromArgb(120, m_zeroColor);
-                Pen stats_pen = new Pen(stats_color, 1.0F);
-                stats_pen.DashStyle = DashStyle.Dash;
-                g.DrawLine(stats_pen, 0, y, w, y);
-                if (m_count > 1)
-                {
-                    stats_pen.DashStyle = DashStyle.Dot;
-                    double stddev = Math.Sqrt(m_var_s / (m_count - 1));
-                    y = (float)(h * (1 - (m_mean + stddev - m_min) / s) + fh);
-                    g.DrawLine(stats_pen, 0, y, w, y);
-                    y = (float)(h * (1 - (m_mean - stddev - m_min) / s) + fh);
-                    g.DrawLine(stats_pen, 0, y, w, y);
-
-                    Brush b = new SolidBrush(Color.FromArgb(120, m_statsColor));
-                    float std = (float)(2.0F * h * (stddev / s));
-                    g.FillRectangle(b, 0, y - std, w, std);
-                }
-            }
-            if (m_label)
-            {
-                g.DrawString(m_min.ToString(), font, textBrush, 2, h + fh);
-                g.DrawString(m_max.ToString(), font, textBrush, 2, 2);
-            }
-            if (m_showLast)
-            {
-                string last = m_last.ToString();
-                float fw = g.MeasureString(last, font).Width + 2;
-                g.DrawString(last, font, textBrush, (w - fw), 2);
-            }
-            if (m_title != null)
-            {
-                float fw = g.MeasureString(m_title, font).Width;
-                g.DrawString(m_title, font, textBrush, (w - fw)/2F, 2);
-            }
-            return bm;
-        }
-
-        private void ExecReDraw()
-        {
-            Bitmap bm = ReDrawNoInvoke();
-            if (bm == null)
-                return;
-
-            if (this.IsHandleCreated)
-            {
-                if (this.InvokeRequired)
-                    Invoke(new BMCB(BitBlt), new object[] { bm });
-                else
-                    BitBlt(bm);
-            }
-        }
-
-        #region Component Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            this.SuspendLayout();
-            //
-            // pictureBox1
-            //
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(150, 150);
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);
-            //
-            // StripChart
-            //
-            this.Controls.Add(this.pictureBox1);
-            this.Name = "StripChart";
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-        /// <summary>
-        /// The control has been resized.  Redraw.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnResize(System.EventArgs e)
-        {
-            base.OnResize(e);
-            ReDraw();
-        }
-        /// <summary>
-        /// Control has been loaded.  Redraw.
-        /// </summary>
-        /// <param name="e"></param>
-        protected override void OnLoad(System.EventArgs e)
-        {
-            ReDraw();
-        }
-
-        private void pictureBox1_Paint(object sender, PaintEventArgs e)
-        {
-            if (!m_first)
-                return;
-            m_first = false;
-            ReDraw();
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/XDataForm.cs b/lib/jabber-net/muzzle/XDataForm.cs
deleted file mode 100644
index 1103200..0000000
--- a/lib/jabber-net/muzzle/XDataForm.cs
+++ /dev/null
@@ -1,715 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Text.RegularExpressions;
-using System.Xml;
-
-using bedrock.util;
-
-using jabber.protocol;
-using jabber.protocol.x;
-using jabber.protocol.client;
-using Msg = jabber.protocol.client.Message;
-using System.Diagnostics;
-
-namespace muzzle
-{
-    /// <summary>
-    /// Summary description for XData.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XDataForm : System.Windows.Forms.Form
-    {
-        private static Regex WS = new Regex("\\s+", RegexOptions.Compiled);
-
-        private Packet      m_stanza = null;
-        private Element     m_parent = null;
-        private FormField[] m_fields = null;
-        private XDataType   m_type;
-
-        private System.Windows.Forms.Panel panel1;
-        private System.Windows.Forms.Button btnCancel;
-        private System.Windows.Forms.Button btnOK;
-        private System.Windows.Forms.Label lblInstructions;
-        private System.Windows.Forms.Panel pnlFields;
-        private System.Windows.Forms.ErrorProvider error;
-        private System.Windows.Forms.ToolTip tip;
-        private System.Windows.Forms.Panel panel2;
-        private System.Windows.Forms.Panel panel3;
-        private System.ComponentModel.IContainer components;
-
-        /// <summary>
-        /// Create an x:data form with no contents.
-        /// </summary>
-        public XDataForm()
-        {
-            //
-            // Required for Windows Form Designer support
-            //
-            InitializeComponent();
-        }
-
-        /// <summary>
-        /// Create an x:data form from the given message stanza.
-        /// </summary>
-        /// <param name="parent">Original stanza</param>
-        public XDataForm(jabber.protocol.client.Message parent) : this(FindData(parent) as jabber.protocol.x.Data)
-        {
-            m_stanza = (Packet) parent.CloneNode(true);
-            Data d = FindData(m_stanza);
-            Debug.Assert(d != null);
-            m_parent = (Element)d.ParentNode;
-            m_parent.RemoveChild(d);
-        }
-
-        /// <summary>
-        /// Create an x:data form from the given iq stanza.
-        /// </summary>
-        /// <param name="parent">Original stanza</param>
-        public XDataForm(jabber.protocol.client.IQ parent) : this(FindData(parent))
-        {
-            m_stanza = (Packet) parent.CloneNode(true);
-            Data d = FindData(m_stanza);
-            m_parent = (Element)d.ParentNode;
-            m_parent.RemoveChild(d);
-        }
-
-        private static jabber.protocol.x.Data FindData(Element el)
-        {
-            if (el is Data)
-                return (Data)el;
-            foreach (Element c in el.GetElements<Element>())
-            {
-                Data d = FindData(c);
-                if (d != null)
-                    return d;
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Create an x:data form from the given XML form description
-        /// </summary>
-        /// <param name="x">x:data form to render</param>
-        public XDataForm(jabber.protocol.x.Data x) : this()
-        {
-            if (x == null)
-                throw new ArgumentException("x:data form must not be null", "x");
-
-            m_type = x.Type;
-
-            this.SuspendLayout();
-            if (x.Title != null)
-                this.Text = x.Title;
-            if (m_type == XDataType.cancel)
-            {
-                lblInstructions.Text = "Form canceled.";  // TODO: Localize!
-                lblInstructions.Resize += new EventHandler(lblInstructions_Resize);
-                lblInstructions_Resize(lblInstructions, null);
-            }
-            else if (x.Instructions == null)
-                lblInstructions.Visible = false;
-            else
-            {
-                lblInstructions.Text = DeWhitespace(x.Instructions);
-                lblInstructions.Resize += new EventHandler(lblInstructions_Resize);
-                lblInstructions_Resize(lblInstructions, null);
-            }
-
-            pnlFields.SuspendLayout();
-            Field[] fields = x.GetFields();
-            m_fields = new FormField[fields.Length];
-            for (int i=fields.Length-1; i>=0; i--)
-            {
-                m_fields[i] = new FormField(fields[i], this, i);
-            }
-
-            panel1.TabIndex = fields.Length;
-
-            if (m_type != XDataType.form)
-            {
-                btnOK.Location = btnCancel.Location;
-                btnCancel.Visible = false;
-            }
-
-            pnlFields.ResumeLayout(true);
-            this.ResumeLayout(true);
-
-            for (int i=0; i<fields.Length; i++)
-            {
-                if ((fields[i].Type != FieldType.hidden) &&
-                    (fields[i].Type != FieldType.Fixed))
-                    m_fields[i].Focus();
-            }
-        }
-
-        private string DeWhitespace(string input)
-        {
-            return WS.Replace(input, " ");
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        protected override void Dispose( bool disposing )
-        {
-            if( disposing )
-            {
-                if(components != null)
-                {
-                    components.Dispose();
-                }
-            }
-            base.Dispose( disposing );
-        }
-
-        #region Windows Form Designer generated code
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            this.panel1 = new System.Windows.Forms.Panel();
-            this.panel2 = new System.Windows.Forms.Panel();
-            this.btnCancel = new System.Windows.Forms.Button();
-            this.btnOK = new System.Windows.Forms.Button();
-            this.lblInstructions = new System.Windows.Forms.Label();
-            this.pnlFields = new System.Windows.Forms.Panel();
-            this.error = new System.Windows.Forms.ErrorProvider();
-            this.tip = new System.Windows.Forms.ToolTip(this.components);
-            this.panel3 = new System.Windows.Forms.Panel();
-            this.panel1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // panel1
-            //
-            this.panel1.CausesValidation = false;
-            this.panel1.Controls.Add(this.panel2);
-            this.panel1.Controls.Add(this.btnCancel);
-            this.panel1.Controls.Add(this.btnOK);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.panel1.Location = new System.Drawing.Point(0, 232);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(292, 34);
-            this.panel1.TabIndex = 2;
-            //
-            // panel2
-            //
-            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel2.Location = new System.Drawing.Point(0, 0);
-            this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(292, 4);
-            this.panel2.TabIndex = 2;
-            //
-            // btnCancel
-            //
-            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnCancel.CausesValidation = false;
-            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(212, 7);
-            this.btnCancel.Name = "btnCancel";
-            this.btnCancel.TabIndex = 1;
-            this.btnCancel.Text = "Cancel";
-            //
-            // btnOK
-            //
-            this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-            this.btnOK.Location = new System.Drawing.Point(132, 7);
-            this.btnOK.Name = "btnOK";
-            this.btnOK.TabIndex = 0;
-            this.btnOK.Text = "OK";
-            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
-            //
-            // lblInstructions
-            //
-            this.lblInstructions.BackColor = System.Drawing.SystemColors.Control;
-            this.lblInstructions.Dock = System.Windows.Forms.DockStyle.Top;
-            this.lblInstructions.ForeColor = System.Drawing.SystemColors.HotTrack;
-            this.lblInstructions.Location = new System.Drawing.Point(0, 0);
-            this.lblInstructions.Name = "lblInstructions";
-            this.lblInstructions.Size = new System.Drawing.Size(292, 16);
-            this.lblInstructions.TabIndex = 1;
-            //
-            // pnlFields
-            //
-            this.pnlFields.AutoScroll = true;
-            this.pnlFields.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pnlFields.DockPadding.Bottom = 3;
-            this.pnlFields.DockPadding.Left = 6;
-            this.pnlFields.DockPadding.Right = 6;
-            this.pnlFields.DockPadding.Top = 3;
-            this.pnlFields.Location = new System.Drawing.Point(0, 20);
-            this.pnlFields.Name = "pnlFields";
-            this.pnlFields.Size = new System.Drawing.Size(292, 212);
-            this.pnlFields.TabIndex = 0;
-            //
-            // error
-            //
-            this.error.ContainerControl = this;
-            //
-            // panel3
-            //
-            this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel3.Location = new System.Drawing.Point(0, 16);
-            this.panel3.Name = "panel3";
-            this.panel3.Size = new System.Drawing.Size(292, 4);
-            this.panel3.TabIndex = 3;
-            //
-            // XDataForm
-            //
-            this.AcceptButton = this.btnOK;
-            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-            this.CancelButton = this.btnCancel;
-            this.ClientSize = new System.Drawing.Size(292, 266);
-            this.ControlBox = false;
-            this.Controls.Add(this.pnlFields);
-            this.Controls.Add(this.panel3);
-            this.Controls.Add(this.panel1);
-            this.Controls.Add(this.lblInstructions);
-            this.HelpButton = true;
-            this.Name = "XDataForm";
-            this.Text = "XData Form";
-            this.panel1.ResumeLayout(false);
-            this.ResumeLayout(false);
-
-        }
-        #endregion
-
-        private void btnOK_Click(object sender, System.EventArgs e)
-        {
-            for (int i=0; i<m_fields.Length; i++)
-            {
-                if (!m_fields[i].Validate())
-                {
-                    m_fields[i].Focus();
-                    return;
-                }
-            }
-            this.DialogResult = DialogResult.OK;
-        }
-
-        private void lblInstructions_Resize(object sender, EventArgs e)
-        {
-            Graphics graphics = lblInstructions.CreateGraphics();
-            SizeF s = lblInstructions.Size;
-            s.Height = 0;
-            SizeF textSize = graphics.MeasureString(lblInstructions.Text, lblInstructions.Font, s);
-            lblInstructions.Height = (int) (textSize.Height) + 2;
-        }
-
-        /// <summary>
-        /// Get a response to the original stanza that caused this form to be popped up.
-        /// </summary>
-        /// <returns>A stanza ready to be sent back to the originator.</returns>
-        public Packet GetResponse()
-        {
-            if (m_stanza == null)
-                throw new ArgumentException("parent was null", "parent");
-            if (m_type != XDataType.form)
-                throw new InvalidOperationException("Can only generate a submit response for x:data of type 'form'");
-
-            m_stanza.Swap();
-
-            Data x = new Data(m_stanza.OwnerDocument);
-            m_parent.AppendChild(x);
-            if (m_stanza is IQ)
-                m_stanza.SetAttribute("type", "set");
-
-            if (this.DialogResult == DialogResult.Cancel)
-            {
-                x.Type = XDataType.cancel;
-                return m_stanza;
-            }
-
-            x.Type = XDataType.submit;
-            foreach (FormField f in m_fields)
-            {
-                f.AppendField(x);
-            }
-
-            return m_stanza;
-        }
-
-        /// <summary>
-        /// Modify the given x:data element to contain the response data.
-        /// </summary>
-        /// <param name="x"></param>
-        public void FillInResponse(Data x)
-        {
-            x.RemoveAll();
-            x.Type = XDataType.result;
-            foreach (FormField f in m_fields)
-            {
-                f.AppendField(x);
-            }
-        }
-
-        private class FormField
-        {
-            private FieldType m_type;
-            private string m_var;
-            private string[] m_val;
-            private XDataForm m_form;
-            private bool m_required = false;
-            private Control m_control = null;
-            private Label m_label = null;
-            private Field m_field;
-
-            public FormField(Field f, XDataForm form, int tabIndex)
-            {
-                m_field = f;
-                m_type = f.Type;
-                m_var = f.Var;
-                m_val = f.Vals;
-                m_required = f.IsRequired;
-                m_form = form;
-
-                Panel p = null;
-                if (m_type != FieldType.hidden)
-                {
-                    p = new Panel();
-                    p.Parent = m_form.pnlFields;
-                    p.TabIndex = tabIndex;
-                }
-
-                switch (m_type)
-                {
-                    case FieldType.hidden:
-                        break;
-                    case FieldType.boolean:
-                        CheckBox cb = new CheckBox();
-                        cb.Checked = f.BoolVal;
-                        cb.Text = null;
-                        m_control = cb;
-                        break;
-                    case FieldType.text_multi:
-                        TextBox mtxt = new TextBox();
-                        mtxt.Multiline = true;
-                        mtxt.ScrollBars = ScrollBars.Vertical;
-                        mtxt.Lines = m_val;
-                        mtxt.Height = m_form.btnOK.Height * 3;
-                        m_control = mtxt;
-                        break;
-                    case FieldType.text_private:
-                        TextBox ptxt = new TextBox();
-                        ptxt.Lines = m_val;
-                        ptxt.PasswordChar = '*';
-                        m_control = ptxt;
-                        break;
-                    case FieldType.list_single:
-                        ComboBox box = new ComboBox();
-                        box.DropDownStyle = ComboBoxStyle.DropDownList;
-                        box.BeginUpdate();
-                        string v = null;
-                        if (m_val.Length > 0)
-                            v = m_val[0];
-                        foreach (Option o in f.GetOptions())
-                        {
-                            int i = box.Items.Add(o);
-
-                            if (o.Val == v)
-                            {
-                                box.SelectedIndex = i;
-                            }
-                        }
-                        box.EndUpdate();
-                        m_control = box;
-                        break;
-
-                    case FieldType.list_multi:
-                        //ListBox lb = new ListBox();
-                        CheckedListBox lb = new CheckedListBox();
-                        //lb.SelectionMode = SelectionMode.MultiExtended;
-                        lb.VisibleChanged += new EventHandler(lb_VisibleChanged);
-                        m_control = lb;
-                        break;
-
-                    case FieldType.jid_single:
-                        TextBox jtxt = new TextBox();
-                        jtxt.Lines = m_val;
-                        jtxt.Validating += new CancelEventHandler(jid_Validating);
-                        jtxt.Validated += new EventHandler(jid_Validated);
-                        m_control = jtxt;
-                        m_form.error.SetIconAlignment(m_control, ErrorIconAlignment.MiddleLeft);
-                        break;
-
-                    case FieldType.jid_multi:
-                        JidMulti multi = new JidMulti();
-                        multi.AddRange(m_val);
-                        m_control = multi;
-                        break;
-
-                    case FieldType.Fixed:
-                        // All of this so that we can detect URLs.
-                        // We can't just make it disabled, because then the URL clicked
-                        // event handler doesn't fire, and there's no way to set the
-                        // text foreground color.
-                        // It would be cool to make copy work, but it doesn't work for
-                        // labels, either.
-                        RichTextBox rich = new RichTextBox();
-                        rich.DetectUrls = true;
-                        rich.Text = string.Join("\r\n", f.Vals);
-                        rich.ScrollBars = RichTextBoxScrollBars.None;
-                        rich.Resize += new EventHandler(lbl_Resize);
-                        rich.BorderStyle = BorderStyle.None;
-                        rich.LinkClicked += new LinkClickedEventHandler(rich_LinkClicked);
-                        rich.BackColor = System.Drawing.SystemColors.Control;
-                        rich.KeyPress += new KeyPressEventHandler(rich_KeyPress);
-                        rich.GotFocus += new EventHandler(rich_GotFocus);
-                        rich.AcceptsTab = false;
-                        rich.AutoSize = false;
-                        m_control = rich;
-                        break;
-                    default:
-                        TextBox txt = new TextBox();
-                        txt.Lines = m_val;
-                        m_control = txt;
-                        break;
-                }
-
-                if (m_type != FieldType.hidden)
-                {
-                    m_control.Parent = p;
-
-                    if (f.Desc != null)
-                        form.tip.SetToolTip(m_control, f.Desc);
-
-                    String lblText = "";
-
-                    if (f.Label != "")
-                        lblText = f.Label + ":";
-                    else if (f.Var != "")
-                        lblText = f.Var + ":";
-
-                    if (lblText != "")
-                    {
-                        m_label = new Label();
-                        m_label.Parent = p;
-                        m_label.Text = lblText;
-
-                        if (m_required)
-                        {
-                            m_label.Text = "* " + m_label.Text;
-                            m_form.error.SetIconAlignment(m_control, ErrorIconAlignment.MiddleLeft);
-
-                            m_control.Validating += new CancelEventHandler(m_control_Validating);
-                            m_control.Validated += new EventHandler(m_control_Validated);
-                        }
-                        Graphics graphics = m_label.CreateGraphics();
-                        SizeF s = m_label.Size;
-                        s.Height = 0;
-                        int chars;
-                        int lines;
-                        SizeF textSize = graphics.MeasureString(m_label.Text, m_label.Font, s, StringFormat.GenericDefault, out chars, out lines);
-                        m_label.Height = (int) (textSize.Height);
-
-                        if (lines > 1)
-                            m_label.TextAlign = ContentAlignment.MiddleLeft;
-                        else
-                            m_label.TextAlign = ContentAlignment.TopLeft;
-
-                        m_label.Top = 0;
-                        p.Controls.Add(m_label);
-                        m_control.Location = new Point(m_label.Width + 3, 0);
-                        m_control.Width = p.Width - m_label.Width - 6;
-                        p.Height = Math.Max(m_label.Height, m_control.Height) + 4;
-                    }
-                    else
-                    {
-                        m_control.Location = new Point(0, 0);
-                        m_control.Width = p.Width - 6;
-                        p.Height = m_control.Height + 4;
-                    }
-                    m_control.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
-                    p.Controls.Add(m_control);
-                    p.Dock = DockStyle.Top;
-                    m_form.pnlFields.Controls.Add(p);
-
-                    if (m_form.m_type != XDataType.form)
-                        m_control.Enabled = false;
-                }
-            }
-
-            public void Focus()
-            {
-                if (m_control != null)
-                    m_control.Focus();
-            }
-
-            public string[] Value
-            {
-                get
-                {
-                    if (m_control == null)
-                        return m_val;
-                    if (m_control is TextBox)
-                        return ((TextBox)m_control).Lines;
-                    if (m_control is CheckBox)
-                        return new string[] { ((CheckBox)m_control).Checked ? "1" : "0" };
-                    if (m_control is ComboBox)
-                    {
-                        Option o = (Option)((ComboBox) m_control).SelectedItem;
-                        if (o == null) return new string[] {};
-                        return new string[] { o.Val };
-                    }
-
-                    return null;
-                }
-            }
-
-            public bool Validate()
-            {
-                if (m_control == null)
-                    return true;
-                if (!m_required)
-                    return true;
-
-                if ((Value == null) || (Value.Length == 0))
-                {
-                    m_form.error.SetError(m_control, "Required");
-                    return false;
-                }
-
-                return true;
-            }
-
-            private void m_control_Validating(object sender, CancelEventArgs e)
-            {
-                if (!Validate())
-                    e.Cancel = true;
-            }
-
-            private void m_control_Validated(object sender, EventArgs e)
-            {
-                m_form.error.SetError(m_control, "");
-            }
-
-            private void jid_Validated(object sender, EventArgs e)
-            {
-                m_form.error.SetError(m_control, "");
-            }
-
-            private void lbl_Resize(object sender, EventArgs e)
-            {
-                RichTextBox lbl = (RichTextBox) sender;
-
-                Graphics graphics = lbl.CreateGraphics();
-                SizeF s = lbl.Size;
-                s.Height = 0;
-                SizeF textSize = graphics.MeasureString(lbl.Text, lbl.Font, s);
-                lbl.Height = (int) (textSize.Height) + 4;
-                if (e != null)
-                {
-                    lbl.Parent.Height = Math.Max(lbl.Height, m_control.Height) + 4;
-                }
-            }
-
-            private void lb_VisibleChanged(object sender, EventArgs e)
-            {
-                // HACK: Oh.  My.  God.
-                // This was found through trial and error, and I'm NOT happy with it.
-                // The deal is that there is a bug in the MS implementation of ListBox, such
-                // that if you call SetSelected before the underlying window has been created,
-                // the SetSelected call gets ignored.
-
-                // So, what we do here is wait for VisibleChanged events...  this is the only event
-                // I could find that always fires after the Handle is set.  But, it also fires before
-                // the handle is set, and several times so quickly in succession that the remove
-                // event handler code below can happen while there is an event still in the queue.
-                // Apparently that message that is already in the queue fires this callback again,
-                // even though it's been removed.
-                CheckedListBox lb = (CheckedListBox) sender;
-                if (lb.Handle == IntPtr.Zero)
-                    return;
-
-                if (lb.Items.Count > 0)
-                    return;
-
-                lb.VisibleChanged -= new EventHandler(lb_VisibleChanged);
-
-                lb.BeginUpdate();
-                foreach (Option o in m_field.GetOptions())
-                {
-                    int i = lb.Items.Add(o);
-                    if (m_field.IsValSet(o.Val))
-                        //lb.SetSelected(i, true);
-                        lb.SetItemChecked(i, true);
-                }
-                lb.EndUpdate();
-
-            }
-
-            private void jid_Validating(object sender, CancelEventArgs e)
-            {
-                TextBox jtxt = (TextBox) sender;
-                if (jtxt.Text == "")
-                    return;
-
-                try
-                {
-                    jabber.JID j = new jabber.JID(jtxt.Text);
-                }
-                catch
-                {
-                    e.Cancel = true;
-                    m_form.error.SetError(jtxt, "Invalid JID");
-                }
-            }
-
-            public void AppendField(Data x)
-            {
-                String[] vals = this.Value;
-                if ((vals != null) && (vals.Length > 0))
-                {
-                    Field f = x.AddField(m_var, m_type, null, null, null);
-                    foreach (String v in vals)
-                    {
-                        f.AddValue(v);
-                    }
-                }
-            }
-
-            private void rich_LinkClicked(object sender, LinkClickedEventArgs e)
-            {
-                System.Diagnostics.Process.Start(e.LinkText);
-            }
-
-            private void rich_KeyPress(object sender, KeyPressEventArgs e)
-            {
-                e.Handled = true;
-            }
-
-            private void rich_GotFocus(object sender, EventArgs e)
-            {
-                // gyrate, trying to prevent focus from ever landing on the
-                // richtext box.
-                RichTextBox rich = (RichTextBox) sender;
-                Control nxt = m_form.GetNextControl(rich, true);
-                while ((nxt != null) && (nxt != rich) && ((!nxt.CanFocus) || (nxt is Panel)))
-                    nxt = m_form.GetNextControl(nxt, true);
-                if ((nxt != null) && (nxt != rich))
-                    nxt.Focus();
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/muzzle/XmppDebugger.cs b/lib/jabber-net/muzzle/XmppDebugger.cs
deleted file mode 100644
index 658f306..0000000
--- a/lib/jabber-net/muzzle/XmppDebugger.cs
+++ /dev/null
@@ -1,390 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.ComponentModel;
-using System.Drawing;
-using System.Diagnostics;
-using System.Windows.Forms;
-using System.Xml;
-
-using bedrock.util;
-
-namespace muzzle
-{
-    /// <summary>
-    /// Debug stream for XMPP, so I don't have write it every time.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class XmppDebugger : StreamControl
-    {
-        private RichTextBox rtSend;
-        private Splitter splitter1;
-        private BottomScrollRichText rtDebug;
-
-        private Color m_sendColor = Color.Blue;
-        private Color m_recvColor = Color.Orange;
-        private Color m_errColor = Color.Red;
-        private Color m_otherColor = Color.Green;
-        private string m_send = "SEND:";
-        private string m_recv = "RECV:";
-        private string m_err = "ERROR:";
-        private string m_last = "";
-
-
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Create
-        /// </summary>
-        public XmppDebugger()
-        {
-            InitializeComponent();
-            this.OnStreamChanged += new bedrock.ObjectHandler(XmppDebugger_OnStreamChanged);
-        }
-
-        /// <summary>
-        /// What color to use for the "SEND:" string.
-        /// </summary>
-        [Category("Appearance")]
-        public Color SendColor
-        {
-            get { return m_sendColor; }
-            set { m_sendColor = value; }
-        }
-
-        /// <summary>
-        /// What color to use for the "RECV:" string.
-        /// </summary>
-        [Category("Appearance")]
-        public Color ReceiveColor
-        {
-            get { return m_recvColor; }
-            set { m_recvColor = value; }
-        }
-
-        /// <summary>
-        /// What color to use for the "ERROR:" string.
-        /// </summary>
-        [Category("Appearance")]
-        public Color ErrorColor
-        {
-            get { return m_errColor; }
-            set { m_errColor = value; }
-        }
-
-        /// <summary>
-        /// What color to use for the sent and received text.
-        /// </summary>
-        [Category("Appearance")]
-        public Color TextColor
-        {
-            get { return rtDebug.ForeColor; }
-            set { rtDebug.ForeColor = value; }
-        }
-
-        /// <summary>
-        /// What color to use for other text inserted
-        /// </summary>
-        [Category("Appearance")]
-        public Color OtherColor
-        {
-            get { return m_otherColor; }
-            set { m_otherColor = value; }
-        }
-
-        /// <summary>
-        /// Maximum number of lines to keep
-        /// </summary>
-        [Category("Appearance")]
-        [DefaultValue(500)]
-        public int MaxLines
-        {
-            get { return rtDebug.MaxLines; }
-            set { rtDebug.MaxLines = value; }
-        }
-
-        /// <summary>
-        /// The string to prefix on sent bytes.
-        /// </summary>
-        [Category("Text")]
-        [DefaultValue("SEND:")]
-        public string SendPrefix
-        {
-            get { return m_send; }
-            set { m_send = value; }
-        }
-
-        /// <summary>
-        /// The string to prefix on sent bytes.
-        /// </summary>
-        [Category("Text")]
-        [DefaultValue("RECV:")]
-        public string ReceivePrefix
-        {
-            get { return m_recv; }
-            set { m_recv = value; }
-        }
-
-        /// <summary>
-        /// The string to prefix on errors.
-        /// </summary>
-        [Category("Text")]
-        [DefaultValue("ERROR:")]
-        public string ErrorPrefix
-        {
-            get { return m_err; }
-            set { m_err = value; }
-        }
-
-        private void XmppDebugger_OnStreamChanged(object sender)
-        {
-            if (m_stream == null)
-                return;
-
-            m_stream.OnConnect += new jabber.connection.StanzaStreamHandler(m_stream_OnConnect);
-            m_stream.OnReadText += new bedrock.TextHandler(m_stream_OnReadText);
-            m_stream.OnWriteText += new bedrock.TextHandler(m_stream_OnWriteText);
-            m_stream.OnError += new bedrock.ExceptionHandler(m_stream_OnError);
-        }
-
-        private void Write(Color color, string tag, string text)
-        {
-            Debug.WriteLine(tag + " " + text);
-            rtDebug.AppendMaybeScroll(color, tag, text);
-        }
-
-        /// <summary>
-        /// Write an error to the log.
-        /// </summary>
-        /// <param name="error"></param>
-        public void WriteError(string error)
-        {
-            Write(m_errColor, m_err, error);
-        }
-
-        private void m_stream_OnError(object sender, Exception ex)
-        {
-            WriteError(ex.ToString());
-        }
-
-        private void m_stream_OnConnect(object sender, jabber.connection.StanzaStream stream)
-        {
-            // I think this is right.  Double check.
-            rtDebug.Clear();
-        }
-
-        private void m_stream_OnReadText(object sender, string txt)
-        {
-            // keepalive
-            if (txt == " ")
-                return;
-
-            Write(m_recvColor, m_recv, txt);
-        }
-
-        private void m_stream_OnWriteText(object sender, string txt)
-        {
-            // keepalive
-            if (txt == " ")
-                return;
-
-            Write(m_sendColor, m_send, txt);
-        }
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        /// <summary>
-        /// Clear both text boxes
-        /// </summary>
-        public void Clear()
-        {
-            rtDebug.Clear();
-            rtSend.Clear();
-        }
-
-        /// <summary>
-        /// Write other text to the debug log
-        /// </summary>
-        /// <param name="tag">The tag to prefix with</param>
-        /// <param name="text">The text after the tag</param>
-        public void Write(string tag, string text)
-        {
-            Write(m_otherColor, tag, text);
-        }
-
-        private XmlElement ValidateXML()
-        {
-            try
-            {
-                XmlDocument doc = new XmlDocument();
-                doc.LoadXml(rtSend.Text);
-                XmlElement elem = doc.DocumentElement;
-                if (elem != null)
-                {
-                    return elem;
-                }
-            }
-            catch (XmlException ex)
-            {
-                int offset = ex.LinePosition;
-                for (int i=0; (i<ex.LineNumber-1) && (i < rtSend.Lines.Length); i++)
-                {
-                    offset += rtSend.Lines[i].Length + 2;
-                }
-                rtSend.Select(offset, 1);
-            }
-            return null;
-        }
-
-        private void ValidateAndSend()
-        {
-            XmlElement elem = ValidateXML();
-            if (elem != null)
-            {
-                Write(elem);
-                rtSend.Clear();
-            }
-        }
-
-        private void rtSend_KeyUp(object sender, KeyEventArgs e)
-        {
-            if ((e.KeyCode == Keys.Enter) && e.Control)
-            {
-                ValidateAndSend();
-            }
-            else if ((e.KeyCode == Keys.Delete) && e.Control)
-            {
-                Clear();
-            }
-        }
-
-        private void Search(string txt)
-        {
-            string t = (txt == null) ? m_last : txt;
-            if (t == "")
-                return;
-            m_last = t;
-            int start = rtDebug.SelectionStart + 1;
-            if ((start < 0) || (start > rtDebug.Text.Length))
-                start = 0;
-            int offset = rtDebug.Text.IndexOf(t, start);
-            if (offset < 0)
-            {
-                Console.Beep();
-                offset = 0;
-            }
-            rtDebug.Select(offset, t.Length);
-            rtDebug.ScrollToCaret();
-        }
-
-        private void rtDebug_KeyUp(object sender, KeyEventArgs e)
-        {
-            if ((e.KeyCode == Keys.Delete) && e.Control)
-            {
-                Clear();
-            }
-            else if ((e.KeyCode == Keys.F) && e.Control)
-            {
-                InputBox inp = new InputBox();
-                if (inp.ShowDialog("Find text", "Find:", "") != DialogResult.OK)
-                    return;
-                Search(inp.Value);
-            }
-            else if (e.KeyCode == Keys.F3)
-            {
-                Search(null);
-            }
-        }
-
-        private void XmppDebugger_KeyUp(object sender, KeyEventArgs e)
-        {
-            if ((e.KeyCode == Keys.Delete) && e.Control)
-            {
-                Clear();
-            }
-        }
-
-        #region Component Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.rtSend = new System.Windows.Forms.RichTextBox();
-            this.splitter1 = new System.Windows.Forms.Splitter();
-            this.rtDebug = new muzzle.BottomScrollRichText();
-            this.SuspendLayout();
-            //
-            // rtSend
-            //
-            this.rtSend.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.rtSend.Location = new System.Drawing.Point(0, 110);
-            this.rtSend.Name = "rtSend";
-            this.rtSend.Size = new System.Drawing.Size(150, 40);
-            this.rtSend.TabIndex = 0;
-            this.rtSend.Text = "";
-            this.rtSend.KeyUp += new System.Windows.Forms.KeyEventHandler(this.rtSend_KeyUp);
-            //
-            // splitter1
-            //
-            this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.splitter1.Location = new System.Drawing.Point(0, 107);
-            this.splitter1.Name = "splitter1";
-            this.splitter1.Size = new System.Drawing.Size(150, 3);
-            this.splitter1.TabIndex = 1;
-            this.splitter1.TabStop = false;
-            //
-            // rtDebug
-            //
-            this.rtDebug.BackColor = System.Drawing.SystemColors.Window;
-            this.rtDebug.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.rtDebug.Location = new System.Drawing.Point(0, 0);
-            this.rtDebug.Name = "rtDebug";
-            this.rtDebug.ReadOnly = true;
-            this.rtDebug.Size = new System.Drawing.Size(150, 107);
-            this.rtDebug.TabIndex = 2;
-            this.rtDebug.Text = "";
-            this.rtDebug.KeyUp += new System.Windows.Forms.KeyEventHandler(this.rtDebug_KeyUp);
-            //
-            // XmppDebugger
-            //
-            this.Controls.Add(this.rtDebug);
-            this.Controls.Add(this.splitter1);
-            this.Controls.Add(this.rtSend);
-            this.Name = "XmppDebugger";
-            this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.XmppDebugger_KeyUp);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-    }
-}
diff --git a/lib/jabber-net/netlib.Dns/Properties/AssemblyInfo.cs b/lib/jabber-net/netlib.Dns/Properties/AssemblyInfo.cs
deleted file mode 100644
index db37d32..0000000
--- a/lib/jabber-net/netlib.Dns/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("netlib.Dns")]
-[assembly: AssemblyDescription("Allows for a complete DNS record lookup on a given domain using the Windows API.")]
-[assembly: AssemblyVersion("1.1.*")]
-
-[assembly: AssemblyCompany("The ASP Emporium (http://www.aspemporium.com/)")]
-[assembly: AssemblyProduct("The ASP Emporium (http://www.aspemporium.com/)")]
-[assembly: AssemblyCopyright("The ASP Emporium (http://www.aspemporium.com/)")]
-[assembly: AssemblyTrademark("The ASP Emporium (http://www.aspemporium.com/)")]
-
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f0ccd899-310f-40e3-aa25-ff151d23b11a")]
-
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyName("")]
-
diff --git a/lib/jabber-net/netlib.Dns/dns.cs b/lib/jabber-net/netlib.Dns/dns.cs
deleted file mode 100644
index 7e9f1a7..0000000
--- a/lib/jabber-net/netlib.Dns/dns.cs
+++ /dev/null
@@ -1,2087 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Net;
-using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
-using netlib.Dns.Records;
-
-namespace netlib.Dns
-{
-    /// <summary>
-    /// Represents a complete DNS record (DNS_RECORD)
-    /// </summary>
-    /// <remarks>
-    /// This structure is used to hold a complete DNS record
-    /// as returned from the DnsQuery API.
-    /// </remarks>
-    [StructLayout(LayoutKind.Sequential)]
-    struct DnsRecord
-    {
-        /// <summary>
-        /// Gets or sets the next record.
-        /// </summary>
-        public IntPtr Next;// 4 bytes
-
-        /// <summary>
-        /// Gets or sets the name of the record.
-        /// </summary>
-        public string Name;// 4 bytes
-
-        /// <summary>
-        /// Gets or sets the type.
-        /// </summary>
-        [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U2)]
-        public DnsRecordType    RecordType;// 2 bytes
-
-        /// <summary>
-        /// Gets or sets the data length.
-        /// </summary>
-        [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U2)]
-        public ushort   DataLength;// 2 bytes
-
-        /// <summary>
-        /// Represents the flags of a <see cref="DnsRecord"/>.
-        /// </summary>
-        [ StructLayout( LayoutKind.Explicit )]// 4 bytes
-            internal struct DnsRecordFlags
-        {
-            /// <summary>
-            /// Reserved.
-            /// </summary>
-            [ FieldOffset( 0 )]
-            [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)]
-            public uint DW;
-
-            /// <summary>
-            /// Reserved.
-            /// </summary>
-            [ FieldOffset( 0 )]
-            [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)]
-            public uint  S;
-        }
-
-        /// <summary>
-        /// Gets or sets the flags.
-        /// </summary>
-        public DnsRecordFlags Flags;
-
-        /// <summary>
-        /// Gets or sets the TTL count
-        /// </summary>
-        [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)]
-        public uint Ttl;// 4 bytes
-
-        /// <summary>
-        /// Reserved.
-        /// </summary>
-        [MarshalAs(System.Runtime.InteropServices.UnmanagedType.U4)]
-        public uint Reserved;// 4 bytes
-        // Can't fill in rest of the structure because if it doesn't line up, c# will complain.
-    }
-
-    /// <summary>
-    /// DNS query types
-    /// </summary>
-    /// <remarks>
-    /// This enum is used by the DnsQuery API call to describe the
-    /// options to be given to a DNS server along with a query.
-    /// </remarks>
-    [Flags]
-    enum DnsQueryType: uint
-    {
-        /// <summary>
-        /// Standard
-        /// </summary>
-        STANDARD                  = 0x00000000,
-
-        /// <summary>
-        /// Accept truncated response
-        /// </summary>
-        ACCEPT_TRUNCATED_RESPONSE = 0x00000001,
-
-        /// <summary>
-        /// Use TCP only
-        /// </summary>
-        USE_TCP_ONLY              = 0x00000002,
-
-        /// <summary>
-        /// No recursion
-        /// </summary>
-        NO_RECURSION              = 0x00000004,
-
-        /// <summary>
-        /// Bypass cache
-        /// </summary>
-        BYPASS_CACHE              = 0x00000008,
-
-        /// <summary>
-        /// Cache only
-        /// </summary>
-        NO_WIRE_QUERY                = 0x00000010,
-
-        /// <summary>
-        /// Directs DNS to ignore the local name.
-        /// </summary>
-        NO_LOCAL_NAME      =      0x00000020,
-
-        /// <summary>
-        /// Prevents the DNS query from consulting the HOSTS file.
-        /// </summary>
-        NO_HOSTS_FILE      =      0x00000040,
-
-        /// <summary>
-        /// Prevents the DNS query from using NetBT for resolution.
-        /// </summary>
-        NO_NETBT           =      0x00000080,
-
-        /// <summary>
-        /// Directs DNS to perform a query using the network only,
-        /// bypassing local information.
-        /// </summary>
-        WIRE_ONLY          = 0x00000100,
-
-        /// <summary>
-        /// Treat as FQDN
-        /// </summary>
-        TREAT_AS_FQDN             = 0x00001000,
-
-        /// <summary>
-        /// Allow empty auth response
-        /// </summary>
-        [Obsolete]
-        ALLOW_EMPTY_AUTH_RESP     = 0x00010000,
-
-        /// <summary>
-        /// Don't reset TTL values
-        /// </summary>
-        DONT_RESET_TTL_VALUES     = 0x00100000,
-
-        /// <summary>
-        /// Reserved.
-        /// </summary>
-        RESERVED                  = 0xff000000,
-
-        /// <summary>
-        /// obsolete.
-        /// </summary>
-        [Obsolete("use NO_WIRE_QUERY instead")]
-        CACHE_ONLY = NO_WIRE_QUERY,
-
-        /// <summary>
-        /// Directs DNS to return the entire DNS response message.
-        /// </summary>
-        RETURN_MESSAGE     =       0x00000200
-
-    }
-
-    /// <summary>
-    /// The possible return codes of the DNS API call. This enum can
-    /// be used to decypher the <see cref="DnsException.ErrorCode"/>
-    /// property's return value.
-    /// </summary>
-    /// <remarks>
-    /// This enum is used to describe a failed return code by the
-    /// DnsQuery API used in the <see cref="DnsRequest"/> class.
-    /// </remarks>
-    public enum DnsQueryReturnCode: ulong
-    {
-        /// <summary>
-        /// Successful query
-        /// </summary>
-        SUCCESS = 0L,
-
-        /// <summary>
-        /// Base DNS error code
-        /// </summary>
-        UNSPECIFIED_ERROR = 9000,
-
-        /// <summary>
-        /// Base DNS error code
-        /// </summary>
-        MASK = 0x00002328, // 9000 or RESPONSE_CODES_BASE
-
-        /// <summary>
-        /// DNS server unable to interpret format.
-        /// </summary>
-        FORMAT_ERROR   =   9001L,
-
-        /// <summary>
-        /// DNS server failure.
-        /// </summary>
-        SERVER_FAILURE =   9002L,
-
-        /// <summary>
-        /// DNS name does not exist.
-        /// </summary>
-        NAME_ERROR    =    9003L,
-
-        /// <summary>
-        /// DNS request not supported by name server.
-        /// </summary>
-        NOT_IMPLEMENTED =  9004L,
-
-        /// <summary>
-        /// DNS operation refused.
-        /// </summary>
-        REFUSED       =    9005L,
-
-        /// <summary>
-        /// DNS name that ought not exist, does exist.
-        /// </summary>
-        YXDOMAIN     =     9006L,
-
-        /// <summary>
-        /// DNS RR set that ought not exist, does exist.
-        /// </summary>
-        YXRRSET     =      9007L,
-
-        /// <summary>
-        /// DNS RR set that ought to exist, does not exist.
-        /// </summary>
-        NXRRSET      =     9008L,
-
-        /// <summary>
-        /// DNS server not authoritative for zone.
-        /// </summary>
-        NOTAUTH      =     9009L,
-
-        /// <summary>
-        /// DNS name in update or prereq is not in zone.
-        /// </summary>
-        NOTZONE      =     9010L,
-
-        /// <summary>
-        /// DNS signature failed to verify.
-        /// </summary>
-        BADSIG      =      9016L,
-
-        /// <summary>
-        /// DNS bad key.
-        /// </summary>
-        BADKEY      =      9017L,
-
-        /// <summary>
-        /// DNS signature validity expired.
-        /// </summary>
-        BADTIME     =      9018L,
-
-        /// <summary>
-        /// Packet format
-        /// </summary>
-        PACKET_FMT_BASE = 9500,
-
-        /// <summary>
-        /// No records found for given DNS query.
-        /// </summary>
-        NO_RECORDS      =         9501L,
-
-        /// <summary>
-        /// Bad DNS packet.
-        /// </summary>
-        BAD_PACKET     =         9502L,
-
-        /// <summary>
-        /// No DNS packet.
-        /// </summary>
-        NO_PACKET      =         9503L,
-
-        /// <summary>
-        /// DNS error, check rcode.
-        /// </summary>
-        RCODE          =         9504L,
-
-        /// <summary>
-        /// Unsecured DNS packet.
-        /// </summary>
-        UNSECURE_PACKET   =      9505L
-    }
-
-    /// <summary>
-    /// Possible arguments for the DnsRecordListFree api
-    /// </summary>
-    /// <remarks>
-    /// This enum is used by the DnsRecordListFree API.
-    /// </remarks>
-    enum DnsFreeType: uint
-    {
-        /// <summary>
-        /// Reserved.
-        /// </summary>
-        FreeFlat = 0,
-
-        /// <summary>
-        /// Frees the record list returned by the DnsQuery API
-        /// </summary>
-        FreeRecordList
-    }
-
-    /// <summary>
-    /// Represents the exception that occurs when a <see cref="DnsRequest"/>
-    /// fails.
-    /// </summary>
-    /// <remarks>
-    /// <para>
-    /// The exception that occurs when a DNS request fails at any level.
-    /// </para>
-    /// <para>
-    /// This class is used to represent two broad types of exceptions:
-    /// <list type="bullet">
-    ///     <item>Win32 API Exceptions that occurred when calling the DnsQuery API</item>
-    ///     <item>Exceptions of other types that occurred when working with
-    ///     the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-    ///     classes.</item>
-    /// </list>
-    /// </para>
-    /// <para>
-    /// Win32 errors that are DNS specific are specified in the
-    /// <see cref="DnsQueryReturnCode"/> enumeration but if the
-    /// <see cref="ErrorCode"/> returned is not defined in that
-    /// enum then the number returned will be defined in WinError.h.
-    /// </para>
-    /// <para>
-    /// Exceptions of other types are available through the
-    /// InnerException property.
-    /// </para>
-    /// </remarks>
-    [Serializable]
-    public class DnsException: ApplicationException, ISerializable
-    {
-        private readonly uint errcode = (uint) DnsQueryReturnCode.SUCCESS;
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="DnsException"/>
-        /// </summary>
-        /// <remarks>
-        /// Used to raise a <see cref="DnsException"/> with all the default
-        /// properties. The message property will return: Unspecified
-        /// DNS exception.
-        /// </remarks>
-        public DnsException(): base("Unspecified DNS exception")
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="DnsException"/>
-        /// </summary>
-        /// <param name="message">the human readable description of the problem</param>
-        /// <remarks>
-        /// Used to raise a <see cref="DnsException"/> where the only important
-        /// information is a description about the error. The <see cref="ErrorCode"/>
-        /// property will return 0 or SUCCESS indicating that the DNS API calls
-        /// succeeded, regardless of whether they did or did not.
-        /// </remarks>
-        public DnsException(string message): base(message)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="DnsException"/>
-        /// </summary>
-        /// <param name="message">the human readable description of the problem</param>
-        /// <param name="errcode">the error code (<see cref="DnsQueryReturnCode"/>)
-        /// if the DnsQuery api failed</param>
-        /// <remarks>
-        /// Used to raise a <see cref="DnsException"/> where the underlying DNS
-        /// API call fails. In this case, the <see cref="ErrorCode"/> property
-        /// is the most important information about the exception. In most cases,
-        /// the number returned is a value in the <see cref="DnsQueryReturnCode"/>
-        /// enum however, if it is not, the error is defined in WinError.h.
-        /// </remarks>
-        public DnsException(string message, uint errcode): base(message)
-        {
-            this.errcode = errcode;
-        }
-
-        /// <summary>
-        /// Gets the error code (<see cref="DnsQueryReturnCode"/>)
-        /// if the DnsQuery api failed. Will be set to success (0) if the API
-        /// didn't fail but another part of the code did.
-        /// </summary>
-        /// <remarks>
-        /// Win32 errors that are DNS specific are specified in the
-        /// <see cref="DnsQueryReturnCode"/> enumeration but if the
-        /// <see cref="ErrorCode"/> returned is not defined in that
-        /// enum then the number returned will be defined in WinError.h.
-        /// </remarks>
-        /// <value>Value will be defined in WinError.h if not defined in the
-        /// <see cref="DnsQueryReturnCode"/> enum.</value>
-        /// <example>
-        /// This example shows how to decypher the return of the
-        /// ErrorCode property.
-        /// <code>
-        /// try
-        /// {
-        ///     ...
-        /// }
-        /// catch(DnsException dnsEx)
-        /// {
-        ///     int errcode = dnsEx.ErrorCode;
-        ///     if (! Enum.IsDefined(typeof(DnsQueryReturnCode), errcode))
-        ///     {
-        ///         //defined in winerror.h
-        ///         Console.WriteLine("WIN32 Error: {0}", errcode);
-        ///         return;
-        ///     }
-        ///
-        ///     DnsQueryReturnCode errretcode = (DnsQueryReturnCode) errcode;
-        ///     if (errretcode == DnsQueryReturnCode.SUCCESS)
-        ///     {
-        ///         //inner exception contains the goodies
-        ///         Console.WriteLine(dnsEx.InnerException.ToString());
-        ///         return;
-        ///     }
-        ///
-        ///     //dns error
-        ///     Console.WriteLine("DNS Error: {0}", errretcode.ToString("g"));
-        /// }
-        /// </code>
-        /// </example>
-        public uint ErrorCode
-        {
-            get
-            {
-                return errcode;
-            }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="DnsException"/>
-        /// </summary>
-        /// <param name="message">the human readable description of the
-        /// problem</param>
-        /// <param name="innerException">the exception that caused the
-        /// underlying error</param>
-        /// <remarks>
-        /// Used to raise a <see cref="DnsException"/> where the exception is
-        /// some other type but a typeof(DnsException) is desired to be raised
-        /// instead. In this case, the <see cref="ErrorCode"/> property
-        /// always returns 0 or SUCCESS and is a useless property.
-        /// </remarks>
-        public DnsException(string message, Exception innerException): base(message, innerException)
-        {
-        }
-
-        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            info.AddValue("errcode", errcode);
-            base.GetObjectData(info, context);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="DnsException"/> for <see cref="ISerializable"/>
-        /// </summary>
-        /// <param name="info">the serialization information</param>
-        /// <param name="context">the context</param>
-        /// <remarks>
-        /// Used by the <see cref="ISerializable"/> interface.
-        /// </remarks>
-        public DnsException(SerializationInfo info, StreamingContext context): base(info, context)
-        {
-            errcode = info.GetUInt32("errcode");
-        }
-    }
-
-    /// <summary>
-    /// DNS record types
-    /// </summary>
-    /// <remarks>
-    /// This enum represents all possible DNS record types that
-    /// could be returned by the DnsQuery API.
-    /// </remarks>
-    [Flags]
-    public enum DnsRecordType: ushort
-    {
-        /// <summary>
-        /// Address record
-        /// </summary>
-        A          = 0x0001,      //  1
-
-        /// <summary>
-        /// Canonical Name record
-        /// </summary>
-        CNAME      = 0x0005,      //  5
-
-        /// <summary>
-        /// Start Of Authority record
-        /// </summary>
-        SOA        = 0x0006,      //  6
-
-        /// <summary>
-        /// Pointer record
-        /// </summary>
-        PTR        = 0x000c,      //  12
-
-        /// <summary>
-        /// Mail Exchange record
-        /// </summary>
-        MX         = 0x000f,      //  15
-
-        /// <summary>
-        /// Text record
-        /// </summary>
-        TEXT       = 0x0010,      //  16
-
-        //  RFC 2052    (Service location)
-        /// <summary>
-        /// Server record
-        /// </summary>
-        SRV        = 0x0021,      //  33
-
-        /// <summary>
-        /// All records
-        /// </summary>
-        ALL        = 0x00ff,      //  255
-
-        /// <summary>
-        /// Any records
-        /// </summary>
-        ANY        = 0x00ff,      //  255
-    }
-
-    /// <summary>
-    /// Represents a container for a DNS record of any type
-    /// </summary>
-    /// <remarks>
-    /// The <see cref="DnsWrapper.RecordType"/> property's value
-    /// helps determine what type real type of the
-    /// <see cref="DnsWrapper.RecordData"/> property returns as
-    /// noted in this chart:
-    /// <list type="table">
-    ///     <listheader>
-    ///         <term>RecordType</term>
-    ///         <term>RecordData</term>
-    ///     </listheader>
-    ///     <item>
-    ///         <term>A</term>
-    ///         <description><see cref="netlib.Dns.Records.ARecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>CNAME</term>
-    ///         <description><see cref="netlib.Dns.Records.PTRRecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>PTR</term>
-    ///         <description><see cref="netlib.Dns.Records.PTRRecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>MX</term>
-    ///         <description><see cref="netlib.Dns.Records.MXRecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>SOA</term>
-    ///         <description><see cref="netlib.Dns.Records.SOARecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>SRV</term>
-    ///         <description><see cref="netlib.Dns.Records.SRVRecord"/></description>
-    ///     </item>
-    ///     <item>
-    ///         <term>TEXT</term>
-    ///         <description><see cref="netlib.Dns.Records.TXTRecord"/></description>
-    ///     </item>
-    /// </list>
-    /// </remarks>
-    public struct DnsWrapper: IComparable
-    {
-        /// <summary>
-        /// Gets or sets the type of DNS record contained in the
-        /// <see cref="RecordData"/> property.
-        /// </summary>
-        /// <remarks>
-        /// This property indicates the type of DNS record
-        /// that the <see cref="RecordData"/> property is
-        /// holding.
-        /// </remarks>
-        public DnsRecordType RecordType;
-
-        /// <summary>
-        /// Gets or sets the DNS record object as denoted in the
-        /// <see cref="RecordType"/> field.
-        /// </summary>
-        /// <remarks>
-        /// This property holds the actual DNS record.
-        /// </remarks>
-        public object RecordData;
-
-        /// <summary>
-        /// Determines whether or not this <see cref="DnsWrapper"/>
-        /// instance is equal to a specific <see cref="DnsRecordType"/>
-        /// by comparing the <see cref="RecordType"/> property of the
-        /// current <see cref="DnsWrapper"/> against the
-        /// <see cref="DnsRecordType"/> argument.
-        /// </summary>
-        /// <param name="type">The <see cref="DnsRecordType"/> to compare to.</param>
-        /// <returns>A boolean indicating whether or not this <see cref="DnsWrapper"/>
-        /// object contains a DNS record matching the entered type.</returns>
-        /// <remarks>
-        /// Determines if this <see cref="DnsWrapper"/> is of a specific
-        /// <see cref="DnsRecordType"/>. The comparison does not test the
-        /// <see cref="RecordData"/> field.
-        /// </remarks>
-        public bool Equals(DnsRecordType type)
-        {
-            if( RecordType == type)
-                return true;
-
-            return false;
-        }
-
-        /// <summary>
-        /// Determines whether or not this <see cref="DnsWrapper"/> instance
-        /// is equal to another <see cref="DnsWrapper"/> or to a
-        /// <see cref="DnsRecordType"/> instance.
-        /// </summary>
-        /// <param name="obj">The object to compare to this instance.</param>
-        /// <returns>A boolean indicating whether or not this <see cref="DnsWrapper"/>
-        /// object equals the entered object.</returns>
-        /// <remarks>
-        /// Determines if this <see cref="DnsWrapper"/> instance is equal to
-        /// an object. If the object is a <see cref="DnsRecordType"/>, the
-        /// <see cref="Equals(DnsRecordType)"/> method is used to determine
-        /// equality based on the record type. If the object is a <see cref="DnsWrapper"/>
-        /// object, the <see cref="CompareTo"/> method is used to determine
-        /// equality. If the object is any other type, the <see cref="Object"/>
-        /// class's Equal method is used for comparison.
-        /// </remarks>
-        public override bool Equals(object obj)
-        {
-            if (obj == null)
-                return false;
-
-            if (obj is DnsRecordType)
-                return Equals((DnsRecordType) obj);
-
-            if (obj is DnsWrapper)
-                return (CompareTo(obj) == 0 ? true : false);
-
-            return base.Equals(obj);
-        }
-
-        /// <summary>
-        /// Serves as a hash function for a particular type, suitable
-        /// for use in hashing algorithms and data structures like a
-        /// hash table.
-        /// </summary>
-        /// <returns>Integer value representing the hashcode of this
-        /// instance of <see cref="DnsWrapper"/>.</returns>
-        /// <remarks>
-        /// The GetHashCode method uses the hash codes of the <see cref="RecordData"/>
-        /// and <see cref="RecordType"/> properties to generate a unique code
-        /// for this particular record type/data combination.
-        /// </remarks>
-        public override int GetHashCode()
-        {
-            return RecordData.GetHashCode() ^ RecordType.GetHashCode();
-        }
-
-        #region IComparable Members
-
-        /// <summary>
-        /// Compares the current instance with another object of the same type.
-        /// </summary>
-        /// <param name="obj">The object to compare with this instance.</param>
-        /// <returns>
-        /// A 32-bit signed integer that indicates the relative order of the
-        /// comparands. The return value has these meanings:
-        /// <list type="table">
-        ///     <listheader>
-        ///         <term>Value</term>
-        ///         <term>Meaning</term>
-        ///     </listheader>
-        ///     <item>
-        ///         <term>Less than zero</term>
-        ///         <description>This instance is less than obj. The <see cref="RecordData"/>
-        ///         types do not match.</description>
-        ///     </item>
-        ///     <item>
-        ///         <term>Zero</term>
-        ///         <description>This instance is equal to obj. </description>
-        ///     </item>
-        ///     <item>
-        ///         <term>Greater than zero</term>
-        ///         <description>This instance is greater than obj. The <see cref="RecordType"/>
-        ///         do not match.</description>
-        ///     </item>
-        /// </list>
-        /// </returns>
-        /// <remarks>
-        /// Compares a <see cref="DnsWrapper"/> to this instance by its
-        /// <see cref="RecordType"/> and <see cref="RecordData"/> properties.
-        /// </remarks>
-        /// <exception cref="ArgumentException">
-        /// obj is not the same type as this instance.
-        /// </exception>
-        public int CompareTo(object obj)
-        {
-            if (! (obj is DnsWrapper))
-                throw new ArgumentException();
-
-            DnsWrapper dnsw = (DnsWrapper) obj;
-            if (RecordData.GetType() != dnsw.RecordData.GetType())
-                return -1;
-
-            if (RecordType != dnsw.RecordType)
-                return 1;
-
-            return 0;
-        }
-
-        #endregion
-    }
-
-    /// <summary>
-    /// Represents a collection of <see cref="DnsWrapper"/> objects.
-    /// </summary>
-    /// <remarks>
-    /// The DnsWrapperCollection is a collection of <see cref="DnsWrapper"/>
-    /// objects. The resultant collection represents all of the DNS records
-    /// for the given domain that was looked up. This class cannot be directly
-    /// created - it is created by the <see cref="DnsRequest"/> and
-    /// <see cref="DnsResponse"/> classes to hold the returned DNS
-    /// records for the given domain.
-    /// </remarks>
-    public class DnsWrapperCollection: ReadOnlyCollectionBase, IEnumerable
-    {
-        internal DnsWrapperCollection()
-        {
-        }
-
-        internal bool Contains(DnsWrapper w)
-        {
-            foreach(DnsWrapper wrapper in InnerList)
-                if (w.Equals(wrapper))
-                    return true;
-
-            return false;
-        }
-
-        internal void Add(DnsWrapper w)
-        {
-            InnerList.Add(w);
-        }
-
-        /// <summary>
-        /// Gets the <see cref="DnsWrapper"/> at the specified
-        /// ordinal in the collection
-        /// </summary>
-        /// <remarks>
-        /// Gets the <see cref="DnsWrapper"/> at the specified
-        /// index of the collection.
-        /// </remarks>
-        /// <param name="i">The index to retrieve from the collection.</param>
-        /// <value>The <see cref="DnsWrapper"/> at the specified index of
-        /// the collection.</value>
-        public DnsWrapper this[int i]
-        {
-            get
-            {
-                return (DnsWrapper) InnerList[i];
-            }
-        }
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return new DnsWrapperCollectionEnumerator(this);
-        }
-
-        class DnsWrapperCollectionEnumerator: IEnumerator
-        {
-            private int idx = -1;
-            private readonly DnsWrapperCollection coll;
-
-            public DnsWrapperCollectionEnumerator(DnsWrapperCollection coll)
-            {
-                this.coll = coll;
-            }
-
-            void IEnumerator.Reset()
-            {
-                idx=-1;
-            }
-
-            bool IEnumerator.MoveNext()
-            {
-                idx++;
-
-                return idx < coll.Count;
-            }
-
-            object IEnumerator.Current
-            {
-                get
-                {
-                    return coll[idx];
-                }
-            }
-        }
-    }
-
-    /// <summary>
-    /// Represents one DNS request. Allows for a complete DNS record lookup
-    /// on a given _Domain using the Windows API.
-    /// </summary>
-    /// <remarks>
-    /// <para>
-    /// The DnsRequest class represents a complete DNS request for a given
-    /// _Domain on a specified DNS server, including all options. The
-    /// DnsRequest class uses the Windows API to do the query and the dlls
-    /// used are only found on Windows 2000 or higher machines. The class
-    /// will throw a <see cref="NotSupportedException"/> exception if run
-    /// on an machine not capable of using the APIs that are required.
-    /// </para>
-    /// <para>
-    /// Version Information
-    /// </para>
-    /// <para>
-    ///         3/8/2003 v1.1 (C#) - Released on 5/31/2003
-    /// </para>
-    /// <para>
-    /// Created by: Bill Gearhart. Based on code by Patrik Lundin.
-    /// See version 1.0 remarks below. Specific attention was given
-    /// to the exposed interface which got a 110% overhaul.
-    /// </para>
-    /// <para>
-    /// Notable changes from the previous version:
-    /// <list type="bullet">
-    ///     <item>
-    ///         <description>
-    ///             structs filled with constants were changed to enums
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             .net datatypes were changed to c# datatypes
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             every object is now in it's own *.cs file
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             custom collections and exceptions added
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             better object orientation - request and response classes
-    ///             created for the dns query request/response session so that
-    ///             it follows the .NET model
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             eliminated duplicate recs returned by an ALL query
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             bad api return code enumeration added
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             ToString() overridden to provide meaningful info for many
-    ///             of the dns data structs
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             documentation and notes were created for all classes
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             added check to ensure code only runs on w2k or better
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             obsolete DNS record types are now marked as such
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             newer enum values added to DnsQueryType enum
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             compiled html documentation was written which always takes
-    ///             20 times longer than writing the code does.
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             this list of changes was compiled by your's truly...
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             smoothed out object and member names so they were more
-    ///             intuitive - for instance: DNS_MX_DATA became MXRecord
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             added call to DnsRecordListFree API to free resources after
-    ///             DnsQuery call
-    ///         </description>
-    ///     </item>
-    ///     <item>
-    ///         <description>
-    ///             altered DnsQuery API call to allow for servers other than the
-    ///             local DNS server from being queried
-    ///         </description>
-    ///     </item>
-    /// </list>
-    /// </para>
-    /// <para>
-    ///     4/15/2002 v1.0 (C#)
-    /// </para>
-    /// <para>
-    /// Created by: Patrik Lundin
-    /// </para>
-    /// <para>
-    /// Based on code found at:
-    /// <a href="http://www.c-sharpcorner.com/Code/2002/April/DnsResolver.asp">http://www.c-sharpcorner.com/Code/2002/April/DnsResolver.asp</a>
-    ///
-    /// <list type="bullet">
-    ///     <item>
-    ///         <description>
-    ///             Initial implementation.
-    ///         </description>
-    ///     </item>
-    /// </list>
-    /// </para>
-    /// </remarks>
-    /// <example>
-    /// Use the <see cref="DnsRequest"/> and <see cref="DnsResponse"/> objects
-    /// together to get DNS information for aspemporium.com from the nameserver
-    /// where the site is hosted.
-    /// <code>
-    /// using System;
-    /// using netlib.Dns;
-    /// using netlib.Dns.Records;
-    ///
-    /// namespace ClassLibrary1
-    /// {
-    ///     class __loader
-    ///     {
-    ///         static void Main()
-    ///         {
-    ///             try
-    ///             {
-    ///                 DnsRequest request = new DnsRequest();
-    ///                 request.TreatAsFQDN=true;
-    ///                 request.BypassCache=true;
-    ///                 request.Servers.Add("dns.compresolve.com");
-    ///                 request._domain = "aspemporium.com";
-    ///                 DnsResponse response = request.GetResponse();
-    ///
-    ///                 Console.WriteLine("Addresses");
-    ///                 Console.WriteLine("--------------------------");
-    ///                 foreach(ARecord addr in response.ARecords)
-    ///                     Console.WriteLine("\t{0}", addr.ToString());
-    ///                 Console.WriteLine();
-    ///
-    ///                 Console.WriteLine("Name Servers");
-    ///                 Console.WriteLine("--------------------------");
-    ///                 foreach(PTRRecord ns in response.NSRecords)
-    ///                     Console.WriteLine("\t{0}", ns.ToString());
-    ///                 Console.WriteLine();
-    ///
-    ///                 Console.WriteLine("Mail Exchanges");
-    ///                 Console.WriteLine("--------------------------");
-    ///                 foreach(MXRecord exchange in response.MXRecords)
-    ///                     Console.WriteLine("\t{0}", exchange.ToString());
-    ///                 Console.WriteLine();
-    ///
-    ///                 Console.WriteLine("Canonical Names");
-    ///                 Console.WriteLine("--------------------------");
-    ///                 foreach(PTRRecord cname in response.GetRecords(DnsRecordType.CNAME))
-    ///                     Console.WriteLine("\t{0}", cname.ToString());
-    ///                 Console.WriteLine();
-    ///
-    ///                 Console.WriteLine("Start of Authority Records");
-    ///                 Console.WriteLine("--------------------------");
-    ///                 foreach(SOARecord soa in response.GetRecords(DnsRecordType.SOA))
-    ///                     Console.WriteLine("\t{0}", soa.ToString());
-    ///                 Console.WriteLine();
-    ///
-    ///                 //foreach(DnsWrapper wrap in response.RawRecords)
-    ///                 //{
-    ///                 //  Console.WriteLine(wrap.RecordType);
-    ///                 //}
-    ///
-    ///                 response = null;
-    ///                 request = null;
-    ///             }
-    ///             catch(DnsException ex)
-    ///             {
-    ///                 Console.WriteLine("EXCEPTION DOING DNS QUERY:");
-    ///                 Console.WriteLine("\t{0}", ((DnsQueryReturnCode) ex.ErrorCode).ToString("g"));
-    ///
-    ///                 if (ex.InnerException != null)
-    ///                     Console.WriteLine(ex.InnerException.ToString());
-    ///             }
-    ///         }
-    ///     }
-    /// }
-    ///
-    /// </code>
-    /// </example>
-    ///
-    public class DnsRequest
-    {
-        /// <summary>
-        /// http://msdn.microsoft.com/library/en-us/dns/dns/dnsquery.asp
-        /// </summary>
-        [DllImport("dnsapi", EntryPoint="DnsQuery_A")]
-        private static extern uint DnsQuery(
-            [MarshalAs(UnmanagedType.LPStr)]
-            string Name,
-
-            [MarshalAs(UnmanagedType.U2)]
-            DnsRecordType Type,
-
-            [MarshalAs(UnmanagedType.U4)]
-            DnsQueryType Options,
-
-            IntPtr Servers,
-
-            [In, Out]
-            ref IntPtr QueryResultsSet,
-
-            IntPtr Reserved
-            );
-
-        /// <summary>
-        /// http://msdn.microsoft.com/library/en-us/dns/dns/dnsrecordlistfree.asp
-        /// </summary>
-        [DllImport("dnsapi", EntryPoint="DnsRecordListFree")]
-        private static extern void DnsRecordListFree(
-            IntPtr RecordList,
-
-            DnsFreeType FreeType
-            );
-
-        private DnsQueryType QueryType;
-        private string _Domain;
-
-        /// <summary>
-        /// Gets or sets whether or not to use TCP only for the query.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to use TCP instead of UDP for the query</value>
-        /// <remarks>
-        /// If set to true, the DNS query will be done via TCP rather than UDP. This
-        /// is useful if the DNS service you are trying to reach is running on
-        /// TCP but not on UDP.
-        /// </remarks>
-        public bool UseTCPOnly
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.USE_TCP_ONLY);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.USE_TCP_ONLY, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to accept truncated results �
-        /// does not retry under TCP.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to accept truncated results.</value>
-        /// <remarks>
-        /// Determines wherher or not the server will be re-queried in the event
-        /// that a response was truncated.
-        /// </remarks>
-        public bool AcceptTruncatedResponse
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.ACCEPT_TRUNCATED_RESPONSE);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.ACCEPT_TRUNCATED_RESPONSE, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to perform an iterative query
-        /// </summary>
-        /// <value>Boolean indicating whether or not to use recursion
-        /// to resolve the query.</value>
-        /// <remarks>
-        /// Specifically directs the DNS server not to perform
-        /// recursive resolution to resolve the query.
-        /// </remarks>
-        public bool NoRecursion
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.NO_RECURSION);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.NO_RECURSION, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to bypass the resolver cache
-        /// on the lookup.
-        /// </summary>
-        /// <remarks>
-        /// Setting this to true allows you to specify one or more DNS servers
-        /// to query instead of querying the local DNS cache and server.
-        /// If false is set, the list of servers is ignored and the local DNS
-        /// cache and server is used to resolve the query.
-        /// </remarks>
-        public bool BypassCache
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.BYPASS_CACHE);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.BYPASS_CACHE, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to direct DNS to perform a
-        /// query on the local cache only
-        /// </summary>
-        /// <value>Boolean indicating whether or not to only use the
-        /// DNS cache to resolve a query.</value>
-        /// <remarks>
-        /// This option allows you to query the local DNS cache only instead
-        /// of making a DNS request over either UDP or TCP.
-        /// This property represents the logical opposite of the
-        /// <see cref="WireOnly"/> property.
-        /// </remarks>
-        public bool QueryCacheOnly
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.NO_WIRE_QUERY);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.NO_WIRE_QUERY, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to direct DNS to perform a
-        /// query using the network only, bypassing local information.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to use the
-        /// network only instead of local information.</value>
-        /// <remarks>
-        /// This property represents the logical opposite of the
-        /// <see cref="QueryCacheOnly"/> property.
-        /// </remarks>
-        public bool WireOnly
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.WIRE_ONLY);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.WIRE_ONLY, value);
-            }
-        }
-
-
-        /// <summary>
-        /// Gets or sets whether or not to direct DNS to ignore the
-        /// local name.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to ignore the local name.</value>
-        /// <remarks>
-        /// Determines how the DNS query handles local names.
-        /// </remarks>
-        public bool NoLocalName
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.NO_LOCAL_NAME);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.NO_LOCAL_NAME, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to prevent the DNS query from
-        /// consulting the HOSTS file.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to deny access to
-        /// the HOSTS file when querying.</value>
-        /// <remarks>
-        /// Determines how the DNS query handles accessing the HOSTS file when
-        /// querying for DNS information.
-        /// </remarks>
-        public bool NoHostsFile
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.NO_HOSTS_FILE);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.NO_HOSTS_FILE, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to prevent the DNS query from
-        /// using NetBT for resolution.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to deny access to
-        /// NetBT during the query.</value>
-        /// <remarks>
-        /// Determines how the DNS query handles accessing NetBT when
-        /// querying for DNS information.
-        /// </remarks>
-        public bool NoNetbt
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.NO_NETBT);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.NO_NETBT, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to direct DNS to return
-        /// the entire DNS response message.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to return the entire
-        /// response.</value>
-        /// <remarks>
-        /// Determines how the DNS query expects the response to be
-        /// received from the server.
-        /// </remarks>
-        public bool QueryReturnMessage
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.RETURN_MESSAGE);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.RETURN_MESSAGE, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to prevent the DNS
-        /// response from attaching suffixes to the submitted
-        /// name in a name resolution process.
-        /// </summary>
-        /// <value>Boolean indicating whether or not to allow
-        /// suffix attachment during resolution.</value>
-        /// <remarks>
-        /// Determines how the DNS server handles suffix appending
-        /// to the submitted name during name resolution.
-        /// </remarks>
-        public bool TreatAsFQDN
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.TREAT_AS_FQDN);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.TREAT_AS_FQDN, value);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets whether or not to store records
-        /// with the TTL corresponding to the minimum value
-        /// TTL from among all records
-        /// </summary>
-        /// <value>Boolean indicating whether or not to
-        /// use TTL values from all records.</value>
-        /// <remarks>
-        /// Determines how the DNS query handles TTL values.
-        /// </remarks>
-        public bool DontResetTTLValues
-        {
-            get
-            {
-                return GetSetting(DnsQueryType.DONT_RESET_TTL_VALUES);
-            }
-
-            set
-            {
-                SetSetting(DnsQueryType.DONT_RESET_TTL_VALUES, value);
-            }
-        }
-
-        private bool GetSetting(DnsQueryType type)
-        {
-            DnsQueryType srchval = type;
-            bool isset = (QueryType & srchval) == srchval;
-            return isset;
-        }
-
-        private void SetSetting(DnsQueryType type, bool newvalue)
-        {
-            DnsQueryType srchval = type;
-            bool isset = (QueryType & srchval) == srchval;
-            bool newset = newvalue;
-
-            //compare
-            if (isset.CompareTo(newset) == 0)
-                return;
-
-            //toggle
-            QueryType ^= srchval;
-        }
-
-        /// <summary>
-        /// Gets or sets the _Domain to query. The _Domain must be a hostname,
-        /// not an IP address.
-        /// </summary>
-        /// <remarks>
-        /// This method is expecting a hostname, not an IP address. The
-        /// system will fail with a <see cref="DnsException"/> when
-        /// <see cref="GetResponse"/> is called if _domain is an IP address.
-        /// </remarks>
-        /// <value>String representing the _Domain that DNS information
-        /// is desired for. This should be set to a hostname and not an
-        /// IP Address.</value>
-        public string _domain
-        {
-            get
-            {
-                return _Domain;
-            }
-            set
-            {
-                _Domain=value;
-            }
-        }
-
-        /// <summary>
-        /// Creates a new instance of <see cref="DnsRequest"/>
-        /// </summary>
-        /// <remarks>
-        /// The <see cref="_domain"/> property is set to null
-        /// and all other properties have their default value
-        /// of false, except for <see cref="TreatAsFQDN"/> which has a value
-        /// of true. The system is set to use the local DNS
-        /// server for all queries.
-        /// </remarks>
-        public DnsRequest()
-        {
-            Initialize(null);
-        }
-
-        /// <summary>
-        /// Creates a new instance of <see cref="DnsRequest"/>
-        /// </summary>
-        /// <remarks>
-        /// The <see cref="_domain"/> property is set to the domain
-        /// argument and all other properties have their default value
-        /// of false, except for <see cref="TreatAsFQDN"/> which has a value
-        /// of true. The system is set to use the local DNS
-        /// server for all queries.
-        /// </remarks>
-        /// <param name="domain">The hostname that DNS information is desired for.
-        /// This should not be an ip address. For example: yahoo.com</param>
-        public DnsRequest(string domain)
-        {
-            Initialize(domain);
-        }
-
-        private void Initialize(string domain)
-        {
-            _domain=domain;
-            QueryType = DnsQueryType.STANDARD|DnsQueryType.TREAT_AS_FQDN;
-        }
-
-        /// <summary>
-        /// Queries the local DNS server for information about
-        /// this instance of <see cref="DnsRequest"/> and returns
-        /// the response as a <see cref="DnsResponse"/>
-        /// </summary>
-        /// <returns>A <see cref="DnsResponse"/> object containing the response
-        /// from the DNS server.</returns>
-        /// <exception cref="NotSupportedException">
-        /// The code is running on a machine lesser than Windows 2000
-        /// </exception>
-        /// <exception cref="ArgumentNullException">
-        /// The <see cref="_domain"/> property is null
-        /// </exception>
-        /// <exception cref="DnsException">
-        /// The DNS query itself failed or parsing of the returned
-        /// response failed
-        /// </exception>
-        /// <remarks>
-        /// Returns a <see cref="DnsResponse"/> representing the response
-        /// from the DNS server or one of the exceptions noted in the
-        /// exceptions area, the most common of which is the
-        /// <see cref="DnsException"/>.
-        /// </remarks>
-        public DnsResponse GetResponse(DnsRecordType dnstype)
-        {
-            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
-                throw new NotSupportedException("This API is found only on Windows NT or better.");
-
-            if (_domain == null)
-                throw new ArgumentNullException();
-
-            string strDomain = _domain;
-            DnsQueryType querytype = QueryType;
-
-            object Data = new object();
-
-            IntPtr ppQueryResultsSet = IntPtr.Zero;
-            try
-            {
-                uint ret = DnsQuery(strDomain, dnstype, querytype, IntPtr.Zero, ref ppQueryResultsSet, IntPtr.Zero);
-                if (ret != 0)
-                    throw new DnsException("DNS query fails", ret);
-
-                DnsResponse resp = new DnsResponse();
-                // Parse the records.
-                // Call function to loop through linked list and fill an array of records
-                do
-                {
-                    // Get the DNS_RECORD
-                    DnsRecord dnsrec = (DnsRecord)Marshal.PtrToStructure(
-                        ppQueryResultsSet,
-                        typeof(DnsRecord)
-                        );
-
-                    // Get the Data part
-                    GetData(ppQueryResultsSet, ref dnsrec, ref Data);
-
-                    // Wrap data in a struct with the type and data
-                    DnsWrapper wrapper = new DnsWrapper();
-                    wrapper.RecordType = dnsrec.RecordType;
-                    wrapper.RecordData = Data;
-
-                    // Note: this is *supposed* to return many records of the same type.  Don't check for uniqueness.
-                    // Add wrapper to array
-                    //if (! resp.RawRecords.Contains(wrapper))
-                    resp.RawRecords.Add( wrapper );
-
-                    ppQueryResultsSet = dnsrec.Next;
-                } while (ppQueryResultsSet != IntPtr.Zero);
-
-                return resp;
-            }
-            catch(DnsException)
-            {
-                throw;
-            }
-            catch(Exception ex)
-            {
-                throw new DnsException("unspecified error", ex);
-            }
-            finally
-            {
-                //ensure unmanaged code cleanup occurs
-
-                //free pointer to DNS record block
-                DnsRecordListFree(ppQueryResultsSet, DnsFreeType.FreeRecordList);
-            }
-        }
-
-        private static void GetData(IntPtr ptr, ref DnsRecord dnsrec, ref object Data)
-        {
-            int size = ptr.ToInt32() + Marshal.SizeOf( dnsrec );
-            ptr = new IntPtr(size);// Skip over the header portion of the DNS_RECORD to the data portion.
-            switch ( dnsrec.RecordType )
-            {
-                case DnsRecordType.A:
-                    Data = (ARecord)Marshal.PtrToStructure( ptr, typeof(ARecord) );
-                    break;
-
-                case DnsRecordType.CNAME:
-                case DnsRecordType.PTR:
-                    Data = (PTRRecord)Marshal.PtrToStructure( ptr, typeof(PTRRecord) );
-                    break;
-
-                case DnsRecordType.MX:
-                    Data = (MXRecord)Marshal.PtrToStructure( ptr, typeof(MXRecord) );
-                    break;
-
-                case DnsRecordType.SOA:
-                    Data = (SOARecord)Marshal.PtrToStructure( ptr, typeof(SOARecord) );
-                    break;
-
-                case DnsRecordType.SRV:
-                    Data = (SRVRecord)Marshal.PtrToStructure( ptr, typeof(SRVRecord) );
-                    break;
-
-                case DnsRecordType.TEXT:
-                    Data = (TXTRecord)Marshal.PtrToStructure(ptr, typeof(TXTRecord));
-                    break;
-
-                default:
-                    Data = null;
-                    break;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Represents one DNS response. This class cannot be directly created -
-    /// it is returned by the <see cref="DnsRequest.GetResponse"/> method.
-    /// </summary>
-    /// <remarks>
-    /// The DnsResponse class represents the information returned by a DNS
-    /// server in response to a <see cref="DnsRequest"/>. The DnsResponse
-    /// class offers easy access to all of the returned DNS records for a given
-    /// domain.
-    /// </remarks>
-    public class DnsResponse
-    {
-        private readonly DnsWrapperCollection rawrecords;
-
-        internal DnsResponse()
-        {
-            rawrecords = new DnsWrapperCollection();
-        }
-
-        /// <summary>
-        /// Gets a <see cref="DnsWrapperCollection" /> containing
-        /// all of the DNS information that the server returned about
-        /// the queried domain.
-        /// </summary>
-        /// <remarks>
-        /// Returns all of the DNS records retrieved about the domain
-        /// as a <see cref="DnsWrapperCollection"/>. This property
-        /// is wrapped by the <see cref="GetRecords"/> method.
-        /// </remarks>
-        /// <value>Gets a collection of <see cref="DnsWrapper"/> objects.</value>
-        public DnsWrapperCollection RawRecords
-        {
-            get
-            {
-                return rawrecords;
-            }
-        }
-
-        /// <summary>
-        /// Returns a collection of DNS records of a specified
-        /// <see cref="DnsRecordType"/>. The collection's data type
-        /// is determined by the type of record being sought in the
-        /// type argument.
-        /// </summary>
-        /// <param name="type">A <see cref="DnsRecordType"/> enumeration
-        /// value indicating the type of DNS record to get from the list of
-        /// all DNS records (available in the <see cref="RawRecords"/>
-        /// property.</param>
-        /// <returns>an <see cref="ArrayList"/> of one of the types
-        /// specified in the <see cref="netlib.Dns.Records"/> namespace based
-        /// on the <see cref="DnsRecordType"/> argument representing the
-        /// type of DNS record desired.
-        /// </returns>
-        /// <remarks>
-        /// It is recommended that you loop through the results of this
-        /// method as follows for maximum convenience:
-        /// <code>
-        /// foreach (<see cref="netlib.Dns.Records"/> record in obj.GetRecords(<see cref="DnsRecordType"/>))
-        /// {
-        ///     string s = record.ToString();
-        /// }
-        /// </code>
-        /// The following table indicates the DNS record type you can expect to get
-        /// back based on the <see cref="DnsRecordType"/> requested. Any items returning
-        /// null are not currently supported.
-        /// <list type="table">
-        ///     <listheader>
-        ///         <term>DnsRecordType enumeration value</term>
-        ///         <term>GetRecords() returns</term>
-        ///     </listheader>
-        ///     <item>
-        ///         <term>A</term>
-        ///         <description><see cref="netlib.Dns.Records.ARecord"/></description>
-        ///     </item>
-        ///     <item>
-        ///         <term>CNAME</term>
-        ///         <description><see cref="netlib.Dns.Records.PTRRecord"/></description>
-        ///     </item>
-        ///     <item>
-        ///         <term>PTR</term>
-        ///         <description><see cref="netlib.Dns.Records.PTRRecord"/></description>
-        ///     </item>
-        ///     <item>
-        ///         <term>MX</term>
-        ///         <description><see cref="netlib.Dns.Records.MXRecord"/></description>
-        ///     </item>
-        ///     <item>
-        ///         <term>SRV</term>
-        ///         <description><see cref="netlib.Dns.Records.SRVRecord"/></description>
-        ///     </item>
-        ///     <item>
-        ///         <term>TEXT</term>
-        ///         <description><see cref="netlib.Dns.Records.TXTRecord"/></description>
-        ///     </item>
-        /// </list>
-        /// </remarks>
-        public ArrayList GetRecords(DnsRecordType type)
-        {
-            ArrayList arr = new ArrayList();
-            foreach(DnsWrapper dnsentry in rawrecords)
-                if (dnsentry.Equals(type))
-                    arr.Add(dnsentry.RecordData);
-
-            return arr;
-        }
-
-        /// <summary>
-        /// Gets all the <see cref="SRVRecord"/> for the queried domain.
-        /// </summary>
-        /// <remarks>
-        /// Uses the <see cref="GetRecords"/> method to retrieve an
-        /// array of <see cref="SRVRecord"/>s representing all the Address
-        /// records for the domain.
-        /// </remarks>
-        /// <value>An array of <see cref="SRVRecord"/> objects.</value>
-        public SRVRecord[] SRVRecords
-        {
-            get
-            {
-                ArrayList arr = GetRecords(DnsRecordType.SRV);
-                return (SRVRecord[])arr.ToArray(typeof(SRVRecord));
-            }
-        }
-
-        /// <summary>
-        /// Gets all the <see cref="TXTRecord"/> for the queried domain.
-        /// </summary>
-        /// <remarks>
-        /// Uses the <see cref="GetRecords"/> method to retrieve an
-        /// array of <see cref="TXTRecord"/>s representing all the Address
-        /// records for the domain.
-        /// </remarks>
-        /// <value>An array of <see cref="SRVRecord"/> objects.</value>
-        public TXTRecord[] TXTRecords
-        {
-            get
-            {
-                ArrayList arr = GetRecords(DnsRecordType.TEXT);
-                return (TXTRecord[])arr.ToArray(typeof(TXTRecord));
-            }
-        }
-        /// <summary>
-        /// Gets all the <see cref="MXRecord"/> for the queried domain.
-        /// </summary>
-        /// <remarks>
-        /// Uses the <see cref="GetRecords"/> method to retrieve an
-        /// array of <see cref="MXRecord"/>s representing all the Mail Exchanger
-        /// records for the domain.
-        /// </remarks>
-        /// <value>An array of <see cref="MXRecord"/> objects.</value>
-        public MXRecord[] MXRecords
-        {
-            get
-            {
-                ArrayList arr = GetRecords(DnsRecordType.MX);
-                return (MXRecord[]) arr.ToArray(typeof(MXRecord));
-            }
-        }
-    }
-
-    namespace Records
-    {
-        /// <summary>
-        /// Represents a DNS Text record (DNS_TXT_DATA)
-        /// </summary>
-        /// <remarks>
-        /// The TXTRecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct TXTRecord
-        {
-            /// <summary>
-            /// Gets or sets the string count
-            /// </summary>
-            /// <remarks>
-            /// Number of strings represented in pStringArray.
-            /// </remarks>
-            public uint StringCount;
-
-            /// <summary>
-            /// Gets or sets the string array
-            /// </summary>
-            /// <remarks>
-            /// Array of strings representing the descriptive text of the
-            /// TXT resource record.
-            /// </remarks>
-            public string StringArray;
-
-            /// <summary>
-            /// Returns a string representation of this record.
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// string count: [COUNT] string array: [ARR]
-            /// where [COUNT] = string representation of <see cref="StringCount"/>
-            /// and   [ARR] = string representation of <see cref="StringArray"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format(
-                    "string count: {0} string array: {1}",
-                    StringCount,
-                    StringArray
-                    );
-            }
-        }
-
-        /// <summary>
-        /// Represents a DNS Server record. (DNS_SRV_DATA)
-        /// </summary>
-        /// <remarks>
-        /// The SRVRecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct SRVRecord
-        {
-            /// <summary>
-            /// Gets or sets the name
-            /// </summary>
-            /// <remarks>
-            /// Pointer to a string representing the target host.
-            /// </remarks>
-            public string NameNext;
-
-            /// <summary>
-            /// Gets or sets the priority
-            /// </summary>
-            /// <remarks>
-            /// Priority of the target host specified in the owner name. Lower numbers imply higher priority.
-            /// </remarks>
-            public ushort Priority;
-
-            /// <summary>
-            /// Gets or sets the weight
-            /// </summary>
-            /// <remarks>
-            /// Weight of the target host. Useful when selecting among hosts with the same priority. The chances of using this host should be proportional to its weight.
-            /// </remarks>
-            public ushort Weight;
-
-            /// <summary>
-            /// Gets or sets the port
-            /// </summary>
-            /// <remarks>
-            /// Port used on the terget host for the service.
-            /// </remarks>
-            public ushort Port;
-
-            /// <summary>
-            /// Reserved.
-            /// </summary>
-            /// <remarks>
-            /// Reserved. Used to keep pointers DWORD aligned.
-            /// </remarks>
-            public ushort Pad;
-
-            /// <summary>
-            /// Returns a string representation of this record.
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// name next: [SERVER] priority: [PRIOR] weight: [WEIGHT] port: [PORT]
-            /// where [SERVER] = string representation of <see cref="NameNext"/>
-            /// and   [PRIOR] = string representation of <see cref="Priority"/>
-            /// and   [WEIGHT] = string representation of <see cref="Weight"/>
-            /// and   [PORT] = string representation of <see cref="Port"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format(
-                    "name next: {0} priority: {1} weight: {2} port: {3}",
-                    NameNext,
-                    Priority,
-                    Weight,
-                    Port
-                    );
-            }
-        }
-
-        /// <summary>
-        /// Represents a DNS Start Of Authority record (DNS_SOA_DATA)
-        /// </summary>
-        /// <remarks>
-        /// The SOARecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct SOARecord
-        {
-            /// <summary>
-            /// Gets or sets the primary server
-            /// </summary>
-            /// <remarks>
-            /// Pointer to a string representing the name of the authoritative
-            /// DNS server for the zone to which the record belongs.
-            /// </remarks>
-            public string PrimaryServer;
-
-            /// <summary>
-            /// Gets or sets the name of the administrator
-            /// </summary>
-            /// <remarks>
-            /// Pointer to a string representing the name of the responsible party
-            /// for the zone to which the record belongs.
-            /// </remarks>
-            public string Administrator;
-
-            /// <summary>
-            /// Gets or sets the serial number
-            /// </summary>
-            /// <remarks>
-            /// Serial number of the SOA record.
-            /// </remarks>
-            public uint SerialNo;
-
-            /// <summary>
-            /// Gets or sets the refresh
-            /// </summary>
-            /// <remarks>
-            /// Time, in seconds, before the zone containing this record should be
-            /// refreshed.
-            /// </remarks>
-            public uint Refresh;
-
-            /// <summary>
-            /// Gets or sets the retry count
-            /// </summary>
-            /// <remarks>
-            /// Time, in seconds, before retrying a failed refresh of the zone to
-            /// which this record belongs
-            /// </remarks>
-            public uint Retry;
-
-            /// <summary>
-            /// Gets or sets the expiration
-            /// </summary>
-            /// <remarks>
-            /// Time, in seconds, before an unresponsive zone is no longer authoritative.
-            /// </remarks>
-            public uint Expire;
-
-            /// <summary>
-            /// Gets or sets the default ttl
-            /// </summary>
-            /// <remarks>
-            /// Lower limit on the time, in seconds, that a DNS server or caching
-            /// resolver are allowed to cache any RRs from the zone to which this
-            /// record belongs.
-            /// </remarks>
-            public uint DefaultTtl;
-
-            /// <summary>
-            /// Returns a string representation of the Start Of Authority record.
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// administrator: [ADMIN] TTL: [TTL] primary server: [SERVER] refresh: [REFRESH] retry: [RETRY] serial number: [SERIAL]
-            /// where [ADMIN] = string representation of <see cref="Administrator"/>
-            /// and   [TTL] = string representation of <see cref="DefaultTtl"/>
-            /// and   [SERVER] = string representation of <see cref="PrimaryServer"/>
-            /// and   [REFRESH] = string representation of <see cref="Refresh"/>
-            /// and   [RETRY] = string representation of <see cref="Retry"/>
-            /// and   [SERIAL] = string representation of <see cref="SerialNo"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format(
-                    "administrator: {0} TTL: {1} primary server: {2} refresh: {3} retry: {4} serial number: {5}",
-                    Administrator,
-                    DefaultTtl,
-                    PrimaryServer,
-                    Refresh,
-                    Retry,
-                    SerialNo
-                    );
-            }
-        }
-
-        /// <summary>
-        /// Represents the DNS pointer record (DNS_PTR_DATA)
-        /// </summary>
-        /// <remarks>
-        /// The PTRRecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct PTRRecord
-        {
-            /// <summary>
-            /// Gets or sets the hostname of the record.
-            /// </summary>
-            /// <remarks>
-            /// Pointer to a string representing the pointer (PTR) record data.
-            /// </remarks>
-            public string HostName;
-
-            /// <summary>
-            /// Returns a string representation of the pointer record.
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// Hostname: [HOST]
-            /// where [HOST] = string representation of <see cref="HostName"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format("Hostname: {0}", HostName);
-            }
-        }
-
-        /// <summary>
-        /// Represents a DNS Mail Exchange record (DNS_MX_DATA).
-        /// </summary>
-        /// <remarks>
-        /// The MXRecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct MXRecord
-        {
-            /// <summary>
-            /// Gets or sets the exchange's host name
-            /// </summary>
-            /// <remarks>
-            /// Pointer to a string representing the fully qualified domain name
-            /// (FQDN) of the host willing to act as a mail exchange.
-            /// </remarks>
-            public string Exchange;
-
-            /// <summary>
-            /// Gets or sets the preference of the exchange.
-            /// </summary>
-            /// <remarks>
-            /// Preference given to this resource record among others at the same
-            /// owner. Lower values are preferred.
-            /// </remarks>
-            public ushort Preference;
-
-            /// <summary>
-            /// Reserved.
-            /// </summary>
-            /// <remarks>
-            /// Reserved. Used to keep pointers DWORD aligned.
-            /// </remarks>
-            public ushort Pad; // to keep dword aligned
-
-            /// <summary>
-            /// Returns a string representation of this mail exchange.
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// exchange (preference): [EXCH] ([PREF])
-            /// where [EXCH] = string representation of <see cref="Exchange"/>
-            /// and   [PREF] = hexadecimal representation of <see cref="Preference"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format(
-                    "exchange (preference): {0} ({1})",
-                    Exchange,
-                    Preference
-                    );
-            }
-        }
-
-        /// <summary>
-        /// Represents a DNS Address record (DNS_A_DATA)
-        /// </summary>
-        /// <remarks>
-        /// The ARecord structure is used in conjunction with
-        /// the <see cref="DnsRequest"/> and <see cref="DnsResponse"/>
-        /// classes to programmatically manage DNS entries.
-        /// </remarks>
-        [StructLayout(LayoutKind.Sequential)]
-        public struct ARecord
-        {
-            /// <summary>
-            /// Gets or sets the ip address.
-            /// </summary>
-            /// <remarks>
-            /// IPv4 address, in the form of an uint datatype.
-            /// <see cref="System.Net.IPAddress"/> could be
-            /// used to fill this property.
-            /// </remarks>
-            public uint Address;
-
-            /// <summary>
-            /// Returns a string representation of the A Record
-            /// </summary>
-            /// <returns></returns>
-            /// <remarks>
-            /// The string returned looks like:
-            /// <code>
-            /// ip address: [ADDRESS]
-            /// where [ADDRESS] = <see cref="System.Net.IPAddress.ToString()"/>
-            /// </code>
-            /// </remarks>
-            public override string ToString()
-            {
-                return String.Format(
-                    "ip address: {0}",
-                    new IPAddress(Address)
-                    );
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/AssemblyInfo.cs b/lib/jabber-net/stringprep/AssemblyInfo.cs
deleted file mode 100644
index 4a03ff5..0000000
--- a/lib/jabber-net/stringprep/AssemblyInfo.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Reflection;
-
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyName("")]
-#if !NET20
-[assembly: AssemblyKeyFile(@"..\..\..\jabbernet.key")]
-#endif
diff --git a/lib/jabber-net/stringprep/Nameprep.cs b/lib/jabber-net/stringprep/Nameprep.cs
deleted file mode 100644
index 7c93247..0000000
--- a/lib/jabber-net/stringprep/Nameprep.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using stringprep.steps;
-
-namespace stringprep
-{
-    /// <summary>
-    /// RFC 3491, "nameprep" profile, for internationalized domain names.
-    /// </summary>
-    public class Nameprep : Profile
-    {
-        /// <summary>
-        /// Create a nameprep instance.
-        /// </summary>
-        public Nameprep() :
-            base( new ProfileStep[] {   B_1, B_2, NFKC,
-                                        C_1_2, C_2_2, C_3, C_4, C_5, C_6, C_7, C_8, C_9,
-                                        BIDI, UNASSIGNED} )
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/Plain.cs b/lib/jabber-net/stringprep/Plain.cs
deleted file mode 100644
index 5107bc1..0000000
--- a/lib/jabber-net/stringprep/Plain.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using stringprep.steps;
-
-namespace stringprep
-{
-    /// <summary>
-    /// A relatively plain stringprep profile, that doesn't do case folding, or prevent unassigned characters.
-    /// </summary>
-    public class Plain : Profile
-    {
-        /// <summary>
-        /// Create a Plain instance.
-        /// </summary>
-        public Plain() :
-            base( new ProfileStep[] {   C_2_1, C_2_2,
-                                        C_3, C_4, C_5, C_6, C_8, C_9,
-                                        BIDI } )
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/Profile.cs b/lib/jabber-net/stringprep/Profile.cs
deleted file mode 100644
index b0dca52..0000000
--- a/lib/jabber-net/stringprep/Profile.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Text;
-using System.Diagnostics;
-using stringprep.steps;
-
-namespace stringprep
-{
-
-    /// <summary>
-    /// Summary description for Prep.
-    /// </summary>
-    public class Profile
-    {
-        /// <summary>
-        /// RFC 3454, Appendix B.1
-        /// </summary>
-        public static readonly MapStep B_1 = new MapStep(RFC3454.B_1, "RFC3454.B_1");
-        /// <summary>
-        /// RFC 3454, Appendix B.2
-        /// </summary>
-        public static readonly MapStep B_2 = new MapStep(RFC3454.B_2, "RFC3454.B_2");
-        /// <summary>
-        /// RFC 3454, Appendix B.3
-        /// </summary>
-        public static readonly MapStep B_3 = new MapStep(RFC3454.B_3, "RFC3454.B_3");
-
-        /// <summary>
-        /// RFC 3454, Appendix C.1.1
-        /// </summary>
-        public static readonly ProhibitStep C_1_1 = new ProhibitStep(RFC3454.C_1_1, "RFC3454.C_1_1");
-        /// <summary>
-        /// RFC 3454, Appendix C.1.2
-        /// </summary>
-        public static readonly ProhibitStep C_1_2 = new ProhibitStep(RFC3454.C_1_2, "RFC3454.C_1_2");
-        /// <summary>
-        /// RFC 3454, Appendix C.2.1
-        /// </summary>
-        public static readonly ProhibitStep C_2_1 = new ProhibitStep(RFC3454.C_2_1, "RFC3454.C_2_1");
-        /// <summary>
-        /// RFC 3454, Appendix C.2.2
-        /// </summary>
-        public static readonly ProhibitStep C_2_2 = new ProhibitStep(RFC3454.C_2_2, "RFC3454.C_2_2");
-        /// <summary>
-        /// RFC 3454, Appendix C.3
-        /// </summary>
-        public static readonly ProhibitStep C_3   = new ProhibitStep(RFC3454.C_3, "RFC3454.C_3");
-        /// <summary>
-        /// RFC 3454, Appendix C.4
-        /// </summary>
-        public static readonly ProhibitStep C_4   = new ProhibitStep(RFC3454.C_4, "RFC3454.C_4");
-        /// <summary>
-        /// RFC 3454, Appendix C.5
-        /// </summary>
-        public static readonly ProhibitStep C_5   = new ProhibitStep(RFC3454.C_5, "RFC3454.C_5");
-        /// <summary>
-        /// RFC 3454, Appendix C.6
-        /// </summary>
-        public static readonly ProhibitStep C_6   = new ProhibitStep(RFC3454.C_6, "RFC3454.C_6");
-        /// <summary>
-        /// RFC 3454, Appendix C.7
-        /// </summary>
-        public static readonly ProhibitStep C_7   = new ProhibitStep(RFC3454.C_7, "RFC3454.C_7");
-        /// <summary>
-        /// RFC 3454, Appendix C.8
-        /// </summary>
-        public static readonly ProhibitStep C_8   = new ProhibitStep(RFC3454.C_8, "RFC3454.C_8");
-        /// <summary>
-        /// RFC 3454, Appendix C.9
-        /// </summary>
-        public static readonly ProhibitStep C_9   = new ProhibitStep(RFC3454.C_9, "RFC3454.C_9");
-
-        /// <summary>
-        /// RFC 3454, Section 4
-        /// </summary>
-        public static readonly NFKCStep NFKC = new NFKCStep();
-        /// <summary>
-        /// RFC 3454, Section 6
-        /// </summary>
-        public static readonly BidiStep BIDI = new BidiStep();
-        /// <summary>
-        /// RFC 3454, Section 7
-        /// </summary>
-        public static readonly ProhibitStep UNASSIGNED = new ProhibitStep(RFC3454.A_1, "RFC3454.A_1");
-
-        private ProfileStep[] m_profile;
-
-        /// <summary>
-        /// Create a new profile, with the given steps.
-        /// </summary>
-        /// <param name="profile">The steps to perform</param>
-        public Profile(ProfileStep[] profile)
-        {
-            m_profile = profile;
-        }
-
-        /// <summary>
-        /// Prepare a string, according to the specified profile.
-        /// </summary>
-        /// <param name="input">The string to prepare</param>
-        /// <returns>The prepared string</returns>
-        public string Prepare(string input)
-        {
-            StringBuilder result = new StringBuilder(input);
-            Prepare(result);
-            return result.ToString();
-        }
-
-        /// <summary>
-        /// Prepare a string, according to the specified profile, in place.
-        /// Not thread safe; make sure the input is locked, if appropriate.
-        /// (this is the canonical version, that should be overriden by
-        /// subclasses if necessary)
-        /// </summary>
-        /// <param name="result">The string to prepare in place</param>
-        public virtual void Prepare(StringBuilder result)
-        {
-            foreach (ProfileStep step in m_profile)
-            {
-                step.Prepare(result);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/ResTool/AssemblyInfo.cs b/lib/jabber-net/stringprep/ResTool/AssemblyInfo.cs
deleted file mode 100644
index b38a2c6..0000000
--- a/lib/jabber-net/stringprep/ResTool/AssemblyInfo.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Reflection;
-
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
diff --git a/lib/jabber-net/stringprep/ResTool/Main.cs b/lib/jabber-net/stringprep/ResTool/Main.cs
deleted file mode 100644
index dc0d763..0000000
--- a/lib/jabber-net/stringprep/ResTool/Main.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Resources;
-using System.Reflection;
-
-namespace ResTool
-{
-    /// <summary>
-    /// Summary description for Class1.
-    /// </summary>
-    class MainApp
-    {
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main(string[] args)
-        {
-            if (args.Length < 2)
-            {
-                Console.WriteLine("Usage: ResTool <assembly> <resxfile>");
-                Environment.Exit(64);
-            }
-            Assembly asy = Assembly.LoadFrom(args[0]);
-            ResXResourceWriter resx = new ResXResourceWriter(args[1]);
-            foreach (Type t in asy.GetTypes())
-            {
-                foreach (FieldInfo fi in t.GetFields())
-                {
-                    if (!fi.IsStatic)
-                        continue;
-
-                    string n = t.Name + "." + fi.Name;
-                    Console.WriteLine(n);
-
-                    resx.AddResource(n, fi.GetValue(null));
-                }
-            }
-            resx.Close();
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/XmppNode.cs b/lib/jabber-net/stringprep/XmppNode.cs
deleted file mode 100644
index 43e863b..0000000
--- a/lib/jabber-net/stringprep/XmppNode.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using stringprep.steps;
-
-namespace stringprep
-{
-    /// <summary>
-    /// A stringprep profile for draft-ietf-xmpp-nodeprep-02, for Jabber nodes (the "user" part).
-    /// </summary>
-    public class XmppNode : Profile
-    {
-        private static readonly ProhibitStep XmppNodeprepProhibit =
-            new ProhibitStep(new char[][]
-                {   // note: these *must* be sorted by code.
-                    new char[] {'"', '\x0000'},
-                    new char[] {'&', '\x0000'},
-                    new char[] {'\'', '\x0000'},
-                    new char[] {'/', '\x0000'},
-                    new char[] {':', '\x0000'},
-                    new char[] {'<', '\x0000'},
-                    new char[] {'>', '\x0000'},
-                    new char[] {'@', '\x0000'},
-                }, "XMPP Node");
-
-        /// <summary>
-        /// Create a new XmppNode profile instance.
-        /// </summary>
-        public XmppNode() :
-            base( new ProfileStep[] {   B_1, B_2, NFKC,
-                                        C_1_1, C_1_2, C_2_1, C_2_2,
-                                        C_3, C_4, C_5, C_6, C_7, C_8, C_9,
-                                        XmppNodeprepProhibit,
-                                        BIDI, UNASSIGNED} )
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/XmppResource.cs b/lib/jabber-net/stringprep/XmppResource.cs
deleted file mode 100644
index 31a0693..0000000
--- a/lib/jabber-net/stringprep/XmppResource.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using stringprep.steps;
-
-namespace stringprep
-{
-    /// <summary>
-    /// A stringprep profile for draft-ietf-xmpp-resourceprep-02, used for Jabber resources.
-    /// </summary>
-    public class XmppResource : Profile
-    {
-        /// <summary>
-        /// Create an instance of an XmppResource
-        /// </summary>
-        public XmppResource() :
-            base( new ProfileStep[] {   B_1, NFKC,
-                                        C_1_2, C_2_1, C_2_2,
-                                        C_3, C_4, C_5, C_6, C_7, C_8, C_9,
-                                        BIDI, UNASSIGNED} )
-        {
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/steps/BidiStep.cs b/lib/jabber-net/stringprep/steps/BidiStep.cs
deleted file mode 100644
index baffcd3..0000000
--- a/lib/jabber-net/stringprep/steps/BidiStep.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-namespace stringprep.steps
-{
-    /// <summary>
-    /// There was a problem with the Bidirection nature of a string to be prepped.
-    /// </summary>
-    public class BidiException : Exception
-    {
-        /// <summary>
-        /// Create a new BidiException
-        /// </summary>
-        /// <param name="message"></param>
-        public BidiException(string message) : base(message)
-        {
-        }
-    }
-
-    /// <summary>
-    /// A stringprep profile step to check for Bidirectional correctness.
-    /// If the NO_BIDI flag is set, this is a no-op.
-    /// </summary>
-    public class BidiStep : ProfileStep
-    {
-        private static ProhibitStep m_prohibit = new ProhibitStep(RFC3454.C_8, "RFC3454.C_8");
-        private static BidiRALStep  m_ral      = new BidiRALStep();
-        private static ProhibitStep m_lcat     = new ProhibitStep(RFC3454.D_2, "RFC3454.D_2");
-
-        /// <summary>
-        /// Create a new BidiStep.
-        /// </summary>
-        public BidiStep() : base("BIDI")
-        {
-        }
-
-        /// <summary>
-        /// Perform BiDi checks.
-        ///
-        /// From RFC 3454, Section 6:
-        /// In any profile that specifies bidirectional character handling, all
-        /// three of the following requirements MUST be met:
-        /// <ol>
-        /// <li>The characters in section 5.8 MUST be prohibited.</li>
-        /// <li>If a string contains any RandALCat character, the string MUST NOT
-        /// contain any LCat character.</li>
-        /// <li> If a string contains any RandALCat character, a RandALCat
-        /// character MUST be the first character of the string, and a
-        /// RandALCat character MUST be the last character of the string.</li>
-        /// </ol>
-        /// </summary>
-        /// <param name="result">Result is modified in place.</param>
-        /// <exception cref="BidiException">A BiDi problem exists</exception>
-        public override void Prepare(System.Text.StringBuilder result)
-        {
-            // prohibit section 5.8
-            m_prohibit.Prepare(result);
-
-            if (m_ral.FindStringInTable(result) >= 0)
-            {
-                // If a string contains any RandALCat character, the string MUST NOT
-                // contain any LCat character.
-                if (m_lcat.FindStringInTable(result) >= 0)
-                {
-                    throw new BidiException("String contains both L and RAL characters");
-                }
-
-                m_ral.CheckEnds(result);
-            }
-
-        }
-
-        private class BidiRALStep : ProhibitStep
-        {
-            public BidiRALStep() : base(RFC3454.D_1, "RFC3454.D_1")
-            {
-            }
-
-            public void CheckEnds(System.Text.StringBuilder result)
-            {
-                //  3) If a string contains any RandALCat character, a RandALCat
-                // character MUST be the first character of the string, and a
-                // RandALCat character MUST be the last character of the string.
-                if (!Contains(result[0]) || !Contains(result[result.Length - 1]))
-                {
-                    throw new BidiException("Bidi string does not start/end with RAL characters");
-                }
-            }
-        }
-    }
-
-
-}
diff --git a/lib/jabber-net/stringprep/steps/MapStep.cs b/lib/jabber-net/stringprep/steps/MapStep.cs
deleted file mode 100644
index 3fa477e..0000000
--- a/lib/jabber-net/stringprep/steps/MapStep.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Text;
-using System.Collections;
-
-namespace stringprep.steps
-{
-    /// <summary>
-    /// A stringprep profile step to map one input character into 0 or
-    /// more output characters.
-    /// </summary>
-    public class MapStep : ProfileStep
-    {
-        private string[] m_table = null;
-        private static IComparer m_comp = new CharMapComparer();
-
-        /// <summary>
-        /// Map from one character to 0+
-        /// </summary>
-        /// <param name="table"></param>
-        /// <param name="name"></param>
-        public MapStep(string[] table, string name): base(name)
-        {
-            m_table = table;
-        }
-
-        /// <summary>
-        /// Perform mapping for each character of input.
-        /// </summary>
-        /// <param name="result">Result is modified in place.</param>
-        public override void Prepare(System.Text.StringBuilder result)
-        {
-            // From RFC3454, section 3: Mapped characters are not
-            // re-scanned during the mapping step.  That is, if
-            // character A at position X is mapped to character B,
-            // character B which is now at position X is not checked
-            // against the mapping table.
-            int pos;
-            string map;
-            int len;
-            for (int i=0; i<result.Length; i++)
-            {
-                pos = Array.BinarySearch(m_table, result[i], m_comp);
-                if (pos < 0)
-                    continue;
-
-                map = m_table[pos];
-                len = map.Length;
-                if (len == 1)
-                {
-                    result.Remove(i, 1);
-                    i--;
-                }
-                else
-                {
-                    result[i] = map[1];
-                    if (len > 2)
-                    {
-                        result.Insert(i+1, map.ToCharArray(2, len - 2));
-                        i += len - 2;
-                    }
-                }
-            }
-        }
-
-        private class CharMapComparer : IComparer
-        {
-            public int Compare(object x, object y)
-            {
-                return ((string)x)[0].CompareTo(y);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/steps/NFKCStep.cs b/lib/jabber-net/stringprep/steps/NFKCStep.cs
deleted file mode 100644
index 4a2ab9b..0000000
--- a/lib/jabber-net/stringprep/steps/NFKCStep.cs
+++ /dev/null
@@ -1,177 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-
-
-/*
- * Assumption: UCS2.  The astral planes don't exist.  At least according to windows?
- *
- * Look over here.  Something shiny!
- */
-using System;
-using System.Text;
-using stringprep.unicode;
-
-namespace stringprep.steps
-{
-    /// <summary>
-    /// Perform Unicode Normalization Form KC.
-    /// </summary>
-    public class NFKCStep : ProfileStep
-    {
-        /// <summary>
-        /// Create an NFKC step.
-        /// </summary>
-        public NFKCStep() : base("NFKC")
-        {
-        }
-
-        /// <summary>
-        /// Perform NFKC.  General overview: Decompose, Reorder, Compose
-        /// </summary>
-        /// <param name="result"></param>
-        public override void Prepare(StringBuilder result)
-        {
-            // From Unicode TR15: (http://www.unicode.org/reports/tr15)
-            // R1. Normalization Form C
-            // The Normalization Form C for a string S is obtained by applying the following process,
-            // or any other process that leads to the same result:
-            //
-            // 1) Generate the canonical decomposition for the source string S according to the
-            // decomposition mappings in the latest supported version of the Unicode Character Database.
-            //
-            // 2) Iterate through each character C in that decomposition, from first to last.
-            // If C is not blocked from the last starter L, and it can be primary combined with L,
-            // then replace L by the composite L-C, and remove C.
-            Decomp(result);
-
-            if (result.Length > 0)
-            {
-                CanonicalOrdering(result);
-                Comp(result);
-            }
-        }
-
-
-        private void Decomp(StringBuilder result)
-        {
-            int len;
-            string ex;
-
-            // Decompose
-            for (int i=0; i< result.Length; i++)
-            {
-                ex = Decompose.Find(result[i]);
-                if (ex == null)
-                    continue;
-
-                result[i] = ex[0];
-                len = ex.Length - 1;
-                if (len > 0)
-                {
-                    result.Insert(i+1, ex.ToCharArray(1, ex.Length-1));
-                    i += len;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Reorder characters in the given range into their correct cannonical ordering with
-        /// respect to combining class.
-        /// </summary>
-        /// <param name="buf">Buffer to reorder</param>
-        private void CanonicalOrdering(StringBuilder buf)
-        {
-            int i, j;
-            bool swap = false;
-            int p_a, p_b;
-            char t;
-            int start = 0;
-            int stop = buf.Length - 1;
-
-            // From Unicode 3.0, section 3.10
-            // R1 For each character x in D, let p(x) be the combining class of x
-            // R2 Wenever any pair (A, B) of adjacent characters in D is such that p(B)!=0 and
-            //    p(A)>p(B), exchange those characters
-            // R3 Repeat step R2 until no exchanges can be made among any of the characters in D
-            do
-            {
-                swap = false;
-                p_a = Combining.Class(buf[start]);
-
-                for (i = start; i < stop; i++)
-                {
-                    p_b = Combining.Class(buf[i + 1]);
-                    if ((p_b != 0) && (p_a > p_b))
-                    {
-                        for (j = i; j > 0; j--)
-                        {
-                            if (Combining.Class(buf[j]) <= p_b)
-                                break;
-
-                            t = buf[j + 1];
-                            buf[j + 1] = buf[j];
-                            buf[j] = t;
-                            swap = true;
-                        }
-                        /* We're re-entering the loop looking at the old
-                           character again.  Don't reset p_a.*/
-                        continue;
-                    }
-                    p_a = p_b;
-
-                    // once we get to a start character without any swaps,
-                    // there can be no further changes.  No sense constantly
-                    // rechecking stuff we've already checked.
-                    if (!swap && (p_a == 0))
-                        start = i;
-                }
-            } while (swap);
-        }
-
-        private void Comp(StringBuilder result)
-        {
-            // All decomposed and reordered.
-            // Combine all combinable characters.
-            int cc;
-            int last_cc = 0;
-            char c;
-            int last_start = 0;
-
-            for (int i=0; i<result.Length; i++)
-            {
-                cc = Combining.Class(result[i]);
-                if ((i > 0) &&
-                    ((last_cc == 0) || (last_cc != cc)) &&
-                    Compose.Combine(result[last_start], result[i], out c))
-                {
-                    result[last_start] = c;
-                    result.Remove(i, 1);
-                    i--;
-
-                    if (i == last_start)
-                        last_cc = 0;
-                    else
-                        last_cc = Combining.Class(result[i - 1]);
-
-                    continue;
-                }
-
-                if (cc == 0)
-                    last_start = i;
-
-                last_cc = cc;
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/steps/ProfileStep.cs b/lib/jabber-net/stringprep/steps/ProfileStep.cs
deleted file mode 100644
index 8094ec6..0000000
--- a/lib/jabber-net/stringprep/steps/ProfileStep.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Text;
-
-namespace stringprep.steps
-{
-    /// <summary>
-    /// Base class for steps in a stringprep profile.
-    /// </summary>
-    public abstract class ProfileStep
-    {
-        private string m_name;
-
-        /// <summary>
-        /// Create a named profile step, with no flags.
-        /// </summary>
-        /// <param name="name">The profile name</param>
-        protected ProfileStep(string name)
-        {
-            m_name = name;
-        }
-
-        /// <summary>
-        /// The name of the step.
-        /// </summary>
-        public virtual string Name
-        {
-            get { return m_name; }
-        }
-
-        /// <summary>
-        /// This is the workhorse function, to be implemented in each subclass.
-        /// </summary>
-        /// <param name="result">Result will be modified in place</param>
-        public abstract void Prepare(StringBuilder result);
-    }
-}
diff --git a/lib/jabber-net/stringprep/steps/ProhibitStep.cs b/lib/jabber-net/stringprep/steps/ProhibitStep.cs
deleted file mode 100644
index b138a97..0000000
--- a/lib/jabber-net/stringprep/steps/ProhibitStep.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using System.Text;
-
-namespace stringprep.steps
-{
-    /// <summary>
-    /// A character that is forbidden by the current stringprep profile exists in the input.
-    /// </summary>
-    public class ProhibitedCharacterException : Exception
-    {
-        /// <summary>
-        /// The character that was invalid.
-        /// </summary>
-        public char InvalidChar;
-
-        /// <summary>
-        /// Create an instance.
-        /// </summary>
-        /// <param name="step">In which step did this occur?</param>
-        /// <param name="c">The offending character</param>
-        public ProhibitedCharacterException(ProfileStep step, char c) :
-            base(string.Format("Step {0} prohibits string (character U+{1:x04}).", step.Name, (ushort) c))
-        {
-            InvalidChar = c;
-        }
-    }
-
-    /// <summary>
-    /// A stringprep profile step that checks for prohibited characters
-    /// </summary>
-    public class ProhibitStep : ProfileStep
-    {
-        private char[][] m_table = null;
-        private ProhibitComparer m_comp = new ProhibitComparer();
-
-        /*
-        /// <summary>
-        /// Create an instance.
-        /// </summary>
-        /// <param name="tab">The prohibit table to be checked</param>
-        /// <param name="name">The name of the step (for debugging purposes)</param>
-        public ProhibitStep(string name) : base(name)
-        {
-        }
-        */
-
-        /// <summary>
-        /// These characters are prohibited
-        /// </summary>
-        /// <param name="table"></param>
-        /// <param name="name"></param>
-        public ProhibitStep(char[][] table, string name): base(name)
-        {
-            m_table = table;
-        }
-
-        /// <summary>
-        /// Does this step prohibit the given character?
-        /// </summary>
-        /// <param name="c">The character to check</param>
-        /// <returns>True if the character is prohibited</returns>
-        protected bool Contains(char c)
-        {
-            return (Array.BinarySearch(m_table, c, m_comp) >= 0);
-        }
-
-        /// <summary>
-        /// Check all of the characters for prohbition.
-        /// </summary>
-        /// <param name="s">String to check</param>
-        /// <returns>If one of the characters is prohibited, returns the index of that character.
-        /// If all are allowed, returns -1.</returns>
-        public int FindStringInTable(StringBuilder s)
-        {
-            for (int j=0; j<s.Length; j++)
-            {
-                if (Contains(s[j]))
-                {
-                    return j;
-                }
-            }
-            return -1;
-        }
-
-        /// <summary>
-        /// Check for prohibited characters
-        /// </summary>
-        /// <param name="result">No modifications</param>
-        /// <exception cref="ProhibitedCharacterException">Invalid character detected.</exception>
-        public override void Prepare(System.Text.StringBuilder result)
-        {
-            int j = FindStringInTable(result);
-            if (j >= 0)
-                throw new ProhibitedCharacterException(this, result[j]);
-        }
-
-        private class ProhibitComparer : IComparer
-        {
-            #region IComparer Members
-
-            public int Compare(object x, object y)
-            {
-                char[] bounds = (char[]) x;
-                if (bounds[1] == '\x0000')
-                    return bounds[0].CompareTo(y);
-
-                char c = (char) y;
-                if (c < bounds[0])
-                    return 1;
-
-                if (c > bounds[1])
-                    return -1;
-
-                return 0;
-            }
-
-            #endregion
-        }
-
-    }
-
-
-}
diff --git a/lib/jabber-net/stringprep/steps/RFC3454.cs b/lib/jabber-net/stringprep/steps/RFC3454.cs
deleted file mode 100644
index 70c345e..0000000
--- a/lib/jabber-net/stringprep/steps/RFC3454.cs
+++ /dev/null
@@ -1,2655 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-/* This file is auto-generated.  DO NOT EDIT! */
-
-using System;
-namespace stringprep
-{
-    /// <summary>
-    /// Constants from RFC 3454, Stringprep.
-    /// </summary>
-    public class RFC3454
-    {
-
-        /// <summary>
-        /// A.1 Unassigned code points in Unicode 3.2
-        ///
-        /// </summary>
-        public static readonly char[][] A_1 = new char[][]
-        {
-            new char[] {'\x0221', '\x0000'},    /* 0221 */
-            new char[] {'\x0234', '\x024F'},    /* 0234-024F */
-            new char[] {'\x02AE', '\x02AF'},    /* 02AE-02AF */
-            new char[] {'\x02EF', '\x02FF'},    /* 02EF-02FF */
-            new char[] {'\x0350', '\x035F'},    /* 0350-035F */
-            new char[] {'\x0370', '\x0373'},    /* 0370-0373 */
-            new char[] {'\x0376', '\x0379'},    /* 0376-0379 */
-            new char[] {'\x037B', '\x037D'},    /* 037B-037D */
-            new char[] {'\x037F', '\x0383'},    /* 037F-0383 */
-            new char[] {'\x038B', '\x0000'},    /* 038B */
-            new char[] {'\x038D', '\x0000'},    /* 038D */
-            new char[] {'\x03A2', '\x0000'},    /* 03A2 */
-            new char[] {'\x03CF', '\x0000'},    /* 03CF */
-            new char[] {'\x03F7', '\x03FF'},    /* 03F7-03FF */
-            new char[] {'\x0487', '\x0000'},    /* 0487 */
-            new char[] {'\x04CF', '\x0000'},    /* 04CF */
-            new char[] {'\x04F6', '\x04F7'},    /* 04F6-04F7 */
-            new char[] {'\x04FA', '\x04FF'},    /* 04FA-04FF */
-            new char[] {'\x0510', '\x0530'},    /* 0510-0530 */
-            new char[] {'\x0557', '\x0558'},    /* 0557-0558 */
-            new char[] {'\x0560', '\x0000'},    /* 0560 */
-            new char[] {'\x0588', '\x0000'},    /* 0588 */
-            new char[] {'\x058B', '\x0590'},    /* 058B-0590 */
-            new char[] {'\x05A2', '\x0000'},    /* 05A2 */
-            new char[] {'\x05BA', '\x0000'},    /* 05BA */
-            new char[] {'\x05C5', '\x05CF'},    /* 05C5-05CF */
-            new char[] {'\x05EB', '\x05EF'},    /* 05EB-05EF */
-            new char[] {'\x05F5', '\x060B'},    /* 05F5-060B */
-            new char[] {'\x060D', '\x061A'},    /* 060D-061A */
-            new char[] {'\x061C', '\x061E'},    /* 061C-061E */
-            new char[] {'\x0620', '\x0000'},    /* 0620 */
-            new char[] {'\x063B', '\x063F'},    /* 063B-063F */
-            new char[] {'\x0656', '\x065F'},    /* 0656-065F */
-            new char[] {'\x06EE', '\x06EF'},    /* 06EE-06EF */
-            new char[] {'\x06FF', '\x0000'},    /* 06FF */
-            new char[] {'\x070E', '\x0000'},    /* 070E */
-            new char[] {'\x072D', '\x072F'},    /* 072D-072F */
-            new char[] {'\x074B', '\x077F'},    /* 074B-077F */
-            new char[] {'\x07B2', '\x0900'},    /* 07B2-0900 */
-            new char[] {'\x0904', '\x0000'},    /* 0904 */
-            new char[] {'\x093A', '\x093B'},    /* 093A-093B */
-            new char[] {'\x094E', '\x094F'},    /* 094E-094F */
-            new char[] {'\x0955', '\x0957'},    /* 0955-0957 */
-            new char[] {'\x0971', '\x0980'},    /* 0971-0980 */
-            new char[] {'\x0984', '\x0000'},    /* 0984 */
-            new char[] {'\x098D', '\x098E'},    /* 098D-098E */
-            new char[] {'\x0991', '\x0992'},    /* 0991-0992 */
-            new char[] {'\x09A9', '\x0000'},    /* 09A9 */
-            new char[] {'\x09B1', '\x0000'},    /* 09B1 */
-            new char[] {'\x09B3', '\x09B5'},    /* 09B3-09B5 */
-            new char[] {'\x09BA', '\x09BB'},    /* 09BA-09BB */
-            new char[] {'\x09BD', '\x0000'},    /* 09BD */
-            new char[] {'\x09C5', '\x09C6'},    /* 09C5-09C6 */
-            new char[] {'\x09C9', '\x09CA'},    /* 09C9-09CA */
-            new char[] {'\x09CE', '\x09D6'},    /* 09CE-09D6 */
-            new char[] {'\x09D8', '\x09DB'},    /* 09D8-09DB */
-            new char[] {'\x09DE', '\x0000'},    /* 09DE */
-            new char[] {'\x09E4', '\x09E5'},    /* 09E4-09E5 */
-            new char[] {'\x09FB', '\x0A01'},    /* 09FB-0A01 */
-            new char[] {'\x0A03', '\x0A04'},    /* 0A03-0A04 */
-            new char[] {'\x0A0B', '\x0A0E'},    /* 0A0B-0A0E */
-            new char[] {'\x0A11', '\x0A12'},    /* 0A11-0A12 */
-            new char[] {'\x0A29', '\x0000'},    /* 0A29 */
-            new char[] {'\x0A31', '\x0000'},    /* 0A31 */
-            new char[] {'\x0A34', '\x0000'},    /* 0A34 */
-            new char[] {'\x0A37', '\x0000'},    /* 0A37 */
-            new char[] {'\x0A3A', '\x0A3B'},    /* 0A3A-0A3B */
-            new char[] {'\x0A3D', '\x0000'},    /* 0A3D */
-            new char[] {'\x0A43', '\x0A46'},    /* 0A43-0A46 */
-            new char[] {'\x0A49', '\x0A4A'},    /* 0A49-0A4A */
-            new char[] {'\x0A4E', '\x0A58'},    /* 0A4E-0A58 */
-            new char[] {'\x0A5D', '\x0000'},    /* 0A5D */
-            new char[] {'\x0A5F', '\x0A65'},    /* 0A5F-0A65 */
-            new char[] {'\x0A75', '\x0A80'},    /* 0A75-0A80 */
-            new char[] {'\x0A84', '\x0000'},    /* 0A84 */
-            new char[] {'\x0A8C', '\x0000'},    /* 0A8C */
-            new char[] {'\x0A8E', '\x0000'},    /* 0A8E */
-            new char[] {'\x0A92', '\x0000'},    /* 0A92 */
-            new char[] {'\x0AA9', '\x0000'},    /* 0AA9 */
-            new char[] {'\x0AB1', '\x0000'},    /* 0AB1 */
-            new char[] {'\x0AB4', '\x0000'},    /* 0AB4 */
-            new char[] {'\x0ABA', '\x0ABB'},    /* 0ABA-0ABB */
-            new char[] {'\x0AC6', '\x0000'},    /* 0AC6 */
-            new char[] {'\x0ACA', '\x0000'},    /* 0ACA */
-            new char[] {'\x0ACE', '\x0ACF'},    /* 0ACE-0ACF */
-            new char[] {'\x0AD1', '\x0ADF'},    /* 0AD1-0ADF */
-            new char[] {'\x0AE1', '\x0AE5'},    /* 0AE1-0AE5 */
-            new char[] {'\x0AF0', '\x0B00'},    /* 0AF0-0B00 */
-            new char[] {'\x0B04', '\x0000'},    /* 0B04 */
-            new char[] {'\x0B0D', '\x0B0E'},    /* 0B0D-0B0E */
-            new char[] {'\x0B11', '\x0B12'},    /* 0B11-0B12 */
-            new char[] {'\x0B29', '\x0000'},    /* 0B29 */
-            new char[] {'\x0B31', '\x0000'},    /* 0B31 */
-            new char[] {'\x0B34', '\x0B35'},    /* 0B34-0B35 */
-            new char[] {'\x0B3A', '\x0B3B'},    /* 0B3A-0B3B */
-            new char[] {'\x0B44', '\x0B46'},    /* 0B44-0B46 */
-            new char[] {'\x0B49', '\x0B4A'},    /* 0B49-0B4A */
-            new char[] {'\x0B4E', '\x0B55'},    /* 0B4E-0B55 */
-            new char[] {'\x0B58', '\x0B5B'},    /* 0B58-0B5B */
-            new char[] {'\x0B5E', '\x0000'},    /* 0B5E */
-            new char[] {'\x0B62', '\x0B65'},    /* 0B62-0B65 */
-            new char[] {'\x0B71', '\x0B81'},    /* 0B71-0B81 */
-            new char[] {'\x0B84', '\x0000'},    /* 0B84 */
-            new char[] {'\x0B8B', '\x0B8D'},    /* 0B8B-0B8D */
-            new char[] {'\x0B91', '\x0000'},    /* 0B91 */
-            new char[] {'\x0B96', '\x0B98'},    /* 0B96-0B98 */
-            new char[] {'\x0B9B', '\x0000'},    /* 0B9B */
-            new char[] {'\x0B9D', '\x0000'},    /* 0B9D */
-            new char[] {'\x0BA0', '\x0BA2'},    /* 0BA0-0BA2 */
-            new char[] {'\x0BA5', '\x0BA7'},    /* 0BA5-0BA7 */
-            new char[] {'\x0BAB', '\x0BAD'},    /* 0BAB-0BAD */
-            new char[] {'\x0BB6', '\x0000'},    /* 0BB6 */
-            new char[] {'\x0BBA', '\x0BBD'},    /* 0BBA-0BBD */
-            new char[] {'\x0BC3', '\x0BC5'},    /* 0BC3-0BC5 */
-            new char[] {'\x0BC9', '\x0000'},    /* 0BC9 */
-            new char[] {'\x0BCE', '\x0BD6'},    /* 0BCE-0BD6 */
-            new char[] {'\x0BD8', '\x0BE6'},    /* 0BD8-0BE6 */
-            new char[] {'\x0BF3', '\x0C00'},    /* 0BF3-0C00 */
-            new char[] {'\x0C04', '\x0000'},    /* 0C04 */
-            new char[] {'\x0C0D', '\x0000'},    /* 0C0D */
-            new char[] {'\x0C11', '\x0000'},    /* 0C11 */
-            new char[] {'\x0C29', '\x0000'},    /* 0C29 */
-            new char[] {'\x0C34', '\x0000'},    /* 0C34 */
-            new char[] {'\x0C3A', '\x0C3D'},    /* 0C3A-0C3D */
-            new char[] {'\x0C45', '\x0000'},    /* 0C45 */
-            new char[] {'\x0C49', '\x0000'},    /* 0C49 */
-            new char[] {'\x0C4E', '\x0C54'},    /* 0C4E-0C54 */
-            new char[] {'\x0C57', '\x0C5F'},    /* 0C57-0C5F */
-            new char[] {'\x0C62', '\x0C65'},    /* 0C62-0C65 */
-            new char[] {'\x0C70', '\x0C81'},    /* 0C70-0C81 */
-            new char[] {'\x0C84', '\x0000'},    /* 0C84 */
-            new char[] {'\x0C8D', '\x0000'},    /* 0C8D */
-            new char[] {'\x0C91', '\x0000'},    /* 0C91 */
-            new char[] {'\x0CA9', '\x0000'},    /* 0CA9 */
-            new char[] {'\x0CB4', '\x0000'},    /* 0CB4 */
-            new char[] {'\x0CBA', '\x0CBD'},    /* 0CBA-0CBD */
-            new char[] {'\x0CC5', '\x0000'},    /* 0CC5 */
-            new char[] {'\x0CC9', '\x0000'},    /* 0CC9 */
-            new char[] {'\x0CCE', '\x0CD4'},    /* 0CCE-0CD4 */
-            new char[] {'\x0CD7', '\x0CDD'},    /* 0CD7-0CDD */
-            new char[] {'\x0CDF', '\x0000'},    /* 0CDF */
-            new char[] {'\x0CE2', '\x0CE5'},    /* 0CE2-0CE5 */
-            new char[] {'\x0CF0', '\x0D01'},    /* 0CF0-0D01 */
-            new char[] {'\x0D04', '\x0000'},    /* 0D04 */
-            new char[] {'\x0D0D', '\x0000'},    /* 0D0D */
-            new char[] {'\x0D11', '\x0000'},    /* 0D11 */
-            new char[] {'\x0D29', '\x0000'},    /* 0D29 */
-            new char[] {'\x0D3A', '\x0D3D'},    /* 0D3A-0D3D */
-            new char[] {'\x0D44', '\x0D45'},    /* 0D44-0D45 */
-            new char[] {'\x0D49', '\x0000'},    /* 0D49 */
-            new char[] {'\x0D4E', '\x0D56'},    /* 0D4E-0D56 */
-            new char[] {'\x0D58', '\x0D5F'},    /* 0D58-0D5F */
-            new char[] {'\x0D62', '\x0D65'},    /* 0D62-0D65 */
-            new char[] {'\x0D70', '\x0D81'},    /* 0D70-0D81 */
-            new char[] {'\x0D84', '\x0000'},    /* 0D84 */
-            new char[] {'\x0D97', '\x0D99'},    /* 0D97-0D99 */
-            new char[] {'\x0DB2', '\x0000'},    /* 0DB2 */
-            new char[] {'\x0DBC', '\x0000'},    /* 0DBC */
-            new char[] {'\x0DBE', '\x0DBF'},    /* 0DBE-0DBF */
-            new char[] {'\x0DC7', '\x0DC9'},    /* 0DC7-0DC9 */
-            new char[] {'\x0DCB', '\x0DCE'},    /* 0DCB-0DCE */
-            new char[] {'\x0DD5', '\x0000'},    /* 0DD5 */
-            new char[] {'\x0DD7', '\x0000'},    /* 0DD7 */
-            new char[] {'\x0DE0', '\x0DF1'},    /* 0DE0-0DF1 */
-            new char[] {'\x0DF5', '\x0E00'},    /* 0DF5-0E00 */
-            new char[] {'\x0E3B', '\x0E3E'},    /* 0E3B-0E3E */
-            new char[] {'\x0E5C', '\x0E80'},    /* 0E5C-0E80 */
-            new char[] {'\x0E83', '\x0000'},    /* 0E83 */
-            new char[] {'\x0E85', '\x0E86'},    /* 0E85-0E86 */
-            new char[] {'\x0E89', '\x0000'},    /* 0E89 */
-            new char[] {'\x0E8B', '\x0E8C'},    /* 0E8B-0E8C */
-            new char[] {'\x0E8E', '\x0E93'},    /* 0E8E-0E93 */
-            new char[] {'\x0E98', '\x0000'},    /* 0E98 */
-            new char[] {'\x0EA0', '\x0000'},    /* 0EA0 */
-            new char[] {'\x0EA4', '\x0000'},    /* 0EA4 */
-            new char[] {'\x0EA6', '\x0000'},    /* 0EA6 */
-            new char[] {'\x0EA8', '\x0EA9'},    /* 0EA8-0EA9 */
-            new char[] {'\x0EAC', '\x0000'},    /* 0EAC */
-            new char[] {'\x0EBA', '\x0000'},    /* 0EBA */
-            new char[] {'\x0EBE', '\x0EBF'},    /* 0EBE-0EBF */
-            new char[] {'\x0EC5', '\x0000'},    /* 0EC5 */
-            new char[] {'\x0EC7', '\x0000'},    /* 0EC7 */
-            new char[] {'\x0ECE', '\x0ECF'},    /* 0ECE-0ECF */
-            new char[] {'\x0EDA', '\x0EDB'},    /* 0EDA-0EDB */
-            new char[] {'\x0EDE', '\x0EFF'},    /* 0EDE-0EFF */
-            new char[] {'\x0F48', '\x0000'},    /* 0F48 */
-            new char[] {'\x0F6B', '\x0F70'},    /* 0F6B-0F70 */
-            new char[] {'\x0F8C', '\x0F8F'},    /* 0F8C-0F8F */
-            new char[] {'\x0F98', '\x0000'},    /* 0F98 */
-            new char[] {'\x0FBD', '\x0000'},    /* 0FBD */
-            new char[] {'\x0FCD', '\x0FCE'},    /* 0FCD-0FCE */
-            new char[] {'\x0FD0', '\x0FFF'},    /* 0FD0-0FFF */
-            new char[] {'\x1022', '\x0000'},    /* 1022 */
-            new char[] {'\x1028', '\x0000'},    /* 1028 */
-            new char[] {'\x102B', '\x0000'},    /* 102B */
-            new char[] {'\x1033', '\x1035'},    /* 1033-1035 */
-            new char[] {'\x103A', '\x103F'},    /* 103A-103F */
-            new char[] {'\x105A', '\x109F'},    /* 105A-109F */
-            new char[] {'\x10C6', '\x10CF'},    /* 10C6-10CF */
-            new char[] {'\x10F9', '\x10FA'},    /* 10F9-10FA */
-            new char[] {'\x10FC', '\x10FF'},    /* 10FC-10FF */
-            new char[] {'\x115A', '\x115E'},    /* 115A-115E */
-            new char[] {'\x11A3', '\x11A7'},    /* 11A3-11A7 */
-            new char[] {'\x11FA', '\x11FF'},    /* 11FA-11FF */
-            new char[] {'\x1207', '\x0000'},    /* 1207 */
-            new char[] {'\x1247', '\x0000'},    /* 1247 */
-            new char[] {'\x1249', '\x0000'},    /* 1249 */
-            new char[] {'\x124E', '\x124F'},    /* 124E-124F */
-            new char[] {'\x1257', '\x0000'},    /* 1257 */
-            new char[] {'\x1259', '\x0000'},    /* 1259 */
-            new char[] {'\x125E', '\x125F'},    /* 125E-125F */
-            new char[] {'\x1287', '\x0000'},    /* 1287 */
-            new char[] {'\x1289', '\x0000'},    /* 1289 */
-            new char[] {'\x128E', '\x128F'},    /* 128E-128F */
-            new char[] {'\x12AF', '\x0000'},    /* 12AF */
-            new char[] {'\x12B1', '\x0000'},    /* 12B1 */
-            new char[] {'\x12B6', '\x12B7'},    /* 12B6-12B7 */
-            new char[] {'\x12BF', '\x0000'},    /* 12BF */
-            new char[] {'\x12C1', '\x0000'},    /* 12C1 */
-            new char[] {'\x12C6', '\x12C7'},    /* 12C6-12C7 */
-            new char[] {'\x12CF', '\x0000'},    /* 12CF */
-            new char[] {'\x12D7', '\x0000'},    /* 12D7 */
-            new char[] {'\x12EF', '\x0000'},    /* 12EF */
-            new char[] {'\x130F', '\x0000'},    /* 130F */
-            new char[] {'\x1311', '\x0000'},    /* 1311 */
-            new char[] {'\x1316', '\x1317'},    /* 1316-1317 */
-            new char[] {'\x131F', '\x0000'},    /* 131F */
-            new char[] {'\x1347', '\x0000'},    /* 1347 */
-            new char[] {'\x135B', '\x1360'},    /* 135B-1360 */
-            new char[] {'\x137D', '\x139F'},    /* 137D-139F */
-            new char[] {'\x13F5', '\x1400'},    /* 13F5-1400 */
-            new char[] {'\x1677', '\x167F'},    /* 1677-167F */
-            new char[] {'\x169D', '\x169F'},    /* 169D-169F */
-            new char[] {'\x16F1', '\x16FF'},    /* 16F1-16FF */
-            new char[] {'\x170D', '\x0000'},    /* 170D */
-            new char[] {'\x1715', '\x171F'},    /* 1715-171F */
-            new char[] {'\x1737', '\x173F'},    /* 1737-173F */
-            new char[] {'\x1754', '\x175F'},    /* 1754-175F */
-            new char[] {'\x176D', '\x0000'},    /* 176D */
-            new char[] {'\x1771', '\x0000'},    /* 1771 */
-            new char[] {'\x1774', '\x177F'},    /* 1774-177F */
-            new char[] {'\x17DD', '\x17DF'},    /* 17DD-17DF */
-            new char[] {'\x17EA', '\x17FF'},    /* 17EA-17FF */
-            new char[] {'\x180F', '\x0000'},    /* 180F */
-            new char[] {'\x181A', '\x181F'},    /* 181A-181F */
-            new char[] {'\x1878', '\x187F'},    /* 1878-187F */
-            new char[] {'\x18AA', '\x1DFF'},    /* 18AA-1DFF */
-            new char[] {'\x1E9C', '\x1E9F'},    /* 1E9C-1E9F */
-            new char[] {'\x1EFA', '\x1EFF'},    /* 1EFA-1EFF */
-            new char[] {'\x1F16', '\x1F17'},    /* 1F16-1F17 */
-            new char[] {'\x1F1E', '\x1F1F'},    /* 1F1E-1F1F */
-            new char[] {'\x1F46', '\x1F47'},    /* 1F46-1F47 */
-            new char[] {'\x1F4E', '\x1F4F'},    /* 1F4E-1F4F */
-            new char[] {'\x1F58', '\x0000'},    /* 1F58 */
-            new char[] {'\x1F5A', '\x0000'},    /* 1F5A */
-            new char[] {'\x1F5C', '\x0000'},    /* 1F5C */
-            new char[] {'\x1F5E', '\x0000'},    /* 1F5E */
-            new char[] {'\x1F7E', '\x1F7F'},    /* 1F7E-1F7F */
-            new char[] {'\x1FB5', '\x0000'},    /* 1FB5 */
-            new char[] {'\x1FC5', '\x0000'},    /* 1FC5 */
-            new char[] {'\x1FD4', '\x1FD5'},    /* 1FD4-1FD5 */
-            new char[] {'\x1FDC', '\x0000'},    /* 1FDC */
-            new char[] {'\x1FF0', '\x1FF1'},    /* 1FF0-1FF1 */
-            new char[] {'\x1FF5', '\x0000'},    /* 1FF5 */
-            new char[] {'\x1FFF', '\x0000'},    /* 1FFF */
-            new char[] {'\x2053', '\x2056'},    /* 2053-2056 */
-            new char[] {'\x2058', '\x205E'},    /* 2058-205E */
-            new char[] {'\x2064', '\x2069'},    /* 2064-2069 */
-            new char[] {'\x2072', '\x2073'},    /* 2072-2073 */
-            new char[] {'\x208F', '\x209F'},    /* 208F-209F */
-            new char[] {'\x20B2', '\x20CF'},    /* 20B2-20CF */
-            new char[] {'\x20EB', '\x20FF'},    /* 20EB-20FF */
-            new char[] {'\x213B', '\x213C'},    /* 213B-213C */
-            new char[] {'\x214C', '\x2152'},    /* 214C-2152 */
-            new char[] {'\x2184', '\x218F'},    /* 2184-218F */
-            new char[] {'\x23CF', '\x23FF'},    /* 23CF-23FF */
-            new char[] {'\x2427', '\x243F'},    /* 2427-243F */
-            new char[] {'\x244B', '\x245F'},    /* 244B-245F */
-            new char[] {'\x24FF', '\x0000'},    /* 24FF */
-            new char[] {'\x2614', '\x2615'},    /* 2614-2615 */
-            new char[] {'\x2618', '\x0000'},    /* 2618 */
-            new char[] {'\x267E', '\x267F'},    /* 267E-267F */
-            new char[] {'\x268A', '\x2700'},    /* 268A-2700 */
-            new char[] {'\x2705', '\x0000'},    /* 2705 */
-            new char[] {'\x270A', '\x270B'},    /* 270A-270B */
-            new char[] {'\x2728', '\x0000'},    /* 2728 */
-            new char[] {'\x274C', '\x0000'},    /* 274C */
-            new char[] {'\x274E', '\x0000'},    /* 274E */
-            new char[] {'\x2753', '\x2755'},    /* 2753-2755 */
-            new char[] {'\x2757', '\x0000'},    /* 2757 */
-            new char[] {'\x275F', '\x2760'},    /* 275F-2760 */
-            new char[] {'\x2795', '\x2797'},    /* 2795-2797 */
-            new char[] {'\x27B0', '\x0000'},    /* 27B0 */
-            new char[] {'\x27BF', '\x27CF'},    /* 27BF-27CF */
-            new char[] {'\x27EC', '\x27EF'},    /* 27EC-27EF */
-            new char[] {'\x2B00', '\x2E7F'},    /* 2B00-2E7F */
-            new char[] {'\x2E9A', '\x0000'},    /* 2E9A */
-            new char[] {'\x2EF4', '\x2EFF'},    /* 2EF4-2EFF */
-            new char[] {'\x2FD6', '\x2FEF'},    /* 2FD6-2FEF */
-            new char[] {'\x2FFC', '\x2FFF'},    /* 2FFC-2FFF */
-            new char[] {'\x3040', '\x0000'},    /* 3040 */
-            new char[] {'\x3097', '\x3098'},    /* 3097-3098 */
-            new char[] {'\x3100', '\x3104'},    /* 3100-3104 */
-            new char[] {'\x312D', '\x3130'},    /* 312D-3130 */
-            new char[] {'\x318F', '\x0000'},    /* 318F */
-            new char[] {'\x31B8', '\x31EF'},    /* 31B8-31EF */
-            new char[] {'\x321D', '\x321F'},    /* 321D-321F */
-            new char[] {'\x3244', '\x3250'},    /* 3244-3250 */
-            new char[] {'\x327C', '\x327E'},    /* 327C-327E */
-            new char[] {'\x32CC', '\x32CF'},    /* 32CC-32CF */
-            new char[] {'\x32FF', '\x0000'},    /* 32FF */
-            new char[] {'\x3377', '\x337A'},    /* 3377-337A */
-            new char[] {'\x33DE', '\x33DF'},    /* 33DE-33DF */
-            new char[] {'\x33FF', '\x0000'},    /* 33FF */
-            new char[] {'\x4DB6', '\x4DFF'},    /* 4DB6-4DFF */
-            new char[] {'\x9FA6', '\x9FFF'},    /* 9FA6-9FFF */
-            new char[] {'\xA48D', '\xA48F'},    /* A48D-A48F */
-            new char[] {'\xA4C7', '\xABFF'},    /* A4C7-ABFF */
-            new char[] {'\xD7A4', '\xD7FF'},    /* D7A4-D7FF */
-            new char[] {'\xFA2E', '\xFA2F'},    /* FA2E-FA2F */
-            new char[] {'\xFA6B', '\xFAFF'},    /* FA6B-FAFF */
-            new char[] {'\xFB07', '\xFB12'},    /* FB07-FB12 */
-            new char[] {'\xFB18', '\xFB1C'},    /* FB18-FB1C */
-            new char[] {'\xFB37', '\x0000'},    /* FB37 */
-            new char[] {'\xFB3D', '\x0000'},    /* FB3D */
-            new char[] {'\xFB3F', '\x0000'},    /* FB3F */
-            new char[] {'\xFB42', '\x0000'},    /* FB42 */
-            new char[] {'\xFB45', '\x0000'},    /* FB45 */
-            new char[] {'\xFBB2', '\xFBD2'},    /* FBB2-FBD2 */
-            new char[] {'\xFD40', '\xFD4F'},    /* FD40-FD4F */
-            new char[] {'\xFD90', '\xFD91'},    /* FD90-FD91 */
-            new char[] {'\xFDC8', '\xFDCF'},    /* FDC8-FDCF */
-            new char[] {'\xFDFD', '\xFDFF'},    /* FDFD-FDFF */
-            new char[] {'\xFE10', '\xFE1F'},    /* FE10-FE1F */
-            new char[] {'\xFE24', '\xFE2F'},    /* FE24-FE2F */
-            new char[] {'\xFE47', '\xFE48'},    /* FE47-FE48 */
-            new char[] {'\xFE53', '\x0000'},    /* FE53 */
-            new char[] {'\xFE67', '\x0000'},    /* FE67 */
-            new char[] {'\xFE6C', '\xFE6F'},    /* FE6C-FE6F */
-            new char[] {'\xFE75', '\x0000'},    /* FE75 */
-            new char[] {'\xFEFD', '\xFEFE'},    /* FEFD-FEFE */
-            new char[] {'\xFF00', '\x0000'},    /* FF00 */
-            new char[] {'\xFFBF', '\xFFC1'},    /* FFBF-FFC1 */
-            new char[] {'\xFFC8', '\xFFC9'},    /* FFC8-FFC9 */
-            new char[] {'\xFFD0', '\xFFD1'},    /* FFD0-FFD1 */
-            new char[] {'\xFFD8', '\xFFD9'},    /* FFD8-FFD9 */
-            new char[] {'\xFFDD', '\xFFDF'},    /* FFDD-FFDF */
-            new char[] {'\xFFE7', '\x0000'},    /* FFE7 */
-            new char[] {'\xFFEF', '\xFFF8'},    /* FFEF-FFF8 */
-        };
-
-
-        /// <summary>
-        /// B.1 Commonly mapped to nothing
-        ///
-        /// </summary>
-        public static readonly string[] B_1 = new string[]
-        {
-            "\x00AD",                          /* 00AD; ; Map to nothing */
-            "\x034F",                          /* 034F; ; Map to nothing */
-            "\x1806",                          /* 1806; ; Map to nothing */
-            "\x180B",                          /* 180B; ; Map to nothing */
-            "\x180C",                          /* 180C; ; Map to nothing */
-            "\x180D",                          /* 180D; ; Map to nothing */
-            "\x200B",                          /* 200B; ; Map to nothing */
-            "\x200C",                          /* 200C; ; Map to nothing */
-            "\x200D",                          /* 200D; ; Map to nothing */
-            "\x2060",                          /* 2060; ; Map to nothing */
-            "\xFE00",                          /* FE00; ; Map to nothing */
-            "\xFE01",                          /* FE01; ; Map to nothing */
-            "\xFE02",                          /* FE02; ; Map to nothing */
-            "\xFE03",                          /* FE03; ; Map to nothing */
-            "\xFE04",                          /* FE04; ; Map to nothing */
-            "\xFE05",                          /* FE05; ; Map to nothing */
-            "\xFE06",                          /* FE06; ; Map to nothing */
-            "\xFE07",                          /* FE07; ; Map to nothing */
-            "\xFE08",                          /* FE08; ; Map to nothing */
-            "\xFE09",                          /* FE09; ; Map to nothing */
-            "\xFE0A",                          /* FE0A; ; Map to nothing */
-            "\xFE0B",                          /* FE0B; ; Map to nothing */
-            "\xFE0C",                          /* FE0C; ; Map to nothing */
-            "\xFE0D",                          /* FE0D; ; Map to nothing */
-            "\xFE0E",                          /* FE0E; ; Map to nothing */
-            "\xFE0F",                          /* FE0F; ; Map to nothing */
-            "\xFEFF",                          /* FEFF; ; Map to nothing */
-        };
-
-
-        /// <summary>
-        /// B.2 Mapping for case-folding used with NFKC
-        ///
-        /// </summary>
-        public static readonly string[] B_2 = new string[]
-        {
-            "\x0041\x0061",                      /* 0041; 0061; Case map */
-            "\x0042\x0062",                      /* 0042; 0062; Case map */
-            "\x0043\x0063",                      /* 0043; 0063; Case map */
-            "\x0044\x0064",                      /* 0044; 0064; Case map */
-            "\x0045\x0065",                      /* 0045; 0065; Case map */
-            "\x0046\x0066",                      /* 0046; 0066; Case map */
-            "\x0047\x0067",                      /* 0047; 0067; Case map */
-            "\x0048\x0068",                      /* 0048; 0068; Case map */
-            "\x0049\x0069",                      /* 0049; 0069; Case map */
-            "\x004A\x006A",                      /* 004A; 006A; Case map */
-            "\x004B\x006B",                      /* 004B; 006B; Case map */
-            "\x004C\x006C",                      /* 004C; 006C; Case map */
-            "\x004D\x006D",                      /* 004D; 006D; Case map */
-            "\x004E\x006E",                      /* 004E; 006E; Case map */
-            "\x004F\x006F",                      /* 004F; 006F; Case map */
-            "\x0050\x0070",                      /* 0050; 0070; Case map */
-            "\x0051\x0071",                      /* 0051; 0071; Case map */
-            "\x0052\x0072",                      /* 0052; 0072; Case map */
-            "\x0053\x0073",                      /* 0053; 0073; Case map */
-            "\x0054\x0074",                      /* 0054; 0074; Case map */
-            "\x0055\x0075",                      /* 0055; 0075; Case map */
-            "\x0056\x0076",                      /* 0056; 0076; Case map */
-            "\x0057\x0077",                      /* 0057; 0077; Case map */
-            "\x0058\x0078",                      /* 0058; 0078; Case map */
-            "\x0059\x0079",                      /* 0059; 0079; Case map */
-            "\x005A\x007A",                      /* 005A; 007A; Case map */
-            "\x00B5\x03BC",                      /* 00B5; 03BC; Case map */
-            "\x00C0\x00E0",                      /* 00C0; 00E0; Case map */
-            "\x00C1\x00E1",                      /* 00C1; 00E1; Case map */
-            "\x00C2\x00E2",                      /* 00C2; 00E2; Case map */
-            "\x00C3\x00E3",                      /* 00C3; 00E3; Case map */
-            "\x00C4\x00E4",                      /* 00C4; 00E4; Case map */
-            "\x00C5\x00E5",                      /* 00C5; 00E5; Case map */
-            "\x00C6\x00E6",                      /* 00C6; 00E6; Case map */
-            "\x00C7\x00E7",                      /* 00C7; 00E7; Case map */
-            "\x00C8\x00E8",                      /* 00C8; 00E8; Case map */
-            "\x00C9\x00E9",                      /* 00C9; 00E9; Case map */
-            "\x00CA\x00EA",                      /* 00CA; 00EA; Case map */
-            "\x00CB\x00EB",                      /* 00CB; 00EB; Case map */
-            "\x00CC\x00EC",                      /* 00CC; 00EC; Case map */
-            "\x00CD\x00ED",                      /* 00CD; 00ED; Case map */
-            "\x00CE\x00EE",                      /* 00CE; 00EE; Case map */
-            "\x00CF\x00EF",                      /* 00CF; 00EF; Case map */
-            "\x00D0\x00F0",                      /* 00D0; 00F0; Case map */
-            "\x00D1\x00F1",                      /* 00D1; 00F1; Case map */
-            "\x00D2\x00F2",                      /* 00D2; 00F2; Case map */
-            "\x00D3\x00F3",                      /* 00D3; 00F3; Case map */
-            "\x00D4\x00F4",                      /* 00D4; 00F4; Case map */
-            "\x00D5\x00F5",                      /* 00D5; 00F5; Case map */
-            "\x00D6\x00F6",                      /* 00D6; 00F6; Case map */
-            "\x00D8\x00F8",                      /* 00D8; 00F8; Case map */
-            "\x00D9\x00F9",                      /* 00D9; 00F9; Case map */
-            "\x00DA\x00FA",                      /* 00DA; 00FA; Case map */
-            "\x00DB\x00FB",                      /* 00DB; 00FB; Case map */
-            "\x00DC\x00FC",                      /* 00DC; 00FC; Case map */
-            "\x00DD\x00FD",                      /* 00DD; 00FD; Case map */
-            "\x00DE\x00FE",                      /* 00DE; 00FE; Case map */
-            "\x00DF\x0073\x0073",                /* 00DF; 0073 0073; Case map */
-            "\x0100\x0101",                      /* 0100; 0101; Case map */
-            "\x0102\x0103",                      /* 0102; 0103; Case map */
-            "\x0104\x0105",                      /* 0104; 0105; Case map */
-            "\x0106\x0107",                      /* 0106; 0107; Case map */
-            "\x0108\x0109",                      /* 0108; 0109; Case map */
-            "\x010A\x010B",                      /* 010A; 010B; Case map */
-            "\x010C\x010D",                      /* 010C; 010D; Case map */
-            "\x010E\x010F",                      /* 010E; 010F; Case map */
-            "\x0110\x0111",                      /* 0110; 0111; Case map */
-            "\x0112\x0113",                      /* 0112; 0113; Case map */
-            "\x0114\x0115",                      /* 0114; 0115; Case map */
-            "\x0116\x0117",                      /* 0116; 0117; Case map */
-            "\x0118\x0119",                      /* 0118; 0119; Case map */
-            "\x011A\x011B",                      /* 011A; 011B; Case map */
-            "\x011C\x011D",                      /* 011C; 011D; Case map */
-            "\x011E\x011F",                      /* 011E; 011F; Case map */
-            "\x0120\x0121",                      /* 0120; 0121; Case map */
-            "\x0122\x0123",                      /* 0122; 0123; Case map */
-            "\x0124\x0125",                      /* 0124; 0125; Case map */
-            "\x0126\x0127",                      /* 0126; 0127; Case map */
-            "\x0128\x0129",                      /* 0128; 0129; Case map */
-            "\x012A\x012B",                      /* 012A; 012B; Case map */
-            "\x012C\x012D",                      /* 012C; 012D; Case map */
-            "\x012E\x012F",                      /* 012E; 012F; Case map */
-            "\x0130\x0069\x0307",                /* 0130; 0069 0307; Case map */
-            "\x0132\x0133",                      /* 0132; 0133; Case map */
-            "\x0134\x0135",                      /* 0134; 0135; Case map */
-            "\x0136\x0137",                      /* 0136; 0137; Case map */
-            "\x0139\x013A",                      /* 0139; 013A; Case map */
-            "\x013B\x013C",                      /* 013B; 013C; Case map */
-            "\x013D\x013E",                      /* 013D; 013E; Case map */
-            "\x013F\x0140",                      /* 013F; 0140; Case map */
-            "\x0141\x0142",                      /* 0141; 0142; Case map */
-            "\x0143\x0144",                      /* 0143; 0144; Case map */
-            "\x0145\x0146",                      /* 0145; 0146; Case map */
-            "\x0147\x0148",                      /* 0147; 0148; Case map */
-            "\x0149\x02BC\x006E",                /* 0149; 02BC 006E; Case map */
-            "\x014A\x014B",                      /* 014A; 014B; Case map */
-            "\x014C\x014D",                      /* 014C; 014D; Case map */
-            "\x014E\x014F",                      /* 014E; 014F; Case map */
-            "\x0150\x0151",                      /* 0150; 0151; Case map */
-            "\x0152\x0153",                      /* 0152; 0153; Case map */
-            "\x0154\x0155",                      /* 0154; 0155; Case map */
-            "\x0156\x0157",                      /* 0156; 0157; Case map */
-            "\x0158\x0159",                      /* 0158; 0159; Case map */
-            "\x015A\x015B",                      /* 015A; 015B; Case map */
-            "\x015C\x015D",                      /* 015C; 015D; Case map */
-            "\x015E\x015F",                      /* 015E; 015F; Case map */
-            "\x0160\x0161",                      /* 0160; 0161; Case map */
-            "\x0162\x0163",                      /* 0162; 0163; Case map */
-            "\x0164\x0165",                      /* 0164; 0165; Case map */
-            "\x0166\x0167",                      /* 0166; 0167; Case map */
-            "\x0168\x0169",                      /* 0168; 0169; Case map */
-            "\x016A\x016B",                      /* 016A; 016B; Case map */
-            "\x016C\x016D",                      /* 016C; 016D; Case map */
-            "\x016E\x016F",                      /* 016E; 016F; Case map */
-            "\x0170\x0171",                      /* 0170; 0171; Case map */
-            "\x0172\x0173",                      /* 0172; 0173; Case map */
-            "\x0174\x0175",                      /* 0174; 0175; Case map */
-            "\x0176\x0177",                      /* 0176; 0177; Case map */
-            "\x0178\x00FF",                      /* 0178; 00FF; Case map */
-            "\x0179\x017A",                      /* 0179; 017A; Case map */
-            "\x017B\x017C",                      /* 017B; 017C; Case map */
-            "\x017D\x017E",                      /* 017D; 017E; Case map */
-            "\x017F\x0073",                      /* 017F; 0073; Case map */
-            "\x0181\x0253",                      /* 0181; 0253; Case map */
-            "\x0182\x0183",                      /* 0182; 0183; Case map */
-            "\x0184\x0185",                      /* 0184; 0185; Case map */
-            "\x0186\x0254",                      /* 0186; 0254; Case map */
-            "\x0187\x0188",                      /* 0187; 0188; Case map */
-            "\x0189\x0256",                      /* 0189; 0256; Case map */
-            "\x018A\x0257",                      /* 018A; 0257; Case map */
-            "\x018B\x018C",                      /* 018B; 018C; Case map */
-            "\x018E\x01DD",                      /* 018E; 01DD; Case map */
-            "\x018F\x0259",                      /* 018F; 0259; Case map */
-            "\x0190\x025B",                      /* 0190; 025B; Case map */
-            "\x0191\x0192",                      /* 0191; 0192; Case map */
-            "\x0193\x0260",                      /* 0193; 0260; Case map */
-            "\x0194\x0263",                      /* 0194; 0263; Case map */
-            "\x0196\x0269",                      /* 0196; 0269; Case map */
-            "\x0197\x0268",                      /* 0197; 0268; Case map */
-            "\x0198\x0199",                      /* 0198; 0199; Case map */
-            "\x019C\x026F",                      /* 019C; 026F; Case map */
-            "\x019D\x0272",                      /* 019D; 0272; Case map */
-            "\x019F\x0275",                      /* 019F; 0275; Case map */
-            "\x01A0\x01A1",                      /* 01A0; 01A1; Case map */
-            "\x01A2\x01A3",                      /* 01A2; 01A3; Case map */
-            "\x01A4\x01A5",                      /* 01A4; 01A5; Case map */
-            "\x01A6\x0280",                      /* 01A6; 0280; Case map */
-            "\x01A7\x01A8",                      /* 01A7; 01A8; Case map */
-            "\x01A9\x0283",                      /* 01A9; 0283; Case map */
-            "\x01AC\x01AD",                      /* 01AC; 01AD; Case map */
-            "\x01AE\x0288",                      /* 01AE; 0288; Case map */
-            "\x01AF\x01B0",                      /* 01AF; 01B0; Case map */
-            "\x01B1\x028A",                      /* 01B1; 028A; Case map */
-            "\x01B2\x028B",                      /* 01B2; 028B; Case map */
-            "\x01B3\x01B4",                      /* 01B3; 01B4; Case map */
-            "\x01B5\x01B6",                      /* 01B5; 01B6; Case map */
-            "\x01B7\x0292",                      /* 01B7; 0292; Case map */
-            "\x01B8\x01B9",                      /* 01B8; 01B9; Case map */
-            "\x01BC\x01BD",                      /* 01BC; 01BD; Case map */
-            "\x01C4\x01C6",                      /* 01C4; 01C6; Case map */
-            "\x01C5\x01C6",                      /* 01C5; 01C6; Case map */
-            "\x01C7\x01C9",                      /* 01C7; 01C9; Case map */
-            "\x01C8\x01C9",                      /* 01C8; 01C9; Case map */
-            "\x01CA\x01CC",                      /* 01CA; 01CC; Case map */
-            "\x01CB\x01CC",                      /* 01CB; 01CC; Case map */
-            "\x01CD\x01CE",                      /* 01CD; 01CE; Case map */
-            "\x01CF\x01D0",                      /* 01CF; 01D0; Case map */
-            "\x01D1\x01D2",                      /* 01D1; 01D2; Case map */
-            "\x01D3\x01D4",                      /* 01D3; 01D4; Case map */
-            "\x01D5\x01D6",                      /* 01D5; 01D6; Case map */
-            "\x01D7\x01D8",                      /* 01D7; 01D8; Case map */
-            "\x01D9\x01DA",                      /* 01D9; 01DA; Case map */
-            "\x01DB\x01DC",                      /* 01DB; 01DC; Case map */
-            "\x01DE\x01DF",                      /* 01DE; 01DF; Case map */
-            "\x01E0\x01E1",                      /* 01E0; 01E1; Case map */
-            "\x01E2\x01E3",                      /* 01E2; 01E3; Case map */
-            "\x01E4\x01E5",                      /* 01E4; 01E5; Case map */
-            "\x01E6\x01E7",                      /* 01E6; 01E7; Case map */
-            "\x01E8\x01E9",                      /* 01E8; 01E9; Case map */
-            "\x01EA\x01EB",                      /* 01EA; 01EB; Case map */
-            "\x01EC\x01ED",                      /* 01EC; 01ED; Case map */
-            "\x01EE\x01EF",                      /* 01EE; 01EF; Case map */
-            "\x01F0\x006A\x030C",                /* 01F0; 006A 030C; Case map */
-            "\x01F1\x01F3",                      /* 01F1; 01F3; Case map */
-            "\x01F2\x01F3",                      /* 01F2; 01F3; Case map */
-            "\x01F4\x01F5",                      /* 01F4; 01F5; Case map */
-            "\x01F6\x0195",                      /* 01F6; 0195; Case map */
-            "\x01F7\x01BF",                      /* 01F7; 01BF; Case map */
-            "\x01F8\x01F9",                      /* 01F8; 01F9; Case map */
-            "\x01FA\x01FB",                      /* 01FA; 01FB; Case map */
-            "\x01FC\x01FD",                      /* 01FC; 01FD; Case map */
-            "\x01FE\x01FF",                      /* 01FE; 01FF; Case map */
-            "\x0200\x0201",                      /* 0200; 0201; Case map */
-            "\x0202\x0203",                      /* 0202; 0203; Case map */
-            "\x0204\x0205",                      /* 0204; 0205; Case map */
-            "\x0206\x0207",                      /* 0206; 0207; Case map */
-            "\x0208\x0209",                      /* 0208; 0209; Case map */
-            "\x020A\x020B",                      /* 020A; 020B; Case map */
-            "\x020C\x020D",                      /* 020C; 020D; Case map */
-            "\x020E\x020F",                      /* 020E; 020F; Case map */
-            "\x0210\x0211",                      /* 0210; 0211; Case map */
-            "\x0212\x0213",                      /* 0212; 0213; Case map */
-            "\x0214\x0215",                      /* 0214; 0215; Case map */
-            "\x0216\x0217",                      /* 0216; 0217; Case map */
-            "\x0218\x0219",                      /* 0218; 0219; Case map */
-            "\x021A\x021B",                      /* 021A; 021B; Case map */
-            "\x021C\x021D",                      /* 021C; 021D; Case map */
-            "\x021E\x021F",                      /* 021E; 021F; Case map */
-            "\x0220\x019E",                      /* 0220; 019E; Case map */
-            "\x0222\x0223",                      /* 0222; 0223; Case map */
-            "\x0224\x0225",                      /* 0224; 0225; Case map */
-            "\x0226\x0227",                      /* 0226; 0227; Case map */
-            "\x0228\x0229",                      /* 0228; 0229; Case map */
-            "\x022A\x022B",                      /* 022A; 022B; Case map */
-            "\x022C\x022D",                      /* 022C; 022D; Case map */
-            "\x022E\x022F",                      /* 022E; 022F; Case map */
-            "\x0230\x0231",                      /* 0230; 0231; Case map */
-            "\x0232\x0233",                      /* 0232; 0233; Case map */
-            "\x0345\x03B9",                      /* 0345; 03B9; Case map */
-            "\x037A\x0020\x03B9",      /* 037A; 0020 03B9; Additional folding */
-            "\x0386\x03AC",                      /* 0386; 03AC; Case map */
-            "\x0388\x03AD",                      /* 0388; 03AD; Case map */
-            "\x0389\x03AE",                      /* 0389; 03AE; Case map */
-            "\x038A\x03AF",                      /* 038A; 03AF; Case map */
-            "\x038C\x03CC",                      /* 038C; 03CC; Case map */
-            "\x038E\x03CD",                      /* 038E; 03CD; Case map */
-            "\x038F\x03CE",                      /* 038F; 03CE; Case map */
-            "\x0390\x03B9\x0308\x0301",          /* 0390; 03B9 0308 0301; Case map */
-            "\x0391\x03B1",                      /* 0391; 03B1; Case map */
-            "\x0392\x03B2",                      /* 0392; 03B2; Case map */
-            "\x0393\x03B3",                      /* 0393; 03B3; Case map */
-            "\x0394\x03B4",                      /* 0394; 03B4; Case map */
-            "\x0395\x03B5",                      /* 0395; 03B5; Case map */
-            "\x0396\x03B6",                      /* 0396; 03B6; Case map */
-            "\x0397\x03B7",                      /* 0397; 03B7; Case map */
-            "\x0398\x03B8",                      /* 0398; 03B8; Case map */
-            "\x0399\x03B9",                      /* 0399; 03B9; Case map */
-            "\x039A\x03BA",                      /* 039A; 03BA; Case map */
-            "\x039B\x03BB",                      /* 039B; 03BB; Case map */
-            "\x039C\x03BC",                      /* 039C; 03BC; Case map */
-            "\x039D\x03BD",                      /* 039D; 03BD; Case map */
-            "\x039E\x03BE",                      /* 039E; 03BE; Case map */
-            "\x039F\x03BF",                      /* 039F; 03BF; Case map */
-            "\x03A0\x03C0",                      /* 03A0; 03C0; Case map */
-            "\x03A1\x03C1",                      /* 03A1; 03C1; Case map */
-            "\x03A3\x03C3",                      /* 03A3; 03C3; Case map */
-            "\x03A4\x03C4",                      /* 03A4; 03C4; Case map */
-            "\x03A5\x03C5",                      /* 03A5; 03C5; Case map */
-            "\x03A6\x03C6",                      /* 03A6; 03C6; Case map */
-            "\x03A7\x03C7",                      /* 03A7; 03C7; Case map */
-            "\x03A8\x03C8",                      /* 03A8; 03C8; Case map */
-            "\x03A9\x03C9",                      /* 03A9; 03C9; Case map */
-            "\x03AA\x03CA",                      /* 03AA; 03CA; Case map */
-            "\x03AB\x03CB",                      /* 03AB; 03CB; Case map */
-            "\x03B0\x03C5\x0308\x0301",          /* 03B0; 03C5 0308 0301; Case map */
-            "\x03C2\x03C3",                      /* 03C2; 03C3; Case map */
-            "\x03D0\x03B2",                      /* 03D0; 03B2; Case map */
-            "\x03D1\x03B8",                      /* 03D1; 03B8; Case map */
-            "\x03D2\x03C5",            /* 03D2; 03C5; Additional folding */
-            "\x03D3\x03CD",            /* 03D3; 03CD; Additional folding */
-            "\x03D4\x03CB",            /* 03D4; 03CB; Additional folding */
-            "\x03D5\x03C6",                      /* 03D5; 03C6; Case map */
-            "\x03D6\x03C0",                      /* 03D6; 03C0; Case map */
-            "\x03D8\x03D9",                      /* 03D8; 03D9; Case map */
-            "\x03DA\x03DB",                      /* 03DA; 03DB; Case map */
-            "\x03DC\x03DD",                      /* 03DC; 03DD; Case map */
-            "\x03DE\x03DF",                      /* 03DE; 03DF; Case map */
-            "\x03E0\x03E1",                      /* 03E0; 03E1; Case map */
-            "\x03E2\x03E3",                      /* 03E2; 03E3; Case map */
-            "\x03E4\x03E5",                      /* 03E4; 03E5; Case map */
-            "\x03E6\x03E7",                      /* 03E6; 03E7; Case map */
-            "\x03E8\x03E9",                      /* 03E8; 03E9; Case map */
-            "\x03EA\x03EB",                      /* 03EA; 03EB; Case map */
-            "\x03EC\x03ED",                      /* 03EC; 03ED; Case map */
-            "\x03EE\x03EF",                      /* 03EE; 03EF; Case map */
-            "\x03F0\x03BA",                      /* 03F0; 03BA; Case map */
-            "\x03F1\x03C1",                      /* 03F1; 03C1; Case map */
-            "\x03F2\x03C3",                      /* 03F2; 03C3; Case map */
-            "\x03F4\x03B8",                      /* 03F4; 03B8; Case map */
-            "\x03F5\x03B5",                      /* 03F5; 03B5; Case map */
-            "\x0400\x0450",                      /* 0400; 0450; Case map */
-            "\x0401\x0451",                      /* 0401; 0451; Case map */
-            "\x0402\x0452",                      /* 0402; 0452; Case map */
-            "\x0403\x0453",                      /* 0403; 0453; Case map */
-            "\x0404\x0454",                      /* 0404; 0454; Case map */
-            "\x0405\x0455",                      /* 0405; 0455; Case map */
-            "\x0406\x0456",                      /* 0406; 0456; Case map */
-            "\x0407\x0457",                      /* 0407; 0457; Case map */
-            "\x0408\x0458",                      /* 0408; 0458; Case map */
-            "\x0409\x0459",                      /* 0409; 0459; Case map */
-            "\x040A\x045A",                      /* 040A; 045A; Case map */
-            "\x040B\x045B",                      /* 040B; 045B; Case map */
-            "\x040C\x045C",                      /* 040C; 045C; Case map */
-            "\x040D\x045D",                      /* 040D; 045D; Case map */
-            "\x040E\x045E",                      /* 040E; 045E; Case map */
-            "\x040F\x045F",                      /* 040F; 045F; Case map */
-            "\x0410\x0430",                      /* 0410; 0430; Case map */
-            "\x0411\x0431",                      /* 0411; 0431; Case map */
-            "\x0412\x0432",                      /* 0412; 0432; Case map */
-            "\x0413\x0433",                      /* 0413; 0433; Case map */
-            "\x0414\x0434",                      /* 0414; 0434; Case map */
-            "\x0415\x0435",                      /* 0415; 0435; Case map */
-            "\x0416\x0436",                      /* 0416; 0436; Case map */
-            "\x0417\x0437",                      /* 0417; 0437; Case map */
-            "\x0418\x0438",                      /* 0418; 0438; Case map */
-            "\x0419\x0439",                      /* 0419; 0439; Case map */
-            "\x041A\x043A",                      /* 041A; 043A; Case map */
-            "\x041B\x043B",                      /* 041B; 043B; Case map */
-            "\x041C\x043C",                      /* 041C; 043C; Case map */
-            "\x041D\x043D",                      /* 041D; 043D; Case map */
-            "\x041E\x043E",                      /* 041E; 043E; Case map */
-            "\x041F\x043F",                      /* 041F; 043F; Case map */
-            "\x0420\x0440",                      /* 0420; 0440; Case map */
-            "\x0421\x0441",                      /* 0421; 0441; Case map */
-            "\x0422\x0442",                      /* 0422; 0442; Case map */
-            "\x0423\x0443",                      /* 0423; 0443; Case map */
-            "\x0424\x0444",                      /* 0424; 0444; Case map */
-            "\x0425\x0445",                      /* 0425; 0445; Case map */
-            "\x0426\x0446",                      /* 0426; 0446; Case map */
-            "\x0427\x0447",                      /* 0427; 0447; Case map */
-            "\x0428\x0448",                      /* 0428; 0448; Case map */
-            "\x0429\x0449",                      /* 0429; 0449; Case map */
-            "\x042A\x044A",                      /* 042A; 044A; Case map */
-            "\x042B\x044B",                      /* 042B; 044B; Case map */
-            "\x042C\x044C",                      /* 042C; 044C; Case map */
-            "\x042D\x044D",                      /* 042D; 044D; Case map */
-            "\x042E\x044E",                      /* 042E; 044E; Case map */
-            "\x042F\x044F",                      /* 042F; 044F; Case map */
-            "\x0460\x0461",                      /* 0460; 0461; Case map */
-            "\x0462\x0463",                      /* 0462; 0463; Case map */
-            "\x0464\x0465",                      /* 0464; 0465; Case map */
-            "\x0466\x0467",                      /* 0466; 0467; Case map */
-            "\x0468\x0469",                      /* 0468; 0469; Case map */
-            "\x046A\x046B",                      /* 046A; 046B; Case map */
-            "\x046C\x046D",                      /* 046C; 046D; Case map */
-            "\x046E\x046F",                      /* 046E; 046F; Case map */
-            "\x0470\x0471",                      /* 0470; 0471; Case map */
-            "\x0472\x0473",                      /* 0472; 0473; Case map */
-            "\x0474\x0475",                      /* 0474; 0475; Case map */
-            "\x0476\x0477",                      /* 0476; 0477; Case map */
-            "\x0478\x0479",                      /* 0478; 0479; Case map */
-            "\x047A\x047B",                      /* 047A; 047B; Case map */
-            "\x047C\x047D",                      /* 047C; 047D; Case map */
-            "\x047E\x047F",                      /* 047E; 047F; Case map */
-            "\x0480\x0481",                      /* 0480; 0481; Case map */
-            "\x048A\x048B",                      /* 048A; 048B; Case map */
-            "\x048C\x048D",                      /* 048C; 048D; Case map */
-            "\x048E\x048F",                      /* 048E; 048F; Case map */
-            "\x0490\x0491",                      /* 0490; 0491; Case map */
-            "\x0492\x0493",                      /* 0492; 0493; Case map */
-            "\x0494\x0495",                      /* 0494; 0495; Case map */
-            "\x0496\x0497",                      /* 0496; 0497; Case map */
-            "\x0498\x0499",                      /* 0498; 0499; Case map */
-            "\x049A\x049B",                      /* 049A; 049B; Case map */
-            "\x049C\x049D",                      /* 049C; 049D; Case map */
-            "\x049E\x049F",                      /* 049E; 049F; Case map */
-            "\x04A0\x04A1",                      /* 04A0; 04A1; Case map */
-            "\x04A2\x04A3",                      /* 04A2; 04A3; Case map */
-            "\x04A4\x04A5",                      /* 04A4; 04A5; Case map */
-            "\x04A6\x04A7",                      /* 04A6; 04A7; Case map */
-            "\x04A8\x04A9",                      /* 04A8; 04A9; Case map */
-            "\x04AA\x04AB",                      /* 04AA; 04AB; Case map */
-            "\x04AC\x04AD",                      /* 04AC; 04AD; Case map */
-            "\x04AE\x04AF",                      /* 04AE; 04AF; Case map */
-            "\x04B0\x04B1",                      /* 04B0; 04B1; Case map */
-            "\x04B2\x04B3",                      /* 04B2; 04B3; Case map */
-            "\x04B4\x04B5",                      /* 04B4; 04B5; Case map */
-            "\x04B6\x04B7",                      /* 04B6; 04B7; Case map */
-            "\x04B8\x04B9",                      /* 04B8; 04B9; Case map */
-            "\x04BA\x04BB",                      /* 04BA; 04BB; Case map */
-            "\x04BC\x04BD",                      /* 04BC; 04BD; Case map */
-            "\x04BE\x04BF",                      /* 04BE; 04BF; Case map */
-            "\x04C1\x04C2",                      /* 04C1; 04C2; Case map */
-            "\x04C3\x04C4",                      /* 04C3; 04C4; Case map */
-            "\x04C5\x04C6",                      /* 04C5; 04C6; Case map */
-            "\x04C7\x04C8",                      /* 04C7; 04C8; Case map */
-            "\x04C9\x04CA",                      /* 04C9; 04CA; Case map */
-            "\x04CB\x04CC",                      /* 04CB; 04CC; Case map */
-            "\x04CD\x04CE",                      /* 04CD; 04CE; Case map */
-            "\x04D0\x04D1",                      /* 04D0; 04D1; Case map */
-            "\x04D2\x04D3",                      /* 04D2; 04D3; Case map */
-            "\x04D4\x04D5",                      /* 04D4; 04D5; Case map */
-            "\x04D6\x04D7",                      /* 04D6; 04D7; Case map */
-            "\x04D8\x04D9",                      /* 04D8; 04D9; Case map */
-            "\x04DA\x04DB",                      /* 04DA; 04DB; Case map */
-            "\x04DC\x04DD",                      /* 04DC; 04DD; Case map */
-            "\x04DE\x04DF",                      /* 04DE; 04DF; Case map */
-            "\x04E0\x04E1",                      /* 04E0; 04E1; Case map */
-            "\x04E2\x04E3",                      /* 04E2; 04E3; Case map */
-            "\x04E4\x04E5",                      /* 04E4; 04E5; Case map */
-            "\x04E6\x04E7",                      /* 04E6; 04E7; Case map */
-            "\x04E8\x04E9",                      /* 04E8; 04E9; Case map */
-            "\x04EA\x04EB",                      /* 04EA; 04EB; Case map */
-            "\x04EC\x04ED",                      /* 04EC; 04ED; Case map */
-            "\x04EE\x04EF",                      /* 04EE; 04EF; Case map */
-            "\x04F0\x04F1",                      /* 04F0; 04F1; Case map */
-            "\x04F2\x04F3",                      /* 04F2; 04F3; Case map */
-            "\x04F4\x04F5",                      /* 04F4; 04F5; Case map */
-            "\x04F8\x04F9",                      /* 04F8; 04F9; Case map */
-            "\x0500\x0501",                      /* 0500; 0501; Case map */
-            "\x0502\x0503",                      /* 0502; 0503; Case map */
-            "\x0504\x0505",                      /* 0504; 0505; Case map */
-            "\x0506\x0507",                      /* 0506; 0507; Case map */
-            "\x0508\x0509",                      /* 0508; 0509; Case map */
-            "\x050A\x050B",                      /* 050A; 050B; Case map */
-            "\x050C\x050D",                      /* 050C; 050D; Case map */
-            "\x050E\x050F",                      /* 050E; 050F; Case map */
-            "\x0531\x0561",                      /* 0531; 0561; Case map */
-            "\x0532\x0562",                      /* 0532; 0562; Case map */
-            "\x0533\x0563",                      /* 0533; 0563; Case map */
-            "\x0534\x0564",                      /* 0534; 0564; Case map */
-            "\x0535\x0565",                      /* 0535; 0565; Case map */
-            "\x0536\x0566",                      /* 0536; 0566; Case map */
-            "\x0537\x0567",                      /* 0537; 0567; Case map */
-            "\x0538\x0568",                      /* 0538; 0568; Case map */
-            "\x0539\x0569",                      /* 0539; 0569; Case map */
-            "\x053A\x056A",                      /* 053A; 056A; Case map */
-            "\x053B\x056B",                      /* 053B; 056B; Case map */
-            "\x053C\x056C",                      /* 053C; 056C; Case map */
-            "\x053D\x056D",                      /* 053D; 056D; Case map */
-            "\x053E\x056E",                      /* 053E; 056E; Case map */
-            "\x053F\x056F",                      /* 053F; 056F; Case map */
-            "\x0540\x0570",                      /* 0540; 0570; Case map */
-            "\x0541\x0571",                      /* 0541; 0571; Case map */
-            "\x0542\x0572",                      /* 0542; 0572; Case map */
-            "\x0543\x0573",                      /* 0543; 0573; Case map */
-            "\x0544\x0574",                      /* 0544; 0574; Case map */
-            "\x0545\x0575",                      /* 0545; 0575; Case map */
-            "\x0546\x0576",                      /* 0546; 0576; Case map */
-            "\x0547\x0577",                      /* 0547; 0577; Case map */
-            "\x0548\x0578",                      /* 0548; 0578; Case map */
-            "\x0549\x0579",                      /* 0549; 0579; Case map */
-            "\x054A\x057A",                      /* 054A; 057A; Case map */
-            "\x054B\x057B",                      /* 054B; 057B; Case map */
-            "\x054C\x057C",                      /* 054C; 057C; Case map */
-            "\x054D\x057D",                      /* 054D; 057D; Case map */
-            "\x054E\x057E",                      /* 054E; 057E; Case map */
-            "\x054F\x057F",                      /* 054F; 057F; Case map */
-            "\x0550\x0580",                      /* 0550; 0580; Case map */
-            "\x0551\x0581",                      /* 0551; 0581; Case map */
-            "\x0552\x0582",                      /* 0552; 0582; Case map */
-            "\x0553\x0583",                      /* 0553; 0583; Case map */
-            "\x0554\x0584",                      /* 0554; 0584; Case map */
-            "\x0555\x0585",                      /* 0555; 0585; Case map */
-            "\x0556\x0586",                      /* 0556; 0586; Case map */
-            "\x0587\x0565\x0582",                /* 0587; 0565 0582; Case map */
-            "\x1E00\x1E01",                      /* 1E00; 1E01; Case map */
-            "\x1E02\x1E03",                      /* 1E02; 1E03; Case map */
-            "\x1E04\x1E05",                      /* 1E04; 1E05; Case map */
-            "\x1E06\x1E07",                      /* 1E06; 1E07; Case map */
-            "\x1E08\x1E09",                      /* 1E08; 1E09; Case map */
-            "\x1E0A\x1E0B",                      /* 1E0A; 1E0B; Case map */
-            "\x1E0C\x1E0D",                      /* 1E0C; 1E0D; Case map */
-            "\x1E0E\x1E0F",                      /* 1E0E; 1E0F; Case map */
-            "\x1E10\x1E11",                      /* 1E10; 1E11; Case map */
-            "\x1E12\x1E13",                      /* 1E12; 1E13; Case map */
-            "\x1E14\x1E15",                      /* 1E14; 1E15; Case map */
-            "\x1E16\x1E17",                      /* 1E16; 1E17; Case map */
-            "\x1E18\x1E19",                      /* 1E18; 1E19; Case map */
-            "\x1E1A\x1E1B",                      /* 1E1A; 1E1B; Case map */
-            "\x1E1C\x1E1D",                      /* 1E1C; 1E1D; Case map */
-            "\x1E1E\x1E1F",                      /* 1E1E; 1E1F; Case map */
-            "\x1E20\x1E21",                      /* 1E20; 1E21; Case map */
-            "\x1E22\x1E23",                      /* 1E22; 1E23; Case map */
-            "\x1E24\x1E25",                      /* 1E24; 1E25; Case map */
-            "\x1E26\x1E27",                      /* 1E26; 1E27; Case map */
-            "\x1E28\x1E29",                      /* 1E28; 1E29; Case map */
-            "\x1E2A\x1E2B",                      /* 1E2A; 1E2B; Case map */
-            "\x1E2C\x1E2D",                      /* 1E2C; 1E2D; Case map */
-            "\x1E2E\x1E2F",                      /* 1E2E; 1E2F; Case map */
-            "\x1E30\x1E31",                      /* 1E30; 1E31; Case map */
-            "\x1E32\x1E33",                      /* 1E32; 1E33; Case map */
-            "\x1E34\x1E35",                      /* 1E34; 1E35; Case map */
-            "\x1E36\x1E37",                      /* 1E36; 1E37; Case map */
-            "\x1E38\x1E39",                      /* 1E38; 1E39; Case map */
-            "\x1E3A\x1E3B",                      /* 1E3A; 1E3B; Case map */
-            "\x1E3C\x1E3D",                      /* 1E3C; 1E3D; Case map */
-            "\x1E3E\x1E3F",                      /* 1E3E; 1E3F; Case map */
-            "\x1E40\x1E41",                      /* 1E40; 1E41; Case map */
-            "\x1E42\x1E43",                      /* 1E42; 1E43; Case map */
-            "\x1E44\x1E45",                      /* 1E44; 1E45; Case map */
-            "\x1E46\x1E47",                      /* 1E46; 1E47; Case map */
-            "\x1E48\x1E49",                      /* 1E48; 1E49; Case map */
-            "\x1E4A\x1E4B",                      /* 1E4A; 1E4B; Case map */
-            "\x1E4C\x1E4D",                      /* 1E4C; 1E4D; Case map */
-            "\x1E4E\x1E4F",                      /* 1E4E; 1E4F; Case map */
-            "\x1E50\x1E51",                      /* 1E50; 1E51; Case map */
-            "\x1E52\x1E53",                      /* 1E52; 1E53; Case map */
-            "\x1E54\x1E55",                      /* 1E54; 1E55; Case map */
-            "\x1E56\x1E57",                      /* 1E56; 1E57; Case map */
-            "\x1E58\x1E59",                      /* 1E58; 1E59; Case map */
-            "\x1E5A\x1E5B",                      /* 1E5A; 1E5B; Case map */
-            "\x1E5C\x1E5D",                      /* 1E5C; 1E5D; Case map */
-            "\x1E5E\x1E5F",                      /* 1E5E; 1E5F; Case map */
-            "\x1E60\x1E61",                      /* 1E60; 1E61; Case map */
-            "\x1E62\x1E63",                      /* 1E62; 1E63; Case map */
-            "\x1E64\x1E65",                      /* 1E64; 1E65; Case map */
-            "\x1E66\x1E67",                      /* 1E66; 1E67; Case map */
-            "\x1E68\x1E69",                      /* 1E68; 1E69; Case map */
-            "\x1E6A\x1E6B",                      /* 1E6A; 1E6B; Case map */
-            "\x1E6C\x1E6D",                      /* 1E6C; 1E6D; Case map */
-            "\x1E6E\x1E6F",                      /* 1E6E; 1E6F; Case map */
-            "\x1E70\x1E71",                      /* 1E70; 1E71; Case map */
-            "\x1E72\x1E73",                      /* 1E72; 1E73; Case map */
-            "\x1E74\x1E75",                      /* 1E74; 1E75; Case map */
-            "\x1E76\x1E77",                      /* 1E76; 1E77; Case map */
-            "\x1E78\x1E79",                      /* 1E78; 1E79; Case map */
-            "\x1E7A\x1E7B",                      /* 1E7A; 1E7B; Case map */
-            "\x1E7C\x1E7D",                      /* 1E7C; 1E7D; Case map */
-            "\x1E7E\x1E7F",                      /* 1E7E; 1E7F; Case map */
-            "\x1E80\x1E81",                      /* 1E80; 1E81; Case map */
-            "\x1E82\x1E83",                      /* 1E82; 1E83; Case map */
-            "\x1E84\x1E85",                      /* 1E84; 1E85; Case map */
-            "\x1E86\x1E87",                      /* 1E86; 1E87; Case map */
-            "\x1E88\x1E89",                      /* 1E88; 1E89; Case map */
-            "\x1E8A\x1E8B",                      /* 1E8A; 1E8B; Case map */
-            "\x1E8C\x1E8D",                      /* 1E8C; 1E8D; Case map */
-            "\x1E8E\x1E8F",                      /* 1E8E; 1E8F; Case map */
-            "\x1E90\x1E91",                      /* 1E90; 1E91; Case map */
-            "\x1E92\x1E93",                      /* 1E92; 1E93; Case map */
-            "\x1E94\x1E95",                      /* 1E94; 1E95; Case map */
-            "\x1E96\x0068\x0331",                /* 1E96; 0068 0331; Case map */
-            "\x1E97\x0074\x0308",                /* 1E97; 0074 0308; Case map */
-            "\x1E98\x0077\x030A",                /* 1E98; 0077 030A; Case map */
-            "\x1E99\x0079\x030A",                /* 1E99; 0079 030A; Case map */
-            "\x1E9A\x0061\x02BE",                /* 1E9A; 0061 02BE; Case map */
-            "\x1E9B\x1E61",                      /* 1E9B; 1E61; Case map */
-            "\x1EA0\x1EA1",                      /* 1EA0; 1EA1; Case map */
-            "\x1EA2\x1EA3",                      /* 1EA2; 1EA3; Case map */
-            "\x1EA4\x1EA5",                      /* 1EA4; 1EA5; Case map */
-            "\x1EA6\x1EA7",                      /* 1EA6; 1EA7; Case map */
-            "\x1EA8\x1EA9",                      /* 1EA8; 1EA9; Case map */
-            "\x1EAA\x1EAB",                      /* 1EAA; 1EAB; Case map */
-            "\x1EAC\x1EAD",                      /* 1EAC; 1EAD; Case map */
-            "\x1EAE\x1EAF",                      /* 1EAE; 1EAF; Case map */
-            "\x1EB0\x1EB1",                      /* 1EB0; 1EB1; Case map */
-            "\x1EB2\x1EB3",                      /* 1EB2; 1EB3; Case map */
-            "\x1EB4\x1EB5",                      /* 1EB4; 1EB5; Case map */
-            "\x1EB6\x1EB7",                      /* 1EB6; 1EB7; Case map */
-            "\x1EB8\x1EB9",                      /* 1EB8; 1EB9; Case map */
-            "\x1EBA\x1EBB",                      /* 1EBA; 1EBB; Case map */
-            "\x1EBC\x1EBD",                      /* 1EBC; 1EBD; Case map */
-            "\x1EBE\x1EBF",                      /* 1EBE; 1EBF; Case map */
-            "\x1EC0\x1EC1",                      /* 1EC0; 1EC1; Case map */
-            "\x1EC2\x1EC3",                      /* 1EC2; 1EC3; Case map */
-            "\x1EC4\x1EC5",                      /* 1EC4; 1EC5; Case map */
-            "\x1EC6\x1EC7",                      /* 1EC6; 1EC7; Case map */
-            "\x1EC8\x1EC9",                      /* 1EC8; 1EC9; Case map */
-            "\x1ECA\x1ECB",                      /* 1ECA; 1ECB; Case map */
-            "\x1ECC\x1ECD",                      /* 1ECC; 1ECD; Case map */
-            "\x1ECE\x1ECF",                      /* 1ECE; 1ECF; Case map */
-            "\x1ED0\x1ED1",                      /* 1ED0; 1ED1; Case map */
-            "\x1ED2\x1ED3",                      /* 1ED2; 1ED3; Case map */
-            "\x1ED4\x1ED5",                      /* 1ED4; 1ED5; Case map */
-            "\x1ED6\x1ED7",                      /* 1ED6; 1ED7; Case map */
-            "\x1ED8\x1ED9",                      /* 1ED8; 1ED9; Case map */
-            "\x1EDA\x1EDB",                      /* 1EDA; 1EDB; Case map */
-            "\x1EDC\x1EDD",                      /* 1EDC; 1EDD; Case map */
-            "\x1EDE\x1EDF",                      /* 1EDE; 1EDF; Case map */
-            "\x1EE0\x1EE1",                      /* 1EE0; 1EE1; Case map */
-            "\x1EE2\x1EE3",                      /* 1EE2; 1EE3; Case map */
-            "\x1EE4\x1EE5",                      /* 1EE4; 1EE5; Case map */
-            "\x1EE6\x1EE7",                      /* 1EE6; 1EE7; Case map */
-            "\x1EE8\x1EE9",                      /* 1EE8; 1EE9; Case map */
-            "\x1EEA\x1EEB",                      /* 1EEA; 1EEB; Case map */
-            "\x1EEC\x1EED",                      /* 1EEC; 1EED; Case map */
-            "\x1EEE\x1EEF",                      /* 1EEE; 1EEF; Case map */
-            "\x1EF0\x1EF1",                      /* 1EF0; 1EF1; Case map */
-            "\x1EF2\x1EF3",                      /* 1EF2; 1EF3; Case map */
-            "\x1EF4\x1EF5",                      /* 1EF4; 1EF5; Case map */
-            "\x1EF6\x1EF7",                      /* 1EF6; 1EF7; Case map */
-            "\x1EF8\x1EF9",                      /* 1EF8; 1EF9; Case map */
-            "\x1F08\x1F00",                      /* 1F08; 1F00; Case map */
-            "\x1F09\x1F01",                      /* 1F09; 1F01; Case map */
-            "\x1F0A\x1F02",                      /* 1F0A; 1F02; Case map */
-            "\x1F0B\x1F03",                      /* 1F0B; 1F03; Case map */
-            "\x1F0C\x1F04",                      /* 1F0C; 1F04; Case map */
-            "\x1F0D\x1F05",                      /* 1F0D; 1F05; Case map */
-            "\x1F0E\x1F06",                      /* 1F0E; 1F06; Case map */
-            "\x1F0F\x1F07",                      /* 1F0F; 1F07; Case map */
-            "\x1F18\x1F10",                      /* 1F18; 1F10; Case map */
-            "\x1F19\x1F11",                      /* 1F19; 1F11; Case map */
-            "\x1F1A\x1F12",                      /* 1F1A; 1F12; Case map */
-            "\x1F1B\x1F13",                      /* 1F1B; 1F13; Case map */
-            "\x1F1C\x1F14",                      /* 1F1C; 1F14; Case map */
-            "\x1F1D\x1F15",                      /* 1F1D; 1F15; Case map */
-            "\x1F28\x1F20",                      /* 1F28; 1F20; Case map */
-            "\x1F29\x1F21",                      /* 1F29; 1F21; Case map */
-            "\x1F2A\x1F22",                      /* 1F2A; 1F22; Case map */
-            "\x1F2B\x1F23",                      /* 1F2B; 1F23; Case map */
-            "\x1F2C\x1F24",                      /* 1F2C; 1F24; Case map */
-            "\x1F2D\x1F25",                      /* 1F2D; 1F25; Case map */
-            "\x1F2E\x1F26",                      /* 1F2E; 1F26; Case map */
-            "\x1F2F\x1F27",                      /* 1F2F; 1F27; Case map */
-            "\x1F38\x1F30",                      /* 1F38; 1F30; Case map */
-            "\x1F39\x1F31",                      /* 1F39; 1F31; Case map */
-            "\x1F3A\x1F32",                      /* 1F3A; 1F32; Case map */
-            "\x1F3B\x1F33",                      /* 1F3B; 1F33; Case map */
-            "\x1F3C\x1F34",                      /* 1F3C; 1F34; Case map */
-            "\x1F3D\x1F35",                      /* 1F3D; 1F35; Case map */
-            "\x1F3E\x1F36",                      /* 1F3E; 1F36; Case map */
-            "\x1F3F\x1F37",                      /* 1F3F; 1F37; Case map */
-            "\x1F48\x1F40",                      /* 1F48; 1F40; Case map */
-            "\x1F49\x1F41",                      /* 1F49; 1F41; Case map */
-            "\x1F4A\x1F42",                      /* 1F4A; 1F42; Case map */
-            "\x1F4B\x1F43",                      /* 1F4B; 1F43; Case map */
-            "\x1F4C\x1F44",                      /* 1F4C; 1F44; Case map */
-            "\x1F4D\x1F45",                      /* 1F4D; 1F45; Case map */
-            "\x1F50\x03C5\x0313",                /* 1F50; 03C5 0313; Case map */
-            "\x1F52\x03C5\x0313\x0300",          /* 1F52; 03C5 0313 0300; Case map */
-            "\x1F54\x03C5\x0313\x0301",          /* 1F54; 03C5 0313 0301; Case map */
-            "\x1F56\x03C5\x0313\x0342",          /* 1F56; 03C5 0313 0342; Case map */
-            "\x1F59\x1F51",                      /* 1F59; 1F51; Case map */
-            "\x1F5B\x1F53",                      /* 1F5B; 1F53; Case map */
-            "\x1F5D\x1F55",                      /* 1F5D; 1F55; Case map */
-            "\x1F5F\x1F57",                      /* 1F5F; 1F57; Case map */
-            "\x1F68\x1F60",                      /* 1F68; 1F60; Case map */
-            "\x1F69\x1F61",                      /* 1F69; 1F61; Case map */
-            "\x1F6A\x1F62",                      /* 1F6A; 1F62; Case map */
-            "\x1F6B\x1F63",                      /* 1F6B; 1F63; Case map */
-            "\x1F6C\x1F64",                      /* 1F6C; 1F64; Case map */
-            "\x1F6D\x1F65",                      /* 1F6D; 1F65; Case map */
-            "\x1F6E\x1F66",                      /* 1F6E; 1F66; Case map */
-            "\x1F6F\x1F67",                      /* 1F6F; 1F67; Case map */
-            "\x1F80\x1F00\x03B9",                /* 1F80; 1F00 03B9; Case map */
-            "\x1F81\x1F01\x03B9",                /* 1F81; 1F01 03B9; Case map */
-            "\x1F82\x1F02\x03B9",                /* 1F82; 1F02 03B9; Case map */
-            "\x1F83\x1F03\x03B9",                /* 1F83; 1F03 03B9; Case map */
-            "\x1F84\x1F04\x03B9",                /* 1F84; 1F04 03B9; Case map */
-            "\x1F85\x1F05\x03B9",                /* 1F85; 1F05 03B9; Case map */
-            "\x1F86\x1F06\x03B9",                /* 1F86; 1F06 03B9; Case map */
-            "\x1F87\x1F07\x03B9",                /* 1F87; 1F07 03B9; Case map */
-            "\x1F88\x1F00\x03B9",                /* 1F88; 1F00 03B9; Case map */
-            "\x1F89\x1F01\x03B9",                /* 1F89; 1F01 03B9; Case map */
-            "\x1F8A\x1F02\x03B9",                /* 1F8A; 1F02 03B9; Case map */
-            "\x1F8B\x1F03\x03B9",                /* 1F8B; 1F03 03B9; Case map */
-            "\x1F8C\x1F04\x03B9",                /* 1F8C; 1F04 03B9; Case map */
-            "\x1F8D\x1F05\x03B9",                /* 1F8D; 1F05 03B9; Case map */
-            "\x1F8E\x1F06\x03B9",                /* 1F8E; 1F06 03B9; Case map */
-            "\x1F8F\x1F07\x03B9",                /* 1F8F; 1F07 03B9; Case map */
-            "\x1F90\x1F20\x03B9",                /* 1F90; 1F20 03B9; Case map */
-            "\x1F91\x1F21\x03B9",                /* 1F91; 1F21 03B9; Case map */
-            "\x1F92\x1F22\x03B9",                /* 1F92; 1F22 03B9; Case map */
-            "\x1F93\x1F23\x03B9",                /* 1F93; 1F23 03B9; Case map */
-            "\x1F94\x1F24\x03B9",                /* 1F94; 1F24 03B9; Case map */
-            "\x1F95\x1F25\x03B9",                /* 1F95; 1F25 03B9; Case map */
-            "\x1F96\x1F26\x03B9",                /* 1F96; 1F26 03B9; Case map */
-            "\x1F97\x1F27\x03B9",                /* 1F97; 1F27 03B9; Case map */
-            "\x1F98\x1F20\x03B9",                /* 1F98; 1F20 03B9; Case map */
-            "\x1F99\x1F21\x03B9",                /* 1F99; 1F21 03B9; Case map */
-            "\x1F9A\x1F22\x03B9",                /* 1F9A; 1F22 03B9; Case map */
-            "\x1F9B\x1F23\x03B9",                /* 1F9B; 1F23 03B9; Case map */
-            "\x1F9C\x1F24\x03B9",                /* 1F9C; 1F24 03B9; Case map */
-            "\x1F9D\x1F25\x03B9",                /* 1F9D; 1F25 03B9; Case map */
-            "\x1F9E\x1F26\x03B9",                /* 1F9E; 1F26 03B9; Case map */
-            "\x1F9F\x1F27\x03B9",                /* 1F9F; 1F27 03B9; Case map */
-            "\x1FA0\x1F60\x03B9",                /* 1FA0; 1F60 03B9; Case map */
-            "\x1FA1\x1F61\x03B9",                /* 1FA1; 1F61 03B9; Case map */
-            "\x1FA2\x1F62\x03B9",                /* 1FA2; 1F62 03B9; Case map */
-            "\x1FA3\x1F63\x03B9",                /* 1FA3; 1F63 03B9; Case map */
-            "\x1FA4\x1F64\x03B9",                /* 1FA4; 1F64 03B9; Case map */
-            "\x1FA5\x1F65\x03B9",                /* 1FA5; 1F65 03B9; Case map */
-            "\x1FA6\x1F66\x03B9",                /* 1FA6; 1F66 03B9; Case map */
-            "\x1FA7\x1F67\x03B9",                /* 1FA7; 1F67 03B9; Case map */
-            "\x1FA8\x1F60\x03B9",                /* 1FA8; 1F60 03B9; Case map */
-            "\x1FA9\x1F61\x03B9",                /* 1FA9; 1F61 03B9; Case map */
-            "\x1FAA\x1F62\x03B9",                /* 1FAA; 1F62 03B9; Case map */
-            "\x1FAB\x1F63\x03B9",                /* 1FAB; 1F63 03B9; Case map */
-            "\x1FAC\x1F64\x03B9",                /* 1FAC; 1F64 03B9; Case map */
-            "\x1FAD\x1F65\x03B9",                /* 1FAD; 1F65 03B9; Case map */
-            "\x1FAE\x1F66\x03B9",                /* 1FAE; 1F66 03B9; Case map */
-            "\x1FAF\x1F67\x03B9",                /* 1FAF; 1F67 03B9; Case map */
-            "\x1FB2\x1F70\x03B9",                /* 1FB2; 1F70 03B9; Case map */
-            "\x1FB3\x03B1\x03B9",                /* 1FB3; 03B1 03B9; Case map */
-            "\x1FB4\x03AC\x03B9",                /* 1FB4; 03AC 03B9; Case map */
-            "\x1FB6\x03B1\x0342",                /* 1FB6; 03B1 0342; Case map */
-            "\x1FB7\x03B1\x0342\x03B9",          /* 1FB7; 03B1 0342 03B9; Case map */
-            "\x1FB8\x1FB0",                      /* 1FB8; 1FB0; Case map */
-            "\x1FB9\x1FB1",                      /* 1FB9; 1FB1; Case map */
-            "\x1FBA\x1F70",                      /* 1FBA; 1F70; Case map */
-            "\x1FBB\x1F71",                      /* 1FBB; 1F71; Case map */
-            "\x1FBC\x03B1\x03B9",                /* 1FBC; 03B1 03B9; Case map */
-            "\x1FBE\x03B9",                      /* 1FBE; 03B9; Case map */
-            "\x1FC2\x1F74\x03B9",                /* 1FC2; 1F74 03B9; Case map */
-            "\x1FC3\x03B7\x03B9",                /* 1FC3; 03B7 03B9; Case map */
-            "\x1FC4\x03AE\x03B9",                /* 1FC4; 03AE 03B9; Case map */
-            "\x1FC6\x03B7\x0342",                /* 1FC6; 03B7 0342; Case map */
-            "\x1FC7\x03B7\x0342\x03B9",          /* 1FC7; 03B7 0342 03B9; Case map */
-            "\x1FC8\x1F72",                      /* 1FC8; 1F72; Case map */
-            "\x1FC9\x1F73",                      /* 1FC9; 1F73; Case map */
-            "\x1FCA\x1F74",                      /* 1FCA; 1F74; Case map */
-            "\x1FCB\x1F75",                      /* 1FCB; 1F75; Case map */
-            "\x1FCC\x03B7\x03B9",                /* 1FCC; 03B7 03B9; Case map */
-            "\x1FD2\x03B9\x0308\x0300",          /* 1FD2; 03B9 0308 0300; Case map */
-            "\x1FD3\x03B9\x0308\x0301",          /* 1FD3; 03B9 0308 0301; Case map */
-            "\x1FD6\x03B9\x0342",                /* 1FD6; 03B9 0342; Case map */
-            "\x1FD7\x03B9\x0308\x0342",          /* 1FD7; 03B9 0308 0342; Case map */
-            "\x1FD8\x1FD0",                      /* 1FD8; 1FD0; Case map */
-            "\x1FD9\x1FD1",                      /* 1FD9; 1FD1; Case map */
-            "\x1FDA\x1F76",                      /* 1FDA; 1F76; Case map */
-            "\x1FDB\x1F77",                      /* 1FDB; 1F77; Case map */
-            "\x1FE2\x03C5\x0308\x0300",          /* 1FE2; 03C5 0308 0300; Case map */
-            "\x1FE3\x03C5\x0308\x0301",          /* 1FE3; 03C5 0308 0301; Case map */
-            "\x1FE4\x03C1\x0313",                /* 1FE4; 03C1 0313; Case map */
-            "\x1FE6\x03C5\x0342",                /* 1FE6; 03C5 0342; Case map */
-            "\x1FE7\x03C5\x0308\x0342",          /* 1FE7; 03C5 0308 0342; Case map */
-            "\x1FE8\x1FE0",                      /* 1FE8; 1FE0; Case map */
-            "\x1FE9\x1FE1",                      /* 1FE9; 1FE1; Case map */
-            "\x1FEA\x1F7A",                      /* 1FEA; 1F7A; Case map */
-            "\x1FEB\x1F7B",                      /* 1FEB; 1F7B; Case map */
-            "\x1FEC\x1FE5",                      /* 1FEC; 1FE5; Case map */
-            "\x1FF2\x1F7C\x03B9",                /* 1FF2; 1F7C 03B9; Case map */
-            "\x1FF3\x03C9\x03B9",                /* 1FF3; 03C9 03B9; Case map */
-            "\x1FF4\x03CE\x03B9",                /* 1FF4; 03CE 03B9; Case map */
-            "\x1FF6\x03C9\x0342",                /* 1FF6; 03C9 0342; Case map */
-            "\x1FF7\x03C9\x0342\x03B9",          /* 1FF7; 03C9 0342 03B9; Case map */
-            "\x1FF8\x1F78",                      /* 1FF8; 1F78; Case map */
-            "\x1FF9\x1F79",                      /* 1FF9; 1F79; Case map */
-            "\x1FFA\x1F7C",                      /* 1FFA; 1F7C; Case map */
-            "\x1FFB\x1F7D",                      /* 1FFB; 1F7D; Case map */
-            "\x1FFC\x03C9\x03B9",                /* 1FFC; 03C9 03B9; Case map */
-            "\x20A8\x0072\x0073",      /* 20A8; 0072 0073; Additional folding */
-            "\x2102\x0063",            /* 2102; 0063; Additional folding */
-            "\x2103\x00B0\x0063",      /* 2103; 00B0 0063; Additional folding */
-            "\x2107\x025B",            /* 2107; 025B; Additional folding */
-            "\x2109\x00B0\x0066",      /* 2109; 00B0 0066; Additional folding */
-            "\x210B\x0068",            /* 210B; 0068; Additional folding */
-            "\x210C\x0068",            /* 210C; 0068; Additional folding */
-            "\x210D\x0068",            /* 210D; 0068; Additional folding */
-            "\x2110\x0069",            /* 2110; 0069; Additional folding */
-            "\x2111\x0069",            /* 2111; 0069; Additional folding */
-            "\x2112\x006C",            /* 2112; 006C; Additional folding */
-            "\x2115\x006E",            /* 2115; 006E; Additional folding */
-            "\x2116\x006E\x006F",      /* 2116; 006E 006F; Additional folding */
-            "\x2119\x0070",            /* 2119; 0070; Additional folding */
-            "\x211A\x0071",            /* 211A; 0071; Additional folding */
-            "\x211B\x0072",            /* 211B; 0072; Additional folding */
-            "\x211C\x0072",            /* 211C; 0072; Additional folding */
-            "\x211D\x0072",            /* 211D; 0072; Additional folding */
-            "\x2120\x0073\x006D",      /* 2120; 0073 006D; Additional folding */
-            "\x2121\x0074\x0065\x006C",  /* 2121; 0074 0065 006C; Additional folding */
-            "\x2122\x0074\x006D",      /* 2122; 0074 006D; Additional folding */
-            "\x2124\x007A",            /* 2124; 007A; Additional folding */
-            "\x2126\x03C9",                      /* 2126; 03C9; Case map */
-            "\x2128\x007A",            /* 2128; 007A; Additional folding */
-            "\x212A\x006B",                      /* 212A; 006B; Case map */
-            "\x212B\x00E5",                      /* 212B; 00E5; Case map */
-            "\x212C\x0062",            /* 212C; 0062; Additional folding */
-            "\x212D\x0063",            /* 212D; 0063; Additional folding */
-            "\x2130\x0065",            /* 2130; 0065; Additional folding */
-            "\x2131\x0066",            /* 2131; 0066; Additional folding */
-            "\x2133\x006D",            /* 2133; 006D; Additional folding */
-            "\x213E\x03B3",            /* 213E; 03B3; Additional folding */
-            "\x213F\x03C0",            /* 213F; 03C0; Additional folding */
-            "\x2145\x0064",            /* 2145; 0064; Additional folding */
-            "\x2160\x2170",                      /* 2160; 2170; Case map */
-            "\x2161\x2171",                      /* 2161; 2171; Case map */
-            "\x2162\x2172",                      /* 2162; 2172; Case map */
-            "\x2163\x2173",                      /* 2163; 2173; Case map */
-            "\x2164\x2174",                      /* 2164; 2174; Case map */
-            "\x2165\x2175",                      /* 2165; 2175; Case map */
-            "\x2166\x2176",                      /* 2166; 2176; Case map */
-            "\x2167\x2177",                      /* 2167; 2177; Case map */
-            "\x2168\x2178",                      /* 2168; 2178; Case map */
-            "\x2169\x2179",                      /* 2169; 2179; Case map */
-            "\x216A\x217A",                      /* 216A; 217A; Case map */
-            "\x216B\x217B",                      /* 216B; 217B; Case map */
-            "\x216C\x217C",                      /* 216C; 217C; Case map */
-            "\x216D\x217D",                      /* 216D; 217D; Case map */
-            "\x216E\x217E",                      /* 216E; 217E; Case map */
-            "\x216F\x217F",                      /* 216F; 217F; Case map */
-            "\x24B6\x24D0",                      /* 24B6; 24D0; Case map */
-            "\x24B7\x24D1",                      /* 24B7; 24D1; Case map */
-            "\x24B8\x24D2",                      /* 24B8; 24D2; Case map */
-            "\x24B9\x24D3",                      /* 24B9; 24D3; Case map */
-            "\x24BA\x24D4",                      /* 24BA; 24D4; Case map */
-            "\x24BB\x24D5",                      /* 24BB; 24D5; Case map */
-            "\x24BC\x24D6",                      /* 24BC; 24D6; Case map */
-            "\x24BD\x24D7",                      /* 24BD; 24D7; Case map */
-            "\x24BE\x24D8",                      /* 24BE; 24D8; Case map */
-            "\x24BF\x24D9",                      /* 24BF; 24D9; Case map */
-            "\x24C0\x24DA",                      /* 24C0; 24DA; Case map */
-            "\x24C1\x24DB",                      /* 24C1; 24DB; Case map */
-            "\x24C2\x24DC",                      /* 24C2; 24DC; Case map */
-            "\x24C3\x24DD",                      /* 24C3; 24DD; Case map */
-            "\x24C4\x24DE",                      /* 24C4; 24DE; Case map */
-            "\x24C5\x24DF",                      /* 24C5; 24DF; Case map */
-            "\x24C6\x24E0",                      /* 24C6; 24E0; Case map */
-            "\x24C7\x24E1",                      /* 24C7; 24E1; Case map */
-            "\x24C8\x24E2",                      /* 24C8; 24E2; Case map */
-            "\x24C9\x24E3",                      /* 24C9; 24E3; Case map */
-            "\x24CA\x24E4",                      /* 24CA; 24E4; Case map */
-            "\x24CB\x24E5",                      /* 24CB; 24E5; Case map */
-            "\x24CC\x24E6",                      /* 24CC; 24E6; Case map */
-            "\x24CD\x24E7",                      /* 24CD; 24E7; Case map */
-            "\x24CE\x24E8",                      /* 24CE; 24E8; Case map */
-            "\x24CF\x24E9",                      /* 24CF; 24E9; Case map */
-            "\x3371\x0068\x0070\x0061",  /* 3371; 0068 0070 0061; Additional folding */
-            "\x3373\x0061\x0075",      /* 3373; 0061 0075; Additional folding */
-            "\x3375\x006F\x0076",      /* 3375; 006F 0076; Additional folding */
-            "\x3380\x0070\x0061",      /* 3380; 0070 0061; Additional folding */
-            "\x3381\x006E\x0061",      /* 3381; 006E 0061; Additional folding */
-            "\x3382\x03BC\x0061",      /* 3382; 03BC 0061; Additional folding */
-            "\x3383\x006D\x0061",      /* 3383; 006D 0061; Additional folding */
-            "\x3384\x006B\x0061",      /* 3384; 006B 0061; Additional folding */
-            "\x3385\x006B\x0062",      /* 3385; 006B 0062; Additional folding */
-            "\x3386\x006D\x0062",      /* 3386; 006D 0062; Additional folding */
-            "\x3387\x0067\x0062",      /* 3387; 0067 0062; Additional folding */
-            "\x338A\x0070\x0066",      /* 338A; 0070 0066; Additional folding */
-            "\x338B\x006E\x0066",      /* 338B; 006E 0066; Additional folding */
-            "\x338C\x03BC\x0066",      /* 338C; 03BC 0066; Additional folding */
-            "\x3390\x0068\x007A",      /* 3390; 0068 007A; Additional folding */
-            "\x3391\x006B\x0068\x007A",  /* 3391; 006B 0068 007A; Additional folding */
-            "\x3392\x006D\x0068\x007A",  /* 3392; 006D 0068 007A; Additional folding */
-            "\x3393\x0067\x0068\x007A",  /* 3393; 0067 0068 007A; Additional folding */
-            "\x3394\x0074\x0068\x007A",  /* 3394; 0074 0068 007A; Additional folding */
-            "\x33A9\x0070\x0061",      /* 33A9; 0070 0061; Additional folding */
-            "\x33AA\x006B\x0070\x0061",  /* 33AA; 006B 0070 0061; Additional folding */
-            "\x33AB\x006D\x0070\x0061",  /* 33AB; 006D 0070 0061; Additional folding */
-            "\x33AC\x0067\x0070\x0061",  /* 33AC; 0067 0070 0061; Additional folding */
-            "\x33B4\x0070\x0076",      /* 33B4; 0070 0076; Additional folding */
-            "\x33B5\x006E\x0076",      /* 33B5; 006E 0076; Additional folding */
-            "\x33B6\x03BC\x0076",      /* 33B6; 03BC 0076; Additional folding */
-            "\x33B7\x006D\x0076",      /* 33B7; 006D 0076; Additional folding */
-            "\x33B8\x006B\x0076",      /* 33B8; 006B 0076; Additional folding */
-            "\x33B9\x006D\x0076",      /* 33B9; 006D 0076; Additional folding */
-            "\x33BA\x0070\x0077",      /* 33BA; 0070 0077; Additional folding */
-            "\x33BB\x006E\x0077",      /* 33BB; 006E 0077; Additional folding */
-            "\x33BC\x03BC\x0077",      /* 33BC; 03BC 0077; Additional folding */
-            "\x33BD\x006D\x0077",      /* 33BD; 006D 0077; Additional folding */
-            "\x33BE\x006B\x0077",      /* 33BE; 006B 0077; Additional folding */
-            "\x33BF\x006D\x0077",      /* 33BF; 006D 0077; Additional folding */
-            "\x33C0\x006B\x03C9",      /* 33C0; 006B 03C9; Additional folding */
-            "\x33C1\x006D\x03C9",      /* 33C1; 006D 03C9; Additional folding */
-            "\x33C3\x0062\x0071",      /* 33C3; 0062 0071; Additional folding */
-            "\x33C6\x0063\x2215\x006B\x0067",  /* 33C6; 0063 2215 006B 0067; Additional folding */
-            "\x33C7\x0063\x006F\x002E",  /* 33C7; 0063 006F 002E; Additional folding */
-            "\x33C8\x0064\x0062",      /* 33C8; 0064 0062; Additional folding */
-            "\x33C9\x0067\x0079",      /* 33C9; 0067 0079; Additional folding */
-            "\x33CB\x0068\x0070",      /* 33CB; 0068 0070; Additional folding */
-            "\x33CD\x006B\x006B",      /* 33CD; 006B 006B; Additional folding */
-            "\x33CE\x006B\x006D",      /* 33CE; 006B 006D; Additional folding */
-            "\x33D7\x0070\x0068",      /* 33D7; 0070 0068; Additional folding */
-            "\x33D9\x0070\x0070\x006D",  /* 33D9; 0070 0070 006D; Additional folding */
-            "\x33DA\x0070\x0072",      /* 33DA; 0070 0072; Additional folding */
-            "\x33DC\x0073\x0076",      /* 33DC; 0073 0076; Additional folding */
-            "\x33DD\x0077\x0062",      /* 33DD; 0077 0062; Additional folding */
-            "\xFB00\x0066\x0066",                /* FB00; 0066 0066; Case map */
-            "\xFB01\x0066\x0069",                /* FB01; 0066 0069; Case map */
-            "\xFB02\x0066\x006C",                /* FB02; 0066 006C; Case map */
-            "\xFB03\x0066\x0066\x0069",          /* FB03; 0066 0066 0069; Case map */
-            "\xFB04\x0066\x0066\x006C",          /* FB04; 0066 0066 006C; Case map */
-            "\xFB05\x0073\x0074",                /* FB05; 0073 0074; Case map */
-            "\xFB06\x0073\x0074",                /* FB06; 0073 0074; Case map */
-            "\xFB13\x0574\x0576",                /* FB13; 0574 0576; Case map */
-            "\xFB14\x0574\x0565",                /* FB14; 0574 0565; Case map */
-            "\xFB15\x0574\x056B",                /* FB15; 0574 056B; Case map */
-            "\xFB16\x057E\x0576",                /* FB16; 057E 0576; Case map */
-            "\xFB17\x0574\x056D",                /* FB17; 0574 056D; Case map */
-            "\xFF21\xFF41",                      /* FF21; FF41; Case map */
-            "\xFF22\xFF42",                      /* FF22; FF42; Case map */
-            "\xFF23\xFF43",                      /* FF23; FF43; Case map */
-            "\xFF24\xFF44",                      /* FF24; FF44; Case map */
-            "\xFF25\xFF45",                      /* FF25; FF45; Case map */
-            "\xFF26\xFF46",                      /* FF26; FF46; Case map */
-            "\xFF27\xFF47",                      /* FF27; FF47; Case map */
-            "\xFF28\xFF48",                      /* FF28; FF48; Case map */
-            "\xFF29\xFF49",                      /* FF29; FF49; Case map */
-            "\xFF2A\xFF4A",                      /* FF2A; FF4A; Case map */
-            "\xFF2B\xFF4B",                      /* FF2B; FF4B; Case map */
-            "\xFF2C\xFF4C",                      /* FF2C; FF4C; Case map */
-            "\xFF2D\xFF4D",                      /* FF2D; FF4D; Case map */
-            "\xFF2E\xFF4E",                      /* FF2E; FF4E; Case map */
-            "\xFF2F\xFF4F",                      /* FF2F; FF4F; Case map */
-            "\xFF30\xFF50",                      /* FF30; FF50; Case map */
-            "\xFF31\xFF51",                      /* FF31; FF51; Case map */
-            "\xFF32\xFF52",                      /* FF32; FF52; Case map */
-            "\xFF33\xFF53",                      /* FF33; FF53; Case map */
-            "\xFF34\xFF54",                      /* FF34; FF54; Case map */
-            "\xFF35\xFF55",                      /* FF35; FF55; Case map */
-            "\xFF36\xFF56",                      /* FF36; FF56; Case map */
-            "\xFF37\xFF57",                      /* FF37; FF57; Case map */
-            "\xFF38\xFF58",                      /* FF38; FF58; Case map */
-            "\xFF39\xFF59",                      /* FF39; FF59; Case map */
-            "\xFF3A\xFF5A",                      /* FF3A; FF5A; Case map */
-        };
-
-
-        /// <summary>
-        /// B.3 Mapping for case-folding used with no normalization
-        ///
-        /// </summary>
-        public static readonly string[] B_3 = new string[]
-        {
-            "\x0041\x0061",                      /* 0041; 0061; Case map */
-            "\x0042\x0062",                      /* 0042; 0062; Case map */
-            "\x0043\x0063",                      /* 0043; 0063; Case map */
-            "\x0044\x0064",                      /* 0044; 0064; Case map */
-            "\x0045\x0065",                      /* 0045; 0065; Case map */
-            "\x0046\x0066",                      /* 0046; 0066; Case map */
-            "\x0047\x0067",                      /* 0047; 0067; Case map */
-            "\x0048\x0068",                      /* 0048; 0068; Case map */
-            "\x0049\x0069",                      /* 0049; 0069; Case map */
-            "\x004A\x006A",                      /* 004A; 006A; Case map */
-            "\x004B\x006B",                      /* 004B; 006B; Case map */
-            "\x004C\x006C",                      /* 004C; 006C; Case map */
-            "\x004D\x006D",                      /* 004D; 006D; Case map */
-            "\x004E\x006E",                      /* 004E; 006E; Case map */
-            "\x004F\x006F",                      /* 004F; 006F; Case map */
-            "\x0050\x0070",                      /* 0050; 0070; Case map */
-            "\x0051\x0071",                      /* 0051; 0071; Case map */
-            "\x0052\x0072",                      /* 0052; 0072; Case map */
-            "\x0053\x0073",                      /* 0053; 0073; Case map */
-            "\x0054\x0074",                      /* 0054; 0074; Case map */
-            "\x0055\x0075",                      /* 0055; 0075; Case map */
-            "\x0056\x0076",                      /* 0056; 0076; Case map */
-            "\x0057\x0077",                      /* 0057; 0077; Case map */
-            "\x0058\x0078",                      /* 0058; 0078; Case map */
-            "\x0059\x0079",                      /* 0059; 0079; Case map */
-            "\x005A\x007A",                      /* 005A; 007A; Case map */
-            "\x00B5\x03BC",                      /* 00B5; 03BC; Case map */
-            "\x00C0\x00E0",                      /* 00C0; 00E0; Case map */
-            "\x00C1\x00E1",                      /* 00C1; 00E1; Case map */
-            "\x00C2\x00E2",                      /* 00C2; 00E2; Case map */
-            "\x00C3\x00E3",                      /* 00C3; 00E3; Case map */
-            "\x00C4\x00E4",                      /* 00C4; 00E4; Case map */
-            "\x00C5\x00E5",                      /* 00C5; 00E5; Case map */
-            "\x00C6\x00E6",                      /* 00C6; 00E6; Case map */
-            "\x00C7\x00E7",                      /* 00C7; 00E7; Case map */
-            "\x00C8\x00E8",                      /* 00C8; 00E8; Case map */
-            "\x00C9\x00E9",                      /* 00C9; 00E9; Case map */
-            "\x00CA\x00EA",                      /* 00CA; 00EA; Case map */
-            "\x00CB\x00EB",                      /* 00CB; 00EB; Case map */
-            "\x00CC\x00EC",                      /* 00CC; 00EC; Case map */
-            "\x00CD\x00ED",                      /* 00CD; 00ED; Case map */
-            "\x00CE\x00EE",                      /* 00CE; 00EE; Case map */
-            "\x00CF\x00EF",                      /* 00CF; 00EF; Case map */
-            "\x00D0\x00F0",                      /* 00D0; 00F0; Case map */
-            "\x00D1\x00F1",                      /* 00D1; 00F1; Case map */
-            "\x00D2\x00F2",                      /* 00D2; 00F2; Case map */
-            "\x00D3\x00F3",                      /* 00D3; 00F3; Case map */
-            "\x00D4\x00F4",                      /* 00D4; 00F4; Case map */
-            "\x00D5\x00F5",                      /* 00D5; 00F5; Case map */
-            "\x00D6\x00F6",                      /* 00D6; 00F6; Case map */
-            "\x00D8\x00F8",                      /* 00D8; 00F8; Case map */
-            "\x00D9\x00F9",                      /* 00D9; 00F9; Case map */
-            "\x00DA\x00FA",                      /* 00DA; 00FA; Case map */
-            "\x00DB\x00FB",                      /* 00DB; 00FB; Case map */
-            "\x00DC\x00FC",                      /* 00DC; 00FC; Case map */
-            "\x00DD\x00FD",                      /* 00DD; 00FD; Case map */
-            "\x00DE\x00FE",                      /* 00DE; 00FE; Case map */
-            "\x00DF\x0073\x0073",                /* 00DF; 0073 0073; Case map */
-            "\x0100\x0101",                      /* 0100; 0101; Case map */
-            "\x0102\x0103",                      /* 0102; 0103; Case map */
-            "\x0104\x0105",                      /* 0104; 0105; Case map */
-            "\x0106\x0107",                      /* 0106; 0107; Case map */
-            "\x0108\x0109",                      /* 0108; 0109; Case map */
-            "\x010A\x010B",                      /* 010A; 010B; Case map */
-            "\x010C\x010D",                      /* 010C; 010D; Case map */
-            "\x010E\x010F",                      /* 010E; 010F; Case map */
-            "\x0110\x0111",                      /* 0110; 0111; Case map */
-            "\x0112\x0113",                      /* 0112; 0113; Case map */
-            "\x0114\x0115",                      /* 0114; 0115; Case map */
-            "\x0116\x0117",                      /* 0116; 0117; Case map */
-            "\x0118\x0119",                      /* 0118; 0119; Case map */
-            "\x011A\x011B",                      /* 011A; 011B; Case map */
-            "\x011C\x011D",                      /* 011C; 011D; Case map */
-            "\x011E\x011F",                      /* 011E; 011F; Case map */
-            "\x0120\x0121",                      /* 0120; 0121; Case map */
-            "\x0122\x0123",                      /* 0122; 0123; Case map */
-            "\x0124\x0125",                      /* 0124; 0125; Case map */
-            "\x0126\x0127",                      /* 0126; 0127; Case map */
-            "\x0128\x0129",                      /* 0128; 0129; Case map */
-            "\x012A\x012B",                      /* 012A; 012B; Case map */
-            "\x012C\x012D",                      /* 012C; 012D; Case map */
-            "\x012E\x012F",                      /* 012E; 012F; Case map */
-            "\x0130\x0069\x0307",                /* 0130; 0069 0307; Case map */
-            "\x0132\x0133",                      /* 0132; 0133; Case map */
-            "\x0134\x0135",                      /* 0134; 0135; Case map */
-            "\x0136\x0137",                      /* 0136; 0137; Case map */
-            "\x0139\x013A",                      /* 0139; 013A; Case map */
-            "\x013B\x013C",                      /* 013B; 013C; Case map */
-            "\x013D\x013E",                      /* 013D; 013E; Case map */
-            "\x013F\x0140",                      /* 013F; 0140; Case map */
-            "\x0141\x0142",                      /* 0141; 0142; Case map */
-            "\x0143\x0144",                      /* 0143; 0144; Case map */
-            "\x0145\x0146",                      /* 0145; 0146; Case map */
-            "\x0147\x0148",                      /* 0147; 0148; Case map */
-            "\x0149\x02BC\x006E",                /* 0149; 02BC 006E; Case map */
-            "\x014A\x014B",                      /* 014A; 014B; Case map */
-            "\x014C\x014D",                      /* 014C; 014D; Case map */
-            "\x014E\x014F",                      /* 014E; 014F; Case map */
-            "\x0150\x0151",                      /* 0150; 0151; Case map */
-            "\x0152\x0153",                      /* 0152; 0153; Case map */
-            "\x0154\x0155",                      /* 0154; 0155; Case map */
-            "\x0156\x0157",                      /* 0156; 0157; Case map */
-            "\x0158\x0159",                      /* 0158; 0159; Case map */
-            "\x015A\x015B",                      /* 015A; 015B; Case map */
-            "\x015C\x015D",                      /* 015C; 015D; Case map */
-            "\x015E\x015F",                      /* 015E; 015F; Case map */
-            "\x0160\x0161",                      /* 0160; 0161; Case map */
-            "\x0162\x0163",                      /* 0162; 0163; Case map */
-            "\x0164\x0165",                      /* 0164; 0165; Case map */
-            "\x0166\x0167",                      /* 0166; 0167; Case map */
-            "\x0168\x0169",                      /* 0168; 0169; Case map */
-            "\x016A\x016B",                      /* 016A; 016B; Case map */
-            "\x016C\x016D",                      /* 016C; 016D; Case map */
-            "\x016E\x016F",                      /* 016E; 016F; Case map */
-            "\x0170\x0171",                      /* 0170; 0171; Case map */
-            "\x0172\x0173",                      /* 0172; 0173; Case map */
-            "\x0174\x0175",                      /* 0174; 0175; Case map */
-            "\x0176\x0177",                      /* 0176; 0177; Case map */
-            "\x0178\x00FF",                      /* 0178; 00FF; Case map */
-            "\x0179\x017A",                      /* 0179; 017A; Case map */
-            "\x017B\x017C",                      /* 017B; 017C; Case map */
-            "\x017D\x017E",                      /* 017D; 017E; Case map */
-            "\x017F\x0073",                      /* 017F; 0073; Case map */
-            "\x0181\x0253",                      /* 0181; 0253; Case map */
-            "\x0182\x0183",                      /* 0182; 0183; Case map */
-            "\x0184\x0185",                      /* 0184; 0185; Case map */
-            "\x0186\x0254",                      /* 0186; 0254; Case map */
-            "\x0187\x0188",                      /* 0187; 0188; Case map */
-            "\x0189\x0256",                      /* 0189; 0256; Case map */
-            "\x018A\x0257",                      /* 018A; 0257; Case map */
-            "\x018B\x018C",                      /* 018B; 018C; Case map */
-            "\x018E\x01DD",                      /* 018E; 01DD; Case map */
-            "\x018F\x0259",                      /* 018F; 0259; Case map */
-            "\x0190\x025B",                      /* 0190; 025B; Case map */
-            "\x0191\x0192",                      /* 0191; 0192; Case map */
-            "\x0193\x0260",                      /* 0193; 0260; Case map */
-            "\x0194\x0263",                      /* 0194; 0263; Case map */
-            "\x0196\x0269",                      /* 0196; 0269; Case map */
-            "\x0197\x0268",                      /* 0197; 0268; Case map */
-            "\x0198\x0199",                      /* 0198; 0199; Case map */
-            "\x019C\x026F",                      /* 019C; 026F; Case map */
-            "\x019D\x0272",                      /* 019D; 0272; Case map */
-            "\x019F\x0275",                      /* 019F; 0275; Case map */
-            "\x01A0\x01A1",                      /* 01A0; 01A1; Case map */
-            "\x01A2\x01A3",                      /* 01A2; 01A3; Case map */
-            "\x01A4\x01A5",                      /* 01A4; 01A5; Case map */
-            "\x01A6\x0280",                      /* 01A6; 0280; Case map */
-            "\x01A7\x01A8",                      /* 01A7; 01A8; Case map */
-            "\x01A9\x0283",                      /* 01A9; 0283; Case map */
-            "\x01AC\x01AD",                      /* 01AC; 01AD; Case map */
-            "\x01AE\x0288",                      /* 01AE; 0288; Case map */
-            "\x01AF\x01B0",                      /* 01AF; 01B0; Case map */
-            "\x01B1\x028A",                      /* 01B1; 028A; Case map */
-            "\x01B2\x028B",                      /* 01B2; 028B; Case map */
-            "\x01B3\x01B4",                      /* 01B3; 01B4; Case map */
-            "\x01B5\x01B6",                      /* 01B5; 01B6; Case map */
-            "\x01B7\x0292",                      /* 01B7; 0292; Case map */
-            "\x01B8\x01B9",                      /* 01B8; 01B9; Case map */
-            "\x01BC\x01BD",                      /* 01BC; 01BD; Case map */
-            "\x01C4\x01C6",                      /* 01C4; 01C6; Case map */
-            "\x01C5\x01C6",                      /* 01C5; 01C6; Case map */
-            "\x01C7\x01C9",                      /* 01C7; 01C9; Case map */
-            "\x01C8\x01C9",                      /* 01C8; 01C9; Case map */
-            "\x01CA\x01CC",                      /* 01CA; 01CC; Case map */
-            "\x01CB\x01CC",                      /* 01CB; 01CC; Case map */
-            "\x01CD\x01CE",                      /* 01CD; 01CE; Case map */
-            "\x01CF\x01D0",                      /* 01CF; 01D0; Case map */
-            "\x01D1\x01D2",                      /* 01D1; 01D2; Case map */
-            "\x01D3\x01D4",                      /* 01D3; 01D4; Case map */
-            "\x01D5\x01D6",                      /* 01D5; 01D6; Case map */
-            "\x01D7\x01D8",                      /* 01D7; 01D8; Case map */
-            "\x01D9\x01DA",                      /* 01D9; 01DA; Case map */
-            "\x01DB\x01DC",                      /* 01DB; 01DC; Case map */
-            "\x01DE\x01DF",                      /* 01DE; 01DF; Case map */
-            "\x01E0\x01E1",                      /* 01E0; 01E1; Case map */
-            "\x01E2\x01E3",                      /* 01E2; 01E3; Case map */
-            "\x01E4\x01E5",                      /* 01E4; 01E5; Case map */
-            "\x01E6\x01E7",                      /* 01E6; 01E7; Case map */
-            "\x01E8\x01E9",                      /* 01E8; 01E9; Case map */
-            "\x01EA\x01EB",                      /* 01EA; 01EB; Case map */
-            "\x01EC\x01ED",                      /* 01EC; 01ED; Case map */
-            "\x01EE\x01EF",                      /* 01EE; 01EF; Case map */
-            "\x01F0\x006A\x030C",                /* 01F0; 006A 030C; Case map */
-            "\x01F1\x01F3",                      /* 01F1; 01F3; Case map */
-            "\x01F2\x01F3",                      /* 01F2; 01F3; Case map */
-            "\x01F4\x01F5",                      /* 01F4; 01F5; Case map */
-            "\x01F6\x0195",                      /* 01F6; 0195; Case map */
-            "\x01F7\x01BF",                      /* 01F7; 01BF; Case map */
-            "\x01F8\x01F9",                      /* 01F8; 01F9; Case map */
-            "\x01FA\x01FB",                      /* 01FA; 01FB; Case map */
-            "\x01FC\x01FD",                      /* 01FC; 01FD; Case map */
-            "\x01FE\x01FF",                      /* 01FE; 01FF; Case map */
-            "\x0200\x0201",                      /* 0200; 0201; Case map */
-            "\x0202\x0203",                      /* 0202; 0203; Case map */
-            "\x0204\x0205",                      /* 0204; 0205; Case map */
-            "\x0206\x0207",                      /* 0206; 0207; Case map */
-            "\x0208\x0209",                      /* 0208; 0209; Case map */
-            "\x020A\x020B",                      /* 020A; 020B; Case map */
-            "\x020C\x020D",                      /* 020C; 020D; Case map */
-            "\x020E\x020F",                      /* 020E; 020F; Case map */
-            "\x0210\x0211",                      /* 0210; 0211; Case map */
-            "\x0212\x0213",                      /* 0212; 0213; Case map */
-            "\x0214\x0215",                      /* 0214; 0215; Case map */
-            "\x0216\x0217",                      /* 0216; 0217; Case map */
-            "\x0218\x0219",                      /* 0218; 0219; Case map */
-            "\x021A\x021B",                      /* 021A; 021B; Case map */
-            "\x021C\x021D",                      /* 021C; 021D; Case map */
-            "\x021E\x021F",                      /* 021E; 021F; Case map */
-            "\x0220\x019E",                      /* 0220; 019E; Case map */
-            "\x0222\x0223",                      /* 0222; 0223; Case map */
-            "\x0224\x0225",                      /* 0224; 0225; Case map */
-            "\x0226\x0227",                      /* 0226; 0227; Case map */
-            "\x0228\x0229",                      /* 0228; 0229; Case map */
-            "\x022A\x022B",                      /* 022A; 022B; Case map */
-            "\x022C\x022D",                      /* 022C; 022D; Case map */
-            "\x022E\x022F",                      /* 022E; 022F; Case map */
-            "\x0230\x0231",                      /* 0230; 0231; Case map */
-            "\x0232\x0233",                      /* 0232; 0233; Case map */
-            "\x0345\x03B9",                      /* 0345; 03B9; Case map */
-            "\x0386\x03AC",                      /* 0386; 03AC; Case map */
-            "\x0388\x03AD",                      /* 0388; 03AD; Case map */
-            "\x0389\x03AE",                      /* 0389; 03AE; Case map */
-            "\x038A\x03AF",                      /* 038A; 03AF; Case map */
-            "\x038C\x03CC",                      /* 038C; 03CC; Case map */
-            "\x038E\x03CD",                      /* 038E; 03CD; Case map */
-            "\x038F\x03CE",                      /* 038F; 03CE; Case map */
-            "\x0390\x03B9\x0308\x0301",          /* 0390; 03B9 0308 0301; Case map */
-            "\x0391\x03B1",                      /* 0391; 03B1; Case map */
-            "\x0392\x03B2",                      /* 0392; 03B2; Case map */
-            "\x0393\x03B3",                      /* 0393; 03B3; Case map */
-            "\x0394\x03B4",                      /* 0394; 03B4; Case map */
-            "\x0395\x03B5",                      /* 0395; 03B5; Case map */
-            "\x0396\x03B6",                      /* 0396; 03B6; Case map */
-            "\x0397\x03B7",                      /* 0397; 03B7; Case map */
-            "\x0398\x03B8",                      /* 0398; 03B8; Case map */
-            "\x0399\x03B9",                      /* 0399; 03B9; Case map */
-            "\x039A\x03BA",                      /* 039A; 03BA; Case map */
-            "\x039B\x03BB",                      /* 039B; 03BB; Case map */
-            "\x039C\x03BC",                      /* 039C; 03BC; Case map */
-            "\x039D\x03BD",                      /* 039D; 03BD; Case map */
-            "\x039E\x03BE",                      /* 039E; 03BE; Case map */
-            "\x039F\x03BF",                      /* 039F; 03BF; Case map */
-            "\x03A0\x03C0",                      /* 03A0; 03C0; Case map */
-            "\x03A1\x03C1",                      /* 03A1; 03C1; Case map */
-            "\x03A3\x03C3",                      /* 03A3; 03C3; Case map */
-            "\x03A4\x03C4",                      /* 03A4; 03C4; Case map */
-            "\x03A5\x03C5",                      /* 03A5; 03C5; Case map */
-            "\x03A6\x03C6",                      /* 03A6; 03C6; Case map */
-            "\x03A7\x03C7",                      /* 03A7; 03C7; Case map */
-            "\x03A8\x03C8",                      /* 03A8; 03C8; Case map */
-            "\x03A9\x03C9",                      /* 03A9; 03C9; Case map */
-            "\x03AA\x03CA",                      /* 03AA; 03CA; Case map */
-            "\x03AB\x03CB",                      /* 03AB; 03CB; Case map */
-            "\x03B0\x03C5\x0308\x0301",          /* 03B0; 03C5 0308 0301; Case map */
-            "\x03C2\x03C3",                      /* 03C2; 03C3; Case map */
-            "\x03D0\x03B2",                      /* 03D0; 03B2; Case map */
-            "\x03D1\x03B8",                      /* 03D1; 03B8; Case map */
-            "\x03D5\x03C6",                      /* 03D5; 03C6; Case map */
-            "\x03D6\x03C0",                      /* 03D6; 03C0; Case map */
-            "\x03D8\x03D9",                      /* 03D8; 03D9; Case map */
-            "\x03DA\x03DB",                      /* 03DA; 03DB; Case map */
-            "\x03DC\x03DD",                      /* 03DC; 03DD; Case map */
-            "\x03DE\x03DF",                      /* 03DE; 03DF; Case map */
-            "\x03E0\x03E1",                      /* 03E0; 03E1; Case map */
-            "\x03E2\x03E3",                      /* 03E2; 03E3; Case map */
-            "\x03E4\x03E5",                      /* 03E4; 03E5; Case map */
-            "\x03E6\x03E7",                      /* 03E6; 03E7; Case map */
-            "\x03E8\x03E9",                      /* 03E8; 03E9; Case map */
-            "\x03EA\x03EB",                      /* 03EA; 03EB; Case map */
-            "\x03EC\x03ED",                      /* 03EC; 03ED; Case map */
-            "\x03EE\x03EF",                      /* 03EE; 03EF; Case map */
-            "\x03F0\x03BA",                      /* 03F0; 03BA; Case map */
-            "\x03F1\x03C1",                      /* 03F1; 03C1; Case map */
-            "\x03F2\x03C3",                      /* 03F2; 03C3; Case map */
-            "\x03F4\x03B8",                      /* 03F4; 03B8; Case map */
-            "\x03F5\x03B5",                      /* 03F5; 03B5; Case map */
-            "\x0400\x0450",                      /* 0400; 0450; Case map */
-            "\x0401\x0451",                      /* 0401; 0451; Case map */
-            "\x0402\x0452",                      /* 0402; 0452; Case map */
-            "\x0403\x0453",                      /* 0403; 0453; Case map */
-            "\x0404\x0454",                      /* 0404; 0454; Case map */
-            "\x0405\x0455",                      /* 0405; 0455; Case map */
-            "\x0406\x0456",                      /* 0406; 0456; Case map */
-            "\x0407\x0457",                      /* 0407; 0457; Case map */
-            "\x0408\x0458",                      /* 0408; 0458; Case map */
-            "\x0409\x0459",                      /* 0409; 0459; Case map */
-            "\x040A\x045A",                      /* 040A; 045A; Case map */
-            "\x040B\x045B",                      /* 040B; 045B; Case map */
-            "\x040C\x045C",                      /* 040C; 045C; Case map */
-            "\x040D\x045D",                      /* 040D; 045D; Case map */
-            "\x040E\x045E",                      /* 040E; 045E; Case map */
-            "\x040F\x045F",                      /* 040F; 045F; Case map */
-            "\x0410\x0430",                      /* 0410; 0430; Case map */
-            "\x0411\x0431",                      /* 0411; 0431; Case map */
-            "\x0412\x0432",                      /* 0412; 0432; Case map */
-            "\x0413\x0433",                      /* 0413; 0433; Case map */
-            "\x0414\x0434",                      /* 0414; 0434; Case map */
-            "\x0415\x0435",                      /* 0415; 0435; Case map */
-            "\x0416\x0436",                      /* 0416; 0436; Case map */
-            "\x0417\x0437",                      /* 0417; 0437; Case map */
-            "\x0418\x0438",                      /* 0418; 0438; Case map */
-            "\x0419\x0439",                      /* 0419; 0439; Case map */
-            "\x041A\x043A",                      /* 041A; 043A; Case map */
-            "\x041B\x043B",                      /* 041B; 043B; Case map */
-            "\x041C\x043C",                      /* 041C; 043C; Case map */
-            "\x041D\x043D",                      /* 041D; 043D; Case map */
-            "\x041E\x043E",                      /* 041E; 043E; Case map */
-            "\x041F\x043F",                      /* 041F; 043F; Case map */
-            "\x0420\x0440",                      /* 0420; 0440; Case map */
-            "\x0421\x0441",                      /* 0421; 0441; Case map */
-            "\x0422\x0442",                      /* 0422; 0442; Case map */
-            "\x0423\x0443",                      /* 0423; 0443; Case map */
-            "\x0424\x0444",                      /* 0424; 0444; Case map */
-            "\x0425\x0445",                      /* 0425; 0445; Case map */
-            "\x0426\x0446",                      /* 0426; 0446; Case map */
-            "\x0427\x0447",                      /* 0427; 0447; Case map */
-            "\x0428\x0448",                      /* 0428; 0448; Case map */
-            "\x0429\x0449",                      /* 0429; 0449; Case map */
-            "\x042A\x044A",                      /* 042A; 044A; Case map */
-            "\x042B\x044B",                      /* 042B; 044B; Case map */
-            "\x042C\x044C",                      /* 042C; 044C; Case map */
-            "\x042D\x044D",                      /* 042D; 044D; Case map */
-            "\x042E\x044E",                      /* 042E; 044E; Case map */
-            "\x042F\x044F",                      /* 042F; 044F; Case map */
-            "\x0460\x0461",                      /* 0460; 0461; Case map */
-            "\x0462\x0463",                      /* 0462; 0463; Case map */
-            "\x0464\x0465",                      /* 0464; 0465; Case map */
-            "\x0466\x0467",                      /* 0466; 0467; Case map */
-            "\x0468\x0469",                      /* 0468; 0469; Case map */
-            "\x046A\x046B",                      /* 046A; 046B; Case map */
-            "\x046C\x046D",                      /* 046C; 046D; Case map */
-            "\x046E\x046F",                      /* 046E; 046F; Case map */
-            "\x0470\x0471",                      /* 0470; 0471; Case map */
-            "\x0472\x0473",                      /* 0472; 0473; Case map */
-            "\x0474\x0475",                      /* 0474; 0475; Case map */
-            "\x0476\x0477",                      /* 0476; 0477; Case map */
-            "\x0478\x0479",                      /* 0478; 0479; Case map */
-            "\x047A\x047B",                      /* 047A; 047B; Case map */
-            "\x047C\x047D",                      /* 047C; 047D; Case map */
-            "\x047E\x047F",                      /* 047E; 047F; Case map */
-            "\x0480\x0481",                      /* 0480; 0481; Case map */
-            "\x048A\x048B",                      /* 048A; 048B; Case map */
-            "\x048C\x048D",                      /* 048C; 048D; Case map */
-            "\x048E\x048F",                      /* 048E; 048F; Case map */
-            "\x0490\x0491",                      /* 0490; 0491; Case map */
-            "\x0492\x0493",                      /* 0492; 0493; Case map */
-            "\x0494\x0495",                      /* 0494; 0495; Case map */
-            "\x0496\x0497",                      /* 0496; 0497; Case map */
-            "\x0498\x0499",                      /* 0498; 0499; Case map */
-            "\x049A\x049B",                      /* 049A; 049B; Case map */
-            "\x049C\x049D",                      /* 049C; 049D; Case map */
-            "\x049E\x049F",                      /* 049E; 049F; Case map */
-            "\x04A0\x04A1",                      /* 04A0; 04A1; Case map */
-            "\x04A2\x04A3",                      /* 04A2; 04A3; Case map */
-            "\x04A4\x04A5",                      /* 04A4; 04A5; Case map */
-            "\x04A6\x04A7",                      /* 04A6; 04A7; Case map */
-            "\x04A8\x04A9",                      /* 04A8; 04A9; Case map */
-            "\x04AA\x04AB",                      /* 04AA; 04AB; Case map */
-            "\x04AC\x04AD",                      /* 04AC; 04AD; Case map */
-            "\x04AE\x04AF",                      /* 04AE; 04AF; Case map */
-            "\x04B0\x04B1",                      /* 04B0; 04B1; Case map */
-            "\x04B2\x04B3",                      /* 04B2; 04B3; Case map */
-            "\x04B4\x04B5",                      /* 04B4; 04B5; Case map */
-            "\x04B6\x04B7",                      /* 04B6; 04B7; Case map */
-            "\x04B8\x04B9",                      /* 04B8; 04B9; Case map */
-            "\x04BA\x04BB",                      /* 04BA; 04BB; Case map */
-            "\x04BC\x04BD",                      /* 04BC; 04BD; Case map */
-            "\x04BE\x04BF",                      /* 04BE; 04BF; Case map */
-            "\x04C1\x04C2",                      /* 04C1; 04C2; Case map */
-            "\x04C3\x04C4",                      /* 04C3; 04C4; Case map */
-            "\x04C5\x04C6",                      /* 04C5; 04C6; Case map */
-            "\x04C7\x04C8",                      /* 04C7; 04C8; Case map */
-            "\x04C9\x04CA",                      /* 04C9; 04CA; Case map */
-            "\x04CB\x04CC",                      /* 04CB; 04CC; Case map */
-            "\x04CD\x04CE",                      /* 04CD; 04CE; Case map */
-            "\x04D0\x04D1",                      /* 04D0; 04D1; Case map */
-            "\x04D2\x04D3",                      /* 04D2; 04D3; Case map */
-            "\x04D4\x04D5",                      /* 04D4; 04D5; Case map */
-            "\x04D6\x04D7",                      /* 04D6; 04D7; Case map */
-            "\x04D8\x04D9",                      /* 04D8; 04D9; Case map */
-            "\x04DA\x04DB",                      /* 04DA; 04DB; Case map */
-            "\x04DC\x04DD",                      /* 04DC; 04DD; Case map */
-            "\x04DE\x04DF",                      /* 04DE; 04DF; Case map */
-            "\x04E0\x04E1",                      /* 04E0; 04E1; Case map */
-            "\x04E2\x04E3",                      /* 04E2; 04E3; Case map */
-            "\x04E4\x04E5",                      /* 04E4; 04E5; Case map */
-            "\x04E6\x04E7",                      /* 04E6; 04E7; Case map */
-            "\x04E8\x04E9",                      /* 04E8; 04E9; Case map */
-            "\x04EA\x04EB",                      /* 04EA; 04EB; Case map */
-            "\x04EC\x04ED",                      /* 04EC; 04ED; Case map */
-            "\x04EE\x04EF",                      /* 04EE; 04EF; Case map */
-            "\x04F0\x04F1",                      /* 04F0; 04F1; Case map */
-            "\x04F2\x04F3",                      /* 04F2; 04F3; Case map */
-            "\x04F4\x04F5",                      /* 04F4; 04F5; Case map */
-            "\x04F8\x04F9",                      /* 04F8; 04F9; Case map */
-            "\x0500\x0501",                      /* 0500; 0501; Case map */
-            "\x0502\x0503",                      /* 0502; 0503; Case map */
-            "\x0504\x0505",                      /* 0504; 0505; Case map */
-            "\x0506\x0507",                      /* 0506; 0507; Case map */
-            "\x0508\x0509",                      /* 0508; 0509; Case map */
-            "\x050A\x050B",                      /* 050A; 050B; Case map */
-            "\x050C\x050D",                      /* 050C; 050D; Case map */
-            "\x050E\x050F",                      /* 050E; 050F; Case map */
-            "\x0531\x0561",                      /* 0531; 0561; Case map */
-            "\x0532\x0562",                      /* 0532; 0562; Case map */
-            "\x0533\x0563",                      /* 0533; 0563; Case map */
-            "\x0534\x0564",                      /* 0534; 0564; Case map */
-            "\x0535\x0565",                      /* 0535; 0565; Case map */
-            "\x0536\x0566",                      /* 0536; 0566; Case map */
-            "\x0537\x0567",                      /* 0537; 0567; Case map */
-            "\x0538\x0568",                      /* 0538; 0568; Case map */
-            "\x0539\x0569",                      /* 0539; 0569; Case map */
-            "\x053A\x056A",                      /* 053A; 056A; Case map */
-            "\x053B\x056B",                      /* 053B; 056B; Case map */
-            "\x053C\x056C",                      /* 053C; 056C; Case map */
-            "\x053D\x056D",                      /* 053D; 056D; Case map */
-            "\x053E\x056E",                      /* 053E; 056E; Case map */
-            "\x053F\x056F",                      /* 053F; 056F; Case map */
-            "\x0540\x0570",                      /* 0540; 0570; Case map */
-            "\x0541\x0571",                      /* 0541; 0571; Case map */
-            "\x0542\x0572",                      /* 0542; 0572; Case map */
-            "\x0543\x0573",                      /* 0543; 0573; Case map */
-            "\x0544\x0574",                      /* 0544; 0574; Case map */
-            "\x0545\x0575",                      /* 0545; 0575; Case map */
-            "\x0546\x0576",                      /* 0546; 0576; Case map */
-            "\x0547\x0577",                      /* 0547; 0577; Case map */
-            "\x0548\x0578",                      /* 0548; 0578; Case map */
-            "\x0549\x0579",                      /* 0549; 0579; Case map */
-            "\x054A\x057A",                      /* 054A; 057A; Case map */
-            "\x054B\x057B",                      /* 054B; 057B; Case map */
-            "\x054C\x057C",                      /* 054C; 057C; Case map */
-            "\x054D\x057D",                      /* 054D; 057D; Case map */
-            "\x054E\x057E",                      /* 054E; 057E; Case map */
-            "\x054F\x057F",                      /* 054F; 057F; Case map */
-            "\x0550\x0580",                      /* 0550; 0580; Case map */
-            "\x0551\x0581",                      /* 0551; 0581; Case map */
-            "\x0552\x0582",                      /* 0552; 0582; Case map */
-            "\x0553\x0583",                      /* 0553; 0583; Case map */
-            "\x0554\x0584",                      /* 0554; 0584; Case map */
-            "\x0555\x0585",                      /* 0555; 0585; Case map */
-            "\x0556\x0586",                      /* 0556; 0586; Case map */
-            "\x0587\x0565\x0582",                /* 0587; 0565 0582; Case map */
-            "\x1E00\x1E01",                      /* 1E00; 1E01; Case map */
-            "\x1E02\x1E03",                      /* 1E02; 1E03; Case map */
-            "\x1E04\x1E05",                      /* 1E04; 1E05; Case map */
-            "\x1E06\x1E07",                      /* 1E06; 1E07; Case map */
-            "\x1E08\x1E09",                      /* 1E08; 1E09; Case map */
-            "\x1E0A\x1E0B",                      /* 1E0A; 1E0B; Case map */
-            "\x1E0C\x1E0D",                      /* 1E0C; 1E0D; Case map */
-            "\x1E0E\x1E0F",                      /* 1E0E; 1E0F; Case map */
-            "\x1E10\x1E11",                      /* 1E10; 1E11; Case map */
-            "\x1E12\x1E13",                      /* 1E12; 1E13; Case map */
-            "\x1E14\x1E15",                      /* 1E14; 1E15; Case map */
-            "\x1E16\x1E17",                      /* 1E16; 1E17; Case map */
-            "\x1E18\x1E19",                      /* 1E18; 1E19; Case map */
-            "\x1E1A\x1E1B",                      /* 1E1A; 1E1B; Case map */
-            "\x1E1C\x1E1D",                      /* 1E1C; 1E1D; Case map */
-            "\x1E1E\x1E1F",                      /* 1E1E; 1E1F; Case map */
-            "\x1E20\x1E21",                      /* 1E20; 1E21; Case map */
-            "\x1E22\x1E23",                      /* 1E22; 1E23; Case map */
-            "\x1E24\x1E25",                      /* 1E24; 1E25; Case map */
-            "\x1E26\x1E27",                      /* 1E26; 1E27; Case map */
-            "\x1E28\x1E29",                      /* 1E28; 1E29; Case map */
-            "\x1E2A\x1E2B",                      /* 1E2A; 1E2B; Case map */
-            "\x1E2C\x1E2D",                      /* 1E2C; 1E2D; Case map */
-            "\x1E2E\x1E2F",                      /* 1E2E; 1E2F; Case map */
-            "\x1E30\x1E31",                      /* 1E30; 1E31; Case map */
-            "\x1E32\x1E33",                      /* 1E32; 1E33; Case map */
-            "\x1E34\x1E35",                      /* 1E34; 1E35; Case map */
-            "\x1E36\x1E37",                      /* 1E36; 1E37; Case map */
-            "\x1E38\x1E39",                      /* 1E38; 1E39; Case map */
-            "\x1E3A\x1E3B",                      /* 1E3A; 1E3B; Case map */
-            "\x1E3C\x1E3D",                      /* 1E3C; 1E3D; Case map */
-            "\x1E3E\x1E3F",                      /* 1E3E; 1E3F; Case map */
-            "\x1E40\x1E41",                      /* 1E40; 1E41; Case map */
-            "\x1E42\x1E43",                      /* 1E42; 1E43; Case map */
-            "\x1E44\x1E45",                      /* 1E44; 1E45; Case map */
-            "\x1E46\x1E47",                      /* 1E46; 1E47; Case map */
-            "\x1E48\x1E49",                      /* 1E48; 1E49; Case map */
-            "\x1E4A\x1E4B",                      /* 1E4A; 1E4B; Case map */
-            "\x1E4C\x1E4D",                      /* 1E4C; 1E4D; Case map */
-            "\x1E4E\x1E4F",                      /* 1E4E; 1E4F; Case map */
-            "\x1E50\x1E51",                      /* 1E50; 1E51; Case map */
-            "\x1E52\x1E53",                      /* 1E52; 1E53; Case map */
-            "\x1E54\x1E55",                      /* 1E54; 1E55; Case map */
-            "\x1E56\x1E57",                      /* 1E56; 1E57; Case map */
-            "\x1E58\x1E59",                      /* 1E58; 1E59; Case map */
-            "\x1E5A\x1E5B",                      /* 1E5A; 1E5B; Case map */
-            "\x1E5C\x1E5D",                      /* 1E5C; 1E5D; Case map */
-            "\x1E5E\x1E5F",                      /* 1E5E; 1E5F; Case map */
-            "\x1E60\x1E61",                      /* 1E60; 1E61; Case map */
-            "\x1E62\x1E63",                      /* 1E62; 1E63; Case map */
-            "\x1E64\x1E65",                      /* 1E64; 1E65; Case map */
-            "\x1E66\x1E67",                      /* 1E66; 1E67; Case map */
-            "\x1E68\x1E69",                      /* 1E68; 1E69; Case map */
-            "\x1E6A\x1E6B",                      /* 1E6A; 1E6B; Case map */
-            "\x1E6C\x1E6D",                      /* 1E6C; 1E6D; Case map */
-            "\x1E6E\x1E6F",                      /* 1E6E; 1E6F; Case map */
-            "\x1E70\x1E71",                      /* 1E70; 1E71; Case map */
-            "\x1E72\x1E73",                      /* 1E72; 1E73; Case map */
-            "\x1E74\x1E75",                      /* 1E74; 1E75; Case map */
-            "\x1E76\x1E77",                      /* 1E76; 1E77; Case map */
-            "\x1E78\x1E79",                      /* 1E78; 1E79; Case map */
-            "\x1E7A\x1E7B",                      /* 1E7A; 1E7B; Case map */
-            "\x1E7C\x1E7D",                      /* 1E7C; 1E7D; Case map */
-            "\x1E7E\x1E7F",                      /* 1E7E; 1E7F; Case map */
-            "\x1E80\x1E81",                      /* 1E80; 1E81; Case map */
-            "\x1E82\x1E83",                      /* 1E82; 1E83; Case map */
-            "\x1E84\x1E85",                      /* 1E84; 1E85; Case map */
-            "\x1E86\x1E87",                      /* 1E86; 1E87; Case map */
-            "\x1E88\x1E89",                      /* 1E88; 1E89; Case map */
-            "\x1E8A\x1E8B",                      /* 1E8A; 1E8B; Case map */
-            "\x1E8C\x1E8D",                      /* 1E8C; 1E8D; Case map */
-            "\x1E8E\x1E8F",                      /* 1E8E; 1E8F; Case map */
-            "\x1E90\x1E91",                      /* 1E90; 1E91; Case map */
-            "\x1E92\x1E93",                      /* 1E92; 1E93; Case map */
-            "\x1E94\x1E95",                      /* 1E94; 1E95; Case map */
-            "\x1E96\x0068\x0331",                /* 1E96; 0068 0331; Case map */
-            "\x1E97\x0074\x0308",                /* 1E97; 0074 0308; Case map */
-            "\x1E98\x0077\x030A",                /* 1E98; 0077 030A; Case map */
-            "\x1E99\x0079\x030A",                /* 1E99; 0079 030A; Case map */
-            "\x1E9A\x0061\x02BE",                /* 1E9A; 0061 02BE; Case map */
-            "\x1E9B\x1E61",                      /* 1E9B; 1E61; Case map */
-            "\x1EA0\x1EA1",                      /* 1EA0; 1EA1; Case map */
-            "\x1EA2\x1EA3",                      /* 1EA2; 1EA3; Case map */
-            "\x1EA4\x1EA5",                      /* 1EA4; 1EA5; Case map */
-            "\x1EA6\x1EA7",                      /* 1EA6; 1EA7; Case map */
-            "\x1EA8\x1EA9",                      /* 1EA8; 1EA9; Case map */
-            "\x1EAA\x1EAB",                      /* 1EAA; 1EAB; Case map */
-            "\x1EAC\x1EAD",                      /* 1EAC; 1EAD; Case map */
-            "\x1EAE\x1EAF",                      /* 1EAE; 1EAF; Case map */
-            "\x1EB0\x1EB1",                      /* 1EB0; 1EB1; Case map */
-            "\x1EB2\x1EB3",                      /* 1EB2; 1EB3; Case map */
-            "\x1EB4\x1EB5",                      /* 1EB4; 1EB5; Case map */
-            "\x1EB6\x1EB7",                      /* 1EB6; 1EB7; Case map */
-            "\x1EB8\x1EB9",                      /* 1EB8; 1EB9; Case map */
-            "\x1EBA\x1EBB",                      /* 1EBA; 1EBB; Case map */
-            "\x1EBC\x1EBD",                      /* 1EBC; 1EBD; Case map */
-            "\x1EBE\x1EBF",                      /* 1EBE; 1EBF; Case map */
-            "\x1EC0\x1EC1",                      /* 1EC0; 1EC1; Case map */
-            "\x1EC2\x1EC3",                      /* 1EC2; 1EC3; Case map */
-            "\x1EC4\x1EC5",                      /* 1EC4; 1EC5; Case map */
-            "\x1EC6\x1EC7",                      /* 1EC6; 1EC7; Case map */
-            "\x1EC8\x1EC9",                      /* 1EC8; 1EC9; Case map */
-            "\x1ECA\x1ECB",                      /* 1ECA; 1ECB; Case map */
-            "\x1ECC\x1ECD",                      /* 1ECC; 1ECD; Case map */
-            "\x1ECE\x1ECF",                      /* 1ECE; 1ECF; Case map */
-            "\x1ED0\x1ED1",                      /* 1ED0; 1ED1; Case map */
-            "\x1ED2\x1ED3",                      /* 1ED2; 1ED3; Case map */
-            "\x1ED4\x1ED5",                      /* 1ED4; 1ED5; Case map */
-            "\x1ED6\x1ED7",                      /* 1ED6; 1ED7; Case map */
-            "\x1ED8\x1ED9",                      /* 1ED8; 1ED9; Case map */
-            "\x1EDA\x1EDB",                      /* 1EDA; 1EDB; Case map */
-            "\x1EDC\x1EDD",                      /* 1EDC; 1EDD; Case map */
-            "\x1EDE\x1EDF",                      /* 1EDE; 1EDF; Case map */
-            "\x1EE0\x1EE1",                      /* 1EE0; 1EE1; Case map */
-            "\x1EE2\x1EE3",                      /* 1EE2; 1EE3; Case map */
-            "\x1EE4\x1EE5",                      /* 1EE4; 1EE5; Case map */
-            "\x1EE6\x1EE7",                      /* 1EE6; 1EE7; Case map */
-            "\x1EE8\x1EE9",                      /* 1EE8; 1EE9; Case map */
-            "\x1EEA\x1EEB",                      /* 1EEA; 1EEB; Case map */
-            "\x1EEC\x1EED",                      /* 1EEC; 1EED; Case map */
-            "\x1EEE\x1EEF",                      /* 1EEE; 1EEF; Case map */
-            "\x1EF0\x1EF1",                      /* 1EF0; 1EF1; Case map */
-            "\x1EF2\x1EF3",                      /* 1EF2; 1EF3; Case map */
-            "\x1EF4\x1EF5",                      /* 1EF4; 1EF5; Case map */
-            "\x1EF6\x1EF7",                      /* 1EF6; 1EF7; Case map */
-            "\x1EF8\x1EF9",                      /* 1EF8; 1EF9; Case map */
-            "\x1F08\x1F00",                      /* 1F08; 1F00; Case map */
-            "\x1F09\x1F01",                      /* 1F09; 1F01; Case map */
-            "\x1F0A\x1F02",                      /* 1F0A; 1F02; Case map */
-            "\x1F0B\x1F03",                      /* 1F0B; 1F03; Case map */
-            "\x1F0C\x1F04",                      /* 1F0C; 1F04; Case map */
-            "\x1F0D\x1F05",                      /* 1F0D; 1F05; Case map */
-            "\x1F0E\x1F06",                      /* 1F0E; 1F06; Case map */
-            "\x1F0F\x1F07",                      /* 1F0F; 1F07; Case map */
-            "\x1F18\x1F10",                      /* 1F18; 1F10; Case map */
-            "\x1F19\x1F11",                      /* 1F19; 1F11; Case map */
-            "\x1F1A\x1F12",                      /* 1F1A; 1F12; Case map */
-            "\x1F1B\x1F13",                      /* 1F1B; 1F13; Case map */
-            "\x1F1C\x1F14",                      /* 1F1C; 1F14; Case map */
-            "\x1F1D\x1F15",                      /* 1F1D; 1F15; Case map */
-            "\x1F28\x1F20",                      /* 1F28; 1F20; Case map */
-            "\x1F29\x1F21",                      /* 1F29; 1F21; Case map */
-            "\x1F2A\x1F22",                      /* 1F2A; 1F22; Case map */
-            "\x1F2B\x1F23",                      /* 1F2B; 1F23; Case map */
-            "\x1F2C\x1F24",                      /* 1F2C; 1F24; Case map */
-            "\x1F2D\x1F25",                      /* 1F2D; 1F25; Case map */
-            "\x1F2E\x1F26",                      /* 1F2E; 1F26; Case map */
-            "\x1F2F\x1F27",                      /* 1F2F; 1F27; Case map */
-            "\x1F38\x1F30",                      /* 1F38; 1F30; Case map */
-            "\x1F39\x1F31",                      /* 1F39; 1F31; Case map */
-            "\x1F3A\x1F32",                      /* 1F3A; 1F32; Case map */
-            "\x1F3B\x1F33",                      /* 1F3B; 1F33; Case map */
-            "\x1F3C\x1F34",                      /* 1F3C; 1F34; Case map */
-            "\x1F3D\x1F35",                      /* 1F3D; 1F35; Case map */
-            "\x1F3E\x1F36",                      /* 1F3E; 1F36; Case map */
-            "\x1F3F\x1F37",                      /* 1F3F; 1F37; Case map */
-            "\x1F48\x1F40",                      /* 1F48; 1F40; Case map */
-            "\x1F49\x1F41",                      /* 1F49; 1F41; Case map */
-            "\x1F4A\x1F42",                      /* 1F4A; 1F42; Case map */
-            "\x1F4B\x1F43",                      /* 1F4B; 1F43; Case map */
-            "\x1F4C\x1F44",                      /* 1F4C; 1F44; Case map */
-            "\x1F4D\x1F45",                      /* 1F4D; 1F45; Case map */
-            "\x1F50\x03C5\x0313",                /* 1F50; 03C5 0313; Case map */
-            "\x1F52\x03C5\x0313\x0300",          /* 1F52; 03C5 0313 0300; Case map */
-            "\x1F54\x03C5\x0313\x0301",          /* 1F54; 03C5 0313 0301; Case map */
-            "\x1F56\x03C5\x0313\x0342",          /* 1F56; 03C5 0313 0342; Case map */
-            "\x1F59\x1F51",                      /* 1F59; 1F51; Case map */
-            "\x1F5B\x1F53",                      /* 1F5B; 1F53; Case map */
-            "\x1F5D\x1F55",                      /* 1F5D; 1F55; Case map */
-            "\x1F5F\x1F57",                      /* 1F5F; 1F57; Case map */
-            "\x1F68\x1F60",                      /* 1F68; 1F60; Case map */
-            "\x1F69\x1F61",                      /* 1F69; 1F61; Case map */
-            "\x1F6A\x1F62",                      /* 1F6A; 1F62; Case map */
-            "\x1F6B\x1F63",                      /* 1F6B; 1F63; Case map */
-            "\x1F6C\x1F64",                      /* 1F6C; 1F64; Case map */
-            "\x1F6D\x1F65",                      /* 1F6D; 1F65; Case map */
-            "\x1F6E\x1F66",                      /* 1F6E; 1F66; Case map */
-            "\x1F6F\x1F67",                      /* 1F6F; 1F67; Case map */
-            "\x1F80\x1F00\x03B9",                /* 1F80; 1F00 03B9; Case map */
-            "\x1F81\x1F01\x03B9",                /* 1F81; 1F01 03B9; Case map */
-            "\x1F82\x1F02\x03B9",                /* 1F82; 1F02 03B9; Case map */
-            "\x1F83\x1F03\x03B9",                /* 1F83; 1F03 03B9; Case map */
-            "\x1F84\x1F04\x03B9",                /* 1F84; 1F04 03B9; Case map */
-            "\x1F85\x1F05\x03B9",                /* 1F85; 1F05 03B9; Case map */
-            "\x1F86\x1F06\x03B9",                /* 1F86; 1F06 03B9; Case map */
-            "\x1F87\x1F07\x03B9",                /* 1F87; 1F07 03B9; Case map */
-            "\x1F88\x1F00\x03B9",                /* 1F88; 1F00 03B9; Case map */
-            "\x1F89\x1F01\x03B9",                /* 1F89; 1F01 03B9; Case map */
-            "\x1F8A\x1F02\x03B9",                /* 1F8A; 1F02 03B9; Case map */
-            "\x1F8B\x1F03\x03B9",                /* 1F8B; 1F03 03B9; Case map */
-            "\x1F8C\x1F04\x03B9",                /* 1F8C; 1F04 03B9; Case map */
-            "\x1F8D\x1F05\x03B9",                /* 1F8D; 1F05 03B9; Case map */
-            "\x1F8E\x1F06\x03B9",                /* 1F8E; 1F06 03B9; Case map */
-            "\x1F8F\x1F07\x03B9",                /* 1F8F; 1F07 03B9; Case map */
-            "\x1F90\x1F20\x03B9",                /* 1F90; 1F20 03B9; Case map */
-            "\x1F91\x1F21\x03B9",                /* 1F91; 1F21 03B9; Case map */
-            "\x1F92\x1F22\x03B9",                /* 1F92; 1F22 03B9; Case map */
-            "\x1F93\x1F23\x03B9",                /* 1F93; 1F23 03B9; Case map */
-            "\x1F94\x1F24\x03B9",                /* 1F94; 1F24 03B9; Case map */
-            "\x1F95\x1F25\x03B9",                /* 1F95; 1F25 03B9; Case map */
-            "\x1F96\x1F26\x03B9",                /* 1F96; 1F26 03B9; Case map */
-            "\x1F97\x1F27\x03B9",                /* 1F97; 1F27 03B9; Case map */
-            "\x1F98\x1F20\x03B9",                /* 1F98; 1F20 03B9; Case map */
-            "\x1F99\x1F21\x03B9",                /* 1F99; 1F21 03B9; Case map */
-            "\x1F9A\x1F22\x03B9",                /* 1F9A; 1F22 03B9; Case map */
-            "\x1F9B\x1F23\x03B9",                /* 1F9B; 1F23 03B9; Case map */
-            "\x1F9C\x1F24\x03B9",                /* 1F9C; 1F24 03B9; Case map */
-            "\x1F9D\x1F25\x03B9",                /* 1F9D; 1F25 03B9; Case map */
-            "\x1F9E\x1F26\x03B9",                /* 1F9E; 1F26 03B9; Case map */
-            "\x1F9F\x1F27\x03B9",                /* 1F9F; 1F27 03B9; Case map */
-            "\x1FA0\x1F60\x03B9",                /* 1FA0; 1F60 03B9; Case map */
-            "\x1FA1\x1F61\x03B9",                /* 1FA1; 1F61 03B9; Case map */
-            "\x1FA2\x1F62\x03B9",                /* 1FA2; 1F62 03B9; Case map */
-            "\x1FA3\x1F63\x03B9",                /* 1FA3; 1F63 03B9; Case map */
-            "\x1FA4\x1F64\x03B9",                /* 1FA4; 1F64 03B9; Case map */
-            "\x1FA5\x1F65\x03B9",                /* 1FA5; 1F65 03B9; Case map */
-            "\x1FA6\x1F66\x03B9",                /* 1FA6; 1F66 03B9; Case map */
-            "\x1FA7\x1F67\x03B9",                /* 1FA7; 1F67 03B9; Case map */
-            "\x1FA8\x1F60\x03B9",                /* 1FA8; 1F60 03B9; Case map */
-            "\x1FA9\x1F61\x03B9",                /* 1FA9; 1F61 03B9; Case map */
-            "\x1FAA\x1F62\x03B9",                /* 1FAA; 1F62 03B9; Case map */
-            "\x1FAB\x1F63\x03B9",                /* 1FAB; 1F63 03B9; Case map */
-            "\x1FAC\x1F64\x03B9",                /* 1FAC; 1F64 03B9; Case map */
-            "\x1FAD\x1F65\x03B9",                /* 1FAD; 1F65 03B9; Case map */
-            "\x1FAE\x1F66\x03B9",                /* 1FAE; 1F66 03B9; Case map */
-            "\x1FAF\x1F67\x03B9",                /* 1FAF; 1F67 03B9; Case map */
-            "\x1FB2\x1F70\x03B9",                /* 1FB2; 1F70 03B9; Case map */
-            "\x1FB3\x03B1\x03B9",                /* 1FB3; 03B1 03B9; Case map */
-            "\x1FB4\x03AC\x03B9",                /* 1FB4; 03AC 03B9; Case map */
-            "\x1FB6\x03B1\x0342",                /* 1FB6; 03B1 0342; Case map */
-            "\x1FB7\x03B1\x0342\x03B9",          /* 1FB7; 03B1 0342 03B9; Case map */
-            "\x1FB8\x1FB0",                      /* 1FB8; 1FB0; Case map */
-            "\x1FB9\x1FB1",                      /* 1FB9; 1FB1; Case map */
-            "\x1FBA\x1F70",                      /* 1FBA; 1F70; Case map */
-            "\x1FBB\x1F71",                      /* 1FBB; 1F71; Case map */
-            "\x1FBC\x03B1\x03B9",                /* 1FBC; 03B1 03B9; Case map */
-            "\x1FBE\x03B9",                      /* 1FBE; 03B9; Case map */
-            "\x1FC2\x1F74\x03B9",                /* 1FC2; 1F74 03B9; Case map */
-            "\x1FC3\x03B7\x03B9",                /* 1FC3; 03B7 03B9; Case map */
-            "\x1FC4\x03AE\x03B9",                /* 1FC4; 03AE 03B9; Case map */
-            "\x1FC6\x03B7\x0342",                /* 1FC6; 03B7 0342; Case map */
-            "\x1FC7\x03B7\x0342\x03B9",          /* 1FC7; 03B7 0342 03B9; Case map */
-            "\x1FC8\x1F72",                      /* 1FC8; 1F72; Case map */
-            "\x1FC9\x1F73",                      /* 1FC9; 1F73; Case map */
-            "\x1FCA\x1F74",                      /* 1FCA; 1F74; Case map */
-            "\x1FCB\x1F75",                      /* 1FCB; 1F75; Case map */
-            "\x1FCC\x03B7\x03B9",                /* 1FCC; 03B7 03B9; Case map */
-            "\x1FD2\x03B9\x0308\x0300",          /* 1FD2; 03B9 0308 0300; Case map */
-            "\x1FD3\x03B9\x0308\x0301",          /* 1FD3; 03B9 0308 0301; Case map */
-            "\x1FD6\x03B9\x0342",                /* 1FD6; 03B9 0342; Case map */
-            "\x1FD7\x03B9\x0308\x0342",          /* 1FD7; 03B9 0308 0342; Case map */
-            "\x1FD8\x1FD0",                      /* 1FD8; 1FD0; Case map */
-            "\x1FD9\x1FD1",                      /* 1FD9; 1FD1; Case map */
-            "\x1FDA\x1F76",                      /* 1FDA; 1F76; Case map */
-            "\x1FDB\x1F77",                      /* 1FDB; 1F77; Case map */
-            "\x1FE2\x03C5\x0308\x0300",          /* 1FE2; 03C5 0308 0300; Case map */
-            "\x1FE3\x03C5\x0308\x0301",          /* 1FE3; 03C5 0308 0301; Case map */
-            "\x1FE4\x03C1\x0313",                /* 1FE4; 03C1 0313; Case map */
-            "\x1FE6\x03C5\x0342",                /* 1FE6; 03C5 0342; Case map */
-            "\x1FE7\x03C5\x0308\x0342",          /* 1FE7; 03C5 0308 0342; Case map */
-            "\x1FE8\x1FE0",                      /* 1FE8; 1FE0; Case map */
-            "\x1FE9\x1FE1",                      /* 1FE9; 1FE1; Case map */
-            "\x1FEA\x1F7A",                      /* 1FEA; 1F7A; Case map */
-            "\x1FEB\x1F7B",                      /* 1FEB; 1F7B; Case map */
-            "\x1FEC\x1FE5",                      /* 1FEC; 1FE5; Case map */
-            "\x1FF2\x1F7C\x03B9",                /* 1FF2; 1F7C 03B9; Case map */
-            "\x1FF3\x03C9\x03B9",                /* 1FF3; 03C9 03B9; Case map */
-            "\x1FF4\x03CE\x03B9",                /* 1FF4; 03CE 03B9; Case map */
-            "\x1FF6\x03C9\x0342",                /* 1FF6; 03C9 0342; Case map */
-            "\x1FF7\x03C9\x0342\x03B9",          /* 1FF7; 03C9 0342 03B9; Case map */
-            "\x1FF8\x1F78",                      /* 1FF8; 1F78; Case map */
-            "\x1FF9\x1F79",                      /* 1FF9; 1F79; Case map */
-            "\x1FFA\x1F7C",                      /* 1FFA; 1F7C; Case map */
-            "\x1FFB\x1F7D",                      /* 1FFB; 1F7D; Case map */
-            "\x1FFC\x03C9\x03B9",                /* 1FFC; 03C9 03B9; Case map */
-            "\x2126\x03C9",                      /* 2126; 03C9; Case map */
-            "\x212A\x006B",                      /* 212A; 006B; Case map */
-            "\x212B\x00E5",                      /* 212B; 00E5; Case map */
-            "\x2160\x2170",                      /* 2160; 2170; Case map */
-            "\x2161\x2171",                      /* 2161; 2171; Case map */
-            "\x2162\x2172",                      /* 2162; 2172; Case map */
-            "\x2163\x2173",                      /* 2163; 2173; Case map */
-            "\x2164\x2174",                      /* 2164; 2174; Case map */
-            "\x2165\x2175",                      /* 2165; 2175; Case map */
-            "\x2166\x2176",                      /* 2166; 2176; Case map */
-            "\x2167\x2177",                      /* 2167; 2177; Case map */
-            "\x2168\x2178",                      /* 2168; 2178; Case map */
-            "\x2169\x2179",                      /* 2169; 2179; Case map */
-            "\x216A\x217A",                      /* 216A; 217A; Case map */
-            "\x216B\x217B",                      /* 216B; 217B; Case map */
-            "\x216C\x217C",                      /* 216C; 217C; Case map */
-            "\x216D\x217D",                      /* 216D; 217D; Case map */
-            "\x216E\x217E",                      /* 216E; 217E; Case map */
-            "\x216F\x217F",                      /* 216F; 217F; Case map */
-            "\x24B6\x24D0",                      /* 24B6; 24D0; Case map */
-            "\x24B7\x24D1",                      /* 24B7; 24D1; Case map */
-            "\x24B8\x24D2",                      /* 24B8; 24D2; Case map */
-            "\x24B9\x24D3",                      /* 24B9; 24D3; Case map */
-            "\x24BA\x24D4",                      /* 24BA; 24D4; Case map */
-            "\x24BB\x24D5",                      /* 24BB; 24D5; Case map */
-            "\x24BC\x24D6",                      /* 24BC; 24D6; Case map */
-            "\x24BD\x24D7",                      /* 24BD; 24D7; Case map */
-            "\x24BE\x24D8",                      /* 24BE; 24D8; Case map */
-            "\x24BF\x24D9",                      /* 24BF; 24D9; Case map */
-            "\x24C0\x24DA",                      /* 24C0; 24DA; Case map */
-            "\x24C1\x24DB",                      /* 24C1; 24DB; Case map */
-            "\x24C2\x24DC",                      /* 24C2; 24DC; Case map */
-            "\x24C3\x24DD",                      /* 24C3; 24DD; Case map */
-            "\x24C4\x24DE",                      /* 24C4; 24DE; Case map */
-            "\x24C5\x24DF",                      /* 24C5; 24DF; Case map */
-            "\x24C6\x24E0",                      /* 24C6; 24E0; Case map */
-            "\x24C7\x24E1",                      /* 24C7; 24E1; Case map */
-            "\x24C8\x24E2",                      /* 24C8; 24E2; Case map */
-            "\x24C9\x24E3",                      /* 24C9; 24E3; Case map */
-            "\x24CA\x24E4",                      /* 24CA; 24E4; Case map */
-            "\x24CB\x24E5",                      /* 24CB; 24E5; Case map */
-            "\x24CC\x24E6",                      /* 24CC; 24E6; Case map */
-            "\x24CD\x24E7",                      /* 24CD; 24E7; Case map */
-            "\x24CE\x24E8",                      /* 24CE; 24E8; Case map */
-            "\x24CF\x24E9",                      /* 24CF; 24E9; Case map */
-            "\xFB00\x0066\x0066",                /* FB00; 0066 0066; Case map */
-            "\xFB01\x0066\x0069",                /* FB01; 0066 0069; Case map */
-            "\xFB02\x0066\x006C",                /* FB02; 0066 006C; Case map */
-            "\xFB03\x0066\x0066\x0069",          /* FB03; 0066 0066 0069; Case map */
-            "\xFB04\x0066\x0066\x006C",          /* FB04; 0066 0066 006C; Case map */
-            "\xFB05\x0073\x0074",                /* FB05; 0073 0074; Case map */
-            "\xFB06\x0073\x0074",                /* FB06; 0073 0074; Case map */
-            "\xFB13\x0574\x0576",                /* FB13; 0574 0576; Case map */
-            "\xFB14\x0574\x0565",                /* FB14; 0574 0565; Case map */
-            "\xFB15\x0574\x056B",                /* FB15; 0574 056B; Case map */
-            "\xFB16\x057E\x0576",                /* FB16; 057E 0576; Case map */
-            "\xFB17\x0574\x056D",                /* FB17; 0574 056D; Case map */
-            "\xFF21\xFF41",                      /* FF21; FF41; Case map */
-            "\xFF22\xFF42",                      /* FF22; FF42; Case map */
-            "\xFF23\xFF43",                      /* FF23; FF43; Case map */
-            "\xFF24\xFF44",                      /* FF24; FF44; Case map */
-            "\xFF25\xFF45",                      /* FF25; FF45; Case map */
-            "\xFF26\xFF46",                      /* FF26; FF46; Case map */
-            "\xFF27\xFF47",                      /* FF27; FF47; Case map */
-            "\xFF28\xFF48",                      /* FF28; FF48; Case map */
-            "\xFF29\xFF49",                      /* FF29; FF49; Case map */
-            "\xFF2A\xFF4A",                      /* FF2A; FF4A; Case map */
-            "\xFF2B\xFF4B",                      /* FF2B; FF4B; Case map */
-            "\xFF2C\xFF4C",                      /* FF2C; FF4C; Case map */
-            "\xFF2D\xFF4D",                      /* FF2D; FF4D; Case map */
-            "\xFF2E\xFF4E",                      /* FF2E; FF4E; Case map */
-            "\xFF2F\xFF4F",                      /* FF2F; FF4F; Case map */
-            "\xFF30\xFF50",                      /* FF30; FF50; Case map */
-            "\xFF31\xFF51",                      /* FF31; FF51; Case map */
-            "\xFF32\xFF52",                      /* FF32; FF52; Case map */
-            "\xFF33\xFF53",                      /* FF33; FF53; Case map */
-            "\xFF34\xFF54",                      /* FF34; FF54; Case map */
-            "\xFF35\xFF55",                      /* FF35; FF55; Case map */
-            "\xFF36\xFF56",                      /* FF36; FF56; Case map */
-            "\xFF37\xFF57",                      /* FF37; FF57; Case map */
-            "\xFF38\xFF58",                      /* FF38; FF58; Case map */
-            "\xFF39\xFF59",                      /* FF39; FF59; Case map */
-            "\xFF3A\xFF5A",                      /* FF3A; FF5A; Case map */
-        };
-
-
-        /// <summary>
-        /// C.1.1 ASCII space characters
-        ///
-        /// </summary>
-        public static readonly char[][] C_1_1 = new char[][]
-        {
-            new char[] {'\x0020', '\x0000'},   /* 0020; SPACE */
-        };
-
-
-        /// <summary>
-        /// C.1.2 Non-ASCII space characters
-        ///         /// </summary>
-        public static readonly char[][] C_1_2 = new char[][]
-        {
-            new char[] {'\x00A0', '\x0000'},            /* 00A0; NO-BREAK SPACE */
-            new char[] {'\x1680', '\x0000'},              /* 1680; OGHAM SPACE MARK */
-            new char[] {'\x2000', '\x0000'},     /* 2000; EN QUAD */
-            new char[] {'\x2001', '\x0000'},     /* 2001; EM QUAD */
-            new char[] {'\x2002', '\x0000'},      /* 2002; EN SPACE */
-            new char[] {'\x2003', '\x0000'},      /* 2003; EM SPACE */
-            new char[] {'\x2004', '\x0000'},                /* 2004; THREE-PER-EM SPACE */
-            new char[] {'\x2005', '\x0000'},               /* 2005; FOUR-PER-EM SPACE */
-            new char[] {'\x2006', '\x0000'},              /* 2006; SIX-PER-EM SPACE */
-            new char[] {'\x2007', '\x0000'},          /* 2007; FIGURE SPACE */
-            new char[] {'\x2008', '\x0000'},               /* 2008; PUNCTUATION SPACE */
-            new char[] {'\x2009', '\x0000'},        /* 2009; THIN SPACE */
-            new char[] {'\x200A', '\x0000'},        /* 200A; HAIR SPACE */
-            new char[] {'\x200B', '\x0000'},              /* 200B; ZERO WIDTH SPACE */
-            new char[] {'\x202F', '\x0000'},                   /* 202F; NARROW NO-BREAK SPACE */
-            new char[] {'\x205F', '\x0000'},                       /* 205F; MEDIUM MATHEMATICAL SPACE */
-            new char[] {'\x3000', '\x0000'},               /* 3000; IDEOGRAPHIC SPACE */
-        };
-
-
-        /// <summary>
-        /// C.2.1 ASCII control characters
-        ///
-        /// </summary>
-        public static readonly char[][] C_2_1 = new char[][]
-        {
-            new char[] {'\x0000', '\x001F'},                  /* 0000-001F; [CONTROL CHARACTERS] */
-            new char[] {'\x007F', '\x0000'},    /* 007F; DELETE */
-        };
-
-
-        /// <summary>
-        /// C.2.2 Non-ASCII control characters
-        ///
-        /// </summary>
-        public static readonly char[][] C_2_2 = new char[][]
-        {
-            new char[] {'\x0080', '\x009F'},                  /* 0080-009F; [CONTROL CHARACTERS] */
-            new char[] {'\x06DD', '\x0000'},                /* 06DD; ARABIC END OF AYAH */
-            new char[] {'\x070F', '\x0000'},                      /* 070F; SYRIAC ABBREVIATION MARK */
-            new char[] {'\x180E', '\x0000'},                       /* 180E; MONGOLIAN VOWEL SEPARATOR */
-            new char[] {'\x200C', '\x0000'},                   /* 200C; ZERO WIDTH NON-JOINER */
-            new char[] {'\x200D', '\x0000'},               /* 200D; ZERO WIDTH JOINER */
-            new char[] {'\x2028', '\x0000'},            /* 2028; LINE SEPARATOR */
-            new char[] {'\x2029', '\x0000'},                 /* 2029; PARAGRAPH SEPARATOR */
-            new char[] {'\x2060', '\x0000'},         /* 2060; WORD JOINER */
-            new char[] {'\x2061', '\x0000'},                  /* 2061; FUNCTION APPLICATION */
-            new char[] {'\x2062', '\x0000'},             /* 2062; INVISIBLE TIMES */
-            new char[] {'\x2063', '\x0000'},                 /* 2063; INVISIBLE SEPARATOR */
-            new char[] {'\x206A', '\x206F'},                  /* 206A-206F; [CONTROL CHARACTERS] */
-            new char[] {'\xFEFF', '\x0000'},                       /* FEFF; ZERO WIDTH NO-BREAK SPACE */
-            new char[] {'\xFFF9', '\xFFFC'},                  /* FFF9-FFFC; [CONTROL CHARACTERS] */
-        };
-
-
-        /// <summary>
-        /// C.3 Private use
-        ///
-        /// </summary>
-        public static readonly char[][] C_3 = new char[][]
-        {
-            new char[] {'\xE000', '\xF8FF'},                    /* E000-F8FF; [PRIVATE USE, PLANE 0] */
-        };
-
-
-        /// <summary>
-        /// C.4 Non-character code points
-        ///
-        /// </summary>
-        public static readonly char[][] C_4 = new char[][]
-        {
-            new char[] {'\xFDD0', '\xFDEF'},                        /* FDD0-FDEF; [NONCHARACTER CODE POINTS] */
-            new char[] {'\xFFFE', '\xFFFF'},                        /* FFFE-FFFF; [NONCHARACTER CODE POINTS] */
-        };
-
-
-        /// <summary>
-        /// C.5 Surrogate codes
-        ///
-        /// </summary>
-        public static readonly char[][] C_5 = new char[][]
-        {
-            new char[] {'\xD800', '\xDFFF'},               /* D800-DFFF; [SURROGATE CODES] */
-        };
-
-
-        /// <summary>
-        /// C.6 Inappropriate for plain text
-        ///
-        /// </summary>
-        public static readonly char[][] C_6 = new char[][]
-        {
-            new char[] {'\xFFF9', '\x0000'},                           /* FFF9; INTERLINEAR ANNOTATION ANCHOR */
-            new char[] {'\xFFFA', '\x0000'},                              /* FFFA; INTERLINEAR ANNOTATION SEPARATOR */
-            new char[] {'\xFFFB', '\x0000'},                               /* FFFB; INTERLINEAR ANNOTATION TERMINATOR */
-            new char[] {'\xFFFC', '\x0000'},                          /* FFFC; OBJECT REPLACEMENT CHARACTER */
-            new char[] {'\xFFFD', '\x0000'},                   /* FFFD; REPLACEMENT CHARACTER */
-        };
-
-
-        /// <summary>
-        /// C.7 Inappropriate for canonical representation
-        ///
-        /// </summary>
-        public static readonly char[][] C_7 = new char[][]
-        {
-            new char[] {'\x2FF0', '\x2FFB'},                                  /* 2FF0-2FFB; [IDEOGRAPHIC DESCRIPTION CHARACTERS] */
-        };
-
-
-        /// <summary>
-        /// C.8 Change display properties or are deprecated
-        ///
-        /// </summary>
-        public static readonly char[][] C_8 = new char[][]
-        {
-            new char[] {'\x0340', '\x0000'},                       /* 0340; COMBINING GRAVE TONE MARK */
-            new char[] {'\x0341', '\x0000'},                       /* 0341; COMBINING ACUTE TONE MARK */
-            new char[] {'\x200E', '\x0000'},                /* 200E; LEFT-TO-RIGHT MARK */
-            new char[] {'\x200F', '\x0000'},                /* 200F; RIGHT-TO-LEFT MARK */
-            new char[] {'\x202A', '\x0000'},                     /* 202A; LEFT-TO-RIGHT EMBEDDING */
-            new char[] {'\x202B', '\x0000'},                     /* 202B; RIGHT-TO-LEFT EMBEDDING */
-            new char[] {'\x202C', '\x0000'},                        /* 202C; POP DIRECTIONAL FORMATTING */
-            new char[] {'\x202D', '\x0000'},                    /* 202D; LEFT-TO-RIGHT OVERRIDE */
-            new char[] {'\x202E', '\x0000'},                    /* 202E; RIGHT-TO-LEFT OVERRIDE */
-            new char[] {'\x206A', '\x0000'},                        /* 206A; INHIBIT SYMMETRIC SWAPPING */
-            new char[] {'\x206B', '\x0000'},                         /* 206B; ACTIVATE SYMMETRIC SWAPPING */
-            new char[] {'\x206C', '\x0000'},                         /* 206C; INHIBIT ARABIC FORM SHAPING */
-            new char[] {'\x206D', '\x0000'},                          /* 206D; ACTIVATE ARABIC FORM SHAPING */
-            new char[] {'\x206E', '\x0000'},                   /* 206E; NATIONAL DIGIT SHAPES */
-            new char[] {'\x206F', '\x0000'},                  /* 206F; NOMINAL DIGIT SHAPES */
-        };
-
-
-        /// <summary>
-        /// C.9 Tagging characters
-        ///
-        /// </summary>
-        public static readonly char[][] C_9 = new char[][]
-        {
-        };
-
-
-        /// <summary>
-        /// D.1 Characters with bidirectional property "R" or "AL"
-        ///
-        /// </summary>
-        public static readonly char[][] D_1 = new char[][]
-        {
-            new char[] {'\x05BE', '\x0000'},    /* 05BE */
-            new char[] {'\x05C0', '\x0000'},    /* 05C0 */
-            new char[] {'\x05C3', '\x0000'},    /* 05C3 */
-            new char[] {'\x05D0', '\x05EA'},    /* 05D0-05EA */
-            new char[] {'\x05F0', '\x05F4'},    /* 05F0-05F4 */
-            new char[] {'\x061B', '\x0000'},    /* 061B */
-            new char[] {'\x061F', '\x0000'},    /* 061F */
-            new char[] {'\x0621', '\x063A'},    /* 0621-063A */
-            new char[] {'\x0640', '\x064A'},    /* 0640-064A */
-            new char[] {'\x066D', '\x066F'},    /* 066D-066F */
-            new char[] {'\x0671', '\x06D5'},    /* 0671-06D5 */
-            new char[] {'\x06DD', '\x0000'},    /* 06DD */
-            new char[] {'\x06E5', '\x06E6'},    /* 06E5-06E6 */
-            new char[] {'\x06FA', '\x06FE'},    /* 06FA-06FE */
-            new char[] {'\x0700', '\x070D'},    /* 0700-070D */
-            new char[] {'\x0710', '\x0000'},    /* 0710 */
-            new char[] {'\x0712', '\x072C'},    /* 0712-072C */
-            new char[] {'\x0780', '\x07A5'},    /* 0780-07A5 */
-            new char[] {'\x07B1', '\x0000'},    /* 07B1 */
-            new char[] {'\x200F', '\x0000'},    /* 200F */
-            new char[] {'\xFB1D', '\x0000'},    /* FB1D */
-            new char[] {'\xFB1F', '\xFB28'},    /* FB1F-FB28 */
-            new char[] {'\xFB2A', '\xFB36'},    /* FB2A-FB36 */
-            new char[] {'\xFB38', '\xFB3C'},    /* FB38-FB3C */
-            new char[] {'\xFB3E', '\x0000'},    /* FB3E */
-            new char[] {'\xFB40', '\xFB41'},    /* FB40-FB41 */
-            new char[] {'\xFB43', '\xFB44'},    /* FB43-FB44 */
-            new char[] {'\xFB46', '\xFBB1'},    /* FB46-FBB1 */
-            new char[] {'\xFBD3', '\xFD3D'},    /* FBD3-FD3D */
-            new char[] {'\xFD50', '\xFD8F'},    /* FD50-FD8F */
-            new char[] {'\xFD92', '\xFDC7'},    /* FD92-FDC7 */
-            new char[] {'\xFDF0', '\xFDFC'},    /* FDF0-FDFC */
-            new char[] {'\xFE70', '\xFE74'},    /* FE70-FE74 */
-            new char[] {'\xFE76', '\xFEFC'},    /* FE76-FEFC */
-        };
-
-
-        /// <summary>
-        /// D.2 Characters with bidirectional property "L"
-        ///
-        /// </summary>
-        public static readonly char[][] D_2 = new char[][]
-        {
-            new char[] {'\x0041', '\x005A'},    /* 0041-005A */
-            new char[] {'\x0061', '\x007A'},    /* 0061-007A */
-            new char[] {'\x00AA', '\x0000'},    /* 00AA */
-            new char[] {'\x00B5', '\x0000'},    /* 00B5 */
-            new char[] {'\x00BA', '\x0000'},    /* 00BA */
-            new char[] {'\x00C0', '\x00D6'},    /* 00C0-00D6 */
-            new char[] {'\x00D8', '\x00F6'},    /* 00D8-00F6 */
-            new char[] {'\x00F8', '\x0220'},    /* 00F8-0220 */
-            new char[] {'\x0222', '\x0233'},    /* 0222-0233 */
-            new char[] {'\x0250', '\x02AD'},    /* 0250-02AD */
-            new char[] {'\x02B0', '\x02B8'},    /* 02B0-02B8 */
-            new char[] {'\x02BB', '\x02C1'},    /* 02BB-02C1 */
-            new char[] {'\x02D0', '\x02D1'},    /* 02D0-02D1 */
-            new char[] {'\x02E0', '\x02E4'},    /* 02E0-02E4 */
-            new char[] {'\x02EE', '\x0000'},    /* 02EE */
-            new char[] {'\x037A', '\x0000'},    /* 037A */
-            new char[] {'\x0386', '\x0000'},    /* 0386 */
-            new char[] {'\x0388', '\x038A'},    /* 0388-038A */
-            new char[] {'\x038C', '\x0000'},    /* 038C */
-            new char[] {'\x038E', '\x03A1'},    /* 038E-03A1 */
-            new char[] {'\x03A3', '\x03CE'},    /* 03A3-03CE */
-            new char[] {'\x03D0', '\x03F5'},    /* 03D0-03F5 */
-            new char[] {'\x0400', '\x0482'},    /* 0400-0482 */
-            new char[] {'\x048A', '\x04CE'},    /* 048A-04CE */
-            new char[] {'\x04D0', '\x04F5'},    /* 04D0-04F5 */
-            new char[] {'\x04F8', '\x04F9'},    /* 04F8-04F9 */
-            new char[] {'\x0500', '\x050F'},    /* 0500-050F */
-            new char[] {'\x0531', '\x0556'},    /* 0531-0556 */
-            new char[] {'\x0559', '\x055F'},    /* 0559-055F */
-            new char[] {'\x0561', '\x0587'},    /* 0561-0587 */
-            new char[] {'\x0589', '\x0000'},    /* 0589 */
-            new char[] {'\x0903', '\x0000'},    /* 0903 */
-            new char[] {'\x0905', '\x0939'},    /* 0905-0939 */
-            new char[] {'\x093D', '\x0940'},    /* 093D-0940 */
-            new char[] {'\x0949', '\x094C'},    /* 0949-094C */
-            new char[] {'\x0950', '\x0000'},    /* 0950 */
-            new char[] {'\x0958', '\x0961'},    /* 0958-0961 */
-            new char[] {'\x0964', '\x0970'},    /* 0964-0970 */
-            new char[] {'\x0982', '\x0983'},    /* 0982-0983 */
-            new char[] {'\x0985', '\x098C'},    /* 0985-098C */
-            new char[] {'\x098F', '\x0990'},    /* 098F-0990 */
-            new char[] {'\x0993', '\x09A8'},    /* 0993-09A8 */
-            new char[] {'\x09AA', '\x09B0'},    /* 09AA-09B0 */
-            new char[] {'\x09B2', '\x0000'},    /* 09B2 */
-            new char[] {'\x09B6', '\x09B9'},    /* 09B6-09B9 */
-            new char[] {'\x09BE', '\x09C0'},    /* 09BE-09C0 */
-            new char[] {'\x09C7', '\x09C8'},    /* 09C7-09C8 */
-            new char[] {'\x09CB', '\x09CC'},    /* 09CB-09CC */
-            new char[] {'\x09D7', '\x0000'},    /* 09D7 */
-            new char[] {'\x09DC', '\x09DD'},    /* 09DC-09DD */
-            new char[] {'\x09DF', '\x09E1'},    /* 09DF-09E1 */
-            new char[] {'\x09E6', '\x09F1'},    /* 09E6-09F1 */
-            new char[] {'\x09F4', '\x09FA'},    /* 09F4-09FA */
-            new char[] {'\x0A05', '\x0A0A'},    /* 0A05-0A0A */
-            new char[] {'\x0A0F', '\x0A10'},    /* 0A0F-0A10 */
-            new char[] {'\x0A13', '\x0A28'},    /* 0A13-0A28 */
-            new char[] {'\x0A2A', '\x0A30'},    /* 0A2A-0A30 */
-            new char[] {'\x0A32', '\x0A33'},    /* 0A32-0A33 */
-            new char[] {'\x0A35', '\x0A36'},    /* 0A35-0A36 */
-            new char[] {'\x0A38', '\x0A39'},    /* 0A38-0A39 */
-            new char[] {'\x0A3E', '\x0A40'},    /* 0A3E-0A40 */
-            new char[] {'\x0A59', '\x0A5C'},    /* 0A59-0A5C */
-            new char[] {'\x0A5E', '\x0000'},    /* 0A5E */
-            new char[] {'\x0A66', '\x0A6F'},    /* 0A66-0A6F */
-            new char[] {'\x0A72', '\x0A74'},    /* 0A72-0A74 */
-            new char[] {'\x0A83', '\x0000'},    /* 0A83 */
-            new char[] {'\x0A85', '\x0A8B'},    /* 0A85-0A8B */
-            new char[] {'\x0A8D', '\x0000'},    /* 0A8D */
-            new char[] {'\x0A8F', '\x0A91'},    /* 0A8F-0A91 */
-            new char[] {'\x0A93', '\x0AA8'},    /* 0A93-0AA8 */
-            new char[] {'\x0AAA', '\x0AB0'},    /* 0AAA-0AB0 */
-            new char[] {'\x0AB2', '\x0AB3'},    /* 0AB2-0AB3 */
-            new char[] {'\x0AB5', '\x0AB9'},    /* 0AB5-0AB9 */
-            new char[] {'\x0ABD', '\x0AC0'},    /* 0ABD-0AC0 */
-            new char[] {'\x0AC9', '\x0000'},    /* 0AC9 */
-            new char[] {'\x0ACB', '\x0ACC'},    /* 0ACB-0ACC */
-            new char[] {'\x0AD0', '\x0000'},    /* 0AD0 */
-            new char[] {'\x0AE0', '\x0000'},    /* 0AE0 */
-            new char[] {'\x0AE6', '\x0AEF'},    /* 0AE6-0AEF */
-            new char[] {'\x0B02', '\x0B03'},    /* 0B02-0B03 */
-            new char[] {'\x0B05', '\x0B0C'},    /* 0B05-0B0C */
-            new char[] {'\x0B0F', '\x0B10'},    /* 0B0F-0B10 */
-            new char[] {'\x0B13', '\x0B28'},    /* 0B13-0B28 */
-            new char[] {'\x0B2A', '\x0B30'},    /* 0B2A-0B30 */
-            new char[] {'\x0B32', '\x0B33'},    /* 0B32-0B33 */
-            new char[] {'\x0B36', '\x0B39'},    /* 0B36-0B39 */
-            new char[] {'\x0B3D', '\x0B3E'},    /* 0B3D-0B3E */
-            new char[] {'\x0B40', '\x0000'},    /* 0B40 */
-            new char[] {'\x0B47', '\x0B48'},    /* 0B47-0B48 */
-            new char[] {'\x0B4B', '\x0B4C'},    /* 0B4B-0B4C */
-            new char[] {'\x0B57', '\x0000'},    /* 0B57 */
-            new char[] {'\x0B5C', '\x0B5D'},    /* 0B5C-0B5D */
-            new char[] {'\x0B5F', '\x0B61'},    /* 0B5F-0B61 */
-            new char[] {'\x0B66', '\x0B70'},    /* 0B66-0B70 */
-            new char[] {'\x0B83', '\x0000'},    /* 0B83 */
-            new char[] {'\x0B85', '\x0B8A'},    /* 0B85-0B8A */
-            new char[] {'\x0B8E', '\x0B90'},    /* 0B8E-0B90 */
-            new char[] {'\x0B92', '\x0B95'},    /* 0B92-0B95 */
-            new char[] {'\x0B99', '\x0B9A'},    /* 0B99-0B9A */
-            new char[] {'\x0B9C', '\x0000'},    /* 0B9C */
-            new char[] {'\x0B9E', '\x0B9F'},    /* 0B9E-0B9F */
-            new char[] {'\x0BA3', '\x0BA4'},    /* 0BA3-0BA4 */
-            new char[] {'\x0BA8', '\x0BAA'},    /* 0BA8-0BAA */
-            new char[] {'\x0BAE', '\x0BB5'},    /* 0BAE-0BB5 */
-            new char[] {'\x0BB7', '\x0BB9'},    /* 0BB7-0BB9 */
-            new char[] {'\x0BBE', '\x0BBF'},    /* 0BBE-0BBF */
-            new char[] {'\x0BC1', '\x0BC2'},    /* 0BC1-0BC2 */
-            new char[] {'\x0BC6', '\x0BC8'},    /* 0BC6-0BC8 */
-            new char[] {'\x0BCA', '\x0BCC'},    /* 0BCA-0BCC */
-            new char[] {'\x0BD7', '\x0000'},    /* 0BD7 */
-            new char[] {'\x0BE7', '\x0BF2'},    /* 0BE7-0BF2 */
-            new char[] {'\x0C01', '\x0C03'},    /* 0C01-0C03 */
-            new char[] {'\x0C05', '\x0C0C'},    /* 0C05-0C0C */
-            new char[] {'\x0C0E', '\x0C10'},    /* 0C0E-0C10 */
-            new char[] {'\x0C12', '\x0C28'},    /* 0C12-0C28 */
-            new char[] {'\x0C2A', '\x0C33'},    /* 0C2A-0C33 */
-            new char[] {'\x0C35', '\x0C39'},    /* 0C35-0C39 */
-            new char[] {'\x0C41', '\x0C44'},    /* 0C41-0C44 */
-            new char[] {'\x0C60', '\x0C61'},    /* 0C60-0C61 */
-            new char[] {'\x0C66', '\x0C6F'},    /* 0C66-0C6F */
-            new char[] {'\x0C82', '\x0C83'},    /* 0C82-0C83 */
-            new char[] {'\x0C85', '\x0C8C'},    /* 0C85-0C8C */
-            new char[] {'\x0C8E', '\x0C90'},    /* 0C8E-0C90 */
-            new char[] {'\x0C92', '\x0CA8'},    /* 0C92-0CA8 */
-            new char[] {'\x0CAA', '\x0CB3'},    /* 0CAA-0CB3 */
-            new char[] {'\x0CB5', '\x0CB9'},    /* 0CB5-0CB9 */
-            new char[] {'\x0CBE', '\x0000'},    /* 0CBE */
-            new char[] {'\x0CC0', '\x0CC4'},    /* 0CC0-0CC4 */
-            new char[] {'\x0CC7', '\x0CC8'},    /* 0CC7-0CC8 */
-            new char[] {'\x0CCA', '\x0CCB'},    /* 0CCA-0CCB */
-            new char[] {'\x0CD5', '\x0CD6'},    /* 0CD5-0CD6 */
-            new char[] {'\x0CDE', '\x0000'},    /* 0CDE */
-            new char[] {'\x0CE0', '\x0CE1'},    /* 0CE0-0CE1 */
-            new char[] {'\x0CE6', '\x0CEF'},    /* 0CE6-0CEF */
-            new char[] {'\x0D02', '\x0D03'},    /* 0D02-0D03 */
-            new char[] {'\x0D05', '\x0D0C'},    /* 0D05-0D0C */
-            new char[] {'\x0D0E', '\x0D10'},    /* 0D0E-0D10 */
-            new char[] {'\x0D12', '\x0D28'},    /* 0D12-0D28 */
-            new char[] {'\x0D2A', '\x0D39'},    /* 0D2A-0D39 */
-            new char[] {'\x0D3E', '\x0D40'},    /* 0D3E-0D40 */
-            new char[] {'\x0D46', '\x0D48'},    /* 0D46-0D48 */
-            new char[] {'\x0D4A', '\x0D4C'},    /* 0D4A-0D4C */
-            new char[] {'\x0D57', '\x0000'},    /* 0D57 */
-            new char[] {'\x0D60', '\x0D61'},    /* 0D60-0D61 */
-            new char[] {'\x0D66', '\x0D6F'},    /* 0D66-0D6F */
-            new char[] {'\x0D82', '\x0D83'},    /* 0D82-0D83 */
-            new char[] {'\x0D85', '\x0D96'},    /* 0D85-0D96 */
-            new char[] {'\x0D9A', '\x0DB1'},    /* 0D9A-0DB1 */
-            new char[] {'\x0DB3', '\x0DBB'},    /* 0DB3-0DBB */
-            new char[] {'\x0DBD', '\x0000'},    /* 0DBD */
-            new char[] {'\x0DC0', '\x0DC6'},    /* 0DC0-0DC6 */
-            new char[] {'\x0DCF', '\x0DD1'},    /* 0DCF-0DD1 */
-            new char[] {'\x0DD8', '\x0DDF'},    /* 0DD8-0DDF */
-            new char[] {'\x0DF2', '\x0DF4'},    /* 0DF2-0DF4 */
-            new char[] {'\x0E01', '\x0E30'},    /* 0E01-0E30 */
-            new char[] {'\x0E32', '\x0E33'},    /* 0E32-0E33 */
-            new char[] {'\x0E40', '\x0E46'},    /* 0E40-0E46 */
-            new char[] {'\x0E4F', '\x0E5B'},    /* 0E4F-0E5B */
-            new char[] {'\x0E81', '\x0E82'},    /* 0E81-0E82 */
-            new char[] {'\x0E84', '\x0000'},    /* 0E84 */
-            new char[] {'\x0E87', '\x0E88'},    /* 0E87-0E88 */
-            new char[] {'\x0E8A', '\x0000'},    /* 0E8A */
-            new char[] {'\x0E8D', '\x0000'},    /* 0E8D */
-            new char[] {'\x0E94', '\x0E97'},    /* 0E94-0E97 */
-            new char[] {'\x0E99', '\x0E9F'},    /* 0E99-0E9F */
-            new char[] {'\x0EA1', '\x0EA3'},    /* 0EA1-0EA3 */
-            new char[] {'\x0EA5', '\x0000'},    /* 0EA5 */
-            new char[] {'\x0EA7', '\x0000'},    /* 0EA7 */
-            new char[] {'\x0EAA', '\x0EAB'},    /* 0EAA-0EAB */
-            new char[] {'\x0EAD', '\x0EB0'},    /* 0EAD-0EB0 */
-            new char[] {'\x0EB2', '\x0EB3'},    /* 0EB2-0EB3 */
-            new char[] {'\x0EBD', '\x0000'},    /* 0EBD */
-            new char[] {'\x0EC0', '\x0EC4'},    /* 0EC0-0EC4 */
-            new char[] {'\x0EC6', '\x0000'},    /* 0EC6 */
-            new char[] {'\x0ED0', '\x0ED9'},    /* 0ED0-0ED9 */
-            new char[] {'\x0EDC', '\x0EDD'},    /* 0EDC-0EDD */
-            new char[] {'\x0F00', '\x0F17'},    /* 0F00-0F17 */
-            new char[] {'\x0F1A', '\x0F34'},    /* 0F1A-0F34 */
-            new char[] {'\x0F36', '\x0000'},    /* 0F36 */
-            new char[] {'\x0F38', '\x0000'},    /* 0F38 */
-            new char[] {'\x0F3E', '\x0F47'},    /* 0F3E-0F47 */
-            new char[] {'\x0F49', '\x0F6A'},    /* 0F49-0F6A */
-            new char[] {'\x0F7F', '\x0000'},    /* 0F7F */
-            new char[] {'\x0F85', '\x0000'},    /* 0F85 */
-            new char[] {'\x0F88', '\x0F8B'},    /* 0F88-0F8B */
-            new char[] {'\x0FBE', '\x0FC5'},    /* 0FBE-0FC5 */
-            new char[] {'\x0FC7', '\x0FCC'},    /* 0FC7-0FCC */
-            new char[] {'\x0FCF', '\x0000'},    /* 0FCF */
-            new char[] {'\x1000', '\x1021'},    /* 1000-1021 */
-            new char[] {'\x1023', '\x1027'},    /* 1023-1027 */
-            new char[] {'\x1029', '\x102A'},    /* 1029-102A */
-            new char[] {'\x102C', '\x0000'},    /* 102C */
-            new char[] {'\x1031', '\x0000'},    /* 1031 */
-            new char[] {'\x1038', '\x0000'},    /* 1038 */
-            new char[] {'\x1040', '\x1057'},    /* 1040-1057 */
-            new char[] {'\x10A0', '\x10C5'},    /* 10A0-10C5 */
-            new char[] {'\x10D0', '\x10F8'},    /* 10D0-10F8 */
-            new char[] {'\x10FB', '\x0000'},    /* 10FB */
-            new char[] {'\x1100', '\x1159'},    /* 1100-1159 */
-            new char[] {'\x115F', '\x11A2'},    /* 115F-11A2 */
-            new char[] {'\x11A8', '\x11F9'},    /* 11A8-11F9 */
-            new char[] {'\x1200', '\x1206'},    /* 1200-1206 */
-            new char[] {'\x1208', '\x1246'},    /* 1208-1246 */
-            new char[] {'\x1248', '\x0000'},    /* 1248 */
-            new char[] {'\x124A', '\x124D'},    /* 124A-124D */
-            new char[] {'\x1250', '\x1256'},    /* 1250-1256 */
-            new char[] {'\x1258', '\x0000'},    /* 1258 */
-            new char[] {'\x125A', '\x125D'},    /* 125A-125D */
-            new char[] {'\x1260', '\x1286'},    /* 1260-1286 */
-            new char[] {'\x1288', '\x0000'},    /* 1288 */
-            new char[] {'\x128A', '\x128D'},    /* 128A-128D */
-            new char[] {'\x1290', '\x12AE'},    /* 1290-12AE */
-            new char[] {'\x12B0', '\x0000'},    /* 12B0 */
-            new char[] {'\x12B2', '\x12B5'},    /* 12B2-12B5 */
-            new char[] {'\x12B8', '\x12BE'},    /* 12B8-12BE */
-            new char[] {'\x12C0', '\x0000'},    /* 12C0 */
-            new char[] {'\x12C2', '\x12C5'},    /* 12C2-12C5 */
-            new char[] {'\x12C8', '\x12CE'},    /* 12C8-12CE */
-            new char[] {'\x12D0', '\x12D6'},    /* 12D0-12D6 */
-            new char[] {'\x12D8', '\x12EE'},    /* 12D8-12EE */
-            new char[] {'\x12F0', '\x130E'},    /* 12F0-130E */
-            new char[] {'\x1310', '\x0000'},    /* 1310 */
-            new char[] {'\x1312', '\x1315'},    /* 1312-1315 */
-            new char[] {'\x1318', '\x131E'},    /* 1318-131E */
-            new char[] {'\x1320', '\x1346'},    /* 1320-1346 */
-            new char[] {'\x1348', '\x135A'},    /* 1348-135A */
-            new char[] {'\x1361', '\x137C'},    /* 1361-137C */
-            new char[] {'\x13A0', '\x13F4'},    /* 13A0-13F4 */
-            new char[] {'\x1401', '\x1676'},    /* 1401-1676 */
-            new char[] {'\x1681', '\x169A'},    /* 1681-169A */
-            new char[] {'\x16A0', '\x16F0'},    /* 16A0-16F0 */
-            new char[] {'\x1700', '\x170C'},    /* 1700-170C */
-            new char[] {'\x170E', '\x1711'},    /* 170E-1711 */
-            new char[] {'\x1720', '\x1731'},    /* 1720-1731 */
-            new char[] {'\x1735', '\x1736'},    /* 1735-1736 */
-            new char[] {'\x1740', '\x1751'},    /* 1740-1751 */
-            new char[] {'\x1760', '\x176C'},    /* 1760-176C */
-            new char[] {'\x176E', '\x1770'},    /* 176E-1770 */
-            new char[] {'\x1780', '\x17B6'},    /* 1780-17B6 */
-            new char[] {'\x17BE', '\x17C5'},    /* 17BE-17C5 */
-            new char[] {'\x17C7', '\x17C8'},    /* 17C7-17C8 */
-            new char[] {'\x17D4', '\x17DA'},    /* 17D4-17DA */
-            new char[] {'\x17DC', '\x0000'},    /* 17DC */
-            new char[] {'\x17E0', '\x17E9'},    /* 17E0-17E9 */
-            new char[] {'\x1810', '\x1819'},    /* 1810-1819 */
-            new char[] {'\x1820', '\x1877'},    /* 1820-1877 */
-            new char[] {'\x1880', '\x18A8'},    /* 1880-18A8 */
-            new char[] {'\x1E00', '\x1E9B'},    /* 1E00-1E9B */
-            new char[] {'\x1EA0', '\x1EF9'},    /* 1EA0-1EF9 */
-            new char[] {'\x1F00', '\x1F15'},    /* 1F00-1F15 */
-            new char[] {'\x1F18', '\x1F1D'},    /* 1F18-1F1D */
-            new char[] {'\x1F20', '\x1F45'},    /* 1F20-1F45 */
-            new char[] {'\x1F48', '\x1F4D'},    /* 1F48-1F4D */
-            new char[] {'\x1F50', '\x1F57'},    /* 1F50-1F57 */
-            new char[] {'\x1F59', '\x0000'},    /* 1F59 */
-            new char[] {'\x1F5B', '\x0000'},    /* 1F5B */
-            new char[] {'\x1F5D', '\x0000'},    /* 1F5D */
-            new char[] {'\x1F5F', '\x1F7D'},    /* 1F5F-1F7D */
-            new char[] {'\x1F80', '\x1FB4'},    /* 1F80-1FB4 */
-            new char[] {'\x1FB6', '\x1FBC'},    /* 1FB6-1FBC */
-            new char[] {'\x1FBE', '\x0000'},    /* 1FBE */
-            new char[] {'\x1FC2', '\x1FC4'},    /* 1FC2-1FC4 */
-            new char[] {'\x1FC6', '\x1FCC'},    /* 1FC6-1FCC */
-            new char[] {'\x1FD0', '\x1FD3'},    /* 1FD0-1FD3 */
-            new char[] {'\x1FD6', '\x1FDB'},    /* 1FD6-1FDB */
-            new char[] {'\x1FE0', '\x1FEC'},    /* 1FE0-1FEC */
-            new char[] {'\x1FF2', '\x1FF4'},    /* 1FF2-1FF4 */
-            new char[] {'\x1FF6', '\x1FFC'},    /* 1FF6-1FFC */
-            new char[] {'\x200E', '\x0000'},    /* 200E */
-            new char[] {'\x2071', '\x0000'},    /* 2071 */
-            new char[] {'\x207F', '\x0000'},    /* 207F */
-            new char[] {'\x2102', '\x0000'},    /* 2102 */
-            new char[] {'\x2107', '\x0000'},    /* 2107 */
-            new char[] {'\x210A', '\x2113'},    /* 210A-2113 */
-            new char[] {'\x2115', '\x0000'},    /* 2115 */
-            new char[] {'\x2119', '\x211D'},    /* 2119-211D */
-            new char[] {'\x2124', '\x0000'},    /* 2124 */
-            new char[] {'\x2126', '\x0000'},    /* 2126 */
-            new char[] {'\x2128', '\x0000'},    /* 2128 */
-            new char[] {'\x212A', '\x212D'},    /* 212A-212D */
-            new char[] {'\x212F', '\x2131'},    /* 212F-2131 */
-            new char[] {'\x2133', '\x2139'},    /* 2133-2139 */
-            new char[] {'\x213D', '\x213F'},    /* 213D-213F */
-            new char[] {'\x2145', '\x2149'},    /* 2145-2149 */
-            new char[] {'\x2160', '\x2183'},    /* 2160-2183 */
-            new char[] {'\x2336', '\x237A'},    /* 2336-237A */
-            new char[] {'\x2395', '\x0000'},    /* 2395 */
-            new char[] {'\x249C', '\x24E9'},    /* 249C-24E9 */
-            new char[] {'\x3005', '\x3007'},    /* 3005-3007 */
-            new char[] {'\x3021', '\x3029'},    /* 3021-3029 */
-            new char[] {'\x3031', '\x3035'},    /* 3031-3035 */
-            new char[] {'\x3038', '\x303C'},    /* 3038-303C */
-            new char[] {'\x3041', '\x3096'},    /* 3041-3096 */
-            new char[] {'\x309D', '\x309F'},    /* 309D-309F */
-            new char[] {'\x30A1', '\x30FA'},    /* 30A1-30FA */
-            new char[] {'\x30FC', '\x30FF'},    /* 30FC-30FF */
-            new char[] {'\x3105', '\x312C'},    /* 3105-312C */
-            new char[] {'\x3131', '\x318E'},    /* 3131-318E */
-            new char[] {'\x3190', '\x31B7'},    /* 3190-31B7 */
-            new char[] {'\x31F0', '\x321C'},    /* 31F0-321C */
-            new char[] {'\x3220', '\x3243'},    /* 3220-3243 */
-            new char[] {'\x3260', '\x327B'},    /* 3260-327B */
-            new char[] {'\x327F', '\x32B0'},    /* 327F-32B0 */
-            new char[] {'\x32C0', '\x32CB'},    /* 32C0-32CB */
-            new char[] {'\x32D0', '\x32FE'},    /* 32D0-32FE */
-            new char[] {'\x3300', '\x3376'},    /* 3300-3376 */
-            new char[] {'\x337B', '\x33DD'},    /* 337B-33DD */
-            new char[] {'\x33E0', '\x33FE'},    /* 33E0-33FE */
-            new char[] {'\x3400', '\x4DB5'},    /* 3400-4DB5 */
-            new char[] {'\x4E00', '\x9FA5'},    /* 4E00-9FA5 */
-            new char[] {'\xA000', '\xA48C'},    /* A000-A48C */
-            new char[] {'\xAC00', '\xD7A3'},    /* AC00-D7A3 */
-            new char[] {'\xD800', '\xFA2D'},    /* D800-FA2D */
-            new char[] {'\xFA30', '\xFA6A'},    /* FA30-FA6A */
-            new char[] {'\xFB00', '\xFB06'},    /* FB00-FB06 */
-            new char[] {'\xFB13', '\xFB17'},    /* FB13-FB17 */
-            new char[] {'\xFF21', '\xFF3A'},    /* FF21-FF3A */
-            new char[] {'\xFF41', '\xFF5A'},    /* FF41-FF5A */
-            new char[] {'\xFF66', '\xFFBE'},    /* FF66-FFBE */
-            new char[] {'\xFFC2', '\xFFC7'},    /* FFC2-FFC7 */
-            new char[] {'\xFFCA', '\xFFCF'},    /* FFCA-FFCF */
-            new char[] {'\xFFD2', '\xFFD7'},    /* FFD2-FFD7 */
-            new char[] {'\xFFDA', '\xFFDC'},    /* FFDA-FFDC */
-        };
-
-    }
-}
diff --git a/lib/jabber-net/stringprep/steps/ResourceLoader.cs b/lib/jabber-net/stringprep/steps/ResourceLoader.cs
deleted file mode 100644
index 6dbd8b3..0000000
--- a/lib/jabber-net/stringprep/steps/ResourceLoader.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Resources;
-using System.Reflection;
-
-namespace stringprep.steps
-{
-    class ResourceLoader
-    {
-        private const string RFC3454 = "stringprep.steps.rfc3454";
-        private static ResourceManager m_rfc_res = null;
-
-        private static ResourceManager Resources
-        {
-            get
-            {
-                if (m_rfc_res == null)
-                {
-                    lock (RFC3454)
-                    {
-                        if (m_rfc_res == null)
-                            m_rfc_res = new ResourceManager(RFC3454, Assembly.GetExecutingAssembly());
-                    }
-                }
-                return m_rfc_res;
-            }
-        }
-
-        public static object LoadRes(string name)
-        {
-            return Resources.GetObject(name);
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/unicode/Combining.cs b/lib/jabber-net/stringprep/unicode/Combining.cs
deleted file mode 100644
index 971255d..0000000
--- a/lib/jabber-net/stringprep/unicode/Combining.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Combining classes for Unicode characters.
-    /// </summary>
-    public class Combining
-    {
-        /// <summary>
-        /// What is the combining class for the given character?
-        /// </summary>
-        /// <param name="c">Character to look up</param>
-        /// <returns>Combining class for this character</returns>
-        public static int Class(char c)
-        {
-            int page = c >> 8;
-            if (CombiningData.Pages[page] == 255)
-                return 0;
-            else
-                return CombiningData.Classes[CombiningData.Pages[page], c & 0xff];
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/unicode/CombiningData.cs b/lib/jabber-net/stringprep/unicode/CombiningData.cs
deleted file mode 100644
index 3c89f5f..0000000
--- a/lib/jabber-net/stringprep/unicode/CombiningData.cs
+++ /dev/null
@@ -1,550 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-/* This file is automatically generated.  DO NOT EDIT! */
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Combining class lookup tables.
-    /// </summary>
-    public class CombiningData
-    {
-        /// <summary>
-        /// Combining classes for different pages.  All pages
-        /// unspecified here will return combining class 0.
-        /// </summary>
-        public static readonly byte[,] Classes =  new byte[,]
-        {
-            { /* page 3, index 0 */
-                230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-                230, 230, 230, 230, 230, 230, 230, 232, 220, 220, 220, 220, 232, 216,
-                220, 220, 220, 220, 220, 202, 202, 220, 220, 220, 220, 202, 202, 220,
-                220, 220, 220, 220, 220, 220, 220, 220, 220, 220,   1,   1,   1,   1,   1, 220,
-                220, 220, 220, 230, 230, 230, 230, 230, 230, 230, 230, 240, 230, 220,
-                220, 220, 230, 230, 230, 220, 220,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0, 234, 234, 233, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-                230, 230, 230, 230,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0
-            },
-            { /* page 4, index 1 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 230, 230, 230, 230,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 5, index 2 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0, 220, 230, 230, 230, 230, 220, 230, 230, 230, 222, 220, 230, 230, 230,
-                230, 230, 230,   0, 220, 220, 220, 220, 220, 230, 230, 220, 230, 230, 222,
-                228, 230,  10,  11,  12,  13,  14,  15,  16,  17,  18,  19,   0,  20,  21,  22,   0,  23,
-                  0,  24,  25,   0, 230,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 6, index 3 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,  27,  28,  29,  30,  31,  32,  33,  34, 230, 230, 220,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  35,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0, 230, 230, 230, 230, 230, 230, 230,   0,   0, 230, 230, 230, 230, 220,
-                230,   0,   0, 230, 230,   0, 220, 230, 230, 220,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 7, index 4 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  36,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                230, 220, 230, 230, 220, 230, 230, 220, 220, 220, 230, 220, 220, 230,
-                220, 230, 230, 230, 220, 230, 220, 230, 220, 230, 220, 230, 230,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 9, index 5 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   9,   0,   0,   0, 230, 220, 230, 230,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 10, index 6 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 11, index 7 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 12, index 8 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,  84,  91,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 13, index 9 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 14, index 10 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0, 103, 103,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0, 107, 107, 107, 107,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 118, 118,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 122, 122, 122, 122,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 15, index 11 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                220, 220,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0, 220,   0, 220,   0, 216,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 129, 130,   0,
-                132,   0,   0,   0,   0,   0, 130, 130, 130, 130,   0,   0, 130,   0, 230, 230,   9,   0,
-                230, 230,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 220,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0
-            },
-            { /* page 16, index 12 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   7,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 23, index 13 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   9,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   9,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 24, index 14 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0, 228,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 32, index 15 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 230, 230,   1,   1, 230, 230,
-                230, 230,   1,   1,   1, 230, 230,   0,   0,   0,   0, 230,   0,   0,   0,   1,   1, 230, 220,
-                230,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 48, index 16 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 218, 228, 232, 222,
-                224, 224,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   8,   8,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 251, index 17 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,  26,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 254, index 18 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0, 230, 230, 230, 230,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            }
-        };
-
-        /// <summary>
-        /// Offset into the Classes array for each page, since Classes
-        /// is sparse.
-        /// 255 here means that all of the combining classes for that page
-        /// are 0.
-        /// </summary>
-        public static readonly byte[] Pages = new byte[]
-        {
-            255,
-            255,
-            255,
-            0 /* page 3 */,
-            1 /* page 4 */,
-            2 /* page 5 */,
-            3 /* page 6 */,
-            4 /* page 7 */,
-            255,
-            5 /* page 9 */,
-            6 /* page 10 */,
-            7 /* page 11 */,
-            8 /* page 12 */,
-            9 /* page 13 */,
-            10 /* page 14 */,
-            11 /* page 15 */,
-            12 /* page 16 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            13 /* page 23 */,
-            14 /* page 24 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            15 /* page 32 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            16 /* page 48 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            17 /* page 251 */,
-            255,
-            255,
-            18 /* page 254 */,
-            255        };
-   }
-}
diff --git a/lib/jabber-net/stringprep/unicode/Compose.cs b/lib/jabber-net/stringprep/unicode/Compose.cs
deleted file mode 100644
index 0c45cf7..0000000
--- a/lib/jabber-net/stringprep/unicode/Compose.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Combine combining characters, where possible.
-    /// Note: this is still Black Magic, as far as I can tell.
-    /// </summary>
-    public class Compose
-    {
-        private static int Index(char c)
-        {
-            int p = c >> 8;
-            if (p >= ComposeData.Table.Length)
-                return 0;
-            if (ComposeData.Table[p] == 255)
-                return 0;
-            else
-                return ComposeData.Data[ComposeData.Table[p], c & 0xff];
-        }
-
-        private static bool Between(int x, int start, int end)
-        {
-            return (x >= start) && (x < end);
-        }
-
-        /// <summary>
-        /// Combine two characters together, if possible.
-        /// </summary>
-        /// <param name="a">First character to combine</param>
-        /// <param name="b">Second character to combine</param>
-        /// <param name="result">The combined character, if method returns true.  Otherwise, undefined.</param>
-        /// <returns>True if combination occurred</returns>
-        public static bool Combine(char a, char b, out char result)
-        {
-
-            // FIRST_START..FIRST_SINGLE_START:
-            // FIRST_SINGLE_START..SECOND_START: look up a to see if b matches
-            // SECOND_START..SECOND_SINGLE_START:
-            // SECOND_SINGLE_START..: look up b to see if a matches
-
-            int index_a = Index(a);
-            // for stuff in this range, there is only one possible combination for the character
-            // on the left
-            if (Between(index_a, ComposeData.FIRST_SINGLE_START, ComposeData.SECOND_START))
-            {
-                int offset = index_a - ComposeData.FIRST_SINGLE_START;
-                if (b == ComposeData.FirstSingle[offset, 0])
-                {
-                    result = ComposeData.FirstSingle[offset, 1];
-                    return true;
-                }
-                else
-                {
-                    result = '\x0';
-                    return false;
-                }
-            }
-
-            int index_b = Index(b);
-            // for this range, only one possible combination to the right.
-            if (index_b >= ComposeData.SECOND_SINGLE_START)
-            {
-                int offset = index_b - ComposeData.SECOND_SINGLE_START;
-                if (a == ComposeData.SecondSingle[offset,0])
-                {
-                    result = ComposeData.SecondSingle[offset, 1];
-                    return true;
-                }
-                else
-                {
-                    result = '\x0';
-                    return false;
-                }
-            }
-
-            if (Between(index_a, ComposeData.FIRST_START, ComposeData.FIRST_SINGLE_START) &&
-                Between(index_b, ComposeData.SECOND_START, ComposeData.SECOND_SINGLE_START))
-            {
-                char res = ComposeData.Array[index_a - ComposeData.FIRST_START, index_b - ComposeData.SECOND_START];
-
-                if (res != '\x0')
-                {
-                    result = res;
-                    return true;
-                }
-            }
-
-            result = '\x0';
-            return false;
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/unicode/ComposeData.cs b/lib/jabber-net/stringprep/unicode/ComposeData.cs
deleted file mode 100644
index 2b6997d..0000000
--- a/lib/jabber-net/stringprep/unicode/ComposeData.cs
+++ /dev/null
@@ -1,729 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-/* This file is automatically generated.  DO NOT EDIT! */
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Data for composition of characters.  The algorithms here are still black box to me.
-    /// </summary>
-    public class ComposeData
-    {
-
-        /// <summary>
-        /// Where the first range of offsets from Data starts.
-        /// These are used for checking the first character
-        /// in a pair with a second character in Array.
-        /// </summary>
-        public const short FIRST_START = 1;
-        /// <summary>
-        /// Where the offsets of the range of characters where there is
-        /// only one match for the second character, with a given first character.
-        /// </summary>
-        public const short FIRST_SINGLE_START = 147;
-        /// <summary>
-        /// Where the offsets of the range of second characters that match a given first
-        /// character starts.
-        /// </summary>
-        public const short SECOND_START = 357;
-        /// <summary>
-        /// When there is only a single match to the left for these characters on the
-        /// right, the offsets for that chunk of characters starts here.
-        /// </summary>
-        public const short SECOND_SINGLE_START = 388;
-
-        /// <summary>
-        /// The offset into Array for each character.  This array is compressed using
-        /// the Table table, which provides page offsets for the pages that are non-zero.
-        /// </summary>
-        public static readonly short[,] Data = new short[,]
-        {
-            { /* page 0, index 0 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 147, 148, 149,   0,   0,   1,   2,   3,   4,   5,
-                150,   6,   7,   8, 151,   9,  10,  11,  12,  13,  14,   0,  15,  16,  17,  18,  19,  20,  21,
-                 22,  23,   0,   0,   0,   0,   0,   0,  24,  25,  26,  27,  28, 152,  29,  30,  31,  32,  33,
-                 34,  35,  36,  37,  38,   0,  39,  40,  41,  42,  43,  44,  45,  46,  47,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  48,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  49,   0, 153, 154,
-                 50, 155,   0,   0,  51,   0,   0,   0,   0, 156,   0,   0,   0,   0,  52,  53, 157,   0, 158,   0,
-                  0,   0,  54,   0,   0,   0,   0,   0,  55,   0, 159, 160,  56, 161,   0,   0,  57,   0,   0,   0,   0,
-                162,   0,   0,   0,   0,  58,  59, 163,   0, 164,   0,   0,   0,  60,   0,   0,   0
-            },
-            { /* page 1, index 1 */
-                  0,   0,  61,  62,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  63,  64,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,  65,  66,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 165, 166,   0,
-                  0,   0,   0, 167, 168,   0,   0,   0,   0,   0,   0, 169, 170, 171, 172,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 173,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  67,
-                 68,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  69,  70,   0,   0,   0,   0,   0,   0, 174,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0, 175, 176,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0
-            },
-            { /* page 2, index 2 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 177, 178, 179, 180,   0,   0,   0,   0,
-                181, 182,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0, 183,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 3, index 3 */
-                357, 358, 359, 360, 361,   0, 362, 363, 364, 365, 366, 367, 368,   0,   0, 369,
-                  0, 370,   0, 371, 372,   0,   0,   0,   0,   0,   0, 373,   0,   0,   0,   0,   0,   0,   0, 374,
-                375, 376, 377, 378, 379,   0,   0,   0,   0, 380, 381,   0, 382, 383,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 384,   0,   0, 385,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  71,   0,   0,   0,
-                 72,   0,  73,   0,  74,   0,   0,   0,   0,   0,  75,   0, 184,   0,   0,   0,  76,   0,   0,   0,  77,   0,
-                  0, 185,   0, 186,   0,   0,  78,   0,   0,   0,  79,   0,  80,   0,  81,   0,   0,   0,   0,   0,  82,
-                  0,  83,   0,   0,   0,  84,   0,   0,   0,  85,  86,  87,   0,   0, 187,   0,   0,   0,  88,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 4, index 4 */
-                  0,   0,   0,   0,   0,   0, 188,   0,   0,   0,   0,   0,   0,   0,   0,   0,  89,   0,   0, 189,   0,  90,
-                 91, 190,  92,   0, 191,   0,   0,   0, 192,   0,   0,   0,   0,  93,   0,   0,   0, 193,   0,   0,   0,
-                194,   0, 195,   0,   0,  94,   0,   0, 196,   0,  95,  96, 197,  97,   0, 198,   0,   0,   0,
-                199,   0,   0,   0,   0,  98,   0,   0,   0, 200,   0,   0,   0, 201,   0, 202,   0,   0,   0,   0,   0,
-                  0,   0,   0, 203,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0, 204, 205,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 206, 207,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0, 208, 209,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 6, index 5 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,  99,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                210,   0, 211,   0,   0,   0,   0,   0,   0,   0,   0, 388, 389, 390,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0, 212,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 213,   0,
-                  0, 214,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 9, index 6 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 215,   0,   0,   0,   0,   0,   0,   0,
-                216,   0,   0, 217,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 391,
-                  0,   0,   0,   0,   0,   0,   0,   0, 100,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                392,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 11, index 7 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 393,   0,   0,   0,   0,   0,   0,   0,   0,
-                101,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 394, 395,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0, 218,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0, 396,   0,   0,   0,   0,   0,   0,   0, 102, 219,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0, 397,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 12, index 8 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 220,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 221,
-                  0,   0, 398,   0,   0,   0, 103,   0,   0,   0, 222,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 399,
-                400,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 13, index 9 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 401,   0,   0,   0,   0,   0,   0,   0, 104,
-                223,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 402,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 403,   0,   0,   0,   0, 404,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0, 105,   0,   0, 224,   0,   0, 405,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 16, index 10 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 225,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 30, index 11 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0, 226, 227,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 228, 229,   0,   0,
-                  0,   0,   0,   0, 230, 231,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 106, 107,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 232, 233,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 234, 235,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 31, index 12 */
-                108, 109, 236, 237, 238, 239, 240, 241, 110, 111, 242, 243, 244, 245,
-                246, 247, 112, 113,   0,   0,   0,   0,   0,   0, 114, 115,   0,   0,   0,   0,   0,   0, 116,
-                117, 248, 249, 250, 251, 252, 253, 118, 119, 254, 255, 256, 257, 258,
-                259, 120, 121,   0,   0,   0,   0,   0,   0, 122, 123,   0,   0,   0,   0,   0,   0, 124, 125,   0,
-                  0,   0,   0,   0,   0, 126, 127,   0,   0,   0,   0,   0,   0, 128, 129,   0,   0,   0,   0,   0,   0,   0,
-                130,   0,   0,   0,   0,   0,   0, 131, 132, 260, 261, 262, 263, 264, 265, 133, 134,
-                266, 267, 268, 269, 270, 271, 272,   0,   0,   0, 273,   0,   0,   0,   0,   0,   0,   0,
-                274,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 275,   0,   0,   0,   0,   0,   0,   0,   0, 135,   0,   0,   0,
-                  0,   0,   0, 276,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0, 277,   0,   0,   0,   0,   0,   0,   0, 136,   0
-            },
-            { /* page 33, index 13 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                278,   0, 279,   0, 280,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 281,   0, 282,   0,
-                283,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 34, index 14 */
-                  0,   0,   0, 284,   0,   0,   0,   0, 285,   0,   0, 286,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 287,   0, 288,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 289,   0,   0,   0,   0,   0,   0, 290,
-                  0, 291,   0,   0, 292,   0,   0,   0,   0, 293,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0, 294,   0,   0, 295, 296,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0, 297, 298,   0,   0, 299, 300,   0,   0, 301, 302, 303, 304,   0,   0,   0,   0,
-                305, 306,   0,   0, 307, 308,   0,   0,   0,   0,   0,   0,   0,   0,   0, 309, 310,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 311,   0,   0,   0,   0,   0, 312, 313,   0, 314,
-                  0,   0,   0,   0,   0,   0, 315, 316, 317, 318,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
-            },
-            { /* page 48, index 15 */
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 319,   0,
-                  0,   0,   0, 320,   0, 321,   0, 322,   0, 323,   0, 324,   0, 325,   0, 326,   0, 327,   0,
-                328,   0, 329,   0, 330,   0, 331,   0,   0, 332,   0, 333,   0, 334,   0,   0,   0,   0,   0,   0,
-                137,   0,   0, 138,   0,   0, 139,   0,   0, 140,   0,   0, 141,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 386, 387,
-                  0,   0, 335,   0,   0,   0,   0,   0,   0,   0,   0, 336,   0,   0,   0,   0, 337,   0, 338,   0, 339,
-                  0, 340,   0, 341,   0, 342,   0, 343,   0, 344,   0, 345,   0, 346,   0, 347,   0, 348,
-                  0,   0, 349,   0, 350,   0, 351,   0,   0,   0,   0,   0,   0, 142,   0,   0, 143,   0,   0, 144,
-                  0,   0, 145,   0,   0, 146,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
-                  0,   0, 352, 353, 354, 355,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 356,   0,   0
-            }
-        };
-
-        /// <summary>
-        /// Page offsets into Data for each page of characters.
-        /// </summary>
-        public static readonly byte[] Table = new byte[]
-        {
-            0 /* page 0 */,
-            1 /* page 1 */,
-            2 /* page 2 */,
-            3 /* page 3 */,
-            4 /* page 4 */,
-            255,
-            5 /* page 6 */,
-            255,
-            255,
-            6 /* page 9 */,
-            255,
-            7 /* page 11 */,
-            8 /* page 12 */,
-            9 /* page 13 */,
-            255,
-            255,
-            10 /* page 16 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            11 /* page 30 */,
-            12 /* page 31 */,
-            255,
-            13 /* page 33 */,
-            14 /* page 34 */,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            255,
-            15 /* page 48 */
-        };
-
-        /// <summary>
-        /// When the offset for the  first character is in the range
-        /// [FIRST_SINGLE_START, SECOND_START), look up the corresponding
-        /// character here with the offset from Data to see if it is
-        /// the second character.  If not, there is no combination.
-        /// </summary>
-        public static readonly char[,] FirstSingle = new char[,]
-        {
-            {'\x0338', '\x226e'},
-            {'\x0338', '\x2260'},
-            {'\x0338', '\x226f'},
-            {'\x0307', '\x1e1e'},
-            {'\x0302', '\x0134'},
-            {'\x0307', '\x1e1f'},
-            {'\x0304', '\x01de'},
-            {'\x0301', '\x01fa'},
-            {'\x0301', '\x1e08'},
-            {'\x0301', '\x1e2e'},
-            {'\x0304', '\x022a'},
-            {'\x0301', '\x01fe'},
-            {'\x0304', '\x01df'},
-            {'\x0301', '\x01fb'},
-            {'\x0301', '\x1e09'},
-            {'\x0301', '\x1e2f'},
-            {'\x0304', '\x022b'},
-            {'\x0301', '\x01ff'},
-            {'\x0307', '\x1e64'},
-            {'\x0307', '\x1e65'},
-            {'\x0307', '\x1e66'},
-            {'\x0307', '\x1e67'},
-            {'\x0301', '\x1e78'},
-            {'\x0301', '\x1e79'},
-            {'\x0308', '\x1e7a'},
-            {'\x0308', '\x1e7b'},
-            {'\x0307', '\x1e9b'},
-            {'\x030c', '\x01ee'},
-            {'\x0304', '\x01ec'},
-            {'\x0304', '\x01ed'},
-            {'\x0304', '\x01e0'},
-            {'\x0304', '\x01e1'},
-            {'\x0306', '\x1e1c'},
-            {'\x0306', '\x1e1d'},
-            {'\x0304', '\x0230'},
-            {'\x0304', '\x0231'},
-            {'\x030c', '\x01ef'},
-            {'\x0314', '\x1fec'},
-            {'\x0345', '\x1fb4'},
-            {'\x0345', '\x1fc4'},
-            {'\x0345', '\x1ff4'},
-            {'\x0308', '\x0407'},
-            {'\x0301', '\x0403'},
-            {'\x0308', '\x04de'},
-            {'\x0301', '\x040c'},
-            {'\x0308', '\x04e6'},
-            {'\x0308', '\x04f4'},
-            {'\x0308', '\x04f8'},
-            {'\x0308', '\x04ec'},
-            {'\x0301', '\x0453'},
-            {'\x0308', '\x04df'},
-            {'\x0301', '\x045c'},
-            {'\x0308', '\x04e7'},
-            {'\x0308', '\x04f5'},
-            {'\x0308', '\x04f9'},
-            {'\x0308', '\x04ed'},
-            {'\x0308', '\x0457'},
-            {'\x030f', '\x0476'},
-            {'\x030f', '\x0477'},
-            {'\x0308', '\x04da'},
-            {'\x0308', '\x04db'},
-            {'\x0308', '\x04ea'},
-            {'\x0308', '\x04eb'},
-            {'\x0654', '\x0624'},
-            {'\x0654', '\x0626'},
-            {'\x0654', '\x06c2'},
-            {'\x0654', '\x06d3'},
-            {'\x0654', '\x06c0'},
-            {'\x093c', '\x0929'},
-            {'\x093c', '\x0931'},
-            {'\x093c', '\x0934'},
-            {'\x0bd7', '\x0b94'},
-            {'\x0bbe', '\x0bcb'},
-            {'\x0c56', '\x0c48'},
-            {'\x0cd5', '\x0cc0'},
-            {'\x0cd5', '\x0ccb'},
-            {'\x0d3e', '\x0d4b'},
-            {'\x0dca', '\x0ddd'},
-            {'\x102e', '\x1026'},
-            {'\x0304', '\x1e38'},
-            {'\x0304', '\x1e39'},
-            {'\x0304', '\x1e5c'},
-            {'\x0304', '\x1e5d'},
-            {'\x0307', '\x1e68'},
-            {'\x0307', '\x1e69'},
-            {'\x0302', '\x1ec6'},
-            {'\x0302', '\x1ec7'},
-            {'\x0302', '\x1ed8'},
-            {'\x0302', '\x1ed9'},
-            {'\x0345', '\x1f82'},
-            {'\x0345', '\x1f83'},
-            {'\x0345', '\x1f84'},
-            {'\x0345', '\x1f85'},
-            {'\x0345', '\x1f86'},
-            {'\x0345', '\x1f87'},
-            {'\x0345', '\x1f8a'},
-            {'\x0345', '\x1f8b'},
-            {'\x0345', '\x1f8c'},
-            {'\x0345', '\x1f8d'},
-            {'\x0345', '\x1f8e'},
-            {'\x0345', '\x1f8f'},
-            {'\x0345', '\x1f92'},
-            {'\x0345', '\x1f93'},
-            {'\x0345', '\x1f94'},
-            {'\x0345', '\x1f95'},
-            {'\x0345', '\x1f96'},
-            {'\x0345', '\x1f97'},
-            {'\x0345', '\x1f9a'},
-            {'\x0345', '\x1f9b'},
-            {'\x0345', '\x1f9c'},
-            {'\x0345', '\x1f9d'},
-            {'\x0345', '\x1f9e'},
-            {'\x0345', '\x1f9f'},
-            {'\x0345', '\x1fa2'},
-            {'\x0345', '\x1fa3'},
-            {'\x0345', '\x1fa4'},
-            {'\x0345', '\x1fa5'},
-            {'\x0345', '\x1fa6'},
-            {'\x0345', '\x1fa7'},
-            {'\x0345', '\x1faa'},
-            {'\x0345', '\x1fab'},
-            {'\x0345', '\x1fac'},
-            {'\x0345', '\x1fad'},
-            {'\x0345', '\x1fae'},
-            {'\x0345', '\x1faf'},
-            {'\x0345', '\x1fb2'},
-            {'\x0345', '\x1fc2'},
-            {'\x0345', '\x1ff2'},
-            {'\x0345', '\x1fb7'},
-            {'\x0345', '\x1fc7'},
-            {'\x0345', '\x1ff7'},
-            {'\x0338', '\x219a'},
-            {'\x0338', '\x219b'},
-            {'\x0338', '\x21ae'},
-            {'\x0338', '\x21cd'},
-            {'\x0338', '\x21cf'},
-            {'\x0338', '\x21ce'},
-            {'\x0338', '\x2204'},
-            {'\x0338', '\x2209'},
-            {'\x0338', '\x220c'},
-            {'\x0338', '\x2224'},
-            {'\x0338', '\x2226'},
-            {'\x0338', '\x2241'},
-            {'\x0338', '\x2244'},
-            {'\x0338', '\x2247'},
-            {'\x0338', '\x2249'},
-            {'\x0338', '\x226d'},
-            {'\x0338', '\x2262'},
-            {'\x0338', '\x2270'},
-            {'\x0338', '\x2271'},
-            {'\x0338', '\x2274'},
-            {'\x0338', '\x2275'},
-            {'\x0338', '\x2278'},
-            {'\x0338', '\x2279'},
-            {'\x0338', '\x2280'},
-            {'\x0338', '\x2281'},
-            {'\x0338', '\x22e0'},
-            {'\x0338', '\x22e1'},
-            {'\x0338', '\x2284'},
-            {'\x0338', '\x2285'},
-            {'\x0338', '\x2288'},
-            {'\x0338', '\x2289'},
-            {'\x0338', '\x22e2'},
-            {'\x0338', '\x22e3'},
-            {'\x0338', '\x22ac'},
-            {'\x0338', '\x22ad'},
-            {'\x0338', '\x22ae'},
-            {'\x0338', '\x22af'},
-            {'\x0338', '\x22ea'},
-            {'\x0338', '\x22eb'},
-            {'\x0338', '\x22ec'},
-            {'\x0338', '\x22ed'},
-            {'\x3099', '\x3094'},
-            {'\x3099', '\x304c'},
-            {'\x3099', '\x304e'},
-            {'\x3099', '\x3050'},
-            {'\x3099', '\x3052'},
-            {'\x3099', '\x3054'},
-            {'\x3099', '\x3056'},
-            {'\x3099', '\x3058'},
-            {'\x3099', '\x305a'},
-            {'\x3099', '\x305c'},
-            {'\x3099', '\x305e'},
-            {'\x3099', '\x3060'},
-            {'\x3099', '\x3062'},
-            {'\x3099', '\x3065'},
-            {'\x3099', '\x3067'},
-            {'\x3099', '\x3069'},
-            {'\x3099', '\x309e'},
-            {'\x3099', '\x30f4'},
-            {'\x3099', '\x30ac'},
-            {'\x3099', '\x30ae'},
-            {'\x3099', '\x30b0'},
-            {'\x3099', '\x30b2'},
-            {'\x3099', '\x30b4'},
-            {'\x3099', '\x30b6'},
-            {'\x3099', '\x30b8'},
-            {'\x3099', '\x30ba'},
-            {'\x3099', '\x30bc'},
-            {'\x3099', '\x30be'},
-            {'\x3099', '\x30c0'},
-            {'\x3099', '\x30c2'},
-            {'\x3099', '\x30c5'},
-            {'\x3099', '\x30c7'},
-            {'\x3099', '\x30c9'},
-            {'\x3099', '\x30f7'},
-            {'\x3099', '\x30f8'},
-            {'\x3099', '\x30f9'},
-            {'\x3099', '\x30fa'},
-            {'\x3099', '\x30fe'}
-        };
-
-        /// <summary>
-        /// When the offset for the second character is in the range
-        /// [SECOND_SINGLE_START...), look up the corresponding
-        /// character here with the offset from Data to see if it is
-        /// the first character.  If not, there is no combination.
-        /// </summary>
-        public static readonly char[,] SecondSingle = new char[,]
-        {
-            {'\x0627', '\x0622'},
-            {'\x0627', '\x0623'},
-            {'\x0627', '\x0625'},
-            {'\x09c7', '\x09cb'},
-            {'\x09c7', '\x09cc'},
-            {'\x0b47', '\x0b4b'},
-            {'\x0b47', '\x0b48'},
-            {'\x0b47', '\x0b4c'},
-            {'\x0bc6', '\x0bca'},
-            {'\x0bc6', '\x0bcc'},
-            {'\x0cc6', '\x0cca'},
-            {'\x0cc6', '\x0cc7'},
-            {'\x0cc6', '\x0cc8'},
-            {'\x0d46', '\x0d4a'},
-            {'\x0d46', '\x0d4c'},
-            {'\x0dd9', '\x0dda'},
-            {'\x0dd9', '\x0ddc'},
-            {'\x0dd9', '\x0dde'}
-        };
-
-        /// <summary>
-        /// Array of composition pairs, indexed by offset (from Data) of first
-        /// character, and offset of second character.
-        /// </summary>
-        public static readonly char[,] Array = new char[,]
-        {
-            {'\x00c0', '\x00c1', '\x00c2', '\x00c3', '\x0100', '\x0102', '\x0226', '\x00c4', '\x1ea2', '\x00c5', '\x0000', '\x01cd', '\x0200', '\x0202', '\x0000', '\x0000', '\x0000', '\x1ea0', '\x0000', '\x1e00', '\x0000', '\x0000', '\x0104', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e02', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e04', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e06', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0106', '\x0108', '\x0000', '\x0000', '\x0000', '\x010a', '\x0000', '\x0000', '\x0000', '\x0000', '\x010c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x00c7', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e0a', '\x0000', '\x0000', '\x0000', '\x0000', '\x010e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e0c', '\x0000', '\x0000', '\x0000', '\x1e10', '\x0000', '\x1e12', '\x0000', '\x0000', '\x1e0e', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00c8', '\x00c9', '\x00ca', '\x1ebc', '\x0112', '\x0114', '\x0116', '\x00cb', '\x1eba', '\x0000', '\x0000', '\x011a', '\x0204', '\x0206', '\x0000', '\x0000', '\x0000', '\x1eb8', '\x0000', '\x0000', '\x0000', '\x0228', '\x0118', '\x1e18', '\x0000', '\x1e1a', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x01f4', '\x011c', '\x0000', '\x1e20', '\x011e', '\x0120', '\x0000', '\x0000', '\x0000', '\x0000', '\x01e6', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0122', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0124', '\x0000', '\x0000', '\x0000', '\x1e22', '\x1e26', '\x0000', '\x0000', '\x0000', '\x021e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e24', '\x0000', '\x0000', '\x0000', '\x1e28', '\x0000', '\x0000', '\x1e2a', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00cc', '\x00cd', '\x00ce', '\x0128', '\x012a', '\x012c', '\x0130', '\x00cf', '\x1ec8', '\x0000', '\x0000', '\x01cf', '\x0208', '\x020a', '\x0000', '\x0000', '\x0000', '\x1eca', '\x0000', '\x0000', '\x0000', '\x0000', '\x012e', '\x0000', '\x0000', '\x1e2c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e30', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x01e8', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e32', '\x0000', '\x0000', '\x0000', '\x0136', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e34', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0139', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x013d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e36', '\x0000', '\x0000', '\x0000', '\x013b', '\x0000', '\x1e3c', '\x0000', '\x0000', '\x1e3a', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e3e', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e40', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e42', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x01f8', '\x0143', '\x0000', '\x00d1', '\x0000', '\x0000', '\x1e44', '\x0000', '\x0000', '\x0000', '\x0000', '\x0147', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e46', '\x0000', '\x0000', '\x0000', '\x0145', '\x0000', '\x1e4a', '\x0000', '\x0000', '\x1e48', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00d2', '\x00d3', '\x00d4', '\x00d5', '\x014c', '\x014e', '\x022e', '\x00d6', '\x1ece', '\x0000', '\x0150', '\x01d1', '\x020c', '\x020e', '\x0000', '\x0000', '\x01a0', '\x1ecc', '\x0000', '\x0000', '\x0000', '\x0000', '\x01ea', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e54', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e56', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0154', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e58', '\x0000', '\x0000', '\x0000', '\x0000', '\x0158', '\x0210', '\x0212', '\x0000', '\x0000', '\x0000', '\x1e5a', '\x0000', '\x0000', '\x0000', '\x0156', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e5e', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x015a', '\x015c', '\x0000', '\x0000', '\x0000', '\x1e60', '\x0000', '\x0000', '\x0000', '\x0000', '\x0160', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e62', '\x0000', '\x0000', '\x0218', '\x015e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e6a', '\x0000', '\x0000', '\x0000', '\x0000', '\x0164', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e6c', '\x0000', '\x0000', '\x021a', '\x0162', '\x0000', '\x1e70', '\x0000', '\x0000', '\x1e6e', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00d9', '\x00da', '\x00db', '\x0168', '\x016a', '\x016c', '\x0000', '\x00dc', '\x1ee6', '\x016e', '\x0170', '\x01d3', '\x0214', '\x0216', '\x0000', '\x0000', '\x01af', '\x1ee4', '\x1e72', '\x0000', '\x0000', '\x0000', '\x0172', '\x1e76', '\x0000', '\x1e74', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x1e7c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e7e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e80', '\x1e82', '\x0174', '\x0000', '\x0000', '\x0000', '\x1e86', '\x1e84', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e88', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e8a', '\x1e8c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ef2', '\x00dd', '\x0176', '\x1ef8', '\x0232', '\x0000', '\x1e8e', '\x0178', '\x1ef6', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ef4', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0179', '\x1e90', '\x0000', '\x0000', '\x0000', '\x017b', '\x0000', '\x0000', '\x0000', '\x0000', '\x017d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e92', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e94', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00e0', '\x00e1', '\x00e2', '\x00e3', '\x0101', '\x0103', '\x0227', '\x00e4', '\x1ea3', '\x00e5', '\x0000', '\x01ce', '\x0201', '\x0203', '\x0000', '\x0000', '\x0000', '\x1ea1', '\x0000', '\x1e01', '\x0000', '\x0000', '\x0105', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e03', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e05', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e07', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0107', '\x0109', '\x0000', '\x0000', '\x0000', '\x010b', '\x0000', '\x0000', '\x0000', '\x0000', '\x010d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x00e7', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e0b', '\x0000', '\x0000', '\x0000', '\x0000', '\x010f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e0d', '\x0000', '\x0000', '\x0000', '\x1e11', '\x0000', '\x1e13', '\x0000', '\x0000', '\x1e0f', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00e8', '\x00e9', '\x00ea', '\x1ebd', '\x0113', '\x0115', '\x0117', '\x00eb', '\x1ebb', '\x0000', '\x0000', '\x011b', '\x0205', '\x0207', '\x0000', '\x0000', '\x0000', '\x1eb9', '\x0000', '\x0000', '\x0000', '\x0229', '\x0119', '\x1e19', '\x0000', '\x1e1b', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x01f5', '\x011d', '\x0000', '\x1e21', '\x011f', '\x0121', '\x0000', '\x0000', '\x0000', '\x0000', '\x01e7', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0123', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0125', '\x0000', '\x0000', '\x0000', '\x1e23', '\x1e27', '\x0000', '\x0000', '\x0000', '\x021f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e25', '\x0000', '\x0000', '\x0000', '\x1e29', '\x0000', '\x0000', '\x1e2b', '\x0000', '\x1e96', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00ec', '\x00ed', '\x00ee', '\x0129', '\x012b', '\x012d', '\x0000', '\x00ef', '\x1ec9', '\x0000', '\x0000', '\x01d0', '\x0209', '\x020b', '\x0000', '\x0000', '\x0000', '\x1ecb', '\x0000', '\x0000', '\x0000', '\x0000', '\x012f', '\x0000', '\x0000', '\x1e2d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0135', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x01f0', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e31', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x01e9', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e33', '\x0000', '\x0000', '\x0000', '\x0137', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e35', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x013a', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x013e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e37', '\x0000', '\x0000', '\x0000', '\x013c', '\x0000', '\x1e3d', '\x0000', '\x0000', '\x1e3b', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e3f', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e41', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e43', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x01f9', '\x0144', '\x0000', '\x00f1', '\x0000', '\x0000', '\x1e45', '\x0000', '\x0000', '\x0000', '\x0000', '\x0148', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e47', '\x0000', '\x0000', '\x0000', '\x0146', '\x0000', '\x1e4b', '\x0000', '\x0000', '\x1e49', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00f2', '\x00f3', '\x00f4', '\x00f5', '\x014d', '\x014f', '\x022f', '\x00f6', '\x1ecf', '\x0000', '\x0151', '\x01d2', '\x020d', '\x020f', '\x0000', '\x0000', '\x01a1', '\x1ecd', '\x0000', '\x0000', '\x0000', '\x0000', '\x01eb', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e55', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e57', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0155', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e59', '\x0000', '\x0000', '\x0000', '\x0000', '\x0159', '\x0211', '\x0213', '\x0000', '\x0000', '\x0000', '\x1e5b', '\x0000', '\x0000', '\x0000', '\x0157', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e5f', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x015b', '\x015d', '\x0000', '\x0000', '\x0000', '\x1e61', '\x0000', '\x0000', '\x0000', '\x0000', '\x0161', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e63', '\x0000', '\x0000', '\x0219', '\x015f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e6b', '\x1e97', '\x0000', '\x0000', '\x0000', '\x0165', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e6d', '\x0000', '\x0000', '\x021b', '\x0163', '\x0000', '\x1e71', '\x0000', '\x0000', '\x1e6f', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x00f9', '\x00fa', '\x00fb', '\x0169', '\x016b', '\x016d', '\x0000', '\x00fc', '\x1ee7', '\x016f', '\x0171', '\x01d4', '\x0215', '\x0217', '\x0000', '\x0000', '\x01b0', '\x1ee5', '\x1e73', '\x0000', '\x0000', '\x0000', '\x0173', '\x1e77', '\x0000', '\x1e75', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x1e7d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e7f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e81', '\x1e83', '\x0175', '\x0000', '\x0000', '\x0000', '\x1e87', '\x1e85', '\x0000', '\x1e98', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e89', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e8b', '\x1e8d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ef3', '\x00fd', '\x0177', '\x1ef9', '\x0233', '\x0000', '\x1e8f', '\x00ff', '\x1ef7', '\x1e99', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ef5', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x017a', '\x1e91', '\x0000', '\x0000', '\x0000', '\x017c', '\x0000', '\x0000', '\x0000', '\x0000', '\x017e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e93', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1e95', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1fed', '\x0385', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fc1', '\x0000', '\x0000', '\x0000'},
-            {'\x1ea6', '\x1ea4', '\x0000', '\x1eaa', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ea8', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x01fc', '\x0000', '\x0000', '\x01e2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ec0', '\x1ebe', '\x0000', '\x1ec4', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ec2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ed2', '\x1ed0', '\x0000', '\x1ed6', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ed4', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e4c', '\x0000', '\x0000', '\x022c', '\x0000', '\x0000', '\x1e4e', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x01db', '\x01d7', '\x0000', '\x0000', '\x01d5', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x01d9', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ea7', '\x1ea5', '\x0000', '\x1eab', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ea9', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x01fd', '\x0000', '\x0000', '\x01e3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ec1', '\x1ebf', '\x0000', '\x1ec5', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ec3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ed3', '\x1ed1', '\x0000', '\x1ed7', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ed5', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x1e4d', '\x0000', '\x0000', '\x022d', '\x0000', '\x0000', '\x1e4f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x01dc', '\x01d8', '\x0000', '\x0000', '\x01d6', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x01da', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1eb0', '\x1eae', '\x0000', '\x1eb4', '\x0000', '\x0000', '\x0000', '\x0000', '\x1eb2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1eb1', '\x1eaf', '\x0000', '\x1eb5', '\x0000', '\x0000', '\x0000', '\x0000', '\x1eb3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e14', '\x1e16', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e15', '\x1e17', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e50', '\x1e52', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1e51', '\x1e53', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1edc', '\x1eda', '\x0000', '\x1ee0', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ede', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ee2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1edd', '\x1edb', '\x0000', '\x1ee1', '\x0000', '\x0000', '\x0000', '\x0000', '\x1edf', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ee3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1eea', '\x1ee8', '\x0000', '\x1eee', '\x0000', '\x0000', '\x0000', '\x0000', '\x1eec', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ef0', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1eeb', '\x1ee9', '\x0000', '\x1eef', '\x0000', '\x0000', '\x0000', '\x0000', '\x1eed', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ef1', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1fba', '\x0386', '\x0000', '\x0000', '\x1fb9', '\x1fb8', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f08', '\x1f09', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fbc', '\x0000', '\x0000'},
-            {'\x1fc8', '\x0388', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f18', '\x1f19', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1fca', '\x0389', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f28', '\x1f29', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fcc', '\x0000', '\x0000'},
-            {'\x1fda', '\x038a', '\x0000', '\x0000', '\x1fd9', '\x1fd8', '\x0000', '\x03aa', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f38', '\x1f39', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ff8', '\x038c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f48', '\x1f49', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1fea', '\x038e', '\x0000', '\x0000', '\x1fe9', '\x1fe8', '\x0000', '\x03ab', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f59', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1ffa', '\x038f', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f68', '\x1f69', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ffc', '\x0000', '\x0000'},
-            {'\x1f70', '\x03ac', '\x0000', '\x0000', '\x1fb1', '\x1fb0', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f00', '\x1f01', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fb6', '\x1fb3', '\x0000', '\x0000'},
-            {'\x1f72', '\x03ad', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f10', '\x1f11', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f74', '\x03ae', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f20', '\x1f21', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fc6', '\x1fc3', '\x0000', '\x0000'},
-            {'\x1f76', '\x03af', '\x0000', '\x0000', '\x1fd1', '\x1fd0', '\x0000', '\x03ca', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f30', '\x1f31', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fd6', '\x0000', '\x0000', '\x0000'},
-            {'\x1f78', '\x03cc', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f40', '\x1f41', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fe4', '\x1fe5', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f7a', '\x03cd', '\x0000', '\x0000', '\x1fe1', '\x1fe0', '\x0000', '\x03cb', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f50', '\x1f51', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fe6', '\x0000', '\x0000', '\x0000'},
-            {'\x1f7c', '\x03ce', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f60', '\x1f61', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1ff6', '\x1ff3', '\x0000', '\x0000'},
-            {'\x1fd2', '\x0390', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fd7', '\x0000', '\x0000', '\x0000'},
-            {'\x1fe2', '\x03b0', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fe7', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x03d3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x03d4', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x04d0', '\x0000', '\x04d2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0400', '\x0000', '\x0000', '\x0000', '\x0000', '\x04d6', '\x0000', '\x0401', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x04c1', '\x0000', '\x04dc', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x040d', '\x0000', '\x0000', '\x0000', '\x04e2', '\x0419', '\x0000', '\x04e4', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x04ee', '\x040e', '\x0000', '\x04f0', '\x0000', '\x0000', '\x04f2', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x04d1', '\x0000', '\x04d3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0450', '\x0000', '\x0000', '\x0000', '\x0000', '\x04d7', '\x0000', '\x0451', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x04c2', '\x0000', '\x04dd', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x045d', '\x0000', '\x0000', '\x0000', '\x04e3', '\x0439', '\x0000', '\x04e5', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x04ef', '\x045e', '\x0000', '\x04f1', '\x0000', '\x0000', '\x04f3', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x1eac', '\x0000', '\x0000', '\x1eb6', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x1ead', '\x0000', '\x0000', '\x1eb7', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f02', '\x1f04', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f06', '\x1f80', '\x0000', '\x0000'},
-            {'\x1f03', '\x1f05', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f07', '\x1f81', '\x0000', '\x0000'},
-            {'\x1f0a', '\x1f0c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f0e', '\x1f88', '\x0000', '\x0000'},
-            {'\x1f0b', '\x1f0d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f0f', '\x1f89', '\x0000', '\x0000'},
-            {'\x1f12', '\x1f14', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f13', '\x1f15', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f1a', '\x1f1c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f1b', '\x1f1d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f22', '\x1f24', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f26', '\x1f90', '\x0000', '\x0000'},
-            {'\x1f23', '\x1f25', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f27', '\x1f91', '\x0000', '\x0000'},
-            {'\x1f2a', '\x1f2c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f2e', '\x1f98', '\x0000', '\x0000'},
-            {'\x1f2b', '\x1f2d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f2f', '\x1f99', '\x0000', '\x0000'},
-            {'\x1f32', '\x1f34', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f36', '\x0000', '\x0000', '\x0000'},
-            {'\x1f33', '\x1f35', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f37', '\x0000', '\x0000', '\x0000'},
-            {'\x1f3a', '\x1f3c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f3e', '\x0000', '\x0000', '\x0000'},
-            {'\x1f3b', '\x1f3d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f3f', '\x0000', '\x0000', '\x0000'},
-            {'\x1f42', '\x1f44', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f43', '\x1f45', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f4a', '\x1f4c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f4b', '\x1f4d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000'},
-            {'\x1f52', '\x1f54', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f56', '\x0000', '\x0000', '\x0000'},
-            {'\x1f53', '\x1f55', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f57', '\x0000', '\x0000', '\x0000'},
-            {'\x1f5b', '\x1f5d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f5f', '\x0000', '\x0000', '\x0000'},
-            {'\x1f62', '\x1f64', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f66', '\x1fa0', '\x0000', '\x0000'},
-            {'\x1f63', '\x1f65', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f67', '\x1fa1', '\x0000', '\x0000'},
-            {'\x1f6a', '\x1f6c', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f6e', '\x1fa8', '\x0000', '\x0000'},
-            {'\x1f6b', '\x1f6d', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1f6f', '\x1fa9', '\x0000', '\x0000'},
-            {'\x1fcd', '\x1fce', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fcf', '\x0000', '\x0000', '\x0000'},
-            {'\x1fdd', '\x1fde', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x1fdf', '\x0000', '\x0000', '\x0000'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x3070', '\x3071'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x3073', '\x3074'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x3076', '\x3077'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x3079', '\x307a'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x307c', '\x307d'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x30d0', '\x30d1'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x30d3', '\x30d4'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x30d6', '\x30d7'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x30d9', '\x30da'},
-            {'\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x0000', '\x30dc', '\x30dd'}
-        };
-    }
-}
-
diff --git a/lib/jabber-net/stringprep/unicode/Decompose.cs b/lib/jabber-net/stringprep/unicode/Decompose.cs
deleted file mode 100644
index ee22fe5..0000000
--- a/lib/jabber-net/stringprep/unicode/Decompose.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Decomposition data for NFKC.
-    /// </summary>
-    public class Decompose
-    {
-        private static IComparer s_comparer = new CharArrayComparer();
-
-        /// <summary>
-        /// Look up the expansion, if any, for the given character.
-        /// </summary>
-        /// <param name="ch">The character to find</param>
-        /// <returns>the expansion, or null if none found.</returns>
-        public static string Find(char ch)
-        {
-            int offset = Array.BinarySearch(DecomposeData.Offsets, ch, s_comparer);
-            if (offset < 0)
-                return null;
-
-            return DecomposeData.Expansion[DecomposeData.Offsets[offset][1]];
-        }
-
-        private class CharArrayComparer : IComparer
-        {
-            #region IComparer Members
-            public int Compare(object x, object y)
-            {
-                return ((char[])x)[0].CompareTo(y);
-            }
-            #endregion
-        }
-    }
-}
diff --git a/lib/jabber-net/stringprep/unicode/DecomposeData.cs b/lib/jabber-net/stringprep/unicode/DecomposeData.cs
deleted file mode 100644
index b48cb38..0000000
--- a/lib/jabber-net/stringprep/unicode/DecomposeData.cs
+++ /dev/null
@@ -1,6470 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-/* This file is automatically generated.  DO NOT EDIT! */
-
-namespace stringprep.unicode
-{
-    /// <summary>
-    /// Decomposition data for NFKC.
-    /// </summary>
-    public class DecomposeData
-    {
-        /// <summary>
-        /// Offset into the Expansion string for each decomposable character.
-        /// One way to make this faster might be to have this not be sparse, so that the lookup
-        /// could be direct rather than a binary search.  That would add several hundred K to the
-        /// library size, though, or time at startup to initialize an array from this.
-        /// </summary>
-        public static readonly char[][] Offsets =  new char[][]
-        {
-            new char[] {'\x00A0', '\x0000'},
-            new char[] {'\x00A8', '\x0001'},
-            new char[] {'\x00AA', '\x0002'},
-            new char[] {'\x00AF', '\x0003'},
-            new char[] {'\x00B2', '\x0004'},
-            new char[] {'\x00B3', '\x0005'},
-            new char[] {'\x00B4', '\x0006'},
-            new char[] {'\x00B5', '\x0007'},
-            new char[] {'\x00B8', '\x0008'},
-            new char[] {'\x00B9', '\x0009'},
-            new char[] {'\x00BA', '\x000A'},
-            new char[] {'\x00BC', '\x000B'},
-            new char[] {'\x00BD', '\x000C'},
-            new char[] {'\x00BE', '\x000D'},
-            new char[] {'\x00C0', '\x000E'},
-            new char[] {'\x00C1', '\x000F'},
-            new char[] {'\x00C2', '\x0010'},
-            new char[] {'\x00C3', '\x0011'},
-            new char[] {'\x00C4', '\x0012'},
-            new char[] {'\x00C5', '\x0013'},
-            new char[] {'\x00C7', '\x0014'},
-            new char[] {'\x00C8', '\x0015'},
-            new char[] {'\x00C9', '\x0016'},
-            new char[] {'\x00CA', '\x0017'},
-            new char[] {'\x00CB', '\x0018'},
-            new char[] {'\x00CC', '\x0019'},
-            new char[] {'\x00CD', '\x001A'},
-            new char[] {'\x00CE', '\x001B'},
-            new char[] {'\x00CF', '\x001C'},
-            new char[] {'\x00D1', '\x001D'},
-            new char[] {'\x00D2', '\x001E'},
-            new char[] {'\x00D3', '\x001F'},
-            new char[] {'\x00D4', '\x0020'},
-            new char[] {'\x00D5', '\x0021'},
-            new char[] {'\x00D6', '\x0022'},
-            new char[] {'\x00D9', '\x0023'},
-            new char[] {'\x00DA', '\x0024'},
-            new char[] {'\x00DB', '\x0025'},
-            new char[] {'\x00DC', '\x0026'},
-            new char[] {'\x00DD', '\x0027'},
-            new char[] {'\x00E0', '\x0028'},
-            new char[] {'\x00E1', '\x0029'},
-            new char[] {'\x00E2', '\x002A'},
-            new char[] {'\x00E3', '\x002B'},
-            new char[] {'\x00E4', '\x002C'},
-            new char[] {'\x00E5', '\x002D'},
-            new char[] {'\x00E7', '\x002E'},
-            new char[] {'\x00E8', '\x002F'},
-            new char[] {'\x00E9', '\x0030'},
-            new char[] {'\x00EA', '\x0031'},
-            new char[] {'\x00EB', '\x0032'},
-            new char[] {'\x00EC', '\x0033'},
-            new char[] {'\x00ED', '\x0034'},
-            new char[] {'\x00EE', '\x0035'},
-            new char[] {'\x00EF', '\x0036'},
-            new char[] {'\x00F1', '\x0037'},
-            new char[] {'\x00F2', '\x0038'},
-            new char[] {'\x00F3', '\x0039'},
-            new char[] {'\x00F4', '\x003A'},
-            new char[] {'\x00F5', '\x003B'},
-            new char[] {'\x00F6', '\x003C'},
-            new char[] {'\x00F9', '\x003D'},
-            new char[] {'\x00FA', '\x003E'},
-            new char[] {'\x00FB', '\x003F'},
-            new char[] {'\x00FC', '\x0040'},
-            new char[] {'\x00FD', '\x0041'},
-            new char[] {'\x00FF', '\x0042'},
-            new char[] {'\x0100', '\x0043'},
-            new char[] {'\x0101', '\x0044'},
-            new char[] {'\x0102', '\x0045'},
-            new char[] {'\x0103', '\x0046'},
-            new char[] {'\x0104', '\x0047'},
-            new char[] {'\x0105', '\x0048'},
-            new char[] {'\x0106', '\x0049'},
-            new char[] {'\x0107', '\x004A'},
-            new char[] {'\x0108', '\x004B'},
-            new char[] {'\x0109', '\x004C'},
-            new char[] {'\x010A', '\x004D'},
-            new char[] {'\x010B', '\x004E'},
-            new char[] {'\x010C', '\x004F'},
-            new char[] {'\x010D', '\x0050'},
-            new char[] {'\x010E', '\x0051'},
-            new char[] {'\x010F', '\x0052'},
-            new char[] {'\x0112', '\x0053'},
-            new char[] {'\x0113', '\x0054'},
-            new char[] {'\x0114', '\x0055'},
-            new char[] {'\x0115', '\x0056'},
-            new char[] {'\x0116', '\x0057'},
-            new char[] {'\x0117', '\x0058'},
-            new char[] {'\x0118', '\x0059'},
-            new char[] {'\x0119', '\x005A'},
-            new char[] {'\x011A', '\x005B'},
-            new char[] {'\x011B', '\x005C'},
-            new char[] {'\x011C', '\x005D'},
-            new char[] {'\x011D', '\x005E'},
-            new char[] {'\x011E', '\x005F'},
-            new char[] {'\x011F', '\x0060'},
-            new char[] {'\x0120', '\x0061'},
-            new char[] {'\x0121', '\x0062'},
-            new char[] {'\x0122', '\x0063'},
-            new char[] {'\x0123', '\x0064'},
-            new char[] {'\x0124', '\x0065'},
-            new char[] {'\x0125', '\x0066'},
-            new char[] {'\x0128', '\x0067'},
-            new char[] {'\x0129', '\x0068'},
-            new char[] {'\x012A', '\x0069'},
-            new char[] {'\x012B', '\x006A'},
-            new char[] {'\x012C', '\x006B'},
-            new char[] {'\x012D', '\x006C'},
-            new char[] {'\x012E', '\x006D'},
-            new char[] {'\x012F', '\x006E'},
-            new char[] {'\x0130', '\x006F'},
-            new char[] {'\x0132', '\x0070'},
-            new char[] {'\x0133', '\x0071'},
-            new char[] {'\x0134', '\x0072'},
-            new char[] {'\x0135', '\x0073'},
-            new char[] {'\x0136', '\x0074'},
-            new char[] {'\x0137', '\x0075'},
-            new char[] {'\x0139', '\x0076'},
-            new char[] {'\x013A', '\x0077'},
-            new char[] {'\x013B', '\x0078'},
-            new char[] {'\x013C', '\x0079'},
-            new char[] {'\x013D', '\x007A'},
-            new char[] {'\x013E', '\x007B'},
-            new char[] {'\x013F', '\x007C'},
-            new char[] {'\x0140', '\x007D'},
-            new char[] {'\x0143', '\x007E'},
-            new char[] {'\x0144', '\x007F'},
-            new char[] {'\x0145', '\x0080'},
-            new char[] {'\x0146', '\x0081'},
-            new char[] {'\x0147', '\x0082'},
-            new char[] {'\x0148', '\x0083'},
-            new char[] {'\x0149', '\x0084'},
-            new char[] {'\x014C', '\x0085'},
-            new char[] {'\x014D', '\x0086'},
-            new char[] {'\x014E', '\x0087'},
-            new char[] {'\x014F', '\x0088'},
-            new char[] {'\x0150', '\x0089'},
-            new char[] {'\x0151', '\x008A'},
-            new char[] {'\x0154', '\x008B'},
-            new char[] {'\x0155', '\x008C'},
-            new char[] {'\x0156', '\x008D'},
-            new char[] {'\x0157', '\x008E'},
-            new char[] {'\x0158', '\x008F'},
-            new char[] {'\x0159', '\x0090'},
-            new char[] {'\x015A', '\x0091'},
-            new char[] {'\x015B', '\x0092'},
-            new char[] {'\x015C', '\x0093'},
-            new char[] {'\x015D', '\x0094'},
-            new char[] {'\x015E', '\x0095'},
-            new char[] {'\x015F', '\x0096'},
-            new char[] {'\x0160', '\x0097'},
-            new char[] {'\x0161', '\x0098'},
-            new char[] {'\x0162', '\x0099'},
-            new char[] {'\x0163', '\x009A'},
-            new char[] {'\x0164', '\x009B'},
-            new char[] {'\x0165', '\x009C'},
-            new char[] {'\x0168', '\x009D'},
-            new char[] {'\x0169', '\x009E'},
-            new char[] {'\x016A', '\x009F'},
-            new char[] {'\x016B', '\x00A0'},
-            new char[] {'\x016C', '\x00A1'},
-            new char[] {'\x016D', '\x00A2'},
-            new char[] {'\x016E', '\x00A3'},
-            new char[] {'\x016F', '\x00A4'},
-            new char[] {'\x0170', '\x00A5'},
-            new char[] {'\x0171', '\x00A6'},
-            new char[] {'\x0172', '\x00A7'},
-            new char[] {'\x0173', '\x00A8'},
-            new char[] {'\x0174', '\x00A9'},
-            new char[] {'\x0175', '\x00AA'},
-            new char[] {'\x0176', '\x00AB'},
-            new char[] {'\x0177', '\x00AC'},
-            new char[] {'\x0178', '\x00AD'},
-            new char[] {'\x0179', '\x00AE'},
-            new char[] {'\x017A', '\x00AF'},
-            new char[] {'\x017B', '\x00B0'},
-            new char[] {'\x017C', '\x00B1'},
-            new char[] {'\x017D', '\x00B2'},
-            new char[] {'\x017E', '\x00B3'},
-            new char[] {'\x017F', '\x00B4'},
-            new char[] {'\x01A0', '\x00B5'},
-            new char[] {'\x01A1', '\x00B6'},
-            new char[] {'\x01AF', '\x00B7'},
-            new char[] {'\x01B0', '\x00B8'},
-            new char[] {'\x01C4', '\x00B9'},
-            new char[] {'\x01C5', '\x00BA'},
-            new char[] {'\x01C6', '\x00BB'},
-            new char[] {'\x01C7', '\x00BC'},
-            new char[] {'\x01C8', '\x00BD'},
-            new char[] {'\x01C9', '\x00BE'},
-            new char[] {'\x01CA', '\x00BF'},
-            new char[] {'\x01CB', '\x00C0'},
-            new char[] {'\x01CC', '\x00C1'},
-            new char[] {'\x01CD', '\x00C2'},
-            new char[] {'\x01CE', '\x00C3'},
-            new char[] {'\x01CF', '\x00C4'},
-            new char[] {'\x01D0', '\x00C5'},
-            new char[] {'\x01D1', '\x00C6'},
-            new char[] {'\x01D2', '\x00C7'},
-            new char[] {'\x01D3', '\x00C8'},
-            new char[] {'\x01D4', '\x00C9'},
-            new char[] {'\x01D5', '\x00CA'},
-            new char[] {'\x01D6', '\x00CB'},
-            new char[] {'\x01D7', '\x00CC'},
-            new char[] {'\x01D8', '\x00CD'},
-            new char[] {'\x01D9', '\x00CE'},
-            new char[] {'\x01DA', '\x00CF'},
-            new char[] {'\x01DB', '\x00D0'},
-            new char[] {'\x01DC', '\x00D1'},
-            new char[] {'\x01DE', '\x00D2'},
-            new char[] {'\x01DF', '\x00D3'},
-            new char[] {'\x01E0', '\x00D4'},
-            new char[] {'\x01E1', '\x00D5'},
-            new char[] {'\x01E2', '\x00D6'},
-            new char[] {'\x01E3', '\x00D7'},
-            new char[] {'\x01E6', '\x00D8'},
-            new char[] {'\x01E7', '\x00D9'},
-            new char[] {'\x01E8', '\x00DA'},
-            new char[] {'\x01E9', '\x00DB'},
-            new char[] {'\x01EA', '\x00DC'},
-            new char[] {'\x01EB', '\x00DD'},
-            new char[] {'\x01EC', '\x00DE'},
-            new char[] {'\x01ED', '\x00DF'},
-            new char[] {'\x01EE', '\x00E0'},
-            new char[] {'\x01EF', '\x00E1'},
-            new char[] {'\x01F0', '\x00E2'},
-            new char[] {'\x01F1', '\x00E3'},
-            new char[] {'\x01F2', '\x00E4'},
-            new char[] {'\x01F3', '\x00E5'},
-            new char[] {'\x01F4', '\x00E6'},
-            new char[] {'\x01F5', '\x00E7'},
-            new char[] {'\x01F8', '\x00E8'},
-            new char[] {'\x01F9', '\x00E9'},
-            new char[] {'\x01FA', '\x00EA'},
-            new char[] {'\x01FB', '\x00EB'},
-            new char[] {'\x01FC', '\x00EC'},
-            new char[] {'\x01FD', '\x00ED'},
-            new char[] {'\x01FE', '\x00EE'},
-            new char[] {'\x01FF', '\x00EF'},
-            new char[] {'\x0200', '\x00F0'},
-            new char[] {'\x0201', '\x00F1'},
-            new char[] {'\x0202', '\x00F2'},
-            new char[] {'\x0203', '\x00F3'},
-            new char[] {'\x0204', '\x00F4'},
-            new char[] {'\x0205', '\x00F5'},
-            new char[] {'\x0206', '\x00F6'},
-            new char[] {'\x0207', '\x00F7'},
-            new char[] {'\x0208', '\x00F8'},
-            new char[] {'\x0209', '\x00F9'},
-            new char[] {'\x020A', '\x00FA'},
-            new char[] {'\x020B', '\x00FB'},
-            new char[] {'\x020C', '\x00FC'},
-            new char[] {'\x020D', '\x00FD'},
-            new char[] {'\x020E', '\x00FE'},
-            new char[] {'\x020F', '\x00FF'},
-            new char[] {'\x0210', '\x0100'},
-            new char[] {'\x0211', '\x0101'},
-            new char[] {'\x0212', '\x0102'},
-            new char[] {'\x0213', '\x0103'},
-            new char[] {'\x0214', '\x0104'},
-            new char[] {'\x0215', '\x0105'},
-            new char[] {'\x0216', '\x0106'},
-            new char[] {'\x0217', '\x0107'},
-            new char[] {'\x0218', '\x0108'},
-            new char[] {'\x0219', '\x0109'},
-            new char[] {'\x021A', '\x010A'},
-            new char[] {'\x021B', '\x010B'},
-            new char[] {'\x021E', '\x010C'},
-            new char[] {'\x021F', '\x010D'},
-            new char[] {'\x0226', '\x010E'},
-            new char[] {'\x0227', '\x010F'},
-            new char[] {'\x0228', '\x0110'},
-            new char[] {'\x0229', '\x0111'},
-            new char[] {'\x022A', '\x0112'},
-            new char[] {'\x022B', '\x0113'},
-            new char[] {'\x022C', '\x0114'},
-            new char[] {'\x022D', '\x0115'},
-            new char[] {'\x022E', '\x0116'},
-            new char[] {'\x022F', '\x0117'},
-            new char[] {'\x0230', '\x0118'},
-            new char[] {'\x0231', '\x0119'},
-            new char[] {'\x0232', '\x011A'},
-            new char[] {'\x0233', '\x011B'},
-            new char[] {'\x02B0', '\x011C'},
-            new char[] {'\x02B1', '\x011D'},
-            new char[] {'\x02B2', '\x011E'},
-            new char[] {'\x02B3', '\x011F'},
-            new char[] {'\x02B4', '\x0120'},
-            new char[] {'\x02B5', '\x0121'},
-            new char[] {'\x02B6', '\x0122'},
-            new char[] {'\x02B7', '\x0123'},
-            new char[] {'\x02B8', '\x0124'},
-            new char[] {'\x02D8', '\x0125'},
-            new char[] {'\x02D9', '\x0126'},
-            new char[] {'\x02DA', '\x0127'},
-            new char[] {'\x02DB', '\x0128'},
-            new char[] {'\x02DC', '\x0129'},
-            new char[] {'\x02DD', '\x012A'},
-            new char[] {'\x02E0', '\x012B'},
-            new char[] {'\x02E1', '\x012C'},
-            new char[] {'\x02E2', '\x00B4'},
-            new char[] {'\x02E3', '\x012D'},
-            new char[] {'\x02E4', '\x012E'},
-            new char[] {'\x0340', '\x012F'},
-            new char[] {'\x0341', '\x0130'},
-            new char[] {'\x0343', '\x0131'},
-            new char[] {'\x0344', '\x0132'},
-            new char[] {'\x0374', '\x0133'},
-            new char[] {'\x037A', '\x0134'},
-            new char[] {'\x037E', '\x0135'},
-            new char[] {'\x0384', '\x0006'},
-            new char[] {'\x0385', '\x0136'},
-            new char[] {'\x0386', '\x0137'},
-            new char[] {'\x0387', '\x0138'},
-            new char[] {'\x0388', '\x0139'},
-            new char[] {'\x0389', '\x013A'},
-            new char[] {'\x038A', '\x013B'},
-            new char[] {'\x038C', '\x013C'},
-            new char[] {'\x038E', '\x013D'},
-            new char[] {'\x038F', '\x013E'},
-            new char[] {'\x0390', '\x013F'},
-            new char[] {'\x03AA', '\x0140'},
-            new char[] {'\x03AB', '\x0141'},
-            new char[] {'\x03AC', '\x0142'},
-            new char[] {'\x03AD', '\x0143'},
-            new char[] {'\x03AE', '\x0144'},
-            new char[] {'\x03AF', '\x0145'},
-            new char[] {'\x03B0', '\x0146'},
-            new char[] {'\x03CA', '\x0147'},
-            new char[] {'\x03CB', '\x0148'},
-            new char[] {'\x03CC', '\x0149'},
-            new char[] {'\x03CD', '\x014A'},
-            new char[] {'\x03CE', '\x014B'},
-            new char[] {'\x03D0', '\x014C'},
-            new char[] {'\x03D1', '\x014D'},
-            new char[] {'\x03D2', '\x014E'},
-            new char[] {'\x03D3', '\x013D'},
-            new char[] {'\x03D4', '\x0141'},
-            new char[] {'\x03D5', '\x014F'},
-            new char[] {'\x03D6', '\x0150'},
-            new char[] {'\x03F0', '\x0151'},
-            new char[] {'\x03F1', '\x0152'},
-            new char[] {'\x03F2', '\x0153'},
-            new char[] {'\x03F4', '\x0154'},
-            new char[] {'\x03F5', '\x0155'},
-            new char[] {'\x0400', '\x0156'},
-            new char[] {'\x0401', '\x0157'},
-            new char[] {'\x0403', '\x0158'},
-            new char[] {'\x0407', '\x0159'},
-            new char[] {'\x040C', '\x015A'},
-            new char[] {'\x040D', '\x015B'},
-            new char[] {'\x040E', '\x015C'},
-            new char[] {'\x0419', '\x015D'},
-            new char[] {'\x0439', '\x015E'},
-            new char[] {'\x0450', '\x015F'},
-            new char[] {'\x0451', '\x0160'},
-            new char[] {'\x0453', '\x0161'},
-            new char[] {'\x0457', '\x0162'},
-            new char[] {'\x045C', '\x0163'},
-            new char[] {'\x045D', '\x0164'},
-            new char[] {'\x045E', '\x0165'},
-            new char[] {'\x0476', '\x0166'},
-            new char[] {'\x0477', '\x0167'},
-            new char[] {'\x04C1', '\x0168'},
-            new char[] {'\x04C2', '\x0169'},
-            new char[] {'\x04D0', '\x016A'},
-            new char[] {'\x04D1', '\x016B'},
-            new char[] {'\x04D2', '\x016C'},
-            new char[] {'\x04D3', '\x016D'},
-            new char[] {'\x04D6', '\x016E'},
-            new char[] {'\x04D7', '\x016F'},
-            new char[] {'\x04DA', '\x0170'},
-            new char[] {'\x04DB', '\x0171'},
-            new char[] {'\x04DC', '\x0172'},
-            new char[] {'\x04DD', '\x0173'},
-            new char[] {'\x04DE', '\x0174'},
-            new char[] {'\x04DF', '\x0175'},
-            new char[] {'\x04E2', '\x0176'},
-            new char[] {'\x04E3', '\x0177'},
-            new char[] {'\x04E4', '\x0178'},
-            new char[] {'\x04E5', '\x0179'},
-            new char[] {'\x04E6', '\x017A'},
-            new char[] {'\x04E7', '\x017B'},
-            new char[] {'\x04EA', '\x017C'},
-            new char[] {'\x04EB', '\x017D'},
-            new char[] {'\x04EC', '\x017E'},
-            new char[] {'\x04ED', '\x017F'},
-            new char[] {'\x04EE', '\x0180'},
-            new char[] {'\x04EF', '\x0181'},
-            new char[] {'\x04F0', '\x0182'},
-            new char[] {'\x04F1', '\x0183'},
-            new char[] {'\x04F2', '\x0184'},
-            new char[] {'\x04F3', '\x0185'},
-            new char[] {'\x04F4', '\x0186'},
-            new char[] {'\x04F5', '\x0187'},
-            new char[] {'\x04F8', '\x0188'},
-            new char[] {'\x04F9', '\x0189'},
-            new char[] {'\x0587', '\x018A'},
-            new char[] {'\x0622', '\x018B'},
-            new char[] {'\x0623', '\x018C'},
-            new char[] {'\x0624', '\x018D'},
-            new char[] {'\x0625', '\x018E'},
-            new char[] {'\x0626', '\x018F'},
-            new char[] {'\x0675', '\x0190'},
-            new char[] {'\x0676', '\x0191'},
-            new char[] {'\x0677', '\x0192'},
-            new char[] {'\x0678', '\x0193'},
-            new char[] {'\x06C0', '\x0194'},
-            new char[] {'\x06C2', '\x0195'},
-            new char[] {'\x06D3', '\x0196'},
-            new char[] {'\x0929', '\x0197'},
-            new char[] {'\x0931', '\x0198'},
-            new char[] {'\x0934', '\x0199'},
-            new char[] {'\x0958', '\x019A'},
-            new char[] {'\x0959', '\x019B'},
-            new char[] {'\x095A', '\x019C'},
-            new char[] {'\x095B', '\x019D'},
-            new char[] {'\x095C', '\x019E'},
-            new char[] {'\x095D', '\x019F'},
-            new char[] {'\x095E', '\x01A0'},
-            new char[] {'\x095F', '\x01A1'},
-            new char[] {'\x09CB', '\x01A2'},
-            new char[] {'\x09CC', '\x01A3'},
-            new char[] {'\x09DC', '\x01A4'},
-            new char[] {'\x09DD', '\x01A5'},
-            new char[] {'\x09DF', '\x01A6'},
-            new char[] {'\x0A33', '\x01A7'},
-            new char[] {'\x0A36', '\x01A8'},
-            new char[] {'\x0A59', '\x01A9'},
-            new char[] {'\x0A5A', '\x01AA'},
-            new char[] {'\x0A5B', '\x01AB'},
-            new char[] {'\x0A5E', '\x01AC'},
-            new char[] {'\x0B48', '\x01AD'},
-            new char[] {'\x0B4B', '\x01AE'},
-            new char[] {'\x0B4C', '\x01AF'},
-            new char[] {'\x0B5C', '\x01B0'},
-            new char[] {'\x0B5D', '\x01B1'},
-            new char[] {'\x0B94', '\x01B2'},
-            new char[] {'\x0BCA', '\x01B3'},
-            new char[] {'\x0BCB', '\x01B4'},
-            new char[] {'\x0BCC', '\x01B5'},
-            new char[] {'\x0C48', '\x01B6'},
-            new char[] {'\x0CC0', '\x01B7'},
-            new char[] {'\x0CC7', '\x01B8'},
-            new char[] {'\x0CC8', '\x01B9'},
-            new char[] {'\x0CCA', '\x01BA'},
-            new char[] {'\x0CCB', '\x01BB'},
-            new char[] {'\x0D4A', '\x01BC'},
-            new char[] {'\x0D4B', '\x01BD'},
-            new char[] {'\x0D4C', '\x01BE'},
-            new char[] {'\x0DDA', '\x01BF'},
-            new char[] {'\x0DDC', '\x01C0'},
-            new char[] {'\x0DDD', '\x01C1'},
-            new char[] {'\x0DDE', '\x01C2'},
-            new char[] {'\x0E33', '\x01C3'},
-            new char[] {'\x0EB3', '\x01C4'},
-            new char[] {'\x0EDC', '\x01C5'},
-            new char[] {'\x0EDD', '\x01C6'},
-            new char[] {'\x0F0C', '\x01C7'},
-            new char[] {'\x0F43', '\x01C8'},
-            new char[] {'\x0F4D', '\x01C9'},
-            new char[] {'\x0F52', '\x01CA'},
-            new char[] {'\x0F57', '\x01CB'},
-            new char[] {'\x0F5C', '\x01CC'},
-            new char[] {'\x0F69', '\x01CD'},
-            new char[] {'\x0F73', '\x01CE'},
-            new char[] {'\x0F75', '\x01CF'},
-            new char[] {'\x0F76', '\x01D0'},
-            new char[] {'\x0F77', '\x01D1'},
-            new char[] {'\x0F78', '\x01D2'},
-            new char[] {'\x0F79', '\x01D3'},
-            new char[] {'\x0F81', '\x01D4'},
-            new char[] {'\x0F93', '\x01D5'},
-            new char[] {'\x0F9D', '\x01D6'},
-            new char[] {'\x0FA2', '\x01D7'},
-            new char[] {'\x0FA7', '\x01D8'},
-            new char[] {'\x0FAC', '\x01D9'},
-            new char[] {'\x0FB9', '\x01DA'},
-            new char[] {'\x1026', '\x01DB'},
-            new char[] {'\x1E00', '\x01DC'},
-            new char[] {'\x1E01', '\x01DD'},
-            new char[] {'\x1E02', '\x01DE'},
-            new char[] {'\x1E03', '\x01DF'},
-            new char[] {'\x1E04', '\x01E0'},
-            new char[] {'\x1E05', '\x01E1'},
-            new char[] {'\x1E06', '\x01E2'},
-            new char[] {'\x1E07', '\x01E3'},
-            new char[] {'\x1E08', '\x01E4'},
-            new char[] {'\x1E09', '\x01E5'},
-            new char[] {'\x1E0A', '\x01E6'},
-            new char[] {'\x1E0B', '\x01E7'},
-            new char[] {'\x1E0C', '\x01E8'},
-            new char[] {'\x1E0D', '\x01E9'},
-            new char[] {'\x1E0E', '\x01EA'},
-            new char[] {'\x1E0F', '\x01EB'},
-            new char[] {'\x1E10', '\x01EC'},
-            new char[] {'\x1E11', '\x01ED'},
-            new char[] {'\x1E12', '\x01EE'},
-            new char[] {'\x1E13', '\x01EF'},
-            new char[] {'\x1E14', '\x01F0'},
-            new char[] {'\x1E15', '\x01F1'},
-            new char[] {'\x1E16', '\x01F2'},
-            new char[] {'\x1E17', '\x01F3'},
-            new char[] {'\x1E18', '\x01F4'},
-            new char[] {'\x1E19', '\x01F5'},
-            new char[] {'\x1E1A', '\x01F6'},
-            new char[] {'\x1E1B', '\x01F7'},
-            new char[] {'\x1E1C', '\x01F8'},
-            new char[] {'\x1E1D', '\x01F9'},
-            new char[] {'\x1E1E', '\x01FA'},
-            new char[] {'\x1E1F', '\x01FB'},
-            new char[] {'\x1E20', '\x01FC'},
-            new char[] {'\x1E21', '\x01FD'},
-            new char[] {'\x1E22', '\x01FE'},
-            new char[] {'\x1E23', '\x01FF'},
-            new char[] {'\x1E24', '\x0200'},
-            new char[] {'\x1E25', '\x0201'},
-            new char[] {'\x1E26', '\x0202'},
-            new char[] {'\x1E27', '\x0203'},
-            new char[] {'\x1E28', '\x0204'},
-            new char[] {'\x1E29', '\x0205'},
-            new char[] {'\x1E2A', '\x0206'},
-            new char[] {'\x1E2B', '\x0207'},
-            new char[] {'\x1E2C', '\x0208'},
-            new char[] {'\x1E2D', '\x0209'},
-            new char[] {'\x1E2E', '\x020A'},
-            new char[] {'\x1E2F', '\x020B'},
-            new char[] {'\x1E30', '\x020C'},
-            new char[] {'\x1E31', '\x020D'},
-            new char[] {'\x1E32', '\x020E'},
-            new char[] {'\x1E33', '\x020F'},
-            new char[] {'\x1E34', '\x0210'},
-            new char[] {'\x1E35', '\x0211'},
-            new char[] {'\x1E36', '\x0212'},
-            new char[] {'\x1E37', '\x0213'},
-            new char[] {'\x1E38', '\x0214'},
-            new char[] {'\x1E39', '\x0215'},
-            new char[] {'\x1E3A', '\x0216'},
-            new char[] {'\x1E3B', '\x0217'},
-            new char[] {'\x1E3C', '\x0218'},
-            new char[] {'\x1E3D', '\x0219'},
-            new char[] {'\x1E3E', '\x021A'},
-            new char[] {'\x1E3F', '\x021B'},
-            new char[] {'\x1E40', '\x021C'},
-            new char[] {'\x1E41', '\x021D'},
-            new char[] {'\x1E42', '\x021E'},
-            new char[] {'\x1E43', '\x021F'},
-            new char[] {'\x1E44', '\x0220'},
-            new char[] {'\x1E45', '\x0221'},
-            new char[] {'\x1E46', '\x0222'},
-            new char[] {'\x1E47', '\x0223'},
-            new char[] {'\x1E48', '\x0224'},
-            new char[] {'\x1E49', '\x0225'},
-            new char[] {'\x1E4A', '\x0226'},
-            new char[] {'\x1E4B', '\x0227'},
-            new char[] {'\x1E4C', '\x0228'},
-            new char[] {'\x1E4D', '\x0229'},
-            new char[] {'\x1E4E', '\x022A'},
-            new char[] {'\x1E4F', '\x022B'},
-            new char[] {'\x1E50', '\x022C'},
-            new char[] {'\x1E51', '\x022D'},
-            new char[] {'\x1E52', '\x022E'},
-            new char[] {'\x1E53', '\x022F'},
-            new char[] {'\x1E54', '\x0230'},
-            new char[] {'\x1E55', '\x0231'},
-            new char[] {'\x1E56', '\x0232'},
-            new char[] {'\x1E57', '\x0233'},
-            new char[] {'\x1E58', '\x0234'},
-            new char[] {'\x1E59', '\x0235'},
-            new char[] {'\x1E5A', '\x0236'},
-            new char[] {'\x1E5B', '\x0237'},
-            new char[] {'\x1E5C', '\x0238'},
-            new char[] {'\x1E5D', '\x0239'},
-            new char[] {'\x1E5E', '\x023A'},
-            new char[] {'\x1E5F', '\x023B'},
-            new char[] {'\x1E60', '\x023C'},
-            new char[] {'\x1E61', '\x023D'},
-            new char[] {'\x1E62', '\x023E'},
-            new char[] {'\x1E63', '\x023F'},
-            new char[] {'\x1E64', '\x0240'},
-            new char[] {'\x1E65', '\x0241'},
-            new char[] {'\x1E66', '\x0242'},
-            new char[] {'\x1E67', '\x0243'},
-            new char[] {'\x1E68', '\x0244'},
-            new char[] {'\x1E69', '\x0245'},
-            new char[] {'\x1E6A', '\x0246'},
-            new char[] {'\x1E6B', '\x0247'},
-            new char[] {'\x1E6C', '\x0248'},
-            new char[] {'\x1E6D', '\x0249'},
-            new char[] {'\x1E6E', '\x024A'},
-            new char[] {'\x1E6F', '\x024B'},
-            new char[] {'\x1E70', '\x024C'},
-            new char[] {'\x1E71', '\x024D'},
-            new char[] {'\x1E72', '\x024E'},
-            new char[] {'\x1E73', '\x024F'},
-            new char[] {'\x1E74', '\x0250'},
-            new char[] {'\x1E75', '\x0251'},
-            new char[] {'\x1E76', '\x0252'},
-            new char[] {'\x1E77', '\x0253'},
-            new char[] {'\x1E78', '\x0254'},
-            new char[] {'\x1E79', '\x0255'},
-            new char[] {'\x1E7A', '\x0256'},
-            new char[] {'\x1E7B', '\x0257'},
-            new char[] {'\x1E7C', '\x0258'},
-            new char[] {'\x1E7D', '\x0259'},
-            new char[] {'\x1E7E', '\x025A'},
-            new char[] {'\x1E7F', '\x025B'},
-            new char[] {'\x1E80', '\x025C'},
-            new char[] {'\x1E81', '\x025D'},
-            new char[] {'\x1E82', '\x025E'},
-            new char[] {'\x1E83', '\x025F'},
-            new char[] {'\x1E84', '\x0260'},
-            new char[] {'\x1E85', '\x0261'},
-            new char[] {'\x1E86', '\x0262'},
-            new char[] {'\x1E87', '\x0263'},
-            new char[] {'\x1E88', '\x0264'},
-            new char[] {'\x1E89', '\x0265'},
-            new char[] {'\x1E8A', '\x0266'},
-            new char[] {'\x1E8B', '\x0267'},
-            new char[] {'\x1E8C', '\x0268'},
-            new char[] {'\x1E8D', '\x0269'},
-            new char[] {'\x1E8E', '\x026A'},
-            new char[] {'\x1E8F', '\x026B'},
-            new char[] {'\x1E90', '\x026C'},
-            new char[] {'\x1E91', '\x026D'},
-            new char[] {'\x1E92', '\x026E'},
-            new char[] {'\x1E93', '\x026F'},
-            new char[] {'\x1E94', '\x0270'},
-            new char[] {'\x1E95', '\x0271'},
-            new char[] {'\x1E96', '\x0272'},
-            new char[] {'\x1E97', '\x0273'},
-            new char[] {'\x1E98', '\x0274'},
-            new char[] {'\x1E99', '\x0275'},
-            new char[] {'\x1E9A', '\x0276'},
-            new char[] {'\x1E9B', '\x023D'},
-            new char[] {'\x1EA0', '\x0277'},
-            new char[] {'\x1EA1', '\x0278'},
-            new char[] {'\x1EA2', '\x0279'},
-            new char[] {'\x1EA3', '\x027A'},
-            new char[] {'\x1EA4', '\x027B'},
-            new char[] {'\x1EA5', '\x027C'},
-            new char[] {'\x1EA6', '\x027D'},
-            new char[] {'\x1EA7', '\x027E'},
-            new char[] {'\x1EA8', '\x027F'},
-            new char[] {'\x1EA9', '\x0280'},
-            new char[] {'\x1EAA', '\x0281'},
-            new char[] {'\x1EAB', '\x0282'},
-            new char[] {'\x1EAC', '\x0283'},
-            new char[] {'\x1EAD', '\x0284'},
-            new char[] {'\x1EAE', '\x0285'},
-            new char[] {'\x1EAF', '\x0286'},
-            new char[] {'\x1EB0', '\x0287'},
-            new char[] {'\x1EB1', '\x0288'},
-            new char[] {'\x1EB2', '\x0289'},
-            new char[] {'\x1EB3', '\x028A'},
-            new char[] {'\x1EB4', '\x028B'},
-            new char[] {'\x1EB5', '\x028C'},
-            new char[] {'\x1EB6', '\x028D'},
-            new char[] {'\x1EB7', '\x028E'},
-            new char[] {'\x1EB8', '\x028F'},
-            new char[] {'\x1EB9', '\x0290'},
-            new char[] {'\x1EBA', '\x0291'},
-            new char[] {'\x1EBB', '\x0292'},
-            new char[] {'\x1EBC', '\x0293'},
-            new char[] {'\x1EBD', '\x0294'},
-            new char[] {'\x1EBE', '\x0295'},
-            new char[] {'\x1EBF', '\x0296'},
-            new char[] {'\x1EC0', '\x0297'},
-            new char[] {'\x1EC1', '\x0298'},
-            new char[] {'\x1EC2', '\x0299'},
-            new char[] {'\x1EC3', '\x029A'},
-            new char[] {'\x1EC4', '\x029B'},
-            new char[] {'\x1EC5', '\x029C'},
-            new char[] {'\x1EC6', '\x029D'},
-            new char[] {'\x1EC7', '\x029E'},
-            new char[] {'\x1EC8', '\x029F'},
-            new char[] {'\x1EC9', '\x02A0'},
-            new char[] {'\x1ECA', '\x02A1'},
-            new char[] {'\x1ECB', '\x02A2'},
-            new char[] {'\x1ECC', '\x02A3'},
-            new char[] {'\x1ECD', '\x02A4'},
-            new char[] {'\x1ECE', '\x02A5'},
-            new char[] {'\x1ECF', '\x02A6'},
-            new char[] {'\x1ED0', '\x02A7'},
-            new char[] {'\x1ED1', '\x02A8'},
-            new char[] {'\x1ED2', '\x02A9'},
-            new char[] {'\x1ED3', '\x02AA'},
-            new char[] {'\x1ED4', '\x02AB'},
-            new char[] {'\x1ED5', '\x02AC'},
-            new char[] {'\x1ED6', '\x02AD'},
-            new char[] {'\x1ED7', '\x02AE'},
-            new char[] {'\x1ED8', '\x02AF'},
-            new char[] {'\x1ED9', '\x02B0'},
-            new char[] {'\x1EDA', '\x02B1'},
-            new char[] {'\x1EDB', '\x02B2'},
-            new char[] {'\x1EDC', '\x02B3'},
-            new char[] {'\x1EDD', '\x02B4'},
-            new char[] {'\x1EDE', '\x02B5'},
-            new char[] {'\x1EDF', '\x02B6'},
-            new char[] {'\x1EE0', '\x02B7'},
-            new char[] {'\x1EE1', '\x02B8'},
-            new char[] {'\x1EE2', '\x02B9'},
-            new char[] {'\x1EE3', '\x02BA'},
-            new char[] {'\x1EE4', '\x02BB'},
-            new char[] {'\x1EE5', '\x02BC'},
-            new char[] {'\x1EE6', '\x02BD'},
-            new char[] {'\x1EE7', '\x02BE'},
-            new char[] {'\x1EE8', '\x02BF'},
-            new char[] {'\x1EE9', '\x02C0'},
-            new char[] {'\x1EEA', '\x02C1'},
-            new char[] {'\x1EEB', '\x02C2'},
-            new char[] {'\x1EEC', '\x02C3'},
-            new char[] {'\x1EED', '\x02C4'},
-            new char[] {'\x1EEE', '\x02C5'},
-            new char[] {'\x1EEF', '\x02C6'},
-            new char[] {'\x1EF0', '\x02C7'},
-            new char[] {'\x1EF1', '\x02C8'},
-            new char[] {'\x1EF2', '\x02C9'},
-            new char[] {'\x1EF3', '\x02CA'},
-            new char[] {'\x1EF4', '\x02CB'},
-            new char[] {'\x1EF5', '\x02CC'},
-            new char[] {'\x1EF6', '\x02CD'},
-            new char[] {'\x1EF7', '\x02CE'},
-            new char[] {'\x1EF8', '\x02CF'},
-            new char[] {'\x1EF9', '\x02D0'},
-            new char[] {'\x1F00', '\x02D1'},
-            new char[] {'\x1F01', '\x02D2'},
-            new char[] {'\x1F02', '\x02D3'},
-            new char[] {'\x1F03', '\x02D4'},
-            new char[] {'\x1F04', '\x02D5'},
-            new char[] {'\x1F05', '\x02D6'},
-            new char[] {'\x1F06', '\x02D7'},
-            new char[] {'\x1F07', '\x02D8'},
-            new char[] {'\x1F08', '\x02D9'},
-            new char[] {'\x1F09', '\x02DA'},
-            new char[] {'\x1F0A', '\x02DB'},
-            new char[] {'\x1F0B', '\x02DC'},
-            new char[] {'\x1F0C', '\x02DD'},
-            new char[] {'\x1F0D', '\x02DE'},
-            new char[] {'\x1F0E', '\x02DF'},
-            new char[] {'\x1F0F', '\x02E0'},
-            new char[] {'\x1F10', '\x02E1'},
-            new char[] {'\x1F11', '\x02E2'},
-            new char[] {'\x1F12', '\x02E3'},
-            new char[] {'\x1F13', '\x02E4'},
-            new char[] {'\x1F14', '\x02E5'},
-            new char[] {'\x1F15', '\x02E6'},
-            new char[] {'\x1F18', '\x02E7'},
-            new char[] {'\x1F19', '\x02E8'},
-            new char[] {'\x1F1A', '\x02E9'},
-            new char[] {'\x1F1B', '\x02EA'},
-            new char[] {'\x1F1C', '\x02EB'},
-            new char[] {'\x1F1D', '\x02EC'},
-            new char[] {'\x1F20', '\x02ED'},
-            new char[] {'\x1F21', '\x02EE'},
-            new char[] {'\x1F22', '\x02EF'},
-            new char[] {'\x1F23', '\x02F0'},
-            new char[] {'\x1F24', '\x02F1'},
-            new char[] {'\x1F25', '\x02F2'},
-            new char[] {'\x1F26', '\x02F3'},
-            new char[] {'\x1F27', '\x02F4'},
-            new char[] {'\x1F28', '\x02F5'},
-            new char[] {'\x1F29', '\x02F6'},
-            new char[] {'\x1F2A', '\x02F7'},
-            new char[] {'\x1F2B', '\x02F8'},
-            new char[] {'\x1F2C', '\x02F9'},
-            new char[] {'\x1F2D', '\x02FA'},
-            new char[] {'\x1F2E', '\x02FB'},
-            new char[] {'\x1F2F', '\x02FC'},
-            new char[] {'\x1F30', '\x02FD'},
-            new char[] {'\x1F31', '\x02FE'},
-            new char[] {'\x1F32', '\x02FF'},
-            new char[] {'\x1F33', '\x0300'},
-            new char[] {'\x1F34', '\x0301'},
-            new char[] {'\x1F35', '\x0302'},
-            new char[] {'\x1F36', '\x0303'},
-            new char[] {'\x1F37', '\x0304'},
-            new char[] {'\x1F38', '\x0305'},
-            new char[] {'\x1F39', '\x0306'},
-            new char[] {'\x1F3A', '\x0307'},
-            new char[] {'\x1F3B', '\x0308'},
-            new char[] {'\x1F3C', '\x0309'},
-            new char[] {'\x1F3D', '\x030A'},
-            new char[] {'\x1F3E', '\x030B'},
-            new char[] {'\x1F3F', '\x030C'},
-            new char[] {'\x1F40', '\x030D'},
-            new char[] {'\x1F41', '\x030E'},
-            new char[] {'\x1F42', '\x030F'},
-            new char[] {'\x1F43', '\x0310'},
-            new char[] {'\x1F44', '\x0311'},
-            new char[] {'\x1F45', '\x0312'},
-            new char[] {'\x1F48', '\x0313'},
-            new char[] {'\x1F49', '\x0314'},
-            new char[] {'\x1F4A', '\x0315'},
-            new char[] {'\x1F4B', '\x0316'},
-            new char[] {'\x1F4C', '\x0317'},
-            new char[] {'\x1F4D', '\x0318'},
-            new char[] {'\x1F50', '\x0319'},
-            new char[] {'\x1F51', '\x031A'},
-            new char[] {'\x1F52', '\x031B'},
-            new char[] {'\x1F53', '\x031C'},
-            new char[] {'\x1F54', '\x031D'},
-            new char[] {'\x1F55', '\x031E'},
-            new char[] {'\x1F56', '\x031F'},
-            new char[] {'\x1F57', '\x0320'},
-            new char[] {'\x1F59', '\x0321'},
-            new char[] {'\x1F5B', '\x0322'},
-            new char[] {'\x1F5D', '\x0323'},
-            new char[] {'\x1F5F', '\x0324'},
-            new char[] {'\x1F60', '\x0325'},
-            new char[] {'\x1F61', '\x0326'},
-            new char[] {'\x1F62', '\x0327'},
-            new char[] {'\x1F63', '\x0328'},
-            new char[] {'\x1F64', '\x0329'},
-            new char[] {'\x1F65', '\x032A'},
-            new char[] {'\x1F66', '\x032B'},
-            new char[] {'\x1F67', '\x032C'},
-            new char[] {'\x1F68', '\x032D'},
-            new char[] {'\x1F69', '\x032E'},
-            new char[] {'\x1F6A', '\x032F'},
-            new char[] {'\x1F6B', '\x0330'},
-            new char[] {'\x1F6C', '\x0331'},
-            new char[] {'\x1F6D', '\x0332'},
-            new char[] {'\x1F6E', '\x0333'},
-            new char[] {'\x1F6F', '\x0334'},
-            new char[] {'\x1F70', '\x0335'},
-            new char[] {'\x1F71', '\x0142'},
-            new char[] {'\x1F72', '\x0336'},
-            new char[] {'\x1F73', '\x0143'},
-            new char[] {'\x1F74', '\x0337'},
-            new char[] {'\x1F75', '\x0144'},
-            new char[] {'\x1F76', '\x0338'},
-            new char[] {'\x1F77', '\x0145'},
-            new char[] {'\x1F78', '\x0339'},
-            new char[] {'\x1F79', '\x0149'},
-            new char[] {'\x1F7A', '\x033A'},
-            new char[] {'\x1F7B', '\x014A'},
-            new char[] {'\x1F7C', '\x033B'},
-            new char[] {'\x1F7D', '\x014B'},
-            new char[] {'\x1F80', '\x033C'},
-            new char[] {'\x1F81', '\x033D'},
-            new char[] {'\x1F82', '\x033E'},
-            new char[] {'\x1F83', '\x033F'},
-            new char[] {'\x1F84', '\x0340'},
-            new char[] {'\x1F85', '\x0341'},
-            new char[] {'\x1F86', '\x0342'},
-            new char[] {'\x1F87', '\x0343'},
-            new char[] {'\x1F88', '\x0344'},
-            new char[] {'\x1F89', '\x0345'},
-            new char[] {'\x1F8A', '\x0346'},
-            new char[] {'\x1F8B', '\x0347'},
-            new char[] {'\x1F8C', '\x0348'},
-            new char[] {'\x1F8D', '\x0349'},
-            new char[] {'\x1F8E', '\x034A'},
-            new char[] {'\x1F8F', '\x034B'},
-            new char[] {'\x1F90', '\x034C'},
-            new char[] {'\x1F91', '\x034D'},
-            new char[] {'\x1F92', '\x034E'},
-            new char[] {'\x1F93', '\x034F'},
-            new char[] {'\x1F94', '\x0350'},
-            new char[] {'\x1F95', '\x0351'},
-            new char[] {'\x1F96', '\x0352'},
-            new char[] {'\x1F97', '\x0353'},
-            new char[] {'\x1F98', '\x0354'},
-            new char[] {'\x1F99', '\x0355'},
-            new char[] {'\x1F9A', '\x0356'},
-            new char[] {'\x1F9B', '\x0357'},
-            new char[] {'\x1F9C', '\x0358'},
-            new char[] {'\x1F9D', '\x0359'},
-            new char[] {'\x1F9E', '\x035A'},
-            new char[] {'\x1F9F', '\x035B'},
-            new char[] {'\x1FA0', '\x035C'},
-            new char[] {'\x1FA1', '\x035D'},
-            new char[] {'\x1FA2', '\x035E'},
-            new char[] {'\x1FA3', '\x035F'},
-            new char[] {'\x1FA4', '\x0360'},
-            new char[] {'\x1FA5', '\x0361'},
-            new char[] {'\x1FA6', '\x0362'},
-            new char[] {'\x1FA7', '\x0363'},
-            new char[] {'\x1FA8', '\x0364'},
-            new char[] {'\x1FA9', '\x0365'},
-            new char[] {'\x1FAA', '\x0366'},
-            new char[] {'\x1FAB', '\x0367'},
-            new char[] {'\x1FAC', '\x0368'},
-            new char[] {'\x1FAD', '\x0369'},
-            new char[] {'\x1FAE', '\x036A'},
-            new char[] {'\x1FAF', '\x036B'},
-            new char[] {'\x1FB0', '\x036C'},
-            new char[] {'\x1FB1', '\x036D'},
-            new char[] {'\x1FB2', '\x036E'},
-            new char[] {'\x1FB3', '\x036F'},
-            new char[] {'\x1FB4', '\x0370'},
-            new char[] {'\x1FB6', '\x0371'},
-            new char[] {'\x1FB7', '\x0372'},
-            new char[] {'\x1FB8', '\x0373'},
-            new char[] {'\x1FB9', '\x0374'},
-            new char[] {'\x1FBA', '\x0375'},
-            new char[] {'\x1FBB', '\x0137'},
-            new char[] {'\x1FBC', '\x0376'},
-            new char[] {'\x1FBD', '\x0377'},
-            new char[] {'\x1FBE', '\x0378'},
-            new char[] {'\x1FBF', '\x0377'},
-            new char[] {'\x1FC0', '\x0379'},
-            new char[] {'\x1FC1', '\x037A'},
-            new char[] {'\x1FC2', '\x037B'},
-            new char[] {'\x1FC3', '\x037C'},
-            new char[] {'\x1FC4', '\x037D'},
-            new char[] {'\x1FC6', '\x037E'},
-            new char[] {'\x1FC7', '\x037F'},
-            new char[] {'\x1FC8', '\x0380'},
-            new char[] {'\x1FC9', '\x0139'},
-            new char[] {'\x1FCA', '\x0381'},
-            new char[] {'\x1FCB', '\x013A'},
-            new char[] {'\x1FCC', '\x0382'},
-            new char[] {'\x1FCD', '\x0383'},
-            new char[] {'\x1FCE', '\x0384'},
-            new char[] {'\x1FCF', '\x0385'},
-            new char[] {'\x1FD0', '\x0386'},
-            new char[] {'\x1FD1', '\x0387'},
-            new char[] {'\x1FD2', '\x0388'},
-            new char[] {'\x1FD3', '\x013F'},
-            new char[] {'\x1FD6', '\x0389'},
-            new char[] {'\x1FD7', '\x038A'},
-            new char[] {'\x1FD8', '\x038B'},
-            new char[] {'\x1FD9', '\x038C'},
-            new char[] {'\x1FDA', '\x038D'},
-            new char[] {'\x1FDB', '\x013B'},
-            new char[] {'\x1FDD', '\x038E'},
-            new char[] {'\x1FDE', '\x038F'},
-            new char[] {'\x1FDF', '\x0390'},
-            new char[] {'\x1FE0', '\x0391'},
-            new char[] {'\x1FE1', '\x0392'},
-            new char[] {'\x1FE2', '\x0393'},
-            new char[] {'\x1FE3', '\x0146'},
-            new char[] {'\x1FE4', '\x0394'},
-            new char[] {'\x1FE5', '\x0395'},
-            new char[] {'\x1FE6', '\x0396'},
-            new char[] {'\x1FE7', '\x0397'},
-            new char[] {'\x1FE8', '\x0398'},
-            new char[] {'\x1FE9', '\x0399'},
-            new char[] {'\x1FEA', '\x039A'},
-            new char[] {'\x1FEB', '\x013D'},
-            new char[] {'\x1FEC', '\x039B'},
-            new char[] {'\x1FED', '\x039C'},
-            new char[] {'\x1FEE', '\x0136'},
-            new char[] {'\x1FEF', '\x039D'},
-            new char[] {'\x1FF2', '\x039E'},
-            new char[] {'\x1FF3', '\x039F'},
-            new char[] {'\x1FF4', '\x03A0'},
-            new char[] {'\x1FF6', '\x03A1'},
-            new char[] {'\x1FF7', '\x03A2'},
-            new char[] {'\x1FF8', '\x03A3'},
-            new char[] {'\x1FF9', '\x013C'},
-            new char[] {'\x1FFA', '\x03A4'},
-            new char[] {'\x1FFB', '\x013E'},
-            new char[] {'\x1FFC', '\x03A5'},
-            new char[] {'\x1FFD', '\x0006'},
-            new char[] {'\x1FFE', '\x03A6'},
-            new char[] {'\x2000', '\x0000'},
-            new char[] {'\x2001', '\x0000'},
-            new char[] {'\x2002', '\x0000'},
-            new char[] {'\x2003', '\x0000'},
-            new char[] {'\x2004', '\x0000'},
-            new char[] {'\x2005', '\x0000'},
-            new char[] {'\x2006', '\x0000'},
-            new char[] {'\x2007', '\x0000'},
-            new char[] {'\x2008', '\x0000'},
-            new char[] {'\x2009', '\x0000'},
-            new char[] {'\x200A', '\x0000'},
-            new char[] {'\x2011', '\x03A7'},
-            new char[] {'\x2017', '\x03A8'},
-            new char[] {'\x2024', '\x03A9'},
-            new char[] {'\x2025', '\x03AA'},
-            new char[] {'\x2026', '\x03AB'},
-            new char[] {'\x202F', '\x0000'},
-            new char[] {'\x2033', '\x03AC'},
-            new char[] {'\x2034', '\x03AD'},
-            new char[] {'\x2036', '\x03AE'},
-            new char[] {'\x2037', '\x03AF'},
-            new char[] {'\x203C', '\x03B0'},
-            new char[] {'\x203E', '\x03B1'},
-            new char[] {'\x2047', '\x03B2'},
-            new char[] {'\x2048', '\x03B3'},
-            new char[] {'\x2049', '\x03B4'},
-            new char[] {'\x2057', '\x03B5'},
-            new char[] {'\x205F', '\x0000'},
-            new char[] {'\x2070', '\x03B6'},
-            new char[] {'\x2071', '\x03B7'},
-            new char[] {'\x2074', '\x03B8'},
-            new char[] {'\x2075', '\x03B9'},
-            new char[] {'\x2076', '\x03BA'},
-            new char[] {'\x2077', '\x03BB'},
-            new char[] {'\x2078', '\x03BC'},
-            new char[] {'\x2079', '\x03BD'},
-            new char[] {'\x207A', '\x03BE'},
-            new char[] {'\x207B', '\x03BF'},
-            new char[] {'\x207C', '\x03C0'},
-            new char[] {'\x207D', '\x03C1'},
-            new char[] {'\x207E', '\x03C2'},
-            new char[] {'\x207F', '\x03C3'},
-            new char[] {'\x2080', '\x03B6'},
-            new char[] {'\x2081', '\x0009'},
-            new char[] {'\x2082', '\x0004'},
-            new char[] {'\x2083', '\x0005'},
-            new char[] {'\x2084', '\x03B8'},
-            new char[] {'\x2085', '\x03B9'},
-            new char[] {'\x2086', '\x03BA'},
-            new char[] {'\x2087', '\x03BB'},
-            new char[] {'\x2088', '\x03BC'},
-            new char[] {'\x2089', '\x03BD'},
-            new char[] {'\x208A', '\x03BE'},
-            new char[] {'\x208B', '\x03BF'},
-            new char[] {'\x208C', '\x03C0'},
-            new char[] {'\x208D', '\x03C1'},
-            new char[] {'\x208E', '\x03C2'},
-            new char[] {'\x20A8', '\x03C4'},
-            new char[] {'\x2100', '\x03C5'},
-            new char[] {'\x2101', '\x03C6'},
-            new char[] {'\x2102', '\x03C7'},
-            new char[] {'\x2103', '\x03C8'},
-            new char[] {'\x2105', '\x03C9'},
-            new char[] {'\x2106', '\x03CA'},
-            new char[] {'\x2107', '\x03CB'},
-            new char[] {'\x2109', '\x03CC'},
-            new char[] {'\x210A', '\x03CD'},
-            new char[] {'\x210B', '\x03CE'},
-            new char[] {'\x210C', '\x03CE'},
-            new char[] {'\x210D', '\x03CE'},
-            new char[] {'\x210E', '\x011C'},
-            new char[] {'\x210F', '\x03CF'},
-            new char[] {'\x2110', '\x03D0'},
-            new char[] {'\x2111', '\x03D0'},
-            new char[] {'\x2112', '\x03D1'},
-            new char[] {'\x2113', '\x012C'},
-            new char[] {'\x2115', '\x03D2'},
-            new char[] {'\x2116', '\x03D3'},
-            new char[] {'\x2119', '\x03D4'},
-            new char[] {'\x211A', '\x03D5'},
-            new char[] {'\x211B', '\x03D6'},
-            new char[] {'\x211C', '\x03D6'},
-            new char[] {'\x211D', '\x03D6'},
-            new char[] {'\x2120', '\x03D7'},
-            new char[] {'\x2121', '\x03D8'},
-            new char[] {'\x2122', '\x03D9'},
-            new char[] {'\x2124', '\x03DA'},
-            new char[] {'\x2126', '\x03DB'},
-            new char[] {'\x2128', '\x03DA'},
-            new char[] {'\x212A', '\x03DC'},
-            new char[] {'\x212B', '\x0013'},
-            new char[] {'\x212C', '\x03DD'},
-            new char[] {'\x212D', '\x03C7'},
-            new char[] {'\x212F', '\x03DE'},
-            new char[] {'\x2130', '\x03DF'},
-            new char[] {'\x2131', '\x03E0'},
-            new char[] {'\x2133', '\x03E1'},
-            new char[] {'\x2134', '\x000A'},
-            new char[] {'\x2135', '\x03E2'},
-            new char[] {'\x2136', '\x03E3'},
-            new char[] {'\x2137', '\x03E4'},
-            new char[] {'\x2138', '\x03E5'},
-            new char[] {'\x2139', '\x03B7'},
-            new char[] {'\x213D', '\x03E6'},
-            new char[] {'\x213E', '\x03E7'},
-            new char[] {'\x213F', '\x03E8'},
-            new char[] {'\x2140', '\x03E9'},
-            new char[] {'\x2145', '\x03EA'},
-            new char[] {'\x2146', '\x03EB'},
-            new char[] {'\x2147', '\x03DE'},
-            new char[] {'\x2148', '\x03B7'},
-            new char[] {'\x2149', '\x011E'},
-            new char[] {'\x2153', '\x03EC'},
-            new char[] {'\x2154', '\x03ED'},
-            new char[] {'\x2155', '\x03EE'},
-            new char[] {'\x2156', '\x03EF'},
-            new char[] {'\x2157', '\x03F0'},
-            new char[] {'\x2158', '\x03F1'},
-            new char[] {'\x2159', '\x03F2'},
-            new char[] {'\x215A', '\x03F3'},
-            new char[] {'\x215B', '\x03F4'},
-            new char[] {'\x215C', '\x03F5'},
-            new char[] {'\x215D', '\x03F6'},
-            new char[] {'\x215E', '\x03F7'},
-            new char[] {'\x215F', '\x03F8'},
-            new char[] {'\x2160', '\x03D0'},
-            new char[] {'\x2161', '\x03F9'},
-            new char[] {'\x2162', '\x03FA'},
-            new char[] {'\x2163', '\x03FB'},
-            new char[] {'\x2164', '\x03FC'},
-            new char[] {'\x2165', '\x03FD'},
-            new char[] {'\x2166', '\x03FE'},
-            new char[] {'\x2167', '\x03FF'},
-            new char[] {'\x2168', '\x0400'},
-            new char[] {'\x2169', '\x0401'},
-            new char[] {'\x216A', '\x0402'},
-            new char[] {'\x216B', '\x0403'},
-            new char[] {'\x216C', '\x03D1'},
-            new char[] {'\x216D', '\x03C7'},
-            new char[] {'\x216E', '\x03EA'},
-            new char[] {'\x216F', '\x03E1'},
-            new char[] {'\x2170', '\x03B7'},
-            new char[] {'\x2171', '\x0404'},
-            new char[] {'\x2172', '\x0405'},
-            new char[] {'\x2173', '\x0406'},
-            new char[] {'\x2174', '\x0407'},
-            new char[] {'\x2175', '\x0408'},
-            new char[] {'\x2176', '\x0409'},
-            new char[] {'\x2177', '\x040A'},
-            new char[] {'\x2178', '\x040B'},
-            new char[] {'\x2179', '\x012D'},
-            new char[] {'\x217A', '\x040C'},
-            new char[] {'\x217B', '\x040D'},
-            new char[] {'\x217C', '\x012C'},
-            new char[] {'\x217D', '\x040E'},
-            new char[] {'\x217E', '\x03EB'},
-            new char[] {'\x217F', '\x040F'},
-            new char[] {'\x219A', '\x0410'},
-            new char[] {'\x219B', '\x0411'},
-            new char[] {'\x21AE', '\x0412'},
-            new char[] {'\x21CD', '\x0413'},
-            new char[] {'\x21CE', '\x0414'},
-            new char[] {'\x21CF', '\x0415'},
-            new char[] {'\x2204', '\x0416'},
-            new char[] {'\x2209', '\x0417'},
-            new char[] {'\x220C', '\x0418'},
-            new char[] {'\x2224', '\x0419'},
-            new char[] {'\x2226', '\x041A'},
-            new char[] {'\x222C', '\x041B'},
-            new char[] {'\x222D', '\x041C'},
-            new char[] {'\x222F', '\x041D'},
-            new char[] {'\x2230', '\x041E'},
-            new char[] {'\x2241', '\x041F'},
-            new char[] {'\x2244', '\x0420'},
-            new char[] {'\x2247', '\x0421'},
-            new char[] {'\x2249', '\x0422'},
-            new char[] {'\x2260', '\x0423'},
-            new char[] {'\x2262', '\x0424'},
-            new char[] {'\x226D', '\x0425'},
-            new char[] {'\x226E', '\x0426'},
-            new char[] {'\x226F', '\x0427'},
-            new char[] {'\x2270', '\x0428'},
-            new char[] {'\x2271', '\x0429'},
-            new char[] {'\x2274', '\x042A'},
-            new char[] {'\x2275', '\x042B'},
-            new char[] {'\x2278', '\x042C'},
-            new char[] {'\x2279', '\x042D'},
-            new char[] {'\x2280', '\x042E'},
-            new char[] {'\x2281', '\x042F'},
-            new char[] {'\x2284', '\x0430'},
-            new char[] {'\x2285', '\x0431'},
-            new char[] {'\x2288', '\x0432'},
-            new char[] {'\x2289', '\x0433'},
-            new char[] {'\x22AC', '\x0434'},
-            new char[] {'\x22AD', '\x0435'},
-            new char[] {'\x22AE', '\x0436'},
-            new char[] {'\x22AF', '\x0437'},
-            new char[] {'\x22E0', '\x0438'},
-            new char[] {'\x22E1', '\x0439'},
-            new char[] {'\x22E2', '\x043A'},
-            new char[] {'\x22E3', '\x043B'},
-            new char[] {'\x22EA', '\x043C'},
-            new char[] {'\x22EB', '\x043D'},
-            new char[] {'\x22EC', '\x043E'},
-            new char[] {'\x22ED', '\x043F'},
-            new char[] {'\x2329', '\x0440'},
-            new char[] {'\x232A', '\x0441'},
-            new char[] {'\x2460', '\x0009'},
-            new char[] {'\x2461', '\x0004'},
-            new char[] {'\x2462', '\x0005'},
-            new char[] {'\x2463', '\x03B8'},
-            new char[] {'\x2464', '\x03B9'},
-            new char[] {'\x2465', '\x03BA'},
-            new char[] {'\x2466', '\x03BB'},
-            new char[] {'\x2467', '\x03BC'},
-            new char[] {'\x2468', '\x03BD'},
-            new char[] {'\x2469', '\x0442'},
-            new char[] {'\x246A', '\x0443'},
-            new char[] {'\x246B', '\x0444'},
-            new char[] {'\x246C', '\x0445'},
-            new char[] {'\x246D', '\x0446'},
-            new char[] {'\x246E', '\x0447'},
-            new char[] {'\x246F', '\x0448'},
-            new char[] {'\x2470', '\x0449'},
-            new char[] {'\x2471', '\x044A'},
-            new char[] {'\x2472', '\x044B'},
-            new char[] {'\x2473', '\x044C'},
-            new char[] {'\x2474', '\x044D'},
-            new char[] {'\x2475', '\x044E'},
-            new char[] {'\x2476', '\x044F'},
-            new char[] {'\x2477', '\x0450'},
-            new char[] {'\x2478', '\x0451'},
-            new char[] {'\x2479', '\x0452'},
-            new char[] {'\x247A', '\x0453'},
-            new char[] {'\x247B', '\x0454'},
-            new char[] {'\x247C', '\x0455'},
-            new char[] {'\x247D', '\x0456'},
-            new char[] {'\x247E', '\x0457'},
-            new char[] {'\x247F', '\x0458'},
-            new char[] {'\x2480', '\x0459'},
-            new char[] {'\x2481', '\x045A'},
-            new char[] {'\x2482', '\x045B'},
-            new char[] {'\x2483', '\x045C'},
-            new char[] {'\x2484', '\x045D'},
-            new char[] {'\x2485', '\x045E'},
-            new char[] {'\x2486', '\x045F'},
-            new char[] {'\x2487', '\x0460'},
-            new char[] {'\x2488', '\x0461'},
-            new char[] {'\x2489', '\x0462'},
-            new char[] {'\x248A', '\x0463'},
-            new char[] {'\x248B', '\x0464'},
-            new char[] {'\x248C', '\x0465'},
-            new char[] {'\x248D', '\x0466'},
-            new char[] {'\x248E', '\x0467'},
-            new char[] {'\x248F', '\x0468'},
-            new char[] {'\x2490', '\x0469'},
-            new char[] {'\x2491', '\x046A'},
-            new char[] {'\x2492', '\x046B'},
-            new char[] {'\x2493', '\x046C'},
-            new char[] {'\x2494', '\x046D'},
-            new char[] {'\x2495', '\x046E'},
-            new char[] {'\x2496', '\x046F'},
-            new char[] {'\x2497', '\x0470'},
-            new char[] {'\x2498', '\x0471'},
-            new char[] {'\x2499', '\x0472'},
-            new char[] {'\x249A', '\x0473'},
-            new char[] {'\x249B', '\x0474'},
-            new char[] {'\x249C', '\x0475'},
-            new char[] {'\x249D', '\x0476'},
-            new char[] {'\x249E', '\x0477'},
-            new char[] {'\x249F', '\x0478'},
-            new char[] {'\x24A0', '\x0479'},
-            new char[] {'\x24A1', '\x047A'},
-            new char[] {'\x24A2', '\x047B'},
-            new char[] {'\x24A3', '\x047C'},
-            new char[] {'\x24A4', '\x047D'},
-            new char[] {'\x24A5', '\x047E'},
-            new char[] {'\x24A6', '\x047F'},
-            new char[] {'\x24A7', '\x0480'},
-            new char[] {'\x24A8', '\x0481'},
-            new char[] {'\x24A9', '\x0482'},
-            new char[] {'\x24AA', '\x0483'},
-            new char[] {'\x24AB', '\x0484'},
-            new char[] {'\x24AC', '\x0485'},
-            new char[] {'\x24AD', '\x0486'},
-            new char[] {'\x24AE', '\x0487'},
-            new char[] {'\x24AF', '\x0488'},
-            new char[] {'\x24B0', '\x0489'},
-            new char[] {'\x24B1', '\x048A'},
-            new char[] {'\x24B2', '\x048B'},
-            new char[] {'\x24B3', '\x048C'},
-            new char[] {'\x24B4', '\x048D'},
-            new char[] {'\x24B5', '\x048E'},
-            new char[] {'\x24B6', '\x048F'},
-            new char[] {'\x24B7', '\x03DD'},
-            new char[] {'\x24B8', '\x03C7'},
-            new char[] {'\x24B9', '\x03EA'},
-            new char[] {'\x24BA', '\x03DF'},
-            new char[] {'\x24BB', '\x03E0'},
-            new char[] {'\x24BC', '\x0490'},
-            new char[] {'\x24BD', '\x03CE'},
-            new char[] {'\x24BE', '\x03D0'},
-            new char[] {'\x24BF', '\x0491'},
-            new char[] {'\x24C0', '\x03DC'},
-            new char[] {'\x24C1', '\x03D1'},
-            new char[] {'\x24C2', '\x03E1'},
-            new char[] {'\x24C3', '\x03D2'},
-            new char[] {'\x24C4', '\x0492'},
-            new char[] {'\x24C5', '\x03D4'},
-            new char[] {'\x24C6', '\x03D5'},
-            new char[] {'\x24C7', '\x03D6'},
-            new char[] {'\x24C8', '\x0493'},
-            new char[] {'\x24C9', '\x0494'},
-            new char[] {'\x24CA', '\x0495'},
-            new char[] {'\x24CB', '\x03FC'},
-            new char[] {'\x24CC', '\x0496'},
-            new char[] {'\x24CD', '\x0401'},
-            new char[] {'\x24CE', '\x0497'},
-            new char[] {'\x24CF', '\x03DA'},
-            new char[] {'\x24D0', '\x0002'},
-            new char[] {'\x24D1', '\x0498'},
-            new char[] {'\x24D2', '\x040E'},
-            new char[] {'\x24D3', '\x03EB'},
-            new char[] {'\x24D4', '\x03DE'},
-            new char[] {'\x24D5', '\x0499'},
-            new char[] {'\x24D6', '\x03CD'},
-            new char[] {'\x24D7', '\x011C'},
-            new char[] {'\x24D8', '\x03B7'},
-            new char[] {'\x24D9', '\x011E'},
-            new char[] {'\x24DA', '\x049A'},
-            new char[] {'\x24DB', '\x012C'},
-            new char[] {'\x24DC', '\x040F'},
-            new char[] {'\x24DD', '\x03C3'},
-            new char[] {'\x24DE', '\x000A'},
-            new char[] {'\x24DF', '\x049B'},
-            new char[] {'\x24E0', '\x049C'},
-            new char[] {'\x24E1', '\x011F'},
-            new char[] {'\x24E2', '\x00B4'},
-            new char[] {'\x24E3', '\x049D'},
-            new char[] {'\x24E4', '\x049E'},
-            new char[] {'\x24E5', '\x0407'},
-            new char[] {'\x24E6', '\x0123'},
-            new char[] {'\x24E7', '\x012D'},
-            new char[] {'\x24E8', '\x0124'},
-            new char[] {'\x24E9', '\x049F'},
-            new char[] {'\x24EA', '\x03B6'},
-            new char[] {'\x2A0C', '\x04A0'},
-            new char[] {'\x2A74', '\x04A1'},
-            new char[] {'\x2A75', '\x04A2'},
-            new char[] {'\x2A76', '\x04A3'},
-            new char[] {'\x2ADC', '\x04A4'},
-            new char[] {'\x2E9F', '\x04A5'},
-            new char[] {'\x2EF3', '\x04A6'},
-            new char[] {'\x2F00', '\x04A7'},
-            new char[] {'\x2F01', '\x04A8'},
-            new char[] {'\x2F02', '\x04A9'},
-            new char[] {'\x2F03', '\x04AA'},
-            new char[] {'\x2F04', '\x04AB'},
-            new char[] {'\x2F05', '\x04AC'},
-            new char[] {'\x2F06', '\x04AD'},
-            new char[] {'\x2F07', '\x04AE'},
-            new char[] {'\x2F08', '\x04AF'},
-            new char[] {'\x2F09', '\x04B0'},
-            new char[] {'\x2F0A', '\x04B1'},
-            new char[] {'\x2F0B', '\x04B2'},
-            new char[] {'\x2F0C', '\x04B3'},
-            new char[] {'\x2F0D', '\x04B4'},
-            new char[] {'\x2F0E', '\x04B5'},
-            new char[] {'\x2F0F', '\x04B6'},
-            new char[] {'\x2F10', '\x04B7'},
-            new char[] {'\x2F11', '\x04B8'},
-            new char[] {'\x2F12', '\x04B9'},
-            new char[] {'\x2F13', '\x04BA'},
-            new char[] {'\x2F14', '\x04BB'},
-            new char[] {'\x2F15', '\x04BC'},
-            new char[] {'\x2F16', '\x04BD'},
-            new char[] {'\x2F17', '\x04BE'},
-            new char[] {'\x2F18', '\x04BF'},
-            new char[] {'\x2F19', '\x04C0'},
-            new char[] {'\x2F1A', '\x04C1'},
-            new char[] {'\x2F1B', '\x04C2'},
-            new char[] {'\x2F1C', '\x04C3'},
-            new char[] {'\x2F1D', '\x04C4'},
-            new char[] {'\x2F1E', '\x04C5'},
-            new char[] {'\x2F1F', '\x04C6'},
-            new char[] {'\x2F20', '\x04C7'},
-            new char[] {'\x2F21', '\x04C8'},
-            new char[] {'\x2F22', '\x04C9'},
-            new char[] {'\x2F23', '\x04CA'},
-            new char[] {'\x2F24', '\x04CB'},
-            new char[] {'\x2F25', '\x04CC'},
-            new char[] {'\x2F26', '\x04CD'},
-            new char[] {'\x2F27', '\x04CE'},
-            new char[] {'\x2F28', '\x04CF'},
-            new char[] {'\x2F29', '\x04D0'},
-            new char[] {'\x2F2A', '\x04D1'},
-            new char[] {'\x2F2B', '\x04D2'},
-            new char[] {'\x2F2C', '\x04D3'},
-            new char[] {'\x2F2D', '\x04D4'},
-            new char[] {'\x2F2E', '\x04D5'},
-            new char[] {'\x2F2F', '\x04D6'},
-            new char[] {'\x2F30', '\x04D7'},
-            new char[] {'\x2F31', '\x04D8'},
-            new char[] {'\x2F32', '\x04D9'},
-            new char[] {'\x2F33', '\x04DA'},
-            new char[] {'\x2F34', '\x04DB'},
-            new char[] {'\x2F35', '\x04DC'},
-            new char[] {'\x2F36', '\x04DD'},
-            new char[] {'\x2F37', '\x04DE'},
-            new char[] {'\x2F38', '\x04DF'},
-            new char[] {'\x2F39', '\x04E0'},
-            new char[] {'\x2F3A', '\x04E1'},
-            new char[] {'\x2F3B', '\x04E2'},
-            new char[] {'\x2F3C', '\x04E3'},
-            new char[] {'\x2F3D', '\x04E4'},
-            new char[] {'\x2F3E', '\x04E5'},
-            new char[] {'\x2F3F', '\x04E6'},
-            new char[] {'\x2F40', '\x04E7'},
-            new char[] {'\x2F41', '\x04E8'},
-            new char[] {'\x2F42', '\x04E9'},
-            new char[] {'\x2F43', '\x04EA'},
-            new char[] {'\x2F44', '\x04EB'},
-            new char[] {'\x2F45', '\x04EC'},
-            new char[] {'\x2F46', '\x04ED'},
-            new char[] {'\x2F47', '\x04EE'},
-            new char[] {'\x2F48', '\x04EF'},
-            new char[] {'\x2F49', '\x04F0'},
-            new char[] {'\x2F4A', '\x04F1'},
-            new char[] {'\x2F4B', '\x04F2'},
-            new char[] {'\x2F4C', '\x04F3'},
-            new char[] {'\x2F4D', '\x04F4'},
-            new char[] {'\x2F4E', '\x04F5'},
-            new char[] {'\x2F4F', '\x04F6'},
-            new char[] {'\x2F50', '\x04F7'},
-            new char[] {'\x2F51', '\x04F8'},
-            new char[] {'\x2F52', '\x04F9'},
-            new char[] {'\x2F53', '\x04FA'},
-            new char[] {'\x2F54', '\x04FB'},
-            new char[] {'\x2F55', '\x04FC'},
-            new char[] {'\x2F56', '\x04FD'},
-            new char[] {'\x2F57', '\x04FE'},
-            new char[] {'\x2F58', '\x04FF'},
-            new char[] {'\x2F59', '\x0500'},
-            new char[] {'\x2F5A', '\x0501'},
-            new char[] {'\x2F5B', '\x0502'},
-            new char[] {'\x2F5C', '\x0503'},
-            new char[] {'\x2F5D', '\x0504'},
-            new char[] {'\x2F5E', '\x0505'},
-            new char[] {'\x2F5F', '\x0506'},
-            new char[] {'\x2F60', '\x0507'},
-            new char[] {'\x2F61', '\x0508'},
-            new char[] {'\x2F62', '\x0509'},
-            new char[] {'\x2F63', '\x050A'},
-            new char[] {'\x2F64', '\x050B'},
-            new char[] {'\x2F65', '\x050C'},
-            new char[] {'\x2F66', '\x050D'},
-            new char[] {'\x2F67', '\x050E'},
-            new char[] {'\x2F68', '\x050F'},
-            new char[] {'\x2F69', '\x0510'},
-            new char[] {'\x2F6A', '\x0511'},
-            new char[] {'\x2F6B', '\x0512'},
-            new char[] {'\x2F6C', '\x0513'},
-            new char[] {'\x2F6D', '\x0514'},
-            new char[] {'\x2F6E', '\x0515'},
-            new char[] {'\x2F6F', '\x0516'},
-            new char[] {'\x2F70', '\x0517'},
-            new char[] {'\x2F71', '\x0518'},
-            new char[] {'\x2F72', '\x0519'},
-            new char[] {'\x2F73', '\x051A'},
-            new char[] {'\x2F74', '\x051B'},
-            new char[] {'\x2F75', '\x051C'},
-            new char[] {'\x2F76', '\x051D'},
-            new char[] {'\x2F77', '\x051E'},
-            new char[] {'\x2F78', '\x051F'},
-            new char[] {'\x2F79', '\x0520'},
-            new char[] {'\x2F7A', '\x0521'},
-            new char[] {'\x2F7B', '\x0522'},
-            new char[] {'\x2F7C', '\x0523'},
-            new char[] {'\x2F7D', '\x0524'},
-            new char[] {'\x2F7E', '\x0525'},
-            new char[] {'\x2F7F', '\x0526'},
-            new char[] {'\x2F80', '\x0527'},
-            new char[] {'\x2F81', '\x0528'},
-            new char[] {'\x2F82', '\x0529'},
-            new char[] {'\x2F83', '\x052A'},
-            new char[] {'\x2F84', '\x052B'},
-            new char[] {'\x2F85', '\x052C'},
-            new char[] {'\x2F86', '\x052D'},
-            new char[] {'\x2F87', '\x052E'},
-            new char[] {'\x2F88', '\x052F'},
-            new char[] {'\x2F89', '\x0530'},
-            new char[] {'\x2F8A', '\x0531'},
-            new char[] {'\x2F8B', '\x0532'},
-            new char[] {'\x2F8C', '\x0533'},
-            new char[] {'\x2F8D', '\x0534'},
-            new char[] {'\x2F8E', '\x0535'},
-            new char[] {'\x2F8F', '\x0536'},
-            new char[] {'\x2F90', '\x0537'},
-            new char[] {'\x2F91', '\x0538'},
-            new char[] {'\x2F92', '\x0539'},
-            new char[] {'\x2F93', '\x053A'},
-            new char[] {'\x2F94', '\x053B'},
-            new char[] {'\x2F95', '\x053C'},
-            new char[] {'\x2F96', '\x053D'},
-            new char[] {'\x2F97', '\x053E'},
-            new char[] {'\x2F98', '\x053F'},
-            new char[] {'\x2F99', '\x0540'},
-            new char[] {'\x2F9A', '\x0541'},
-            new char[] {'\x2F9B', '\x0542'},
-            new char[] {'\x2F9C', '\x0543'},
-            new char[] {'\x2F9D', '\x0544'},
-            new char[] {'\x2F9E', '\x0545'},
-            new char[] {'\x2F9F', '\x0546'},
-            new char[] {'\x2FA0', '\x0547'},
-            new char[] {'\x2FA1', '\x0548'},
-            new char[] {'\x2FA2', '\x0549'},
-            new char[] {'\x2FA3', '\x054A'},
-            new char[] {'\x2FA4', '\x054B'},
-            new char[] {'\x2FA5', '\x054C'},
-            new char[] {'\x2FA6', '\x054D'},
-            new char[] {'\x2FA7', '\x054E'},
-            new char[] {'\x2FA8', '\x054F'},
-            new char[] {'\x2FA9', '\x0550'},
-            new char[] {'\x2FAA', '\x0551'},
-            new char[] {'\x2FAB', '\x0552'},
-            new char[] {'\x2FAC', '\x0553'},
-            new char[] {'\x2FAD', '\x0554'},
-            new char[] {'\x2FAE', '\x0555'},
-            new char[] {'\x2FAF', '\x0556'},
-            new char[] {'\x2FB0', '\x0557'},
-            new char[] {'\x2FB1', '\x0558'},
-            new char[] {'\x2FB2', '\x0559'},
-            new char[] {'\x2FB3', '\x055A'},
-            new char[] {'\x2FB4', '\x055B'},
-            new char[] {'\x2FB5', '\x055C'},
-            new char[] {'\x2FB6', '\x055D'},
-            new char[] {'\x2FB7', '\x055E'},
-            new char[] {'\x2FB8', '\x055F'},
-            new char[] {'\x2FB9', '\x0560'},
-            new char[] {'\x2FBA', '\x0561'},
-            new char[] {'\x2FBB', '\x0562'},
-            new char[] {'\x2FBC', '\x0563'},
-            new char[] {'\x2FBD', '\x0564'},
-            new char[] {'\x2FBE', '\x0565'},
-            new char[] {'\x2FBF', '\x0566'},
-            new char[] {'\x2FC0', '\x0567'},
-            new char[] {'\x2FC1', '\x0568'},
-            new char[] {'\x2FC2', '\x0569'},
-            new char[] {'\x2FC3', '\x056A'},
-            new char[] {'\x2FC4', '\x056B'},
-            new char[] {'\x2FC5', '\x056C'},
-            new char[] {'\x2FC6', '\x056D'},
-            new char[] {'\x2FC7', '\x056E'},
-            new char[] {'\x2FC8', '\x056F'},
-            new char[] {'\x2FC9', '\x0570'},
-            new char[] {'\x2FCA', '\x0571'},
-            new char[] {'\x2FCB', '\x0572'},
-            new char[] {'\x2FCC', '\x0573'},
-            new char[] {'\x2FCD', '\x0574'},
-            new char[] {'\x2FCE', '\x0575'},
-            new char[] {'\x2FCF', '\x0576'},
-            new char[] {'\x2FD0', '\x0577'},
-            new char[] {'\x2FD1', '\x0578'},
-            new char[] {'\x2FD2', '\x0579'},
-            new char[] {'\x2FD3', '\x057A'},
-            new char[] {'\x2FD4', '\x057B'},
-            new char[] {'\x2FD5', '\x057C'},
-            new char[] {'\x3000', '\x0000'},
-            new char[] {'\x3036', '\x057D'},
-            new char[] {'\x3038', '\x04BE'},
-            new char[] {'\x3039', '\x057E'},
-            new char[] {'\x303A', '\x057F'},
-            new char[] {'\x304C', '\x0580'},
-            new char[] {'\x304E', '\x0581'},
-            new char[] {'\x3050', '\x0582'},
-            new char[] {'\x3052', '\x0583'},
-            new char[] {'\x3054', '\x0584'},
-            new char[] {'\x3056', '\x0585'},
-            new char[] {'\x3058', '\x0586'},
-            new char[] {'\x305A', '\x0587'},
-            new char[] {'\x305C', '\x0588'},
-            new char[] {'\x305E', '\x0589'},
-            new char[] {'\x3060', '\x058A'},
-            new char[] {'\x3062', '\x058B'},
-            new char[] {'\x3065', '\x058C'},
-            new char[] {'\x3067', '\x058D'},
-            new char[] {'\x3069', '\x058E'},
-            new char[] {'\x3070', '\x058F'},
-            new char[] {'\x3071', '\x0590'},
-            new char[] {'\x3073', '\x0591'},
-            new char[] {'\x3074', '\x0592'},
-            new char[] {'\x3076', '\x0593'},
-            new char[] {'\x3077', '\x0594'},
-            new char[] {'\x3079', '\x0595'},
-            new char[] {'\x307A', '\x0596'},
-            new char[] {'\x307C', '\x0597'},
-            new char[] {'\x307D', '\x0598'},
-            new char[] {'\x3094', '\x0599'},
-            new char[] {'\x309B', '\x059A'},
-            new char[] {'\x309C', '\x059B'},
-            new char[] {'\x309E', '\x059C'},
-            new char[] {'\x309F', '\x059D'},
-            new char[] {'\x30AC', '\x059E'},
-            new char[] {'\x30AE', '\x059F'},
-            new char[] {'\x30B0', '\x05A0'},
-            new char[] {'\x30B2', '\x05A1'},
-            new char[] {'\x30B4', '\x05A2'},
-            new char[] {'\x30B6', '\x05A3'},
-            new char[] {'\x30B8', '\x05A4'},
-            new char[] {'\x30BA', '\x05A5'},
-            new char[] {'\x30BC', '\x05A6'},
-            new char[] {'\x30BE', '\x05A7'},
-            new char[] {'\x30C0', '\x05A8'},
-            new char[] {'\x30C2', '\x05A9'},
-            new char[] {'\x30C5', '\x05AA'},
-            new char[] {'\x30C7', '\x05AB'},
-            new char[] {'\x30C9', '\x05AC'},
-            new char[] {'\x30D0', '\x05AD'},
-            new char[] {'\x30D1', '\x05AE'},
-            new char[] {'\x30D3', '\x05AF'},
-            new char[] {'\x30D4', '\x05B0'},
-            new char[] {'\x30D6', '\x05B1'},
-            new char[] {'\x30D7', '\x05B2'},
-            new char[] {'\x30D9', '\x05B3'},
-            new char[] {'\x30DA', '\x05B4'},
-            new char[] {'\x30DC', '\x05B5'},
-            new char[] {'\x30DD', '\x05B6'},
-            new char[] {'\x30F4', '\x05B7'},
-            new char[] {'\x30F7', '\x05B8'},
-            new char[] {'\x30F8', '\x05B9'},
-            new char[] {'\x30F9', '\x05BA'},
-            new char[] {'\x30FA', '\x05BB'},
-            new char[] {'\x30FE', '\x05BC'},
-            new char[] {'\x30FF', '\x05BD'},
-            new char[] {'\x3131', '\x05BE'},
-            new char[] {'\x3132', '\x05BF'},
-            new char[] {'\x3133', '\x05C0'},
-            new char[] {'\x3134', '\x05C1'},
-            new char[] {'\x3135', '\x05C2'},
-            new char[] {'\x3136', '\x05C3'},
-            new char[] {'\x3137', '\x05C4'},
-            new char[] {'\x3138', '\x05C5'},
-            new char[] {'\x3139', '\x05C6'},
-            new char[] {'\x313A', '\x05C7'},
-            new char[] {'\x313B', '\x05C8'},
-            new char[] {'\x313C', '\x05C9'},
-            new char[] {'\x313D', '\x05CA'},
-            new char[] {'\x313E', '\x05CB'},
-            new char[] {'\x313F', '\x05CC'},
-            new char[] {'\x3140', '\x05CD'},
-            new char[] {'\x3141', '\x05CE'},
-            new char[] {'\x3142', '\x05CF'},
-            new char[] {'\x3143', '\x05D0'},
-            new char[] {'\x3144', '\x05D1'},
-            new char[] {'\x3145', '\x05D2'},
-            new char[] {'\x3146', '\x05D3'},
-            new char[] {'\x3147', '\x05D4'},
-            new char[] {'\x3148', '\x05D5'},
-            new char[] {'\x3149', '\x05D6'},
-            new char[] {'\x314A', '\x05D7'},
-            new char[] {'\x314B', '\x05D8'},
-            new char[] {'\x314C', '\x05D9'},
-            new char[] {'\x314D', '\x05DA'},
-            new char[] {'\x314E', '\x05DB'},
-            new char[] {'\x314F', '\x05DC'},
-            new char[] {'\x3150', '\x05DD'},
-            new char[] {'\x3151', '\x05DE'},
-            new char[] {'\x3152', '\x05DF'},
-            new char[] {'\x3153', '\x05E0'},
-            new char[] {'\x3154', '\x05E1'},
-            new char[] {'\x3155', '\x05E2'},
-            new char[] {'\x3156', '\x05E3'},
-            new char[] {'\x3157', '\x05E4'},
-            new char[] {'\x3158', '\x05E5'},
-            new char[] {'\x3159', '\x05E6'},
-            new char[] {'\x315A', '\x05E7'},
-            new char[] {'\x315B', '\x05E8'},
-            new char[] {'\x315C', '\x05E9'},
-            new char[] {'\x315D', '\x05EA'},
-            new char[] {'\x315E', '\x05EB'},
-            new char[] {'\x315F', '\x05EC'},
-            new char[] {'\x3160', '\x05ED'},
-            new char[] {'\x3161', '\x05EE'},
-            new char[] {'\x3162', '\x05EF'},
-            new char[] {'\x3163', '\x05F0'},
-            new char[] {'\x3164', '\x05F1'},
-            new char[] {'\x3165', '\x05F2'},
-            new char[] {'\x3166', '\x05F3'},
-            new char[] {'\x3167', '\x05F4'},
-            new char[] {'\x3168', '\x05F5'},
-            new char[] {'\x3169', '\x05F6'},
-            new char[] {'\x316A', '\x05F7'},
-            new char[] {'\x316B', '\x05F8'},
-            new char[] {'\x316C', '\x05F9'},
-            new char[] {'\x316D', '\x05FA'},
-            new char[] {'\x316E', '\x05FB'},
-            new char[] {'\x316F', '\x05FC'},
-            new char[] {'\x3170', '\x05FD'},
-            new char[] {'\x3171', '\x05FE'},
-            new char[] {'\x3172', '\x05FF'},
-            new char[] {'\x3173', '\x0600'},
-            new char[] {'\x3174', '\x0601'},
-            new char[] {'\x3175', '\x0602'},
-            new char[] {'\x3176', '\x0603'},
-            new char[] {'\x3177', '\x0604'},
-            new char[] {'\x3178', '\x0605'},
-            new char[] {'\x3179', '\x0606'},
-            new char[] {'\x317A', '\x0607'},
-            new char[] {'\x317B', '\x0608'},
-            new char[] {'\x317C', '\x0609'},
-            new char[] {'\x317D', '\x060A'},
-            new char[] {'\x317E', '\x060B'},
-            new char[] {'\x317F', '\x060C'},
-            new char[] {'\x3180', '\x060D'},
-            new char[] {'\x3181', '\x060E'},
-            new char[] {'\x3182', '\x060F'},
-            new char[] {'\x3183', '\x0610'},
-            new char[] {'\x3184', '\x0611'},
-            new char[] {'\x3185', '\x0612'},
-            new char[] {'\x3186', '\x0613'},
-            new char[] {'\x3187', '\x0614'},
-            new char[] {'\x3188', '\x0615'},
-            new char[] {'\x3189', '\x0616'},
-            new char[] {'\x318A', '\x0617'},
-            new char[] {'\x318B', '\x0618'},
-            new char[] {'\x318C', '\x0619'},
-            new char[] {'\x318D', '\x061A'},
-            new char[] {'\x318E', '\x061B'},
-            new char[] {'\x3192', '\x04A7'},
-            new char[] {'\x3193', '\x04AD'},
-            new char[] {'\x3194', '\x061C'},
-            new char[] {'\x3195', '\x061D'},
-            new char[] {'\x3196', '\x061E'},
-            new char[] {'\x3197', '\x061F'},
-            new char[] {'\x3198', '\x0620'},
-            new char[] {'\x3199', '\x0621'},
-            new char[] {'\x319A', '\x04AB'},
-            new char[] {'\x319B', '\x0622'},
-            new char[] {'\x319C', '\x0623'},
-            new char[] {'\x319D', '\x0624'},
-            new char[] {'\x319E', '\x0625'},
-            new char[] {'\x319F', '\x04AF'},
-            new char[] {'\x3200', '\x0626'},
-            new char[] {'\x3201', '\x0627'},
-            new char[] {'\x3202', '\x0628'},
-            new char[] {'\x3203', '\x0629'},
-            new char[] {'\x3204', '\x062A'},
-            new char[] {'\x3205', '\x062B'},
-            new char[] {'\x3206', '\x062C'},
-            new char[] {'\x3207', '\x062D'},
-            new char[] {'\x3208', '\x062E'},
-            new char[] {'\x3209', '\x062F'},
-            new char[] {'\x320A', '\x0630'},
-            new char[] {'\x320B', '\x0631'},
-            new char[] {'\x320C', '\x0632'},
-            new char[] {'\x320D', '\x0633'},
-            new char[] {'\x320E', '\x0634'},
-            new char[] {'\x320F', '\x0635'},
-            new char[] {'\x3210', '\x0636'},
-            new char[] {'\x3211', '\x0637'},
-            new char[] {'\x3212', '\x0638'},
-            new char[] {'\x3213', '\x0639'},
-            new char[] {'\x3214', '\x063A'},
-            new char[] {'\x3215', '\x063B'},
-            new char[] {'\x3216', '\x063C'},
-            new char[] {'\x3217', '\x063D'},
-            new char[] {'\x3218', '\x063E'},
-            new char[] {'\x3219', '\x063F'},
-            new char[] {'\x321A', '\x0640'},
-            new char[] {'\x321B', '\x0641'},
-            new char[] {'\x321C', '\x0642'},
-            new char[] {'\x3220', '\x0643'},
-            new char[] {'\x3221', '\x0644'},
-            new char[] {'\x3222', '\x0645'},
-            new char[] {'\x3223', '\x0646'},
-            new char[] {'\x3224', '\x0647'},
-            new char[] {'\x3225', '\x0648'},
-            new char[] {'\x3226', '\x0649'},
-            new char[] {'\x3227', '\x064A'},
-            new char[] {'\x3228', '\x064B'},
-            new char[] {'\x3229', '\x064C'},
-            new char[] {'\x322A', '\x064D'},
-            new char[] {'\x322B', '\x064E'},
-            new char[] {'\x322C', '\x064F'},
-            new char[] {'\x322D', '\x0650'},
-            new char[] {'\x322E', '\x0651'},
-            new char[] {'\x322F', '\x0652'},
-            new char[] {'\x3230', '\x0653'},
-            new char[] {'\x3231', '\x0654'},
-            new char[] {'\x3232', '\x0655'},
-            new char[] {'\x3233', '\x0656'},
-            new char[] {'\x3234', '\x0657'},
-            new char[] {'\x3235', '\x0658'},
-            new char[] {'\x3236', '\x0659'},
-            new char[] {'\x3237', '\x065A'},
-            new char[] {'\x3238', '\x065B'},
-            new char[] {'\x3239', '\x065C'},
-            new char[] {'\x323A', '\x065D'},
-            new char[] {'\x323B', '\x065E'},
-            new char[] {'\x323C', '\x065F'},
-            new char[] {'\x323D', '\x0660'},
-            new char[] {'\x323E', '\x0661'},
-            new char[] {'\x323F', '\x0662'},
-            new char[] {'\x3240', '\x0663'},
-            new char[] {'\x3241', '\x0664'},
-            new char[] {'\x3242', '\x0665'},
-            new char[] {'\x3243', '\x0666'},
-            new char[] {'\x3251', '\x0667'},
-            new char[] {'\x3252', '\x0668'},
-            new char[] {'\x3253', '\x0669'},
-            new char[] {'\x3254', '\x066A'},
-            new char[] {'\x3255', '\x066B'},
-            new char[] {'\x3256', '\x066C'},
-            new char[] {'\x3257', '\x066D'},
-            new char[] {'\x3258', '\x066E'},
-            new char[] {'\x3259', '\x066F'},
-            new char[] {'\x325A', '\x0670'},
-            new char[] {'\x325B', '\x0671'},
-            new char[] {'\x325C', '\x0672'},
-            new char[] {'\x325D', '\x0673'},
-            new char[] {'\x325E', '\x0674'},
-            new char[] {'\x325F', '\x0675'},
-            new char[] {'\x3260', '\x05BE'},
-            new char[] {'\x3261', '\x05C1'},
-            new char[] {'\x3262', '\x05C4'},
-            new char[] {'\x3263', '\x05C6'},
-            new char[] {'\x3264', '\x05CE'},
-            new char[] {'\x3265', '\x05CF'},
-            new char[] {'\x3266', '\x05D2'},
-            new char[] {'\x3267', '\x05D4'},
-            new char[] {'\x3268', '\x05D5'},
-            new char[] {'\x3269', '\x05D7'},
-            new char[] {'\x326A', '\x05D8'},
-            new char[] {'\x326B', '\x05D9'},
-            new char[] {'\x326C', '\x05DA'},
-            new char[] {'\x326D', '\x05DB'},
-            new char[] {'\x326E', '\x0676'},
-            new char[] {'\x326F', '\x0677'},
-            new char[] {'\x3270', '\x0678'},
-            new char[] {'\x3271', '\x0679'},
-            new char[] {'\x3272', '\x067A'},
-            new char[] {'\x3273', '\x067B'},
-            new char[] {'\x3274', '\x067C'},
-            new char[] {'\x3275', '\x067D'},
-            new char[] {'\x3276', '\x067E'},
-            new char[] {'\x3277', '\x067F'},
-            new char[] {'\x3278', '\x0680'},
-            new char[] {'\x3279', '\x0681'},
-            new char[] {'\x327A', '\x0682'},
-            new char[] {'\x327B', '\x0683'},
-            new char[] {'\x3280', '\x04A7'},
-            new char[] {'\x3281', '\x04AD'},
-            new char[] {'\x3282', '\x061C'},
-            new char[] {'\x3283', '\x061D'},
-            new char[] {'\x3284', '\x0684'},
-            new char[] {'\x3285', '\x0685'},
-            new char[] {'\x3286', '\x0686'},
-            new char[] {'\x3287', '\x04B2'},
-            new char[] {'\x3288', '\x0687'},
-            new char[] {'\x3289', '\x04BE'},
-            new char[] {'\x328A', '\x04F0'},
-            new char[] {'\x328B', '\x04FC'},
-            new char[] {'\x328C', '\x04FB'},
-            new char[] {'\x328D', '\x04F1'},
-            new char[] {'\x328E', '\x054D'},
-            new char[] {'\x328F', '\x04C6'},
-            new char[] {'\x3290', '\x04EE'},
-            new char[] {'\x3291', '\x0688'},
-            new char[] {'\x3292', '\x0689'},
-            new char[] {'\x3293', '\x068A'},
-            new char[] {'\x3294', '\x068B'},
-            new char[] {'\x3295', '\x068C'},
-            new char[] {'\x3296', '\x068D'},
-            new char[] {'\x3297', '\x068E'},
-            new char[] {'\x3298', '\x068F'},
-            new char[] {'\x3299', '\x0690'},
-            new char[] {'\x329A', '\x0691'},
-            new char[] {'\x329B', '\x04CC'},
-            new char[] {'\x329C', '\x0692'},
-            new char[] {'\x329D', '\x0693'},
-            new char[] {'\x329E', '\x0694'},
-            new char[] {'\x329F', '\x0695'},
-            new char[] {'\x32A0', '\x0696'},
-            new char[] {'\x32A1', '\x0697'},
-            new char[] {'\x32A2', '\x0698'},
-            new char[] {'\x32A3', '\x0699'},
-            new char[] {'\x32A4', '\x061E'},
-            new char[] {'\x32A5', '\x061F'},
-            new char[] {'\x32A6', '\x0620'},
-            new char[] {'\x32A7', '\x069A'},
-            new char[] {'\x32A8', '\x069B'},
-            new char[] {'\x32A9', '\x069C'},
-            new char[] {'\x32AA', '\x069D'},
-            new char[] {'\x32AB', '\x069E'},
-            new char[] {'\x32AC', '\x069F'},
-            new char[] {'\x32AD', '\x06A0'},
-            new char[] {'\x32AE', '\x06A1'},
-            new char[] {'\x32AF', '\x06A2'},
-            new char[] {'\x32B0', '\x06A3'},
-            new char[] {'\x32B1', '\x06A4'},
-            new char[] {'\x32B2', '\x06A5'},
-            new char[] {'\x32B3', '\x06A6'},
-            new char[] {'\x32B4', '\x06A7'},
-            new char[] {'\x32B5', '\x06A8'},
-            new char[] {'\x32B6', '\x06A9'},
-            new char[] {'\x32B7', '\x06AA'},
-            new char[] {'\x32B8', '\x06AB'},
-            new char[] {'\x32B9', '\x06AC'},
-            new char[] {'\x32BA', '\x06AD'},
-            new char[] {'\x32BB', '\x06AE'},
-            new char[] {'\x32BC', '\x06AF'},
-            new char[] {'\x32BD', '\x06B0'},
-            new char[] {'\x32BE', '\x06B1'},
-            new char[] {'\x32BF', '\x06B2'},
-            new char[] {'\x32C0', '\x06B3'},
-            new char[] {'\x32C1', '\x06B4'},
-            new char[] {'\x32C2', '\x06B5'},
-            new char[] {'\x32C3', '\x06B6'},
-            new char[] {'\x32C4', '\x06B7'},
-            new char[] {'\x32C5', '\x06B8'},
-            new char[] {'\x32C6', '\x06B9'},
-            new char[] {'\x32C7', '\x06BA'},
-            new char[] {'\x32C8', '\x06BB'},
-            new char[] {'\x32C9', '\x06BC'},
-            new char[] {'\x32CA', '\x06BD'},
-            new char[] {'\x32CB', '\x06BE'},
-            new char[] {'\x32D0', '\x06BF'},
-            new char[] {'\x32D1', '\x06C0'},
-            new char[] {'\x32D2', '\x06C1'},
-            new char[] {'\x32D3', '\x06C2'},
-            new char[] {'\x32D4', '\x06C3'},
-            new char[] {'\x32D5', '\x06C4'},
-            new char[] {'\x32D6', '\x06C5'},
-            new char[] {'\x32D7', '\x06C6'},
-            new char[] {'\x32D8', '\x06C7'},
-            new char[] {'\x32D9', '\x06C8'},
-            new char[] {'\x32DA', '\x06C9'},
-            new char[] {'\x32DB', '\x06CA'},
-            new char[] {'\x32DC', '\x06CB'},
-            new char[] {'\x32DD', '\x06CC'},
-            new char[] {'\x32DE', '\x06CD'},
-            new char[] {'\x32DF', '\x06CE'},
-            new char[] {'\x32E0', '\x06CF'},
-            new char[] {'\x32E1', '\x06D0'},
-            new char[] {'\x32E2', '\x06D1'},
-            new char[] {'\x32E3', '\x06D2'},
-            new char[] {'\x32E4', '\x06D3'},
-            new char[] {'\x32E5', '\x06D4'},
-            new char[] {'\x32E6', '\x06D5'},
-            new char[] {'\x32E7', '\x06D6'},
-            new char[] {'\x32E8', '\x06D7'},
-            new char[] {'\x32E9', '\x06D8'},
-            new char[] {'\x32EA', '\x06D9'},
-            new char[] {'\x32EB', '\x06DA'},
-            new char[] {'\x32EC', '\x06DB'},
-            new char[] {'\x32ED', '\x06DC'},
-            new char[] {'\x32EE', '\x06DD'},
-            new char[] {'\x32EF', '\x06DE'},
-            new char[] {'\x32F0', '\x06DF'},
-            new char[] {'\x32F1', '\x06E0'},
-            new char[] {'\x32F2', '\x06E1'},
-            new char[] {'\x32F3', '\x06E2'},
-            new char[] {'\x32F4', '\x06E3'},
-            new char[] {'\x32F5', '\x06E4'},
-            new char[] {'\x32F6', '\x06E5'},
-            new char[] {'\x32F7', '\x06E6'},
-            new char[] {'\x32F8', '\x06E7'},
-            new char[] {'\x32F9', '\x06E8'},
-            new char[] {'\x32FA', '\x06E9'},
-            new char[] {'\x32FB', '\x06EA'},
-            new char[] {'\x32FC', '\x06EB'},
-            new char[] {'\x32FD', '\x06EC'},
-            new char[] {'\x32FE', '\x06ED'},
-            new char[] {'\x3300', '\x06EE'},
-            new char[] {'\x3301', '\x06EF'},
-            new char[] {'\x3302', '\x06F0'},
-            new char[] {'\x3303', '\x06F1'},
-            new char[] {'\x3304', '\x06F2'},
-            new char[] {'\x3305', '\x06F3'},
-            new char[] {'\x3306', '\x06F4'},
-            new char[] {'\x3307', '\x06F5'},
-            new char[] {'\x3308', '\x06F6'},
-            new char[] {'\x3309', '\x06F7'},
-            new char[] {'\x330A', '\x06F8'},
-            new char[] {'\x330B', '\x06F9'},
-            new char[] {'\x330C', '\x06FA'},
-            new char[] {'\x330D', '\x06FB'},
-            new char[] {'\x330E', '\x06FC'},
-            new char[] {'\x330F', '\x06FD'},
-            new char[] {'\x3310', '\x06FE'},
-            new char[] {'\x3311', '\x06FF'},
-            new char[] {'\x3312', '\x0700'},
-            new char[] {'\x3313', '\x0701'},
-            new char[] {'\x3314', '\x0702'},
-            new char[] {'\x3315', '\x0703'},
-            new char[] {'\x3316', '\x0704'},
-            new char[] {'\x3317', '\x0705'},
-            new char[] {'\x3318', '\x0706'},
-            new char[] {'\x3319', '\x0707'},
-            new char[] {'\x331A', '\x0708'},
-            new char[] {'\x331B', '\x0709'},
-            new char[] {'\x331C', '\x070A'},
-            new char[] {'\x331D', '\x070B'},
-            new char[] {'\x331E', '\x070C'},
-            new char[] {'\x331F', '\x070D'},
-            new char[] {'\x3320', '\x070E'},
-            new char[] {'\x3321', '\x070F'},
-            new char[] {'\x3322', '\x0710'},
-            new char[] {'\x3323', '\x0711'},
-            new char[] {'\x3324', '\x0712'},
-            new char[] {'\x3325', '\x0713'},
-            new char[] {'\x3326', '\x0714'},
-            new char[] {'\x3327', '\x0715'},
-            new char[] {'\x3328', '\x0716'},
-            new char[] {'\x3329', '\x0717'},
-            new char[] {'\x332A', '\x0718'},
-            new char[] {'\x332B', '\x0719'},
-            new char[] {'\x332C', '\x071A'},
-            new char[] {'\x332D', '\x071B'},
-            new char[] {'\x332E', '\x071C'},
-            new char[] {'\x332F', '\x071D'},
-            new char[] {'\x3330', '\x071E'},
-            new char[] {'\x3331', '\x071F'},
-            new char[] {'\x3332', '\x0720'},
-            new char[] {'\x3333', '\x0721'},
-            new char[] {'\x3334', '\x0722'},
-            new char[] {'\x3335', '\x0723'},
-            new char[] {'\x3336', '\x0724'},
-            new char[] {'\x3337', '\x0725'},
-            new char[] {'\x3338', '\x0726'},
-            new char[] {'\x3339', '\x0727'},
-            new char[] {'\x333A', '\x0728'},
-            new char[] {'\x333B', '\x0729'},
-            new char[] {'\x333C', '\x072A'},
-            new char[] {'\x333D', '\x072B'},
-            new char[] {'\x333E', '\x072C'},
-            new char[] {'\x333F', '\x072D'},
-            new char[] {'\x3340', '\x072E'},
-            new char[] {'\x3341', '\x072F'},
-            new char[] {'\x3342', '\x0730'},
-            new char[] {'\x3343', '\x0731'},
-            new char[] {'\x3344', '\x0732'},
-            new char[] {'\x3345', '\x0733'},
-            new char[] {'\x3346', '\x0734'},
-            new char[] {'\x3347', '\x0735'},
-            new char[] {'\x3348', '\x0736'},
-            new char[] {'\x3349', '\x0737'},
-            new char[] {'\x334A', '\x0738'},
-            new char[] {'\x334B', '\x0739'},
-            new char[] {'\x334C', '\x073A'},
-            new char[] {'\x334D', '\x073B'},
-            new char[] {'\x334E', '\x073C'},
-            new char[] {'\x334F', '\x073D'},
-            new char[] {'\x3350', '\x073E'},
-            new char[] {'\x3351', '\x073F'},
-            new char[] {'\x3352', '\x0740'},
-            new char[] {'\x3353', '\x0741'},
-            new char[] {'\x3354', '\x0742'},
-            new char[] {'\x3355', '\x0743'},
-            new char[] {'\x3356', '\x0744'},
-            new char[] {'\x3357', '\x0745'},
-            new char[] {'\x3358', '\x0746'},
-            new char[] {'\x3359', '\x0747'},
-            new char[] {'\x335A', '\x0748'},
-            new char[] {'\x335B', '\x0749'},
-            new char[] {'\x335C', '\x074A'},
-            new char[] {'\x335D', '\x074B'},
-            new char[] {'\x335E', '\x074C'},
-            new char[] {'\x335F', '\x074D'},
-            new char[] {'\x3360', '\x074E'},
-            new char[] {'\x3361', '\x074F'},
-            new char[] {'\x3362', '\x0750'},
-            new char[] {'\x3363', '\x0751'},
-            new char[] {'\x3364', '\x0752'},
-            new char[] {'\x3365', '\x0753'},
-            new char[] {'\x3366', '\x0754'},
-            new char[] {'\x3367', '\x0755'},
-            new char[] {'\x3368', '\x0756'},
-            new char[] {'\x3369', '\x0757'},
-            new char[] {'\x336A', '\x0758'},
-            new char[] {'\x336B', '\x0759'},
-            new char[] {'\x336C', '\x075A'},
-            new char[] {'\x336D', '\x075B'},
-            new char[] {'\x336E', '\x075C'},
-            new char[] {'\x336F', '\x075D'},
-            new char[] {'\x3370', '\x075E'},
-            new char[] {'\x3371', '\x075F'},
-            new char[] {'\x3372', '\x0760'},
-            new char[] {'\x3373', '\x0761'},
-            new char[] {'\x3374', '\x0762'},
-            new char[] {'\x3375', '\x0763'},
-            new char[] {'\x3376', '\x0764'},
-            new char[] {'\x337B', '\x0765'},
-            new char[] {'\x337C', '\x0766'},
-            new char[] {'\x337D', '\x0767'},
-            new char[] {'\x337E', '\x0768'},
-            new char[] {'\x337F', '\x0769'},
-            new char[] {'\x3380', '\x076A'},
-            new char[] {'\x3381', '\x076B'},
-            new char[] {'\x3382', '\x076C'},
-            new char[] {'\x3383', '\x076D'},
-            new char[] {'\x3384', '\x076E'},
-            new char[] {'\x3385', '\x076F'},
-            new char[] {'\x3386', '\x0770'},
-            new char[] {'\x3387', '\x0771'},
-            new char[] {'\x3388', '\x0772'},
-            new char[] {'\x3389', '\x0773'},
-            new char[] {'\x338A', '\x0774'},
-            new char[] {'\x338B', '\x0775'},
-            new char[] {'\x338C', '\x0776'},
-            new char[] {'\x338D', '\x0777'},
-            new char[] {'\x338E', '\x0778'},
-            new char[] {'\x338F', '\x0779'},
-            new char[] {'\x3390', '\x077A'},
-            new char[] {'\x3391', '\x077B'},
-            new char[] {'\x3392', '\x077C'},
-            new char[] {'\x3393', '\x077D'},
-            new char[] {'\x3394', '\x077E'},
-            new char[] {'\x3395', '\x077F'},
-            new char[] {'\x3396', '\x0780'},
-            new char[] {'\x3397', '\x0781'},
-            new char[] {'\x3398', '\x0782'},
-            new char[] {'\x3399', '\x0783'},
-            new char[] {'\x339A', '\x0784'},
-            new char[] {'\x339B', '\x0785'},
-            new char[] {'\x339C', '\x0786'},
-            new char[] {'\x339D', '\x0787'},
-            new char[] {'\x339E', '\x0788'},
-            new char[] {'\x339F', '\x0789'},
-            new char[] {'\x33A0', '\x078A'},
-            new char[] {'\x33A1', '\x078B'},
-            new char[] {'\x33A2', '\x078C'},
-            new char[] {'\x33A3', '\x078D'},
-            new char[] {'\x33A4', '\x078E'},
-            new char[] {'\x33A5', '\x078F'},
-            new char[] {'\x33A6', '\x0790'},
-            new char[] {'\x33A7', '\x0791'},
-            new char[] {'\x33A8', '\x0792'},
-            new char[] {'\x33A9', '\x0793'},
-            new char[] {'\x33AA', '\x0794'},
-            new char[] {'\x33AB', '\x0795'},
-            new char[] {'\x33AC', '\x0796'},
-            new char[] {'\x33AD', '\x0797'},
-            new char[] {'\x33AE', '\x0798'},
-            new char[] {'\x33AF', '\x0799'},
-            new char[] {'\x33B0', '\x079A'},
-            new char[] {'\x33B1', '\x079B'},
-            new char[] {'\x33B2', '\x079C'},
-            new char[] {'\x33B3', '\x079D'},
-            new char[] {'\x33B4', '\x079E'},
-            new char[] {'\x33B5', '\x079F'},
-            new char[] {'\x33B6', '\x07A0'},
-            new char[] {'\x33B7', '\x07A1'},
-            new char[] {'\x33B8', '\x07A2'},
-            new char[] {'\x33B9', '\x07A3'},
-            new char[] {'\x33BA', '\x07A4'},
-            new char[] {'\x33BB', '\x07A5'},
-            new char[] {'\x33BC', '\x07A6'},
-            new char[] {'\x33BD', '\x07A7'},
-            new char[] {'\x33BE', '\x07A8'},
-            new char[] {'\x33BF', '\x07A9'},
-            new char[] {'\x33C0', '\x07AA'},
-            new char[] {'\x33C1', '\x07AB'},
-            new char[] {'\x33C2', '\x07AC'},
-            new char[] {'\x33C3', '\x07AD'},
-            new char[] {'\x33C4', '\x07AE'},
-            new char[] {'\x33C5', '\x07AF'},
-            new char[] {'\x33C6', '\x07B0'},
-            new char[] {'\x33C7', '\x07B1'},
-            new char[] {'\x33C8', '\x07B2'},
-            new char[] {'\x33C9', '\x07B3'},
-            new char[] {'\x33CA', '\x07B4'},
-            new char[] {'\x33CB', '\x07B5'},
-            new char[] {'\x33CC', '\x07B6'},
-            new char[] {'\x33CD', '\x07B7'},
-            new char[] {'\x33CE', '\x07B8'},
-            new char[] {'\x33CF', '\x07B9'},
-            new char[] {'\x33D0', '\x07BA'},
-            new char[] {'\x33D1', '\x07BB'},
-            new char[] {'\x33D2', '\x07BC'},
-            new char[] {'\x33D3', '\x07BD'},
-            new char[] {'\x33D4', '\x07BE'},
-            new char[] {'\x33D5', '\x07BF'},
-            new char[] {'\x33D6', '\x07C0'},
-            new char[] {'\x33D7', '\x07C1'},
-            new char[] {'\x33D8', '\x07C2'},
-            new char[] {'\x33D9', '\x07C3'},
-            new char[] {'\x33DA', '\x07C4'},
-            new char[] {'\x33DB', '\x07C5'},
-            new char[] {'\x33DC', '\x07C6'},
-            new char[] {'\x33DD', '\x07C7'},
-            new char[] {'\x33E0', '\x07C8'},
-            new char[] {'\x33E1', '\x07C9'},
-            new char[] {'\x33E2', '\x07CA'},
-            new char[] {'\x33E3', '\x07CB'},
-            new char[] {'\x33E4', '\x07CC'},
-            new char[] {'\x33E5', '\x07CD'},
-            new char[] {'\x33E6', '\x07CE'},
-            new char[] {'\x33E7', '\x07CF'},
-            new char[] {'\x33E8', '\x07D0'},
-            new char[] {'\x33E9', '\x07D1'},
-            new char[] {'\x33EA', '\x07D2'},
-            new char[] {'\x33EB', '\x07D3'},
-            new char[] {'\x33EC', '\x07D4'},
-            new char[] {'\x33ED', '\x07D5'},
-            new char[] {'\x33EE', '\x07D6'},
-            new char[] {'\x33EF', '\x07D7'},
-            new char[] {'\x33F0', '\x07D8'},
-            new char[] {'\x33F1', '\x07D9'},
-            new char[] {'\x33F2', '\x07DA'},
-            new char[] {'\x33F3', '\x07DB'},
-            new char[] {'\x33F4', '\x07DC'},
-            new char[] {'\x33F5', '\x07DD'},
-            new char[] {'\x33F6', '\x07DE'},
-            new char[] {'\x33F7', '\x07DF'},
-            new char[] {'\x33F8', '\x07E0'},
-            new char[] {'\x33F9', '\x07E1'},
-            new char[] {'\x33FA', '\x07E2'},
-            new char[] {'\x33FB', '\x07E3'},
-            new char[] {'\x33FC', '\x07E4'},
-            new char[] {'\x33FD', '\x07E5'},
-            new char[] {'\x33FE', '\x07E6'},
-            new char[] {'\xF900', '\x07E7'},
-            new char[] {'\xF901', '\x07E8'},
-            new char[] {'\xF902', '\x0545'},
-            new char[] {'\xF903', '\x07E9'},
-            new char[] {'\xF904', '\x07EA'},
-            new char[] {'\xF905', '\x07EB'},
-            new char[] {'\xF906', '\x07EC'},
-            new char[] {'\xF907', '\x057B'},
-            new char[] {'\xF908', '\x057B'},
-            new char[] {'\xF909', '\x07ED'},
-            new char[] {'\xF90A', '\x054D'},
-            new char[] {'\xF90B', '\x07EE'},
-            new char[] {'\xF90C', '\x07EF'},
-            new char[] {'\xF90D', '\x07F0'},
-            new char[] {'\xF90E', '\x07F1'},
-            new char[] {'\xF90F', '\x07F2'},
-            new char[] {'\xF910', '\x07F3'},
-            new char[] {'\xF911', '\x07F4'},
-            new char[] {'\xF912', '\x07F5'},
-            new char[] {'\xF913', '\x07F6'},
-            new char[] {'\xF914', '\x07F7'},
-            new char[] {'\xF915', '\x07F8'},
-            new char[] {'\xF916', '\x07F9'},
-            new char[] {'\xF917', '\x07FA'},
-            new char[] {'\xF918', '\x07FB'},
-            new char[] {'\xF919', '\x07FC'},
-            new char[] {'\xF91A', '\x07FD'},
-            new char[] {'\xF91B', '\x07FE'},
-            new char[] {'\xF91C', '\x07FF'},
-            new char[] {'\xF91D', '\x0800'},
-            new char[] {'\xF91E', '\x0801'},
-            new char[] {'\xF91F', '\x0802'},
-            new char[] {'\xF920', '\x0803'},
-            new char[] {'\xF921', '\x0804'},
-            new char[] {'\xF922', '\x0805'},
-            new char[] {'\xF923', '\x0806'},
-            new char[] {'\xF924', '\x0807'},
-            new char[] {'\xF925', '\x0808'},
-            new char[] {'\xF926', '\x0809'},
-            new char[] {'\xF927', '\x080A'},
-            new char[] {'\xF928', '\x080B'},
-            new char[] {'\xF929', '\x080C'},
-            new char[] {'\xF92A', '\x080D'},
-            new char[] {'\xF92B', '\x080E'},
-            new char[] {'\xF92C', '\x080F'},
-            new char[] {'\xF92D', '\x0810'},
-            new char[] {'\xF92E', '\x0811'},
-            new char[] {'\xF92F', '\x0812'},
-            new char[] {'\xF930', '\x0813'},
-            new char[] {'\xF931', '\x0814'},
-            new char[] {'\xF932', '\x0815'},
-            new char[] {'\xF933', '\x0816'},
-            new char[] {'\xF934', '\x0523'},
-            new char[] {'\xF935', '\x0817'},
-            new char[] {'\xF936', '\x0818'},
-            new char[] {'\xF937', '\x0819'},
-            new char[] {'\xF938', '\x081A'},
-            new char[] {'\xF939', '\x081B'},
-            new char[] {'\xF93A', '\x081C'},
-            new char[] {'\xF93B', '\x081D'},
-            new char[] {'\xF93C', '\x081E'},
-            new char[] {'\xF93D', '\x081F'},
-            new char[] {'\xF93E', '\x0820'},
-            new char[] {'\xF93F', '\x0821'},
-            new char[] {'\xF940', '\x056C'},
-            new char[] {'\xF941', '\x0822'},
-            new char[] {'\xF942', '\x0823'},
-            new char[] {'\xF943', '\x0824'},
-            new char[] {'\xF944', '\x0825'},
-            new char[] {'\xF945', '\x0826'},
-            new char[] {'\xF946', '\x0827'},
-            new char[] {'\xF947', '\x0828'},
-            new char[] {'\xF948', '\x0829'},
-            new char[] {'\xF949', '\x082A'},
-            new char[] {'\xF94A', '\x082B'},
-            new char[] {'\xF94B', '\x082C'},
-            new char[] {'\xF94C', '\x082D'},
-            new char[] {'\xF94D', '\x082E'},
-            new char[] {'\xF94E', '\x082F'},
-            new char[] {'\xF94F', '\x0830'},
-            new char[] {'\xF950', '\x0831'},
-            new char[] {'\xF951', '\x0832'},
-            new char[] {'\xF952', '\x0833'},
-            new char[] {'\xF953', '\x0834'},
-            new char[] {'\xF954', '\x0835'},
-            new char[] {'\xF955', '\x0836'},
-            new char[] {'\xF956', '\x0837'},
-            new char[] {'\xF957', '\x0838'},
-            new char[] {'\xF958', '\x0839'},
-            new char[] {'\xF959', '\x083A'},
-            new char[] {'\xF95A', '\x083B'},
-            new char[] {'\xF95B', '\x083C'},
-            new char[] {'\xF95C', '\x07F7'},
-            new char[] {'\xF95D', '\x083D'},
-            new char[] {'\xF95E', '\x083E'},
-            new char[] {'\xF95F', '\x083F'},
-            new char[] {'\xF960', '\x0840'},
-            new char[] {'\xF961', '\x0841'},
-            new char[] {'\xF962', '\x0842'},
-            new char[] {'\xF963', '\x0843'},
-            new char[] {'\xF964', '\x0844'},
-            new char[] {'\xF965', '\x0845'},
-            new char[] {'\xF966', '\x0846'},
-            new char[] {'\xF967', '\x0847'},
-            new char[] {'\xF968', '\x0848'},
-            new char[] {'\xF969', '\x0849'},
-            new char[] {'\xF96A', '\x084A'},
-            new char[] {'\xF96B', '\x084B'},
-            new char[] {'\xF96C', '\x084C'},
-            new char[] {'\xF96D', '\x084D'},
-            new char[] {'\xF96E', '\x084E'},
-            new char[] {'\xF96F', '\x084F'},
-            new char[] {'\xF970', '\x0850'},
-            new char[] {'\xF971', '\x0547'},
-            new char[] {'\xF972', '\x0851'},
-            new char[] {'\xF973', '\x0852'},
-            new char[] {'\xF974', '\x0853'},
-            new char[] {'\xF975', '\x0854'},
-            new char[] {'\xF976', '\x0855'},
-            new char[] {'\xF977', '\x0856'},
-            new char[] {'\xF978', '\x0857'},
-            new char[] {'\xF979', '\x0858'},
-            new char[] {'\xF97A', '\x0859'},
-            new char[] {'\xF97B', '\x085A'},
-            new char[] {'\xF97C', '\x085B'},
-            new char[] {'\xF97D', '\x085C'},
-            new char[] {'\xF97E', '\x085D'},
-            new char[] {'\xF97F', '\x085E'},
-            new char[] {'\xF980', '\x085F'},
-            new char[] {'\xF981', '\x04CC'},
-            new char[] {'\xF982', '\x0860'},
-            new char[] {'\xF983', '\x0861'},
-            new char[] {'\xF984', '\x0862'},
-            new char[] {'\xF985', '\x0863'},
-            new char[] {'\xF986', '\x0864'},
-            new char[] {'\xF987', '\x0865'},
-            new char[] {'\xF988', '\x0866'},
-            new char[] {'\xF989', '\x0867'},
-            new char[] {'\xF98A', '\x04B9'},
-            new char[] {'\xF98B', '\x0868'},
-            new char[] {'\xF98C', '\x0869'},
-            new char[] {'\xF98D', '\x086A'},
-            new char[] {'\xF98E', '\x086B'},
-            new char[] {'\xF98F', '\x086C'},
-            new char[] {'\xF990', '\x086D'},
-            new char[] {'\xF991', '\x086E'},
-            new char[] {'\xF992', '\x086F'},
-            new char[] {'\xF993', '\x0870'},
-            new char[] {'\xF994', '\x0871'},
-            new char[] {'\xF995', '\x0872'},
-            new char[] {'\xF996', '\x0873'},
-            new char[] {'\xF997', '\x0874'},
-            new char[] {'\xF998', '\x0875'},
-            new char[] {'\xF999', '\x0876'},
-            new char[] {'\xF99A', '\x0877'},
-            new char[] {'\xF99B', '\x0878'},
-            new char[] {'\xF99C', '\x0879'},
-            new char[] {'\xF99D', '\x087A'},
-            new char[] {'\xF99E', '\x087B'},
-            new char[] {'\xF99F', '\x087C'},
-            new char[] {'\xF9A0', '\x087D'},
-            new char[] {'\xF9A1', '\x084F'},
-            new char[] {'\xF9A2', '\x087E'},
-            new char[] {'\xF9A3', '\x087F'},
-            new char[] {'\xF9A4', '\x0880'},
-            new char[] {'\xF9A5', '\x0881'},
-            new char[] {'\xF9A6', '\x0882'},
-            new char[] {'\xF9A7', '\x0883'},
-            new char[] {'\xF9A8', '\x0884'},
-            new char[] {'\xF9A9', '\x0885'},
-            new char[] {'\xF9AA', '\x083F'},
-            new char[] {'\xF9AB', '\x0886'},
-            new char[] {'\xF9AC', '\x0887'},
-            new char[] {'\xF9AD', '\x0888'},
-            new char[] {'\xF9AE', '\x0889'},
-            new char[] {'\xF9AF', '\x088A'},
-            new char[] {'\xF9B0', '\x088B'},
-            new char[] {'\xF9B1', '\x088C'},
-            new char[] {'\xF9B2', '\x088D'},
-            new char[] {'\xF9B3', '\x088E'},
-            new char[] {'\xF9B4', '\x088F'},
-            new char[] {'\xF9B5', '\x0890'},
-            new char[] {'\xF9B6', '\x0891'},
-            new char[] {'\xF9B7', '\x0892'},
-            new char[] {'\xF9B8', '\x0893'},
-            new char[] {'\xF9B9', '\x0894'},
-            new char[] {'\xF9BA', '\x0895'},
-            new char[] {'\xF9BB', '\x0896'},
-            new char[] {'\xF9BC', '\x0897'},
-            new char[] {'\xF9BD', '\x0898'},
-            new char[] {'\xF9BE', '\x0899'},
-            new char[] {'\xF9BF', '\x07F7'},
-            new char[] {'\xF9C0', '\x089A'},
-            new char[] {'\xF9C1', '\x089B'},
-            new char[] {'\xF9C2', '\x089C'},
-            new char[] {'\xF9C3', '\x089D'},
-            new char[] {'\xF9C4', '\x057A'},
-            new char[] {'\xF9C5', '\x089E'},
-            new char[] {'\xF9C6', '\x089F'},
-            new char[] {'\xF9C7', '\x08A0'},
-            new char[] {'\xF9C8', '\x08A1'},
-            new char[] {'\xF9C9', '\x08A2'},
-            new char[] {'\xF9CA', '\x08A3'},
-            new char[] {'\xF9CB', '\x08A4'},
-            new char[] {'\xF9CC', '\x08A5'},
-            new char[] {'\xF9CD', '\x08A6'},
-            new char[] {'\xF9CE', '\x08A7'},
-            new char[] {'\xF9CF', '\x08A8'},
-            new char[] {'\xF9D0', '\x08A9'},
-            new char[] {'\xF9D1', '\x0685'},
-            new char[] {'\xF9D2', '\x08AA'},
-            new char[] {'\xF9D3', '\x08AB'},
-            new char[] {'\xF9D4', '\x08AC'},
-            new char[] {'\xF9D5', '\x08AD'},
-            new char[] {'\xF9D6', '\x08AE'},
-            new char[] {'\xF9D7', '\x08AF'},
-            new char[] {'\xF9D8', '\x08B0'},
-            new char[] {'\xF9D9', '\x08B1'},
-            new char[] {'\xF9DA', '\x08B2'},
-            new char[] {'\xF9DB', '\x0841'},
-            new char[] {'\xF9DC', '\x08B3'},
-            new char[] {'\xF9DD', '\x08B4'},
-            new char[] {'\xF9DE', '\x08B5'},
-            new char[] {'\xF9DF', '\x08B6'},
-            new char[] {'\xF9E0', '\x08B7'},
-            new char[] {'\xF9E1', '\x08B8'},
-            new char[] {'\xF9E2', '\x08B9'},
-            new char[] {'\xF9E3', '\x08BA'},
-            new char[] {'\xF9E4', '\x08BB'},
-            new char[] {'\xF9E5', '\x08BC'},
-            new char[] {'\xF9E6', '\x08BD'},
-            new char[] {'\xF9E7', '\x08BE'},
-            new char[] {'\xF9E8', '\x08BF'},
-            new char[] {'\xF9E9', '\x054C'},
-            new char[] {'\xF9EA', '\x08C0'},
-            new char[] {'\xF9EB', '\x08C1'},
-            new char[] {'\xF9EC', '\x08C2'},
-            new char[] {'\xF9ED', '\x08C3'},
-            new char[] {'\xF9EE', '\x08C4'},
-            new char[] {'\xF9EF', '\x08C5'},
-            new char[] {'\xF9F0', '\x08C6'},
-            new char[] {'\xF9F1', '\x08C7'},
-            new char[] {'\xF9F2', '\x08C8'},
-            new char[] {'\xF9F3', '\x08C9'},
-            new char[] {'\xF9F4', '\x08CA'},
-            new char[] {'\xF9F5', '\x08CB'},
-            new char[] {'\xF9F6', '\x08CC'},
-            new char[] {'\xF9F7', '\x051B'},
-            new char[] {'\xF9F8', '\x08CD'},
-            new char[] {'\xF9F9', '\x08CE'},
-            new char[] {'\xF9FA', '\x08CF'},
-            new char[] {'\xF9FB', '\x08D0'},
-            new char[] {'\xF9FC', '\x08D1'},
-            new char[] {'\xF9FD', '\x08D2'},
-            new char[] {'\xF9FE', '\x08D3'},
-            new char[] {'\xF9FF', '\x08D4'},
-            new char[] {'\xFA00', '\x08D5'},
-            new char[] {'\xFA01', '\x08D6'},
-            new char[] {'\xFA02', '\x08D7'},
-            new char[] {'\xFA03', '\x08D8'},
-            new char[] {'\xFA04', '\x08D9'},
-            new char[] {'\xFA05', '\x08DA'},
-            new char[] {'\xFA06', '\x08DB'},
-            new char[] {'\xFA07', '\x08DC'},
-            new char[] {'\xFA08', '\x0536'},
-            new char[] {'\xFA09', '\x08DD'},
-            new char[] {'\xFA0A', '\x0539'},
-            new char[] {'\xFA0B', '\x08DE'},
-            new char[] {'\xFA0C', '\x08DF'},
-            new char[] {'\xFA0D', '\x08E0'},
-            new char[] {'\xFA10', '\x08E1'},
-            new char[] {'\xFA12', '\x08E2'},
-            new char[] {'\xFA15', '\x08E3'},
-            new char[] {'\xFA16', '\x08E4'},
-            new char[] {'\xFA17', '\x08E5'},
-            new char[] {'\xFA18', '\x08E6'},
-            new char[] {'\xFA19', '\x08E7'},
-            new char[] {'\xFA1A', '\x08E8'},
-            new char[] {'\xFA1B', '\x08E9'},
-            new char[] {'\xFA1C', '\x08EA'},
-            new char[] {'\xFA1D', '\x08EB'},
-            new char[] {'\xFA1E', '\x0522'},
-            new char[] {'\xFA20', '\x08EC'},
-            new char[] {'\xFA22', '\x08ED'},
-            new char[] {'\xFA25', '\x08EE'},
-            new char[] {'\xFA26', '\x08EF'},
-            new char[] {'\xFA2A', '\x08F0'},
-            new char[] {'\xFA2B', '\x08F1'},
-            new char[] {'\xFA2C', '\x08F2'},
-            new char[] {'\xFA2D', '\x08F3'},
-            new char[] {'\xFA30', '\x08F4'},
-            new char[] {'\xFA31', '\x08F5'},
-            new char[] {'\xFA32', '\x08F6'},
-            new char[] {'\xFA33', '\x08F7'},
-            new char[] {'\xFA34', '\x08F8'},
-            new char[] {'\xFA35', '\x08F9'},
-            new char[] {'\xFA36', '\x08FA'},
-            new char[] {'\xFA37', '\x08FB'},
-            new char[] {'\xFA38', '\x08FC'},
-            new char[] {'\xFA39', '\x08FD'},
-            new char[] {'\xFA3A', '\x08FE'},
-            new char[] {'\xFA3B', '\x08FF'},
-            new char[] {'\xFA3C', '\x04D3'},
-            new char[] {'\xFA3D', '\x0900'},
-            new char[] {'\xFA3E', '\x0901'},
-            new char[] {'\xFA3F', '\x0902'},
-            new char[] {'\xFA40', '\x0903'},
-            new char[] {'\xFA41', '\x0904'},
-            new char[] {'\xFA42', '\x0905'},
-            new char[] {'\xFA43', '\x0906'},
-            new char[] {'\xFA44', '\x0907'},
-            new char[] {'\xFA45', '\x0908'},
-            new char[] {'\xFA46', '\x0909'},
-            new char[] {'\xFA47', '\x090A'},
-            new char[] {'\xFA48', '\x090B'},
-            new char[] {'\xFA49', '\x090C'},
-            new char[] {'\xFA4A', '\x090D'},
-            new char[] {'\xFA4B', '\x090E'},
-            new char[] {'\xFA4C', '\x068A'},
-            new char[] {'\xFA4D', '\x090F'},
-            new char[] {'\xFA4E', '\x0910'},
-            new char[] {'\xFA4F', '\x0911'},
-            new char[] {'\xFA50', '\x0912'},
-            new char[] {'\xFA51', '\x068E'},
-            new char[] {'\xFA52', '\x0913'},
-            new char[] {'\xFA53', '\x0914'},
-            new char[] {'\xFA54', '\x0915'},
-            new char[] {'\xFA55', '\x0916'},
-            new char[] {'\xFA56', '\x0917'},
-            new char[] {'\xFA57', '\x0873'},
-            new char[] {'\xFA58', '\x0918'},
-            new char[] {'\xFA59', '\x0919'},
-            new char[] {'\xFA5A', '\x091A'},
-            new char[] {'\xFA5B', '\x091B'},
-            new char[] {'\xFA5C', '\x091C'},
-            new char[] {'\xFA5D', '\x091D'},
-            new char[] {'\xFA5E', '\x091D'},
-            new char[] {'\xFA5F', '\x091E'},
-            new char[] {'\xFA60', '\x091F'},
-            new char[] {'\xFA61', '\x0920'},
-            new char[] {'\xFA62', '\x0921'},
-            new char[] {'\xFA63', '\x0922'},
-            new char[] {'\xFA64', '\x0923'},
-            new char[] {'\xFA65', '\x0924'},
-            new char[] {'\xFA66', '\x0925'},
-            new char[] {'\xFA67', '\x08EE'},
-            new char[] {'\xFA68', '\x0926'},
-            new char[] {'\xFA69', '\x0927'},
-            new char[] {'\xFA6A', '\x0928'},
-            new char[] {'\xFB00', '\x0929'},
-            new char[] {'\xFB01', '\x092A'},
-            new char[] {'\xFB02', '\x092B'},
-            new char[] {'\xFB03', '\x092C'},
-            new char[] {'\xFB04', '\x092D'},
-            new char[] {'\xFB05', '\x092E'},
-            new char[] {'\xFB06', '\x092E'},
-            new char[] {'\xFB13', '\x092F'},
-            new char[] {'\xFB14', '\x0930'},
-            new char[] {'\xFB15', '\x0931'},
-            new char[] {'\xFB16', '\x0932'},
-            new char[] {'\xFB17', '\x0933'},
-            new char[] {'\xFB1D', '\x0934'},
-            new char[] {'\xFB1F', '\x0935'},
-            new char[] {'\xFB20', '\x0936'},
-            new char[] {'\xFB21', '\x03E2'},
-            new char[] {'\xFB22', '\x03E5'},
-            new char[] {'\xFB23', '\x0937'},
-            new char[] {'\xFB24', '\x0938'},
-            new char[] {'\xFB25', '\x0939'},
-            new char[] {'\xFB26', '\x093A'},
-            new char[] {'\xFB27', '\x093B'},
-            new char[] {'\xFB28', '\x093C'},
-            new char[] {'\xFB29', '\x03BE'},
-            new char[] {'\xFB2A', '\x093D'},
-            new char[] {'\xFB2B', '\x093E'},
-            new char[] {'\xFB2C', '\x093F'},
-            new char[] {'\xFB2D', '\x0940'},
-            new char[] {'\xFB2E', '\x0941'},
-            new char[] {'\xFB2F', '\x0942'},
-            new char[] {'\xFB30', '\x0943'},
-            new char[] {'\xFB31', '\x0944'},
-            new char[] {'\xFB32', '\x0945'},
-            new char[] {'\xFB33', '\x0946'},
-            new char[] {'\xFB34', '\x0947'},
-            new char[] {'\xFB35', '\x0948'},
-            new char[] {'\xFB36', '\x0949'},
-            new char[] {'\xFB38', '\x094A'},
-            new char[] {'\xFB39', '\x094B'},
-            new char[] {'\xFB3A', '\x094C'},
-            new char[] {'\xFB3B', '\x094D'},
-            new char[] {'\xFB3C', '\x094E'},
-            new char[] {'\xFB3E', '\x094F'},
-            new char[] {'\xFB40', '\x0950'},
-            new char[] {'\xFB41', '\x0951'},
-            new char[] {'\xFB43', '\x0952'},
-            new char[] {'\xFB44', '\x0953'},
-            new char[] {'\xFB46', '\x0954'},
-            new char[] {'\xFB47', '\x0955'},
-            new char[] {'\xFB48', '\x0956'},
-            new char[] {'\xFB49', '\x0957'},
-            new char[] {'\xFB4A', '\x0958'},
-            new char[] {'\xFB4B', '\x0959'},
-            new char[] {'\xFB4C', '\x095A'},
-            new char[] {'\xFB4D', '\x095B'},
-            new char[] {'\xFB4E', '\x095C'},
-            new char[] {'\xFB4F', '\x095D'},
-            new char[] {'\xFB50', '\x095E'},
-            new char[] {'\xFB51', '\x095E'},
-            new char[] {'\xFB52', '\x095F'},
-            new char[] {'\xFB53', '\x095F'},
-            new char[] {'\xFB54', '\x095F'},
-            new char[] {'\xFB55', '\x095F'},
-            new char[] {'\xFB56', '\x0960'},
-            new char[] {'\xFB57', '\x0960'},
-            new char[] {'\xFB58', '\x0960'},
-            new char[] {'\xFB59', '\x0960'},
-            new char[] {'\xFB5A', '\x0961'},
-            new char[] {'\xFB5B', '\x0961'},
-            new char[] {'\xFB5C', '\x0961'},
-            new char[] {'\xFB5D', '\x0961'},
-            new char[] {'\xFB5E', '\x0962'},
-            new char[] {'\xFB5F', '\x0962'},
-            new char[] {'\xFB60', '\x0962'},
-            new char[] {'\xFB61', '\x0962'},
-            new char[] {'\xFB62', '\x0963'},
-            new char[] {'\xFB63', '\x0963'},
-            new char[] {'\xFB64', '\x0963'},
-            new char[] {'\xFB65', '\x0963'},
-            new char[] {'\xFB66', '\x0964'},
-            new char[] {'\xFB67', '\x0964'},
-            new char[] {'\xFB68', '\x0964'},
-            new char[] {'\xFB69', '\x0964'},
-            new char[] {'\xFB6A', '\x0965'},
-            new char[] {'\xFB6B', '\x0965'},
-            new char[] {'\xFB6C', '\x0965'},
-            new char[] {'\xFB6D', '\x0965'},
-            new char[] {'\xFB6E', '\x0966'},
-            new char[] {'\xFB6F', '\x0966'},
-            new char[] {'\xFB70', '\x0966'},
-            new char[] {'\xFB71', '\x0966'},
-            new char[] {'\xFB72', '\x0967'},
-            new char[] {'\xFB73', '\x0967'},
-            new char[] {'\xFB74', '\x0967'},
-            new char[] {'\xFB75', '\x0967'},
-            new char[] {'\xFB76', '\x0968'},
-            new char[] {'\xFB77', '\x0968'},
-            new char[] {'\xFB78', '\x0968'},
-            new char[] {'\xFB79', '\x0968'},
-            new char[] {'\xFB7A', '\x0969'},
-            new char[] {'\xFB7B', '\x0969'},
-            new char[] {'\xFB7C', '\x0969'},
-            new char[] {'\xFB7D', '\x0969'},
-            new char[] {'\xFB7E', '\x096A'},
-            new char[] {'\xFB7F', '\x096A'},
-            new char[] {'\xFB80', '\x096A'},
-            new char[] {'\xFB81', '\x096A'},
-            new char[] {'\xFB82', '\x096B'},
-            new char[] {'\xFB83', '\x096B'},
-            new char[] {'\xFB84', '\x096C'},
-            new char[] {'\xFB85', '\x096C'},
-            new char[] {'\xFB86', '\x096D'},
-            new char[] {'\xFB87', '\x096D'},
-            new char[] {'\xFB88', '\x096E'},
-            new char[] {'\xFB89', '\x096E'},
-            new char[] {'\xFB8A', '\x096F'},
-            new char[] {'\xFB8B', '\x096F'},
-            new char[] {'\xFB8C', '\x0970'},
-            new char[] {'\xFB8D', '\x0970'},
-            new char[] {'\xFB8E', '\x0971'},
-            new char[] {'\xFB8F', '\x0971'},
-            new char[] {'\xFB90', '\x0971'},
-            new char[] {'\xFB91', '\x0971'},
-            new char[] {'\xFB92', '\x0972'},
-            new char[] {'\xFB93', '\x0972'},
-            new char[] {'\xFB94', '\x0972'},
-            new char[] {'\xFB95', '\x0972'},
-            new char[] {'\xFB96', '\x0973'},
-            new char[] {'\xFB97', '\x0973'},
-            new char[] {'\xFB98', '\x0973'},
-            new char[] {'\xFB99', '\x0973'},
-            new char[] {'\xFB9A', '\x0974'},
-            new char[] {'\xFB9B', '\x0974'},
-            new char[] {'\xFB9C', '\x0974'},
-            new char[] {'\xFB9D', '\x0974'},
-            new char[] {'\xFB9E', '\x0975'},
-            new char[] {'\xFB9F', '\x0975'},
-            new char[] {'\xFBA0', '\x0976'},
-            new char[] {'\xFBA1', '\x0976'},
-            new char[] {'\xFBA2', '\x0976'},
-            new char[] {'\xFBA3', '\x0976'},
-            new char[] {'\xFBA4', '\x0194'},
-            new char[] {'\xFBA5', '\x0194'},
-            new char[] {'\xFBA6', '\x0977'},
-            new char[] {'\xFBA7', '\x0977'},
-            new char[] {'\xFBA8', '\x0977'},
-            new char[] {'\xFBA9', '\x0977'},
-            new char[] {'\xFBAA', '\x0978'},
-            new char[] {'\xFBAB', '\x0978'},
-            new char[] {'\xFBAC', '\x0978'},
-            new char[] {'\xFBAD', '\x0978'},
-            new char[] {'\xFBAE', '\x0979'},
-            new char[] {'\xFBAF', '\x0979'},
-            new char[] {'\xFBB0', '\x0196'},
-            new char[] {'\xFBB1', '\x0196'},
-            new char[] {'\xFBD3', '\x097A'},
-            new char[] {'\xFBD4', '\x097A'},
-            new char[] {'\xFBD5', '\x097A'},
-            new char[] {'\xFBD6', '\x097A'},
-            new char[] {'\xFBD7', '\x097B'},
-            new char[] {'\xFBD8', '\x097B'},
-            new char[] {'\xFBD9', '\x097C'},
-            new char[] {'\xFBDA', '\x097C'},
-            new char[] {'\xFBDB', '\x097D'},
-            new char[] {'\xFBDC', '\x097D'},
-            new char[] {'\xFBDD', '\x0192'},
-            new char[] {'\xFBDE', '\x097E'},
-            new char[] {'\xFBDF', '\x097E'},
-            new char[] {'\xFBE0', '\x097F'},
-            new char[] {'\xFBE1', '\x097F'},
-            new char[] {'\xFBE2', '\x0980'},
-            new char[] {'\xFBE3', '\x0980'},
-            new char[] {'\xFBE4', '\x0981'},
-            new char[] {'\xFBE5', '\x0981'},
-            new char[] {'\xFBE6', '\x0981'},
-            new char[] {'\xFBE7', '\x0981'},
-            new char[] {'\xFBE8', '\x0982'},
-            new char[] {'\xFBE9', '\x0982'},
-            new char[] {'\xFBEA', '\x0983'},
-            new char[] {'\xFBEB', '\x0983'},
-            new char[] {'\xFBEC', '\x0984'},
-            new char[] {'\xFBED', '\x0984'},
-            new char[] {'\xFBEE', '\x0985'},
-            new char[] {'\xFBEF', '\x0985'},
-            new char[] {'\xFBF0', '\x0986'},
-            new char[] {'\xFBF1', '\x0986'},
-            new char[] {'\xFBF2', '\x0987'},
-            new char[] {'\xFBF3', '\x0987'},
-            new char[] {'\xFBF4', '\x0988'},
-            new char[] {'\xFBF5', '\x0988'},
-            new char[] {'\xFBF6', '\x0989'},
-            new char[] {'\xFBF7', '\x0989'},
-            new char[] {'\xFBF8', '\x0989'},
-            new char[] {'\xFBF9', '\x098A'},
-            new char[] {'\xFBFA', '\x098A'},
-            new char[] {'\xFBFB', '\x098A'},
-            new char[] {'\xFBFC', '\x098B'},
-            new char[] {'\xFBFD', '\x098B'},
-            new char[] {'\xFBFE', '\x098B'},
-            new char[] {'\xFBFF', '\x098B'},
-            new char[] {'\xFC00', '\x098C'},
-            new char[] {'\xFC01', '\x098D'},
-            new char[] {'\xFC02', '\x098E'},
-            new char[] {'\xFC03', '\x098A'},
-            new char[] {'\xFC04', '\x098F'},
-            new char[] {'\xFC05', '\x0990'},
-            new char[] {'\xFC06', '\x0991'},
-            new char[] {'\xFC07', '\x0992'},
-            new char[] {'\xFC08', '\x0993'},
-            new char[] {'\xFC09', '\x0994'},
-            new char[] {'\xFC0A', '\x0995'},
-            new char[] {'\xFC0B', '\x0996'},
-            new char[] {'\xFC0C', '\x0997'},
-            new char[] {'\xFC0D', '\x0998'},
-            new char[] {'\xFC0E', '\x0999'},
-            new char[] {'\xFC0F', '\x099A'},
-            new char[] {'\xFC10', '\x099B'},
-            new char[] {'\xFC11', '\x099C'},
-            new char[] {'\xFC12', '\x099D'},
-            new char[] {'\xFC13', '\x099E'},
-            new char[] {'\xFC14', '\x099F'},
-            new char[] {'\xFC15', '\x09A0'},
-            new char[] {'\xFC16', '\x09A1'},
-            new char[] {'\xFC17', '\x09A2'},
-            new char[] {'\xFC18', '\x09A3'},
-            new char[] {'\xFC19', '\x09A4'},
-            new char[] {'\xFC1A', '\x09A5'},
-            new char[] {'\xFC1B', '\x09A6'},
-            new char[] {'\xFC1C', '\x09A7'},
-            new char[] {'\xFC1D', '\x09A8'},
-            new char[] {'\xFC1E', '\x09A9'},
-            new char[] {'\xFC1F', '\x09AA'},
-            new char[] {'\xFC20', '\x09AB'},
-            new char[] {'\xFC21', '\x09AC'},
-            new char[] {'\xFC22', '\x09AD'},
-            new char[] {'\xFC23', '\x09AE'},
-            new char[] {'\xFC24', '\x09AF'},
-            new char[] {'\xFC25', '\x09B0'},
-            new char[] {'\xFC26', '\x09B1'},
-            new char[] {'\xFC27', '\x09B2'},
-            new char[] {'\xFC28', '\x09B3'},
-            new char[] {'\xFC29', '\x09B4'},
-            new char[] {'\xFC2A', '\x09B5'},
-            new char[] {'\xFC2B', '\x09B6'},
-            new char[] {'\xFC2C', '\x09B7'},
-            new char[] {'\xFC2D', '\x09B8'},
-            new char[] {'\xFC2E', '\x09B9'},
-            new char[] {'\xFC2F', '\x09BA'},
-            new char[] {'\xFC30', '\x09BB'},
-            new char[] {'\xFC31', '\x09BC'},
-            new char[] {'\xFC32', '\x09BD'},
-            new char[] {'\xFC33', '\x09BE'},
-            new char[] {'\xFC34', '\x09BF'},
-            new char[] {'\xFC35', '\x09C0'},
-            new char[] {'\xFC36', '\x09C1'},
-            new char[] {'\xFC37', '\x09C2'},
-            new char[] {'\xFC38', '\x09C3'},
-            new char[] {'\xFC39', '\x09C4'},
-            new char[] {'\xFC3A', '\x09C5'},
-            new char[] {'\xFC3B', '\x09C6'},
-            new char[] {'\xFC3C', '\x09C7'},
-            new char[] {'\xFC3D', '\x09C8'},
-            new char[] {'\xFC3E', '\x09C9'},
-            new char[] {'\xFC3F', '\x09CA'},
-            new char[] {'\xFC40', '\x09CB'},
-            new char[] {'\xFC41', '\x09CC'},
-            new char[] {'\xFC42', '\x09CD'},
-            new char[] {'\xFC43', '\x09CE'},
-            new char[] {'\xFC44', '\x09CF'},
-            new char[] {'\xFC45', '\x09D0'},
-            new char[] {'\xFC46', '\x09D1'},
-            new char[] {'\xFC47', '\x09D2'},
-            new char[] {'\xFC48', '\x09D3'},
-            new char[] {'\xFC49', '\x09D4'},
-            new char[] {'\xFC4A', '\x09D5'},
-            new char[] {'\xFC4B', '\x09D6'},
-            new char[] {'\xFC4C', '\x09D7'},
-            new char[] {'\xFC4D', '\x09D8'},
-            new char[] {'\xFC4E', '\x09D9'},
-            new char[] {'\xFC4F', '\x09DA'},
-            new char[] {'\xFC50', '\x09DB'},
-            new char[] {'\xFC51', '\x09DC'},
-            new char[] {'\xFC52', '\x09DD'},
-            new char[] {'\xFC53', '\x09DE'},
-            new char[] {'\xFC54', '\x09DF'},
-            new char[] {'\xFC55', '\x09E0'},
-            new char[] {'\xFC56', '\x09E1'},
-            new char[] {'\xFC57', '\x09E2'},
-            new char[] {'\xFC58', '\x09E3'},
-            new char[] {'\xFC59', '\x09E4'},
-            new char[] {'\xFC5A', '\x09E5'},
-            new char[] {'\xFC5B', '\x09E6'},
-            new char[] {'\xFC5C', '\x09E7'},
-            new char[] {'\xFC5D', '\x09E8'},
-            new char[] {'\xFC5E', '\x09E9'},
-            new char[] {'\xFC5F', '\x09EA'},
-            new char[] {'\xFC60', '\x09EB'},
-            new char[] {'\xFC61', '\x09EC'},
-            new char[] {'\xFC62', '\x09ED'},
-            new char[] {'\xFC63', '\x09EE'},
-            new char[] {'\xFC64', '\x09EF'},
-            new char[] {'\xFC65', '\x09F0'},
-            new char[] {'\xFC66', '\x098E'},
-            new char[] {'\xFC67', '\x09F1'},
-            new char[] {'\xFC68', '\x098A'},
-            new char[] {'\xFC69', '\x098F'},
-            new char[] {'\xFC6A', '\x09F2'},
-            new char[] {'\xFC6B', '\x09F3'},
-            new char[] {'\xFC6C', '\x0993'},
-            new char[] {'\xFC6D', '\x09F4'},
-            new char[] {'\xFC6E', '\x0994'},
-            new char[] {'\xFC6F', '\x0995'},
-            new char[] {'\xFC70', '\x09F5'},
-            new char[] {'\xFC71', '\x09F6'},
-            new char[] {'\xFC72', '\x0999'},
-            new char[] {'\xFC73', '\x09F7'},
-            new char[] {'\xFC74', '\x099A'},
-            new char[] {'\xFC75', '\x099B'},
-            new char[] {'\xFC76', '\x09F8'},
-            new char[] {'\xFC77', '\x09F9'},
-            new char[] {'\xFC78', '\x099D'},
-            new char[] {'\xFC79', '\x09FA'},
-            new char[] {'\xFC7A', '\x099E'},
-            new char[] {'\xFC7B', '\x099F'},
-            new char[] {'\xFC7C', '\x09BC'},
-            new char[] {'\xFC7D', '\x09BD'},
-            new char[] {'\xFC7E', '\x09C0'},
-            new char[] {'\xFC7F', '\x09C1'},
-            new char[] {'\xFC80', '\x09C2'},
-            new char[] {'\xFC81', '\x09C6'},
-            new char[] {'\xFC82', '\x09C7'},
-            new char[] {'\xFC83', '\x09C8'},
-            new char[] {'\xFC84', '\x09C9'},
-            new char[] {'\xFC85', '\x09CD'},
-            new char[] {'\xFC86', '\x09CE'},
-            new char[] {'\xFC87', '\x09CF'},
-            new char[] {'\xFC88', '\x09FB'},
-            new char[] {'\xFC89', '\x09D3'},
-            new char[] {'\xFC8A', '\x09FC'},
-            new char[] {'\xFC8B', '\x09FD'},
-            new char[] {'\xFC8C', '\x09D9'},
-            new char[] {'\xFC8D', '\x09FE'},
-            new char[] {'\xFC8E', '\x09DA'},
-            new char[] {'\xFC8F', '\x09DB'},
-            new char[] {'\xFC90', '\x09E8'},
-            new char[] {'\xFC91', '\x09FF'},
-            new char[] {'\xFC92', '\x0A00'},
-            new char[] {'\xFC93', '\x09E3'},
-            new char[] {'\xFC94', '\x0A01'},
-            new char[] {'\xFC95', '\x09E4'},
-            new char[] {'\xFC96', '\x09E5'},
-            new char[] {'\xFC97', '\x098C'},
-            new char[] {'\xFC98', '\x098D'},
-            new char[] {'\xFC99', '\x0A02'},
-            new char[] {'\xFC9A', '\x098E'},
-            new char[] {'\xFC9B', '\x0A03'},
-            new char[] {'\xFC9C', '\x0990'},
-            new char[] {'\xFC9D', '\x0991'},
-            new char[] {'\xFC9E', '\x0992'},
-            new char[] {'\xFC9F', '\x0993'},
-            new char[] {'\xFCA0', '\x0A04'},
-            new char[] {'\xFCA1', '\x0996'},
-            new char[] {'\xFCA2', '\x0997'},
-            new char[] {'\xFCA3', '\x0998'},
-            new char[] {'\xFCA4', '\x0999'},
-            new char[] {'\xFCA5', '\x0A05'},
-            new char[] {'\xFCA6', '\x099D'},
-            new char[] {'\xFCA7', '\x09A0'},
-            new char[] {'\xFCA8', '\x09A1'},
-            new char[] {'\xFCA9', '\x09A2'},
-            new char[] {'\xFCAA', '\x09A3'},
-            new char[] {'\xFCAB', '\x09A4'},
-            new char[] {'\xFCAC', '\x09A6'},
-            new char[] {'\xFCAD', '\x09A7'},
-            new char[] {'\xFCAE', '\x09A8'},
-            new char[] {'\xFCAF', '\x09A9'},
-            new char[] {'\xFCB0', '\x09AA'},
-            new char[] {'\xFCB1', '\x09AB'},
-            new char[] {'\xFCB2', '\x0A06'},
-            new char[] {'\xFCB3', '\x09AC'},
-            new char[] {'\xFCB4', '\x09AD'},
-            new char[] {'\xFCB5', '\x09AE'},
-            new char[] {'\xFCB6', '\x09AF'},
-            new char[] {'\xFCB7', '\x09B0'},
-            new char[] {'\xFCB8', '\x09B1'},
-            new char[] {'\xFCB9', '\x09B3'},
-            new char[] {'\xFCBA', '\x09B4'},
-            new char[] {'\xFCBB', '\x09B5'},
-            new char[] {'\xFCBC', '\x09B6'},
-            new char[] {'\xFCBD', '\x09B7'},
-            new char[] {'\xFCBE', '\x09B8'},
-            new char[] {'\xFCBF', '\x09B9'},
-            new char[] {'\xFCC0', '\x09BA'},
-            new char[] {'\xFCC1', '\x09BB'},
-            new char[] {'\xFCC2', '\x09BE'},
-            new char[] {'\xFCC3', '\x09BF'},
-            new char[] {'\xFCC4', '\x09C3'},
-            new char[] {'\xFCC5', '\x09C4'},
-            new char[] {'\xFCC6', '\x09C5'},
-            new char[] {'\xFCC7', '\x09C6'},
-            new char[] {'\xFCC8', '\x09C7'},
-            new char[] {'\xFCC9', '\x09CA'},
-            new char[] {'\xFCCA', '\x09CB'},
-            new char[] {'\xFCCB', '\x09CC'},
-            new char[] {'\xFCCC', '\x09CD'},
-            new char[] {'\xFCCD', '\x0A07'},
-            new char[] {'\xFCCE', '\x09D0'},
-            new char[] {'\xFCCF', '\x09D1'},
-            new char[] {'\xFCD0', '\x09D2'},
-            new char[] {'\xFCD1', '\x09D3'},
-            new char[] {'\xFCD2', '\x09D6'},
-            new char[] {'\xFCD3', '\x09D7'},
-            new char[] {'\xFCD4', '\x09D8'},
-            new char[] {'\xFCD5', '\x09D9'},
-            new char[] {'\xFCD6', '\x0A08'},
-            new char[] {'\xFCD7', '\x09DC'},
-            new char[] {'\xFCD8', '\x09DD'},
-            new char[] {'\xFCD9', '\x0A09'},
-            new char[] {'\xFCDA', '\x09E0'},
-            new char[] {'\xFCDB', '\x09E1'},
-            new char[] {'\xFCDC', '\x09E2'},
-            new char[] {'\xFCDD', '\x09E3'},
-            new char[] {'\xFCDE', '\x0A0A'},
-            new char[] {'\xFCDF', '\x098E'},
-            new char[] {'\xFCE0', '\x0A03'},
-            new char[] {'\xFCE1', '\x0993'},
-            new char[] {'\xFCE2', '\x0A04'},
-            new char[] {'\xFCE3', '\x0999'},
-            new char[] {'\xFCE4', '\x0A05'},
-            new char[] {'\xFCE5', '\x099D'},
-            new char[] {'\xFCE6', '\x0A0B'},
-            new char[] {'\xFCE7', '\x09AA'},
-            new char[] {'\xFCE8', '\x0A0C'},
-            new char[] {'\xFCE9', '\x0A0D'},
-            new char[] {'\xFCEA', '\x0A0E'},
-            new char[] {'\xFCEB', '\x09C6'},
-            new char[] {'\xFCEC', '\x09C7'},
-            new char[] {'\xFCED', '\x09CD'},
-            new char[] {'\xFCEE', '\x09D9'},
-            new char[] {'\xFCEF', '\x0A08'},
-            new char[] {'\xFCF0', '\x09E3'},
-            new char[] {'\xFCF1', '\x0A0A'},
-            new char[] {'\xFCF2', '\x0A0F'},
-            new char[] {'\xFCF3', '\x0A10'},
-            new char[] {'\xFCF4', '\x0A11'},
-            new char[] {'\xFCF5', '\x0A12'},
-            new char[] {'\xFCF6', '\x0A13'},
-            new char[] {'\xFCF7', '\x0A14'},
-            new char[] {'\xFCF8', '\x0A15'},
-            new char[] {'\xFCF9', '\x0A16'},
-            new char[] {'\xFCFA', '\x0A17'},
-            new char[] {'\xFCFB', '\x0A18'},
-            new char[] {'\xFCFC', '\x0A19'},
-            new char[] {'\xFCFD', '\x0A1A'},
-            new char[] {'\xFCFE', '\x0A1B'},
-            new char[] {'\xFCFF', '\x0A1C'},
-            new char[] {'\xFD00', '\x0A1D'},
-            new char[] {'\xFD01', '\x0A1E'},
-            new char[] {'\xFD02', '\x0A1F'},
-            new char[] {'\xFD03', '\x0A20'},
-            new char[] {'\xFD04', '\x0A21'},
-            new char[] {'\xFD05', '\x0A22'},
-            new char[] {'\xFD06', '\x0A23'},
-            new char[] {'\xFD07', '\x0A24'},
-            new char[] {'\xFD08', '\x0A25'},
-            new char[] {'\xFD09', '\x0A26'},
-            new char[] {'\xFD0A', '\x0A27'},
-            new char[] {'\xFD0B', '\x0A28'},
-            new char[] {'\xFD0C', '\x0A0D'},
-            new char[] {'\xFD0D', '\x0A29'},
-            new char[] {'\xFD0E', '\x0A2A'},
-            new char[] {'\xFD0F', '\x0A2B'},
-            new char[] {'\xFD10', '\x0A2C'},
-            new char[] {'\xFD11', '\x0A12'},
-            new char[] {'\xFD12', '\x0A13'},
-            new char[] {'\xFD13', '\x0A14'},
-            new char[] {'\xFD14', '\x0A15'},
-            new char[] {'\xFD15', '\x0A16'},
-            new char[] {'\xFD16', '\x0A17'},
-            new char[] {'\xFD17', '\x0A18'},
-            new char[] {'\xFD18', '\x0A19'},
-            new char[] {'\xFD19', '\x0A1A'},
-            new char[] {'\xFD1A', '\x0A1B'},
-            new char[] {'\xFD1B', '\x0A1C'},
-            new char[] {'\xFD1C', '\x0A1D'},
-            new char[] {'\xFD1D', '\x0A1E'},
-            new char[] {'\xFD1E', '\x0A1F'},
-            new char[] {'\xFD1F', '\x0A20'},
-            new char[] {'\xFD20', '\x0A21'},
-            new char[] {'\xFD21', '\x0A22'},
-            new char[] {'\xFD22', '\x0A23'},
-            new char[] {'\xFD23', '\x0A24'},
-            new char[] {'\xFD24', '\x0A25'},
-            new char[] {'\xFD25', '\x0A26'},
-            new char[] {'\xFD26', '\x0A27'},
-            new char[] {'\xFD27', '\x0A28'},
-            new char[] {'\xFD28', '\x0A0D'},
-            new char[] {'\xFD29', '\x0A29'},
-            new char[] {'\xFD2A', '\x0A2A'},
-            new char[] {'\xFD2B', '\x0A2B'},
-            new char[] {'\xFD2C', '\x0A2C'},
-            new char[] {'\xFD2D', '\x0A26'},
-            new char[] {'\xFD2E', '\x0A27'},
-            new char[] {'\xFD2F', '\x0A28'},
-            new char[] {'\xFD30', '\x0A0D'},
-            new char[] {'\xFD31', '\x0A0C'},
-            new char[] {'\xFD32', '\x0A0E'},
-            new char[] {'\xFD33', '\x09B2'},
-            new char[] {'\xFD34', '\x09A7'},
-            new char[] {'\xFD35', '\x09A8'},
-            new char[] {'\xFD36', '\x09A9'},
-            new char[] {'\xFD37', '\x0A26'},
-            new char[] {'\xFD38', '\x0A27'},
-            new char[] {'\xFD39', '\x0A28'},
-            new char[] {'\xFD3A', '\x09B2'},
-            new char[] {'\xFD3B', '\x09B3'},
-            new char[] {'\xFD3C', '\x0A2D'},
-            new char[] {'\xFD3D', '\x0A2D'},
-            new char[] {'\xFD50', '\x0A2E'},
-            new char[] {'\xFD51', '\x0A2F'},
-            new char[] {'\xFD52', '\x0A2F'},
-            new char[] {'\xFD53', '\x0A30'},
-            new char[] {'\xFD54', '\x0A31'},
-            new char[] {'\xFD55', '\x0A32'},
-            new char[] {'\xFD56', '\x0A33'},
-            new char[] {'\xFD57', '\x0A34'},
-            new char[] {'\xFD58', '\x0A35'},
-            new char[] {'\xFD59', '\x0A35'},
-            new char[] {'\xFD5A', '\x0A36'},
-            new char[] {'\xFD5B', '\x0A37'},
-            new char[] {'\xFD5C', '\x0A38'},
-            new char[] {'\xFD5D', '\x0A39'},
-            new char[] {'\xFD5E', '\x0A3A'},
-            new char[] {'\xFD5F', '\x0A3B'},
-            new char[] {'\xFD60', '\x0A3B'},
-            new char[] {'\xFD61', '\x0A3C'},
-            new char[] {'\xFD62', '\x0A3D'},
-            new char[] {'\xFD63', '\x0A3D'},
-            new char[] {'\xFD64', '\x0A3E'},
-            new char[] {'\xFD65', '\x0A3E'},
-            new char[] {'\xFD66', '\x0A3F'},
-            new char[] {'\xFD67', '\x0A40'},
-            new char[] {'\xFD68', '\x0A40'},
-            new char[] {'\xFD69', '\x0A41'},
-            new char[] {'\xFD6A', '\x0A42'},
-            new char[] {'\xFD6B', '\x0A42'},
-            new char[] {'\xFD6C', '\x0A43'},
-            new char[] {'\xFD6D', '\x0A43'},
-            new char[] {'\xFD6E', '\x0A44'},
-            new char[] {'\xFD6F', '\x0A45'},
-            new char[] {'\xFD70', '\x0A45'},
-            new char[] {'\xFD71', '\x0A46'},
-            new char[] {'\xFD72', '\x0A46'},
-            new char[] {'\xFD73', '\x0A47'},
-            new char[] {'\xFD74', '\x0A48'},
-            new char[] {'\xFD75', '\x0A49'},
-            new char[] {'\xFD76', '\x0A4A'},
-            new char[] {'\xFD77', '\x0A4A'},
-            new char[] {'\xFD78', '\x0A4B'},
-            new char[] {'\xFD79', '\x0A4C'},
-            new char[] {'\xFD7A', '\x0A4D'},
-            new char[] {'\xFD7B', '\x0A4E'},
-            new char[] {'\xFD7C', '\x0A4F'},
-            new char[] {'\xFD7D', '\x0A4F'},
-            new char[] {'\xFD7E', '\x0A50'},
-            new char[] {'\xFD7F', '\x0A51'},
-            new char[] {'\xFD80', '\x0A52'},
-            new char[] {'\xFD81', '\x0A53'},
-            new char[] {'\xFD82', '\x0A54'},
-            new char[] {'\xFD83', '\x0A55'},
-            new char[] {'\xFD84', '\x0A55'},
-            new char[] {'\xFD85', '\x0A56'},
-            new char[] {'\xFD86', '\x0A56'},
-            new char[] {'\xFD87', '\x0A57'},
-            new char[] {'\xFD88', '\x0A57'},
-            new char[] {'\xFD89', '\x0A58'},
-            new char[] {'\xFD8A', '\x0A59'},
-            new char[] {'\xFD8B', '\x0A5A'},
-            new char[] {'\xFD8C', '\x0A5B'},
-            new char[] {'\xFD8D', '\x0A5C'},
-            new char[] {'\xFD8E', '\x0A5D'},
-            new char[] {'\xFD8F', '\x0A5E'},
-            new char[] {'\xFD92', '\x0A5F'},
-            new char[] {'\xFD93', '\x0A60'},
-            new char[] {'\xFD94', '\x0A61'},
-            new char[] {'\xFD95', '\x0A62'},
-            new char[] {'\xFD96', '\x0A63'},
-            new char[] {'\xFD97', '\x0A64'},
-            new char[] {'\xFD98', '\x0A64'},
-            new char[] {'\xFD99', '\x0A65'},
-            new char[] {'\xFD9A', '\x0A66'},
-            new char[] {'\xFD9B', '\x0A67'},
-            new char[] {'\xFD9C', '\x0A68'},
-            new char[] {'\xFD9D', '\x0A68'},
-            new char[] {'\xFD9E', '\x0A69'},
-            new char[] {'\xFD9F', '\x0A6A'},
-            new char[] {'\xFDA0', '\x0A6B'},
-            new char[] {'\xFDA1', '\x0A6C'},
-            new char[] {'\xFDA2', '\x0A6D'},
-            new char[] {'\xFDA3', '\x0A6E'},
-            new char[] {'\xFDA4', '\x0A6F'},
-            new char[] {'\xFDA5', '\x0A70'},
-            new char[] {'\xFDA6', '\x0A71'},
-            new char[] {'\xFDA7', '\x0A72'},
-            new char[] {'\xFDA8', '\x0A73'},
-            new char[] {'\xFDA9', '\x0A74'},
-            new char[] {'\xFDAA', '\x0A75'},
-            new char[] {'\xFDAB', '\x0A76'},
-            new char[] {'\xFDAC', '\x0A77'},
-            new char[] {'\xFDAD', '\x0A78'},
-            new char[] {'\xFDAE', '\x0A79'},
-            new char[] {'\xFDAF', '\x0A7A'},
-            new char[] {'\xFDB0', '\x0A7B'},
-            new char[] {'\xFDB1', '\x0A7C'},
-            new char[] {'\xFDB2', '\x0A7D'},
-            new char[] {'\xFDB3', '\x0A7E'},
-            new char[] {'\xFDB4', '\x0A50'},
-            new char[] {'\xFDB5', '\x0A52'},
-            new char[] {'\xFDB6', '\x0A7F'},
-            new char[] {'\xFDB7', '\x0A80'},
-            new char[] {'\xFDB8', '\x0A81'},
-            new char[] {'\xFDB9', '\x0A82'},
-            new char[] {'\xFDBA', '\x0A83'},
-            new char[] {'\xFDBB', '\x0A84'},
-            new char[] {'\xFDBC', '\x0A83'},
-            new char[] {'\xFDBD', '\x0A81'},
-            new char[] {'\xFDBE', '\x0A85'},
-            new char[] {'\xFDBF', '\x0A86'},
-            new char[] {'\xFDC0', '\x0A87'},
-            new char[] {'\xFDC1', '\x0A88'},
-            new char[] {'\xFDC2', '\x0A89'},
-            new char[] {'\xFDC3', '\x0A84'},
-            new char[] {'\xFDC4', '\x0A49'},
-            new char[] {'\xFDC5', '\x0A3F'},
-            new char[] {'\xFDC6', '\x0A8A'},
-            new char[] {'\xFDC7', '\x0A8B'},
-            new char[] {'\xFDF0', '\x0A8C'},
-            new char[] {'\xFDF1', '\x0A8D'},
-            new char[] {'\xFDF2', '\x0A8E'},
-            new char[] {'\xFDF3', '\x0A8F'},
-            new char[] {'\xFDF4', '\x0A90'},
-            new char[] {'\xFDF5', '\x0A91'},
-            new char[] {'\xFDF6', '\x0A92'},
-            new char[] {'\xFDF7', '\x0A93'},
-            new char[] {'\xFDF8', '\x0A94'},
-            new char[] {'\xFDF9', '\x0A95'},
-            new char[] {'\xFDFA', '\x0A96'},
-            new char[] {'\xFDFB', '\x0A97'},
-            new char[] {'\xFDFC', '\x0A98'},
-            new char[] {'\xFE30', '\x03AA'},
-            new char[] {'\xFE31', '\x0A99'},
-            new char[] {'\xFE32', '\x0A9A'},
-            new char[] {'\xFE33', '\x0A9B'},
-            new char[] {'\xFE34', '\x0A9B'},
-            new char[] {'\xFE35', '\x03C1'},
-            new char[] {'\xFE36', '\x03C2'},
-            new char[] {'\xFE37', '\x0A9C'},
-            new char[] {'\xFE38', '\x0A9D'},
-            new char[] {'\xFE39', '\x0A9E'},
-            new char[] {'\xFE3A', '\x0A9F'},
-            new char[] {'\xFE3B', '\x0AA0'},
-            new char[] {'\xFE3C', '\x0AA1'},
-            new char[] {'\xFE3D', '\x0AA2'},
-            new char[] {'\xFE3E', '\x0AA3'},
-            new char[] {'\xFE3F', '\x0440'},
-            new char[] {'\xFE40', '\x0441'},
-            new char[] {'\xFE41', '\x0AA4'},
-            new char[] {'\xFE42', '\x0AA5'},
-            new char[] {'\xFE43', '\x0AA6'},
-            new char[] {'\xFE44', '\x0AA7'},
-            new char[] {'\xFE49', '\x03B1'},
-            new char[] {'\xFE4A', '\x03B1'},
-            new char[] {'\xFE4B', '\x03B1'},
-            new char[] {'\xFE4C', '\x03B1'},
-            new char[] {'\xFE4D', '\x0A9B'},
-            new char[] {'\xFE4E', '\x0A9B'},
-            new char[] {'\xFE4F', '\x0A9B'},
-            new char[] {'\xFE50', '\x0AA8'},
-            new char[] {'\xFE51', '\x0AA9'},
-            new char[] {'\xFE52', '\x03A9'},
-            new char[] {'\xFE54', '\x0135'},
-            new char[] {'\xFE55', '\x0AAA'},
-            new char[] {'\xFE56', '\x0AAB'},
-            new char[] {'\xFE57', '\x0AAC'},
-            new char[] {'\xFE58', '\x0A99'},
-            new char[] {'\xFE59', '\x03C1'},
-            new char[] {'\xFE5A', '\x03C2'},
-            new char[] {'\xFE5B', '\x0A9C'},
-            new char[] {'\xFE5C', '\x0A9D'},
-            new char[] {'\xFE5D', '\x0A9E'},
-            new char[] {'\xFE5E', '\x0A9F'},
-            new char[] {'\xFE5F', '\x0AAD'},
-            new char[] {'\xFE60', '\x0AAE'},
-            new char[] {'\xFE61', '\x0AAF'},
-            new char[] {'\xFE62', '\x03BE'},
-            new char[] {'\xFE63', '\x0AB0'},
-            new char[] {'\xFE64', '\x0AB1'},
-            new char[] {'\xFE65', '\x0AB2'},
-            new char[] {'\xFE66', '\x03C0'},
-            new char[] {'\xFE68', '\x0AB3'},
-            new char[] {'\xFE69', '\x0AB4'},
-            new char[] {'\xFE6A', '\x0AB5'},
-            new char[] {'\xFE6B', '\x0AB6'},
-            new char[] {'\xFE70', '\x0AB7'},
-            new char[] {'\xFE71', '\x0AB8'},
-            new char[] {'\xFE72', '\x0AB9'},
-            new char[] {'\xFE74', '\x0ABA'},
-            new char[] {'\xFE76', '\x0ABB'},
-            new char[] {'\xFE77', '\x0ABC'},
-            new char[] {'\xFE78', '\x0ABD'},
-            new char[] {'\xFE79', '\x0ABE'},
-            new char[] {'\xFE7A', '\x0ABF'},
-            new char[] {'\xFE7B', '\x0AC0'},
-            new char[] {'\xFE7C', '\x0AC1'},
-            new char[] {'\xFE7D', '\x0AC2'},
-            new char[] {'\xFE7E', '\x0AC3'},
-            new char[] {'\xFE7F', '\x0AC4'},
-            new char[] {'\xFE80', '\x0AC5'},
-            new char[] {'\xFE81', '\x018B'},
-            new char[] {'\xFE82', '\x018B'},
-            new char[] {'\xFE83', '\x018C'},
-            new char[] {'\xFE84', '\x018C'},
-            new char[] {'\xFE85', '\x018D'},
-            new char[] {'\xFE86', '\x018D'},
-            new char[] {'\xFE87', '\x018E'},
-            new char[] {'\xFE88', '\x018E'},
-            new char[] {'\xFE89', '\x018F'},
-            new char[] {'\xFE8A', '\x018F'},
-            new char[] {'\xFE8B', '\x018F'},
-            new char[] {'\xFE8C', '\x018F'},
-            new char[] {'\xFE8D', '\x0AC6'},
-            new char[] {'\xFE8E', '\x0AC6'},
-            new char[] {'\xFE8F', '\x0AC7'},
-            new char[] {'\xFE90', '\x0AC7'},
-            new char[] {'\xFE91', '\x0AC7'},
-            new char[] {'\xFE92', '\x0AC7'},
-            new char[] {'\xFE93', '\x0AC8'},
-            new char[] {'\xFE94', '\x0AC8'},
-            new char[] {'\xFE95', '\x0AC9'},
-            new char[] {'\xFE96', '\x0AC9'},
-            new char[] {'\xFE97', '\x0AC9'},
-            new char[] {'\xFE98', '\x0AC9'},
-            new char[] {'\xFE99', '\x0ACA'},
-            new char[] {'\xFE9A', '\x0ACA'},
-            new char[] {'\xFE9B', '\x0ACA'},
-            new char[] {'\xFE9C', '\x0ACA'},
-            new char[] {'\xFE9D', '\x0ACB'},
-            new char[] {'\xFE9E', '\x0ACB'},
-            new char[] {'\xFE9F', '\x0ACB'},
-            new char[] {'\xFEA0', '\x0ACB'},
-            new char[] {'\xFEA1', '\x0ACC'},
-            new char[] {'\xFEA2', '\x0ACC'},
-            new char[] {'\xFEA3', '\x0ACC'},
-            new char[] {'\xFEA4', '\x0ACC'},
-            new char[] {'\xFEA5', '\x0ACD'},
-            new char[] {'\xFEA6', '\x0ACD'},
-            new char[] {'\xFEA7', '\x0ACD'},
-            new char[] {'\xFEA8', '\x0ACD'},
-            new char[] {'\xFEA9', '\x0ACE'},
-            new char[] {'\xFEAA', '\x0ACE'},
-            new char[] {'\xFEAB', '\x0ACF'},
-            new char[] {'\xFEAC', '\x0ACF'},
-            new char[] {'\xFEAD', '\x0AD0'},
-            new char[] {'\xFEAE', '\x0AD0'},
-            new char[] {'\xFEAF', '\x0AD1'},
-            new char[] {'\xFEB0', '\x0AD1'},
-            new char[] {'\xFEB1', '\x0AD2'},
-            new char[] {'\xFEB2', '\x0AD2'},
-            new char[] {'\xFEB3', '\x0AD2'},
-            new char[] {'\xFEB4', '\x0AD2'},
-            new char[] {'\xFEB5', '\x0AD3'},
-            new char[] {'\xFEB6', '\x0AD3'},
-            new char[] {'\xFEB7', '\x0AD3'},
-            new char[] {'\xFEB8', '\x0AD3'},
-            new char[] {'\xFEB9', '\x0AD4'},
-            new char[] {'\xFEBA', '\x0AD4'},
-            new char[] {'\xFEBB', '\x0AD4'},
-            new char[] {'\xFEBC', '\x0AD4'},
-            new char[] {'\xFEBD', '\x0AD5'},
-            new char[] {'\xFEBE', '\x0AD5'},
-            new char[] {'\xFEBF', '\x0AD5'},
-            new char[] {'\xFEC0', '\x0AD5'},
-            new char[] {'\xFEC1', '\x0AD6'},
-            new char[] {'\xFEC2', '\x0AD6'},
-            new char[] {'\xFEC3', '\x0AD6'},
-            new char[] {'\xFEC4', '\x0AD6'},
-            new char[] {'\xFEC5', '\x0AD7'},
-            new char[] {'\xFEC6', '\x0AD7'},
-            new char[] {'\xFEC7', '\x0AD7'},
-            new char[] {'\xFEC8', '\x0AD7'},
-            new char[] {'\xFEC9', '\x0AD8'},
-            new char[] {'\xFECA', '\x0AD8'},
-            new char[] {'\xFECB', '\x0AD8'},
-            new char[] {'\xFECC', '\x0AD8'},
-            new char[] {'\xFECD', '\x0AD9'},
-            new char[] {'\xFECE', '\x0AD9'},
-            new char[] {'\xFECF', '\x0AD9'},
-            new char[] {'\xFED0', '\x0AD9'},
-            new char[] {'\xFED1', '\x0ADA'},
-            new char[] {'\xFED2', '\x0ADA'},
-            new char[] {'\xFED3', '\x0ADA'},
-            new char[] {'\xFED4', '\x0ADA'},
-            new char[] {'\xFED5', '\x0ADB'},
-            new char[] {'\xFED6', '\x0ADB'},
-            new char[] {'\xFED7', '\x0ADB'},
-            new char[] {'\xFED8', '\x0ADB'},
-            new char[] {'\xFED9', '\x0ADC'},
-            new char[] {'\xFEDA', '\x0ADC'},
-            new char[] {'\xFEDB', '\x0ADC'},
-            new char[] {'\xFEDC', '\x0ADC'},
-            new char[] {'\xFEDD', '\x0ADD'},
-            new char[] {'\xFEDE', '\x0ADD'},
-            new char[] {'\xFEDF', '\x0ADD'},
-            new char[] {'\xFEE0', '\x0ADD'},
-            new char[] {'\xFEE1', '\x0ADE'},
-            new char[] {'\xFEE2', '\x0ADE'},
-            new char[] {'\xFEE3', '\x0ADE'},
-            new char[] {'\xFEE4', '\x0ADE'},
-            new char[] {'\xFEE5', '\x0ADF'},
-            new char[] {'\xFEE6', '\x0ADF'},
-            new char[] {'\xFEE7', '\x0ADF'},
-            new char[] {'\xFEE8', '\x0ADF'},
-            new char[] {'\xFEE9', '\x0AE0'},
-            new char[] {'\xFEEA', '\x0AE0'},
-            new char[] {'\xFEEB', '\x0AE0'},
-            new char[] {'\xFEEC', '\x0AE0'},
-            new char[] {'\xFEED', '\x0AE1'},
-            new char[] {'\xFEEE', '\x0AE1'},
-            new char[] {'\xFEEF', '\x0982'},
-            new char[] {'\xFEF0', '\x0982'},
-            new char[] {'\xFEF1', '\x0AE2'},
-            new char[] {'\xFEF2', '\x0AE2'},
-            new char[] {'\xFEF3', '\x0AE2'},
-            new char[] {'\xFEF4', '\x0AE2'},
-            new char[] {'\xFEF5', '\x0AE3'},
-            new char[] {'\xFEF6', '\x0AE3'},
-            new char[] {'\xFEF7', '\x0AE4'},
-            new char[] {'\xFEF8', '\x0AE4'},
-            new char[] {'\xFEF9', '\x0AE5'},
-            new char[] {'\xFEFA', '\x0AE5'},
-            new char[] {'\xFEFB', '\x0AE6'},
-            new char[] {'\xFEFC', '\x0AE6'},
-            new char[] {'\xFF01', '\x0AAC'},
-            new char[] {'\xFF02', '\x0AE7'},
-            new char[] {'\xFF03', '\x0AAD'},
-            new char[] {'\xFF04', '\x0AB4'},
-            new char[] {'\xFF05', '\x0AB5'},
-            new char[] {'\xFF06', '\x0AAE'},
-            new char[] {'\xFF07', '\x0AE8'},
-            new char[] {'\xFF08', '\x03C1'},
-            new char[] {'\xFF09', '\x03C2'},
-            new char[] {'\xFF0A', '\x0AAF'},
-            new char[] {'\xFF0B', '\x03BE'},
-            new char[] {'\xFF0C', '\x0AA8'},
-            new char[] {'\xFF0D', '\x0AB0'},
-            new char[] {'\xFF0E', '\x03A9'},
-            new char[] {'\xFF0F', '\x0AE9'},
-            new char[] {'\xFF10', '\x03B6'},
-            new char[] {'\xFF11', '\x0009'},
-            new char[] {'\xFF12', '\x0004'},
-            new char[] {'\xFF13', '\x0005'},
-            new char[] {'\xFF14', '\x03B8'},
-            new char[] {'\xFF15', '\x03B9'},
-            new char[] {'\xFF16', '\x03BA'},
-            new char[] {'\xFF17', '\x03BB'},
-            new char[] {'\xFF18', '\x03BC'},
-            new char[] {'\xFF19', '\x03BD'},
-            new char[] {'\xFF1A', '\x0AAA'},
-            new char[] {'\xFF1B', '\x0135'},
-            new char[] {'\xFF1C', '\x0AB1'},
-            new char[] {'\xFF1D', '\x03C0'},
-            new char[] {'\xFF1E', '\x0AB2'},
-            new char[] {'\xFF1F', '\x0AAB'},
-            new char[] {'\xFF20', '\x0AB6'},
-            new char[] {'\xFF21', '\x048F'},
-            new char[] {'\xFF22', '\x03DD'},
-            new char[] {'\xFF23', '\x03C7'},
-            new char[] {'\xFF24', '\x03EA'},
-            new char[] {'\xFF25', '\x03DF'},
-            new char[] {'\xFF26', '\x03E0'},
-            new char[] {'\xFF27', '\x0490'},
-            new char[] {'\xFF28', '\x03CE'},
-            new char[] {'\xFF29', '\x03D0'},
-            new char[] {'\xFF2A', '\x0491'},
-            new char[] {'\xFF2B', '\x03DC'},
-            new char[] {'\xFF2C', '\x03D1'},
-            new char[] {'\xFF2D', '\x03E1'},
-            new char[] {'\xFF2E', '\x03D2'},
-            new char[] {'\xFF2F', '\x0492'},
-            new char[] {'\xFF30', '\x03D4'},
-            new char[] {'\xFF31', '\x03D5'},
-            new char[] {'\xFF32', '\x03D6'},
-            new char[] {'\xFF33', '\x0493'},
-            new char[] {'\xFF34', '\x0494'},
-            new char[] {'\xFF35', '\x0495'},
-            new char[] {'\xFF36', '\x03FC'},
-            new char[] {'\xFF37', '\x0496'},
-            new char[] {'\xFF38', '\x0401'},
-            new char[] {'\xFF39', '\x0497'},
-            new char[] {'\xFF3A', '\x03DA'},
-            new char[] {'\xFF3B', '\x0AEA'},
-            new char[] {'\xFF3C', '\x0AB3'},
-            new char[] {'\xFF3D', '\x0AEB'},
-            new char[] {'\xFF3E', '\x0AEC'},
-            new char[] {'\xFF3F', '\x0A9B'},
-            new char[] {'\xFF40', '\x039D'},
-            new char[] {'\xFF41', '\x0002'},
-            new char[] {'\xFF42', '\x0498'},
-            new char[] {'\xFF43', '\x040E'},
-            new char[] {'\xFF44', '\x03EB'},
-            new char[] {'\xFF45', '\x03DE'},
-            new char[] {'\xFF46', '\x0499'},
-            new char[] {'\xFF47', '\x03CD'},
-            new char[] {'\xFF48', '\x011C'},
-            new char[] {'\xFF49', '\x03B7'},
-            new char[] {'\xFF4A', '\x011E'},
-            new char[] {'\xFF4B', '\x049A'},
-            new char[] {'\xFF4C', '\x012C'},
-            new char[] {'\xFF4D', '\x040F'},
-            new char[] {'\xFF4E', '\x03C3'},
-            new char[] {'\xFF4F', '\x000A'},
-            new char[] {'\xFF50', '\x049B'},
-            new char[] {'\xFF51', '\x049C'},
-            new char[] {'\xFF52', '\x011F'},
-            new char[] {'\xFF53', '\x00B4'},
-            new char[] {'\xFF54', '\x049D'},
-            new char[] {'\xFF55', '\x049E'},
-            new char[] {'\xFF56', '\x0407'},
-            new char[] {'\xFF57', '\x0123'},
-            new char[] {'\xFF58', '\x012D'},
-            new char[] {'\xFF59', '\x0124'},
-            new char[] {'\xFF5A', '\x049F'},
-            new char[] {'\xFF5B', '\x0A9C'},
-            new char[] {'\xFF5C', '\x0AED'},
-            new char[] {'\xFF5D', '\x0A9D'},
-            new char[] {'\xFF5E', '\x0AEE'},
-            new char[] {'\xFF5F', '\x0AEF'},
-            new char[] {'\xFF60', '\x0AF0'},
-            new char[] {'\xFF61', '\x0AF1'},
-            new char[] {'\xFF62', '\x0AA4'},
-            new char[] {'\xFF63', '\x0AA5'},
-            new char[] {'\xFF64', '\x0AA9'},
-            new char[] {'\xFF65', '\x0AF2'},
-            new char[] {'\xFF66', '\x06ED'},
-            new char[] {'\xFF67', '\x0AF3'},
-            new char[] {'\xFF68', '\x0AF4'},
-            new char[] {'\xFF69', '\x0AF5'},
-            new char[] {'\xFF6A', '\x0AF6'},
-            new char[] {'\xFF6B', '\x0AF7'},
-            new char[] {'\xFF6C', '\x0AF8'},
-            new char[] {'\xFF6D', '\x0AF9'},
-            new char[] {'\xFF6E', '\x0AFA'},
-            new char[] {'\xFF6F', '\x0AFB'},
-            new char[] {'\xFF70', '\x0AFC'},
-            new char[] {'\xFF71', '\x06BF'},
-            new char[] {'\xFF72', '\x06C0'},
-            new char[] {'\xFF73', '\x06C1'},
-            new char[] {'\xFF74', '\x06C2'},
-            new char[] {'\xFF75', '\x06C3'},
-            new char[] {'\xFF76', '\x06C4'},
-            new char[] {'\xFF77', '\x06C5'},
-            new char[] {'\xFF78', '\x06C6'},
-            new char[] {'\xFF79', '\x06C7'},
-            new char[] {'\xFF7A', '\x06C8'},
-            new char[] {'\xFF7B', '\x06C9'},
-            new char[] {'\xFF7C', '\x06CA'},
-            new char[] {'\xFF7D', '\x06CB'},
-            new char[] {'\xFF7E', '\x06CC'},
-            new char[] {'\xFF7F', '\x06CD'},
-            new char[] {'\xFF80', '\x06CE'},
-            new char[] {'\xFF81', '\x06CF'},
-            new char[] {'\xFF82', '\x06D0'},
-            new char[] {'\xFF83', '\x06D1'},
-            new char[] {'\xFF84', '\x06D2'},
-            new char[] {'\xFF85', '\x06D3'},
-            new char[] {'\xFF86', '\x06D4'},
-            new char[] {'\xFF87', '\x06D5'},
-            new char[] {'\xFF88', '\x06D6'},
-            new char[] {'\xFF89', '\x06D7'},
-            new char[] {'\xFF8A', '\x06D8'},
-            new char[] {'\xFF8B', '\x06D9'},
-            new char[] {'\xFF8C', '\x06DA'},
-            new char[] {'\xFF8D', '\x06DB'},
-            new char[] {'\xFF8E', '\x06DC'},
-            new char[] {'\xFF8F', '\x06DD'},
-            new char[] {'\xFF90', '\x06DE'},
-            new char[] {'\xFF91', '\x06DF'},
-            new char[] {'\xFF92', '\x06E0'},
-            new char[] {'\xFF93', '\x06E1'},
-            new char[] {'\xFF94', '\x06E2'},
-            new char[] {'\xFF95', '\x06E3'},
-            new char[] {'\xFF96', '\x06E4'},
-            new char[] {'\xFF97', '\x06E5'},
-            new char[] {'\xFF98', '\x06E6'},
-            new char[] {'\xFF99', '\x06E7'},
-            new char[] {'\xFF9A', '\x06E8'},
-            new char[] {'\xFF9B', '\x06E9'},
-            new char[] {'\xFF9C', '\x06EA'},
-            new char[] {'\xFF9D', '\x0AFD'},
-            new char[] {'\xFF9E', '\x0AFE'},
-            new char[] {'\xFF9F', '\x0AFF'},
-            new char[] {'\xFFA0', '\x05F1'},
-            new char[] {'\xFFA1', '\x05BE'},
-            new char[] {'\xFFA2', '\x05BF'},
-            new char[] {'\xFFA3', '\x05C0'},
-            new char[] {'\xFFA4', '\x05C1'},
-            new char[] {'\xFFA5', '\x05C2'},
-            new char[] {'\xFFA6', '\x05C3'},
-            new char[] {'\xFFA7', '\x05C4'},
-            new char[] {'\xFFA8', '\x05C5'},
-            new char[] {'\xFFA9', '\x05C6'},
-            new char[] {'\xFFAA', '\x05C7'},
-            new char[] {'\xFFAB', '\x05C8'},
-            new char[] {'\xFFAC', '\x05C9'},
-            new char[] {'\xFFAD', '\x05CA'},
-            new char[] {'\xFFAE', '\x05CB'},
-            new char[] {'\xFFAF', '\x05CC'},
-            new char[] {'\xFFB0', '\x05CD'},
-            new char[] {'\xFFB1', '\x05CE'},
-            new char[] {'\xFFB2', '\x05CF'},
-            new char[] {'\xFFB3', '\x05D0'},
-            new char[] {'\xFFB4', '\x05D1'},
-            new char[] {'\xFFB5', '\x05D2'},
-            new char[] {'\xFFB6', '\x05D3'},
-            new char[] {'\xFFB7', '\x05D4'},
-            new char[] {'\xFFB8', '\x05D5'},
-            new char[] {'\xFFB9', '\x05D6'},
-            new char[] {'\xFFBA', '\x05D7'},
-            new char[] {'\xFFBB', '\x05D8'},
-            new char[] {'\xFFBC', '\x05D9'},
-            new char[] {'\xFFBD', '\x05DA'},
-            new char[] {'\xFFBE', '\x05DB'},
-            new char[] {'\xFFC2', '\x05DC'},
-            new char[] {'\xFFC3', '\x05DD'},
-            new char[] {'\xFFC4', '\x05DE'},
-            new char[] {'\xFFC5', '\x05DF'},
-            new char[] {'\xFFC6', '\x05E0'},
-            new char[] {'\xFFC7', '\x05E1'},
-            new char[] {'\xFFCA', '\x05E2'},
-            new char[] {'\xFFCB', '\x05E3'},
-            new char[] {'\xFFCC', '\x05E4'},
-            new char[] {'\xFFCD', '\x05E5'},
-            new char[] {'\xFFCE', '\x05E6'},
-            new char[] {'\xFFCF', '\x05E7'},
-            new char[] {'\xFFD2', '\x05E8'},
-            new char[] {'\xFFD3', '\x05E9'},
-            new char[] {'\xFFD4', '\x05EA'},
-            new char[] {'\xFFD5', '\x05EB'},
-            new char[] {'\xFFD6', '\x05EC'},
-            new char[] {'\xFFD7', '\x05ED'},
-            new char[] {'\xFFDA', '\x05EE'},
-            new char[] {'\xFFDB', '\x05EF'},
-            new char[] {'\xFFDC', '\x05F0'},
-            new char[] {'\xFFE0', '\x0B00'},
-            new char[] {'\xFFE1', '\x0B01'},
-            new char[] {'\xFFE2', '\x0B02'},
-            new char[] {'\xFFE3', '\x0003'},
-            new char[] {'\xFFE4', '\x0B03'},
-            new char[] {'\xFFE5', '\x0B04'},
-            new char[] {'\xFFE6', '\x0B05'},
-            new char[] {'\xFFE8', '\x0B06'},
-            new char[] {'\xFFE9', '\x0B07'},
-            new char[] {'\xFFEA', '\x0B08'},
-            new char[] {'\xFFEB', '\x0B09'},
-            new char[] {'\xFFEC', '\x0B0A'},
-            new char[] {'\xFFED', '\x0B0B'},
-            new char[] {'\xFFEE', '\x0B0C'}
-        };
-
-        /// <summary>
-        /// How to expand characters.  Since multiple input characters
-        /// output the same string, this table is compressed to only
-        /// have one copy of each, and the Offsets table
-        /// gives offsets into this for each input.
-        /// </summary>
-        public static readonly string[] Expansion =
-        {
-            "\x0020", /* offset 0x0000 */
-            "\x0020\x0308", /* offset 0x0001 */
-            "\x0061", /* offset 0x0002 */
-            "\x0020\x0304", /* offset 0x0003 */
-            "\x0032", /* offset 0x0004 */
-            "\x0033", /* offset 0x0005 */
-            "\x0020\x0301", /* offset 0x0006 */
-            "\x03BC", /* offset 0x0007 */
-            "\x0020\x0327", /* offset 0x0008 */
-            "\x0031", /* offset 0x0009 */
-            "\x006F", /* offset 0x000A */
-            "\x0031\x2044\x0034", /* offset 0x000B */
-            "\x0031\x2044\x0032", /* offset 0x000C */
-            "\x0033\x2044\x0034", /* offset 0x000D */
-            "\x0041\x0300", /* offset 0x000E */
-            "\x0041\x0301", /* offset 0x000F */
-            "\x0041\x0302", /* offset 0x0010 */
-            "\x0041\x0303", /* offset 0x0011 */
-            "\x0041\x0308", /* offset 0x0012 */
-            "\x0041\x030A", /* offset 0x0013 */
-            "\x0043\x0327", /* offset 0x0014 */
-            "\x0045\x0300", /* offset 0x0015 */
-            "\x0045\x0301", /* offset 0x0016 */
-            "\x0045\x0302", /* offset 0x0017 */
-            "\x0045\x0308", /* offset 0x0018 */
-            "\x0049\x0300", /* offset 0x0019 */
-            "\x0049\x0301", /* offset 0x001A */
-            "\x0049\x0302", /* offset 0x001B */
-            "\x0049\x0308", /* offset 0x001C */
-            "\x004E\x0303", /* offset 0x001D */
-            "\x004F\x0300", /* offset 0x001E */
-            "\x004F\x0301", /* offset 0x001F */
-            "\x004F\x0302", /* offset 0x0020 */
-            "\x004F\x0303", /* offset 0x0021 */
-            "\x004F\x0308", /* offset 0x0022 */
-            "\x0055\x0300", /* offset 0x0023 */
-            "\x0055\x0301", /* offset 0x0024 */
-            "\x0055\x0302", /* offset 0x0025 */
-            "\x0055\x0308", /* offset 0x0026 */
-            "\x0059\x0301", /* offset 0x0027 */
-            "\x0061\x0300", /* offset 0x0028 */
-            "\x0061\x0301", /* offset 0x0029 */
-            "\x0061\x0302", /* offset 0x002A */
-            "\x0061\x0303", /* offset 0x002B */
-            "\x0061\x0308", /* offset 0x002C */
-            "\x0061\x030A", /* offset 0x002D */
-            "\x0063\x0327", /* offset 0x002E */
-            "\x0065\x0300", /* offset 0x002F */
-            "\x0065\x0301", /* offset 0x0030 */
-            "\x0065\x0302", /* offset 0x0031 */
-            "\x0065\x0308", /* offset 0x0032 */
-            "\x0069\x0300", /* offset 0x0033 */
-            "\x0069\x0301", /* offset 0x0034 */
-            "\x0069\x0302", /* offset 0x0035 */
-            "\x0069\x0308", /* offset 0x0036 */
-            "\x006E\x0303", /* offset 0x0037 */
-            "\x006F\x0300", /* offset 0x0038 */
-            "\x006F\x0301", /* offset 0x0039 */
-            "\x006F\x0302", /* offset 0x003A */
-            "\x006F\x0303", /* offset 0x003B */
-            "\x006F\x0308", /* offset 0x003C */
-            "\x0075\x0300", /* offset 0x003D */
-            "\x0075\x0301", /* offset 0x003E */
-            "\x0075\x0302", /* offset 0x003F */
-            "\x0075\x0308", /* offset 0x0040 */
-            "\x0079\x0301", /* offset 0x0041 */
-            "\x0079\x0308", /* offset 0x0042 */
-            "\x0041\x0304", /* offset 0x0043 */
-            "\x0061\x0304", /* offset 0x0044 */
-            "\x0041\x0306", /* offset 0x0045 */
-            "\x0061\x0306", /* offset 0x0046 */
-            "\x0041\x0328", /* offset 0x0047 */
-            "\x0061\x0328", /* offset 0x0048 */
-            "\x0043\x0301", /* offset 0x0049 */
-            "\x0063\x0301", /* offset 0x004A */
-            "\x0043\x0302", /* offset 0x004B */
-            "\x0063\x0302", /* offset 0x004C */
-            "\x0043\x0307", /* offset 0x004D */
-            "\x0063\x0307", /* offset 0x004E */
-            "\x0043\x030C", /* offset 0x004F */
-            "\x0063\x030C", /* offset 0x0050 */
-            "\x0044\x030C", /* offset 0x0051 */
-            "\x0064\x030C", /* offset 0x0052 */
-            "\x0045\x0304", /* offset 0x0053 */
-            "\x0065\x0304", /* offset 0x0054 */
-            "\x0045\x0306", /* offset 0x0055 */
-            "\x0065\x0306", /* offset 0x0056 */
-            "\x0045\x0307", /* offset 0x0057 */
-            "\x0065\x0307", /* offset 0x0058 */
-            "\x0045\x0328", /* offset 0x0059 */
-            "\x0065\x0328", /* offset 0x005A */
-            "\x0045\x030C", /* offset 0x005B */
-            "\x0065\x030C", /* offset 0x005C */
-            "\x0047\x0302", /* offset 0x005D */
-            "\x0067\x0302", /* offset 0x005E */
-            "\x0047\x0306", /* offset 0x005F */
-            "\x0067\x0306", /* offset 0x0060 */
-            "\x0047\x0307", /* offset 0x0061 */
-            "\x0067\x0307", /* offset 0x0062 */
-            "\x0047\x0327", /* offset 0x0063 */
-            "\x0067\x0327", /* offset 0x0064 */
-            "\x0048\x0302", /* offset 0x0065 */
-            "\x0068\x0302", /* offset 0x0066 */
-            "\x0049\x0303", /* offset 0x0067 */
-            "\x0069\x0303", /* offset 0x0068 */
-            "\x0049\x0304", /* offset 0x0069 */
-            "\x0069\x0304", /* offset 0x006A */
-            "\x0049\x0306", /* offset 0x006B */
-            "\x0069\x0306", /* offset 0x006C */
-            "\x0049\x0328", /* offset 0x006D */
-            "\x0069\x0328", /* offset 0x006E */
-            "\x0049\x0307", /* offset 0x006F */
-            "\x0049\x004A", /* offset 0x0070 */
-            "\x0069\x006A", /* offset 0x0071 */
-            "\x004A\x0302", /* offset 0x0072 */
-            "\x006A\x0302", /* offset 0x0073 */
-            "\x004B\x0327", /* offset 0x0074 */
-            "\x006B\x0327", /* offset 0x0075 */
-            "\x004C\x0301", /* offset 0x0076 */
-            "\x006C\x0301", /* offset 0x0077 */
-            "\x004C\x0327", /* offset 0x0078 */
-            "\x006C\x0327", /* offset 0x0079 */
-            "\x004C\x030C", /* offset 0x007A */
-            "\x006C\x030C", /* offset 0x007B */
-            "\x004C\x00B7", /* offset 0x007C */
-            "\x006C\x00B7", /* offset 0x007D */
-            "\x004E\x0301", /* offset 0x007E */
-            "\x006E\x0301", /* offset 0x007F */
-            "\x004E\x0327", /* offset 0x0080 */
-            "\x006E\x0327", /* offset 0x0081 */
-            "\x004E\x030C", /* offset 0x0082 */
-            "\x006E\x030C", /* offset 0x0083 */
-            "\x02BC\x006E", /* offset 0x0084 */
-            "\x004F\x0304", /* offset 0x0085 */
-            "\x006F\x0304", /* offset 0x0086 */
-            "\x004F\x0306", /* offset 0x0087 */
-            "\x006F\x0306", /* offset 0x0088 */
-            "\x004F\x030B", /* offset 0x0089 */
-            "\x006F\x030B", /* offset 0x008A */
-            "\x0052\x0301", /* offset 0x008B */
-            "\x0072\x0301", /* offset 0x008C */
-            "\x0052\x0327", /* offset 0x008D */
-            "\x0072\x0327", /* offset 0x008E */
-            "\x0052\x030C", /* offset 0x008F */
-            "\x0072\x030C", /* offset 0x0090 */
-            "\x0053\x0301", /* offset 0x0091 */
-            "\x0073\x0301", /* offset 0x0092 */
-            "\x0053\x0302", /* offset 0x0093 */
-            "\x0073\x0302", /* offset 0x0094 */
-            "\x0053\x0327", /* offset 0x0095 */
-            "\x0073\x0327", /* offset 0x0096 */
-            "\x0053\x030C", /* offset 0x0097 */
-            "\x0073\x030C", /* offset 0x0098 */
-            "\x0054\x0327", /* offset 0x0099 */
-            "\x0074\x0327", /* offset 0x009A */
-            "\x0054\x030C", /* offset 0x009B */
-            "\x0074\x030C", /* offset 0x009C */
-            "\x0055\x0303", /* offset 0x009D */
-            "\x0075\x0303", /* offset 0x009E */
-            "\x0055\x0304", /* offset 0x009F */
-            "\x0075\x0304", /* offset 0x00A0 */
-            "\x0055\x0306", /* offset 0x00A1 */
-            "\x0075\x0306", /* offset 0x00A2 */
-            "\x0055\x030A", /* offset 0x00A3 */
-            "\x0075\x030A", /* offset 0x00A4 */
-            "\x0055\x030B", /* offset 0x00A5 */
-            "\x0075\x030B", /* offset 0x00A6 */
-            "\x0055\x0328", /* offset 0x00A7 */
-            "\x0075\x0328", /* offset 0x00A8 */
-            "\x0057\x0302", /* offset 0x00A9 */
-            "\x0077\x0302", /* offset 0x00AA */
-            "\x0059\x0302", /* offset 0x00AB */
-            "\x0079\x0302", /* offset 0x00AC */
-            "\x0059\x0308", /* offset 0x00AD */
-            "\x005A\x0301", /* offset 0x00AE */
-            "\x007A\x0301", /* offset 0x00AF */
-            "\x005A\x0307", /* offset 0x00B0 */
-            "\x007A\x0307", /* offset 0x00B1 */
-            "\x005A\x030C", /* offset 0x00B2 */
-            "\x007A\x030C", /* offset 0x00B3 */
-            "\x0073", /* offset 0x00B4 */
-            "\x004F\x031B", /* offset 0x00B5 */
-            "\x006F\x031B", /* offset 0x00B6 */
-            "\x0055\x031B", /* offset 0x00B7 */
-            "\x0075\x031B", /* offset 0x00B8 */
-            "\x0044\x005A\x030C", /* offset 0x00B9 */
-            "\x0044\x007A\x030C", /* offset 0x00BA */
-            "\x0064\x007A\x030C", /* offset 0x00BB */
-            "\x004C\x004A", /* offset 0x00BC */
-            "\x004C\x006A", /* offset 0x00BD */
-            "\x006C\x006A", /* offset 0x00BE */
-            "\x004E\x004A", /* offset 0x00BF */
-            "\x004E\x006A", /* offset 0x00C0 */
-            "\x006E\x006A", /* offset 0x00C1 */
-            "\x0041\x030C", /* offset 0x00C2 */
-            "\x0061\x030C", /* offset 0x00C3 */
-            "\x0049\x030C", /* offset 0x00C4 */
-            "\x0069\x030C", /* offset 0x00C5 */
-            "\x004F\x030C", /* offset 0x00C6 */
-            "\x006F\x030C", /* offset 0x00C7 */
-            "\x0055\x030C", /* offset 0x00C8 */
-            "\x0075\x030C", /* offset 0x00C9 */
-            "\x0055\x0308\x0304", /* offset 0x00CA */
-            "\x0075\x0308\x0304", /* offset 0x00CB */
-            "\x0055\x0308\x0301", /* offset 0x00CC */
-            "\x0075\x0308\x0301", /* offset 0x00CD */
-            "\x0055\x0308\x030C", /* offset 0x00CE */
-            "\x0075\x0308\x030C", /* offset 0x00CF */
-            "\x0055\x0308\x0300", /* offset 0x00D0 */
-            "\x0075\x0308\x0300", /* offset 0x00D1 */
-            "\x0041\x0308\x0304", /* offset 0x00D2 */
-            "\x0061\x0308\x0304", /* offset 0x00D3 */
-            "\x0041\x0307\x0304", /* offset 0x00D4 */
-            "\x0061\x0307\x0304", /* offset 0x00D5 */
-            "\x00C6\x0304", /* offset 0x00D6 */
-            "\x00E6\x0304", /* offset 0x00D7 */
-            "\x0047\x030C", /* offset 0x00D8 */
-            "\x0067\x030C", /* offset 0x00D9 */
-            "\x004B\x030C", /* offset 0x00DA */
-            "\x006B\x030C", /* offset 0x00DB */
-            "\x004F\x0328", /* offset 0x00DC */
-            "\x006F\x0328", /* offset 0x00DD */
-            "\x004F\x0328\x0304", /* offset 0x00DE */
-            "\x006F\x0328\x0304", /* offset 0x00DF */
-            "\x01B7\x030C", /* offset 0x00E0 */
-            "\x0292\x030C", /* offset 0x00E1 */
-            "\x006A\x030C", /* offset 0x00E2 */
-            "\x0044\x005A", /* offset 0x00E3 */
-            "\x0044\x007A", /* offset 0x00E4 */
-            "\x0064\x007A", /* offset 0x00E5 */
-            "\x0047\x0301", /* offset 0x00E6 */
-            "\x0067\x0301", /* offset 0x00E7 */
-            "\x004E\x0300", /* offset 0x00E8 */
-            "\x006E\x0300", /* offset 0x00E9 */
-            "\x0041\x030A\x0301", /* offset 0x00EA */
-            "\x0061\x030A\x0301", /* offset 0x00EB */
-            "\x00C6\x0301", /* offset 0x00EC */
-            "\x00E6\x0301", /* offset 0x00ED */
-            "\x00D8\x0301", /* offset 0x00EE */
-            "\x00F8\x0301", /* offset 0x00EF */
-            "\x0041\x030F", /* offset 0x00F0 */
-            "\x0061\x030F", /* offset 0x00F1 */
-            "\x0041\x0311", /* offset 0x00F2 */
-            "\x0061\x0311", /* offset 0x00F3 */
-            "\x0045\x030F", /* offset 0x00F4 */
-            "\x0065\x030F", /* offset 0x00F5 */
-            "\x0045\x0311", /* offset 0x00F6 */
-            "\x0065\x0311", /* offset 0x00F7 */
-            "\x0049\x030F", /* offset 0x00F8 */
-            "\x0069\x030F", /* offset 0x00F9 */
-            "\x0049\x0311", /* offset 0x00FA */
-            "\x0069\x0311", /* offset 0x00FB */
-            "\x004F\x030F", /* offset 0x00FC */
-            "\x006F\x030F", /* offset 0x00FD */
-            "\x004F\x0311", /* offset 0x00FE */
-            "\x006F\x0311", /* offset 0x00FF */
-            "\x0052\x030F", /* offset 0x0100 */
-            "\x0072\x030F", /* offset 0x0101 */
-            "\x0052\x0311", /* offset 0x0102 */
-            "\x0072\x0311", /* offset 0x0103 */
-            "\x0055\x030F", /* offset 0x0104 */
-            "\x0075\x030F", /* offset 0x0105 */
-            "\x0055\x0311", /* offset 0x0106 */
-            "\x0075\x0311", /* offset 0x0107 */
-            "\x0053\x0326", /* offset 0x0108 */
-            "\x0073\x0326", /* offset 0x0109 */
-            "\x0054\x0326", /* offset 0x010A */
-            "\x0074\x0326", /* offset 0x010B */
-            "\x0048\x030C", /* offset 0x010C */
-            "\x0068\x030C", /* offset 0x010D */
-            "\x0041\x0307", /* offset 0x010E */
-            "\x0061\x0307", /* offset 0x010F */
-            "\x0045\x0327", /* offset 0x0110 */
-            "\x0065\x0327", /* offset 0x0111 */
-            "\x004F\x0308\x0304", /* offset 0x0112 */
-            "\x006F\x0308\x0304", /* offset 0x0113 */
-            "\x004F\x0303\x0304", /* offset 0x0114 */
-            "\x006F\x0303\x0304", /* offset 0x0115 */
-            "\x004F\x0307", /* offset 0x0116 */
-            "\x006F\x0307", /* offset 0x0117 */
-            "\x004F\x0307\x0304", /* offset 0x0118 */
-            "\x006F\x0307\x0304", /* offset 0x0119 */
-            "\x0059\x0304", /* offset 0x011A */
-            "\x0079\x0304", /* offset 0x011B */
-            "\x0068", /* offset 0x011C */
-            "\x0266", /* offset 0x011D */
-            "\x006A", /* offset 0x011E */
-            "\x0072", /* offset 0x011F */
-            "\x0279", /* offset 0x0120 */
-            "\x027B", /* offset 0x0121 */
-            "\x0281", /* offset 0x0122 */
-            "\x0077", /* offset 0x0123 */
-            "\x0079", /* offset 0x0124 */
-            "\x0020\x0306", /* offset 0x0125 */
-            "\x0020\x0307", /* offset 0x0126 */
-            "\x0020\x030A", /* offset 0x0127 */
-            "\x0020\x0328", /* offset 0x0128 */
-            "\x0020\x0303", /* offset 0x0129 */
-            "\x0020\x030B", /* offset 0x012A */
-            "\x0263", /* offset 0x012B */
-            "\x006C", /* offset 0x012C */
-            "\x0078", /* offset 0x012D */
-            "\x0295", /* offset 0x012E */
-            "\x0300", /* offset 0x012F */
-            "\x0301", /* offset 0x0130 */
-            "\x0313", /* offset 0x0131 */
-            "\x0308\x0301", /* offset 0x0132 */
-            "\x02B9", /* offset 0x0133 */
-            "\x0020\x0345", /* offset 0x0134 */
-            "\x003B", /* offset 0x0135 */
-            "\x0020\x0308\x0301", /* offset 0x0136 */
-            "\x0391\x0301", /* offset 0x0137 */
-            "\x00B7", /* offset 0x0138 */
-            "\x0395\x0301", /* offset 0x0139 */
-            "\x0397\x0301", /* offset 0x013A */
-            "\x0399\x0301", /* offset 0x013B */
-            "\x039F\x0301", /* offset 0x013C */
-            "\x03A5\x0301", /* offset 0x013D */
-            "\x03A9\x0301", /* offset 0x013E */
-            "\x03B9\x0308\x0301", /* offset 0x013F */
-            "\x0399\x0308", /* offset 0x0140 */
-            "\x03A5\x0308", /* offset 0x0141 */
-            "\x03B1\x0301", /* offset 0x0142 */
-            "\x03B5\x0301", /* offset 0x0143 */
-            "\x03B7\x0301", /* offset 0x0144 */
-            "\x03B9\x0301", /* offset 0x0145 */
-            "\x03C5\x0308\x0301", /* offset 0x0146 */
-            "\x03B9\x0308", /* offset 0x0147 */
-            "\x03C5\x0308", /* offset 0x0148 */
-            "\x03BF\x0301", /* offset 0x0149 */
-            "\x03C5\x0301", /* offset 0x014A */
-            "\x03C9\x0301", /* offset 0x014B */
-            "\x03B2", /* offset 0x014C */
-            "\x03B8", /* offset 0x014D */
-            "\x03A5", /* offset 0x014E */
-            "\x03C6", /* offset 0x014F */
-            "\x03C0", /* offset 0x0150 */
-            "\x03BA", /* offset 0x0151 */
-            "\x03C1", /* offset 0x0152 */
-            "\x03C2", /* offset 0x0153 */
-            "\x0398", /* offset 0x0154 */
-            "\x03B5", /* offset 0x0155 */
-            "\x0415\x0300", /* offset 0x0156 */
-            "\x0415\x0308", /* offset 0x0157 */
-            "\x0413\x0301", /* offset 0x0158 */
-            "\x0406\x0308", /* offset 0x0159 */
-            "\x041A\x0301", /* offset 0x015A */
-            "\x0418\x0300", /* offset 0x015B */
-            "\x0423\x0306", /* offset 0x015C */
-            "\x0418\x0306", /* offset 0x015D */
-            "\x0438\x0306", /* offset 0x015E */
-            "\x0435\x0300", /* offset 0x015F */
-            "\x0435\x0308", /* offset 0x0160 */
-            "\x0433\x0301", /* offset 0x0161 */
-            "\x0456\x0308", /* offset 0x0162 */
-            "\x043A\x0301", /* offset 0x0163 */
-            "\x0438\x0300", /* offset 0x0164 */
-            "\x0443\x0306", /* offset 0x0165 */
-            "\x0474\x030F", /* offset 0x0166 */
-            "\x0475\x030F", /* offset 0x0167 */
-            "\x0416\x0306", /* offset 0x0168 */
-            "\x0436\x0306", /* offset 0x0169 */
-            "\x0410\x0306", /* offset 0x016A */
-            "\x0430\x0306", /* offset 0x016B */
-            "\x0410\x0308", /* offset 0x016C */
-            "\x0430\x0308", /* offset 0x016D */
-            "\x0415\x0306", /* offset 0x016E */
-            "\x0435\x0306", /* offset 0x016F */
-            "\x04D8\x0308", /* offset 0x0170 */
-            "\x04D9\x0308", /* offset 0x0171 */
-            "\x0416\x0308", /* offset 0x0172 */
-            "\x0436\x0308", /* offset 0x0173 */
-            "\x0417\x0308", /* offset 0x0174 */
-            "\x0437\x0308", /* offset 0x0175 */
-            "\x0418\x0304", /* offset 0x0176 */
-            "\x0438\x0304", /* offset 0x0177 */
-            "\x0418\x0308", /* offset 0x0178 */
-            "\x0438\x0308", /* offset 0x0179 */
-            "\x041E\x0308", /* offset 0x017A */
-            "\x043E\x0308", /* offset 0x017B */
-            "\x04E8\x0308", /* offset 0x017C */
-            "\x04E9\x0308", /* offset 0x017D */
-            "\x042D\x0308", /* offset 0x017E */
-            "\x044D\x0308", /* offset 0x017F */
-            "\x0423\x0304", /* offset 0x0180 */
-            "\x0443\x0304", /* offset 0x0181 */
-            "\x0423\x0308", /* offset 0x0182 */
-            "\x0443\x0308", /* offset 0x0183 */
-            "\x0423\x030B", /* offset 0x0184 */
-            "\x0443\x030B", /* offset 0x0185 */
-            "\x0427\x0308", /* offset 0x0186 */
-            "\x0447\x0308", /* offset 0x0187 */
-            "\x042B\x0308", /* offset 0x0188 */
-            "\x044B\x0308", /* offset 0x0189 */
-            "\x0565\x0582", /* offset 0x018A */
-            "\x0627\x0653", /* offset 0x018B */
-            "\x0627\x0654", /* offset 0x018C */
-            "\x0648\x0654", /* offset 0x018D */
-            "\x0627\x0655", /* offset 0x018E */
-            "\x064A\x0654", /* offset 0x018F */
-            "\x0627\x0674", /* offset 0x0190 */
-            "\x0648\x0674", /* offset 0x0191 */
-            "\x06C7\x0674", /* offset 0x0192 */
-            "\x064A\x0674", /* offset 0x0193 */
-            "\x06D5\x0654", /* offset 0x0194 */
-            "\x06C1\x0654", /* offset 0x0195 */
-            "\x06D2\x0654", /* offset 0x0196 */
-            "\x0928\x093C", /* offset 0x0197 */
-            "\x0930\x093C", /* offset 0x0198 */
-            "\x0933\x093C", /* offset 0x0199 */
-            "\x0915\x093C", /* offset 0x019A */
-            "\x0916\x093C", /* offset 0x019B */
-            "\x0917\x093C", /* offset 0x019C */
-            "\x091C\x093C", /* offset 0x019D */
-            "\x0921\x093C", /* offset 0x019E */
-            "\x0922\x093C", /* offset 0x019F */
-            "\x092B\x093C", /* offset 0x01A0 */
-            "\x092F\x093C", /* offset 0x01A1 */
-            "\x09C7\x09BE", /* offset 0x01A2 */
-            "\x09C7\x09D7", /* offset 0x01A3 */
-            "\x09A1\x09BC", /* offset 0x01A4 */
-            "\x09A2\x09BC", /* offset 0x01A5 */
-            "\x09AF\x09BC", /* offset 0x01A6 */
-            "\x0A32\x0A3C", /* offset 0x01A7 */
-            "\x0A38\x0A3C", /* offset 0x01A8 */
-            "\x0A16\x0A3C", /* offset 0x01A9 */
-            "\x0A17\x0A3C", /* offset 0x01AA */
-            "\x0A1C\x0A3C", /* offset 0x01AB */
-            "\x0A2B\x0A3C", /* offset 0x01AC */
-            "\x0B47\x0B56", /* offset 0x01AD */
-            "\x0B47\x0B3E", /* offset 0x01AE */
-            "\x0B47\x0B57", /* offset 0x01AF */
-            "\x0B21\x0B3C", /* offset 0x01B0 */
-            "\x0B22\x0B3C", /* offset 0x01B1 */
-            "\x0B92\x0BD7", /* offset 0x01B2 */
-            "\x0BC6\x0BBE", /* offset 0x01B3 */
-            "\x0BC7\x0BBE", /* offset 0x01B4 */
-            "\x0BC6\x0BD7", /* offset 0x01B5 */
-            "\x0C46\x0C56", /* offset 0x01B6 */
-            "\x0CBF\x0CD5", /* offset 0x01B7 */
-            "\x0CC6\x0CD5", /* offset 0x01B8 */
-            "\x0CC6\x0CD6", /* offset 0x01B9 */
-            "\x0CC6\x0CC2", /* offset 0x01BA */
-            "\x0CC6\x0CC2\x0CD5", /* offset 0x01BB */
-            "\x0D46\x0D3E", /* offset 0x01BC */
-            "\x0D47\x0D3E", /* offset 0x01BD */
-            "\x0D46\x0D57", /* offset 0x01BE */
-            "\x0DD9\x0DCA", /* offset 0x01BF */
-            "\x0DD9\x0DCF", /* offset 0x01C0 */
-            "\x0DD9\x0DCF\x0DCA", /* offset 0x01C1 */
-            "\x0DD9\x0DDF", /* offset 0x01C2 */
-            "\x0E4D\x0E32", /* offset 0x01C3 */
-            "\x0ECD\x0EB2", /* offset 0x01C4 */
-            "\x0EAB\x0E99", /* offset 0x01C5 */
-            "\x0EAB\x0EA1", /* offset 0x01C6 */
-            "\x0F0B", /* offset 0x01C7 */
-            "\x0F42\x0FB7", /* offset 0x01C8 */
-            "\x0F4C\x0FB7", /* offset 0x01C9 */
-            "\x0F51\x0FB7", /* offset 0x01CA */
-            "\x0F56\x0FB7", /* offset 0x01CB */
-            "\x0F5B\x0FB7", /* offset 0x01CC */
-            "\x0F40\x0FB5", /* offset 0x01CD */
-            "\x0F71\x0F72", /* offset 0x01CE */
-            "\x0F71\x0F74", /* offset 0x01CF */
-            "\x0FB2\x0F80", /* offset 0x01D0 */
-            "\x0FB2\x0F71\x0F80", /* offset 0x01D1 */
-            "\x0FB3\x0F80", /* offset 0x01D2 */
-            "\x0FB3\x0F71\x0F80", /* offset 0x01D3 */
-            "\x0F71\x0F80", /* offset 0x01D4 */
-            "\x0F92\x0FB7", /* offset 0x01D5 */
-            "\x0F9C\x0FB7", /* offset 0x01D6 */
-            "\x0FA1\x0FB7", /* offset 0x01D7 */
-            "\x0FA6\x0FB7", /* offset 0x01D8 */
-            "\x0FAB\x0FB7", /* offset 0x01D9 */
-            "\x0F90\x0FB5", /* offset 0x01DA */
-            "\x1025\x102E", /* offset 0x01DB */
-            "\x0041\x0325", /* offset 0x01DC */
-            "\x0061\x0325", /* offset 0x01DD */
-            "\x0042\x0307", /* offset 0x01DE */
-            "\x0062\x0307", /* offset 0x01DF */
-            "\x0042\x0323", /* offset 0x01E0 */
-            "\x0062\x0323", /* offset 0x01E1 */
-            "\x0042\x0331", /* offset 0x01E2 */
-            "\x0062\x0331", /* offset 0x01E3 */
-            "\x0043\x0327\x0301", /* offset 0x01E4 */
-            "\x0063\x0327\x0301", /* offset 0x01E5 */
-            "\x0044\x0307", /* offset 0x01E6 */
-            "\x0064\x0307", /* offset 0x01E7 */
-            "\x0044\x0323", /* offset 0x01E8 */
-            "\x0064\x0323", /* offset 0x01E9 */
-            "\x0044\x0331", /* offset 0x01EA */
-            "\x0064\x0331", /* offset 0x01EB */
-            "\x0044\x0327", /* offset 0x01EC */
-            "\x0064\x0327", /* offset 0x01ED */
-            "\x0044\x032D", /* offset 0x01EE */
-            "\x0064\x032D", /* offset 0x01EF */
-            "\x0045\x0304\x0300", /* offset 0x01F0 */
-            "\x0065\x0304\x0300", /* offset 0x01F1 */
-            "\x0045\x0304\x0301", /* offset 0x01F2 */
-            "\x0065\x0304\x0301", /* offset 0x01F3 */
-            "\x0045\x032D", /* offset 0x01F4 */
-            "\x0065\x032D", /* offset 0x01F5 */
-            "\x0045\x0330", /* offset 0x01F6 */
-            "\x0065\x0330", /* offset 0x01F7 */
-            "\x0045\x0327\x0306", /* offset 0x01F8 */
-            "\x0065\x0327\x0306", /* offset 0x01F9 */
-            "\x0046\x0307", /* offset 0x01FA */
-            "\x0066\x0307", /* offset 0x01FB */
-            "\x0047\x0304", /* offset 0x01FC */
-            "\x0067\x0304", /* offset 0x01FD */
-            "\x0048\x0307", /* offset 0x01FE */
-            "\x0068\x0307", /* offset 0x01FF */
-            "\x0048\x0323", /* offset 0x0200 */
-            "\x0068\x0323", /* offset 0x0201 */
-            "\x0048\x0308", /* offset 0x0202 */
-            "\x0068\x0308", /* offset 0x0203 */
-            "\x0048\x0327", /* offset 0x0204 */
-            "\x0068\x0327", /* offset 0x0205 */
-            "\x0048\x032E", /* offset 0x0206 */
-            "\x0068\x032E", /* offset 0x0207 */
-            "\x0049\x0330", /* offset 0x0208 */
-            "\x0069\x0330", /* offset 0x0209 */
-            "\x0049\x0308\x0301", /* offset 0x020A */
-            "\x0069\x0308\x0301", /* offset 0x020B */
-            "\x004B\x0301", /* offset 0x020C */
-            "\x006B\x0301", /* offset 0x020D */
-            "\x004B\x0323", /* offset 0x020E */
-            "\x006B\x0323", /* offset 0x020F */
-            "\x004B\x0331", /* offset 0x0210 */
-            "\x006B\x0331", /* offset 0x0211 */
-            "\x004C\x0323", /* offset 0x0212 */
-            "\x006C\x0323", /* offset 0x0213 */
-            "\x004C\x0323\x0304", /* offset 0x0214 */
-            "\x006C\x0323\x0304", /* offset 0x0215 */
-            "\x004C\x0331", /* offset 0x0216 */
-            "\x006C\x0331", /* offset 0x0217 */
-            "\x004C\x032D", /* offset 0x0218 */
-            "\x006C\x032D", /* offset 0x0219 */
-            "\x004D\x0301", /* offset 0x021A */
-            "\x006D\x0301", /* offset 0x021B */
-            "\x004D\x0307", /* offset 0x021C */
-            "\x006D\x0307", /* offset 0x021D */
-            "\x004D\x0323", /* offset 0x021E */
-            "\x006D\x0323", /* offset 0x021F */
-            "\x004E\x0307", /* offset 0x0220 */
-            "\x006E\x0307", /* offset 0x0221 */
-            "\x004E\x0323", /* offset 0x0222 */
-            "\x006E\x0323", /* offset 0x0223 */
-            "\x004E\x0331", /* offset 0x0224 */
-            "\x006E\x0331", /* offset 0x0225 */
-            "\x004E\x032D", /* offset 0x0226 */
-            "\x006E\x032D", /* offset 0x0227 */
-            "\x004F\x0303\x0301", /* offset 0x0228 */
-            "\x006F\x0303\x0301", /* offset 0x0229 */
-            "\x004F\x0303\x0308", /* offset 0x022A */
-            "\x006F\x0303\x0308", /* offset 0x022B */
-            "\x004F\x0304\x0300", /* offset 0x022C */
-            "\x006F\x0304\x0300", /* offset 0x022D */
-            "\x004F\x0304\x0301", /* offset 0x022E */
-            "\x006F\x0304\x0301", /* offset 0x022F */
-            "\x0050\x0301", /* offset 0x0230 */
-            "\x0070\x0301", /* offset 0x0231 */
-            "\x0050\x0307", /* offset 0x0232 */
-            "\x0070\x0307", /* offset 0x0233 */
-            "\x0052\x0307", /* offset 0x0234 */
-            "\x0072\x0307", /* offset 0x0235 */
-            "\x0052\x0323", /* offset 0x0236 */
-            "\x0072\x0323", /* offset 0x0237 */
-            "\x0052\x0323\x0304", /* offset 0x0238 */
-            "\x0072\x0323\x0304", /* offset 0x0239 */
-            "\x0052\x0331", /* offset 0x023A */
-            "\x0072\x0331", /* offset 0x023B */
-            "\x0053\x0307", /* offset 0x023C */
-            "\x0073\x0307", /* offset 0x023D */
-            "\x0053\x0323", /* offset 0x023E */
-            "\x0073\x0323", /* offset 0x023F */
-            "\x0053\x0301\x0307", /* offset 0x0240 */
-            "\x0073\x0301\x0307", /* offset 0x0241 */
-            "\x0053\x030C\x0307", /* offset 0x0242 */
-            "\x0073\x030C\x0307", /* offset 0x0243 */
-            "\x0053\x0323\x0307", /* offset 0x0244 */
-            "\x0073\x0323\x0307", /* offset 0x0245 */
-            "\x0054\x0307", /* offset 0x0246 */
-            "\x0074\x0307", /* offset 0x0247 */
-            "\x0054\x0323", /* offset 0x0248 */
-            "\x0074\x0323", /* offset 0x0249 */
-            "\x0054\x0331", /* offset 0x024A */
-            "\x0074\x0331", /* offset 0x024B */
-            "\x0054\x032D", /* offset 0x024C */
-            "\x0074\x032D", /* offset 0x024D */
-            "\x0055\x0324", /* offset 0x024E */
-            "\x0075\x0324", /* offset 0x024F */
-            "\x0055\x0330", /* offset 0x0250 */
-            "\x0075\x0330", /* offset 0x0251 */
-            "\x0055\x032D", /* offset 0x0252 */
-            "\x0075\x032D", /* offset 0x0253 */
-            "\x0055\x0303\x0301", /* offset 0x0254 */
-            "\x0075\x0303\x0301", /* offset 0x0255 */
-            "\x0055\x0304\x0308", /* offset 0x0256 */
-            "\x0075\x0304\x0308", /* offset 0x0257 */
-            "\x0056\x0303", /* offset 0x0258 */
-            "\x0076\x0303", /* offset 0x0259 */
-            "\x0056\x0323", /* offset 0x025A */
-            "\x0076\x0323", /* offset 0x025B */
-            "\x0057\x0300", /* offset 0x025C */
-            "\x0077\x0300", /* offset 0x025D */
-            "\x0057\x0301", /* offset 0x025E */
-            "\x0077\x0301", /* offset 0x025F */
-            "\x0057\x0308", /* offset 0x0260 */
-            "\x0077\x0308", /* offset 0x0261 */
-            "\x0057\x0307", /* offset 0x0262 */
-            "\x0077\x0307", /* offset 0x0263 */
-            "\x0057\x0323", /* offset 0x0264 */
-            "\x0077\x0323", /* offset 0x0265 */
-            "\x0058\x0307", /* offset 0x0266 */
-            "\x0078\x0307", /* offset 0x0267 */
-            "\x0058\x0308", /* offset 0x0268 */
-            "\x0078\x0308", /* offset 0x0269 */
-            "\x0059\x0307", /* offset 0x026A */
-            "\x0079\x0307", /* offset 0x026B */
-            "\x005A\x0302", /* offset 0x026C */
-            "\x007A\x0302", /* offset 0x026D */
-            "\x005A\x0323", /* offset 0x026E */
-            "\x007A\x0323", /* offset 0x026F */
-            "\x005A\x0331", /* offset 0x0270 */
-            "\x007A\x0331", /* offset 0x0271 */
-            "\x0068\x0331", /* offset 0x0272 */
-            "\x0074\x0308", /* offset 0x0273 */
-            "\x0077\x030A", /* offset 0x0274 */
-            "\x0079\x030A", /* offset 0x0275 */
-            "\x0061\x02BE", /* offset 0x0276 */
-            "\x0041\x0323", /* offset 0x0277 */
-            "\x0061\x0323", /* offset 0x0278 */
-            "\x0041\x0309", /* offset 0x0279 */
-            "\x0061\x0309", /* offset 0x027A */
-            "\x0041\x0302\x0301", /* offset 0x027B */
-            "\x0061\x0302\x0301", /* offset 0x027C */
-            "\x0041\x0302\x0300", /* offset 0x027D */
-            "\x0061\x0302\x0300", /* offset 0x027E */
-            "\x0041\x0302\x0309", /* offset 0x027F */
-            "\x0061\x0302\x0309", /* offset 0x0280 */
-            "\x0041\x0302\x0303", /* offset 0x0281 */
-            "\x0061\x0302\x0303", /* offset 0x0282 */
-            "\x0041\x0323\x0302", /* offset 0x0283 */
-            "\x0061\x0323\x0302", /* offset 0x0284 */
-            "\x0041\x0306\x0301", /* offset 0x0285 */
-            "\x0061\x0306\x0301", /* offset 0x0286 */
-            "\x0041\x0306\x0300", /* offset 0x0287 */
-            "\x0061\x0306\x0300", /* offset 0x0288 */
-            "\x0041\x0306\x0309", /* offset 0x0289 */
-            "\x0061\x0306\x0309", /* offset 0x028A */
-            "\x0041\x0306\x0303", /* offset 0x028B */
-            "\x0061\x0306\x0303", /* offset 0x028C */
-            "\x0041\x0323\x0306", /* offset 0x028D */
-            "\x0061\x0323\x0306", /* offset 0x028E */
-            "\x0045\x0323", /* offset 0x028F */
-            "\x0065\x0323", /* offset 0x0290 */
-            "\x0045\x0309", /* offset 0x0291 */
-            "\x0065\x0309", /* offset 0x0292 */
-            "\x0045\x0303", /* offset 0x0293 */
-            "\x0065\x0303", /* offset 0x0294 */
-            "\x0045\x0302\x0301", /* offset 0x0295 */
-            "\x0065\x0302\x0301", /* offset 0x0296 */
-            "\x0045\x0302\x0300", /* offset 0x0297 */
-            "\x0065\x0302\x0300", /* offset 0x0298 */
-            "\x0045\x0302\x0309", /* offset 0x0299 */
-            "\x0065\x0302\x0309", /* offset 0x029A */
-            "\x0045\x0302\x0303", /* offset 0x029B */
-            "\x0065\x0302\x0303", /* offset 0x029C */
-            "\x0045\x0323\x0302", /* offset 0x029D */
-            "\x0065\x0323\x0302", /* offset 0x029E */
-            "\x0049\x0309", /* offset 0x029F */
-            "\x0069\x0309", /* offset 0x02A0 */
-            "\x0049\x0323", /* offset 0x02A1 */
-            "\x0069\x0323", /* offset 0x02A2 */
-            "\x004F\x0323", /* offset 0x02A3 */
-            "\x006F\x0323", /* offset 0x02A4 */
-            "\x004F\x0309", /* offset 0x02A5 */
-            "\x006F\x0309", /* offset 0x02A6 */
-            "\x004F\x0302\x0301", /* offset 0x02A7 */
-            "\x006F\x0302\x0301", /* offset 0x02A8 */
-            "\x004F\x0302\x0300", /* offset 0x02A9 */
-            "\x006F\x0302\x0300", /* offset 0x02AA */
-            "\x004F\x0302\x0309", /* offset 0x02AB */
-            "\x006F\x0302\x0309", /* offset 0x02AC */
-            "\x004F\x0302\x0303", /* offset 0x02AD */
-            "\x006F\x0302\x0303", /* offset 0x02AE */
-            "\x004F\x0323\x0302", /* offset 0x02AF */
-            "\x006F\x0323\x0302", /* offset 0x02B0 */
-            "\x004F\x031B\x0301", /* offset 0x02B1 */
-            "\x006F\x031B\x0301", /* offset 0x02B2 */
-            "\x004F\x031B\x0300", /* offset 0x02B3 */
-            "\x006F\x031B\x0300", /* offset 0x02B4 */
-            "\x004F\x031B\x0309", /* offset 0x02B5 */
-            "\x006F\x031B\x0309", /* offset 0x02B6 */
-            "\x004F\x031B\x0303", /* offset 0x02B7 */
-            "\x006F\x031B\x0303", /* offset 0x02B8 */
-            "\x004F\x031B\x0323", /* offset 0x02B9 */
-            "\x006F\x031B\x0323", /* offset 0x02BA */
-            "\x0055\x0323", /* offset 0x02BB */
-            "\x0075\x0323", /* offset 0x02BC */
-            "\x0055\x0309", /* offset 0x02BD */
-            "\x0075\x0309", /* offset 0x02BE */
-            "\x0055\x031B\x0301", /* offset 0x02BF */
-            "\x0075\x031B\x0301", /* offset 0x02C0 */
-            "\x0055\x031B\x0300", /* offset 0x02C1 */
-            "\x0075\x031B\x0300", /* offset 0x02C2 */
-            "\x0055\x031B\x0309", /* offset 0x02C3 */
-            "\x0075\x031B\x0309", /* offset 0x02C4 */
-            "\x0055\x031B\x0303", /* offset 0x02C5 */
-            "\x0075\x031B\x0303", /* offset 0x02C6 */
-            "\x0055\x031B\x0323", /* offset 0x02C7 */
-            "\x0075\x031B\x0323", /* offset 0x02C8 */
-            "\x0059\x0300", /* offset 0x02C9 */
-            "\x0079\x0300", /* offset 0x02CA */
-            "\x0059\x0323", /* offset 0x02CB */
-            "\x0079\x0323", /* offset 0x02CC */
-            "\x0059\x0309", /* offset 0x02CD */
-            "\x0079\x0309", /* offset 0x02CE */
-            "\x0059\x0303", /* offset 0x02CF */
-            "\x0079\x0303", /* offset 0x02D0 */
-            "\x03B1\x0313", /* offset 0x02D1 */
-            "\x03B1\x0314", /* offset 0x02D2 */
-            "\x03B1\x0313\x0300", /* offset 0x02D3 */
-            "\x03B1\x0314\x0300", /* offset 0x02D4 */
-            "\x03B1\x0313\x0301", /* offset 0x02D5 */
-            "\x03B1\x0314\x0301", /* offset 0x02D6 */
-            "\x03B1\x0313\x0342", /* offset 0x02D7 */
-            "\x03B1\x0314\x0342", /* offset 0x02D8 */
-            "\x0391\x0313", /* offset 0x02D9 */
-            "\x0391\x0314", /* offset 0x02DA */
-            "\x0391\x0313\x0300", /* offset 0x02DB */
-            "\x0391\x0314\x0300", /* offset 0x02DC */
-            "\x0391\x0313\x0301", /* offset 0x02DD */
-            "\x0391\x0314\x0301", /* offset 0x02DE */
-            "\x0391\x0313\x0342", /* offset 0x02DF */
-            "\x0391\x0314\x0342", /* offset 0x02E0 */
-            "\x03B5\x0313", /* offset 0x02E1 */
-            "\x03B5\x0314", /* offset 0x02E2 */
-            "\x03B5\x0313\x0300", /* offset 0x02E3 */
-            "\x03B5\x0314\x0300", /* offset 0x02E4 */
-            "\x03B5\x0313\x0301", /* offset 0x02E5 */
-            "\x03B5\x0314\x0301", /* offset 0x02E6 */
-            "\x0395\x0313", /* offset 0x02E7 */
-            "\x0395\x0314", /* offset 0x02E8 */
-            "\x0395\x0313\x0300", /* offset 0x02E9 */
-            "\x0395\x0314\x0300", /* offset 0x02EA */
-            "\x0395\x0313\x0301", /* offset 0x02EB */
-            "\x0395\x0314\x0301", /* offset 0x02EC */
-            "\x03B7\x0313", /* offset 0x02ED */
-            "\x03B7\x0314", /* offset 0x02EE */
-            "\x03B7\x0313\x0300", /* offset 0x02EF */
-            "\x03B7\x0314\x0300", /* offset 0x02F0 */
-            "\x03B7\x0313\x0301", /* offset 0x02F1 */
-            "\x03B7\x0314\x0301", /* offset 0x02F2 */
-            "\x03B7\x0313\x0342", /* offset 0x02F3 */
-            "\x03B7\x0314\x0342", /* offset 0x02F4 */
-            "\x0397\x0313", /* offset 0x02F5 */
-            "\x0397\x0314", /* offset 0x02F6 */
-            "\x0397\x0313\x0300", /* offset 0x02F7 */
-            "\x0397\x0314\x0300", /* offset 0x02F8 */
-            "\x0397\x0313\x0301", /* offset 0x02F9 */
-            "\x0397\x0314\x0301", /* offset 0x02FA */
-            "\x0397\x0313\x0342", /* offset 0x02FB */
-            "\x0397\x0314\x0342", /* offset 0x02FC */
-            "\x03B9\x0313", /* offset 0x02FD */
-            "\x03B9\x0314", /* offset 0x02FE */
-            "\x03B9\x0313\x0300", /* offset 0x02FF */
-            "\x03B9\x0314\x0300", /* offset 0x0300 */
-            "\x03B9\x0313\x0301", /* offset 0x0301 */
-            "\x03B9\x0314\x0301", /* offset 0x0302 */
-            "\x03B9\x0313\x0342", /* offset 0x0303 */
-            "\x03B9\x0314\x0342", /* offset 0x0304 */
-            "\x0399\x0313", /* offset 0x0305 */
-            "\x0399\x0314", /* offset 0x0306 */
-            "\x0399\x0313\x0300", /* offset 0x0307 */
-            "\x0399\x0314\x0300", /* offset 0x0308 */
-            "\x0399\x0313\x0301", /* offset 0x0309 */
-            "\x0399\x0314\x0301", /* offset 0x030A */
-            "\x0399\x0313\x0342", /* offset 0x030B */
-            "\x0399\x0314\x0342", /* offset 0x030C */
-            "\x03BF\x0313", /* offset 0x030D */
-            "\x03BF\x0314", /* offset 0x030E */
-            "\x03BF\x0313\x0300", /* offset 0x030F */
-            "\x03BF\x0314\x0300", /* offset 0x0310 */
-            "\x03BF\x0313\x0301", /* offset 0x0311 */
-            "\x03BF\x0314\x0301", /* offset 0x0312 */
-            "\x039F\x0313", /* offset 0x0313 */
-            "\x039F\x0314", /* offset 0x0314 */
-            "\x039F\x0313\x0300", /* offset 0x0315 */
-            "\x039F\x0314\x0300", /* offset 0x0316 */
-            "\x039F\x0313\x0301", /* offset 0x0317 */
-            "\x039F\x0314\x0301", /* offset 0x0318 */
-            "\x03C5\x0313", /* offset 0x0319 */
-            "\x03C5\x0314", /* offset 0x031A */
-            "\x03C5\x0313\x0300", /* offset 0x031B */
-            "\x03C5\x0314\x0300", /* offset 0x031C */
-            "\x03C5\x0313\x0301", /* offset 0x031D */
-            "\x03C5\x0314\x0301", /* offset 0x031E */
-            "\x03C5\x0313\x0342", /* offset 0x031F */
-            "\x03C5\x0314\x0342", /* offset 0x0320 */
-            "\x03A5\x0314", /* offset 0x0321 */
-            "\x03A5\x0314\x0300", /* offset 0x0322 */
-            "\x03A5\x0314\x0301", /* offset 0x0323 */
-            "\x03A5\x0314\x0342", /* offset 0x0324 */
-            "\x03C9\x0313", /* offset 0x0325 */
-            "\x03C9\x0314", /* offset 0x0326 */
-            "\x03C9\x0313\x0300", /* offset 0x0327 */
-            "\x03C9\x0314\x0300", /* offset 0x0328 */
-            "\x03C9\x0313\x0301", /* offset 0x0329 */
-            "\x03C9\x0314\x0301", /* offset 0x032A */
-            "\x03C9\x0313\x0342", /* offset 0x032B */
-            "\x03C9\x0314\x0342", /* offset 0x032C */
-            "\x03A9\x0313", /* offset 0x032D */
-            "\x03A9\x0314", /* offset 0x032E */
-            "\x03A9\x0313\x0300", /* offset 0x032F */
-            "\x03A9\x0314\x0300", /* offset 0x0330 */
-            "\x03A9\x0313\x0301", /* offset 0x0331 */
-            "\x03A9\x0314\x0301", /* offset 0x0332 */
-            "\x03A9\x0313\x0342", /* offset 0x0333 */
-            "\x03A9\x0314\x0342", /* offset 0x0334 */
-            "\x03B1\x0300", /* offset 0x0335 */
-            "\x03B5\x0300", /* offset 0x0336 */
-            "\x03B7\x0300", /* offset 0x0337 */
-            "\x03B9\x0300", /* offset 0x0338 */
-            "\x03BF\x0300", /* offset 0x0339 */
-            "\x03C5\x0300", /* offset 0x033A */
-            "\x03C9\x0300", /* offset 0x033B */
-            "\x03B1\x0313\x0345", /* offset 0x033C */
-            "\x03B1\x0314\x0345", /* offset 0x033D */
-            "\x03B1\x0313\x0300\x0345", /* offset 0x033E */
-            "\x03B1\x0314\x0300\x0345", /* offset 0x033F */
-            "\x03B1\x0313\x0301\x0345", /* offset 0x0340 */
-            "\x03B1\x0314\x0301\x0345", /* offset 0x0341 */
-            "\x03B1\x0313\x0342\x0345", /* offset 0x0342 */
-            "\x03B1\x0314\x0342\x0345", /* offset 0x0343 */
-            "\x0391\x0313\x0345", /* offset 0x0344 */
-            "\x0391\x0314\x0345", /* offset 0x0345 */
-            "\x0391\x0313\x0300\x0345", /* offset 0x0346 */
-            "\x0391\x0314\x0300\x0345", /* offset 0x0347 */
-            "\x0391\x0313\x0301\x0345", /* offset 0x0348 */
-            "\x0391\x0314\x0301\x0345", /* offset 0x0349 */
-            "\x0391\x0313\x0342\x0345", /* offset 0x034A */
-            "\x0391\x0314\x0342\x0345", /* offset 0x034B */
-            "\x03B7\x0313\x0345", /* offset 0x034C */
-            "\x03B7\x0314\x0345", /* offset 0x034D */
-            "\x03B7\x0313\x0300\x0345", /* offset 0x034E */
-            "\x03B7\x0314\x0300\x0345", /* offset 0x034F */
-            "\x03B7\x0313\x0301\x0345", /* offset 0x0350 */
-            "\x03B7\x0314\x0301\x0345", /* offset 0x0351 */
-            "\x03B7\x0313\x0342\x0345", /* offset 0x0352 */
-            "\x03B7\x0314\x0342\x0345", /* offset 0x0353 */
-            "\x0397\x0313\x0345", /* offset 0x0354 */
-            "\x0397\x0314\x0345", /* offset 0x0355 */
-            "\x0397\x0313\x0300\x0345", /* offset 0x0356 */
-            "\x0397\x0314\x0300\x0345", /* offset 0x0357 */
-            "\x0397\x0313\x0301\x0345", /* offset 0x0358 */
-            "\x0397\x0314\x0301\x0345", /* offset 0x0359 */
-            "\x0397\x0313\x0342\x0345", /* offset 0x035A */
-            "\x0397\x0314\x0342\x0345", /* offset 0x035B */
-            "\x03C9\x0313\x0345", /* offset 0x035C */
-            "\x03C9\x0314\x0345", /* offset 0x035D */
-            "\x03C9\x0313\x0300\x0345", /* offset 0x035E */
-            "\x03C9\x0314\x0300\x0345", /* offset 0x035F */
-            "\x03C9\x0313\x0301\x0345", /* offset 0x0360 */
-            "\x03C9\x0314\x0301\x0345", /* offset 0x0361 */
-            "\x03C9\x0313\x0342\x0345", /* offset 0x0362 */
-            "\x03C9\x0314\x0342\x0345", /* offset 0x0363 */
-            "\x03A9\x0313\x0345", /* offset 0x0364 */
-            "\x03A9\x0314\x0345", /* offset 0x0365 */
-            "\x03A9\x0313\x0300\x0345", /* offset 0x0366 */
-            "\x03A9\x0314\x0300\x0345", /* offset 0x0367 */
-            "\x03A9\x0313\x0301\x0345", /* offset 0x0368 */
-            "\x03A9\x0314\x0301\x0345", /* offset 0x0369 */
-            "\x03A9\x0313\x0342\x0345", /* offset 0x036A */
-            "\x03A9\x0314\x0342\x0345", /* offset 0x036B */
-            "\x03B1\x0306", /* offset 0x036C */
-            "\x03B1\x0304", /* offset 0x036D */
-            "\x03B1\x0300\x0345", /* offset 0x036E */
-            "\x03B1\x0345", /* offset 0x036F */
-            "\x03B1\x0301\x0345", /* offset 0x0370 */
-            "\x03B1\x0342", /* offset 0x0371 */
-            "\x03B1\x0342\x0345", /* offset 0x0372 */
-            "\x0391\x0306", /* offset 0x0373 */
-            "\x0391\x0304", /* offset 0x0374 */
-            "\x0391\x0300", /* offset 0x0375 */
-            "\x0391\x0345", /* offset 0x0376 */
-            "\x0020\x0313", /* offset 0x0377 */
-            "\x03B9", /* offset 0x0378 */
-            "\x0020\x0342", /* offset 0x0379 */
-            "\x0020\x0308\x0342", /* offset 0x037A */
-            "\x03B7\x0300\x0345", /* offset 0x037B */
-            "\x03B7\x0345", /* offset 0x037C */
-            "\x03B7\x0301\x0345", /* offset 0x037D */
-            "\x03B7\x0342", /* offset 0x037E */
-            "\x03B7\x0342\x0345", /* offset 0x037F */
-            "\x0395\x0300", /* offset 0x0380 */
-            "\x0397\x0300", /* offset 0x0381 */
-            "\x0397\x0345", /* offset 0x0382 */
-            "\x0020\x0313\x0300", /* offset 0x0383 */
-            "\x0020\x0313\x0301", /* offset 0x0384 */
-            "\x0020\x0313\x0342", /* offset 0x0385 */
-            "\x03B9\x0306", /* offset 0x0386 */
-            "\x03B9\x0304", /* offset 0x0387 */
-            "\x03B9\x0308\x0300", /* offset 0x0388 */
-            "\x03B9\x0342", /* offset 0x0389 */
-            "\x03B9\x0308\x0342", /* offset 0x038A */
-            "\x0399\x0306", /* offset 0x038B */
-            "\x0399\x0304", /* offset 0x038C */
-            "\x0399\x0300", /* offset 0x038D */
-            "\x0020\x0314\x0300", /* offset 0x038E */
-            "\x0020\x0314\x0301", /* offset 0x038F */
-            "\x0020\x0314\x0342", /* offset 0x0390 */
-            "\x03C5\x0306", /* offset 0x0391 */
-            "\x03C5\x0304", /* offset 0x0392 */
-            "\x03C5\x0308\x0300", /* offset 0x0393 */
-            "\x03C1\x0313", /* offset 0x0394 */
-            "\x03C1\x0314", /* offset 0x0395 */
-            "\x03C5\x0342", /* offset 0x0396 */
-            "\x03C5\x0308\x0342", /* offset 0x0397 */
-            "\x03A5\x0306", /* offset 0x0398 */
-            "\x03A5\x0304", /* offset 0x0399 */
-            "\x03A5\x0300", /* offset 0x039A */
-            "\x03A1\x0314", /* offset 0x039B */
-            "\x0020\x0308\x0300", /* offset 0x039C */
-            "\x0060", /* offset 0x039D */
-            "\x03C9\x0300\x0345", /* offset 0x039E */
-            "\x03C9\x0345", /* offset 0x039F */
-            "\x03C9\x0301\x0345", /* offset 0x03A0 */
-            "\x03C9\x0342", /* offset 0x03A1 */
-            "\x03C9\x0342\x0345", /* offset 0x03A2 */
-            "\x039F\x0300", /* offset 0x03A3 */
-            "\x03A9\x0300", /* offset 0x03A4 */
-            "\x03A9\x0345", /* offset 0x03A5 */
-            "\x0020\x0314", /* offset 0x03A6 */
-            "\x2010", /* offset 0x03A7 */
-            "\x0020\x0333", /* offset 0x03A8 */
-            "\x002E", /* offset 0x03A9 */
-            "\x002E\x002E", /* offset 0x03AA */
-            "\x002E\x002E\x002E", /* offset 0x03AB */
-            "\x2032\x2032", /* offset 0x03AC */
-            "\x2032\x2032\x2032", /* offset 0x03AD */
-            "\x2035\x2035", /* offset 0x03AE */
-            "\x2035\x2035\x2035", /* offset 0x03AF */
-            "\x0021\x0021", /* offset 0x03B0 */
-            "\x0020\x0305", /* offset 0x03B1 */
-            "\x003F\x003F", /* offset 0x03B2 */
-            "\x003F\x0021", /* offset 0x03B3 */
-            "\x0021\x003F", /* offset 0x03B4 */
-            "\x2032\x2032\x2032\x2032", /* offset 0x03B5 */
-            "\x0030", /* offset 0x03B6 */
-            "\x0069", /* offset 0x03B7 */
-            "\x0034", /* offset 0x03B8 */
-            "\x0035", /* offset 0x03B9 */
-            "\x0036", /* offset 0x03BA */
-            "\x0037", /* offset 0x03BB */
-            "\x0038", /* offset 0x03BC */
-            "\x0039", /* offset 0x03BD */
-            "\x002B", /* offset 0x03BE */
-            "\x2212", /* offset 0x03BF */
-            "\x003D", /* offset 0x03C0 */
-            "\x0028", /* offset 0x03C1 */
-            "\x0029", /* offset 0x03C2 */
-            "\x006E", /* offset 0x03C3 */
-            "\x0052\x0073", /* offset 0x03C4 */
-            "\x0061\x002F\x0063", /* offset 0x03C5 */
-            "\x0061\x002F\x0073", /* offset 0x03C6 */
-            "\x0043", /* offset 0x03C7 */
-            "\x00B0\x0043", /* offset 0x03C8 */
-            "\x0063\x002F\x006F", /* offset 0x03C9 */
-            "\x0063\x002F\x0075", /* offset 0x03CA */
-            "\x0190", /* offset 0x03CB */
-            "\x00B0\x0046", /* offset 0x03CC */
-            "\x0067", /* offset 0x03CD */
-            "\x0048", /* offset 0x03CE */
-            "\x0127", /* offset 0x03CF */
-            "\x0049", /* offset 0x03D0 */
-            "\x004C", /* offset 0x03D1 */
-            "\x004E", /* offset 0x03D2 */
-            "\x004E\x006F", /* offset 0x03D3 */
-            "\x0050", /* offset 0x03D4 */
-            "\x0051", /* offset 0x03D5 */
-            "\x0052", /* offset 0x03D6 */
-            "\x0053\x004D", /* offset 0x03D7 */
-            "\x0054\x0045\x004C", /* offset 0x03D8 */
-            "\x0054\x004D", /* offset 0x03D9 */
-            "\x005A", /* offset 0x03DA */
-            "\x03A9", /* offset 0x03DB */
-            "\x004B", /* offset 0x03DC */
-            "\x0042", /* offset 0x03DD */
-            "\x0065", /* offset 0x03DE */
-            "\x0045", /* offset 0x03DF */
-            "\x0046", /* offset 0x03E0 */
-            "\x004D", /* offset 0x03E1 */
-            "\x05D0", /* offset 0x03E2 */
-            "\x05D1", /* offset 0x03E3 */
-            "\x05D2", /* offset 0x03E4 */
-            "\x05D3", /* offset 0x03E5 */
-            "\x03B3", /* offset 0x03E6 */
-            "\x0393", /* offset 0x03E7 */
-            "\x03A0", /* offset 0x03E8 */
-            "\x2211", /* offset 0x03E9 */
-            "\x0044", /* offset 0x03EA */
-            "\x0064", /* offset 0x03EB */
-            "\x0031\x2044\x0033", /* offset 0x03EC */
-            "\x0032\x2044\x0033", /* offset 0x03ED */
-            "\x0031\x2044\x0035", /* offset 0x03EE */
-            "\x0032\x2044\x0035", /* offset 0x03EF */
-            "\x0033\x2044\x0035", /* offset 0x03F0 */
-            "\x0034\x2044\x0035", /* offset 0x03F1 */
-            "\x0031\x2044\x0036", /* offset 0x03F2 */
-            "\x0035\x2044\x0036", /* offset 0x03F3 */
-            "\x0031\x2044\x0038", /* offset 0x03F4 */
-            "\x0033\x2044\x0038", /* offset 0x03F5 */
-            "\x0035\x2044\x0038", /* offset 0x03F6 */
-            "\x0037\x2044\x0038", /* offset 0x03F7 */
-            "\x0031\x2044", /* offset 0x03F8 */
-            "\x0049\x0049", /* offset 0x03F9 */
-            "\x0049\x0049\x0049", /* offset 0x03FA */
-            "\x0049\x0056", /* offset 0x03FB */
-            "\x0056", /* offset 0x03FC */
-            "\x0056\x0049", /* offset 0x03FD */
-            "\x0056\x0049\x0049", /* offset 0x03FE */
-            "\x0056\x0049\x0049\x0049", /* offset 0x03FF */
-            "\x0049\x0058", /* offset 0x0400 */
-            "\x0058", /* offset 0x0401 */
-            "\x0058\x0049", /* offset 0x0402 */
-            "\x0058\x0049\x0049", /* offset 0x0403 */
-            "\x0069\x0069", /* offset 0x0404 */
-            "\x0069\x0069\x0069", /* offset 0x0405 */
-            "\x0069\x0076", /* offset 0x0406 */
-            "\x0076", /* offset 0x0407 */
-            "\x0076\x0069", /* offset 0x0408 */
-            "\x0076\x0069\x0069", /* offset 0x0409 */
-            "\x0076\x0069\x0069\x0069", /* offset 0x040A */
-            "\x0069\x0078", /* offset 0x040B */
-            "\x0078\x0069", /* offset 0x040C */
-            "\x0078\x0069\x0069", /* offset 0x040D */
-            "\x0063", /* offset 0x040E */
-            "\x006D", /* offset 0x040F */
-            "\x2190\x0338", /* offset 0x0410 */
-            "\x2192\x0338", /* offset 0x0411 */
-            "\x2194\x0338", /* offset 0x0412 */
-            "\x21D0\x0338", /* offset 0x0413 */
-            "\x21D4\x0338", /* offset 0x0414 */
-            "\x21D2\x0338", /* offset 0x0415 */
-            "\x2203\x0338", /* offset 0x0416 */
-            "\x2208\x0338", /* offset 0x0417 */
-            "\x220B\x0338", /* offset 0x0418 */
-            "\x2223\x0338", /* offset 0x0419 */
-            "\x2225\x0338", /* offset 0x041A */
-            "\x222B\x222B", /* offset 0x041B */
-            "\x222B\x222B\x222B", /* offset 0x041C */
-            "\x222E\x222E", /* offset 0x041D */
-            "\x222E\x222E\x222E", /* offset 0x041E */
-            "\x223C\x0338", /* offset 0x041F */
-            "\x2243\x0338", /* offset 0x0420 */
-            "\x2245\x0338", /* offset 0x0421 */
-            "\x2248\x0338", /* offset 0x0422 */
-            "\x003D\x0338", /* offset 0x0423 */
-            "\x2261\x0338", /* offset 0x0424 */
-            "\x224D\x0338", /* offset 0x0425 */
-            "\x003C\x0338", /* offset 0x0426 */
-            "\x003E\x0338", /* offset 0x0427 */
-            "\x2264\x0338", /* offset 0x0428 */
-            "\x2265\x0338", /* offset 0x0429 */
-            "\x2272\x0338", /* offset 0x042A */
-            "\x2273\x0338", /* offset 0x042B */
-            "\x2276\x0338", /* offset 0x042C */
-            "\x2277\x0338", /* offset 0x042D */
-            "\x227A\x0338", /* offset 0x042E */
-            "\x227B\x0338", /* offset 0x042F */
-            "\x2282\x0338", /* offset 0x0430 */
-            "\x2283\x0338", /* offset 0x0431 */
-            "\x2286\x0338", /* offset 0x0432 */
-            "\x2287\x0338", /* offset 0x0433 */
-            "\x22A2\x0338", /* offset 0x0434 */
-            "\x22A8\x0338", /* offset 0x0435 */
-            "\x22A9\x0338", /* offset 0x0436 */
-            "\x22AB\x0338", /* offset 0x0437 */
-            "\x227C\x0338", /* offset 0x0438 */
-            "\x227D\x0338", /* offset 0x0439 */
-            "\x2291\x0338", /* offset 0x043A */
-            "\x2292\x0338", /* offset 0x043B */
-            "\x22B2\x0338", /* offset 0x043C */
-            "\x22B3\x0338", /* offset 0x043D */
-            "\x22B4\x0338", /* offset 0x043E */
-            "\x22B5\x0338", /* offset 0x043F */
-            "\x3008", /* offset 0x0440 */
-            "\x3009", /* offset 0x0441 */
-            "\x0031\x0030", /* offset 0x0442 */
-            "\x0031\x0031", /* offset 0x0443 */
-            "\x0031\x0032", /* offset 0x0444 */
-            "\x0031\x0033", /* offset 0x0445 */
-            "\x0031\x0034", /* offset 0x0446 */
-            "\x0031\x0035", /* offset 0x0447 */
-            "\x0031\x0036", /* offset 0x0448 */
-            "\x0031\x0037", /* offset 0x0449 */
-            "\x0031\x0038", /* offset 0x044A */
-            "\x0031\x0039", /* offset 0x044B */
-            "\x0032\x0030", /* offset 0x044C */
-            "\x0028\x0031\x0029", /* offset 0x044D */
-            "\x0028\x0032\x0029", /* offset 0x044E */
-            "\x0028\x0033\x0029", /* offset 0x044F */
-            "\x0028\x0034\x0029", /* offset 0x0450 */
-            "\x0028\x0035\x0029", /* offset 0x0451 */
-            "\x0028\x0036\x0029", /* offset 0x0452 */
-            "\x0028\x0037\x0029", /* offset 0x0453 */
-            "\x0028\x0038\x0029", /* offset 0x0454 */
-            "\x0028\x0039\x0029", /* offset 0x0455 */
-            "\x0028\x0031\x0030\x0029", /* offset 0x0456 */
-            "\x0028\x0031\x0031\x0029", /* offset 0x0457 */
-            "\x0028\x0031\x0032\x0029", /* offset 0x0458 */
-            "\x0028\x0031\x0033\x0029", /* offset 0x0459 */
-            "\x0028\x0031\x0034\x0029", /* offset 0x045A */
-            "\x0028\x0031\x0035\x0029", /* offset 0x045B */
-            "\x0028\x0031\x0036\x0029", /* offset 0x045C */
-            "\x0028\x0031\x0037\x0029", /* offset 0x045D */
-            "\x0028\x0031\x0038\x0029", /* offset 0x045E */
-            "\x0028\x0031\x0039\x0029", /* offset 0x045F */
-            "\x0028\x0032\x0030\x0029", /* offset 0x0460 */
-            "\x0031\x002E", /* offset 0x0461 */
-            "\x0032\x002E", /* offset 0x0462 */
-            "\x0033\x002E", /* offset 0x0463 */
-            "\x0034\x002E", /* offset 0x0464 */
-            "\x0035\x002E", /* offset 0x0465 */
-            "\x0036\x002E", /* offset 0x0466 */
-            "\x0037\x002E", /* offset 0x0467 */
-            "\x0038\x002E", /* offset 0x0468 */
-            "\x0039\x002E", /* offset 0x0469 */
-            "\x0031\x0030\x002E", /* offset 0x046A */
-            "\x0031\x0031\x002E", /* offset 0x046B */
-            "\x0031\x0032\x002E", /* offset 0x046C */
-            "\x0031\x0033\x002E", /* offset 0x046D */
-            "\x0031\x0034\x002E", /* offset 0x046E */
-            "\x0031\x0035\x002E", /* offset 0x046F */
-            "\x0031\x0036\x002E", /* offset 0x0470 */
-            "\x0031\x0037\x002E", /* offset 0x0471 */
-            "\x0031\x0038\x002E", /* offset 0x0472 */
-            "\x0031\x0039\x002E", /* offset 0x0473 */
-            "\x0032\x0030\x002E", /* offset 0x0474 */
-            "\x0028\x0061\x0029", /* offset 0x0475 */
-            "\x0028\x0062\x0029", /* offset 0x0476 */
-            "\x0028\x0063\x0029", /* offset 0x0477 */
-            "\x0028\x0064\x0029", /* offset 0x0478 */
-            "\x0028\x0065\x0029", /* offset 0x0479 */
-            "\x0028\x0066\x0029", /* offset 0x047A */
-            "\x0028\x0067\x0029", /* offset 0x047B */
-            "\x0028\x0068\x0029", /* offset 0x047C */
-            "\x0028\x0069\x0029", /* offset 0x047D */
-            "\x0028\x006A\x0029", /* offset 0x047E */
-            "\x0028\x006B\x0029", /* offset 0x047F */
-            "\x0028\x006C\x0029", /* offset 0x0480 */
-            "\x0028\x006D\x0029", /* offset 0x0481 */
-            "\x0028\x006E\x0029", /* offset 0x0482 */
-            "\x0028\x006F\x0029", /* offset 0x0483 */
-            "\x0028\x0070\x0029", /* offset 0x0484 */
-            "\x0028\x0071\x0029", /* offset 0x0485 */
-            "\x0028\x0072\x0029", /* offset 0x0486 */
-            "\x0028\x0073\x0029", /* offset 0x0487 */
-            "\x0028\x0074\x0029", /* offset 0x0488 */
-            "\x0028\x0075\x0029", /* offset 0x0489 */
-            "\x0028\x0076\x0029", /* offset 0x048A */
-            "\x0028\x0077\x0029", /* offset 0x048B */
-            "\x0028\x0078\x0029", /* offset 0x048C */
-            "\x0028\x0079\x0029", /* offset 0x048D */
-            "\x0028\x007A\x0029", /* offset 0x048E */
-            "\x0041", /* offset 0x048F */
-            "\x0047", /* offset 0x0490 */
-            "\x004A", /* offset 0x0491 */
-            "\x004F", /* offset 0x0492 */
-            "\x0053", /* offset 0x0493 */
-            "\x0054", /* offset 0x0494 */
-            "\x0055", /* offset 0x0495 */
-            "\x0057", /* offset 0x0496 */
-            "\x0059", /* offset 0x0497 */
-            "\x0062", /* offset 0x0498 */
-            "\x0066", /* offset 0x0499 */
-            "\x006B", /* offset 0x049A */
-            "\x0070", /* offset 0x049B */
-            "\x0071", /* offset 0x049C */
-            "\x0074", /* offset 0x049D */
-            "\x0075", /* offset 0x049E */
-            "\x007A", /* offset 0x049F */
-            "\x222B\x222B\x222B\x222B", /* offset 0x04A0 */
-            "\x003A\x003A\x003D", /* offset 0x04A1 */
-            "\x003D\x003D", /* offset 0x04A2 */
-            "\x003D\x003D\x003D", /* offset 0x04A3 */
-            "\x2ADD\x0338", /* offset 0x04A4 */
-            "\x6BCD", /* offset 0x04A5 */
-            "\x9F9F", /* offset 0x04A6 */
-            "\x4E00", /* offset 0x04A7 */
-            "\x4E28", /* offset 0x04A8 */
-            "\x4E36", /* offset 0x04A9 */
-            "\x4E3F", /* offset 0x04AA */
-            "\x4E59", /* offset 0x04AB */
-            "\x4E85", /* offset 0x04AC */
-            "\x4E8C", /* offset 0x04AD */
-            "\x4EA0", /* offset 0x04AE */
-            "\x4EBA", /* offset 0x04AF */
-            "\x513F", /* offset 0x04B0 */
-            "\x5165", /* offset 0x04B1 */
-            "\x516B", /* offset 0x04B2 */
-            "\x5182", /* offset 0x04B3 */
-            "\x5196", /* offset 0x04B4 */
-            "\x51AB", /* offset 0x04B5 */
-            "\x51E0", /* offset 0x04B6 */
-            "\x51F5", /* offset 0x04B7 */
-            "\x5200", /* offset 0x04B8 */
-            "\x529B", /* offset 0x04B9 */
-            "\x52F9", /* offset 0x04BA */
-            "\x5315", /* offset 0x04BB */
-            "\x531A", /* offset 0x04BC */
-            "\x5338", /* offset 0x04BD */
-            "\x5341", /* offset 0x04BE */
-            "\x535C", /* offset 0x04BF */
-            "\x5369", /* offset 0x04C0 */
-            "\x5382", /* offset 0x04C1 */
-            "\x53B6", /* offset 0x04C2 */
-            "\x53C8", /* offset 0x04C3 */
-            "\x53E3", /* offset 0x04C4 */
-            "\x56D7", /* offset 0x04C5 */
-            "\x571F", /* offset 0x04C6 */
-            "\x58EB", /* offset 0x04C7 */
-            "\x5902", /* offset 0x04C8 */
-            "\x590A", /* offset 0x04C9 */
-            "\x5915", /* offset 0x04CA */
-            "\x5927", /* offset 0x04CB */
-            "\x5973", /* offset 0x04CC */
-            "\x5B50", /* offset 0x04CD */
-            "\x5B80", /* offset 0x04CE */
-            "\x5BF8", /* offset 0x04CF */
-            "\x5C0F", /* offset 0x04D0 */
-            "\x5C22", /* offset 0x04D1 */
-            "\x5C38", /* offset 0x04D2 */
-            "\x5C6E", /* offset 0x04D3 */
-            "\x5C71", /* offset 0x04D4 */
-            "\x5DDB", /* offset 0x04D5 */
-            "\x5DE5", /* offset 0x04D6 */
-            "\x5DF1", /* offset 0x04D7 */
-            "\x5DFE", /* offset 0x04D8 */
-            "\x5E72", /* offset 0x04D9 */
-            "\x5E7A", /* offset 0x04DA */
-            "\x5E7F", /* offset 0x04DB */
-            "\x5EF4", /* offset 0x04DC */
-            "\x5EFE", /* offset 0x04DD */
-            "\x5F0B", /* offset 0x04DE */
-            "\x5F13", /* offset 0x04DF */
-            "\x5F50", /* offset 0x04E0 */
-            "\x5F61", /* offset 0x04E1 */
-            "\x5F73", /* offset 0x04E2 */
-            "\x5FC3", /* offset 0x04E3 */
-            "\x6208", /* offset 0x04E4 */
-            "\x6236", /* offset 0x04E5 */
-            "\x624B", /* offset 0x04E6 */
-            "\x652F", /* offset 0x04E7 */
-            "\x6534", /* offset 0x04E8 */
-            "\x6587", /* offset 0x04E9 */
-            "\x6597", /* offset 0x04EA */
-            "\x65A4", /* offset 0x04EB */
-            "\x65B9", /* offset 0x04EC */
-            "\x65E0", /* offset 0x04ED */
-            "\x65E5", /* offset 0x04EE */
-            "\x66F0", /* offset 0x04EF */
-            "\x6708", /* offset 0x04F0 */
-            "\x6728", /* offset 0x04F1 */
-            "\x6B20", /* offset 0x04F2 */
-            "\x6B62", /* offset 0x04F3 */
-            "\x6B79", /* offset 0x04F4 */
-            "\x6BB3", /* offset 0x04F5 */
-            "\x6BCB", /* offset 0x04F6 */
-            "\x6BD4", /* offset 0x04F7 */
-            "\x6BDB", /* offset 0x04F8 */
-            "\x6C0F", /* offset 0x04F9 */
-            "\x6C14", /* offset 0x04FA */
-            "\x6C34", /* offset 0x04FB */
-            "\x706B", /* offset 0x04FC */
-            "\x722A", /* offset 0x04FD */
-            "\x7236", /* offset 0x04FE */
-            "\x723B", /* offset 0x04FF */
-            "\x723F", /* offset 0x0500 */
-            "\x7247", /* offset 0x0501 */
-            "\x7259", /* offset 0x0502 */
-            "\x725B", /* offset 0x0503 */
-            "\x72AC", /* offset 0x0504 */
-            "\x7384", /* offset 0x0505 */
-            "\x7389", /* offset 0x0506 */
-            "\x74DC", /* offset 0x0507 */
-            "\x74E6", /* offset 0x0508 */
-            "\x7518", /* offset 0x0509 */
-            "\x751F", /* offset 0x050A */
-            "\x7528", /* offset 0x050B */
-            "\x7530", /* offset 0x050C */
-            "\x758B", /* offset 0x050D */
-            "\x7592", /* offset 0x050E */
-            "\x7676", /* offset 0x050F */
-            "\x767D", /* offset 0x0510 */
-            "\x76AE", /* offset 0x0511 */
-            "\x76BF", /* offset 0x0512 */
-            "\x76EE", /* offset 0x0513 */
-            "\x77DB", /* offset 0x0514 */
-            "\x77E2", /* offset 0x0515 */
-            "\x77F3", /* offset 0x0516 */
-            "\x793A", /* offset 0x0517 */
-            "\x79B8", /* offset 0x0518 */
-            "\x79BE", /* offset 0x0519 */
-            "\x7A74", /* offset 0x051A */
-            "\x7ACB", /* offset 0x051B */
-            "\x7AF9", /* offset 0x051C */
-            "\x7C73", /* offset 0x051D */
-            "\x7CF8", /* offset 0x051E */
-            "\x7F36", /* offset 0x051F */
-            "\x7F51", /* offset 0x0520 */
-            "\x7F8A", /* offset 0x0521 */
-            "\x7FBD", /* offset 0x0522 */
-            "\x8001", /* offset 0x0523 */
-            "\x800C", /* offset 0x0524 */
-            "\x8012", /* offset 0x0525 */
-            "\x8033", /* offset 0x0526 */
-            "\x807F", /* offset 0x0527 */
-            "\x8089", /* offset 0x0528 */
-            "\x81E3", /* offset 0x0529 */
-            "\x81EA", /* offset 0x052A */
-            "\x81F3", /* offset 0x052B */
-            "\x81FC", /* offset 0x052C */
-            "\x820C", /* offset 0x052D */
-            "\x821B", /* offset 0x052E */
-            "\x821F", /* offset 0x052F */
-            "\x826E", /* offset 0x0530 */
-            "\x8272", /* offset 0x0531 */
-            "\x8278", /* offset 0x0532 */
-            "\x864D", /* offset 0x0533 */
-            "\x866B", /* offset 0x0534 */
-            "\x8840", /* offset 0x0535 */
-            "\x884C", /* offset 0x0536 */
-            "\x8863", /* offset 0x0537 */
-            "\x897E", /* offset 0x0538 */
-            "\x898B", /* offset 0x0539 */
-            "\x89D2", /* offset 0x053A */
-            "\x8A00", /* offset 0x053B */
-            "\x8C37", /* offset 0x053C */
-            "\x8C46", /* offset 0x053D */
-            "\x8C55", /* offset 0x053E */
-            "\x8C78", /* offset 0x053F */
-            "\x8C9D", /* offset 0x0540 */
-            "\x8D64", /* offset 0x0541 */
-            "\x8D70", /* offset 0x0542 */
-            "\x8DB3", /* offset 0x0543 */
-            "\x8EAB", /* offset 0x0544 */
-            "\x8ECA", /* offset 0x0545 */
-            "\x8F9B", /* offset 0x0546 */
-            "\x8FB0", /* offset 0x0547 */
-            "\x8FB5", /* offset 0x0548 */
-            "\x9091", /* offset 0x0549 */
-            "\x9149", /* offset 0x054A */
-            "\x91C6", /* offset 0x054B */
-            "\x91CC", /* offset 0x054C */
-            "\x91D1", /* offset 0x054D */
-            "\x9577", /* offset 0x054E */
-            "\x9580", /* offset 0x054F */
-            "\x961C", /* offset 0x0550 */
-            "\x96B6", /* offset 0x0551 */
-            "\x96B9", /* offset 0x0552 */
-            "\x96E8", /* offset 0x0553 */
-            "\x9751", /* offset 0x0554 */
-            "\x975E", /* offset 0x0555 */
-            "\x9762", /* offset 0x0556 */
-            "\x9769", /* offset 0x0557 */
-            "\x97CB", /* offset 0x0558 */
-            "\x97ED", /* offset 0x0559 */
-            "\x97F3", /* offset 0x055A */
-            "\x9801", /* offset 0x055B */
-            "\x98A8", /* offset 0x055C */
-            "\x98DB", /* offset 0x055D */
-            "\x98DF", /* offset 0x055E */
-            "\x9996", /* offset 0x055F */
-            "\x9999", /* offset 0x0560 */
-            "\x99AC", /* offset 0x0561 */
-            "\x9AA8", /* offset 0x0562 */
-            "\x9AD8", /* offset 0x0563 */
-            "\x9ADF", /* offset 0x0564 */
-            "\x9B25", /* offset 0x0565 */
-            "\x9B2F", /* offset 0x0566 */
-            "\x9B32", /* offset 0x0567 */
-            "\x9B3C", /* offset 0x0568 */
-            "\x9B5A", /* offset 0x0569 */
-            "\x9CE5", /* offset 0x056A */
-            "\x9E75", /* offset 0x056B */
-            "\x9E7F", /* offset 0x056C */
-            "\x9EA5", /* offset 0x056D */
-            "\x9EBB", /* offset 0x056E */
-            "\x9EC3", /* offset 0x056F */
-            "\x9ECD", /* offset 0x0570 */
-            "\x9ED1", /* offset 0x0571 */
-            "\x9EF9", /* offset 0x0572 */
-            "\x9EFD", /* offset 0x0573 */
-            "\x9F0E", /* offset 0x0574 */
-            "\x9F13", /* offset 0x0575 */
-            "\x9F20", /* offset 0x0576 */
-            "\x9F3B", /* offset 0x0577 */
-            "\x9F4A", /* offset 0x0578 */
-            "\x9F52", /* offset 0x0579 */
-            "\x9F8D", /* offset 0x057A */
-            "\x9F9C", /* offset 0x057B */
-            "\x9FA0", /* offset 0x057C */
-            "\x3012", /* offset 0x057D */
-            "\x5344", /* offset 0x057E */
-            "\x5345", /* offset 0x057F */
-            "\x304B\x3099", /* offset 0x0580 */
-            "\x304D\x3099", /* offset 0x0581 */
-            "\x304F\x3099", /* offset 0x0582 */
-            "\x3051\x3099", /* offset 0x0583 */
-            "\x3053\x3099", /* offset 0x0584 */
-            "\x3055\x3099", /* offset 0x0585 */
-            "\x3057\x3099", /* offset 0x0586 */
-            "\x3059\x3099", /* offset 0x0587 */
-            "\x305B\x3099", /* offset 0x0588 */
-            "\x305D\x3099", /* offset 0x0589 */
-            "\x305F\x3099", /* offset 0x058A */
-            "\x3061\x3099", /* offset 0x058B */
-            "\x3064\x3099", /* offset 0x058C */
-            "\x3066\x3099", /* offset 0x058D */
-            "\x3068\x3099", /* offset 0x058E */
-            "\x306F\x3099", /* offset 0x058F */
-            "\x306F\x309A", /* offset 0x0590 */
-            "\x3072\x3099", /* offset 0x0591 */
-            "\x3072\x309A", /* offset 0x0592 */
-            "\x3075\x3099", /* offset 0x0593 */
-            "\x3075\x309A", /* offset 0x0594 */
-            "\x3078\x3099", /* offset 0x0595 */
-            "\x3078\x309A", /* offset 0x0596 */
-            "\x307B\x3099", /* offset 0x0597 */
-            "\x307B\x309A", /* offset 0x0598 */
-            "\x3046\x3099", /* offset 0x0599 */
-            "\x0020\x3099", /* offset 0x059A */
-            "\x0020\x309A", /* offset 0x059B */
-            "\x309D\x3099", /* offset 0x059C */
-            "\x3088\x308A", /* offset 0x059D */
-            "\x30AB\x3099", /* offset 0x059E */
-            "\x30AD\x3099", /* offset 0x059F */
-            "\x30AF\x3099", /* offset 0x05A0 */
-            "\x30B1\x3099", /* offset 0x05A1 */
-            "\x30B3\x3099", /* offset 0x05A2 */
-            "\x30B5\x3099", /* offset 0x05A3 */
-            "\x30B7\x3099", /* offset 0x05A4 */
-            "\x30B9\x3099", /* offset 0x05A5 */
-            "\x30BB\x3099", /* offset 0x05A6 */
-            "\x30BD\x3099", /* offset 0x05A7 */
-            "\x30BF\x3099", /* offset 0x05A8 */
-            "\x30C1\x3099", /* offset 0x05A9 */
-            "\x30C4\x3099", /* offset 0x05AA */
-            "\x30C6\x3099", /* offset 0x05AB */
-            "\x30C8\x3099", /* offset 0x05AC */
-            "\x30CF\x3099", /* offset 0x05AD */
-            "\x30CF\x309A", /* offset 0x05AE */
-            "\x30D2\x3099", /* offset 0x05AF */
-            "\x30D2\x309A", /* offset 0x05B0 */
-            "\x30D5\x3099", /* offset 0x05B1 */
-            "\x30D5\x309A", /* offset 0x05B2 */
-            "\x30D8\x3099", /* offset 0x05B3 */
-            "\x30D8\x309A", /* offset 0x05B4 */
-            "\x30DB\x3099", /* offset 0x05B5 */
-            "\x30DB\x309A", /* offset 0x05B6 */
-            "\x30A6\x3099", /* offset 0x05B7 */
-            "\x30EF\x3099", /* offset 0x05B8 */
-            "\x30F0\x3099", /* offset 0x05B9 */
-            "\x30F1\x3099", /* offset 0x05BA */
-            "\x30F2\x3099", /* offset 0x05BB */
-            "\x30FD\x3099", /* offset 0x05BC */
-            "\x30B3\x30C8", /* offset 0x05BD */
-            "\x1100", /* offset 0x05BE */
-            "\x1101", /* offset 0x05BF */
-            "\x11AA", /* offset 0x05C0 */
-            "\x1102", /* offset 0x05C1 */
-            "\x11AC", /* offset 0x05C2 */
-            "\x11AD", /* offset 0x05C3 */
-            "\x1103", /* offset 0x05C4 */
-            "\x1104", /* offset 0x05C5 */
-            "\x1105", /* offset 0x05C6 */
-            "\x11B0", /* offset 0x05C7 */
-            "\x11B1", /* offset 0x05C8 */
-            "\x11B2", /* offset 0x05C9 */
-            "\x11B3", /* offset 0x05CA */
-            "\x11B4", /* offset 0x05CB */
-            "\x11B5", /* offset 0x05CC */
-            "\x111A", /* offset 0x05CD */
-            "\x1106", /* offset 0x05CE */
-            "\x1107", /* offset 0x05CF */
-            "\x1108", /* offset 0x05D0 */
-            "\x1121", /* offset 0x05D1 */
-            "\x1109", /* offset 0x05D2 */
-            "\x110A", /* offset 0x05D3 */
-            "\x110B", /* offset 0x05D4 */
-            "\x110C", /* offset 0x05D5 */
-            "\x110D", /* offset 0x05D6 */
-            "\x110E", /* offset 0x05D7 */
-            "\x110F", /* offset 0x05D8 */
-            "\x1110", /* offset 0x05D9 */
-            "\x1111", /* offset 0x05DA */
-            "\x1112", /* offset 0x05DB */
-            "\x1161", /* offset 0x05DC */
-            "\x1162", /* offset 0x05DD */
-            "\x1163", /* offset 0x05DE */
-            "\x1164", /* offset 0x05DF */
-            "\x1165", /* offset 0x05E0 */
-            "\x1166", /* offset 0x05E1 */
-            "\x1167", /* offset 0x05E2 */
-            "\x1168", /* offset 0x05E3 */
-            "\x1169", /* offset 0x05E4 */
-            "\x116A", /* offset 0x05E5 */
-            "\x116B", /* offset 0x05E6 */
-            "\x116C", /* offset 0x05E7 */
-            "\x116D", /* offset 0x05E8 */
-            "\x116E", /* offset 0x05E9 */
-            "\x116F", /* offset 0x05EA */
-            "\x1170", /* offset 0x05EB */
-            "\x1171", /* offset 0x05EC */
-            "\x1172", /* offset 0x05ED */
-            "\x1173", /* offset 0x05EE */
-            "\x1174", /* offset 0x05EF */
-            "\x1175", /* offset 0x05F0 */
-            "\x1160", /* offset 0x05F1 */
-            "\x1114", /* offset 0x05F2 */
-            "\x1115", /* offset 0x05F3 */
-            "\x11C7", /* offset 0x05F4 */
-            "\x11C8", /* offset 0x05F5 */
-            "\x11CC", /* offset 0x05F6 */
-            "\x11CE", /* offset 0x05F7 */
-            "\x11D3", /* offset 0x05F8 */
-            "\x11D7", /* offset 0x05F9 */
-            "\x11D9", /* offset 0x05FA */
-            "\x111C", /* offset 0x05FB */
-            "\x11DD", /* offset 0x05FC */
-            "\x11DF", /* offset 0x05FD */
-            "\x111D", /* offset 0x05FE */
-            "\x111E", /* offset 0x05FF */
-            "\x1120", /* offset 0x0600 */
-            "\x1122", /* offset 0x0601 */
-            "\x1123", /* offset 0x0602 */
-            "\x1127", /* offset 0x0603 */
-            "\x1129", /* offset 0x0604 */
-            "\x112B", /* offset 0x0605 */
-            "\x112C", /* offset 0x0606 */
-            "\x112D", /* offset 0x0607 */
-            "\x112E", /* offset 0x0608 */
-            "\x112F", /* offset 0x0609 */
-            "\x1132", /* offset 0x060A */
-            "\x1136", /* offset 0x060B */
-            "\x1140", /* offset 0x060C */
-            "\x1147", /* offset 0x060D */
-            "\x114C", /* offset 0x060E */
-            "\x11F1", /* offset 0x060F */
-            "\x11F2", /* offset 0x0610 */
-            "\x1157", /* offset 0x0611 */
-            "\x1158", /* offset 0x0612 */
-            "\x1159", /* offset 0x0613 */
-            "\x1184", /* offset 0x0614 */
-            "\x1185", /* offset 0x0615 */
-            "\x1188", /* offset 0x0616 */
-            "\x1191", /* offset 0x0617 */
-            "\x1192", /* offset 0x0618 */
-            "\x1194", /* offset 0x0619 */
-            "\x119E", /* offset 0x061A */
-            "\x11A1", /* offset 0x061B */
-            "\x4E09", /* offset 0x061C */
-            "\x56DB", /* offset 0x061D */
-            "\x4E0A", /* offset 0x061E */
-            "\x4E2D", /* offset 0x061F */
-            "\x4E0B", /* offset 0x0620 */
-            "\x7532", /* offset 0x0621 */
-            "\x4E19", /* offset 0x0622 */
-            "\x4E01", /* offset 0x0623 */
-            "\x5929", /* offset 0x0624 */
-            "\x5730", /* offset 0x0625 */
-            "\x0028\x1100\x0029", /* offset 0x0626 */
-            "\x0028\x1102\x0029", /* offset 0x0627 */
-            "\x0028\x1103\x0029", /* offset 0x0628 */
-            "\x0028\x1105\x0029", /* offset 0x0629 */
-            "\x0028\x1106\x0029", /* offset 0x062A */
-            "\x0028\x1107\x0029", /* offset 0x062B */
-            "\x0028\x1109\x0029", /* offset 0x062C */
-            "\x0028\x110B\x0029", /* offset 0x062D */
-            "\x0028\x110C\x0029", /* offset 0x062E */
-            "\x0028\x110E\x0029", /* offset 0x062F */
-            "\x0028\x110F\x0029", /* offset 0x0630 */
-            "\x0028\x1110\x0029", /* offset 0x0631 */
-            "\x0028\x1111\x0029", /* offset 0x0632 */
-            "\x0028\x1112\x0029", /* offset 0x0633 */
-            "\x0028\x1100\x1161\x0029", /* offset 0x0634 */
-            "\x0028\x1102\x1161\x0029", /* offset 0x0635 */
-            "\x0028\x1103\x1161\x0029", /* offset 0x0636 */
-            "\x0028\x1105\x1161\x0029", /* offset 0x0637 */
-            "\x0028\x1106\x1161\x0029", /* offset 0x0638 */
-            "\x0028\x1107\x1161\x0029", /* offset 0x0639 */
-            "\x0028\x1109\x1161\x0029", /* offset 0x063A */
-            "\x0028\x110B\x1161\x0029", /* offset 0x063B */
-            "\x0028\x110C\x1161\x0029", /* offset 0x063C */
-            "\x0028\x110E\x1161\x0029", /* offset 0x063D */
-            "\x0028\x110F\x1161\x0029", /* offset 0x063E */
-            "\x0028\x1110\x1161\x0029", /* offset 0x063F */
-            "\x0028\x1111\x1161\x0029", /* offset 0x0640 */
-            "\x0028\x1112\x1161\x0029", /* offset 0x0641 */
-            "\x0028\x110C\x116E\x0029", /* offset 0x0642 */
-            "\x0028\x4E00\x0029", /* offset 0x0643 */
-            "\x0028\x4E8C\x0029", /* offset 0x0644 */
-            "\x0028\x4E09\x0029", /* offset 0x0645 */
-            "\x0028\x56DB\x0029", /* offset 0x0646 */
-            "\x0028\x4E94\x0029", /* offset 0x0647 */
-            "\x0028\x516D\x0029", /* offset 0x0648 */
-            "\x0028\x4E03\x0029", /* offset 0x0649 */
-            "\x0028\x516B\x0029", /* offset 0x064A */
-            "\x0028\x4E5D\x0029", /* offset 0x064B */
-            "\x0028\x5341\x0029", /* offset 0x064C */
-            "\x0028\x6708\x0029", /* offset 0x064D */
-            "\x0028\x706B\x0029", /* offset 0x064E */
-            "\x0028\x6C34\x0029", /* offset 0x064F */
-            "\x0028\x6728\x0029", /* offset 0x0650 */
-            "\x0028\x91D1\x0029", /* offset 0x0651 */
-            "\x0028\x571F\x0029", /* offset 0x0652 */
-            "\x0028\x65E5\x0029", /* offset 0x0653 */
-            "\x0028\x682A\x0029", /* offset 0x0654 */
-            "\x0028\x6709\x0029", /* offset 0x0655 */
-            "\x0028\x793E\x0029", /* offset 0x0656 */
-            "\x0028\x540D\x0029", /* offset 0x0657 */
-            "\x0028\x7279\x0029", /* offset 0x0658 */
-            "\x0028\x8CA1\x0029", /* offset 0x0659 */
-            "\x0028\x795D\x0029", /* offset 0x065A */
-            "\x0028\x52B4\x0029", /* offset 0x065B */
-            "\x0028\x4EE3\x0029", /* offset 0x065C */
-            "\x0028\x547C\x0029", /* offset 0x065D */
-            "\x0028\x5B66\x0029", /* offset 0x065E */
-            "\x0028\x76E3\x0029", /* offset 0x065F */
-            "\x0028\x4F01\x0029", /* offset 0x0660 */
-            "\x0028\x8CC7\x0029", /* offset 0x0661 */
-            "\x0028\x5354\x0029", /* offset 0x0662 */
-            "\x0028\x796D\x0029", /* offset 0x0663 */
-            "\x0028\x4F11\x0029", /* offset 0x0664 */
-            "\x0028\x81EA\x0029", /* offset 0x0665 */
-            "\x0028\x81F3\x0029", /* offset 0x0666 */
-            "\x0032\x0031", /* offset 0x0667 */
-            "\x0032\x0032", /* offset 0x0668 */
-            "\x0032\x0033", /* offset 0x0669 */
-            "\x0032\x0034", /* offset 0x066A */
-            "\x0032\x0035", /* offset 0x066B */
-            "\x0032\x0036", /* offset 0x066C */
-            "\x0032\x0037", /* offset 0x066D */
-            "\x0032\x0038", /* offset 0x066E */
-            "\x0032\x0039", /* offset 0x066F */
-            "\x0033\x0030", /* offset 0x0670 */
-            "\x0033\x0031", /* offset 0x0671 */
-            "\x0033\x0032", /* offset 0x0672 */
-            "\x0033\x0033", /* offset 0x0673 */
-            "\x0033\x0034", /* offset 0x0674 */
-            "\x0033\x0035", /* offset 0x0675 */
-            "\x1100\x1161", /* offset 0x0676 */
-            "\x1102\x1161", /* offset 0x0677 */
-            "\x1103\x1161", /* offset 0x0678 */
-            "\x1105\x1161", /* offset 0x0679 */
-            "\x1106\x1161", /* offset 0x067A */
-            "\x1107\x1161", /* offset 0x067B */
-            "\x1109\x1161", /* offset 0x067C */
-            "\x110B\x1161", /* offset 0x067D */
-            "\x110C\x1161", /* offset 0x067E */
-            "\x110E\x1161", /* offset 0x067F */
-            "\x110F\x1161", /* offset 0x0680 */
-            "\x1110\x1161", /* offset 0x0681 */
-            "\x1111\x1161", /* offset 0x0682 */
-            "\x1112\x1161", /* offset 0x0683 */
-            "\x4E94", /* offset 0x0684 */
-            "\x516D", /* offset 0x0685 */
-            "\x4E03", /* offset 0x0686 */
-            "\x4E5D", /* offset 0x0687 */
-            "\x682A", /* offset 0x0688 */
-            "\x6709", /* offset 0x0689 */
-            "\x793E", /* offset 0x068A */
-            "\x540D", /* offset 0x068B */
-            "\x7279", /* offset 0x068C */
-            "\x8CA1", /* offset 0x068D */
-            "\x795D", /* offset 0x068E */
-            "\x52B4", /* offset 0x068F */
-            "\x79D8", /* offset 0x0690 */
-            "\x7537", /* offset 0x0691 */
-            "\x9069", /* offset 0x0692 */
-            "\x512A", /* offset 0x0693 */
-            "\x5370", /* offset 0x0694 */
-            "\x6CE8", /* offset 0x0695 */
-            "\x9805", /* offset 0x0696 */
-            "\x4F11", /* offset 0x0697 */
-            "\x5199", /* offset 0x0698 */
-            "\x6B63", /* offset 0x0699 */
-            "\x5DE6", /* offset 0x069A */
-            "\x53F3", /* offset 0x069B */
-            "\x533B", /* offset 0x069C */
-            "\x5B97", /* offset 0x069D */
-            "\x5B66", /* offset 0x069E */
-            "\x76E3", /* offset 0x069F */
-            "\x4F01", /* offset 0x06A0 */
-            "\x8CC7", /* offset 0x06A1 */
-            "\x5354", /* offset 0x06A2 */
-            "\x591C", /* offset 0x06A3 */
-            "\x0033\x0036", /* offset 0x06A4 */
-            "\x0033\x0037", /* offset 0x06A5 */
-            "\x0033\x0038", /* offset 0x06A6 */
-            "\x0033\x0039", /* offset 0x06A7 */
-            "\x0034\x0030", /* offset 0x06A8 */
-            "\x0034\x0031", /* offset 0x06A9 */
-            "\x0034\x0032", /* offset 0x06AA */
-            "\x0034\x0033", /* offset 0x06AB */
-            "\x0034\x0034", /* offset 0x06AC */
-            "\x0034\x0035", /* offset 0x06AD */
-            "\x0034\x0036", /* offset 0x06AE */
-            "\x0034\x0037", /* offset 0x06AF */
-            "\x0034\x0038", /* offset 0x06B0 */
-            "\x0034\x0039", /* offset 0x06B1 */
-            "\x0035\x0030", /* offset 0x06B2 */
-            "\x0031\x6708", /* offset 0x06B3 */
-            "\x0032\x6708", /* offset 0x06B4 */
-            "\x0033\x6708", /* offset 0x06B5 */
-            "\x0034\x6708", /* offset 0x06B6 */
-            "\x0035\x6708", /* offset 0x06B7 */
-            "\x0036\x6708", /* offset 0x06B8 */
-            "\x0037\x6708", /* offset 0x06B9 */
-            "\x0038\x6708", /* offset 0x06BA */
-            "\x0039\x6708", /* offset 0x06BB */
-            "\x0031\x0030\x6708", /* offset 0x06BC */
-            "\x0031\x0031\x6708", /* offset 0x06BD */
-            "\x0031\x0032\x6708", /* offset 0x06BE */
-            "\x30A2", /* offset 0x06BF */
-            "\x30A4", /* offset 0x06C0 */
-            "\x30A6", /* offset 0x06C1 */
-            "\x30A8", /* offset 0x06C2 */
-            "\x30AA", /* offset 0x06C3 */
-            "\x30AB", /* offset 0x06C4 */
-            "\x30AD", /* offset 0x06C5 */
-            "\x30AF", /* offset 0x06C6 */
-            "\x30B1", /* offset 0x06C7 */
-            "\x30B3", /* offset 0x06C8 */
-            "\x30B5", /* offset 0x06C9 */
-            "\x30B7", /* offset 0x06CA */
-            "\x30B9", /* offset 0x06CB */
-            "\x30BB", /* offset 0x06CC */
-            "\x30BD", /* offset 0x06CD */
-            "\x30BF", /* offset 0x06CE */
-            "\x30C1", /* offset 0x06CF */
-            "\x30C4", /* offset 0x06D0 */
-            "\x30C6", /* offset 0x06D1 */
-            "\x30C8", /* offset 0x06D2 */
-            "\x30CA", /* offset 0x06D3 */
-            "\x30CB", /* offset 0x06D4 */
-            "\x30CC", /* offset 0x06D5 */
-            "\x30CD", /* offset 0x06D6 */
-            "\x30CE", /* offset 0x06D7 */
-            "\x30CF", /* offset 0x06D8 */
-            "\x30D2", /* offset 0x06D9 */
-            "\x30D5", /* offset 0x06DA */
-            "\x30D8", /* offset 0x06DB */
-            "\x30DB", /* offset 0x06DC */
-            "\x30DE", /* offset 0x06DD */
-            "\x30DF", /* offset 0x06DE */
-            "\x30E0", /* offset 0x06DF */
-            "\x30E1", /* offset 0x06E0 */
-            "\x30E2", /* offset 0x06E1 */
-            "\x30E4", /* offset 0x06E2 */
-            "\x30E6", /* offset 0x06E3 */
-            "\x30E8", /* offset 0x06E4 */
-            "\x30E9", /* offset 0x06E5 */
-            "\x30EA", /* offset 0x06E6 */
-            "\x30EB", /* offset 0x06E7 */
-            "\x30EC", /* offset 0x06E8 */
-            "\x30ED", /* offset 0x06E9 */
-            "\x30EF", /* offset 0x06EA */
-            "\x30F0", /* offset 0x06EB */
-            "\x30F1", /* offset 0x06EC */
-            "\x30F2", /* offset 0x06ED */
-            "\x30A2\x30CF\x309A\x30FC\x30C8", /* offset 0x06EE */
-            "\x30A2\x30EB\x30D5\x30A1", /* offset 0x06EF */
-            "\x30A2\x30F3\x30D8\x309A\x30A2", /* offset 0x06F0 */
-            "\x30A2\x30FC\x30EB", /* offset 0x06F1 */
-            "\x30A4\x30CB\x30F3\x30AF\x3099", /* offset 0x06F2 */
-            "\x30A4\x30F3\x30C1", /* offset 0x06F3 */
-            "\x30A6\x30A9\x30F3", /* offset 0x06F4 */
-            "\x30A8\x30B9\x30AF\x30FC\x30C8\x3099", /* offset 0x06F5 */
-            "\x30A8\x30FC\x30AB\x30FC", /* offset 0x06F6 */
-            "\x30AA\x30F3\x30B9", /* offset 0x06F7 */
-            "\x30AA\x30FC\x30E0", /* offset 0x06F8 */
-            "\x30AB\x30A4\x30EA", /* offset 0x06F9 */
-            "\x30AB\x30E9\x30C3\x30C8", /* offset 0x06FA */
-            "\x30AB\x30ED\x30EA\x30FC", /* offset 0x06FB */
-            "\x30AB\x3099\x30ED\x30F3", /* offset 0x06FC */
-            "\x30AB\x3099\x30F3\x30DE", /* offset 0x06FD */
-            "\x30AD\x3099\x30AB\x3099", /* offset 0x06FE */
-            "\x30AD\x3099\x30CB\x30FC", /* offset 0x06FF */
-            "\x30AD\x30E5\x30EA\x30FC", /* offset 0x0700 */
-            "\x30AD\x3099\x30EB\x30BF\x3099\x30FC", /* offset 0x0701 */
-            "\x30AD\x30ED", /* offset 0x0702 */
-            "\x30AD\x30ED\x30AF\x3099\x30E9\x30E0", /* offset 0x0703 */
-            "\x30AD\x30ED\x30E1\x30FC\x30C8\x30EB", /* offset 0x0704 */
-            "\x30AD\x30ED\x30EF\x30C3\x30C8", /* offset 0x0705 */
-            "\x30AF\x3099\x30E9\x30E0", /* offset 0x0706 */
-            "\x30AF\x3099\x30E9\x30E0\x30C8\x30F3", /* offset 0x0707 */
-            "\x30AF\x30EB\x30BB\x3099\x30A4\x30ED", /* offset 0x0708 */
-            "\x30AF\x30ED\x30FC\x30CD", /* offset 0x0709 */
-            "\x30B1\x30FC\x30B9", /* offset 0x070A */
-            "\x30B3\x30EB\x30CA", /* offset 0x070B */
-            "\x30B3\x30FC\x30DB\x309A", /* offset 0x070C */
-            "\x30B5\x30A4\x30AF\x30EB", /* offset 0x070D */
-            "\x30B5\x30F3\x30C1\x30FC\x30E0", /* offset 0x070E */
-            "\x30B7\x30EA\x30F3\x30AF\x3099", /* offset 0x070F */
-            "\x30BB\x30F3\x30C1", /* offset 0x0710 */
-            "\x30BB\x30F3\x30C8", /* offset 0x0711 */
-            "\x30BF\x3099\x30FC\x30B9", /* offset 0x0712 */
-            "\x30C6\x3099\x30B7", /* offset 0x0713 */
-            "\x30C8\x3099\x30EB", /* offset 0x0714 */
-            "\x30C8\x30F3", /* offset 0x0715 */
-            "\x30CA\x30CE", /* offset 0x0716 */
-            "\x30CE\x30C3\x30C8", /* offset 0x0717 */
-            "\x30CF\x30A4\x30C4", /* offset 0x0718 */
-            "\x30CF\x309A\x30FC\x30BB\x30F3\x30C8", /* offset 0x0719 */
-            "\x30CF\x309A\x30FC\x30C4", /* offset 0x071A */
-            "\x30CF\x3099\x30FC\x30EC\x30EB", /* offset 0x071B */
-            "\x30D2\x309A\x30A2\x30B9\x30C8\x30EB", /* offset 0x071C */
-            "\x30D2\x309A\x30AF\x30EB", /* offset 0x071D */
-            "\x30D2\x309A\x30B3", /* offset 0x071E */
-            "\x30D2\x3099\x30EB", /* offset 0x071F */
-            "\x30D5\x30A1\x30E9\x30C3\x30C8\x3099", /* offset 0x0720 */
-            "\x30D5\x30A3\x30FC\x30C8", /* offset 0x0721 */
-            "\x30D5\x3099\x30C3\x30B7\x30A7\x30EB", /* offset 0x0722 */
-            "\x30D5\x30E9\x30F3", /* offset 0x0723 */
-            "\x30D8\x30AF\x30BF\x30FC\x30EB", /* offset 0x0724 */
-            "\x30D8\x309A\x30BD", /* offset 0x0725 */
-            "\x30D8\x309A\x30CB\x30D2", /* offset 0x0726 */
-            "\x30D8\x30EB\x30C4", /* offset 0x0727 */
-            "\x30D8\x309A\x30F3\x30B9", /* offset 0x0728 */
-            "\x30D8\x309A\x30FC\x30B7\x3099", /* offset 0x0729 */
-            "\x30D8\x3099\x30FC\x30BF", /* offset 0x072A */
-            "\x30DB\x309A\x30A4\x30F3\x30C8", /* offset 0x072B */
-            "\x30DB\x3099\x30EB\x30C8", /* offset 0x072C */
-            "\x30DB\x30F3", /* offset 0x072D */
-            "\x30DB\x309A\x30F3\x30C8\x3099", /* offset 0x072E */
-            "\x30DB\x30FC\x30EB", /* offset 0x072F */
-            "\x30DB\x30FC\x30F3", /* offset 0x0730 */
-            "\x30DE\x30A4\x30AF\x30ED", /* offset 0x0731 */
-            "\x30DE\x30A4\x30EB", /* offset 0x0732 */
-            "\x30DE\x30C3\x30CF", /* offset 0x0733 */
-            "\x30DE\x30EB\x30AF", /* offset 0x0734 */
-            "\x30DE\x30F3\x30B7\x30E7\x30F3", /* offset 0x0735 */
-            "\x30DF\x30AF\x30ED\x30F3", /* offset 0x0736 */
-            "\x30DF\x30EA", /* offset 0x0737 */
-            "\x30DF\x30EA\x30CF\x3099\x30FC\x30EB", /* offset 0x0738 */
-            "\x30E1\x30AB\x3099", /* offset 0x0739 */
-            "\x30E1\x30AB\x3099\x30C8\x30F3", /* offset 0x073A */
-            "\x30E1\x30FC\x30C8\x30EB", /* offset 0x073B */
-            "\x30E4\x30FC\x30C8\x3099", /* offset 0x073C */
-            "\x30E4\x30FC\x30EB", /* offset 0x073D */
-            "\x30E6\x30A2\x30F3", /* offset 0x073E */
-            "\x30EA\x30C3\x30C8\x30EB", /* offset 0x073F */
-            "\x30EA\x30E9", /* offset 0x0740 */
-            "\x30EB\x30D2\x309A\x30FC", /* offset 0x0741 */
-            "\x30EB\x30FC\x30D5\x3099\x30EB", /* offset 0x0742 */
-            "\x30EC\x30E0", /* offset 0x0743 */
-            "\x30EC\x30F3\x30C8\x30B1\x3099\x30F3", /* offset 0x0744 */
-            "\x30EF\x30C3\x30C8", /* offset 0x0745 */
-            "\x0030\x70B9", /* offset 0x0746 */
-            "\x0031\x70B9", /* offset 0x0747 */
-            "\x0032\x70B9", /* offset 0x0748 */
-            "\x0033\x70B9", /* offset 0x0749 */
-            "\x0034\x70B9", /* offset 0x074A */
-            "\x0035\x70B9", /* offset 0x074B */
-            "\x0036\x70B9", /* offset 0x074C */
-            "\x0037\x70B9", /* offset 0x074D */
-            "\x0038\x70B9", /* offset 0x074E */
-            "\x0039\x70B9", /* offset 0x074F */
-            "\x0031\x0030\x70B9", /* offset 0x0750 */
-            "\x0031\x0031\x70B9", /* offset 0x0751 */
-            "\x0031\x0032\x70B9", /* offset 0x0752 */
-            "\x0031\x0033\x70B9", /* offset 0x0753 */
-            "\x0031\x0034\x70B9", /* offset 0x0754 */
-            "\x0031\x0035\x70B9", /* offset 0x0755 */
-            "\x0031\x0036\x70B9", /* offset 0x0756 */
-            "\x0031\x0037\x70B9", /* offset 0x0757 */
-            "\x0031\x0038\x70B9", /* offset 0x0758 */
-            "\x0031\x0039\x70B9", /* offset 0x0759 */
-            "\x0032\x0030\x70B9", /* offset 0x075A */
-            "\x0032\x0031\x70B9", /* offset 0x075B */
-            "\x0032\x0032\x70B9", /* offset 0x075C */
-            "\x0032\x0033\x70B9", /* offset 0x075D */
-            "\x0032\x0034\x70B9", /* offset 0x075E */
-            "\x0068\x0050\x0061", /* offset 0x075F */
-            "\x0064\x0061", /* offset 0x0760 */
-            "\x0041\x0055", /* offset 0x0761 */
-            "\x0062\x0061\x0072", /* offset 0x0762 */
-            "\x006F\x0056", /* offset 0x0763 */
-            "\x0070\x0063", /* offset 0x0764 */
-            "\x5E73\x6210", /* offset 0x0765 */
-            "\x662D\x548C", /* offset 0x0766 */
-            "\x5927\x6B63", /* offset 0x0767 */
-            "\x660E\x6CBB", /* offset 0x0768 */
-            "\x682A\x5F0F\x4F1A\x793E", /* offset 0x0769 */
-            "\x0070\x0041", /* offset 0x076A */
-            "\x006E\x0041", /* offset 0x076B */
-            "\x03BC\x0041", /* offset 0x076C */
-            "\x006D\x0041", /* offset 0x076D */
-            "\x006B\x0041", /* offset 0x076E */
-            "\x004B\x0042", /* offset 0x076F */
-            "\x004D\x0042", /* offset 0x0770 */
-            "\x0047\x0042", /* offset 0x0771 */
-            "\x0063\x0061\x006C", /* offset 0x0772 */
-            "\x006B\x0063\x0061\x006C", /* offset 0x0773 */
-            "\x0070\x0046", /* offset 0x0774 */
-            "\x006E\x0046", /* offset 0x0775 */
-            "\x03BC\x0046", /* offset 0x0776 */
-            "\x03BC\x0067", /* offset 0x0777 */
-            "\x006D\x0067", /* offset 0x0778 */
-            "\x006B\x0067", /* offset 0x0779 */
-            "\x0048\x007A", /* offset 0x077A */
-            "\x006B\x0048\x007A", /* offset 0x077B */
-            "\x004D\x0048\x007A", /* offset 0x077C */
-            "\x0047\x0048\x007A", /* offset 0x077D */
-            "\x0054\x0048\x007A", /* offset 0x077E */
-            "\x03BC\x006C", /* offset 0x077F */
-            "\x006D\x006C", /* offset 0x0780 */
-            "\x0064\x006C", /* offset 0x0781 */
-            "\x006B\x006C", /* offset 0x0782 */
-            "\x0066\x006D", /* offset 0x0783 */
-            "\x006E\x006D", /* offset 0x0784 */
-            "\x03BC\x006D", /* offset 0x0785 */
-            "\x006D\x006D", /* offset 0x0786 */
-            "\x0063\x006D", /* offset 0x0787 */
-            "\x006B\x006D", /* offset 0x0788 */
-            "\x006D\x006D\x0032", /* offset 0x0789 */
-            "\x0063\x006D\x0032", /* offset 0x078A */
-            "\x006D\x0032", /* offset 0x078B */
-            "\x006B\x006D\x0032", /* offset 0x078C */
-            "\x006D\x006D\x0033", /* offset 0x078D */
-            "\x0063\x006D\x0033", /* offset 0x078E */
-            "\x006D\x0033", /* offset 0x078F */
-            "\x006B\x006D\x0033", /* offset 0x0790 */
-            "\x006D\x2215\x0073", /* offset 0x0791 */
-            "\x006D\x2215\x0073\x0032", /* offset 0x0792 */
-            "\x0050\x0061", /* offset 0x0793 */
-            "\x006B\x0050\x0061", /* offset 0x0794 */
-            "\x004D\x0050\x0061", /* offset 0x0795 */
-            "\x0047\x0050\x0061", /* offset 0x0796 */
-            "\x0072\x0061\x0064", /* offset 0x0797 */
-            "\x0072\x0061\x0064\x2215\x0073", /* offset 0x0798 */
-            "\x0072\x0061\x0064\x2215\x0073\x0032", /* offset 0x0799 */
-            "\x0070\x0073", /* offset 0x079A */
-            "\x006E\x0073", /* offset 0x079B */
-            "\x03BC\x0073", /* offset 0x079C */
-            "\x006D\x0073", /* offset 0x079D */
-            "\x0070\x0056", /* offset 0x079E */
-            "\x006E\x0056", /* offset 0x079F */
-            "\x03BC\x0056", /* offset 0x07A0 */
-            "\x006D\x0056", /* offset 0x07A1 */
-            "\x006B\x0056", /* offset 0x07A2 */
-            "\x004D\x0056", /* offset 0x07A3 */
-            "\x0070\x0057", /* offset 0x07A4 */
-            "\x006E\x0057", /* offset 0x07A5 */
-            "\x03BC\x0057", /* offset 0x07A6 */
-            "\x006D\x0057", /* offset 0x07A7 */
-            "\x006B\x0057", /* offset 0x07A8 */
-            "\x004D\x0057", /* offset 0x07A9 */
-            "\x006B\x03A9", /* offset 0x07AA */
-            "\x004D\x03A9", /* offset 0x07AB */
-            "\x0061\x002E\x006D\x002E", /* offset 0x07AC */
-            "\x0042\x0071", /* offset 0x07AD */
-            "\x0063\x0063", /* offset 0x07AE */
-            "\x0063\x0064", /* offset 0x07AF */
-            "\x0043\x2215\x006B\x0067", /* offset 0x07B0 */
-            "\x0043\x006F\x002E", /* offset 0x07B1 */
-            "\x0064\x0042", /* offset 0x07B2 */
-            "\x0047\x0079", /* offset 0x07B3 */
-            "\x0068\x0061", /* offset 0x07B4 */
-            "\x0048\x0050", /* offset 0x07B5 */
-            "\x0069\x006E", /* offset 0x07B6 */
-            "\x004B\x004B", /* offset 0x07B7 */
-            "\x004B\x004D", /* offset 0x07B8 */
-            "\x006B\x0074", /* offset 0x07B9 */
-            "\x006C\x006D", /* offset 0x07BA */
-            "\x006C\x006E", /* offset 0x07BB */
-            "\x006C\x006F\x0067", /* offset 0x07BC */
-            "\x006C\x0078", /* offset 0x07BD */
-            "\x006D\x0062", /* offset 0x07BE */
-            "\x006D\x0069\x006C", /* offset 0x07BF */
-            "\x006D\x006F\x006C", /* offset 0x07C0 */
-            "\x0050\x0048", /* offset 0x07C1 */
-            "\x0070\x002E\x006D\x002E", /* offset 0x07C2 */
-            "\x0050\x0050\x004D", /* offset 0x07C3 */
-            "\x0050\x0052", /* offset 0x07C4 */
-            "\x0073\x0072", /* offset 0x07C5 */
-            "\x0053\x0076", /* offset 0x07C6 */
-            "\x0057\x0062", /* offset 0x07C7 */
-            "\x0031\x65E5", /* offset 0x07C8 */
-            "\x0032\x65E5", /* offset 0x07C9 */
-            "\x0033\x65E5", /* offset 0x07CA */
-            "\x0034\x65E5", /* offset 0x07CB */
-            "\x0035\x65E5", /* offset 0x07CC */
-            "\x0036\x65E5", /* offset 0x07CD */
-            "\x0037\x65E5", /* offset 0x07CE */
-            "\x0038\x65E5", /* offset 0x07CF */
-            "\x0039\x65E5", /* offset 0x07D0 */
-            "\x0031\x0030\x65E5", /* offset 0x07D1 */
-            "\x0031\x0031\x65E5", /* offset 0x07D2 */
-            "\x0031\x0032\x65E5", /* offset 0x07D3 */
-            "\x0031\x0033\x65E5", /* offset 0x07D4 */
-            "\x0031\x0034\x65E5", /* offset 0x07D5 */
-            "\x0031\x0035\x65E5", /* offset 0x07D6 */
-            "\x0031\x0036\x65E5", /* offset 0x07D7 */
-            "\x0031\x0037\x65E5", /* offset 0x07D8 */
-            "\x0031\x0038\x65E5", /* offset 0x07D9 */
-            "\x0031\x0039\x65E5", /* offset 0x07DA */
-            "\x0032\x0030\x65E5", /* offset 0x07DB */
-            "\x0032\x0031\x65E5", /* offset 0x07DC */
-            "\x0032\x0032\x65E5", /* offset 0x07DD */
-            "\x0032\x0033\x65E5", /* offset 0x07DE */
-            "\x0032\x0034\x65E5", /* offset 0x07DF */
-            "\x0032\x0035\x65E5", /* offset 0x07E0 */
-            "\x0032\x0036\x65E5", /* offset 0x07E1 */
-            "\x0032\x0037\x65E5", /* offset 0x07E2 */
-            "\x0032\x0038\x65E5", /* offset 0x07E3 */
-            "\x0032\x0039\x65E5", /* offset 0x07E4 */
-            "\x0033\x0030\x65E5", /* offset 0x07E5 */
-            "\x0033\x0031\x65E5", /* offset 0x07E6 */
-            "\x8C48", /* offset 0x07E7 */
-            "\x66F4", /* offset 0x07E8 */
-            "\x8CC8", /* offset 0x07E9 */
-            "\x6ED1", /* offset 0x07EA */
-            "\x4E32", /* offset 0x07EB */
-            "\x53E5", /* offset 0x07EC */
-            "\x5951", /* offset 0x07ED */
-            "\x5587", /* offset 0x07EE */
-            "\x5948", /* offset 0x07EF */
-            "\x61F6", /* offset 0x07F0 */
-            "\x7669", /* offset 0x07F1 */
-            "\x7F85", /* offset 0x07F2 */
-            "\x863F", /* offset 0x07F3 */
-            "\x87BA", /* offset 0x07F4 */
-            "\x88F8", /* offset 0x07F5 */
-            "\x908F", /* offset 0x07F6 */
-            "\x6A02", /* offset 0x07F7 */
-            "\x6D1B", /* offset 0x07F8 */
-            "\x70D9", /* offset 0x07F9 */
-            "\x73DE", /* offset 0x07FA */
-            "\x843D", /* offset 0x07FB */
-            "\x916A", /* offset 0x07FC */
-            "\x99F1", /* offset 0x07FD */
-            "\x4E82", /* offset 0x07FE */
-            "\x5375", /* offset 0x07FF */
-            "\x6B04", /* offset 0x0800 */
-            "\x721B", /* offset 0x0801 */
-            "\x862D", /* offset 0x0802 */
-            "\x9E1E", /* offset 0x0803 */
-            "\x5D50", /* offset 0x0804 */
-            "\x6FEB", /* offset 0x0805 */
-            "\x85CD", /* offset 0x0806 */
-            "\x8964", /* offset 0x0807 */
-            "\x62C9", /* offset 0x0808 */
-            "\x81D8", /* offset 0x0809 */
-            "\x881F", /* offset 0x080A */
-            "\x5ECA", /* offset 0x080B */
-            "\x6717", /* offset 0x080C */
-            "\x6D6A", /* offset 0x080D */
-            "\x72FC", /* offset 0x080E */
-            "\x90CE", /* offset 0x080F */
-            "\x4F86", /* offset 0x0810 */
-            "\x51B7", /* offset 0x0811 */
-            "\x52DE", /* offset 0x0812 */
-            "\x64C4", /* offset 0x0813 */
-            "\x6AD3", /* offset 0x0814 */
-            "\x7210", /* offset 0x0815 */
-            "\x76E7", /* offset 0x0816 */
-            "\x8606", /* offset 0x0817 */
-            "\x865C", /* offset 0x0818 */
-            "\x8DEF", /* offset 0x0819 */
-            "\x9732", /* offset 0x081A */
-            "\x9B6F", /* offset 0x081B */
-            "\x9DFA", /* offset 0x081C */
-            "\x788C", /* offset 0x081D */
-            "\x797F", /* offset 0x081E */
-            "\x7DA0", /* offset 0x081F */
-            "\x83C9", /* offset 0x0820 */
-            "\x9304", /* offset 0x0821 */
-            "\x8AD6", /* offset 0x0822 */
-            "\x58DF", /* offset 0x0823 */
-            "\x5F04", /* offset 0x0824 */
-            "\x7C60", /* offset 0x0825 */
-            "\x807E", /* offset 0x0826 */
-            "\x7262", /* offset 0x0827 */
-            "\x78CA", /* offset 0x0828 */
-            "\x8CC2", /* offset 0x0829 */
-            "\x96F7", /* offset 0x082A */
-            "\x58D8", /* offset 0x082B */
-            "\x5C62", /* offset 0x082C */
-            "\x6A13", /* offset 0x082D */
-            "\x6DDA", /* offset 0x082E */
-            "\x6F0F", /* offset 0x082F */
-            "\x7D2F", /* offset 0x0830 */
-            "\x7E37", /* offset 0x0831 */
-            "\x964B", /* offset 0x0832 */
-            "\x52D2", /* offset 0x0833 */
-            "\x808B", /* offset 0x0834 */
-            "\x51DC", /* offset 0x0835 */
-            "\x51CC", /* offset 0x0836 */
-            "\x7A1C", /* offset 0x0837 */
-            "\x7DBE", /* offset 0x0838 */
-            "\x83F1", /* offset 0x0839 */
-            "\x9675", /* offset 0x083A */
-            "\x8B80", /* offset 0x083B */
-            "\x62CF", /* offset 0x083C */
-            "\x8AFE", /* offset 0x083D */
-            "\x4E39", /* offset 0x083E */
-            "\x5BE7", /* offset 0x083F */
-            "\x6012", /* offset 0x0840 */
-            "\x7387", /* offset 0x0841 */
-            "\x7570", /* offset 0x0842 */
-            "\x5317", /* offset 0x0843 */
-            "\x78FB", /* offset 0x0844 */
-            "\x4FBF", /* offset 0x0845 */
-            "\x5FA9", /* offset 0x0846 */
-            "\x4E0D", /* offset 0x0847 */
-            "\x6CCC", /* offset 0x0848 */
-            "\x6578", /* offset 0x0849 */
-            "\x7D22", /* offset 0x084A */
-            "\x53C3", /* offset 0x084B */
-            "\x585E", /* offset 0x084C */
-            "\x7701", /* offset 0x084D */
-            "\x8449", /* offset 0x084E */
-            "\x8AAA", /* offset 0x084F */
-            "\x6BBA", /* offset 0x0850 */
-            "\x6C88", /* offset 0x0851 */
-            "\x62FE", /* offset 0x0852 */
-            "\x82E5", /* offset 0x0853 */
-            "\x63A0", /* offset 0x0854 */
-            "\x7565", /* offset 0x0855 */
-            "\x4EAE", /* offset 0x0856 */
-            "\x5169", /* offset 0x0857 */
-            "\x51C9", /* offset 0x0858 */
-            "\x6881", /* offset 0x0859 */
-            "\x7CE7", /* offset 0x085A */
-            "\x826F", /* offset 0x085B */
-            "\x8AD2", /* offset 0x085C */
-            "\x91CF", /* offset 0x085D */
-            "\x52F5", /* offset 0x085E */
-            "\x5442", /* offset 0x085F */
-            "\x5EEC", /* offset 0x0860 */
-            "\x65C5", /* offset 0x0861 */
-            "\x6FFE", /* offset 0x0862 */
-            "\x792A", /* offset 0x0863 */
-            "\x95AD", /* offset 0x0864 */
-            "\x9A6A", /* offset 0x0865 */
-            "\x9E97", /* offset 0x0866 */
-            "\x9ECE", /* offset 0x0867 */
-            "\x66C6", /* offset 0x0868 */
-            "\x6B77", /* offset 0x0869 */
-            "\x8F62", /* offset 0x086A */
-            "\x5E74", /* offset 0x086B */
-            "\x6190", /* offset 0x086C */
-            "\x6200", /* offset 0x086D */
-            "\x649A", /* offset 0x086E */
-            "\x6F23", /* offset 0x086F */
-            "\x7149", /* offset 0x0870 */
-            "\x7489", /* offset 0x0871 */
-            "\x79CA", /* offset 0x0872 */
-            "\x7DF4", /* offset 0x0873 */
-            "\x806F", /* offset 0x0874 */
-            "\x8F26", /* offset 0x0875 */
-            "\x84EE", /* offset 0x0876 */
-            "\x9023", /* offset 0x0877 */
-            "\x934A", /* offset 0x0878 */
-            "\x5217", /* offset 0x0879 */
-            "\x52A3", /* offset 0x087A */
-            "\x54BD", /* offset 0x087B */
-            "\x70C8", /* offset 0x087C */
-            "\x88C2", /* offset 0x087D */
-            "\x5EC9", /* offset 0x087E */
-            "\x5FF5", /* offset 0x087F */
-            "\x637B", /* offset 0x0880 */
-            "\x6BAE", /* offset 0x0881 */
-            "\x7C3E", /* offset 0x0882 */
-            "\x7375", /* offset 0x0883 */
-            "\x4EE4", /* offset 0x0884 */
-            "\x56F9", /* offset 0x0885 */
-            "\x5DBA", /* offset 0x0886 */
-            "\x601C", /* offset 0x0887 */
-            "\x73B2", /* offset 0x0888 */
-            "\x7469", /* offset 0x0889 */
-            "\x7F9A", /* offset 0x088A */
-            "\x8046", /* offset 0x088B */
-            "\x9234", /* offset 0x088C */
-            "\x96F6", /* offset 0x088D */
-            "\x9748", /* offset 0x088E */
-            "\x9818", /* offset 0x088F */
-            "\x4F8B", /* offset 0x0890 */
-            "\x79AE", /* offset 0x0891 */
-            "\x91B4", /* offset 0x0892 */
-            "\x96B8", /* offset 0x0893 */
-            "\x60E1", /* offset 0x0894 */
-            "\x4E86", /* offset 0x0895 */
-            "\x50DA", /* offset 0x0896 */
-            "\x5BEE", /* offset 0x0897 */
-            "\x5C3F", /* offset 0x0898 */
-            "\x6599", /* offset 0x0899 */
-            "\x71CE", /* offset 0x089A */
-            "\x7642", /* offset 0x089B */
-            "\x84FC", /* offset 0x089C */
-            "\x907C", /* offset 0x089D */
-            "\x6688", /* offset 0x089E */
-            "\x962E", /* offset 0x089F */
-            "\x5289", /* offset 0x08A0 */
-            "\x677B", /* offset 0x08A1 */
-            "\x67F3", /* offset 0x08A2 */
-            "\x6D41", /* offset 0x08A3 */
-            "\x6E9C", /* offset 0x08A4 */
-            "\x7409", /* offset 0x08A5 */
-            "\x7559", /* offset 0x08A6 */
-            "\x786B", /* offset 0x08A7 */
-            "\x7D10", /* offset 0x08A8 */
-            "\x985E", /* offset 0x08A9 */
-            "\x622E", /* offset 0x08AA */
-            "\x9678", /* offset 0x08AB */
-            "\x502B", /* offset 0x08AC */
-            "\x5D19", /* offset 0x08AD */
-            "\x6DEA", /* offset 0x08AE */
-            "\x8F2A", /* offset 0x08AF */
-            "\x5F8B", /* offset 0x08B0 */
-            "\x6144", /* offset 0x08B1 */
-            "\x6817", /* offset 0x08B2 */
-            "\x9686", /* offset 0x08B3 */
-            "\x5229", /* offset 0x08B4 */
-            "\x540F", /* offset 0x08B5 */
-            "\x5C65", /* offset 0x08B6 */
-            "\x6613", /* offset 0x08B7 */
-            "\x674E", /* offset 0x08B8 */
-            "\x68A8", /* offset 0x08B9 */
-            "\x6CE5", /* offset 0x08BA */
-            "\x7406", /* offset 0x08BB */
-            "\x75E2", /* offset 0x08BC */
-            "\x7F79", /* offset 0x08BD */
-            "\x88CF", /* offset 0x08BE */
-            "\x88E1", /* offset 0x08BF */
-            "\x96E2", /* offset 0x08C0 */
-            "\x533F", /* offset 0x08C1 */
-            "\x6EBA", /* offset 0x08C2 */
-            "\x541D", /* offset 0x08C3 */
-            "\x71D0", /* offset 0x08C4 */
-            "\x7498", /* offset 0x08C5 */
-            "\x85FA", /* offset 0x08C6 */
-            "\x96A3", /* offset 0x08C7 */
-            "\x9C57", /* offset 0x08C8 */
-            "\x9E9F", /* offset 0x08C9 */
-            "\x6797", /* offset 0x08CA */
-            "\x6DCB", /* offset 0x08CB */
-            "\x81E8", /* offset 0x08CC */
-            "\x7B20", /* offset 0x08CD */
-            "\x7C92", /* offset 0x08CE */
-            "\x72C0", /* offset 0x08CF */
-            "\x7099", /* offset 0x08D0 */
-            "\x8B58", /* offset 0x08D1 */
-            "\x4EC0", /* offset 0x08D2 */
-            "\x8336", /* offset 0x08D3 */
-            "\x523A", /* offset 0x08D4 */
-            "\x5207", /* offset 0x08D5 */
-            "\x5EA6", /* offset 0x08D6 */
-            "\x62D3", /* offset 0x08D7 */
-            "\x7CD6", /* offset 0x08D8 */
-            "\x5B85", /* offset 0x08D9 */
-            "\x6D1E", /* offset 0x08DA */
-            "\x66B4", /* offset 0x08DB */
-            "\x8F3B", /* offset 0x08DC */
-            "\x964D", /* offset 0x08DD */
-            "\x5ED3", /* offset 0x08DE */
-            "\x5140", /* offset 0x08DF */
-            "\x55C0", /* offset 0x08E0 */
-            "\x585A", /* offset 0x08E1 */
-            "\x6674", /* offset 0x08E2 */
-            "\x51DE", /* offset 0x08E3 */
-            "\x732A", /* offset 0x08E4 */
-            "\x76CA", /* offset 0x08E5 */
-            "\x793C", /* offset 0x08E6 */
-            "\x795E", /* offset 0x08E7 */
-            "\x7965", /* offset 0x08E8 */
-            "\x798F", /* offset 0x08E9 */
-            "\x9756", /* offset 0x08EA */
-            "\x7CBE", /* offset 0x08EB */
-            "\x8612", /* offset 0x08EC */
-            "\x8AF8", /* offset 0x08ED */
-            "\x9038", /* offset 0x08EE */
-            "\x90FD", /* offset 0x08EF */
-            "\x98EF", /* offset 0x08F0 */
-            "\x98FC", /* offset 0x08F1 */
-            "\x9928", /* offset 0x08F2 */
-            "\x9DB4", /* offset 0x08F3 */
-            "\x4FAE", /* offset 0x08F4 */
-            "\x50E7", /* offset 0x08F5 */
-            "\x514D", /* offset 0x08F6 */
-            "\x52C9", /* offset 0x08F7 */
-            "\x52E4", /* offset 0x08F8 */
-            "\x5351", /* offset 0x08F9 */
-            "\x559D", /* offset 0x08FA */
-            "\x5606", /* offset 0x08FB */
-            "\x5668", /* offset 0x08FC */
-            "\x5840", /* offset 0x08FD */
-            "\x58A8", /* offset 0x08FE */
-            "\x5C64", /* offset 0x08FF */
-            "\x6094", /* offset 0x0900 */
-            "\x6168", /* offset 0x0901 */
-            "\x618E", /* offset 0x0902 */
-            "\x61F2", /* offset 0x0903 */
-            "\x654F", /* offset 0x0904 */
-            "\x65E2", /* offset 0x0905 */
-            "\x6691", /* offset 0x0906 */
-            "\x6885", /* offset 0x0907 */
-            "\x6D77", /* offset 0x0908 */
-            "\x6E1A", /* offset 0x0909 */
-            "\x6F22", /* offset 0x090A */
-            "\x716E", /* offset 0x090B */
-            "\x722B", /* offset 0x090C */
-            "\x7422", /* offset 0x090D */
-            "\x7891", /* offset 0x090E */
-            "\x7949", /* offset 0x090F */
-            "\x7948", /* offset 0x0910 */
-            "\x7950", /* offset 0x0911 */
-            "\x7956", /* offset 0x0912 */
-            "\x798D", /* offset 0x0913 */
-            "\x798E", /* offset 0x0914 */
-            "\x7A40", /* offset 0x0915 */
-            "\x7A81", /* offset 0x0916 */
-            "\x7BC0", /* offset 0x0917 */
-            "\x7E09", /* offset 0x0918 */
-            "\x7E41", /* offset 0x0919 */
-            "\x7F72", /* offset 0x091A */
-            "\x8005", /* offset 0x091B */
-            "\x81ED", /* offset 0x091C */
-            "\x8279", /* offset 0x091D */
-            "\x8457", /* offset 0x091E */
-            "\x8910", /* offset 0x091F */
-            "\x8996", /* offset 0x0920 */
-            "\x8B01", /* offset 0x0921 */
-            "\x8B39", /* offset 0x0922 */
-            "\x8CD3", /* offset 0x0923 */
-            "\x8D08", /* offset 0x0924 */
-            "\x8FB6", /* offset 0x0925 */
-            "\x96E3", /* offset 0x0926 */
-            "\x97FF", /* offset 0x0927 */
-            "\x983B", /* offset 0x0928 */
-            "\x0066\x0066", /* offset 0x0929 */
-            "\x0066\x0069", /* offset 0x092A */
-            "\x0066\x006C", /* offset 0x092B */
-            "\x0066\x0066\x0069", /* offset 0x092C */
-            "\x0066\x0066\x006C", /* offset 0x092D */
-            "\x0073\x0074", /* offset 0x092E */
-            "\x0574\x0576", /* offset 0x092F */
-            "\x0574\x0565", /* offset 0x0930 */
-            "\x0574\x056B", /* offset 0x0931 */
-            "\x057E\x0576", /* offset 0x0932 */
-            "\x0574\x056D", /* offset 0x0933 */
-            "\x05D9\x05B4", /* offset 0x0934 */
-            "\x05F2\x05B7", /* offset 0x0935 */
-            "\x05E2", /* offset 0x0936 */
-            "\x05D4", /* offset 0x0937 */
-            "\x05DB", /* offset 0x0938 */
-            "\x05DC", /* offset 0x0939 */
-            "\x05DD", /* offset 0x093A */
-            "\x05E8", /* offset 0x093B */
-            "\x05EA", /* offset 0x093C */
-            "\x05E9\x05C1", /* offset 0x093D */
-            "\x05E9\x05C2", /* offset 0x093E */
-            "\x05E9\x05BC\x05C1", /* offset 0x093F */
-            "\x05E9\x05BC\x05C2", /* offset 0x0940 */
-            "\x05D0\x05B7", /* offset 0x0941 */
-            "\x05D0\x05B8", /* offset 0x0942 */
-            "\x05D0\x05BC", /* offset 0x0943 */
-            "\x05D1\x05BC", /* offset 0x0944 */
-            "\x05D2\x05BC", /* offset 0x0945 */
-            "\x05D3\x05BC", /* offset 0x0946 */
-            "\x05D4\x05BC", /* offset 0x0947 */
-            "\x05D5\x05BC", /* offset 0x0948 */
-            "\x05D6\x05BC", /* offset 0x0949 */
-            "\x05D8\x05BC", /* offset 0x094A */
-            "\x05D9\x05BC", /* offset 0x094B */
-            "\x05DA\x05BC", /* offset 0x094C */
-            "\x05DB\x05BC", /* offset 0x094D */
-            "\x05DC\x05BC", /* offset 0x094E */
-            "\x05DE\x05BC", /* offset 0x094F */
-            "\x05E0\x05BC", /* offset 0x0950 */
-            "\x05E1\x05BC", /* offset 0x0951 */
-            "\x05E3\x05BC", /* offset 0x0952 */
-            "\x05E4\x05BC", /* offset 0x0953 */
-            "\x05E6\x05BC", /* offset 0x0954 */
-            "\x05E7\x05BC", /* offset 0x0955 */
-            "\x05E8\x05BC", /* offset 0x0956 */
-            "\x05E9\x05BC", /* offset 0x0957 */
-            "\x05EA\x05BC", /* offset 0x0958 */
-            "\x05D5\x05B9", /* offset 0x0959 */
-            "\x05D1\x05BF", /* offset 0x095A */
-            "\x05DB\x05BF", /* offset 0x095B */
-            "\x05E4\x05BF", /* offset 0x095C */
-            "\x05D0\x05DC", /* offset 0x095D */
-            "\x0671", /* offset 0x095E */
-            "\x067B", /* offset 0x095F */
-            "\x067E", /* offset 0x0960 */
-            "\x0680", /* offset 0x0961 */
-            "\x067A", /* offset 0x0962 */
-            "\x067F", /* offset 0x0963 */
-            "\x0679", /* offset 0x0964 */
-            "\x06A4", /* offset 0x0965 */
-            "\x06A6", /* offset 0x0966 */
-            "\x0684", /* offset 0x0967 */
-            "\x0683", /* offset 0x0968 */
-            "\x0686", /* offset 0x0969 */
-            "\x0687", /* offset 0x096A */
-            "\x068D", /* offset 0x096B */
-            "\x068C", /* offset 0x096C */
-            "\x068E", /* offset 0x096D */
-            "\x0688", /* offset 0x096E */
-            "\x0698", /* offset 0x096F */
-            "\x0691", /* offset 0x0970 */
-            "\x06A9", /* offset 0x0971 */
-            "\x06AF", /* offset 0x0972 */
-            "\x06B3", /* offset 0x0973 */
-            "\x06B1", /* offset 0x0974 */
-            "\x06BA", /* offset 0x0975 */
-            "\x06BB", /* offset 0x0976 */
-            "\x06C1", /* offset 0x0977 */
-            "\x06BE", /* offset 0x0978 */
-            "\x06D2", /* offset 0x0979 */
-            "\x06AD", /* offset 0x097A */
-            "\x06C7", /* offset 0x097B */
-            "\x06C6", /* offset 0x097C */
-            "\x06C8", /* offset 0x097D */
-            "\x06CB", /* offset 0x097E */
-            "\x06C5", /* offset 0x097F */
-            "\x06C9", /* offset 0x0980 */
-            "\x06D0", /* offset 0x0981 */
-            "\x0649", /* offset 0x0982 */
-            "\x064A\x0654\x0627", /* offset 0x0983 */
-            "\x064A\x0654\x06D5", /* offset 0x0984 */
-            "\x064A\x0654\x0648", /* offset 0x0985 */
-            "\x064A\x0654\x06C7", /* offset 0x0986 */
-            "\x064A\x0654\x06C6", /* offset 0x0987 */
-            "\x064A\x0654\x06C8", /* offset 0x0988 */
-            "\x064A\x0654\x06D0", /* offset 0x0989 */
-            "\x064A\x0654\x0649", /* offset 0x098A */
-            "\x06CC", /* offset 0x098B */
-            "\x064A\x0654\x062C", /* offset 0x098C */
-            "\x064A\x0654\x062D", /* offset 0x098D */
-            "\x064A\x0654\x0645", /* offset 0x098E */
-            "\x064A\x0654\x064A", /* offset 0x098F */
-            "\x0628\x062C", /* offset 0x0990 */
-            "\x0628\x062D", /* offset 0x0991 */
-            "\x0628\x062E", /* offset 0x0992 */
-            "\x0628\x0645", /* offset 0x0993 */
-            "\x0628\x0649", /* offset 0x0994 */
-            "\x0628\x064A", /* offset 0x0995 */
-            "\x062A\x062C", /* offset 0x0996 */
-            "\x062A\x062D", /* offset 0x0997 */
-            "\x062A\x062E", /* offset 0x0998 */
-            "\x062A\x0645", /* offset 0x0999 */
-            "\x062A\x0649", /* offset 0x099A */
-            "\x062A\x064A", /* offset 0x099B */
-            "\x062B\x062C", /* offset 0x099C */
-            "\x062B\x0645", /* offset 0x099D */
-            "\x062B\x0649", /* offset 0x099E */
-            "\x062B\x064A", /* offset 0x099F */
-            "\x062C\x062D", /* offset 0x09A0 */
-            "\x062C\x0645", /* offset 0x09A1 */
-            "\x062D\x062C", /* offset 0x09A2 */
-            "\x062D\x0645", /* offset 0x09A3 */
-            "\x062E\x062C", /* offset 0x09A4 */
-            "\x062E\x062D", /* offset 0x09A5 */
-            "\x062E\x0645", /* offset 0x09A6 */
-            "\x0633\x062C", /* offset 0x09A7 */
-            "\x0633\x062D", /* offset 0x09A8 */
-            "\x0633\x062E", /* offset 0x09A9 */
-            "\x0633\x0645", /* offset 0x09AA */
-            "\x0635\x062D", /* offset 0x09AB */
-            "\x0635\x0645", /* offset 0x09AC */
-            "\x0636\x062C", /* offset 0x09AD */
-            "\x0636\x062D", /* offset 0x09AE */
-            "\x0636\x062E", /* offset 0x09AF */
-            "\x0636\x0645", /* offset 0x09B0 */
-            "\x0637\x062D", /* offset 0x09B1 */
-            "\x0637\x0645", /* offset 0x09B2 */
-            "\x0638\x0645", /* offset 0x09B3 */
-            "\x0639\x062C", /* offset 0x09B4 */
-            "\x0639\x0645", /* offset 0x09B5 */
-            "\x063A\x062C", /* offset 0x09B6 */
-            "\x063A\x0645", /* offset 0x09B7 */
-            "\x0641\x062C", /* offset 0x09B8 */
-            "\x0641\x062D", /* offset 0x09B9 */
-            "\x0641\x062E", /* offset 0x09BA */
-            "\x0641\x0645", /* offset 0x09BB */
-            "\x0641\x0649", /* offset 0x09BC */
-            "\x0641\x064A", /* offset 0x09BD */
-            "\x0642\x062D", /* offset 0x09BE */
-            "\x0642\x0645", /* offset 0x09BF */
-            "\x0642\x0649", /* offset 0x09C0 */
-            "\x0642\x064A", /* offset 0x09C1 */
-            "\x0643\x0627", /* offset 0x09C2 */
-            "\x0643\x062C", /* offset 0x09C3 */
-            "\x0643\x062D", /* offset 0x09C4 */
-            "\x0643\x062E", /* offset 0x09C5 */
-            "\x0643\x0644", /* offset 0x09C6 */
-            "\x0643\x0645", /* offset 0x09C7 */
-            "\x0643\x0649", /* offset 0x09C8 */
-            "\x0643\x064A", /* offset 0x09C9 */
-            "\x0644\x062C", /* offset 0x09CA */
-            "\x0644\x062D", /* offset 0x09CB */
-            "\x0644\x062E", /* offset 0x09CC */
-            "\x0644\x0645", /* offset 0x09CD */
-            "\x0644\x0649", /* offset 0x09CE */
-            "\x0644\x064A", /* offset 0x09CF */
-            "\x0645\x062C", /* offset 0x09D0 */
-            "\x0645\x062D", /* offset 0x09D1 */
-            "\x0645\x062E", /* offset 0x09D2 */
-            "\x0645\x0645", /* offset 0x09D3 */
-            "\x0645\x0649", /* offset 0x09D4 */
-            "\x0645\x064A", /* offset 0x09D5 */
-            "\x0646\x062C", /* offset 0x09D6 */
-            "\x0646\x062D", /* offset 0x09D7 */
-            "\x0646\x062E", /* offset 0x09D8 */
-            "\x0646\x0645", /* offset 0x09D9 */
-            "\x0646\x0649", /* offset 0x09DA */
-            "\x0646\x064A", /* offset 0x09DB */
-            "\x0647\x062C", /* offset 0x09DC */
-            "\x0647\x0645", /* offset 0x09DD */
-            "\x0647\x0649", /* offset 0x09DE */
-            "\x0647\x064A", /* offset 0x09DF */
-            "\x064A\x062C", /* offset 0x09E0 */
-            "\x064A\x062D", /* offset 0x09E1 */
-            "\x064A\x062E", /* offset 0x09E2 */
-            "\x064A\x0645", /* offset 0x09E3 */
-            "\x064A\x0649", /* offset 0x09E4 */
-            "\x064A\x064A", /* offset 0x09E5 */
-            "\x0630\x0670", /* offset 0x09E6 */
-            "\x0631\x0670", /* offset 0x09E7 */
-            "\x0649\x0670", /* offset 0x09E8 */
-            "\x0020\x064C\x0651", /* offset 0x09E9 */
-            "\x0020\x064D\x0651", /* offset 0x09EA */
-            "\x0020\x064E\x0651", /* offset 0x09EB */
-            "\x0020\x064F\x0651", /* offset 0x09EC */
-            "\x0020\x0650\x0651", /* offset 0x09ED */
-            "\x0020\x0651\x0670", /* offset 0x09EE */
-            "\x064A\x0654\x0631", /* offset 0x09EF */
-            "\x064A\x0654\x0632", /* offset 0x09F0 */
-            "\x064A\x0654\x0646", /* offset 0x09F1 */
-            "\x0628\x0631", /* offset 0x09F2 */
-            "\x0628\x0632", /* offset 0x09F3 */
-            "\x0628\x0646", /* offset 0x09F4 */
-            "\x062A\x0631", /* offset 0x09F5 */
-            "\x062A\x0632", /* offset 0x09F6 */
-            "\x062A\x0646", /* offset 0x09F7 */
-            "\x062B\x0631", /* offset 0x09F8 */
-            "\x062B\x0632", /* offset 0x09F9 */
-            "\x062B\x0646", /* offset 0x09FA */
-            "\x0645\x0627", /* offset 0x09FB */
-            "\x0646\x0631", /* offset 0x09FC */
-            "\x0646\x0632", /* offset 0x09FD */
-            "\x0646\x0646", /* offset 0x09FE */
-            "\x064A\x0631", /* offset 0x09FF */
-            "\x064A\x0632", /* offset 0x0A00 */
-            "\x064A\x0646", /* offset 0x0A01 */
-            "\x064A\x0654\x062E", /* offset 0x0A02 */
-            "\x064A\x0654\x0647", /* offset 0x0A03 */
-            "\x0628\x0647", /* offset 0x0A04 */
-            "\x062A\x0647", /* offset 0x0A05 */
-            "\x0635\x062E", /* offset 0x0A06 */
-            "\x0644\x0647", /* offset 0x0A07 */
-            "\x0646\x0647", /* offset 0x0A08 */
-            "\x0647\x0670", /* offset 0x0A09 */
-            "\x064A\x0647", /* offset 0x0A0A */
-            "\x062B\x0647", /* offset 0x0A0B */
-            "\x0633\x0647", /* offset 0x0A0C */
-            "\x0634\x0645", /* offset 0x0A0D */
-            "\x0634\x0647", /* offset 0x0A0E */
-            "\x0640\x064E\x0651", /* offset 0x0A0F */
-            "\x0640\x064F\x0651", /* offset 0x0A10 */
-            "\x0640\x0650\x0651", /* offset 0x0A11 */
-            "\x0637\x0649", /* offset 0x0A12 */
-            "\x0637\x064A", /* offset 0x0A13 */
-            "\x0639\x0649", /* offset 0x0A14 */
-            "\x0639\x064A", /* offset 0x0A15 */
-            "\x063A\x0649", /* offset 0x0A16 */
-            "\x063A\x064A", /* offset 0x0A17 */
-            "\x0633\x0649", /* offset 0x0A18 */
-            "\x0633\x064A", /* offset 0x0A19 */
-            "\x0634\x0649", /* offset 0x0A1A */
-            "\x0634\x064A", /* offset 0x0A1B */
-            "\x062D\x0649", /* offset 0x0A1C */
-            "\x062D\x064A", /* offset 0x0A1D */
-            "\x062C\x0649", /* offset 0x0A1E */
-            "\x062C\x064A", /* offset 0x0A1F */
-            "\x062E\x0649", /* offset 0x0A20 */
-            "\x062E\x064A", /* offset 0x0A21 */
-            "\x0635\x0649", /* offset 0x0A22 */
-            "\x0635\x064A", /* offset 0x0A23 */
-            "\x0636\x0649", /* offset 0x0A24 */
-            "\x0636\x064A", /* offset 0x0A25 */
-            "\x0634\x062C", /* offset 0x0A26 */
-            "\x0634\x062D", /* offset 0x0A27 */
-            "\x0634\x062E", /* offset 0x0A28 */
-            "\x0634\x0631", /* offset 0x0A29 */
-            "\x0633\x0631", /* offset 0x0A2A */
-            "\x0635\x0631", /* offset 0x0A2B */
-            "\x0636\x0631", /* offset 0x0A2C */
-            "\x0627\x064B", /* offset 0x0A2D */
-            "\x062A\x062C\x0645", /* offset 0x0A2E */
-            "\x062A\x062D\x062C", /* offset 0x0A2F */
-            "\x062A\x062D\x0645", /* offset 0x0A30 */
-            "\x062A\x062E\x0645", /* offset 0x0A31 */
-            "\x062A\x0645\x062C", /* offset 0x0A32 */
-            "\x062A\x0645\x062D", /* offset 0x0A33 */
-            "\x062A\x0645\x062E", /* offset 0x0A34 */
-            "\x062C\x0645\x062D", /* offset 0x0A35 */
-            "\x062D\x0645\x064A", /* offset 0x0A36 */
-            "\x062D\x0645\x0649", /* offset 0x0A37 */
-            "\x0633\x062D\x062C", /* offset 0x0A38 */
-            "\x0633\x062C\x062D", /* offset 0x0A39 */
-            "\x0633\x062C\x0649", /* offset 0x0A3A */
-            "\x0633\x0645\x062D", /* offset 0x0A3B */
-            "\x0633\x0645\x062C", /* offset 0x0A3C */
-            "\x0633\x0645\x0645", /* offset 0x0A3D */
-            "\x0635\x062D\x062D", /* offset 0x0A3E */
-            "\x0635\x0645\x0645", /* offset 0x0A3F */
-            "\x0634\x062D\x0645", /* offset 0x0A40 */
-            "\x0634\x062C\x064A", /* offset 0x0A41 */
-            "\x0634\x0645\x062E", /* offset 0x0A42 */
-            "\x0634\x0645\x0645", /* offset 0x0A43 */
-            "\x0636\x062D\x0649", /* offset 0x0A44 */
-            "\x0636\x062E\x0645", /* offset 0x0A45 */
-            "\x0637\x0645\x062D", /* offset 0x0A46 */
-            "\x0637\x0645\x0645", /* offset 0x0A47 */
-            "\x0637\x0645\x064A", /* offset 0x0A48 */
-            "\x0639\x062C\x0645", /* offset 0x0A49 */
-            "\x0639\x0645\x0645", /* offset 0x0A4A */
-            "\x0639\x0645\x0649", /* offset 0x0A4B */
-            "\x063A\x0645\x0645", /* offset 0x0A4C */
-            "\x063A\x0645\x064A", /* offset 0x0A4D */
-            "\x063A\x0645\x0649", /* offset 0x0A4E */
-            "\x0641\x062E\x0645", /* offset 0x0A4F */
-            "\x0642\x0645\x062D", /* offset 0x0A50 */
-            "\x0642\x0645\x0645", /* offset 0x0A51 */
-            "\x0644\x062D\x0645", /* offset 0x0A52 */
-            "\x0644\x062D\x064A", /* offset 0x0A53 */
-            "\x0644\x062D\x0649", /* offset 0x0A54 */
-            "\x0644\x062C\x062C", /* offset 0x0A55 */
-            "\x0644\x062E\x0645", /* offset 0x0A56 */
-            "\x0644\x0645\x062D", /* offset 0x0A57 */
-            "\x0645\x062D\x062C", /* offset 0x0A58 */
-            "\x0645\x062D\x0645", /* offset 0x0A59 */
-            "\x0645\x062D\x064A", /* offset 0x0A5A */
-            "\x0645\x062C\x062D", /* offset 0x0A5B */
-            "\x0645\x062C\x0645", /* offset 0x0A5C */
-            "\x0645\x062E\x062C", /* offset 0x0A5D */
-            "\x0645\x062E\x0645", /* offset 0x0A5E */
-            "\x0645\x062C\x062E", /* offset 0x0A5F */
-            "\x0647\x0645\x062C", /* offset 0x0A60 */
-            "\x0647\x0645\x0645", /* offset 0x0A61 */
-            "\x0646\x062D\x0645", /* offset 0x0A62 */
-            "\x0646\x062D\x0649", /* offset 0x0A63 */
-            "\x0646\x062C\x0645", /* offset 0x0A64 */
-            "\x0646\x062C\x0649", /* offset 0x0A65 */
-            "\x0646\x0645\x064A", /* offset 0x0A66 */
-            "\x0646\x0645\x0649", /* offset 0x0A67 */
-            "\x064A\x0645\x0645", /* offset 0x0A68 */
-            "\x0628\x062E\x064A", /* offset 0x0A69 */
-            "\x062A\x062C\x064A", /* offset 0x0A6A */
-            "\x062A\x062C\x0649", /* offset 0x0A6B */
-            "\x062A\x062E\x064A", /* offset 0x0A6C */
-            "\x062A\x062E\x0649", /* offset 0x0A6D */
-            "\x062A\x0645\x064A", /* offset 0x0A6E */
-            "\x062A\x0645\x0649", /* offset 0x0A6F */
-            "\x062C\x0645\x064A", /* offset 0x0A70 */
-            "\x062C\x062D\x0649", /* offset 0x0A71 */
-            "\x062C\x0645\x0649", /* offset 0x0A72 */
-            "\x0633\x062E\x0649", /* offset 0x0A73 */
-            "\x0635\x062D\x064A", /* offset 0x0A74 */
-            "\x0634\x062D\x064A", /* offset 0x0A75 */
-            "\x0636\x062D\x064A", /* offset 0x0A76 */
-            "\x0644\x062C\x064A", /* offset 0x0A77 */
-            "\x0644\x0645\x064A", /* offset 0x0A78 */
-            "\x064A\x062D\x064A", /* offset 0x0A79 */
-            "\x064A\x062C\x064A", /* offset 0x0A7A */
-            "\x064A\x0645\x064A", /* offset 0x0A7B */
-            "\x0645\x0645\x064A", /* offset 0x0A7C */
-            "\x0642\x0645\x064A", /* offset 0x0A7D */
-            "\x0646\x062D\x064A", /* offset 0x0A7E */
-            "\x0639\x0645\x064A", /* offset 0x0A7F */
-            "\x0643\x0645\x064A", /* offset 0x0A80 */
-            "\x0646\x062C\x062D", /* offset 0x0A81 */
-            "\x0645\x062E\x064A", /* offset 0x0A82 */
-            "\x0644\x062C\x0645", /* offset 0x0A83 */
-            "\x0643\x0645\x0645", /* offset 0x0A84 */
-            "\x062C\x062D\x064A", /* offset 0x0A85 */
-            "\x062D\x062C\x064A", /* offset 0x0A86 */
-            "\x0645\x062C\x064A", /* offset 0x0A87 */
-            "\x0641\x0645\x064A", /* offset 0x0A88 */
-            "\x0628\x062D\x064A", /* offset 0x0A89 */
-            "\x0633\x062E\x064A", /* offset 0x0A8A */
-            "\x0646\x062C\x064A", /* offset 0x0A8B */
-            "\x0635\x0644\x06D2", /* offset 0x0A8C */
-            "\x0642\x0644\x06D2", /* offset 0x0A8D */
-            "\x0627\x0644\x0644\x0647", /* offset 0x0A8E */
-            "\x0627\x0643\x0628\x0631", /* offset 0x0A8F */
-            "\x0645\x062D\x0645\x062F", /* offset 0x0A90 */
-            "\x0635\x0644\x0639\x0645", /* offset 0x0A91 */
-            "\x0631\x0633\x0648\x0644", /* offset 0x0A92 */
-            "\x0639\x0644\x064A\x0647", /* offset 0x0A93 */
-            "\x0648\x0633\x0644\x0645", /* offset 0x0A94 */
-            "\x0635\x0644\x0649", /* offset 0x0A95 */
-            "\x0635\x0644\x0649\x0020\x0627\x0644\x0644\x0647\x0020\x0639\x0644\x064A\x0647\x0020\x0648\x0633\x0644\x0645", /* offset 0x0A96 */
-            "\x062C\x0644\x0020\x062C\x0644\x0627\x0644\x0647", /* offset 0x0A97 */
-            "\x0631\x06CC\x0627\x0644", /* offset 0x0A98 */
-            "\x2014", /* offset 0x0A99 */
-            "\x2013", /* offset 0x0A9A */
-            "\x005F", /* offset 0x0A9B */
-            "\x007B", /* offset 0x0A9C */
-            "\x007D", /* offset 0x0A9D */
-            "\x3014", /* offset 0x0A9E */
-            "\x3015", /* offset 0x0A9F */
-            "\x3010", /* offset 0x0AA0 */
-            "\x3011", /* offset 0x0AA1 */
-            "\x300A", /* offset 0x0AA2 */
-            "\x300B", /* offset 0x0AA3 */
-            "\x300C", /* offset 0x0AA4 */
-            "\x300D", /* offset 0x0AA5 */
-            "\x300E", /* offset 0x0AA6 */
-            "\x300F", /* offset 0x0AA7 */
-            "\x002C", /* offset 0x0AA8 */
-            "\x3001", /* offset 0x0AA9 */
-            "\x003A", /* offset 0x0AAA */
-            "\x003F", /* offset 0x0AAB */
-            "\x0021", /* offset 0x0AAC */
-            "\x0023", /* offset 0x0AAD */
-            "\x0026", /* offset 0x0AAE */
-            "\x002A", /* offset 0x0AAF */
-            "\x002D", /* offset 0x0AB0 */
-            "\x003C", /* offset 0x0AB1 */
-            "\x003E", /* offset 0x0AB2 */
-            "\x005C", /* offset 0x0AB3 */
-            "\x0024", /* offset 0x0AB4 */
-            "\x0025", /* offset 0x0AB5 */
-            "\x0040", /* offset 0x0AB6 */
-            "\x0020\x064B", /* offset 0x0AB7 */
-            "\x0640\x064B", /* offset 0x0AB8 */
-            "\x0020\x064C", /* offset 0x0AB9 */
-            "\x0020\x064D", /* offset 0x0ABA */
-            "\x0020\x064E", /* offset 0x0ABB */
-            "\x0640\x064E", /* offset 0x0ABC */
-            "\x0020\x064F", /* offset 0x0ABD */
-            "\x0640\x064F", /* offset 0x0ABE */
-            "\x0020\x0650", /* offset 0x0ABF */
-            "\x0640\x0650", /* offset 0x0AC0 */
-            "\x0020\x0651", /* offset 0x0AC1 */
-            "\x0640\x0651", /* offset 0x0AC2 */
-            "\x0020\x0652", /* offset 0x0AC3 */
-            "\x0640\x0652", /* offset 0x0AC4 */
-            "\x0621", /* offset 0x0AC5 */
-            "\x0627", /* offset 0x0AC6 */
-            "\x0628", /* offset 0x0AC7 */
-            "\x0629", /* offset 0x0AC8 */
-            "\x062A", /* offset 0x0AC9 */
-            "\x062B", /* offset 0x0ACA */
-            "\x062C", /* offset 0x0ACB */
-            "\x062D", /* offset 0x0ACC */
-            "\x062E", /* offset 0x0ACD */
-            "\x062F", /* offset 0x0ACE */
-            "\x0630", /* offset 0x0ACF */
-            "\x0631", /* offset 0x0AD0 */
-            "\x0632", /* offset 0x0AD1 */
-            "\x0633", /* offset 0x0AD2 */
-            "\x0634", /* offset 0x0AD3 */
-            "\x0635", /* offset 0x0AD4 */
-            "\x0636", /* offset 0x0AD5 */
-            "\x0637", /* offset 0x0AD6 */
-            "\x0638", /* offset 0x0AD7 */
-            "\x0639", /* offset 0x0AD8 */
-            "\x063A", /* offset 0x0AD9 */
-            "\x0641", /* offset 0x0ADA */
-            "\x0642", /* offset 0x0ADB */
-            "\x0643", /* offset 0x0ADC */
-            "\x0644", /* offset 0x0ADD */
-            "\x0645", /* offset 0x0ADE */
-            "\x0646", /* offset 0x0ADF */
-            "\x0647", /* offset 0x0AE0 */
-            "\x0648", /* offset 0x0AE1 */
-            "\x064A", /* offset 0x0AE2 */
-            "\x0644\x0627\x0653", /* offset 0x0AE3 */
-            "\x0644\x0627\x0654", /* offset 0x0AE4 */
-            "\x0644\x0627\x0655", /* offset 0x0AE5 */
-            "\x0644\x0627", /* offset 0x0AE6 */
-            "\x0022", /* offset 0x0AE7 */
-            "\x0027", /* offset 0x0AE8 */
-            "\x002F", /* offset 0x0AE9 */
-            "\x005B", /* offset 0x0AEA */
-            "\x005D", /* offset 0x0AEB */
-            "\x005E", /* offset 0x0AEC */
-            "\x007C", /* offset 0x0AED */
-            "\x007E", /* offset 0x0AEE */
-            "\x2985", /* offset 0x0AEF */
-            "\x2986", /* offset 0x0AF0 */
-            "\x3002", /* offset 0x0AF1 */
-            "\x30FB", /* offset 0x0AF2 */
-            "\x30A1", /* offset 0x0AF3 */
-            "\x30A3", /* offset 0x0AF4 */
-            "\x30A5", /* offset 0x0AF5 */
-            "\x30A7", /* offset 0x0AF6 */
-            "\x30A9", /* offset 0x0AF7 */
-            "\x30E3", /* offset 0x0AF8 */
-            "\x30E5", /* offset 0x0AF9 */
-            "\x30E7", /* offset 0x0AFA */
-            "\x30C3", /* offset 0x0AFB */
-            "\x30FC", /* offset 0x0AFC */
-            "\x30F3", /* offset 0x0AFD */
-            "\x3099", /* offset 0x0AFE */
-            "\x309A", /* offset 0x0AFF */
-            "\x00A2", /* offset 0x0B00 */
-            "\x00A3", /* offset 0x0B01 */
-            "\x00AC", /* offset 0x0B02 */
-            "\x00A6", /* offset 0x0B03 */
-            "\x00A5", /* offset 0x0B04 */
-            "\x20A9", /* offset 0x0B05 */
-            "\x2502", /* offset 0x0B06 */
-            "\x2190", /* offset 0x0B07 */
-            "\x2191", /* offset 0x0B08 */
-            "\x2192", /* offset 0x0B09 */
-            "\x2193", /* offset 0x0B0A */
-            "\x25A0", /* offset 0x0B0B */
-            "\x25CB", /* offset 0x0B0C */
-        };
-    }
-}
-
diff --git a/lib/jabber-net/stringprep/unicode/ResourceLoader.cs b/lib/jabber-net/stringprep/unicode/ResourceLoader.cs
deleted file mode 100644
index 2c8c7a6..0000000
--- a/lib/jabber-net/stringprep/unicode/ResourceLoader.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Resources;
-using System.Reflection;
-
-namespace stringprep.unicode
-{
-    class ResourceLoader
-    {
-        private const string UNICODE = "stringprep.unicode.Unicode";
-        private static ResourceManager m_uni_res = null;
-
-        private static ResourceManager Resources
-        {
-            get
-            {
-                if (m_uni_res == null)
-                {
-                    lock (UNICODE)
-                    {
-                        if (m_uni_res == null)
-                            m_uni_res = new ResourceManager(UNICODE, Assembly.GetExecutingAssembly());
-                    }
-                }
-                return m_uni_res;
-            }
-        }
-
-        public static object LoadRes(string name)
-        {
-            return Resources.GetObject(name);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/AssemblyInfo.cs b/lib/jabber-net/test/AssemblyInfo.cs
deleted file mode 100644
index f214fcc..0000000
--- a/lib/jabber-net/test/AssemblyInfo.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Reflection;
-
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-//   (*) If no key is specified, the assembly is not signed.
-//   (*) KeyName refers to a key that has been installed in the Crypto Service
-//       Provider (CSP) on your machine. KeyFile refers to a file which contains
-//       a key.
-//   (*) If the KeyFile and the KeyName values are both specified, the
-//       following processing occurs:
-//       (1) If the KeyName can be found in the CSP, that key is used.
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key
-//           in the KeyFile is installed into the CSP and used.
-//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-//       When specifying the KeyFile, the location of the KeyFile should be
-//       relative to the project output directory which is
-//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-//       located in the project directory, you would specify the AssemblyKeyFile
-//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-//       documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
-
-[assembly: System.CLSCompliant(true)]
diff --git a/lib/jabber-net/test/bedrock/collections/ByteStackTest.cs b/lib/jabber-net/test/bedrock/collections/ByteStackTest.cs
deleted file mode 100644
index 0ce3afc..0000000
--- a/lib/jabber-net/test/bedrock/collections/ByteStackTest.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-
-namespace test.bedrock.collections
-{
-    /// <summary>
-    ///    Summary description for TemplateTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class ByteStackTest
-    {
-        private System.Text.Encoding ENC = System.Text.Encoding.Default;
-
-        [Test] public void Test_Main()
-        {
-            ByteStack bs = new ByteStack();
-            Assert.AreEqual(0, bs.Count);
-            bs.Push((byte) 'a');
-            Assert.AreEqual(1, bs.Count);
-            byte b = bs.Pop();
-            Assert.AreEqual(b, (byte)'a');
-            Assert.AreEqual(0, bs.Count);
-        }
-        [Test] public void Test_Empty()
-        {
-            ByteStack bs = new ByteStack();
-            byte[] buf = bs;
-            Assert.AreEqual(0, buf.Length);
-        }
-        [Test] public void Test_Init()
-        {
-            ByteStack bs = new ByteStack(ENC.GetBytes("foo"));
-            Assert.AreEqual("foo", bs.ToString());
-            bs.Push((byte) 't');
-            Assert.AreEqual("foot", bs.ToString());
-            bs = new ByteStack(ENC.GetBytes("f"));
-            bs.Push((byte) 't');
-            Assert.AreEqual("ft", bs.ToString());
-        }
-        [Test] public void Test_Growth()
-        {
-            ByteStack bs = new ByteStack(4);
-
-            bs.Push((byte) 'b');
-            Assert.AreEqual("b", bs.ToString());
-            bs.Push((byte) 'c');
-            Assert.AreEqual("bc", bs.ToString());
-            bs.Push((byte) 'd');
-            Assert.AreEqual("bcd", bs.ToString());
-            bs.Push((byte) 'e');
-            Assert.AreEqual("bcde", bs.ToString());
-            bs.Push((byte) 'b');
-            Assert.AreEqual("bcdeb", bs.ToString());
-            bs.Push((byte) 'c');
-            Assert.AreEqual("bcdebc", bs.ToString());
-            bs.Push((byte) 'd');
-            Assert.AreEqual("bcdebcd", bs.ToString());
-            bs.Push((byte) 'e');
-            Assert.AreEqual("bcdebcde", bs.ToString());
-            bs.Push((byte) 'b');
-            bs.Push((byte) 'c');
-            bs.Push((byte) 'd');
-            bs.Push((byte) 'e');
-            bs.Push((byte) 'b');
-            bs.Push((byte) 'c');
-            bs.Push((byte) 'd');
-            bs.Push((byte) 'e');
-            Assert.AreEqual("bcdebcdebcdebcde", bs.ToString());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/SetTest.cs b/lib/jabber-net/test/bedrock/collections/SetTest.cs
deleted file mode 100644
index 2b79038..0000000
--- a/lib/jabber-net/test/bedrock/collections/SetTest.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-
-namespace test.bedrock.collections
-{
-    /// <summary>
-    /// Summary description for SetTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class SetTest
-    {
-        //[ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_Hashtable_Double_Add()
-        {
-            Set s = new Set(SetImplementation.Hashtable);
-            Assert.AreEqual(0, s.Count);
-            s.Add("one");
-            Assert.AreEqual(1, s.Count);
-            s.Add("one");
-        }
-        //[ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_SkipList_Double_Add()
-        {
-            Set s = new Set(SetImplementation.SkipList);
-            Assert.AreEqual(0, s.Count);
-            s.Add("one");
-            Assert.AreEqual(1, s.Count);
-            s.Add("one");
-        }
-        //[ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_Tree_Double_Add()
-        {
-            Set s = new Set(SetImplementation.Tree);
-            Assert.AreEqual(0, s.Count);
-            s.Add("one");
-            Assert.AreEqual(1, s.Count);
-            s.Add("one");
-        }
-
-        private void all(SetImplementation i)
-        {
-            Set s = new Set(i);
-            Assert.AreEqual(0, s.Count);
-
-            s.Add("one");
-            Assert.AreEqual(1, s.Count);
-            Assert.IsTrue(s.Contains("one"));
-            Assert.IsTrue(!s.Contains("two"));
-            Assert.IsTrue(!s.Contains("three"));
-
-            s.Add("two");
-            Assert.AreEqual(2, s.Count);
-            Assert.IsTrue(s.Contains("one"));
-            Assert.IsTrue(s.Contains("two"));
-            Assert.IsTrue(!s.Contains("three"));
-
-            s.Remove("one");
-            Assert.AreEqual(1, s.Count);
-            Assert.IsTrue(!s.Contains("one"));
-            Assert.IsTrue(s.Contains("two"));
-            Assert.IsTrue(!s.Contains("three"));
-
-            s.Add("one");
-            Assert.AreEqual(2, s.Count);
-            Assert.IsTrue(s.Contains("one"));
-            Assert.IsTrue(s.Contains("two"));
-            Assert.IsTrue(!s.Contains("three"));
-
-            s.Add("one");
-            Assert.AreEqual(2, s.Count);
-            Assert.IsTrue(s.Contains("one"));
-            Assert.IsTrue(s.Contains("two"));
-            Assert.IsTrue(!s.Contains("three"));
-
-            int count = 0;
-            foreach (string str in s)
-            {
-                count++;
-                Assert.AreEqual(3, str.Length);
-            }
-            Assert.AreEqual(2, count);
-        }
-
-        [Test] public void Test_Hashtable()
-        {
-            all(SetImplementation.Hashtable);
-        }
-        [Test] public void Test_Skiplist()
-        {
-            all(SetImplementation.SkipList);
-        }
-        [Test] public void Test_Tree()
-        {
-            all(SetImplementation.Tree);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/SkipListTest.cs b/lib/jabber-net/test/bedrock/collections/SkipListTest.cs
deleted file mode 100644
index db82b70..0000000
--- a/lib/jabber-net/test/bedrock/collections/SkipListTest.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-using System.Collections;
-
-namespace test.bedrock.collections
-{
-    /// <summary>
-    /// Summary description for SkipListTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class SkipListTest
-    {
-        [ExpectedException(typeof(ArgumentNullException))]
-        [Test] public void Test_Null_Key()
-        {
-            SkipList sl = new SkipList();
-            sl.Add(null, "one");
-        }
-
-        [ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_Key_Twice()
-        {
-            SkipList sl = new SkipList();
-            sl.Add("one", "one");
-            sl.Add("one", "one");
-        }
-
-        [Test] public void Test_Add()
-        {
-            SkipList sl = new SkipList();
-            Assert.AreEqual(0, sl.Count);
-            sl.Add("1", "bar");
-            Assert.AreEqual(1, sl.Count);
-            sl.Add("2", "baz");
-            Assert.AreEqual(2, sl.Count);
-        }
-        [Test] public void Test_Get()
-        {
-            SkipList sl = new SkipList();
-            sl.Add("1", "bar");
-            Assert.AreEqual("bar", sl["1"]);
-        }
-        [Test] public void Test_Lots_InOrder()
-        {
-            SkipList sl = new SkipList();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            for (int i=0; i<4096; i++)
-            {
-                Assert.AreEqual(i.ToString(), sl[i]);
-            }
-        }
-        [Test] public void Test_Lots_Random()
-        {
-            SkipList sl = new SkipList();
-            Random r = new Random();
-            int[] nums = new int[4096];
-
-            for (int i=0; i<4096; i++)
-            {
-                nums[i] = r.Next(10000);
-                while (sl.Contains(nums[i]))
-                {
-                    nums[i] = r.Next(10000);
-                }
-                sl[nums[i]] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            for (int i=0; i<4096; i++)
-            {
-                Assert.AreEqual(i.ToString(), sl[nums[i]]);
-            }
-        }
-        [Test] public void Test_Iteration()
-        {
-            SkipList sl = new SkipList();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            int count = 0;
-            foreach (DictionaryEntry de in sl)
-            {
-                Assert.AreEqual(count, de.Key);
-                Assert.AreEqual(count.ToString(), de.Value);
-                count++;
-            }
-            Assert.AreEqual(4096, count);
-        }
-
-        [Test] public void Test_DictIteration()
-        {
-            SkipList sl = new SkipList();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            int count = 0;
-            IDictionaryEnumerator e = sl.GetEnumerator();
-            while (e.MoveNext())
-            {
-                Assert.AreEqual(count, e.Key);
-                Assert.AreEqual(count.ToString(), e.Value);
-                count++;
-            }
-            Assert.AreEqual(4096, count);
-        }
-
-        [Test] public void Test_Remove()
-        {
-            SkipList sl = new SkipList();
-            sl[0] = 0;
-            Assert.AreEqual(1, sl.Count);
-            sl.Remove(0);
-            Assert.AreEqual(0, sl.Count);
-        }
-
-        [Test] public void Test_Clear()
-        {
-            SkipList sl = new SkipList();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            sl.Clear();
-            Assert.AreEqual(0, sl.Count);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/StringSet.cs b/lib/jabber-net/test/bedrock/collections/StringSet.cs
deleted file mode 100644
index 48e8640..0000000
--- a/lib/jabber-net/test/bedrock/collections/StringSet.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-
-namespace test.bedrock.collections
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class StringSetTest
-    {
-        [Test]
-        public void Create()
-        {
-            StringSet ss = new StringSet();
-            Assert.AreEqual(0, ss.Count);
-            Assert.AreEqual("", ss.ToString());
-        }
-
-        [Test]
-        public void Add()
-        {
-            StringSet ss = new StringSet();
-            ss.Add("foo");
-            ss.Add("foo");
-            ss.Add("bar");
-            Assert.IsTrue(ss["foo"]);
-            Assert.AreEqual(2, ss.Count);
-            Assert.AreEqual("foo\r\nbar\r\n", ss.ToString());
-            ss.Remove("bar");
-            Assert.AreEqual(1, ss.Count);
-            Assert.IsFalse(ss["fool"]);
-
-            ss = new StringSet(new string[] { "foo", "bar"});
-            ss.Add(new StringSet("baz"));
-            Assert.AreEqual(3, ss.Count);
-        }
-
-        [Test]
-        public void Merge()
-        {
-            StringSet ss = new StringSet();
-            ss.Add("foo");
-            StringSet so = new StringSet();
-            so.Add("bar");
-            so.Add("baz");
-            ss.Add(so);
-            Assert.AreEqual(3, ss.Count);
-
-            so = new StringSet();
-            so.Add("boo");
-            so.Add("baz");
-            ss.Add(so);
-            Assert.AreEqual(4, ss.Count);
-
-            ss.Remove(so);
-            Assert.AreEqual(2, ss.Count);
-            Assert.IsTrue(ss["foo"]);
-            Assert.IsTrue(ss["bar"]);
-            Assert.IsFalse(ss["boo"]);
-            Assert.IsFalse(ss["baz"]);
-            Assert.IsFalse(ss["bloo"]);
-        }
-
-        [Test]
-        public void Enumerate()
-        {
-            StringSet ss = new StringSet();
-
-            int i = 0;
-            foreach (string s in ss)
-            {
-                i++;
-                Console.WriteLine(s);
-            }
-            Assert.AreEqual(0, i);
-
-            ss.Add("bloo");
-            ss.Add("foo");
-            ss.Add("bar");
-            foreach (string s in ss)
-            {
-                i++;
-                Console.WriteLine(s);
-            }
-            Assert.AreEqual(3, i);
-            string[] arr = ss.GetStrings();
-            Array.Sort(arr);
-            Assert.AreEqual("bar", arr[0]);
-            Assert.AreEqual("bloo", arr[1]);
-            Assert.AreEqual("foo", arr[2]);
-            Assert.AreEqual(3, arr.Length);
-        }
-
-        [Test]
-        public void Operators()
-        {
-            StringSet ss = new StringSet();
-            ss = ss + "bloo" + "bar";
-            Assert.AreEqual(2, ss.Count);
-            StringSet so = ss;
-            Assert.AreEqual(ss, so);
-            Assert.AreEqual(ss.GetHashCode(), so.GetHashCode());
-            so = new StringSet(so);
-            Assert.AreEqual(ss, so);
-            Assert.AreEqual(ss.GetHashCode(), so.GetHashCode());
-            so = ss - "bar";
-            Assert.AreEqual(1, so.Count);
-            Assert.AreNotEqual(ss, so);
-            Assert.IsTrue(ss != so);
-            Assert.AreNotEqual(ss.GetHashCode(), so.GetHashCode());
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentNullException))]
-        public void Null()
-        {
-            StringSet ss = new StringSet();
-            ss.Add((string)null);
-        }
-        
-        [Test]
-        public void Empty()
-        {
-            StringSet ss = new StringSet(new string[] { "" });
-            Assert.AreEqual(1, ss.Count);
-            ss = new StringSet((string[])null);
-            Assert.AreEqual(0, ss.Count);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/TreeTest.cs b/lib/jabber-net/test/bedrock/collections/TreeTest.cs
deleted file mode 100644
index 941b345..0000000
--- a/lib/jabber-net/test/bedrock/collections/TreeTest.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-
-namespace test.bedrock.collections
-{
-    /// <summary>
-    /// Summary description for TreeTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TreeTest
-    {
-        private Tree data()
-        {
-            Tree t = new Tree();
-            t.Add("one", "one");
-            t["2"]  = "12";
-            t["~"]  = "2~";
-            t["a~"] = "3a~";
-            t["~a"] = "4~a";
-            t[" "]  = "5 ";
-            t["  "] = "6  ";
-            Assert.AreEqual(t.Count, 7);
-            Assert.IsTrue(t.Contains("~"));
-            Assert.IsTrue(!t.Contains("~~"));
-            return t;
-        }
-        [Test] public void Test_Type()
-        {
-            Tree t = new Tree();
-            Assert.AreEqual("bedrock.collections.Tree", t.GetType().FullName);
-        }
-        [Test] public void Test_Main()
-        {
-            Tree t = new Tree();
-            t["one"] = "two";
-            Assert.AreEqual("two", t["one"]);
-            Assert.AreEqual(t.Count, 1);
-            t.Remove("one");
-            Assert.AreEqual(t.Count, 0);
-            Assert.AreEqual(null, t["one"]);
-        }
-        [Test] public void Test_Enum()
-        {
-            Tree t = data();
-            int i = 0;
-            string s;
-            foreach (DictionaryEntry o in t)
-            {
-                s = "s|" + o.Key + "|=|" + o.Value + "|";
-                Console.WriteLine(s);
-                i++;
-            }
-            Assert.AreEqual(7, i);
-        }
-        [Test] public void Test_Clear()
-        {
-            Tree t = new Tree();
-            Assert.AreEqual(t.Count, 0);
-            t.Clear();
-            Assert.AreEqual(t.Count, 0);
-            t.Add("one", "one");
-            Assert.AreEqual(t.Count, 1);
-            t.Clear();
-            Assert.AreEqual(t.Count, 0);
-        }
-        [Test] public void Test_Values()
-        {
-            Tree t = data();
-            ICollection ic = t.Values;
-            Assert.AreEqual(ic.Count, 7);
-            object[] o = (object[]) ic;
-            Assert.AreEqual("5 ", o[0]);
-        }
-        [Test] public void Test_Keys()
-        {
-            Tree t = data();
-            ICollection ic = t.Keys;
-            Assert.AreEqual(7, ic.Count);
-            object[] o = (object[]) ic;
-            Assert.AreEqual(" ", o[0]);
-        }
-
-        [Test] public void Test_Lots_InOrder()
-        {
-            Tree sl = new Tree();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            for (int i=0; i<4096; i++)
-            {
-                Assert.AreEqual(i.ToString(), sl[i]);
-            }
-        }
-        [Test] public void Test_Lots_Random()
-        {
-            Tree sl = new Tree();
-            Random r = new Random();
-            int[] nums = new int[4096];
-
-            for (int i=0; i<4096; i++)
-            {
-                nums[i] = r.Next(10000);
-                while (sl.Contains(nums[i]))
-                {
-                    nums[i] = r.Next(10000);
-                }
-                sl[nums[i]] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            for (int i=0; i<4096; i++)
-            {
-                Assert.AreEqual(i.ToString(), sl[nums[i]]);
-            }
-        }
-        [Test] public void Test_Iteration()
-        {
-            Tree sl = new Tree();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            int count = 0;
-            foreach (DictionaryEntry de in sl)
-            {
-                Assert.AreEqual(count, de.Key);
-                Assert.AreEqual(count.ToString(), de.Value);
-                count++;
-            }
-            Assert.AreEqual(4096, count);
-        }
-
-        [Test] public void Test_DictIteration()
-        {
-            Tree sl = new Tree();
-            for (int i=0; i<4096; i++)
-            {
-                sl[i] = i.ToString();
-            }
-            Assert.AreEqual(4096, sl.Count);
-            int count = 0;
-            IDictionaryEnumerator e = sl.GetEnumerator();
-            while (e.MoveNext())
-            {
-                Assert.AreEqual(count, e.Key);
-                Assert.AreEqual(count.ToString(), e.Value);
-                count++;
-            }
-            Assert.AreEqual(4096, count);
-        }
-
-        [ExpectedException(typeof(ArgumentNullException))]
-        [Test] public void Test_Null()
-        {
-            Tree sl = new Tree();
-            sl[null] = "n";
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/TrieNodeTest.cs b/lib/jabber-net/test/bedrock/collections/TrieNodeTest.cs
deleted file mode 100644
index bc97fb8..0000000
--- a/lib/jabber-net/test/bedrock/collections/TrieNodeTest.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-namespace test.bedrock.collections
-{
-    /// <summary>
-    ///    Summary description for TemplateTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TrieNodeTest
-    {
-        [Test] public void Test_Main()
-        {
-            System.Text.Encoding ENC = System.Text.Encoding.Default;
-            TrieNode n = new TrieNode(null, 0);
-            byte[] key = ENC.GetBytes("test");
-            TrieNode current = n;
-            for (int i=0; i<key.Length; i++)
-            {
-                byte b = key[i];
-                current = current[b, true];
-            }
-            current.Value = "foo";
-            Assert.AreEqual(ENC.GetString(key), ENC.GetString(current.Key));
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/collections/TrieTest.cs b/lib/jabber-net/test/bedrock/collections/TrieTest.cs
deleted file mode 100644
index 794221f..0000000
--- a/lib/jabber-net/test/bedrock/collections/TrieTest.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Collections;
-using NUnit.Framework;
-using bedrock.collections;
-using bedrock.util;
-
-namespace test.bedrock.collections
-{
-    /// <summary>
-    ///    Summary description for TemplateTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TrieTest
-    {
-        private Trie data()
-        {
-            Trie t = new Trie();
-            t.Add("one", "one");
-            t[2]    = "2";
-            t["~"]  = "~";
-            t["a~"] = "a~";
-            t["~a"] = "~a";
-            t[' ']  = " ";
-            t["  "] = "  ";
-            Assert.AreEqual(t.Count, 7);
-            Assert.IsTrue(t.Contains("~"));
-            Assert.IsTrue(!t.Contains("~~"));
-            return t;
-        }
-        [Test] public void Test_Type()
-        {
-            Trie t = new Trie();
-            Assert.AreEqual("bedrock.collections.Trie", t.GetType().FullName);
-        }
-        [Test] public void Test_Main()
-        {
-            Trie t = new Trie();
-            t["one"] = "two";
-            Assert.AreEqual("two", t["one"]);
-            Assert.AreEqual(t.Count, 1);
-            t.Remove("one");
-            Assert.AreEqual(t.Count, 0);
-            Assert.AreEqual(null, t["one"]);
-        }
-        [Test] public void Test_Enum()
-        {
-            Trie t = data();
-            int i = 0;
-            string s;
-            foreach (DictionaryEntry o in t)
-            {
-                s = "s|" + System.Text.Encoding.UTF8.GetString((byte[])o.Key) +
-                    "|=|" + o.Value + "|";
-                Console.WriteLine(s);
-                i++;
-            }
-            Assert.AreEqual(7, i);
-        }
-        [Test] public void Test_Clear()
-        {
-            Trie t = new Trie();
-            Assert.AreEqual(t.Count, 0);
-            t.Clear();
-            Assert.AreEqual(t.Count, 0);
-            t.Add("one", "one");
-            Assert.AreEqual(t.Count, 1);
-            t.Clear();
-            Assert.AreEqual(t.Count, 0);
-        }
-        [Test] public void Test_Values()
-        {
-            Trie t = data();
-            ICollection ic = t.Values;
-            Assert.AreEqual(ic.Count, 7);
-        }
-        [Test] public void Test_Keys()
-        {
-            Trie t = data();
-            ICollection ic = t.Keys;
-            Assert.AreEqual(7, ic.Count);
-        }
-        [Test] public void Test_Dictionary()
-        {
-            Trie t = data();
-            // TODO: test dictionary enumerator.
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/io/ZlibStream.cs b/lib/jabber-net/test/bedrock/io/ZlibStream.cs
deleted file mode 100644
index f2745df..0000000
--- a/lib/jabber-net/test/bedrock/io/ZlibStream.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.IO;
-
-using NUnit.Framework;
-using bedrock.io;
-using bedrock.util;
-
-namespace test.bedrock.io
-{
-    /// <summary>
-    /// Test the ZlibStream class.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class ZlibStreamTest
-    {
-        private static readonly System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-
-        // python:
-        // [ord(x) for x in zlib.compress("Hello, world")]
-        private const string HELLO_STR = "Hello, world";
-        private static readonly byte[] HELLO_BYTES = new byte[]
-        {
-            120, 156, 243,  72, 205, 201, 201, 215,
-             81,  40, 207,  47, 202,  73,   1,   0,
-             27, 212,   4, 105
-        };
-
-        [Test]
-        public void Read()
-        {
-            MemoryStream ms = new MemoryStream();
-            ms.Write(HELLO_BYTES, 0, HELLO_BYTES.Length);
-            ms.Seek(0, SeekOrigin.Begin);
-            ZlibStream z = new ZlibStream(ms);
-            byte[] buf = new byte[1024];
-            int len = z.Read(buf, 0, buf.Length);
-            Assert.Greater(len, 0);
-            string str = ENC.GetString(buf, 0, len);
-            Assert.AreEqual(HELLO_STR, str);
-        }
-
-        [Test]
-        public void Write()
-        {
-            byte[] buf = ENC.GetBytes(HELLO_STR);
-            MemoryStream ms = new MemoryStream();
-            ZlibStream z = new ZlibStream(ms, 4);
-            z.Write(buf, 0, buf.Length);
-            ms.Seek(0, SeekOrigin.Begin);
-            byte[] res = ms.ToArray();
-            Assert.AreEqual(HELLO_BYTES.Length, res.Length);
-            int count = 0;
-            foreach (byte b in res)
-            {
-                Assert.AreEqual(HELLO_BYTES[count++], b);
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/net/AsyncSocketTest.cs b/lib/jabber-net/test/bedrock/net/AsyncSocketTest.cs
deleted file mode 100644
index 818da66..0000000
--- a/lib/jabber-net/test/bedrock/net/AsyncSocketTest.cs
+++ /dev/null
@@ -1,188 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Threading;
-using NUnit.Framework;
-using bedrock.net;
-using bedrock.util;
-namespace test.bedrock.net
-{
-    /// <summary>
-    ///    Summary description for AsyncSocketTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class AsyncSocketTest : ISocketEventListener
-    {
-        private static readonly System.Text.Encoding ENC = System.Text.Encoding.ASCII;
-
-        private static readonly byte[] sbuf = ENC.GetBytes("01234567890123456789012345678901234567890123456789012345678901234567890123456789");
-        private readonly object done = new object();
-        private string success = null;
-
-        private bool succeeded = true;
-        private string errorMessage;
-
-        [Test] public void Test_Write()
-        {
-            SocketWatcher w = new SocketWatcher(20);
-            Address a = new Address("127.0.0.1", 7001);
-            a.Resolve();
-
-            AsyncSocket listen = w.CreateListenSocket(this, a);
-            listen.RequestAccept();
-
-            AsyncSocket connect;
-            lock (done)
-            {
-                connect = w.CreateConnectSocket(this, a);
-                bool NoTimeout = Monitor.Wait(done, new TimeSpan(0, 0, 30));
-
-                Assert.IsTrue(NoTimeout, "The read command didn't complete in time.");
-                Assert.IsTrue(succeeded, errorMessage);
-            }
-
-            Assert.AreEqual("5678901234", success);
-            connect.Close();
-            listen.Close();
-        }
-
-// %$@! can't use #pragma in VS.Net 2003.  Just live with these warnings.
-// #pragma warning disable 1718
-        [Test]
-        public void Test_Ops()
-        {
-            SocketWatcher w = new SocketWatcher(20);
-            Address a = new Address("127.0.0.1", 7002);
-            a.Resolve();
-            AsyncSocket one = w.CreateListenSocket(this, a);
-            AsyncSocket two = null;
-            AsyncSocket three = one;
-            AsyncSocket four = two;
-            Assert.IsTrue(one == three);
-            Assert.IsTrue(two == four);
-            Assert.IsTrue(one >= three);
-            Assert.IsTrue(two >= four);
-            Assert.IsTrue(one <= three);
-            Assert.IsTrue(two <= four);
-            Assert.IsTrue(one != two);
-            Assert.IsTrue(two != one);
-            Assert.IsTrue(one > two);
-            Assert.IsTrue(one >= two);
-            Assert.IsTrue(two < one);
-            Assert.IsTrue(two <= one);
-
-            two = w.CreateListenSocket(this, a);
-            four = two;
-            Assert.IsTrue(one == three);
-            Assert.IsTrue(two == four);
-            Assert.IsTrue(one >= three);
-            Assert.IsTrue(two >= four);
-            Assert.IsTrue(one <= three);
-            Assert.IsTrue(two <= four);
-            Assert.IsTrue(one != two);
-            Assert.IsTrue(two != one);
-
-            int c = ((IComparable)one).CompareTo(two);
-            Assert.IsTrue(c != 0);
-            if (c == -1)
-            {
-                // one less than two
-                Assert.IsTrue(one < two);
-                Assert.IsTrue(one <= two);
-                Assert.IsTrue(two > one);
-                Assert.IsTrue(two >= one);
-            }
-            else if (c == 1)
-            {
-                // one greater than two
-                Assert.IsTrue(one > two);
-                Assert.IsTrue(one >= two);
-                Assert.IsTrue(two < one);
-                Assert.IsTrue(two <= one);
-            }
-            else
-            {
-                Assert.IsTrue(false);
-            }
-            one.Close();
-            two.Close();
-        }
-// #pragma warning restore
-        #region Implementation of ISocketEventListener
-        public bool OnAccept(BaseSocket newsocket)
-        {
-            newsocket.RequestRead();
-            return false;
-        }
-
-        public bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            success = ENC.GetString(buf, offset, length);
-            sock.Close();
-            lock(done)
-            {
-                Monitor.Pulse(done);
-            }
-            return false;
-        }
-
-        public void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            System.Diagnostics.Debug.WriteLine(ENC.GetString(buf, offset, length));
-            sock.Close();
-        }
-
-        public void OnError(BaseSocket sock, Exception ex)
-        {
-            lock (done)
-            {
-                succeeded = false;
-                errorMessage = ex.Message;
-                Monitor.Pulse(done);
-            }
-        }
-
-        public void OnConnect(BaseSocket sock)
-        {
-            sock.Write(sbuf, 5, 10);
-        }
-
-        public void OnClose(BaseSocket sock)
-        {
-
-        }
-
-        public void OnInit(BaseSocket new_sock)
-        {
-
-        }
-
-        public ISocketEventListener GetListener(BaseSocket new_sock)
-        {
-            return this;
-        }
-
-        public bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return false;
-        }
-
-        #endregion
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/net/HttpSocketTest.cs b/lib/jabber-net/test/bedrock/net/HttpSocketTest.cs
deleted file mode 100644
index 7ca7d70..0000000
--- a/lib/jabber-net/test/bedrock/net/HttpSocketTest.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-using NUnit.Framework;
-
-using bedrock.net;
-using bedrock.util;
-using System.Threading;
-
-
-namespace test.bedrock.net
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class HttpSocketTest
-    {
-        private static readonly Encoding ENC = Encoding.UTF8;
-
-        private class ServerListener: ISocketEventListener
-        {
-            #region ISocketEventListener Members
-
-            public void OnInit(BaseSocket newSock)
-            {
-            }
-
-            public ISocketEventListener GetListener(BaseSocket newSock)
-            {
-                return this;
-            }
-
-            public bool OnAccept(BaseSocket newsocket)
-            {
-                AsyncSocket s = (AsyncSocket)newsocket;
-                newsocket.RequestRead();
-                return true;
-            }
-
-            public void OnConnect(BaseSocket sock)
-            {
-                throw new NotImplementedException("The method or operation is not implemented.");
-            }
-
-            public void OnClose(BaseSocket sock)
-            {
-                
-            }
-
-            public void OnError(BaseSocket sock, Exception ex)
-            {
-                throw ex;
-            }
-
-            public bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-            {
-                string str = ENC.GetString(buf, offset, length);
-                Console.WriteLine("SR: " + str);
-                if (str.Contains("11111"))
-                {
-                sock.Write(ENC.GetBytes(@"HTTP/1.1 200 OK
-Content-Length: 10
-Content-Type: text/plain
-
-1234567890"));
-                }
-                else if (str.Contains("22222"))
-                {
-                    sock.Write(ENC.GetBytes(@"HTTP/1.1 200 OK
-Content-Length: 10
-Content-Type: text/plain
-
-12345"));
-                    sock.Write(ENC.GetBytes("67890"));
-                }
-                else if (str.Contains("33333"))
-                {
-                    sock.Write(ENC.GetBytes(@"HTTP/1.1 200 OK
-Content-Length: 20
-Content-Type: text/plain
-
-12345"));
-                    // Turning off Nagle didn't fix this.  Mrmph.
-                    Thread.Sleep(300);
-                    sock.Write(ENC.GetBytes("67890"));
-                    Thread.Sleep(300);
-                    sock.Write(ENC.GetBytes("12345"));
-                    Thread.Sleep(300);
-                    sock.Write(ENC.GetBytes("67890"));
-                }
-                return true;
-            }
-
-            public void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-            {
-                Console.WriteLine("SW: " + ENC.GetString(buf, offset, length));
-            }
-
-            public bool OnInvalidCertificate(BaseSocket sock, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
-            {
-                throw new NotImplementedException("The method or operation is not implemented.");
-            }
-
-            #endregion
-        }
-
-        private class ResponseListener: ISocketEventListener
-        {
-            public string Last = null;
-            public AutoResetEvent Event = new AutoResetEvent(false);
-
-
-            #region ISocketEventListener Members
-
-            public void OnInit(BaseSocket newSock)
-            {
-            }
-
-            public ISocketEventListener GetListener(BaseSocket newSock)
-            {
-                throw new NotImplementedException("The method or operation is not implemented.");
-            }
-
-            public bool OnAccept(BaseSocket newsocket)
-            {
-                throw new NotImplementedException("The method or operation is not implemented.");
-            }
-
-            public void OnConnect(BaseSocket sock)
-            {
-            }
-
-            public void OnClose(BaseSocket sock)
-            {
-            }
-
-            public void OnError(BaseSocket sock, Exception ex)
-            {
-                throw ex;
-            }
-
-            public bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-            {
-                Last = ENC.GetString(buf, offset, length);
-                Console.WriteLine("RR: " + Last);
-                Event.Set();
-                return true;
-            }
-
-            public void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-            {
-                Console.WriteLine("RW: " + ENC.GetString(buf, offset, length));
-            }
-
-            public bool OnInvalidCertificate(BaseSocket sock, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
-            {
-                throw new NotImplementedException("The method or operation is not implemented.");
-            }
-
-            #endregion
-        }
-
-        [Test]
-        public void Test_Full_Response()
-        {
-            SocketWatcher watcher = new SocketWatcher();
-            Address a = new Address("127.0.0.1", 7002);
-            a.Resolve();
-
-            ServerListener server = new ServerListener();
-            AsyncSocket server_sock = watcher.CreateListenSocket(server, a);
-            server_sock.RequestAccept();
-
-            ResponseListener resp = new ResponseListener();
-            HttpSocket sock = new HttpSocket(resp);
-
-            Uri u = new Uri("http://localhost:7002/");
-            byte[] buf = ENC.GetBytes("11111");
-            HttpSocket s = (HttpSocket)sock;
-            s.Execute("GET", u, buf, 0, buf.Length, "text/plain");
-            resp.Event.WaitOne();
-            Assert.AreEqual("1234567890", resp.Last);
-
-            resp.Last = null;
-            buf = ENC.GetBytes("22222");
-            s.Execute("GET", u, buf, 0, buf.Length, "text/plain");
-            resp.Event.WaitOne();
-            Assert.AreEqual("1234567890", resp.Last);
-
-            resp.Last = null;
-            buf = ENC.GetBytes("33333");
-            s.Execute("GET", u, buf, 0, buf.Length, "text/plain");
-            resp.Event.WaitOne();
-            Assert.AreEqual("12345678901234567890", resp.Last);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/net/HttpUploadTest.cs b/lib/jabber-net/test/bedrock/net/HttpUploadTest.cs
deleted file mode 100644
index e902853..0000000
--- a/lib/jabber-net/test/bedrock/net/HttpUploadTest.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Text;
-using System.IO;
-using System.Threading;
-
-using NUnit.Framework;
-using bedrock.util;
-using jabber.connection;
-
-namespace test.bedrock.net
-{
-    /// <summary>
-    /// TODO: This test is known to not work.  Add one that does, please.
-    /// </summary>
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class HttpUploadTest
-    {
-        private object m_lock = new object();
-
-        private void uploader_OnUpload(object sender)
-        {
-            lock(m_lock)
-            {
-                Monitor.Pulse(m_lock);
-            }
-        }
-
-        [Test]
-        public void UploadFile()
-        {
-            /*
-            m_lock = new object();
-
-            HttpUploader uploader = new HttpUploader();
-            uploader.OnUpload += new global::bedrock.ObjectHandler(uploader_OnUpload);
-            uploader.Upload("http://opodsadny.kiev.luxoft.com:7335/webclient", "les at primus.com/Bass", "upload.txt");
-            lock (m_lock)
-            {
-                Monitor.Wait(m_lock);
-            }
-             */
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/net/SSLAsyncSocketTest.cs b/lib/jabber-net/test/bedrock/net/SSLAsyncSocketTest.cs
deleted file mode 100644
index 411cf92..0000000
--- a/lib/jabber-net/test/bedrock/net/SSLAsyncSocketTest.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Threading;
-using NUnit.Framework;
-using bedrock.net;
-using bedrock.util;
-using System.Security.Cryptography.X509Certificates;
-
-namespace test.bedrock.net
-{
-    /// <summary>
-    ///  Not really async.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [Ignore("Fails due to certificate.")]
-    [TestFixture]
-    public class SSLAsyncSocketTest : ISocketEventListener
-    {
-        private static readonly System.Text.Encoding ENC = System.Text.Encoding.ASCII;
-
-        private static readonly byte[] sbuf = ENC.GetBytes("01234567890123456789012345678901234567890123456789012345678901234567890123456789");
-        private readonly object done = new object();
-        private readonly object start = new object();
-        private string success = null;
-        private AsyncSocket m_listen;
-        readonly Address a = new Address("localhost", 7003);
-
-        private bool succeeded = true;
-        private string errorMessage;
-
-        [Test] public void Test_Write()
-        {
-            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
-            a.Resolve();
-
-            lock(start)
-            {
-                new Thread(Server).Start();
-                Monitor.Wait(start);
-            }
-
-            try
-            {
-                lock (done)
-                {
-                    new Thread(Client).Start();
-                    Monitor.Wait(done);
-
-                    Assert.IsTrue(succeeded, errorMessage);
-                }
-            }
-            finally
-            {
-                m_listen.Close();
-            }
-
-            Assert.AreEqual("5678901234", success);
-        }
-
-        private void Client()
-        {
-
-            SocketWatcher c_w = new SocketWatcher(20);
-            c_w.Synchronous = true;
-
-            // Note: must have a client cert in your IE cert store.
-            X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
-            store.Open(OpenFlags.ReadOnly);
-
-            if (store.Certificates.Count > 0)
-            {
-                c_w.LocalCertificate = store.Certificates[0];
-            }
-            else
-            {
-                lock (done)
-                {
-                    errorMessage = "There were no certificates in the Windows Certificate Store.";
-                    succeeded = false;
-                    Monitor.Pulse(done);
-                }
-
-                return;
-            }
-            c_w.CreateConnectSocket(this, a, true, "localhost");
-        }
-
-        private void Server()
-        {
-            SocketWatcher s_w = new SocketWatcher(20);
-
-            //s_w.RequireClientCert = true;
-
-            X509Certificate2 c2;
-            X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
-            store.Open(OpenFlags.ReadWrite);
-            X509Certificate2Collection cert = store.Certificates.Find(X509FindType.FindBySubjectName, "localhost", true);
-            if (cert.Count == 0)
-            {
-                c2 = new X509Certificate2("../../localhost-cert.p12", "test");
-                store.Add(c2);
-            }
-            else
-            {
-                c2 = cert[0];
-            }
-            Assert.IsTrue(c2.HasPrivateKey);
-            Assert.IsNotNull(c2.PrivateKey);
-            Assert.AreEqual(typeof(X509Certificate2), c2.GetType());
-
-            cert = store.Certificates.Find(X509FindType.FindByThumbprint, c2.GetCertHashString(), false);
-            c2 = cert[0];
-            Assert.AreEqual(typeof(X509Certificate2), c2.GetType());
-            Assert.IsTrue(c2.HasPrivateKey);
-            Assert.IsNotNull(c2.PrivateKey);
-            store.Close();
-            s_w.LocalCertificate = c2;
-            s_w.Synchronous = true;
-
-            m_listen = s_w.CreateListenSocket(this, a, true);
-            lock(start)
-            {
-                Monitor.Pulse(start);
-            }
-
-            try
-            {
-                m_listen.RequestAccept();
-            }
-            catch (Exception ex)
-            {
-                lock (done)
-                {
-                    succeeded = false;
-                    errorMessage = ex.Message;
-                    Monitor.Pulse(done);
-                }
-            }
-        }
-
-        #region Implementation of ISocketEventListener
-        public bool OnAccept(BaseSocket newsocket)
-        {
-            Assert.IsTrue(((AsyncSocket)newsocket).IsMutuallyAuthenticated);
-            newsocket.RequestRead();
-            return false;
-        }
-
-        public bool OnRead(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            success = ENC.GetString(buf, offset, length);
-            lock(done)
-            {
-                Monitor.Pulse(done);
-            }
-            return false;
-        }
-
-        public void OnWrite(BaseSocket sock, byte[] buf, int offset, int length)
-        {
-            System.Diagnostics.Debug.WriteLine(ENC.GetString(buf, offset, length));
-            sock.Close();
-        }
-
-        public void OnError(BaseSocket sock, Exception ex)
-        {
-
-        }
-
-        public void OnConnect(BaseSocket sock)
-        {
-            sock.Write(sbuf, 5, 10);
-        }
-
-        public void OnClose(BaseSocket sock)
-        {
-
-        }
-
-        public void OnInit(BaseSocket new_sock)
-        {
-
-        }
-
-        public ISocketEventListener GetListener(BaseSocket new_sock)
-        {
-            return this;
-        }
-
-        public bool OnInvalidCertificate(BaseSocket sock,
-            System.Security.Cryptography.X509Certificates.X509Certificate certificate,
-            System.Security.Cryptography.X509Certificates.X509Chain chain,
-            System.Net.Security.SslPolicyErrors sslPolicyErrors)
-        {
-            return true;
-        }
-
-        #endregion
-
-        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
-        {
-            System.Diagnostics.Debug.WriteLine(e.ExceptionObject.ToString());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/util/GetOptBaseTest.cs b/lib/jabber-net/test/bedrock/util/GetOptBaseTest.cs
deleted file mode 100644
index 8891d71..0000000
--- a/lib/jabber-net/test/bedrock/util/GetOptBaseTest.cs
+++ /dev/null
@@ -1,323 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.util;
-namespace test.bedrock.util
-{
-    /// <summary>
-    ///    Summary description for GetOptBaseTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class GetOptTest
-    {
-        [Test] public void Test_Construct()
-        {
-            TestGetOpt t = new TestGetOpt(new string[] {"/f", "/bar", "baz"});
-            Assert.AreEqual(true, t.foo);
-            Assert.AreEqual("baz", t.bar);
-        }
-        [Test] public void Test_Usage()
-        {
-            TestGetOpt t = new TestGetOpt();
-            Console.WriteLine(t.Usage);
-        }
-        [Test] public void Test_Int()
-        {
-            TestGetOpt t = new TestGetOpt(new string[] {"/some", "1", "/other", "2", "blah"});
-            Assert.AreEqual(1, t.iSome);
-            Assert.AreEqual(2, t.other);
-            Assert.AreEqual("one", t.bar);
-        }
-        [Test] public void Test_Private()
-        {
-            // hrmph.  This should probably throw an error, if I don't have the right permissions.
-            TestGetOpt t = new TestGetOpt(new string[] {"/private", "one"});
-            Assert.AreEqual("one", t.baz);
-        }
-        [Test] public void Test_Args()
-        {
-            TestGetOpt t = new TestGetOpt(new string[] {"/some", "1", "/other", "2", "blah", "bloo", "boo"});
-            Assert.AreEqual(3, t.Args.Length);
-            Assert.AreEqual("blah", t.Args[0]);
-            Assert.AreEqual("bloo", t.Args[1]);
-            Assert.AreEqual("boo", t.Args[2]);
-        }
-        [Test] public void Test_Colon()
-        {
-            TestGetOpt t = new TestGetOpt(new string[] {"/some:1", "/other:2", "blah", "bloo", "boo"});
-            Assert.AreEqual(1, t.iSome);
-            Assert.AreEqual(2, t.other);
-            Assert.AreEqual(3, t.Args.Length);
-        }
-        [Test] public void Test_Bool()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"/a", "/b", "four", "one", "more"});
-            Assert.AreEqual(true,   go.a);
-            Assert.AreEqual(false,  go.b);
-            Assert.AreEqual(false,  go.c);
-            Assert.AreEqual(true,   go.d);
-            Assert.AreEqual(3,      go.Args.Length);
-            Assert.AreEqual("four", go.Args[0]);
-            Assert.AreEqual("one",  go.Args[1]);
-            Assert.AreEqual("more", go.Args[2]);
-        }
-        [Test] public void Test_DashBool()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-a", "-b", "four", "one", "more"});
-            Assert.AreEqual(true,   go.a);
-            Assert.AreEqual(false,  go.b);
-            Assert.AreEqual(false,  go.c);
-            Assert.AreEqual(true,   go.d);
-            Assert.AreEqual(3,      go.Args.Length);
-            Assert.AreEqual("four", go.Args[0]);
-            Assert.AreEqual("one",  go.Args[1]);
-            Assert.AreEqual("more", go.Args[2]);
-        }
-
-        [Test] public void Test_DashArgs()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-bar", "four", "-baz:one", "more"});
-            Assert.AreEqual("four", go.bar);
-            Assert.AreEqual("one",  go.baz);
-            Assert.AreEqual(null,   go.e);
-            Assert.AreEqual(1,      go.Args.Length);
-            Assert.AreEqual("more", go.Args[0]);
-        }
-
-        [Test] public void Test_Env()
-        {
-            TestGetOpt go = new TestGetOpt(null);
-
-            Assert.IsTrue(go.Args[0].StartsWith("test"));
-        }
-        [Test] public void Test_CaseInsensitive()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-BaZ:boo"});
-            Assert.AreEqual("boo", go.baz);
-        }
-        [Test] public void Test_Equals()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-baz=boo"});
-            Assert.AreEqual("boo", go.baz);
-        }
-        [Test] public void Test_DoubleColon()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"/baz:boo:bar"});
-            Assert.AreEqual("boo:bar", go.baz);
-        }
-        [Test] public void Test_DoubleSlash()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"/baz:boo/bar"});
-            Assert.AreEqual("boo/bar", go.baz);
-        }
-        [Test] public void Test_NunitProblem()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {@"/assembly:test.dll"});
-            Assert.AreEqual(@"test.dll", go.assembly);
-        }
-        [Test] public void Test_Enum()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-fb:bar"});
-            Assert.AreEqual(TestOptEnum.BAR, go.fb);
-        }
-        [Test] public void Test_Method()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-method"});
-            Assert.AreEqual("after", go.m);
-        }
-        [Test] public void Test_MethodParam()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-methodparam", "2"});
-            Assert.AreEqual(2, go.mp);
-            go = new TestGetOpt(new string[] {"-methodparams", "2", "after"});
-            Assert.AreEqual(2, go.m2);
-            Assert.AreEqual("after", go.mp2);
-        }
-        [Test] public void Test_NonChild()
-        {
-            NonChild nc = new NonChild();
-            GetOpt go = new GetOpt(nc);
-            go.Process(new string[] {"-test", "foo"});
-            Assert.AreEqual("foo", nc.test);
-        }
-        [Test] public void Test_Indexer()
-        {
-            NonChild nc = new NonChild();
-            GetOpt go = new GetOpt(nc);
-            go["test"] = "foo";
-            Assert.AreEqual("foo", nc.test);
-        }
-        [ExpectedException(typeof(FormatException))]
-        [Test] public void Test_BadInt()
-        {
-            TestGetOpt t = new TestGetOpt(new string[] {"/some", "one"});
-        }
-        [ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_Error()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"/broncos"});
-        }
-        [ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_DashError()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-broncos"});
-        }
-        [ExpectedException(typeof(IndexOutOfRangeException))]
-        [Test] public void Test_InsufficientError()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"/some"});
-        }
-        [ExpectedException(typeof(IndexOutOfRangeException))]
-        [Test] public void Test_DashInsufficientError()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-some"});
-        }
-        [ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_BadRequired()
-        {
-            BadOpt bo = new BadOpt();
-            bo.Process(new string[] {});
-        }
-        [Test] public void Test_Required()
-        {
-            ReqOpt bo = new ReqOpt(new string[] {"/req:here"});
-            Assert.AreEqual("here", bo.Req);
-        }
-        [ExpectedException(typeof(ArgumentException))]
-        [Test] public void Test_RequiredNotPassed()
-        {
-            ReqOpt bo = new ReqOpt(new string[] {});
-        }
-        [ExpectedException(typeof(IndexOutOfRangeException))]
-        [Test] public void Test_MethodNotEnoughParams()
-        {
-            TestGetOpt go = new TestGetOpt(new string[] {"-methodparams", "2"});
-        }
-    }
-    public enum TestOptEnum
-    {
-        FOO,
-        BAR
-    }
-
-    [SVN(@"$Id$")]
-    public class TestGetOpt : GetOpt
-    {
-        [CommandLine("nologo", Description="Command line argument for NUnit.")]
-        public bool nologo = false;
-        [CommandLine("f", Description = "Foo or not")]
-        public bool foo = false;
-        [CommandLine(Description = "What's in a bar?")]
-        public string bar = "one";
-        [CommandLine("private")]
-        private string m_baz = "default";
-        [CommandLine("baz", "A property test")]
-        public string baz
-        {
-            get
-            {
-                return m_baz;
-            }
-            set
-            {
-                m_baz = value;
-            }
-        }
-        public int iNone;
-        [CommandLine("some", Description = "Integer param")]
-        public int iSome = 0;
-        private int m_other = 3;
-        [CommandLine]
-        public int other
-        {
-            get
-            {
-                return m_other;
-            }
-            set
-            {
-                m_other = value;
-            }
-        }
-        [CommandLine]
-        public bool a = false;
-        [CommandLine]
-        public bool b = true;
-        [CommandLine]
-        public bool c = false;
-        [CommandLine]
-        public bool d = true;
-        [CommandLine]
-        public string e = null;
-
-        [CommandLine]
-        public TestOptEnum fb = TestOptEnum.FOO;
-
-        [CommandLine]
-        public string assembly;
-
-        public string m = "before";
-        public int mp = -1;
-
-        public int m2 = -1;
-        public string mp2 = "before";
-
-        [CommandLine]
-        public void method()
-        {
-            m = "after";
-        }
-        [CommandLine]
-        public void methodparam(int one)
-        {
-            mp = one;
-        }
-        [CommandLine]
-        public void methodparams(int one, string two)
-        {
-            m2 = one;
-            mp2 = two;
-        }
-        public TestGetOpt() : base() {}
-        public TestGetOpt(string[] args) : base(args) {}
-    }
-    public class  BadOpt : GetOpt
-    {
-        [CommandLine("bad", "A required parameter", true)]
-        public string Bad = "Bad";
-        public BadOpt() : base() {}
-        public BadOpt(string[] args) : base(args) {}
-    }
-    public class  ReqOpt : GetOpt
-    {
-        [CommandLine(Required = true)]
-        public string Req = null;
-        public ReqOpt() : base() {}
-        public ReqOpt(string[] args) : base(args) {}
-    }
-    public class NonChild
-    {
-        [CommandLine]
-        public string test = null;
-    }
-    public class TooManyParams : GetOpt
-    {
-        public int mp = -1;
-        public TooManyParams() : base() {}
-        public TooManyParams(string[] args) : base(args) {}
-    }
-}
diff --git a/lib/jabber-net/test/bedrock/util/VersionTest.cs b/lib/jabber-net/test/bedrock/util/VersionTest.cs
deleted file mode 100644
index e454c37..0000000
--- a/lib/jabber-net/test/bedrock/util/VersionTest.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.util;
-namespace test.bedrock.util
-{
-    /// <summary>
-    ///    Summary description for AssemblyXMLTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class VersionTest
-    {
-        [StarTeam("$" + "Header" + "$")]
-            private class vFoo
-        {
-
-        }
-        [StarTeam(Archive="$" + @"Header: C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs" + "$",
-             Author="$" + "Author: Joe Hildebrand" + "$",
-             DateString="02/12/2001 6:25:04 PM",
-             Revision="1")]
-            private class vInd
-        {
-
-        }
-        [StarTeam("$" + @"Header: C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs, 1.11, 02/12/2001 6:25:04 PM, Joe Hildebrand" + "$")]
-            private class vBar
-        {
-
-        }
-        [StarTeam("$" + @"Header: C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs, 11, 02/12/2001 6:25:04 PM, Joe Hildebrand" + "$")]
-            private class vBaz
-        {
-
-        }
-        [RCS("$" + @"Header: /u1/html/cvsroot/www.cyclic.com/RCS-html/info-ref.html,v 1.1 2001/02/12 18:25:04 kingdon Exp " + "$")]
-            private class RCSVer
-        {
-
-        }
-        [SourceSafe("$" + @"Header: /t.cs 1     2/12/01 6:25p Hildebzj " + "$")]
-            private class VssVer
-        {
-
-        }
-
-        [SVN("$" + @"Id: calc.c 148 2002-07-28 21:30:43Z sally " + "$")]
-        private class SvnVer
-        {
-
-        }
-
-
-        [Test] public void Test_Empty()
-        {
-            SourceVersionAttribute foo = SourceVersionAttribute.GetVersion(typeof(vFoo));
-            Assert.AreEqual(null,               foo.Revision, "Revision");
-            Assert.AreEqual(DateTime.MinValue,  foo.Date,     "Date");
-            Assert.AreEqual(null,               foo.Author,   "Date");
-            Assert.AreEqual(null,               foo.Version,  "Version");
-            Assert.AreEqual(null,               foo.Archive,  "Archive");
-        }
-        [Test] public void Test_Full()
-        {
-            SourceVersionAttribute bar = SourceVersionAttribute.GetVersion(typeof(vBar));
-            Assert.AreEqual("1.11",             bar.Revision);
-            Assert.AreEqual(
-                new DateTime(2001, 2, 12, 18, 25, 4),
-                bar.Date);
-            Assert.AreEqual("Joe Hildebrand",   bar.Author);
-            Assert.AreEqual(new Version(1, 11), bar.Version);
-            Assert.AreEqual(@"C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs", bar.Archive);
-        }
-        [Test] public void Test_Ind()
-        {
-            SourceVersionAttribute ind = SourceVersionAttribute.GetVersion(typeof(vInd));
-            Assert.AreEqual(
-                "$" + @"Header: C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs, 1, 02/12/2001 6:25:04 PM, Joe Hildebrand" + "$",
-                ind.ToString());
-        }
-        [Test] public void Test_PlainRev()
-        {
-            SourceVersionAttribute baz = SourceVersionAttribute.GetVersion(typeof(vBaz));
-            Assert.AreEqual("11",               baz.Revision);
-            Assert.AreEqual(
-                new DateTime(2001, 2, 12, 18, 25, 4),
-                baz.Date);
-            Assert.AreEqual("Joe Hildebrand",   baz.Author);
-            Assert.AreEqual(new Version(1, 11), baz.Version);
-            Assert.AreEqual(@"C:\Prj\Dognapper\Microsoft\Common\src\com.ilg.Util\Test\VersionTest.cs", baz.Archive);
-        }
-        [Test] public void Test_RCS()
-        {
-            RCSAttribute c = (RCSAttribute) SourceVersionAttribute.GetVersion(typeof(RCSVer));
-            Assert.AreEqual("1.1",               c.Revision);
-            Assert.AreEqual(
-                new DateTime(2001, 2, 12, 18, 25, 4),
-                c.Date);
-            Assert.AreEqual("kingdon",           c.Author);
-            Assert.AreEqual(new Version(1, 1),   c.Version);
-            Assert.AreEqual(@"/u1/html/cvsroot/www.cyclic.com/RCS-html/info-ref.html,v", c.Archive);
-            Assert.AreEqual("Exp",               c.State);
-        }
-        [Test] public void Test_VSS()
-        {
-            SourceSafeAttribute c = (SourceSafeAttribute) SourceVersionAttribute.GetVersion(typeof(VssVer));
-            Assert.AreEqual("1",                 c.Revision);
-            Assert.AreEqual(
-                new DateTime(2001, 2, 12, 18, 25, 0),
-                c.Date);
-            Assert.AreEqual("Hildebzj",          c.Author);
-            Assert.AreEqual(new Version(1, 1),   c.Version);
-            Assert.AreEqual(@"/t.cs",            c.Archive);
-        }
-
-        [Test] public void Test_GetAll()
-        {
-            SourceVersionCollection tv = SourceVersionAttribute.GetVersion();
-            Assert.IsTrue(tv["test.bedrock.util.VersionTest+vFoo"]   != null);
-            Assert.IsTrue(tv[typeof(vBar).FullName]   != null);
-            Assert.IsTrue(tv[typeof(vBaz)]   != null);
-            Assert.IsTrue(tv["test.bedrock.util.VersionTest+RCSVer"] != null);
-            Assert.IsTrue(tv["test.bedrock.util.VersionTest+VssVer"] != null);
-            Assert.IsTrue(tv["test.bedrock.util.VersionTest+SvnVer"] != null);
-            Assert.IsTrue(tv["test.bedrock.util.VersionTest+vBax"]   == null);
-            foreach (string c in tv)
-            {
-                //Console.WriteLine("<{0}>", c);
-                Assert.IsTrue(tv[c] != null);
-            }
-        }
-
-        [Test]
-        public void Test_SVN()
-        {
-            SVNAttribute c = (SVNAttribute)SourceVersionAttribute.GetVersion(typeof(SvnVer));
-            Assert.AreEqual("148", c.Revision);
-            Assert.AreEqual(
-                new DateTime(2002, 7, 28, 21, 30, 43),
-                c.Date);
-            Assert.AreEqual("sally", c.Author);
-            Assert.AreEqual(new Version(1, 148), c.Version);
-            Assert.AreEqual(@"calc.c", c.Archive);
-        }
-
-    }
-}
diff --git a/lib/jabber-net/test/jabber/JIDTest.cs b/lib/jabber-net/test/jabber/JIDTest.cs
deleted file mode 100644
index fb186b0..0000000
--- a/lib/jabber-net/test/jabber/JIDTest.cs
+++ /dev/null
@@ -1,367 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-using NUnit.Framework;
-using je = jabber.JIDFormatException;
-using jabber;
-
-namespace test.jabber
-{
-    /// <summary>
-    /// Summary description for JIDTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class JIDTest
-    {
-        [Test] public void Test_Create()
-        {
-            JID j = new JID("foo", "jabber.com", "there");
-            Assert.AreEqual("foo at jabber.com/there", j.ToString());
-            j = new JID(null, "jabber.com", null);
-            Assert.AreEqual("jabber.com", j.ToString());
-            j = new JID("foo", "jabber.com", null);
-            Assert.AreEqual("foo at jabber.com", j.ToString());
-            j = new JID(null, "jabber.com", "there");
-            Assert.AreEqual("jabber.com/there", j.ToString());
-        }
-        [Test] public void Test_Parse_1()
-        {
-            JID j = new JID("foo");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual(null, j.Resource);
-        }
-        [Test] public void Test_Parse_2()
-        {
-            JID j = new JID("foo/bar");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual("bar", j.Resource);
-        }
-        [Test] public void Test_Parse_3()
-        {
-            JID j = new JID("boo at foo");
-            Assert.AreEqual("boo", j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual(null, j.Resource);
-        }
-        [Test] public void Test_Parse_4()
-        {
-            JID j = new JID("boo at foo/bar");
-            Assert.AreEqual("boo", j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual("bar", j.Resource);
-        }
-        [Test] public void Test_Parse_5()
-        {
-            JID j = new JID("foo/bar at baz");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual("bar at baz", j.Resource);
-        }
-        [Test] public void Test_Parse_6()
-        {
-            JID j = new JID("boo at foo/bar at baz");
-            Assert.AreEqual("boo", j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual("bar at baz", j.Resource);
-        }
-        [Test] public void Test_Parse_7()
-        {
-            JID j = new JID("boo at foo/bar/baz");
-            Assert.AreEqual("boo", j.User);
-            Assert.AreEqual("foo", j.Server);
-            Assert.AreEqual("bar/baz", j.Resource);
-        }
-        [Test] public void Test_Parse_8()
-        {
-            JID j = new JID("boo/foo at bar@baz");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("boo", j.Server);
-            Assert.AreEqual("foo at bar@baz", j.Resource);
-        }
-        [Test] public void Test_Parse_9()
-        {
-            JID j = new JID("boo/foo at bar");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("boo", j.Server);
-            Assert.AreEqual("foo at bar", j.Resource);
-        }
-        [Test] public void Test_Parse_10()
-        {
-            JID j = new JID("boo/foo/bar");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("boo", j.Server);
-            Assert.AreEqual("foo/bar", j.Resource);
-        }
-        [Test] public void Test_Parse_11()
-        {
-            JID j = new JID("boo//foo");
-            Assert.AreEqual(null, j.User);
-            Assert.AreEqual("boo", j.Server);
-            Assert.AreEqual("/foo", j.Resource);
-        }
-        [Test] public void Test_EmptyResource()
-        {
-            try
-            {
-                JID j = new JID("boo/");
-                string u = j.User;
-                Assert.IsTrue(false);
-            }
-            catch (JIDFormatException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-        [Test] public void Test_EmptyResourceUser()
-        {
-            try
-            {
-                JID j = new JID("boo at foo/");
-                string u = j.User;
-                Assert.IsTrue(false);
-            }
-            catch (JIDFormatException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-
-        [Test] public void Test_NoHost()
-        {
-            try
-            {
-                JID j = new JID("foo@");
-                string u = j.User;
-                Assert.IsTrue(false);
-            }
-            catch (JIDFormatException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-        [Test] public void Test_AtAt()
-        {
-            try
-            {
-                JID j = new JID("boo@@foo");
-                string u = j.User;
-                Assert.IsTrue(false);
-            }
-            catch (JIDFormatException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-        [Test] public void Test_TwoAt()
-        {
-            try
-            {
-                JID j = new JID("boo at foo@bar");
-                string u = j.User;
-                Assert.IsTrue(false);
-            }
-            catch (JIDFormatException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-        [Test] public void Test_Compare_Equal()
-        {
-            JID j = new JID("foo at bar/baz");
-            Assert.AreEqual(0, j.CompareTo(j));
-            Assert.AreEqual(0, j.CompareTo(new JID("foo at bar/baz")));
-            j = new JID("foo at bar");
-            Assert.AreEqual(0, j.CompareTo(j));
-            Assert.AreEqual(0, j.CompareTo(new JID("foo at bar")));
-            Assert.IsTrue(j == new JID("foo at bar"));
-            Assert.IsTrue(j == new JID("foo at BAR"));
-            Assert.IsTrue(j == new JID("FOO at BAR"));
-            Assert.IsTrue(j == new JID("FOO at bar"));
-            Assert.AreEqual(new JID("FOO at bar").GetHashCode(), j.GetHashCode());
-            j = new JID("bar");
-            Assert.AreEqual(0, j.CompareTo(j));
-            Assert.AreEqual(0, j.CompareTo(new JID("bar")));
-            j = new JID("foo/bar");
-            Assert.AreEqual(0, j.CompareTo(j));
-            Assert.AreEqual(0, j.CompareTo(new JID("foo/bar")));
-            Assert.AreEqual(true, j >= new JID("foo/bar"));
-            Assert.AreEqual(true, j <= new JID("foo/bar"));
-        }
-        [Test] public void Test_Compare_Less()
-        {
-            JID j = new JID("foo at bar/baz");
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bas/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("fop at bar/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bar/bazz")));
-            j = new JID("foo at bar");
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bas/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bas")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("fop at bar/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("fop at bar")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bar/baz")));
-            j = new JID("bar");
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bar/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("foo at bar")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("bas")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("bas/baz")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("bar/baz")));
-            Assert.AreEqual(true, j < new JID("foo at bar/baz"));
-            Assert.AreEqual(true, j <= new JID("foo at bar/baz"));
-        }
-        [Test] public void Test_Compare_Greater()
-        {
-            JID j = new JID("foo at bar/baz");
-            Assert.AreEqual(1, j.CompareTo(new JID("foo at bap/baz")));
-            Assert.AreEqual(1, j.CompareTo(new JID("fon at bar/baz")));
-            Assert.AreEqual(1, j.CompareTo(new JID("foo at bar/bay")));
-            Assert.AreEqual(1, j.CompareTo(new JID("foo at bar")));
-            Assert.AreEqual(1, j.CompareTo(new JID("bar")));
-            Assert.AreEqual(1, j.CompareTo(new JID("bar/baz")));
-            j = new JID("foo at bar");
-            Assert.AreEqual(1, j.CompareTo(new JID("foo at bap/baz")));
-            Assert.AreEqual(1, j.CompareTo(new JID("fon at bar/baz")));
-            Assert.AreEqual(1, j.CompareTo(new JID("bar")));
-            Assert.AreEqual(1, j.CompareTo(new JID("bar/baz")));
-            Assert.AreEqual(true, j > new JID("foo at bap/baz"));
-            Assert.AreEqual(true, j >= new JID("foo at bap/baz"));
-            // /me runs out of interest.
-        }
-        [Test] public void Test_BadCompare()
-        {
-            try
-            {
-                JID j = new JID("foo at boo/bar");
-                j.CompareTo("foo at boo/bar");
-                Assert.IsTrue(false);
-            }
-            catch (ArgumentException)
-            {
-                Assert.IsTrue(true);
-            }
-            catch (Exception)
-            {
-                Assert.IsTrue(false);
-            }
-        }
-        [Test] public void Test_Insensitive()
-        {
-            JID j = new JID("foo at boo/bar");
-            Assert.AreEqual(0, j.CompareTo(new JID("foo at BOO/bar")));
-            Assert.AreEqual(0, j.CompareTo(new JID("FOO at boo/bar")));
-            Assert.AreEqual(0, j.CompareTo(new JID("FOO at BOO/bar")));
-            Assert.AreEqual(-1, j.CompareTo(new JID("FOO at BOO/BAR")));
-        }
-
-        [Test] public void Test_Config()
-        {
-            JID j = new JID("config at -internal");
-            Assert.AreEqual("config", j.User);
-            Assert.AreEqual("-internal", j.Server);
-            Assert.AreEqual(null, j.Resource);
-        }
-
-        [Test] public void Test_Numeric()
-        {
-            JID j = new JID("support", "conference.192.168.32.109", "bob");
-            Assert.AreEqual("conference.192.168.32.109", j.Server);
-        }
-
-        [Test]
-        public void Test_Escape()
-        {
-            JID j = JID.Escape("d'artagnan", "gascon.fr", "elder");
-            Assert.AreEqual(@"d\27artagnan at gascon.fr/elder", j.ToString());
-            j = JID.Escape("space cadet", "example.com", null);
-            Assert.AreEqual(@"space\20cadet at example.com", j.ToString());
-            j = JID.Escape("call me \"ishmael\"", "example.com", null);
-            Assert.AreEqual(@"call\20me\20\22ishmael\22 at example.com", j.ToString());
-            j = JID.Escape("at&t guy", "example.com", null);
-            Assert.AreEqual(@"at\26t\20guy at example.com", j.ToString());
-            j = JID.Escape("/.fanboy", "example.com", null);
-            Assert.AreEqual(@"\2f.fanboy at example.com", j.ToString());
-            j = JID.Escape("::foo::", "example.com", null);
-            Assert.AreEqual(@"\3a\3afoo\3a\3a at example.com", j.ToString());
-            j = JID.Escape("<foo>", "example.com", null);
-            Assert.AreEqual(@"\3cfoo\3e at example.com", j.ToString());
-            j = JID.Escape("user at host", "example.com", null);
-            Assert.AreEqual(@"user\40host at example.com", j.ToString());
-            j = JID.Escape(@"c:\net", "example.com", null);
-            Assert.AreEqual(@"c\3a\5cnet at example.com", j.ToString());
-            j = JID.Escape(@"c:\\net", "example.com", null);
-            Assert.AreEqual(@"c\3a\5c\5cnet at example.com", j.ToString());
-            j = JID.Escape(@"c:\cool stuff", "example.com", null);
-            Assert.AreEqual(@"c\3a\5ccool\20stuff at example.com", j.ToString());
-            j = JID.Escape(@"c:\5commas", "example.com", null);
-            Assert.AreEqual(@"c\3a\5c5commas at example.com", j.ToString());
-        }
-
-        [Test]
-        public void Test_Unescape()
-        {
-            string u = new JID(@"d\27artagnan at gascon.fr/elder").Unescape();
-            Assert.AreEqual("d'artagnan", u);
-            u = new JID(@"space\20cadet at example.com").Unescape();
-            Assert.AreEqual("space cadet", u);
-            u = new JID(@"call\20me\20\22ishmael\22 at example.com").Unescape();
-            Assert.AreEqual("call me \"ishmael\"", u);
-            u = new JID(@"at\26t\20guy at example.com").Unescape();
-            Assert.AreEqual("at&t guy", u);
-            u = new JID(@"\2f.fanboy at example.com").Unescape();
-            Assert.AreEqual("/.fanboy", u);
-            u = new JID(@"\3a\3afoo\3a\3a at example.com").Unescape();
-            Assert.AreEqual("::foo::", u);
-            u = new JID(@"\3cfoo\3e at example.com").Unescape();
-            Assert.AreEqual("<foo>", u);
-            u = new JID(@"user\40host at example.com").Unescape();
-            Assert.AreEqual("user at host", u);
-            u = new JID(@"c\3a\5cnet at example.com").Unescape();
-            Assert.AreEqual(@"c:\net", u);
-            u = new JID(@"c\3a\5c\5cnet at example.com").Unescape();
-            Assert.AreEqual(@"c:\\net", u);
-            u = new JID(@"c\3a\5ccool\20stuff at example.com").Unescape();
-            Assert.AreEqual(@"c:\cool stuff", u);
-            u = new JID(@"c\3a\5c5commas at example.com").Unescape();
-            Assert.AreEqual(@"c:\5commas", u);
-            u = new JID(@"\c0 at example.com").Unescape();
-            Assert.AreEqual(@"\c0", u);
-            u = new JID(@"\30 at example.com").Unescape();
-            Assert.AreEqual(@"\30", u);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/client/PresenceManagerTest.cs b/lib/jabber-net/test/jabber/client/PresenceManagerTest.cs
deleted file mode 100644
index ecff110..0000000
--- a/lib/jabber-net/test/jabber/client/PresenceManagerTest.cs
+++ /dev/null
@@ -1,295 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.client;
-using jabber.protocol.client;
-using jabber.protocol.x;
-using jabber.connection;
-using jabber.protocol;
-using bedrock.collections;
-using jabber.protocol.iq;
-
-namespace test.jabber.client1 // TODO: Client1 due to a bug in NUnit.
-{
-    /// <summary>
-    /// Summary description for PPDP.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class PresenceManagerTest
-    {
-        XmlDocument doc = new XmlDocument();
-
-        JID bare = "foo at bar";
-        JID baz  = "foo at bar/baz";
-        JID boo  = "foo at bar/boo";
-
-
-        [Test]
-        public void Test_Create()
-        {
-            PresenceManager pp = new PresenceManager();
-            Assert.AreEqual("jabber.client.PresenceManager", pp.GetType().FullName);
-        }
-        [Test]
-        public void TestAdd()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("foo", "bar", "baz");
-            pres.From = f;
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar/baz", pp[f].From.ToString());
-            f.Resource = null;
-            Assert.AreEqual("foo at bar/baz", pp[f].From.ToString());
-
-            pres = new Presence(doc);
-            pres.Status = "wandering";
-            pres.From = new JID("foo", "bar", "baz");
-            pp.AddPresence(pres);
-            Assert.AreEqual("wandering", pp[f].Status);
-        }
-        [Test]
-        public void TestRetrieve()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("foo", "bar", "baz");
-            pres.From = f;
-            pres.Priority = "0";
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar/baz", pp[f.Bare].From.ToString());
-
-            pres = new Presence(doc);
-            f = new JID("foo", "bar", "bay");
-            pres.From = f;
-            pres.Priority = "1";
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar/bay", pp[f.Bare].From.ToString());
-
-            pres = new Presence(doc);
-            pres.From = f;
-            pres.Type = PresenceType.unavailable;
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar/baz", pp[f.Bare].From.ToString());
-        }
-        [Test]
-        public void TestUserHost()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("foo", "bar", null);
-            pres.From = f;
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar", pp[f.Bare].From.ToString());
-        }
-        [Test]
-        public void TestHost()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("bar");
-            pres.From = f;
-            pp.AddPresence(pres);
-            Assert.AreEqual("bar", pp[f.Bare].From.ToString());
-        }
-        [Test]
-        public void TestHostResource()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID(null, "bar", "baz");
-            pres.From = f;
-            pp.AddPresence(pres);
-            Assert.AreEqual("bar/baz", pp[f.Bare].From.ToString());
-        }
-        [Test]
-        public void TestRemove()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("foo", "bar", "baz");
-            pres.From = f;
-            pres.Status = "Working";
-            pres.Priority = "1";
-            pp.AddPresence(pres);
-            Assert.AreEqual("foo at bar/baz", pp[f].From.ToString());
-            f.Resource = null;
-            Assert.AreEqual("foo at bar/baz", pp[f].From.ToString());
-
-            pres = new Presence(doc);
-            pres.Status = "wandering";
-            pres.From = new JID("foo", "bar", "boo");
-            pp.AddPresence(pres);
-            Assert.AreEqual("Working", pp[f].Status);
-            pres.Priority = "2";
-            pp.AddPresence(pres);
-            Assert.AreEqual("wandering", pp[f].Status);
-            pres.Type = PresenceType.unavailable;
-            pp.AddPresence(pres);
-            Assert.AreEqual("Working", pp[f].Status);
-        }
-        [Test]
-        public void TestNumeric()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            JID f = new JID("support", "conference.192.168.32.109", "bob");
-            pres.From = f;
-            pres.Status = "Working";
-            pp.AddPresence(pres);
-            Assert.AreEqual("support at conference.192.168.32.109/bob", pp[f].From.ToString());
-            f.Resource = null;
-            Assert.AreEqual("support at conference.192.168.32.109/bob", pp[f].From.ToString());
-        }
-
-        [Test]
-        public void TestGetAll()
-        {
-            PresenceManager pp = new PresenceManager();
-
-            Presence pres = new Presence(doc);
-            pres.From = baz;
-            pp.AddPresence(pres);
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pp.AddPresence(pres);
-
-            Presence[] pa = pp.GetAll(bare);
-            Assert.AreEqual(2, pa.Length);
-            Assert.AreEqual(pa[0].GetType(), typeof(Presence));
-        }
-
-        [Test]
-        public void TestNewPrimaryAlgorithm()
-        {
-            PresenceManager pp = new PresenceManager();
-
-            Presence pres = new Presence(doc);
-            pres.From = baz;
-            pres.IntPriority = 1;
-            pp.AddPresence(pres);
-            Assert.AreEqual(1, pp[bare].IntPriority);
-            Assert.AreEqual(baz, pp[bare].From);
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pres.IntPriority = 2;
-            pp.AddPresence(pres);
-            // duh.
-            Assert.AreEqual(2, pp[bare].IntPriority);
-            Assert.AreEqual(boo, pp[bare].From);
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pres.IntPriority = 0;
-            pp.AddPresence(pres);
-            Assert.AreEqual(1, pp[bare].IntPriority);
-            Assert.AreEqual(baz, pp[bare].From); // ooo
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pres.Type = PresenceType.unavailable;
-            pp.AddPresence(pres);
-            Assert.AreEqual(1, pp[bare].IntPriority);
-            Assert.AreEqual(baz, pp[bare].From);
-
-            pres = new Presence(doc);
-            pres.From = baz;
-            pres.IntPriority = -1;
-            pp.AddPresence(pres);
-            Assert.AreEqual(null, pp[bare]);
-
-            pres = new Presence(doc);
-            pres.From = baz;
-            pres.Type = PresenceType.unavailable;
-            pp.AddPresence(pres);
-            Assert.AreEqual(0, pp.GetAll(bare).Length);
-        }
-
-        [Test]
-        public void TestComparisons()
-        {
-            PresenceManager pp = new PresenceManager();
-
-            Presence pres = new Presence(doc);
-            pres.From = baz;
-            pres.IntPriority = -1;
-            pp.AddPresence(pres);
-            Assert.AreEqual(null, pp[bare]);
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pres.IntPriority = 0;
-            pres.Show = "away";
-            pp.AddPresence(pres);
-            Assert.AreEqual(boo, pp[bare].From);
-
-            pres = new Presence(doc);
-            pres.From = baz;
-            pres.IntPriority = 0;
-            pres.Show = "xa";
-            pp.AddPresence(pres);
-            Assert.AreEqual(boo, pp[bare].From);
-
-            pres = new Presence(doc);
-            pres.From = boo;
-            pres.IntPriority = 1;
-            pp.AddPresence(pres);
-            Assert.AreEqual(boo, pp[bare].From);
-        }
-
-        [Test]
-        public void TestCaps()
-        {
-            PresenceManager pp = new PresenceManager();
-            Presence pres = new Presence(doc);
-            pres.From = baz;
-
-            CapsManager cm = new CapsManager();
-            pp.CapsManager = cm;
-
-            cm.FileName = "caps.xml";
-            cm.Node = "http://cursive.net/clients/PresenceManagerTest";
-            cm.AddFeature(URI.DISCO_INFO);
-            cm.AddFeature(URI.DELAY);
-            cm.AddIdentity("client", "pc", null, "Presence Manager Test");
-
-            DiscoInfo info = new DiscoInfo(doc);
-            cm.FillInInfo(info);
-            cm[cm.Ver] = info;
-
-            pres.AddChild(cm.GetCaps(pres.OwnerDocument));
-            pp.AddPresence(pres);
-
-            JID dij = pp.GetFeatureJID(bare, URI.DISCO_INFO);
-            Assert.AreEqual(baz, dij);
-            dij = pp.GetFeatureJID(bare, URI.DISCO_ITEMS);
-            Assert.IsNull(dij);
-            dij = pp.GetFeatureJID(baz, URI.DISCO_INFO);
-            Assert.AreEqual(baz, dij);
-
-            StringSet fs = pp.GetFeatures(bare);
-            Assert.IsTrue(fs[URI.DISCO_INFO]);
-            Assert.IsFalse(fs[URI.DISCO_ITEMS]);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/client/RosterManagerTest.cs b/lib/jabber-net/test/jabber/client/RosterManagerTest.cs
deleted file mode 100644
index 2f63e46..0000000
--- a/lib/jabber-net/test/jabber/client/RosterManagerTest.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.client;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace test.jabber.client1 // TODO: Client1 due to a bug in NUnit.
-{
-    /// <summary>
-    /// Summary description for PPDP.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class RosterManagerTest
-    {
-        XmlDocument doc = new XmlDocument();
-
-        [Test] public void Test_Create()
-        {
-            RosterManager rm = new RosterManager();
-            Assert.AreEqual("jabber.client.RosterManager", rm.GetType().FullName);
-        }
-        public void TestAdd()
-        {
-            RosterManager rm = new RosterManager();
-
-            RosterIQ riq = new RosterIQ(doc);
-            riq.Type = IQType.set;
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = new JID("foo", "bar", null);
-            i.Nickname = "FOO";
-            i.Subscription = Subscription.both;
-
-            rm.AddRoster(riq);
-            Assert.AreEqual(Subscription.both, rm["foo at bar"].Subscription);
-            Assert.AreEqual("FOO", rm["foo at bar"].Nickname);
-
-            riq = new RosterIQ(doc);
-            riq.Type = IQType.set;
-            r = riq.Instruction;
-            i = r.AddItem();
-            i.JID = new JID("foo", "bar", null);
-            i.Nickname = "BAR";
-            i.Subscription = Subscription.to;
-            rm.AddRoster(riq);
-            Assert.AreEqual(Subscription.to, rm["foo at bar"].Subscription);
-            Assert.AreEqual("BAR", rm["foo at bar"].Nickname);
-        }
-        public void TestNumeric()
-        {
-            RosterManager rm = new RosterManager();
-
-            RosterIQ riq = new RosterIQ(doc);
-            riq.Type = IQType.set;
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = new JID("support", "conference.192.168.32.109", null);
-            i.Nickname = "FOO";
-            i.Subscription = Subscription.both;
-
-            rm.AddRoster(riq);
-            Assert.AreEqual(Subscription.both, rm["support at conference.192.168.32.109"].Subscription);
-            Assert.AreEqual("FOO", rm["support at conference.192.168.32.109"].Nickname);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/CapsManagerTest.cs b/lib/jabber-net/test/jabber/connection/CapsManagerTest.cs
deleted file mode 100644
index 37470f3..0000000
--- a/lib/jabber-net/test/jabber/connection/CapsManagerTest.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Xml;
-
-using bedrock.util;
-
-using jabber;
-using jabber.client;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using jabber.protocol.x;
-
-using NUnit.Framework;
-using Rhino.Mocks;
-using Rhino.Mocks.Interfaces;
-
-namespace test.jabber.connection
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class CapsManagerTest
-    {
-        private MockRepository mocks;
-
-        private JabberClient stream;
-        private XmlDocument doc;
-
-        private readonly JID TO_JID = new JID("user1 at test.com");
-        private readonly JID FROM_JID = new JID("user2 at test.com");
-        
-        private const string TEST_ID = "TEST_ID";
-        
-        private const string NODE = "http://jm.jabber.com/caps";
-        private const int PRIORITY = 2;
-        private const string STATUS = "Ready to Chat";
-
-        [SetUp]
-        public void Setup()
-        {
-            mocks = new MockRepository();
-
-            stream = mocks.DynamicMock<JabberClient>();
-
-            doc = new XmlDocument();
-        }
-
-        [Test]
-        public void OnBeforePresenceOutTest()
-        {
-            IEventRaiser presHandler;
-            using (mocks.Record())
-            {
-                stream.OnBeforePresenceOut += null;
-                presHandler = LastCall.IgnoreArguments().GetEventRaiser();
-            }
-
-            using (mocks.Playback())
-            {
-                CapsManager cm = new CapsManager();
-                cm.Stream = stream;
-                cm.Node = NODE;
-
-                Presence packet = CreatePresencePacket();
-                presHandler.Raise(new object[] { null, packet });
-
-                string original = packet.OuterXml.Replace(" ", "");
-                string comparison = GetPresenceWithCaps(cm.Ver).Replace(" ", "");
-                Assert.IsTrue(original == comparison);
-            }
-        }
-
-        private delegate T Func<A0, T>(A0 arg0);
-
-        [Test]
-        public void IqRequestTest()
-        {
-            string nodever = "";
-
-            IEventRaiser iqEvent;
-            using (mocks.Record())
-            {
-                stream.OnIQ += null;
-                iqEvent = LastCall.IgnoreArguments().GetEventRaiser();
-
-                Expect.Call(stream.Document).Return(doc);
-                stream.Write((XmlElement)null);
-                LastCall.Callback((Func<XmlElement, bool>)
-                    delegate(XmlElement arg0)
-                        {
-                            string original = arg0.OuterXml.Replace(" ", "");
-                            string comparison = GetIQResponse(nodever).Replace(" ", "");
-                            return original == comparison;
-                        });
-            }
-
-            using (mocks.Playback())
-            {
-                CapsManager cm = new CapsManager();
-                cm.Stream = stream;
-                cm.Node = NODE;
-
-                nodever = cm.NodeVer;
-
-                iqEvent.Raise(new object[] { null, CreateIqRequest() });
-            }
-        }
-
-        private string GetIQResponse(string nodever)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"result\" from=\"{1}\" to=\"{2}\">" +
-                      "<query xmlns=\"{3}\" node=\"{4}\"/>" +
-                    "</iq>",
-                    TEST_ID, TO_JID, FROM_JID, URI.DISCO_INFO, nodever);
-        }
-
-        private IQ CreateIqRequest()
-        {
-            IQ iq = new IQ(doc);
-            iq.To = TO_JID;
-            iq.From = FROM_JID;
-            iq.Type = IQType.get;
-            iq.ID = TEST_ID;
-
-            DiscoInfo info = new DiscoInfo(doc);
-            info.SetAttribute("xmlns", URI.DISCO_INFO);
-            iq.Query = info;
-
-            return iq;
-        }
-
-        private static string GetPresenceWithCaps(string ver)
-        {
-            return
-                string.Format(
-                    "<presence>" +
-                      "<priority>{0}</priority>" +
-                      "<status>{1}</status>" +
-                      "<c ver=\"{2}\"" +
-                         "node=\"{3}\"" +
-                         "hash=\"sha-1\"" +
-                         "xmlns=\"{4}\"/>" +
-                    "</presence>",
-                    PRIORITY, STATUS, ver, NODE, URI.CAPS, URI.CLIENT);
-        }
-
-        private Presence CreatePresencePacket()
-        {
-            /*
-            <presence>
-              <priority>2</priority>
-              <status>Ready to Chat</status>
-            </presence>"
-            */
-
-            Presence packet = new Presence(doc);
-            packet.IntPriority = PRIORITY;
-            packet.Status = STATUS;
-
-            return packet;
-        }
-
-        [Test]
-        public void SimpleGenerationExample()
-        {
-            CapsManager cm = new CapsManager();
-            cm.AddIdentity("client", "pc", null, "Exodus 0.9.1");
-            cm.AddFeature("http://jabber.org/protocol/muc");
-            cm.AddFeature("http://jabber.org/protocol/disco#info");
-            cm.AddFeature("http://jabber.org/protocol/disco#items");
-            Assert.AreEqual("SrFo9ar2CCk2EnOH4q4QANeuxLQ=", cm.Ver);
-        }
-
-        [Test]
-        public void ComplexGenerationExample()
-        {
-
-            XmlDocument doc = new XmlDocument();
-            doc.LoadXml("<book xml:lang='en'/>");
-            XmlElement book = doc.DocumentElement;
-            foreach (XmlAttribute attr in book.Attributes)
-            {
-                System.Console.WriteLine(attr.Name);
-            }
-
-            XmlElement root = doc.DocumentElement;
-
-            DiscoInfo info = new DiscoInfo(doc);
-            info.AddFeature("http://jabber.org/protocol/muc");
-            info.AddFeature("http://jabber.org/protocol/disco#info");
-            info.AddFeature("http://jabber.org/protocol/disco#items");
-            info.AddIdentity("client", "pc", "Psi 0.9.1", "en");
-            info.AddIdentity("client", "pc", "\u03a8 0.9.1", "el");
-            Data x = info.CreateExtension();
-            x.FormType = "urn:xmpp:dataforms:softwareinfo";
-            x.AddField("ip_version").Vals = new string[] { "ipv4", "ipv6" };
-            x.AddField("os").Val = "Mac";
-            x.AddField("os_version").Val = "10.5.1";
-            x.AddField("software").Val = "Psi";
-            x.AddField("software_version").Val = "0.11";
-
-            DiscoNode dn = new DiscoNode(new JID(null, "placeholder", null), null);
-            dn.AddInfo(info);
-
-            CapsManager cm = new CapsManager(dn);
-            Assert.AreEqual("8lu+88MRxmKM7yO3MEzY7YmTsWs=", cm.Ver);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/ConferenceManagerTest.cs b/lib/jabber-net/test/jabber/connection/ConferenceManagerTest.cs
deleted file mode 100644
index 20b08cf..0000000
--- a/lib/jabber-net/test/jabber/connection/ConferenceManagerTest.cs
+++ /dev/null
@@ -1,438 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-using System.Xml;
-using bedrock.util;
-
-using jabber;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-using NUnit.Framework;
-using Rhino.Mocks;
-using Rhino.Mocks.Interfaces;
-
-
-namespace test.jabber.connection
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class ConferenceManagerTest
-    {
-        private MockRepository mocks;
-        private ConferenceManager cm;
-        private XmppStream stream;
-        private IIQTracker tracker;
-
-        private XmlDocument doc;
-
-        private readonly JID jid = new JID("room", "conference.test.com", "nick");
-
-        [SetUp]
-        public void setup()
-        {
-            mocks = new MockRepository();
-            stream = mocks.DynamicMock<XmppStream>();
-            tracker = mocks.DynamicMock<IIQTracker>();
-            cm = null;
-
-            doc = new XmlDocument();
-        }
-
-        [Test]
-        public void GetRoomTest()
-        {
-            Room test = CreateRoomPlayback(false, delegate { return null; });
-            Assert.IsNotNull(test);
-        }
-
-        [Test]
-        public void HasRoomTest()
-        {
-            cm = new ConferenceManager();
-            cm.Stream = stream;
-
-            bool roomExists = cm.HasRoom(jid);
-            Assert.IsFalse(roomExists);
-
-            cm.GetRoom(jid);
-            roomExists = cm.HasRoom(jid);
-            Assert.IsTrue(roomExists);
-        }
-
-        [Test]
-        public void RemoveRoomTest()
-        {
-            cm = new ConferenceManager();
-            cm.Stream = stream;
-
-            cm.GetRoom(jid);
-            bool roomExists = cm.HasRoom(jid);
-            Assert.IsTrue(roomExists);
-
-            cm.RemoveRoom(jid);
-            roomExists = cm.HasRoom(jid);
-            Assert.IsFalse(roomExists);
-        }
-
-        private delegate T Func<A0, T>(A0 arg0);
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomJoinTest()
-        {
-            using (mocks.Record())
-            {
-                CreateJoinExpected(CreateJoinResponsePacket);
-            }
-
-            using (mocks.Playback())
-            {
-                CreateRoomPlayback(true, delegate { return null; });
-            }
-        }
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomJoinDefaultConfigTest()
-        {
-            RoomConfigTest(true);
-        }
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomJoinGetConfigTest()
-        {
-            RoomConfigTest(false);
-        }
-
-        private void RoomConfigTest(bool defaultConfig)
-        {
-            using (mocks.Record())
-            {
-                CreateJoinExpected(CreateJoinNeedConfigResponsePacket);
-
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string config = defaultConfig ? GetDefaultConfigPacket(id) :
-                            GetRetrieveConfigPacket(id);
-                        return iq.OuterXml.Replace(" ", "") == config.Replace(" ", "");
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                CreateRoomPlayback(
-                    true, delegate(Room arg0)
-                              {
-                                  arg0.DefaultConfig = defaultConfig;
-                                  arg0.OnRoomConfig += delegate { return null; };
-                                  return arg0;
-                              });
-            }
-        }
-
-        private string GetRetrieveConfigPacket(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"get\" to=\"{1}\">" +
-                        "<query xmlns=\"{2}\"/>" +
-                    "</iq>",
-                    id, jid.Bare, URI.MUC_OWNER);
-        }
-
-        private string GetDefaultConfigPacket(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"set\" to=\"{1}\">" +
-                        "<query xmlns=\"{2}\">" +
-                            "<x type=\"submit\" xmlns=\"{3}\"/>" +
-                        "</query>" +
-                    "</iq>",
-                    id, jid.Bare, URI.MUC_OWNER, URI.XDATA);
-        }
-
-        private delegate T Func<A0, A1, A2, T>(A0 arg0, A1 arg1, A2 arg2);
-
-        private void SetupTrackerBeginIq(Func<IQ, IqCB, object, bool> func)
-        {
-            Expect.Call(stream.Tracker).Return(tracker);
-            tracker.BeginIQ(null, null, null);
-            LastCall.Callback(func);
-        }
-
-        private XmlElement CreateJoinNeedConfigResponsePacket(XmlElement elem)
-        {
-            RoomStatus[] statuses = new RoomStatus[] { RoomStatus.CREATED, RoomStatus.SELF };
-
-            return CreateJoinPresence(elem, statuses);
-        }
-
-        private XmlElement CreateJoinResponsePacket(XmlElement elem)
-        {
-            return CreateJoinPresence(elem, new RoomStatus[] { RoomStatus.SELF });
-        }
-
-        private XmlElement CreateJoinPresence(XmlElement elem, RoomStatus[] statuses)
-        {
-            XmlDocument myDoc = new XmlDocument();
-
-            RoomPresence presence = new RoomPresence(myDoc, jid);
-            presence.RemoveAll();
-            presence.From = elem.GetAttribute("to");
-
-            UserX xElem = new UserX(myDoc);
-            presence.AppendChild(xElem);
-
-            xElem.Status = statuses;
-
-            return presence;
-        }
-
-        private const string MESSAGE = "TestMessage";
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomMessageTest()
-        {
-            SendMessage(true);
-        }
-
-        [Test]
-        [ExpectedException(typeof(InvalidOperationException))]
-        public void RoomMessageNoJoinTest()
-        {
-            SendMessage(false);
-        }
-
-        private void SendMessage(bool shouldJoinRoom)
-        {
-            using (mocks.Record())
-            {
-                CreateJoinExpected(CreateJoinResponsePacket);
-
-                Expect.Call(stream.Document).Return(doc);
-                stream.Write((XmlElement)null);
-                LastCall.Callback((Func<XmlElement, bool>)
-                                  delegate(XmlElement elem)
-                                  {
-                                      string id = elem.GetAttribute("id");
-                                      string original = elem.OuterXml;
-                                      return original.Replace(" ", "") == GetRoomMessage(id).Replace(" ", "");
-                                  });
-            }
-
-            using (mocks.Playback())
-            {
-                Room testRoom = CreateRoomPlayback(shouldJoinRoom, delegate { return null; });
-                testRoom.PublicMessage(MESSAGE);
-            }
-        }
-
-        private Room CreateRoomPlayback(bool joinRoom, Func<Room, Room> alterRoom)
-        {
-            cm = new ConferenceManager();
-            cm.Stream = stream;
-
-            Room testRoom = cm.GetRoom(jid);
-            alterRoom(testRoom);
-            if (joinRoom)
-            {
-                testRoom.Join();
-            }
-
-            return testRoom;
-        }
-
-        private void CreateJoinExpected(Func<XmlElement, XmlElement> sendPresence)
-        {
-            Expect.Call(stream.Document).Return(doc);
-
-            stream.OnProtocol += null;
-            IEventRaiser onProtocol = LastCall.IgnoreArguments().GetEventRaiser();
-
-            stream.Write((XmlElement)null);
-            LastCall.Callback((Func<XmlElement, bool>)
-                              delegate(XmlElement elem)
-                              {
-                                  onProtocol.Raise(new object[] { null, sendPresence(elem) });
-
-                                  string original = elem.OuterXml;
-                                  return original.Replace(" ", "") ==
-                                         GetJoinPresence().Replace(" ", "");
-                              });
-        }
-
-        private const string TO_NICK = "TestNick";
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomPrivateMessageTest()
-        {
-            SendPrivateMessage(true);
-        }
-
-        [Test]
-        [ExpectedException(typeof(InvalidOperationException))]
-        public void RoomPrivateMessageNoJoinTest()
-        {
-            SendPrivateMessage(false);
-        }
-
-        private void SendPrivateMessage(bool shouldJoin)
-        {
-            using (mocks.Record())
-            {
-                CreateJoinExpected(CreateJoinResponsePacket);
-
-                Expect.Call(stream.Document).Return(doc);
-                stream.Write((XmlElement)null);
-                LastCall.Callback((Func<XmlElement, bool>)
-                                  delegate(XmlElement elem)
-                                  {
-                                      string id = elem.GetAttribute("id");
-                                      string original = elem.OuterXml;
-                                      return original.Replace(" ", "") ==
-                                             GetRoomPrivateMessage(id).Replace(" ", "");
-                                  });
-            }
-
-            using (mocks.Playback())
-            {
-                Room testRoom = CreateRoomPlayback(shouldJoin, delegate { return null; });
-                testRoom.PrivateMessage(TO_NICK, MESSAGE);
-            }
-        }
-
-        private const string REASON = "TestReason";
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomLeaveTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                stream.Write((XmlElement)null);
-                LastCall.Callback((Func<XmlElement, bool>)
-                    delegate(XmlElement elem)
-                    {
-                        string original = elem.OuterXml;
-                        return original.Replace(" ", "") ==
-                            GetLeavePresence().Replace(" ", "");
-                    });
-                stream.OnProtocol += null;
-                LastCall.IgnoreArguments();
-            }
-
-            using (mocks.Playback())
-            {
-                Room testRoom = CreateRoomPlayback(false, delegate { return null; });
-                testRoom.Leave(REASON);
-            }
-        }
-
-        [Test]
-        //[Ignore("TODO: deal with cm calling OnProtocol +=.")]
-        public void RoomFinishLeaveTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-
-                stream.OnProtocol += null;
-                IEventRaiser onProtocol = LastCall.IgnoreArguments().GetEventRaiser();
-
-                stream.Write((XmlElement)null);
-                LastCall.Callback((Func<XmlElement, bool>)
-                    delegate(XmlElement elem)
-                    {
-                        onProtocol.Raise(new object[] { null, CreateUnavailPacket(elem) });
-                        return true;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                Room testRoom = CreateRoomPlayback(false, delegate { return null; });
-                testRoom.Leave(REASON);
-            }
-
-            Assert.IsFalse(cm.HasRoom(jid));
-        }
-
-        private XmlElement CreateUnavailPacket(XmlElement elem)
-        {
-            XmlDocument myDoc = new XmlDocument();
-
-            RoomPresence presence = new RoomPresence(myDoc, jid);
-            presence.RemoveAll();
-            presence.Type = PresenceType.unavailable;
-            presence.From = elem.GetAttribute("to");
-
-            UserX xElem = new UserX(myDoc);
-            presence.AppendChild(xElem);
-
-            xElem.Status = new RoomStatus[] { RoomStatus.SELF };
-
-            return presence;
-        }
-
-        private string GetLeavePresence()
-        {
-            return
-                string.Format(
-                    "<presence to=\"{0}\" type=\"unavailable\">" +
-                        "<status>{1}</status>" +
-                    "</presence>",
-                    jid, REASON);
-        }
-
-        private string GetJoinPresence()
-        {
-            return
-                string.Format(
-                    "<presence to=\"{0}\">" +
-                        "<x xmlns=\"{1}\"/>" +
-                    "</presence>",
-                    jid, URI.MUC);
-        }
-
-        private string GetRoomMessage(string id)
-        {
-            return
-                string.Format(
-                    "<message id=\"{0}\" to=\"{1}\" type=\"groupchat\">" +
-                        "<body>{2}</body>" +
-                    "</message>",
-                    id, jid.Bare, MESSAGE);
-        }
-
-        private string GetRoomPrivateMessage(string id)
-        {
-            return
-                string.Format(
-                    "<message id=\"{0}\" to=\"{1}/{2}\" type=\"chat\">" +
-                        "<body>{3}</body>" +
-                    "</message>",
-                    id, jid.Bare, TO_NICK, MESSAGE);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/DiscoManagerTest.cs b/lib/jabber-net/test/jabber/connection/DiscoManagerTest.cs
deleted file mode 100644
index c2f5278..0000000
--- a/lib/jabber-net/test/jabber/connection/DiscoManagerTest.cs
+++ /dev/null
@@ -1,268 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Xml;
-
-using bedrock.util;
-
-using jabber;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-using NUnit.Framework;
-using Rhino.Mocks;
-using Rhino.Mocks.Interfaces;
-
-namespace test.jabber.connection
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class DiscoManagerTest
-    {
-        private MockRepository mocks;
-        private DiscoManager dm;
-        private XmppStream stream;
-        private IIQTracker tracker;
-        private XmlDocument doc;
-
-        [SetUp]
-        public void setup()
-        {
-            mocks = new MockRepository();
-            dm = new DiscoManager();
-
-            stream = mocks.DynamicMock<XmppStream>();
-            tracker = mocks.DynamicMock<IIQTracker>();
-            dm.Stream = stream;
-
-            doc = new XmlDocument();
-        }
-
-        [TearDown]
-        public void cleanUp()
-        {
-            dm.Clear();
-        }
-
-        private readonly JID jid = new JID("test.com");
-        private readonly string NODE = "TEST_NODE";
-        private readonly string FEATURE = "TEST_FEATURE";
-
-        [Test]
-        public void IntialDiscoTest()
-        {
-            IEventRaiser onAuth;
-
-            IQ sentIq = null;
-            IqCB sentCallback = null;
-
-            mocks.BackToRecordAll();
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Server).Return(jid);
-                stream.OnAuthenticate += null;
-                onAuth = LastCall.IgnoreArguments().GetEventRaiser();
-
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(
-                    delegate(IQ arg0, IqCB arg1, object arg2)
-                    {
-                        // Grab the iq and callback so this part of
-                        // the code can finish. Call the callback later.
-                        sentIq = arg0;
-                        sentCallback = arg1;
-
-                        string id = arg0.GetAttribute("id");
-                        string original = arg0.OuterXml.Replace(" ", "");
-                        string comparison = GetInfoXml(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(
-                    delegate(IQ arg0, IqCB arg1, object arg2)
-                    {
-                        string id = arg0.GetAttribute("id");
-                        string original = arg0.OuterXml;
-                        return original.Replace(" ", "") ==
-                               GetItemsForServiceXml(id).Replace(" ", "");
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                DiscoManager newDm = new DiscoManager();
-                newDm.Stream = stream;
-
-                onAuth.Raise(new object[] { null });
-
-                if (sentIq != null)
-                {
-                    string id = sentIq.GetAttribute("id");
-                    if (sentCallback != null)
-                        sentCallback(null, CreateDiscoInfoResponse(id), newDm.Root);
-                }
-            }
-        }
-
-        [Test]
-        public void BeginGetItemsTest()
-        {
-            mocks.BackToRecordAll();
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(
-                    delegate(IQ arg0, IqCB arg1, object arg2)
-                    {
-                        string id = arg0.GetAttribute("id");
-                        string original = arg0.OuterXml.Replace(" ", "");
-                        string comparison = GetItemsXml(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                dm.BeginGetItems(jid, NODE, delegate { }, null);
-            }
-        }
-
-        [Test]
-        public void BeginGetFeaturesTest()
-        {
-            mocks.BackToRecordAll();
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(
-                    delegate(IQ arg0, IqCB arg1, object arg2)
-                    {
-                        string id = arg0.GetAttribute("id");
-                        string original = arg0.OuterXml.Replace(" ", "");
-                        string comparison = GetFeaturesXml(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                dm.BeginGetFeatures(jid, NODE, delegate { }, null);
-            }
-        }
-
-        [Test]
-        public void BeginGetServiceTest()
-        {
-            mocks.BackToRecordAll();
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Server).Return(jid);
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(
-                    delegate(IQ arg0, IqCB arg1, object arg2)
-                    {
-                        string id = arg0.GetAttribute("id");
-                        string original = arg0.OuterXml.Replace(" ", "");
-                        string comparison = GetItemsForServiceXml(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                dm.BeginFindServiceWithFeature(FEATURE, delegate { }, null);
-            }
-        }
-
-        private IQ CreateDiscoInfoResponse(string id)
-        {
-            IQ returnIq = new IQ(doc);
-            returnIq.SetAttribute("id", id);
-            returnIq.SetAttribute("from", jid);
-            returnIq.SetAttribute("type", "result");
-
-            DiscoInfo info = new DiscoInfo(doc);
-            info.AddIdentity("server", "im", "jabber2 4.2.16.6", null);
-            info.AddFeature(URI.DISCO_ITEMS);
-            info.AddFeature(URI.DISCO_INFO);
-
-            returnIq.Query = info;
-
-            return returnIq;
-        }
-
-        private string GetInfoXml(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"get\" to=\"{1}\">" +
-                      "<query xmlns=\"{2}\"/>" +
-                    "</iq>",
-                    id, jid, URI.DISCO_INFO);
-        }
-
-        private string GetItemsForServiceXml(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"get\" to=\"{1}\">" +
-                      "<query xmlns=\"{2}\"/>" +
-                    "</iq>",
-                    id, jid, URI.DISCO_ITEMS);
-        }
-
-        private string GetFeaturesXml(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"get\" to=\"{1}\">" +
-                      "<query node=\"{2}\" xmlns=\"{3}\" />" +
-                    "</iq>",
-                    id, jid, NODE, URI.DISCO_INFO);
-        }
-
-        private string GetItemsXml(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"get\" to=\"{1}\">" +
-                      "<query node=\"{2}\" xmlns=\"{3}\"/>" +
-                    "</iq>",
-                    id, jid, NODE, URI.DISCO_ITEMS);
-        }
-
-        private delegate T Func<A0, A1, A2, T>(A0 arg0, A1 arg1, A2 arg2);
-        private void SetupTrackerBeginIq(Func<IQ, IqCB, object, bool> func)
-        {
-            Expect.Call(stream.Tracker).Return(tracker);
-            tracker.BeginIQ(null, null, null);
-            LastCall.Callback(func);
-        }
-
-        [Test]
-        public void IdentityLang()
-        {
-            DiscoIdentity id = new DiscoIdentity(doc);
-            Assert.IsNull(id.Lang);
-            id.Lang = "en";
-            Assert.AreEqual("en", id.Lang);
-            id.Lang = "el";
-            Assert.AreEqual("el", id.Lang);
-            id.Lang = null;
-            Assert.IsNull(id.Lang);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/FileMap.cs b/lib/jabber-net/test/jabber/connection/FileMap.cs
deleted file mode 100644
index 7599f03..0000000
--- a/lib/jabber-net/test/jabber/connection/FileMap.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-using bedrock.io;
-using bedrock.util;
-using System.Xml;
-
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.iq;
-
-namespace test.jabber.connection
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class FileMapTest
-    {
-        XmlDocument doc = new XmlDocument();
-
-        DiscoInfo Element
-        {
-            get
-            {
-                XmlDocument doc = new XmlDocument();
-                global::jabber.protocol.iq.DiscoInfo di = new global::jabber.protocol.iq.DiscoInfo(doc);
-                di.AddFeature(global::jabber.protocol.URI.DISCO_INFO);
-                di.AddFeature(global::jabber.protocol.URI.DISCO_ITEMS);
-                return di;
-            }
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentException))]
-        public void TestNull()
-        {
-            FileMap<Element> fm = new FileMap<Element>("test.xml", null);
-            Assert.IsNotNull(fm);
-            FileMap<DiscoInfo> fm2 = new FileMap<DiscoInfo>("test.xml", null);
-        }
-
-        [Test]
-        public void TestCreate()
-        {
-            ElementFactory ef = new ElementFactory();
-            ef.AddType(new global::jabber.protocol.iq.Factory());
-
-            string g = new Guid().ToString();
-            FileMap<DiscoInfo> fm = new FileMap<DiscoInfo>("test.xml", ef);
-            fm.Clear();
-            Assert.AreEqual(0, fm.Count);
-
-            fm[g] = Element;
-            Assert.IsTrue(fm.Contains(g));
-            Assert.IsFalse(fm.Contains("foo"));
-            Assert.IsInstanceOfType(typeof(DiscoInfo), fm[g]);
-            Assert.AreEqual(1, fm.Count);
-
-            // re-read, to reparse
-            fm = new FileMap<DiscoInfo>("test.xml", ef);
-            Assert.IsTrue(fm.Contains(g));
-            Assert.IsInstanceOfType(typeof(DiscoInfo), fm[g]);
-
-            fm[g] = null;
-            Assert.AreEqual(1, fm.Count);
-
-            fm.Remove(g);
-            Assert.AreEqual(0, fm.Count);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/PubSubManagerTest.cs b/lib/jabber-net/test/jabber/connection/PubSubManagerTest.cs
deleted file mode 100644
index 2e337f4..0000000
--- a/lib/jabber-net/test/jabber/connection/PubSubManagerTest.cs
+++ /dev/null
@@ -1,285 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Collections;
-using System.Reflection;
-using System.Xml;
-
-using bedrock.util;
-
-using jabber;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-
-using NUnit.Framework;
-using Rhino.Mocks;
-
-namespace test.jabber.connection
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class PubSubManagerTest
-    {
-        private const string PUB_SUB_XMLNS = "http://jabber.org/protocol/pubsub";
-
-        private XmppStream stream;
-
-        private MockRepository mocks;
-        private IIQTracker tracker;
-        private XmlDocument doc;
-
-        private JID jid;
-        private static readonly string NODE = "test";
-
-        [SetUp]
-        public void Setup()
-        {
-            mocks = new MockRepository();
-            stream = mocks.DynamicMock<XmppStream>();
-            tracker = mocks.DynamicMock<IIQTracker>();
-            doc = new XmlDocument();
-
-            jid = new JID("test.example.com");
-        }
-
-        [Test]
-        public void GetNodeTest()
-        {
-            PubSubManager mgr = GetPubSubMgr();
-
-            PubSubNode node = mgr.GetNode(jid, NODE, 0);
-            Assert.AreNotEqual(node, null);
-        }
-
-        private delegate T Func<A0, A1, A2, T>(A0 arg0, A1 arg1, A2 arg2);
-
-        [Test]
-        public void CreateNodeTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string original = iq.OuterXml.Replace(" ", "");
-                        string comparison = GetCreateNodeIQ(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                PubSubNode node = mgr.GetNode(jid, NODE, 0);
-                node.Create();
-            }
-        }
-
-        [Test]
-        public void RemoveNodeTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string original = iq.OuterXml.Replace(" ", "");
-                        string comparison = GetRemoveNodeIq(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                mgr.RemoveNode(jid, NODE, null);
-            }
-        }
-
-        [Test]
-        public void AddRemoveNodeTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate
-                {
-                    return true;
-                });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                mgr.GetNode(jid, NODE, 0);
-
-                FieldInfo fieldInfo = mgr.GetType().GetField("m_nodes",
-                    BindingFlags.Instance | BindingFlags.NonPublic);
-                IDictionary nodes = (IDictionary)fieldInfo.GetValue(mgr);
-                if (nodes == null || nodes.Count != 1)
-                    Assert.Fail("The GetNode function failed");
-
-                mgr.RemoveNode(jid, NODE, null);
-                Assert.IsTrue(nodes[new JIDNode(jid, NODE)] == null);
-            }
-        }
-
-        [Test]
-        public void DeleteNodeTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string original = iq.OuterXml;
-                        return original.Replace(" ", "") == GetRemoveNodeIq(id).Replace(" ", "");
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                mgr.GetNode(jid, NODE, 0).Delete();
-            }
-        }
-
-        private const string PUB_SUB_ITEM = "TestItem";
-        private const string PUB_SUB_ITEM_XMLNS = "TestUri";
-
-        [Test]
-        public void PublishItemTest()
-        {
-            XmlElement pubItem = CreateTestItem();
-
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string original = iq.OuterXml.Replace(" ", "");
-                        string comparison = GetPublishItemIq(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                mgr.GetNode(jid, NODE, 0).PublishItem(null, pubItem);
-            }
-        }
-
-        private static XmlElement CreateTestItem()
-        {
-            XmlDocument myDoc = new XmlDocument();
-            return myDoc.CreateElement(PUB_SUB_ITEM, PUB_SUB_ITEM_XMLNS);
-        }
-
-        private const string PUB_SUB_ID = "TestId";
-
-        [Test]
-        public void DeleteItemTest()
-        {
-            using (mocks.Record())
-            {
-                Expect.Call(stream.Document).Return(doc);
-                SetupTrackerBeginIq(delegate(IQ iq, IqCB cb, object cbArg)
-                    {
-                        string id = iq.GetAttribute("id");
-                        string original = iq.OuterXml.Replace(" ", "");
-                        string comparison = GetDeleteItemString(id).Replace(" ", "");
-                        return original == comparison;
-                    });
-            }
-
-            using (mocks.Playback())
-            {
-                PubSubManager mgr = GetPubSubMgr();
-                mgr.GetNode(jid, NODE, 0).DeleteItem(PUB_SUB_ID);
-            }
-        }
-
-        private string GetDeleteItemString(string id)
-        {
-            return string.Format(
-                "<iq id=\"{0}\" type=\"set\" to=\"{1}\">"+
-                    "<pubsub xmlns=\"{2}\">"+
-                        "<retract node=\"{3}\">"+
-                            "<item id=\"{4}\"/>"+
-                        "</retract>"+
-                    "</pubsub>"+
-                "</iq>",
-                id, jid, PUB_SUB_XMLNS, NODE, PUB_SUB_ID);
-        }
-
-        private string GetPublishItemIq(string id)
-        {
-            return string.Format(
-                "<iq id=\"{0}\" type=\"set\" to=\"{1}\">" +
-                    "<pubsub xmlns=\"{2}\">"+
-                        "<publish node=\"{3}\">"+
-                            "<item>"+
-                                "<{4} xmlns=\"{5}\"/>"+
-                            "</item>"+
-                        "</publish>"+
-                    "</pubsub>"+
-                "</iq>",
-                id, jid, PUB_SUB_XMLNS, NODE, PUB_SUB_ITEM, PUB_SUB_ITEM_XMLNS);
-        }
-
-        private void SetupTrackerBeginIq(Func<IQ, IqCB, object, bool> func)
-        {
-            Expect.Call(stream.Tracker).Return(tracker);
-            tracker.BeginIQ(null, null, null);
-            LastCall.Callback(func);
-        }
-
-        private string GetRemoveNodeIq(string id)
-        {
-            return string.Format(
-                "<iq id=\"{0}\" type=\"set\" to=\"{1}\">"+
-                    "<pubsub xmlns=\"{2}\">"+
-                        "<delete node=\"{3}\"/>"+
-                    "</pubsub>"+
-                "</iq>",
-                id, jid, URI.PUBSUB_OWNER, NODE);
-        }
-
-        private string GetCreateNodeIQ(string id)
-        {
-            return
-                string.Format(
-                    "<iq id=\"{0}\" type=\"set\" to=\"{1}\">"+
-                        "<pubsub xmlns=\"{2}\">"+
-                            "<create node=\"{3}\"/>"+
-                            "<configure/>"+
-                        "</pubsub>"+
-                    "</iq>",
-                    id, jid, PUB_SUB_XMLNS, NODE);
-        }
-
-        private PubSubManager GetPubSubMgr()
-        {
-            PubSubManager mgr = new PubSubManager();
-            mgr.Stream = stream;
-            return mgr;
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/connection/sasl/MD5Processor.cs b/lib/jabber-net/test/jabber/connection/sasl/MD5Processor.cs
deleted file mode 100644
index eb26223..0000000
--- a/lib/jabber-net/test/jabber/connection/sasl/MD5Processor.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using bedrock.util;
-
-using jabber.connection;
-using jabber.connection.sasl;
-using jabber.protocol.stream;
-
-using NUnit.Framework;
-using System.Xml;
-
-namespace test.jabber.connection.sasl
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class MD5ProcessorTest
-    {
-        [Test]
-        public void TestChallenge()
-        {
-
-            XmlDocument doc = new XmlDocument();
-            Challenge c = new Challenge(doc);
-            c.InnerText = "cmVhbG09IndlYjIwMDMiLCBub25jZT0iWWE0anVNYzU0SG9UWDBPa1VPRDFvQT09IiwgcW9wPSJhdXRoLCBhdXRoLWludCIsIGNoYXJzZXQ9dXRmLTgsIGFsZ29yaXRobT1tZDUtc2Vzcw==";
-
-            MD5Processor m = new MD5Processor();
-            m["username"] = "test";
-            m["password"] = "test";
-            Step s = m.step(c, doc);
-            Assert.IsNotNull(s);
-            Assert.AreEqual("Ya4juMc54HoTX0OkUOD1oA==", m["nonce"]);
-            Assert.AreEqual("auth, auth-int", m["qop"]);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/ElementListTest.cs b/lib/jabber-net/test/jabber/protocol/ElementListTest.cs
deleted file mode 100644
index abe9a0c..0000000
--- a/lib/jabber-net/test/jabber/protocol/ElementListTest.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Text;
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock;
-using bedrock.util;
-using jabber.protocol;
-
-namespace test.jabber.protocol
-{
-    /// <summary>
-    /// Summary description for ElementListTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class ElementListTest
-    {
-        private XmlDocument doc = new XmlDocument();
-
-        private Element Parent()
-        {
-            Element parent = new Element("rent", "f", doc);
-            Element child;
-            for (int i=0; i<10; i++)
-            {
-                child = new Element("foo", "f", doc);
-                child.InnerText = i.ToString();
-                parent.AppendChild(child);
-                child = new Element("bar", "f", doc);
-                child.InnerText = i.ToString();
-                parent.AppendChild(child);
-            }
-            return parent;
-        }
-
-        [Test] public void Test_Count()
-        {
-            Element parent = Parent();
-            Assert.AreEqual(10,  parent.GetElementsByTagName("foo").Count);
-            Assert.AreEqual(10,  parent.GetElementsByTagName("bar").Count);
-            Assert.AreEqual(10,  parent.GetElementsByTagName("foo", "f").Count);
-            Assert.AreEqual(10,  parent.GetElementsByTagName("bar", "f").Count);
-            Assert.AreEqual(0,  parent.GetElementsByTagName("bar", "g").Count);
-        }
-        [Test] public void Test_Enum()
-        {
-            Element parent = Parent();
-            int c = 0;
-            foreach (XmlElement e in parent.GetElementsByTagName("foo"))
-            {
-                Assert.AreEqual(c.ToString(), e.InnerText);
-                c++;
-            }
-            Assert.AreEqual(10, c);
-        }
-
-        [Test] public void Test_Grandkids()
-        {
-            Element parent = Parent();
-            Element g = new Element("foo", "f", doc);
-            g.InnerText = "one";
-            parent.FirstChild.AppendChild(g);
-            foreach (XmlElement e in parent.GetElementsByTagName("foo"))
-            {
-                Assert.IsTrue(e.InnerText != "one");
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/ElementStreamTest.cs b/lib/jabber-net/test/jabber/protocol/ElementStreamTest.cs
deleted file mode 100644
index de656e3..0000000
--- a/lib/jabber-net/test/jabber/protocol/ElementStreamTest.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.IO;
-using System.Text;
-using System.Threading;
-using System.Xml;
-using System;
-using NUnit.Framework;
-
-using bedrock;
-using bedrock.util;
-using jabber.protocol;
-
-namespace test.jabber.protocol
-{
-    /// <summary>
-    /// Summary description for ElementStreamTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class ElementStreamTest
-    {
-        private bool fail = false;
-        private System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-        private AutoResetEvent are = new AutoResetEvent(false);
-        private int count = 0;
-
-        /*
-         * Try several ways to generate PartialTokenException.
-         */
-        [Test] public void Test_Partial()
-        {
-            fail = false;
-            AsynchElementStream es = new AsynchElementStream();
-            es.OnDocumentEnd += new ObjectHandler(jabOnEnd);
-
-            es.Push(ENC.GetBytes("<stream>"));
-            es.OnElement += new ProtocolHandler(jabOnElement);
-            es.Push(ENC.GetBytes("<te"));
-
-            are.WaitOne(100, true);
-            Assert.IsTrue(! fail);
-
-            es.Push(ENC.GetBytes("st/>"));
-            es.Push(ENC.GetBytes("<test>"));
-            es.Push(ENC.GetBytes("</"));
-            es.Push(ENC.GetBytes("test>"));
-            es.Push(ENC.GetBytes("<test>&#1"));
-            es.Push(ENC.GetBytes("16;est</test>"));
-            es.Push(ENC.GetBytes("<test>"));
-            es.Push(new byte[] {0xC5});
-            es.Push(new byte[] {0x81});
-            es.Push(ENC.GetBytes("</test>"));
-            es.Push(ENC.GetBytes("<test f"));
-            es.Push(ENC.GetBytes("oo='bar'/>"));
-            es.Push(ENC.GetBytes("<test foo="));
-            es.Push(ENC.GetBytes("'bar'/>"));
-            es.Push(ENC.GetBytes("<test foo='"));
-            es.Push(ENC.GetBytes("bar'/>"));
-            es.Push(new byte[] {} );
-        }
-
-        /*
-         * What happens if we try to parse more than 4k of data at once?
-         */
-        [Test] public void Test_Large()
-        {
-            AsynchElementStream es = new AsynchElementStream();
-            // es.OnElement += new ProtocolHandler(jabOnElement);
-
-            es.Push(ENC.GetBytes("<stream>"));
-            byte[] buf = ENC.GetBytes("<test/>");
-            MemoryStream ms = new MemoryStream();
-            for (int i=0; i<1024; i++)
-            {
-                ms.Write(buf, 0, buf.Length);
-            }
-            es.Push(ms.ToArray());
-        }
-
-        [Test]
-        public void Test_Large_Partial()
-        {
-            count = 0;
-            AsynchElementStream es = new AsynchElementStream();
-            es.OnElement += new ProtocolHandler(es_OnElement);
-            es.Push(ENC.GetBytes("<stream>"));
-            string test = "<presence from='xxxxxxxxx at aim.ijabber.com' to='xxxxxx at jabber.org/Test' type='error'><error code='404' type='cancel'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence><presence from='xxxxxxxxxxxx at aim.ijabber.com' to='xxxxxx at jabber.org/Test' type='error'><error code='404' type='cancel'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence><presence from='xxxxxxxxxxx at aim.ijabber.com' to='xxx [...]
-            es.Push(ENC.GetBytes(test));
-            test = "l'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></presence>";
-            es.Push(ENC.GetBytes(test));
-            Assert.AreEqual(count, 20);
-        }
-
-        private void es_OnElement(object sender, XmlElement rp)
-        {
-            count++;
-        }
-
-        /*
-        [Test] public void Test_NullBody()
-        {
-            fail = false;
-            AsynchElementStream es = new AsynchElementStream();
-            es.OnDocumentEnd += new ObjectHandler(jabOnEnd);
-
-            es.Push(ENC.GetBytes("<str"));
-            es.Push(ENC.GetBytes("eam/>"));
-
-            System.Threading.Thread.Sleep(500);
-            Assert.IsTrue(! fail);
-        }
-*/
-
-        /* The server should protect from these.  Good thing, since
-         * it doesn't work.  :|
-        [Test] public void Test_Comment()
-        {
-            fail = false;
-            ElementStream es = new ElementStream();
-            es.OnDocumentEnd += new ObjectHandler(jabOnEnd);
-
-            es.Push(ENC.GetBytes("<stream><!-- <foo/>"));
-            es.Push(ENC.GetBytes(" --></stream>"));
-
-            System.Threading.Thread.Sleep(500);
-            Assert.IsTrue(! fail);
-        }
-*/
-        void jabOnEnd(object s)
-        {
-            fail = true;
-            are.Set();
-        }
-
-        void jabOnElement(Object sender, System.Xml.XmlElement elem)
-        {
-            Console.WriteLine(elem.OuterXml);
-            Assert.AreEqual("test", elem.Name);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/EnumParserTest.cs b/lib/jabber-net/test/jabber/protocol/EnumParserTest.cs
deleted file mode 100644
index 815f3b4..0000000
--- a/lib/jabber-net/test/jabber/protocol/EnumParserTest.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace test.jabber.protocol
-{
-    /// <summary>
-    /// Test the EnumParser
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class EnumParserTest
-    {
-        enum foo
-        {
-            NONE = -1,
-            bar,
-            baz
-        }
-
-        enum bar
-        {
-            NONE = -1,
-            [XML("moo")]
-            bloo,
-            [XML("")]
-            goo
-        }
-
-        [Dash]
-        enum doo
-        {
-            moo_vie,
-        }
-
-        [Test]
-        public void ParsePlain()
-        {
-            foo f = EnumParser.Parse<foo>("bar");
-            Assert.AreEqual(foo.bar, f);
-            f = EnumParser.Parse<foo>("blah");
-            Assert.AreEqual(foo.NONE, f);
-        }
-
-        [Test]
-        public void ParseAttr()
-        {
-            bar b = EnumParser.Parse<bar>("moo");
-            Assert.AreEqual(bar.bloo, b);
-            b = EnumParser.Parse<bar>("bloo");
-            Assert.AreEqual(bar.bloo, b);
-        }
-
-        [Test]
-        public void Strings()
-        {
-            string s = EnumParser.ToString(foo.bar);
-            Assert.AreEqual("bar", s);
-
-            s = EnumParser.ToString(bar.bloo);
-            Assert.AreEqual("moo", s);
-        }
-
-        [Test]
-        public void XML()
-        {
-            XmlDocument doc = new XmlDocument();
-            Element e = new Element("test", doc);
-            e.SetAttribute("bloo", EnumParser.ToString(bar.NONE));
-            Assert.AreEqual("", e.GetAttribute("bloo"));
-            e.SetAttribute("bloo", EnumParser.ToString(bar.bloo));
-            Assert.AreEqual("moo", e.GetAttribute("bloo"));
-            e.SetAttribute("bloo", EnumParser.ToString(bar.NONE));
-            Assert.AreEqual("", e.GetAttribute("bloo"));
-        }
-
-        [Test]
-        public void Dashes()
-        {
-            doo d = doo.moo_vie;
-            string s = EnumParser.ToString(d);
-            Assert.AreEqual("moo-vie", s);
-            d = EnumParser.Parse<doo>(s);
-            Assert.AreEqual(doo.moo_vie, d);
-        }
-
-        [Test]
-        public void Null()
-        {
-            string s = EnumParser.ToString(foo.NONE);
-            Assert.IsNull(s);
-            foo f = EnumParser.Parse<foo>("");
-            Assert.AreEqual(foo.NONE, f);
-            bar b = EnumParser.Parse<bar>("");
-            Assert.AreEqual(bar.goo, b);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/PacketTest.cs b/lib/jabber-net/test/jabber/protocol/PacketTest.cs
deleted file mode 100644
index c6604e6..0000000
--- a/lib/jabber-net/test/jabber/protocol/PacketTest.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-
-namespace test.jabber.protocol
-{
-    /// <summary>
-    /// Summary description for PacketTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class PacketTest
-    {
-        XmlDocument doc = new XmlDocument();
-
-        [Test] public void Test_Create()
-        {
-            Packet p = new Packet("foo", doc);
-            Assert.AreEqual("<foo />", p.ToString());
-            p.To = "one";
-            Assert.AreEqual("<foo to=\"one\" />", p.ToString());
-            p.From = "two";
-            Assert.AreEqual("<foo to=\"one\" from=\"two\" />", p.ToString());
-            p.Swap();
-            Assert.AreEqual("<foo to=\"two\" from=\"one\" />", p.ToString());
-        }
-
-        [Test] public void Test_JabberDate()
-        {
-            string sdt = "20020504T20:39:42";
-            DateTime dt = Element.JabberDate(sdt);
-            Assert.AreEqual(2002, dt.Year);
-            Assert.AreEqual(5, dt.Month);
-            Assert.AreEqual(4, dt.Day);
-            Assert.AreEqual(20, dt.Hour);
-            Assert.AreEqual(39, dt.Minute);
-            Assert.AreEqual(42, dt.Second);
-            Assert.AreEqual(sdt, Element.JabberDate(dt));
-        }
-        [Test] public void Test_DateTimeProfile()
-        {
-            string sdt = "2002-05-04T20:39:42.050Z";
-            DateTime dt = Element.DateTimeProfile(sdt);
-            Assert.AreEqual(2002, dt.Year);
-            Assert.AreEqual(5, dt.Month);
-            Assert.AreEqual(4, dt.Day);
-            Assert.AreEqual(20, dt.Hour);
-            Assert.AreEqual(39, dt.Minute);
-            Assert.AreEqual(42, dt.Second);
-            Assert.AreEqual(sdt, Element.DateTimeProfile(dt));
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/accept/RouteTest.cs b/lib/jabber-net/test/jabber/protocol/accept/RouteTest.cs
deleted file mode 100644
index 5bb2c55..0000000
--- a/lib/jabber-net/test/jabber/protocol/accept/RouteTest.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol.accept;
-
-namespace test.jabber.protocol.accept
-{
-    /// <summary>
-    /// Summary description for IQTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class RouteTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [Test] public void Test_Create()
-        {
-            Route r = new Route(doc);
-            r.Contents = doc.CreateElement("foo");
-            Assert.AreEqual("<route><foo /></route>", r.OuterXml);
-            XmlElement foo = r.Contents;
-            Assert.AreEqual("<foo />", foo.OuterXml);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/client/IQTest.cs b/lib/jabber-net/test/jabber/protocol/client/IQTest.cs
deleted file mode 100644
index 628ebb7..0000000
--- a/lib/jabber-net/test/jabber/protocol/client/IQTest.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.client
-{
-    /// <summary>
-    /// Summary description for IQTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class IQTest
-    {
-        XmlDocument doc = new XmlDocument();
-
-        [Test]
-        public void Create()
-        {
-            Element.ResetID();
-
-            IQ iq = new IQ(doc);
-            Assert.AreEqual("<iq id=\"JN_1\" type=\"get\" />", iq.ToString());
-            iq = new IQ(doc);
-            Assert.AreEqual("<iq id=\"JN_2\" type=\"get\" />", iq.ToString());
-            iq.Query = new Auth(doc);
-            Assert.AreEqual("<iq id=\"JN_2\" type=\"get\"><query xmlns=\"jabber:iq:auth\" /></iq>", iq.ToString());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/client/MessageTest.cs b/lib/jabber-net/test/jabber/protocol/client/MessageTest.cs
deleted file mode 100644
index e27a776..0000000
--- a/lib/jabber-net/test/jabber/protocol/client/MessageTest.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.client;
-
-namespace test.jabber.protocol.client
-{
-    /// <summary>
-    /// Summary description for MessageTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class MessageTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            Message msg = new Message(doc);
-            msg.Html = "foo";
-            Assert.AreEqual("<message id=\""+msg.ID+"\"><html xmlns=\"http://jabber.org/protocol/xhtml-im\"><body xmlns=\"http://www.w3.org/1999/xhtml\">foo</body></html><body>foo</body></message>", msg.ToString());
-            // TODO: deal with the namespace problem here
-            msg.Html = "f<a href=\"http://www.jabber.org\">o</a>o";
-            Assert.AreEqual("<message id=\""+msg.ID+"\"><html xmlns=\"http://jabber.org/protocol/xhtml-im\"><body xmlns=\"http://www.w3.org/1999/xhtml\">f<a href=\"http://www.jabber.org\">o</a>o</body></html><body>foo</body></message>", msg.ToString());
-            Assert.AreEqual("f<a href=\"http://www.jabber.org\">o</a>o", msg.Html);
-        }
-        [Test] public void Test_NullBody()
-        {
-            Message msg = new Message(doc);
-            Assert.AreEqual(null, msg.Body);
-            msg.Body = "foo";
-            Assert.AreEqual("foo", msg.Body);
-            msg.Body = null;
-            Assert.AreEqual(null, msg.Body);
-        }
-        [Test] public void Test_Normal()
-        {
-            Message msg = new Message(doc);
-            Assert.AreEqual(MessageType.normal, msg.Type);
-            Assert.AreEqual("", msg.GetAttribute("type"));
-            msg.Type = MessageType.chat;
-            Assert.AreEqual(MessageType.chat, msg.Type);
-            Assert.AreEqual("chat", msg.GetAttribute("type"));
-            msg.Type = MessageType.normal;
-            Assert.AreEqual(MessageType.normal, msg.Type);
-            Assert.AreEqual("", msg.GetAttribute("type"));
-        }
-        [Test] public void Test_Escape()
-        {
-            Message msg = new Message(doc);
-            msg.Body = "&";
-            Assert.AreEqual("<message id=\""+msg.ID+"\"><body>&</body></message>", msg.ToString());
-            msg.RemoveChild(msg["body"]);
-            Assert.AreEqual("<message id=\""+msg.ID+"\"></message>", msg.ToString());
-            try
-            {
-                msg.Html = "&";
-                Assert.Fail("should have thrown an exception");
-            }
-            catch
-            {
-                Assert.IsTrue(true, "Threw exception, as expected");
-            }
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/client/PresenceTest.cs b/lib/jabber-net/test/jabber/protocol/client/PresenceTest.cs
deleted file mode 100644
index be228d8..0000000
--- a/lib/jabber-net/test/jabber/protocol/client/PresenceTest.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol.client;
-
-namespace test.jabber.protocol.client
-{
-    /// <summary>
-    /// Summary description for PresenceTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class PresenceTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [Test] public void Test_Create()
-        {
-            Presence p = new Presence(doc);
-            p.Type   = PresenceType.available;
-            p.Status = "foo";
-            Assert.AreEqual("<presence><status>foo</status></presence>", p.ToString());
-        }
-
-        [Test] public void Test_Available()
-        {
-            Presence p = new Presence(doc);
-            Assert.AreEqual(PresenceType.available, p.Type);
-            Assert.AreEqual("", p.GetAttribute("type"));
-            p.Type = PresenceType.unavailable;
-            Assert.AreEqual(PresenceType.unavailable, p.Type);
-            Assert.AreEqual("unavailable", p.GetAttribute("type"));
-            p.Type = PresenceType.available;
-            Assert.AreEqual(PresenceType.available, p.Type);
-            Assert.AreEqual("", p.GetAttribute("type"));
-        }
-
-        [Test]
-        public void Test_Order()
-        {
-            Presence small = new Presence(doc);
-            DateTime d = DateTime.Now;
-            small.IntPriority = 0;
-            small.Stamp = d;
-
-            Presence big = new Presence(doc);
-            big.IntPriority = 10;
-            big.Stamp = d.AddSeconds(1);
-
-            Assert.IsTrue(small < big);
-            Assert.IsTrue(big > small);
-
-            small.IntPriority = 10;
-            small.Show = "dnd";
-            Assert.IsTrue(small < big);
-
-            big.Show = "chat";
-            Assert.IsTrue(small < big);
-
-            small.Show = "chat";
-            Assert.IsTrue(small < big);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/AgentTest.cs b/lib/jabber-net/test/jabber/protocol/iq/AgentTest.cs
deleted file mode 100644
index 031a1db..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/AgentTest.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.iq
-{
-    /// <summary>
-    /// Test Agents
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class AgentTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            AgentsQuery r = new AgentsQuery(doc);
-            Assert.AreEqual("<query xmlns=\"jabber:iq:agents\" />", r.ToString());
-        }
-
-        [Test] public void Test_Item()
-        {
-            AgentsIQ aiq = new AgentsIQ(doc);
-            AgentsQuery q = (AgentsQuery) aiq.Query;
-            Agent a = q.AddAgent();
-            a.JID = new JID("hildjj at jabber.com");
-            Assert.AreEqual("<iq id=\""+aiq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:agents\">" +
-                "<agent jid=\"hildjj at jabber.com\" /></query></iq>",
-                aiq.ToString());
-        }
-        [Test] public void Test_GetItems()
-        {
-            AgentsIQ aiq = new AgentsIQ(doc);
-            AgentsQuery r = (AgentsQuery) aiq.Query;
-            Agent a = r.AddAgent();
-            a.JID = new JID("hildjj at jabber.com");
-            a = r.AddAgent();
-            a.JID = new JID("hildjj at jabber.org");
-            Agent[] agents = r.GetAgents();
-            Assert.AreEqual(agents.Length, 2);
-            Assert.AreEqual(agents[0].JID, "hildjj at jabber.com");
-            Assert.AreEqual(agents[1].JID, "hildjj at jabber.org");
-        }
-        [Test] public void Test_Transport()
-        {
-            AgentsIQ aiq = new AgentsIQ(doc);
-            aiq.Type = IQType.result;
-            AgentsQuery r = (AgentsQuery) aiq.Query;
-            Agent a = r.AddAgent();
-            a.JID = new JID("hildjj at jabber.com");
-            a.Transport = true;
-            Assert.AreEqual(a.Transport, true);
-            Assert.AreEqual("<iq id=\""+aiq.ID+"\" type=\"result\"><query xmlns=\"jabber:iq:agents\">" +
-                "<agent jid=\"hildjj at jabber.com\"><transport /></agent></query></iq>",
-                aiq.ToString());
-            a.Transport = false;
-            Assert.AreEqual(a.Transport, false);
-            a.Groupchat = true;
-            Assert.AreEqual(a.Groupchat, true);
-            Assert.AreEqual("<iq id=\""+aiq.ID+"\" type=\"result\"><query xmlns=\"jabber:iq:agents\">" +
-                "<agent jid=\"hildjj at jabber.com\"><groupchat /></agent></query></iq>",
-                aiq.ToString());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/AuthTest.cs b/lib/jabber-net/test/jabber/protocol/iq/AuthTest.cs
deleted file mode 100644
index 9866f08..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/AuthTest.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.iq
-{
-    /// <summary>
-    /// Summary description for AuthTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class AuthTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            IQ iq = new AuthIQ(doc);
-            Assert.AreEqual("<iq id=\""+iq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:auth\" /></iq>", iq.ToString());
-        }
-        [Test] public void Test_Hash()
-        {
-            IQ iq = new AuthIQ(doc);
-            iq.Type = IQType.set;
-            Auth a = (Auth) iq.Query;
-            a.SetDigest("foo", "bar", "3B513636");
-            a.Resource = "Home";
-            Assert.AreEqual("<iq id=\""+iq.ID+"\" type=\"set\"><query xmlns=\"jabber:iq:auth\">" +
-                "<username>foo</username>" +
-                "<digest>37d9c887967a35d53b81f07916a309a5b8d7e8cc</digest>" +
-                "<resource>Home</resource>" +
-                "</query></iq>",
-                iq.ToString());
-        }
-        /*
-        SENT: <iq type="get" id="JCOM_14"><query xmlns="jabber:iq:auth"><username>zeroktest</username></query></iq>
-        RECV: <iq id='JCOM_14' type='result'><query xmlns='jabber:iq:auth'><username>zeroktest</username><password/><digest/><sequence>499</sequence><token>3C7A6B0A</token><resource/></query></iq>
-        SENT: <iq type="set" id="JCOM_15"><query xmlns="jabber:iq:auth"><username>zeroktest</username><hash>e00c83748492a3bc7e4831c9e973d117082c3abe</hash><resource>Winjab</resource></query></iq>
-        */
-        [Test] public void Test_ZeroK()
-        {
-            IQ iq = new AuthIQ(doc);
-            iq.Type = IQType.set;
-            Auth a = (Auth) iq.Query;
-            a.SetZeroK("zeroktest", "test", "3C7A6B0A", 499);
-            a.Resource = "Winjab";
-            Assert.AreEqual("<iq id=\""+iq.ID+"\" type=\"set\"><query xmlns=\"jabber:iq:auth\">" +
-                "<username>zeroktest</username>" +
-                "<hash>e00c83748492a3bc7e4831c9e973d117082c3abe</hash>" +
-                "<resource>Winjab</resource>" +
-                "</query></iq>",
-                iq.ToString());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/PubSubTest.cs b/lib/jabber-net/test/jabber/protocol/iq/PubSubTest.cs
deleted file mode 100644
index 2effc62..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/PubSubTest.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System.Xml;
-using bedrock.util;
-using jabber.protocol.iq;
-using NUnit.Framework;
-
-namespace test.jabber.protocol.iq
-{
-    [TestFixture]
-    [SVN(@"$Id$")]
-    public class PubSubTest
-    {
-        private const string NODE = "TestNode";
-
-        private XmlDocument doc;
-
-        [SetUp]
-        public void Setup()
-        {
-            doc = new XmlDocument();
-        }
-
-        [Test]
-        public void AffiliationsTest()
-        {
-            PubSubIQ iq = new PubSubIQ(doc, PubSubCommandType.affiliations, NODE);
-            Affiliations test = iq.Command as Affiliations;
-            Assert.IsNotNull(test);
-        }
-
-        [Test]
-        public void PubSubCreateTest()
-        {
-            PubSubIQ iq = new PubSubIQ(doc, PubSubCommandType.create, NODE);
-            Assert.IsFalse(((Create)iq.Command).HasConfigure);
-
-            Create create = (Create)iq.Command;
-
-            create.HasConfigure = true;
-            Assert.IsTrue(create.HasConfigure);
-            Assert.IsNotNull(create.GetConfiguration());
-        }
-
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/RegisterTest.cs b/lib/jabber-net/test/jabber/protocol/iq/RegisterTest.cs
deleted file mode 100644
index 7aa7727..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/RegisterTest.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.iq
-{
-    /// <summary>
-    /// Summary description for RosterTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class RegisterTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            Register r = new Register(doc);
-            Assert.AreEqual("<query xmlns=\"jabber:iq:register\" />", r.ToString());
-        }
-        [Test] public void Test_Registered()
-        {
-            Register r = new Register(doc);
-            r.Registered = true;
-            Assert.AreEqual("<query xmlns=\"jabber:iq:register\"><registered /></query>", r.ToString());
-            Assert.IsTrue(r.Registered);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/RosterTest.cs b/lib/jabber-net/test/jabber/protocol/iq/RosterTest.cs
deleted file mode 100644
index 7cfdc47..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/RosterTest.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.iq
-{
-    /// <summary>
-    /// Summary description for RosterTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class RosterTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            Roster r = new Roster(doc);
-            Assert.AreEqual("<query xmlns=\"jabber:iq:roster\" />", r.ToString());
-        }
-
-        [Test] public void Test_Item()
-        {
-            RosterIQ riq = new RosterIQ(doc);
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = new JID("hildjj at jabber.com");
-            Assert.AreEqual("<iq id=\""+riq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:roster\">" +
-                "<item jid=\"hildjj at jabber.com\" /></query></iq>",
-                riq.ToString());
-        }
-        [Test] public void Test_GetItems()
-        {
-            RosterIQ riq = new RosterIQ(doc);
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = new JID("hildjj at jabber.com");
-            i = r.AddItem();
-            i.Subscription = Subscription.from;
-            i.JID = new JID("hildjj at jabber.org");
-            i.Subscription = Subscription.both;
-            Item[] items = r.GetItems();
-            Assert.AreEqual(items.Length, 2);
-            Assert.AreEqual(items[0].JID, "hildjj at jabber.com");
-            Assert.AreEqual(items[1].JID, "hildjj at jabber.org");
-        }
-        [Test] public void Test_Groups()
-        {
-            RosterIQ riq = new RosterIQ(doc);
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            i.JID = new JID("hildjj at jabber.com");
-            Group g = i.AddGroup("foo");
-            Assert.AreEqual("<iq id=\""+riq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:roster\">" +
-                "<item jid=\"hildjj at jabber.com\"><group>foo</group></item></query></iq>",
-                riq.ToString());
-            g = i.AddGroup("foo");
-            Assert.AreEqual("<iq id=\""+riq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:roster\">" +
-                "<item jid=\"hildjj at jabber.com\"><group>foo</group></item></query></iq>",
-                riq.ToString());
-            g = i.AddGroup("bar");
-            Assert.AreEqual("<iq id=\""+riq.ID+"\" type=\"get\"><query xmlns=\"jabber:iq:roster\">" +
-                "<item jid=\"hildjj at jabber.com\"><group>foo</group><group>bar</group></item></query></iq>",
-                riq.ToString());
-            Assert.AreEqual(2, i.GetGroups().Length);
-            Assert.AreEqual("foo", i.GetGroup("foo").GroupName);
-            Assert.AreEqual("bar", i.GetGroup("bar").GroupName);
-            i.RemoveGroup("foo");
-            Assert.AreEqual(1, i.GetGroups().Length);
-            Assert.AreEqual(null, i.GetGroup("foo"));
-        }
-        [Test] public void Test_Ask()
-        {
-            RosterIQ riq = new RosterIQ(doc);
-            Roster r = riq.Instruction;
-            Item i = r.AddItem();
-            Assert.AreEqual("", i.GetAttribute("ask"));
-            Assert.AreEqual(Ask.NONE, i.Ask);
-            i.Ask = Ask.subscribe;
-            Assert.AreEqual("subscribe", i.GetAttribute("ask"));
-            Assert.AreEqual(Ask.subscribe, i.Ask);
-            i.Ask = Ask.NONE;
-            Assert.AreEqual("", i.GetAttribute("ask"));
-            Assert.AreEqual(Ask.NONE, i.Ask);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/iq/TimeTest.cs b/lib/jabber-net/test/jabber/protocol/iq/TimeTest.cs
deleted file mode 100644
index 1772473..0000000
--- a/lib/jabber-net/test/jabber/protocol/iq/TimeTest.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-
-namespace test.jabber.protocol.iq
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TimeTest
-    {
-        [Test]
-        public void UTC()
-        {
-            XmlDocument doc = new XmlDocument();
-            TimeIQ iq = new TimeIQ(doc);
-            Time t = iq.Instruction;
-            t.AddChild(doc.CreateElement("utc", t.NamespaceURI));
-            Assert.AreEqual(DateTime.MinValue, t.UTC);
-            DateTime start = DateTime.UtcNow;
-            t.SetCurrentTime();
-
-            // SetCurrentTime only stores seconds portion, whereas UtcNow has all 
-            // kinds of precision.  Are we within a second of being correct?
-            TimeSpan ts = t.UTC - start;
-            Assert.IsTrue(Math.Abs(ts.TotalSeconds) < 1.0);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/stream/FactoryTest.cs b/lib/jabber-net/test/jabber/protocol/stream/FactoryTest.cs
deleted file mode 100644
index d9a4d54..0000000
--- a/lib/jabber-net/test/jabber/protocol/stream/FactoryTest.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using fact = jabber.protocol.stream.Factory;
-
-namespace test.jabber.protocol.stream
-{
-    /// <summary>
-    /// Summary description for StreamFactoryTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class StreamFactoryTest
-    {
-        [Test] public void Test_Create()
-        {
-            ElementFactory pf = new ElementFactory();
-            pf.AddType(new fact());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/stream/StreamTest.cs b/lib/jabber-net/test/jabber/protocol/stream/StreamTest.cs
deleted file mode 100644
index 8b27875..0000000
--- a/lib/jabber-net/test/jabber/protocol/stream/StreamTest.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using System.Text.RegularExpressions;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.stream;
-using fact = jabber.protocol.stream.Factory;
-
-namespace test.jabber.protocol.stream
-{
-    /// <summary>
-    /// Summary description for StreamTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class StreamTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [Test] public void Test_Create()
-        {
-            Stream s = new Stream(doc, "jabber:client");
-            Assert.IsTrue(
-                Regex.IsMatch(s.ToString(),
-                "<stream:stream id=\"[a-z0-9]+\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx\\.jabber\\.org/streams\" />",
-                RegexOptions.IgnoreCase), s.ToString());
-        }
-        [Test] public void Test_Error()
-        {
-            Error err = new Error(doc);
-            err.Message = "foo";
-            Assert.AreEqual("<stream:error " +
-                "xmlns:stream=\"http://etherx.jabber.org/streams\">foo</stream:error>", err.ToString());
-            ElementFactory sf = new ElementFactory();
-            sf.AddType(new fact());
-            XmlQualifiedName qname = new XmlQualifiedName(err.LocalName, err.NamespaceURI);
-            Element p = (Element) sf.GetElement(err.Prefix, qname, doc);
-            Assert.AreEqual(typeof(Error), p.GetType());
-        }
-        [Test] public void Test_StartTag()
-        {
-            Stream s = new Stream(doc, "jabber:client");
-            Assert.IsTrue(
-                Regex.IsMatch(s.StartTag(),
-                "<stream:stream xmlns:stream=\"http://etherx\\.jabber\\.org/streams\" id=\"[a-z0-9]+\" xmlns=\"jabber:client\">",
-                RegexOptions.IgnoreCase), s.StartTag());
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/x/DataTest.cs b/lib/jabber-net/test/jabber/protocol/x/DataTest.cs
deleted file mode 100644
index c1e1223..0000000
--- a/lib/jabber-net/test/jabber/protocol/x/DataTest.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.IO;
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.x;
-
-namespace test.jabber.protocol.x
-{
-    /// <summary>
-    /// Summary description for DataTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class DataTest
-    {
-        private bool gotElement = false;
-
-        private const string tstring = @"<stream><x xmlns='jabber:x:data'>
-      <instructions>
-        Welcome to the BloodBank-Service!  We thank you for registering with
-        us and helping to save lives.  Please fill out the following form.
-      </instructions>
-      <field type='hidden' var='form_number'>
-        <value>113452</value>
-      </field>
-      <field type='fixed'>
-        <value>We need your contact information.</value>
-      </field>
-      <field type='text-single' label='First Name' var='first'>
-        <required/>
-      </field>
-      <field type='text-single' label='Last Name' var='last'>
-        <required/>
-      </field>
-      <field type='list-single' label='Gender' var='gender'>
-        <value>male</value>
-        <option label='Male'><value>male</value></option>
-        <option label='Female'><value>female</value></option>
-      </field>
-      <field type='fixed'>
-        <value>We need your blood information.</value>
-      </field>
-      <field type='list-single' label='Blood Type' var='blood_type'>
-        <required/>
-        <value>a+</value>
-        <option label='A-Positive'><value>a+</value></option>
-        <option label='B-Negative'><value>b-</value></option>
-        etc...
-      </field>
-      <field type='list-single' label='Pints to give' var='pints'>
-        <required/>
-        <value>2</value>
-        <option label='Zero'><value>0</value></option>
-        <option label='One'><value>1</value></option>
-        <option label='Two'><value>2</value></option>
-        <option label='Three'><value>3</value></option>
-      </field>
-      <field type='boolean' label='Willing to donate' var='willing'>
-        <required/>
-        <value>1</value>
-      </field>
-    </x></stream>";
-
-        [Test] public void Test_Parse()
-        {
-            AsynchElementStream es = new AsynchElementStream();
-            es.AddFactory(new global::jabber.protocol.x.Factory());
-            es.OnElement += new ProtocolHandler(es_OnElement);
-            es.Push(System.Text.Encoding.UTF8.GetBytes(tstring));
-
-            Assert.IsTrue(gotElement);
-        }
-
-        void es_OnElement(object sender, XmlElement n)
-        {
-            Assert.IsInstanceOfType(typeof(global::jabber.protocol.x.Data), n);
-            Data d = (Data)n;
-            Assert.AreEqual(@"
-        Welcome to the BloodBank-Service!  We thank you for registering with
-        us and helping to save lives.  Please fill out the following form.
-      ", d.Instructions);
-            Field[] fields = d.GetFields();
-            Assert.AreEqual(9, fields.Length);
-            Assert.AreEqual("2", fields[7].Val);
-            Assert.AreEqual(true, fields[7].IsRequired);
-            Assert.AreEqual(false, fields[4].IsRequired);
-            Assert.AreEqual("Pints to give", fields[7].Label);
-            Assert.AreEqual("pints", fields[7].Var);
-            Assert.AreEqual(FieldType.list_single, fields[7].Type);
-            Assert.AreEqual(d.GetField("pints").Label, "Pints to give");
-
-            Option[] options = fields[7].GetOptions();
-            Assert.AreEqual(4, options.Length);
-            Assert.AreEqual("Two", options[2].Label);
-            Assert.AreEqual("2", options[2].Val);
-            gotElement = true;
-        }
-
-        [Test]
-        public void Test_Convert()
-        {
-            XmlDocument doc = new XmlDocument();
-            doc.LoadXml(tstring);
-
-            ElementFactory f = new ElementFactory();
-            f.AddType(new global::jabber.protocol.x.Factory());
-
-            Element stream = Element.AddTypes(doc.DocumentElement, f);
-            Data d = stream.GetChildElement<global::jabber.protocol.x.Data>();
-            Assert.IsNotNull(d);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/jabber/protocol/x/EventTest.cs b/lib/jabber-net/test/jabber/protocol/x/EventTest.cs
deleted file mode 100644
index 31b4016..0000000
--- a/lib/jabber-net/test/jabber/protocol/x/EventTest.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-using System;
-
-using System.Xml;
-using NUnit.Framework;
-
-using bedrock.util;
-using jabber.protocol;
-using jabber.protocol.x;
-
-namespace test.jabber.protocol.x
-{
-    /// <summary>
-    /// Summary description for AuthTest.
-    /// </summary>
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class EventTest
-    {
-        XmlDocument doc = new XmlDocument();
-        [SetUp]
-        public void SetUp()
-        {
-            Element.ResetID();
-        }
-        [Test] public void Test_Create()
-        {
-            Event e = new Event(doc);
-            Assert.AreEqual("<x xmlns=\"jabber:x:event\" />", e.ToString());
-            e.ID = "foo";
-            Assert.AreEqual("<x xmlns=\"jabber:x:event\"><id>foo</id></x>", e.ToString());
-            Assert.AreEqual("foo", e.ID);
-            Assert.AreEqual(EventType.NONE, e.Type);
-            e.Type = EventType.composing;
-            Assert.AreEqual(EventType.composing, e.Type);
-            e.Type = EventType.delivered;
-            Assert.AreEqual(EventType.delivered, e.Type);
-            Assert.AreEqual("<x xmlns=\"jabber:x:event\"><id>foo</id><delivered /></x>", e.ToString());
-            Assert.AreEqual(true, e.IsDelivered);
-            Assert.AreEqual(false, e.IsComposing);
-            e.IsComposing = true;
-            Assert.AreEqual("<x xmlns=\"jabber:x:event\"><id>foo</id><delivered /><composing /></x>", e.ToString());
-            Assert.AreEqual(EventType.composing | EventType.delivered, e.Type);
-        }
-    }
-}
diff --git a/lib/jabber-net/test/stringprep/TestDecompose.cs b/lib/jabber-net/test/stringprep/TestDecompose.cs
deleted file mode 100644
index 9685364..0000000
--- a/lib/jabber-net/test/stringprep/TestDecompose.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net can be used under either JOSL or the GPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-using System;
-using NUnit.Framework;
-using stringprep.unicode;
-
-namespace test.stringprep
-{
-    /// <summary>
-    /// Summary description for TestGeneric.
-    /// </summary>
-    [TestFixture]
-    public class TestDecompose
-    {
-        public void Test_Decomp()
-        {
-            char[] d = Decompose.Find('\x2000');
-            Assertion.AssertNotNull(d);
-            Assertion.AssertEquals(1, d.Length);
-            Assertion.AssertEquals('\x0020', d[0]);
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/test/stringprep/TestDraft.cs b/lib/jabber-net/test/stringprep/TestDraft.cs
deleted file mode 100644
index 6571b30..0000000
--- a/lib/jabber-net/test/stringprep/TestDraft.cs
+++ /dev/null
@@ -1,669 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-
-using System;
-using NUnit.Framework;
-using stringprep;
-using stringprep.steps;
-using bedrock.util;
-
-namespace test.stringprep
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TestDraft
-    {
-        private Profile nameprep = new Nameprep();
-
-        // 4.1 Map to nothing
-        [Test] public void Test_4_01()
-        {
-            string input = "\x0066\x006f\x006f\x00ad\x034f\x1806\x180b\x0062\x0061\x0072\x200b\x2060\x0062\x0061\x007a\xfe00\xfe08\xfe0f\xfeff";
-            string expected = "\x0066\x006f\x006f\x0062\x0061\x0072\x0062\x0061\x007a";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.2 Case folding ASCII U+0043 U+0041 U+0046 U+0045
-        [Test] public void Test_4_02()
-        {
-            string input = "\x0043\x0041\x0046\x0045";
-            string expected = "\x0063\x0061\x0066\x0065";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.3 Case folding 8bit U+00DF (german sharp s)
-        [Test] public void Test_4_03()
-        {
-            string input = "\x00df";
-            string expected = "\x0073\x0073";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.4 Case folding U+0130 (turkish capital I with dot)
-        [Test] public void Test_4_04()
-        {
-            string input = "\x0130";
-            string expected = "\x0069\x0307";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.5 Case folding multibyte U+0143 U+037A
-        [Test] public void Test_4_05()
-        {
-            string input = "\x0143\x037a";
-            string expected = "\x0144\x0020\x03b9";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        [Ignore("fails, due to lack of UTF-16 in .Net")]
-        // 4.6 Case folding U+2121 U+33C6 U+1D7BB
-        [Test] public void Test_4_06()
-        {
-            string input = "\x2121\x33c6\xd835\xdfbb";
-            string expected = "\x0074\x0065\x006c\x0063\x2215\x006b\x0067\x03c3";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.7 Normalization of U+006a U+030c U+00A0 U+00AA
-        [Test] public void Test_4_07()
-        {
-            string input = "\x006a\x030c\x00a0\x00aa";
-            string expected = "\x01f0\x0020\x0061";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.8 Case folding U+1FB7 and normalization
-        [Test] public void Test_4_08()
-        {
-            string input = "\x1fb7";
-            string expected = "\x1fb6\x03b9";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.9 Self-reverting case folding U+01F0 and normalization
-        [Test] public void Test_4_09()
-        {
-            string input = "\x01f0";
-            string expected = "\x01f0";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.10 Self-reverting case folding U+0390 and normalization
-        [Test] public void Test_4_10()
-        {
-            string input = "\x0390";
-            string expected = "\x0390";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.11 Self-reverting case folding U+03B0 and normalization
-        [Test] public void Test_4_11()
-        {
-            string input = "\x03b0";
-            string expected = "\x03b0";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.12 Self-reverting case folding U+1E96 and normalization
-        [Test] public void Test_4_12()
-        {
-            string input = "\x1e96";
-            string expected = "\x1e96";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.13 Self-reverting case folding U+1F56 and normalization
-        [Test] public void Test_4_13()
-        {
-            string input = "\x1f56";
-            string expected = "\x1f56";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.14 ASCII space character U+0020
-        [Test] public void Test_4_14()
-        {
-            string input = "\x0020";
-            string expected = "\x0020";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.15 Non-ASCII 8bit space character U+00A0
-        [Test] public void Test_4_15()
-        {
-            string input = "\x00a0";
-            string expected = "\x0020";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.16 Non-ASCII multibyte space character U+1680
-        [Test] public void Test_4_16()
-        {
-            string input = "\x1680";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.17 Non-ASCII multibyte space character U+2000
-        [Test] public void Test_4_17()
-        {
-            string input = "\x2000";
-            string expected = "\x0020";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.18 Zero Width Space U+200b
-        [Test] public void Test_4_18()
-        {
-            string input = "\x200b";
-            string expected = "";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.19 Non-ASCII multibyte space character U+3000
-        [Test] public void Test_4_19()
-        {
-            string input = "\x3000";
-            string expected = "\x0020";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.20 ASCII control characters U+0010 U+007F
-        [Test] public void Test_4_20()
-        {
-            string input = "\x0010\x007f";
-            string expected = "\x0010\x007f";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.21 Non-ASCII 8bit control character U+0085
-        [Test] public void Test_4_21()
-        {
-            string input = "\x0085";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.22 Non-ASCII multibyte control character U+180E
-        [Test] public void Test_4_22()
-        {
-            string input = "\x180e";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.23 Zero Width No-Break Space U+FEFF
-        [Test] public void Test_4_23()
-        {
-            string input = "\xfeff";
-            string expected = "";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.24 Non-ASCII control character U+1D175
-        [Test] public void Test_4_24()
-        {
-            string input = "\xd834\xdd75";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.25 Plane 0 private use character U+F123
-        [Test] public void Test_4_25()
-        {
-            string input = "\xf123";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.26 Plane 15 private use character U+F1234
-        [Test] public void Test_4_26()
-        {
-            string input = "\xdb84\xde34";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.27 Plane 16 private use character U+10F234
-        [Test] public void Test_4_27()
-        {
-            string input = "\xdbfc\xde34";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.28 Non-character code point U+8FFFE
-        [Test] public void Test_4_28()
-        {
-            string input = "\xd9ff\xdffe";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.29 Non-character code point U+10FFFF
-        [Test] public void Test_4_29()
-        {
-            string input = "\xdbff\xdfff";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.30 Surrogate code U+DF42
-        [Test] public void Test_4_30()
-        {
-            string input = "\xdf42";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.31 Non-plain text character U+FFFD
-        [Test] public void Test_4_31()
-        {
-            string input = "\xfffd";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.32 Ideographic description character U+2FF5
-        [Test] public void Test_4_32()
-        {
-            string input = "\x2ff5";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.33 Display property character U+0341
-        [Test] public void Test_4_33()
-        {
-            string input = "\x0341";
-            string expected = "\x0301";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.34 Left-to-right mark U+200E
-        [Test] public void Test_4_34()
-        {
-            string input = "\x200e";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.35 Deprecated U+202A
-        [Test] public void Test_4_35()
-        {
-            string input = "\x202a";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.36 Language tagging character U+E0001
-        [Test] public void Test_4_36()
-        {
-            string input = "\xdb40\xdc01";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.37 Language tagging character U+E0042
-        [Test] public void Test_4_37()
-        {
-            string input = "\xdb40\xdc42";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.38 Bidi: RandALCat character U+05BE and LCat characters
-        [Test] public void Test_4_38()
-        {
-            string input = "\x0066\x006f\x006f\x05be\x0062\x0061\x0072";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected BidiException");
-            }
-            catch (BidiException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected BidiException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.39 Bidi: RandALCat character U+FD50 and LCat characters
-        [Test] public void Test_4_39()
-        {
-            string input = "\x0066\x006f\x006f\xfd50\x0062\x0061\x0072";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected BidiException");
-            }
-            catch (BidiException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected BidiException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.40 Bidi: RandALCat character U+FB38 and LCat characters
-        [Test] public void Test_4_40()
-        {
-            string input = "\x0066\x006f\x006f\xfe76\x0062\x0061\x0072";
-            string expected = "\x0066\x006f\x006f\x0020\x064e\x0062\x0061\x0072";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.41 Bidi: RandALCat without trailing RandALCat U+0627 U+0031
-        [Test] public void Test_4_41()
-        {
-            string input = "\x0627\x0031";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected BidiException");
-            }
-            catch (BidiException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected BidiException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.42 Bidi: RandALCat character U+0627 U+0031 U+0628
-        [Test] public void Test_4_42()
-        {
-            string input = "\x0627\x0031\x0628";
-            string expected = "\x0627\x0031\x0628";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.43 Unassigned code point U+E0002
-        [Test] public void Test_4_43()
-        {
-            string input = "\xdb40\xdc02";
-            string expected = "";
-            try
-            {
-                expected = nameprep.Prepare(input);
-                Assert.Fail("Expected ProhibitedCharacterException");
-            }
-            catch (ProhibitedCharacterException)
-            {
-            }
-            catch (AssertionException)
-            {
-                throw;
-            }
-            catch (Exception e)
-            {
-               Assert.Fail("Expected ProhibitedCharacterException, got " + e.GetType().ToString());
-            }
-        }
-
-        // 4.44 Larger test (shrinking)
-        [Test] public void Test_4_44()
-        {
-            string input = "\x0058\x00ad\x00df\x0130\x2121\x006a\x030c\x00a0\x00aa\x03b0\x2000";
-            string expected = "\x0078\x0073\x0073\x0069\x0307\x0074\x0065\x006c\x01f0\x0020\x0061\x03b0\x0020";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-        // 4.45 Larger test (expanding)
-        [Test] public void Test_4_45()
-        {
-            string input = "\x0058\x00df\x3316\x0130\x2121\x249f\x3300";
-            string expected = "\x0078\x0073\x0073\x30ad\x30ed\x30e1\x30fc\x30c8\x30eb\x0069\x0307\x0074\x0065\x006c\x0028\x0064\x0029\x30a2\x30d1\x30fc\x30c8";
-            Assert.AreEqual(expected, nameprep.Prepare(input));
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/test/stringprep/TestNFKC.cs b/lib/jabber-net/test/stringprep/TestNFKC.cs
deleted file mode 100644
index c785180..0000000
--- a/lib/jabber-net/test/stringprep/TestNFKC.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-using System;
-using System.Text;
-using NUnit.Framework;
-using stringprep;
-using stringprep.steps;
-using bedrock.util;
-
-namespace test.stringprep
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TestNFKC
-    {
-        System.Text.Encoding UTF8 = System.Text.Encoding.UTF8;
-        NFKCStep step = new NFKCStep();
-
-        private void TryOne(string input, string expected)
-        {
-            StringBuilder i = new StringBuilder(input);
-            step.Prepare(i);
-            Assert.AreEqual(expected, i.ToString());
-        }
-
-        [Test] public void Test_1()
-        {
-            TryOne(UTF8.GetString(new byte[] {0xC2, 0xB5}), UTF8.GetString(new byte[] {0xCE, 0xBC}));
-        }
-
-        [Test] public void Test_2()
-        {
-            TryOne(UTF8.GetString(new byte[] {0xC2, 0xAA}), UTF8.GetString(new byte[] {0x61}));
-        }
-
-        [Test] public void Test_Normalization()
-        {
-            // http://www.unicode.org/unicode/faq/normalization.html
-            TryOne("\x03D3", "\x038E");
-        }
-
-        [Test] public void Test_Gurmukhi()
-        {
-            // http://www.unicode.org/charts/normalization/
-            TryOne("\x0a59", "\x0a16\x0a3c");
-            TryOne("\x0a5a", "\x0a17\x0a3c");
-            TryOne("\x0a5b", "\x0a1c\x0A3C");
-            TryOne("\x0A5E", "\x0A2B\x0A3C");
-            TryOne("\x0A33", "\x0A32\x0A3C");
-            TryOne("\x0A36", "\x0A38\x0A3C");
-        }
-
-        [Test] public void Test_Unchanged()
-        {
-            TryOne("\x0144\x0020\x03b9", "\x0144\x0020\x03b9");
-        }
-
-        [Test] public void Test_Navajo()
-        {
-            // a + ogonek + acute ==> a-ogonek + acute
-            TryOne("\x0061\x0328\x0301", "\x0105\x0301");
-            // i + ogonek + acute ==> i-ogonek + acute
-            TryOne("i\x0328\x0301", "\x012F\x0301");
-        }
-
-        [Test] public void Test_CannonicalOrdering()
-        {
-            // From Unicode 3.2, section 3.10
-
-            // The NFKC stuff does a Compose after these are specified, though.
-
-            // a-diaeresis + underdot => a + underdot + diaeresis
-            TryOne("\x00e4\x0323", "\x1ea1\x0308");
-            TryOne("\x00e4\x0323\x00e4\x0323\x00e4\x0323", "\x1ea1\x0308\x1ea1\x0308\x1ea1\x0308");
-
-            // a + diaeresis + underdot => a + underdot + diaeresis
-            TryOne("a\x0308\x0323", "\x1ea1\x0308");
-
-            // a + underdot + diaeresis => a + underdot + diaeresis
-            TryOne("a\x0323\x0308", "\x1ea1\x0308");
-
-            // a-underdot + diaeresis => a + underdot + diaeresis
-            TryOne("\x1ea1\x0308", "\x1ea1\x0308");
-
-
-            // a-diaeresis + breve => a + diaeresis + breve
-            TryOne("\x00e4\x0306", "\x00e4\x0306");
-
-            // a + diaeresis + breve => a + diaeresis + breve
-            TryOne("a\x0308\x0306", "\x00e4\x0306");
-
-            // a + breve + diaeresis => a + breve + diaeresis
-            TryOne("a\x0306\x0308", "\x0103\x0308");
-
-            // a-breve + diaeresis => a + breve + diaeresis
-            TryOne("\x0103\x0308", "\x0103\x0308");
-        }
-
-        [Test] public void Test_TR15_Annex_1()
-        {
-            TryOne("\x1E0A", "\x1E0A"); //a
-            TryOne("D\x0307", "\x1E0A"); //b
-            TryOne("\x1E0C\x0307", "\x1E0C\x0307"); //c
-            TryOne("\x1E0A\x0323", "\x1E0C\x0307"); //d
-            TryOne("D\x0307\x0323", "\x1E0C\x0307"); //e
-            TryOne("D\x0307\x031B\x0323", "\x1E0C\x031B\x0307"); //f
-            TryOne("\x1E14", "\x1E14"); //g
-            TryOne("\x0112\x0300", "\x1E14"); //h
-            TryOne("\x00C8\x0304", "\x00C8\x0304"); //i
-            TryOne("\x212B", "\x00C5"); //j
-            TryOne("\x00C5", "\x00C5"); //k
-
-            TryOne("�ffin", "�ffin"); //l'
-            TryOne("�\xFB03n", "�ffin"); //m'
-            TryOne("Henry IV", "Henry IV"); //n'
-            TryOne("Henry \x2163", "Henry IV"); //o'
-            TryOne("\x30AC", "\x30AC"); //p' ga
-            TryOne("\x30AB\x3099", "\x30AC"); //q' ka + ten
-            TryOne("\xFF76\xFF9E", "\x30AC"); //r' hw_ka + hw_ten
-            TryOne("\x30AB\xFF9E", "\x30AC"); //s' ka + hw_ten
-            TryOne("\xFF76\x3099", "\x30AC"); //t' hw_ka + ten
-            // TryOne("", ""); // can't find "kaks": I think it's Hangul.
-        }
-
-        // http://www.unicode.org/review/pr-29.html
-        [Test] public void Test_PR29()
-        {
-            //TODO: Try again with NFC, rather than NFKC.
-            TryOne("\x1100\x0300\x1161", "\x1100\x0300\x1161");
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/test/stringprep/TestNameprep.cs b/lib/jabber-net/test/stringprep/TestNameprep.cs
deleted file mode 100644
index 35d2e76..0000000
--- a/lib/jabber-net/test/stringprep/TestNameprep.cs
+++ /dev/null
@@ -1,359 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-using System;
-using NUnit.Framework;
-using stringprep;
-using stringprep.steps;
-using bedrock.util;
-
-namespace test.stringprep
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TestNameprep
-    {
-        private static System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-
-        private Profile nameprep = new Nameprep();
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="p"></param>
-        /// <param name="input">string with one UTF-8 byte per char, to enable easy cut-n-paste from the libidn tests.</param>
-        /// <param name="expected"></param>
-        private void TryOne(string input, string expected)
-        {
-            byte[] buf = new byte[input.Length];
-            for (int i=0; i<input.Length; i++)
-            {
-                buf[i] = (byte) input[i];
-            }
-            string in_enc = ENC.GetString(buf);
-            string output = nameprep.Prepare(in_enc);
-
-            buf = new byte[expected.Length];
-            for (int i=0; i<expected.Length; i++)
-            {
-                buf[i] = (byte) expected[i];
-            }
-            string ex = ENC.GetString(buf);
-
-            Assert.AreEqual(ex, output);
-        }
-
-        [Test] public void Test_NFKC_CaseFold()
-        {
-            string result = nameprep.Prepare("Henry \x2163");
-            Assert.AreEqual("henry iv", result);
-        }
-
-        [Test] public void Test_MapToNothing()
-        {
-            TryOne(
-                "foo\xC2\xAD\xCD\x8F\xE1\xA0\x86\xE1\xA0\x8B" +
-                "bar" + "\xE2\x80\x8B\xE2\x81\xA0" + "baz\xEF\xB8\x80\xEF\xB8\x88" +
-                "\xEF\xB8\x8F\xEF\xBB\xBF", "foobarbaz");
-        }
-
-        [Test] public void Test_CaseFolding_01()
-        {
-            // Case folding ASCII U+0043 U+0041 U+0046 U+0045
-            TryOne("CAFE", "cafe");
-        }
-
-        [Test] public void Test_CaseFolding_02()
-        {
-            // Case folding 8bit U+00DF (german sharp s)
-            TryOne("\xC3\x9F", "ss");
-        }
-
-        [Test] public void Test_CaseFolding_03()
-        {
-            // Case folding U+0130 (turkish capital I with dot)
-            TryOne("\xC4\xB0", "i\xcc\x87");
-        }
-
-        [Test] public void Test_CaseFolding_04()
-        {
-            // Case folding multibyte U+0143 U+037A
-            TryOne("\xC5\x83\xCD\xBA", "\xC5\x84 \xCE\xB9");
-        }
-
-        [Ignore("fails, due to lack of UTF-16 in .Net")]
-        [Test] public void Test_CaseFolding_05()
-        {
-            // Case folding U+2121 U+33C6 U+1D7BB
-            TryOne("\xE2\x84\xA1\xE3\x8F\x86\xF0\x9D\x9E\xBB",
-                "telc\xE2\x88\x95" + "kg\xCF\x83");
-        }
-
-        [Test] public void Test_CaseFolding_06()
-        {
-            // Normalization of U+006a U+030c U+00A0 U+00AA
-            TryOne("\x6A\xCC\x8C\xC2\xA0\xC2\xAA", "\xC7\xB0 a");
-        }
-
-        [Test] public void Test_CaseFolding_07()
-        {
-            // Case folding U+1FB7 and normalization
-            TryOne("\xE1\xBE\xB7", "\xE1\xBE\xB6\xCE\xB9");
-        }
-
-        [Test] public void Test_CaseFolding_08()
-        {
-            // Self-reverting case folding U+01F0 and normalization
-            TryOne("\xC7\xB0", "\xC7\xB0");
-        }
-
-        [Test] public void Test_CaseFolding_09()
-        {
-            // Self-reverting case folding U+0390 and normalization
-            TryOne("\xCE\x90", "\xCE\x90");
-        }
-
-        [Test] public void Test_CaseFolding_10()
-        {
-            // Self-reverting case folding U+03B0 and normalization
-            TryOne("\xCE\xB0", "\xCE\xB0");
-        }
-
-        [Test] public void Test_CaseFolding_11()
-        {
-            // Self-reverting case folding U+1E96 and normalization
-            TryOne("\xE1\xBA\x96", "\xE1\xBA\x96");
-        }
-
-        [Test] public void Test_CaseFolding_12()
-        {
-            // Self-reverting case folding U+1F56 and normalization
-            TryOne("\xE1\xBD\x96", "\xE1\xBD\x96");
-        }
-
-        [Test] public void Test_Space_01()
-        {
-            // ASCII space character U+0020
-            TryOne("\x20", "\x20");
-        }
-
-        [Test] public void Test_Space_02()
-        {
-            // Non-ASCII 8bit space character U+00A0
-            TryOne("\xC2\xA0", "\x20");
-        }
-
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Space_03()
-        {
-            // Non-ASCII multibyte space character U+1680",
-            TryOne("\xE1\x9A\x80", null);
-        }
-
-        [Test] public void Test_Space_04()
-        {
-            // Non-ASCII multibyte space character U+2000",
-            TryOne("\xE2\x80\x80", "\x20");
-        }
-
-        [Test] public void Test_Space_05()
-        {
-            // Zero Width Space U+200b",
-            TryOne("\xE2\x80\x8b", "");
-        }
-
-        [Test] public void Test_Space_06()
-        {
-            // Non-ASCII multibyte space character U+3000",
-            TryOne("\xE3\x80\x80", "\x20");
-        }
-
-        [Test] public void Test_Control_01()
-        {
-            // ASCII control characters U+0010 U+007F",
-            TryOne("\x10\x7F", "\x10\x7F");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Control_02()
-        {
-            // Non-ASCII 8bit control character U+0085",
-            TryOne("\xC2\x85", null);
-        }
-
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Control_03()
-        {
-            // Non-ASCII multibyte control character U+180E",
-            TryOne("\xE1\xA0\x8E", null);
-        }
-        [Test] public void Test_Control_04()
-        {
-            // Zero Width No-Break Space U+FEFF",
-            TryOne("\xEF\xBB\xBF", "");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Control_05()
-        {
-            // Non-ASCII control character U+1D175",
-            TryOne("\xF0\x9D\x85\xB5", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Plane_0_Private()
-        {
-            // Plane 0 private use character U+F123",
-            TryOne("\xEF\x84\xA3", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Plane_15_Private()
-        {
-            // Plane 15 private use character U+F1234",
-            TryOne("\xF3\xB1\x88\xB4", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Plane_16_Private()
-        {
-            // Plane 16 private use character U+10F234",
-            TryOne("\xF4\x8F\x88\xB4", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_NonCharacter_01()
-        {
-            // Non-character code point U+8FFFE",
-            TryOne("\xF2\x8F\xBF\xBE", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_NonCharacter_02 ()
-        {
-            // Non-character code point U+10FFFF",
-            TryOne("\xF4\x8F\xBF\xBF", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Surrogate()
-        {
-            // Surrogate code U+DF42",
-            //TryOne("\xED\xBD\x82", null);
-            string input = "\uDF42";
-            string output = nameprep.Prepare(input);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_NonPlaintext()
-        {
-            // Non-plain text character U+FFFD",
-            TryOne("\xEF\xBF\xBD", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_IdeographicDescription()
-        {
-            // Ideographic description character U+2FF5",
-            TryOne("\xE2\xBF\xB5", null);
-        }
-        [Test] public void Test_Property()
-        {
-            // Display property character U+0341",
-            TryOne("\xCD\x81", "\xCC\x81");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_LTR ()
-        {
-            // Left-to-right mark U+200E",
-            TryOne("\xE2\x80\x8E", "\xCC\x81");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Deprecated()
-        {
-            // Deprecated U+202A",
-            TryOne("\xE2\x80\xAA", "\xCC\x81");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Tagging_01()
-        {
-            // Language tagging character U+E0001",
-            TryOne("\xF3\xA0\x80\x81", "\xCC\x81");
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Tagging_02()
-        {
-            // Language tagging character U+E0042",
-            TryOne("\xF3\xA0\x81\x82", null);
-        }
-        [ExpectedException(typeof(BidiException))]
-        [Test] public void Test_Bidi_01()
-        {
-            // Bidi: RandALCat character U+05BE and LCat characters",
-            TryOne("foo\xD6\xBE" + "bar", null);
-        }
-        [ExpectedException(typeof(BidiException))]
-        [Test] public void Test_Bidi_02()
-        {
-            // Bidi: RandALCat character U+FD50 and LCat characters",
-            TryOne("foo\xEF\xB5\x90" + "bar", null);
-        }
-        [Test] public void Test_Bidi_03()
-        {
-            // Bidi: RandALCat character U+FB38 and LCat characters",
-            TryOne("foo\xEF\xB9\xB6" + "bar", "foo \xd9\x8e" + "bar");
-        }
-        [ExpectedException(typeof(BidiException))]
-        [Test] public void Test_Bidi_04()
-        {
-            // Bidi: RandALCat without trailing RandALCat U+0627 U+0031",
-            TryOne("\xD8\xA7\x31", null);
-        }
-
-        [Test] public void Test_Bidi_05()
-        {
-            // Bidi: RandALCat character U+0627 U+0031 U+0628",
-            TryOne("\xD8\xA7\x31\xD8\xA8", "\xD8\xA7\x31\xD8\xA8");
-        }
-
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Unassigned()
-        {
-            // Unassigned code point U+E0002",
-            TryOne("\xF3\xA0\x80\x82", null);
-        }
-
-        [Test] public void Test_LargerShrinking()
-        {
-            // Larger test (shrinking)",
-            //  TryOne("X\xC2\xAD\xC3\xDF\xC4\xB0\xE2\x84\xA1\x6a\xcc\x8c\xc2\xa0\xc2" + "\xaa\xce\xb0\xe2\x80\x80",
-            //         "xssi\xcc\x87" + "tel\xc7\xb0 a\xce\xb0 ");
-            TryOne("X\xC2\xAD\xC3\x9F\xC4\xB0\xE2\x84\xA1\x6a\xcc\x8c\xc2\xa0\xc2" + "\xaa\xce\xb0\xe2\x80\x80",
-                "xssi\xcc\x87" + "tel\xc7\xb0 a\xce\xb0 ");
-
-        }
-        [Test] public void Test_LargerExpanding()
-        {
-            // Larger test (expanding)",
-            TryOne("X\xC3\x9F\xe3\x8c\x96\xC4\xB0\xE2\x84\xA1\xE2\x92\x9F\xE3\x8c\x80",
-                "xss\xe3\x82\xad\xe3\x83\xad\xe3\x83\xa1\xe3\x83\xbc\xe3\x83\x88" +
-                "\xe3\x83\xab" + "i\xcc\x87" + "tel\x28" + "d\x29\xe3\x82\xa2\xe3\x83\x91" +
-                "\xe3\x83\xbc\xe3\x83\x88");
-        }
-
-        [Test] public void Test_OldBug()
-        {
-            // nameprep, exposed a bug in libstringprep 0.0.5",
-            TryOne("\xC2\xAA\x0A", "\x61\x0A");
-        }
-
-        [Test] public void Test_DomainName()
-        {
-            TryOne("ExAmPle.COM", "example.com");
-        }
-    }
-
-}
-#endif
diff --git a/lib/jabber-net/test/stringprep/TestNodeprep.cs b/lib/jabber-net/test/stringprep/TestNodeprep.cs
deleted file mode 100644
index e296cff..0000000
--- a/lib/jabber-net/test/stringprep/TestNodeprep.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-using System;
-using NUnit.Framework;
-using stringprep;
-using stringprep.steps;
-using bedrock.util;
-
-namespace test.stringprep
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TestNodeprep
-    {
-        private static System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-
-        private Profile nodeprep = new XmppNode();
-
-        private void TryOne(string input, string expected)
-        {
-            string output = nodeprep.Prepare(input);
-            Assert.AreEqual(expected, output);
-        }
-
-        [Test] public void Test_Good()
-        {
-            TryOne("HILDJJ", "hildjj");
-            TryOne("hildjj", "hildjj");
-            TryOne("\x226f", "\x226f"); // not greater than
-        }
-
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Dquote()
-        {
-            TryOne("\"", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Amp()
-        {
-            TryOne("&", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Squote()
-        {
-            TryOne("'", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Slash()
-        {
-            TryOne("/", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Colon()
-        {
-            TryOne(":", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Less()
-        {
-            TryOne("<", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Greater()
-        {
-            TryOne(">", null);
-        }
-#if !NO_STRINGPREP
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_SmallGreater()
-        {
-            TryOne("\xfe65", null); // small greater than
-        }
-#endif
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_At()
-        {
-            TryOne("@", null);
-        }
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Prep_Less()
-        {
-            // U+FE68: small commercial at
-            TryOne("\xFE6b", null);
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/test/stringprep/TestResourceprep.cs b/lib/jabber-net/test/stringprep/TestResourceprep.cs
deleted file mode 100644
index 334c50d..0000000
--- a/lib/jabber-net/test/stringprep/TestResourceprep.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- * --------------------------------------------------------------------------*/
-#if !NO_STRINGPREP
-
-using System;
-using NUnit.Framework;
-using stringprep;
-using stringprep.steps;
-using bedrock.util;
-
-namespace test.stringprep
-{
-    [SVN(@"$Id$")]
-    [TestFixture]
-    public class TestResourceprep
-    {
-        private static System.Text.Encoding ENC = System.Text.Encoding.UTF8;
-
-        private Profile resourceprep = new XmppResource();
-
-        private void TryOne(string input, string expected)
-        {
-            string output = resourceprep.Prepare(input);
-            Assert.AreEqual(expected, output);
-        }
-
-        [Test] public void Test_Good()
-        {
-            TryOne("Test", "Test");
-            TryOne("test", "test");
-        }
-
-        [ExpectedException(typeof(ProhibitedCharacterException))]
-        [Test] public void Test_Bad()
-        {
-            TryOne("Test\x180E", null);
-        }
-    }
-}
-#endif
diff --git a/lib/jabber-net/xpnet/ContentToken.cs b/lib/jabber-net/xpnet/ContentToken.cs
deleted file mode 100644
index 2f1e4d8..0000000
--- a/lib/jabber-net/xpnet/ContentToken.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// Represents information returned by <code>Encoding.tokenizeContent</code>.
-    /// @see Encoding#tokenizeContent
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class ContentToken : Token
-    {
-        private const int INIT_ATT_COUNT = 8;
-
-        private int attCount = 0;
-        private int[] attNameStart = new int[INIT_ATT_COUNT];
-        private int[] attNameEnd = new int[INIT_ATT_COUNT];
-        private int[] attValueStart = new int[INIT_ATT_COUNT];
-        private int[] attValueEnd = new int[INIT_ATT_COUNT];
-        private bool[] attNormalized = new bool[INIT_ATT_COUNT];
-
-
-        /// <summary>
-        /// Returns the number of attributes specified in the start-tag or empty element tag.
-        /// </summary>
-        /// <returns></returns>
-        public int getAttributeSpecifiedCount()
-        {
-            return attCount;
-        }
-
-        /// <summary>
-        /// Returns the index of the first character of the name of the
-        /// attribute index.
-        /// </summary>
-        /// <param name="i">Attribute index</param>
-        /// <returns>Index of the first character</returns>
-        public int getAttributeNameStart(int i)
-        {
-            if (i >= attCount)
-                throw new System.IndexOutOfRangeException();
-            return attNameStart[i];
-        }
-
-        /**
-                 * Returns the index following the last character of the name of the
-                 * attribute index <code>i</code>.
-                 */
-        public int getAttributeNameEnd(int i)
-        {
-            if (i >= attCount)
-                throw new System.IndexOutOfRangeException();
-            return attNameEnd[i];
-        }
-
-        /**
-         * Returns the index of the character following the opening quote of
-         * attribute index <code>i</code>.
-         */
-        public int getAttributeValueStart(int i)
-        {
-            if (i >= attCount)
-                throw new System.IndexOutOfRangeException();
-            return attValueStart[i];
-        }
-
-        /**
-         * Returns the index of the closing quote attribute index <code>i</code>.
-         */
-        public int getAttributeValueEnd(int i)
-        {
-            if (i >= attCount)
-                throw new System.IndexOutOfRangeException();
-            return attValueEnd[i];
-        }
-
-        /**
-                 * Returns true if attribute index <code>i</code> does not need to
-                 * be normalized.  This is an optimization that allows further processing
-                 * of the attribute to be avoided when it is known that normalization
-                 * cannot change the value of the attribute.
-                 */
-        public bool isAttributeNormalized(int i)
-        {
-            if (i >= attCount)
-                throw new System.IndexOutOfRangeException();
-            return attNormalized[i];
-        }
-
-
-        /// <summary>
-        /// Clear out all of the current attributes
-        /// </summary>
-        public void clearAttributes()
-        {
-            attCount = 0;
-        }
-
-        /// <summary>
-        /// Add a new attribute
-        /// </summary>
-        /// <param name="nameStart"></param>
-        /// <param name="nameEnd"></param>
-        /// <param name="valueStart"></param>
-        /// <param name="valueEnd"></param>
-        /// <param name="normalized"></param>
-        public void appendAttribute(int nameStart, int nameEnd,
-            int valueStart, int valueEnd,
-            bool normalized)
-        {
-
-            if (attCount == attNameStart.Length)
-            {
-                attNameStart = grow(attNameStart);
-                attNameEnd = grow(attNameEnd);
-                attValueStart = grow(attValueStart);
-                attValueEnd = grow(attValueEnd);
-                attNormalized = grow(attNormalized);
-            }
-            attNameStart[attCount] = nameStart;
-            attNameEnd[attCount] = nameEnd;
-            attValueStart[attCount] = valueStart;
-            attValueEnd[attCount] = valueEnd;
-            attNormalized[attCount] = normalized;
-            ++attCount;
-        }
-
-        /// <summary>
-        /// Is the current attribute unique?
-        /// </summary>
-        /// <param name="buf"></param>
-        public void checkAttributeUniqueness(byte[] buf)
-        {
-            for (int i = 1; i < attCount; i++)
-            {
-                int len = attNameEnd[i] - attNameStart[i];
-
-                for (int j = 0; j < i; j++)
-                {
-                    if (attNameEnd[j] - attNameStart[j] == len)
-                    {
-                        int n = len;
-                        int s1 = attNameStart[i];
-                        int s2 = attNameStart[j];
-                        do
-                        {
-                            if (--n < 0)
-                                throw new InvalidTokenException(attNameStart[i],
-                                    InvalidTokenException.DUPLICATE_ATTRIBUTE);
-                        } while (buf[s1++] == buf[s2++]);
-                    }
-                }
-            }
-        }
-
-        private static int[] grow(int[] v)
-        {
-            int[] tem = v;
-            v = new int[tem.Length << 1];
-
-            System.Buffer.BlockCopy(tem, 0, v, 0, System.Buffer.ByteLength(tem));
-
-            return v;
-        }
-
-        private static bool[] grow(bool[] v)
-        {
-            bool[] tem = v;
-            v = new bool[tem.Length << 1];
-
-            System.Buffer.BlockCopy(tem, 0, v, 0, System.Buffer.ByteLength(tem));
-
-            return v;
-        }
-
-    }
-}
diff --git a/lib/jabber-net/xpnet/Encoding.cs b/lib/jabber-net/xpnet/Encoding.cs
deleted file mode 100644
index ab56b7e..0000000
--- a/lib/jabber-net/xpnet/Encoding.cs
+++ /dev/null
@@ -1,3177 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// Tokens that might have been found
-    /// </summary>
-    [SVN(@"$Id$")]
-    public enum TOK
-    {
-        /**
-         * Represents one or more characters of data.
-         */
-        DATA_CHARS,
-
-        /**
-         * Represents a newline (CR, LF or CR followed by LF) in data.
-         */
-        DATA_NEWLINE,
-
-        /**
-         * Represents a complete start-tag <code><name></code>,
-         * that doesn't have any attribute specifications.
-         */
-        START_TAG_NO_ATTS,
-
-        /**
-         * Represents a complete start-tag <code><name
-         * att="val"></code>, that contains one or more
-         * attribute specifications.
-         */
-        START_TAG_WITH_ATTS,
-
-        /**
-         * Represents an empty element tag <code><name/></code>,
-         * that doesn't have any attribute specifications.
-         */
-        EMPTY_ELEMENT_NO_ATTS,
-
-        /**
-         * Represents an empty element tag <code><name
-         * att="val"/></code>, that contains one or more
-         * attribute specifications.
-         */
-        EMPTY_ELEMENT_WITH_ATTS,
-
-        /**
-         * Represents a complete end-tag <code></name></code>.
-         */
-        END_TAG,
-
-        /**
-         * Represents the start of a CDATA section
-         * <code><![CDATA[</code>.
-         */
-        CDATA_SECT_OPEN,
-
-        /**
-         * Represents the end of a CDATA section <code>]]></code>.
-         */
-        CDATA_SECT_CLOSE,
-
-        /**
-         * Represents a general entity reference.
-         */
-        ENTITY_REF,
-
-        /**
-         * Represents a general entity reference to a one of the 5
-         * predefined entities <code>amp</code>, <code>lt</code>,
-         * <code>gt</code>, <code>quot</code>, <code>apos</code>.
-         */
-        MAGIC_ENTITY_REF,
-
-        /**
-         * Represents a numeric character reference (decimal or
-         * hexadecimal), when the referenced character is less
-         * than or equal to 0xFFFF and so is represented by a
-         * single char.
-         */
-        CHAR_REF,
-
-        /**
-         * Represents a numeric character reference (decimal or
-         * hexadecimal), when the referenced character is greater
-         * than 0xFFFF and so is represented by a pair of chars.
-         */
-        CHAR_PAIR_REF,
-
-        /**
-         * Represents a processing instruction.
-         */
-        PI,
-
-        /**
-         * Represents an XML declaration or text declaration (a
-         * processing instruction whose target is
-         * <code>xml</code>).
-         */
-        XML_DECL,
-
-        /**
-         * Represents a comment <code><!-- comment --></code>.
-         * This can occur both in the prolog and in content.
-         */
-        COMMENT,
-
-        /**
-         * Represents a white space character in an attribute
-         * value, excluding white space characters that are part
-         * of line boundaries.
-         */
-        ATTRIBUTE_VALUE_S,
-
-        /**
-         * Represents a parameter entity reference in the prolog.
-         */
-        PARAM_ENTITY_REF,
-
-        /**
-         * Represents whitespace in the prolog.
-         * The token contains one or more whitespace characters.
-         */
-        PROLOG_S,
-
-        /**
-         * Represents <code><!NAME</code> in the prolog.
-         */
-        DECL_OPEN,
-
-        /**
-         * Represents <code>></code> in the prolog.
-         */
-        DECL_CLOSE,
-
-        /**
-         * Represents a name in the prolog.
-         */
-        NAME,
-
-        /**
-         * Represents a name token in the prolog that is not a name.
-         */
-        NMTOKEN,
-
-        /**
-         * Represents <code>#NAME</code> in the prolog.
-         */
-        POUND_NAME,
-
-        /**
-         * Represents <code>|</code> in the prolog.
-         */
-        OR,
-
-        /**
-         * Represents a <code>%</code> in the prolog that does not start
-         * a parameter entity reference.
-         * This can occur in an entity declaration.
-         */
-        PERCENT,
-
-        /**
-         * Represents a <code>(</code> in the prolog.
-         */
-        OPEN_PAREN,
-
-        /**
-         * Represents a <code>)</code> in the prolog that is not
-         * followed immediately by any of
-         *  <code>*</code>, <code>+</code> or <code>?</code>.
-         */
-        CLOSE_PAREN,
-
-        /**
-         * Represents <code>[</code> in the prolog.
-         */
-        OPEN_BRACKET,
-
-        /**
-         * Represents <code>]</code> in the prolog.
-         */
-        CLOSE_BRACKET,
-
-        /**
-         * Represents a literal (EntityValue, AttValue, SystemLiteral or
-         * PubidLiteral).
-         */
-        LITERAL,
-
-        /**
-         * Represents a name followed immediately by <code>?</code>.
-         */
-        NAME_QUESTION,
-
-        /**
-         * Represents a name followed immediately by <code>*</code>.
-         */
-        NAME_ASTERISK,
-
-        /**
-         * Represents a name followed immediately by <code>+</code>.
-         */
-        NAME_PLUS,
-
-        /**
-         * Represents <code><![</code> in the prolog.
-         */
-        COND_SECT_OPEN,
-
-        /**
-         * Represents <code>]]></code> in the prolog.
-         */
-        COND_SECT_CLOSE,
-
-        /**
-         * Represents <code>)?</code> in the prolog.
-         */
-        CLOSE_PAREN_QUESTION,
-
-        /**
-         * Represents <code>)*</code> in the prolog.
-         */
-        CLOSE_PAREN_ASTERISK,
-
-        /**
-         * Represents <code>)+</code> in the prolog.
-         */
-        CLOSE_PAREN_PLUS,
-
-        /**
-         * Represents <code>,</code> in the prolog.
-         */
-        COMMA,
-    };
-
-    /// <summary>
-    /// Base tokenizer class
-    /// </summary>
-    [SVN(@"$Id$")]
-    public abstract class Encoding
-    {
-        // Bytes with type < 0 may not be data in content.
-        // The negation of the lead byte type gives the total number of bytes.
-
-        /// <summary>
-        /// Need more bytes
-        /// </summary>
-        protected const int BT_LEAD2 = -2;
-        /// <summary>
-        /// Need more bytes
-        /// </summary>
-        protected const int BT_LEAD3 = -3;
-        /// <summary>
-        /// Need more bytes
-        /// </summary>
-        protected const int BT_LEAD4 = -4;
-        /// <summary>
-        /// Not XML
-        /// </summary>
-        protected const int BT_NONXML = BT_LEAD4 - 1;
-        /// <summary>
-        /// Malformed XML
-        /// </summary>
-        protected const int BT_MALFORM = BT_NONXML - 1;
-        /// <summary>
-        /// Less than
-        /// </summary>
-        protected const int BT_LT = BT_MALFORM - 1;
-        /// <summary>
-        /// Ampersand
-        /// </summary>
-        protected const int BT_AMP = BT_LT - 1;
-        /// <summary>
-        /// right square bracket
-        /// </summary>
-        protected const int BT_RSQB = BT_AMP - 1;
-        /// <summary>
-        /// carriage return
-        /// </summary>
-        protected const int BT_CR = BT_RSQB - 1;
-        /// <summary>
-        /// line feed
-        /// </summary>
-        protected const int BT_LF = BT_CR - 1;
-
-        // Bytes with type >= 0 are treated as data in content.
-
-        /// <summary>
-        /// greater than
-        /// </summary>
-        protected const int BT_GT = 0;
-        /// <summary>
-        /// Quote
-        /// </summary>
-        protected const int BT_QUOT = BT_GT + 1;
-        /// <summary>
-        /// Apostrophe
-        /// </summary>
-        protected const int BT_APOS = BT_QUOT + 1;
-        /// <summary>
-        /// Equal sign
-        /// </summary>
-        protected const int BT_EQUALS = BT_APOS + 1;
-        /// <summary>
-        /// Question mark
-        /// </summary>
-        protected const int BT_QUEST = BT_EQUALS + 1;
-        /// <summary>
-        /// Exclamation point
-        /// </summary>
-        protected const int BT_EXCL = BT_QUEST + 1;
-        /// <summary>
-        /// Solidus (/)
-        /// </summary>
-        protected const int BT_SOL = BT_EXCL + 1;
-        /// <summary>
-        /// Semicolon
-        /// </summary>
-        protected const int BT_SEMI = BT_SOL + 1;
-        /// <summary>
-        /// Hash
-        /// </summary>
-        protected const int BT_NUM = BT_SEMI + 1;
-        /// <summary>
-        /// Left square bracket
-        /// </summary>
-        protected const int BT_LSQB = BT_NUM + 1;
-        /// <summary>
-        /// space
-        /// </summary>
-        protected const int BT_S = BT_LSQB + 1;
-        /// <summary>
-        ///
-        /// </summary>
-        protected const int BT_NMSTRT = BT_S + 1;
-        /// <summary>
-        ///
-        /// </summary>
-        protected const int BT_NAME = BT_NMSTRT + 1;
-        /// <summary>
-        /// Minus
-        /// </summary>
-        protected const int BT_MINUS = BT_NAME + 1;
-        /// <summary>
-        /// Other
-        /// </summary>
-        protected const int BT_OTHER = BT_MINUS + 1;
-        /// <summary>
-        /// Percent
-        /// </summary>
-        protected const int BT_PERCNT = BT_OTHER + 1;
-        /// <summary>
-        /// Left paren
-        /// </summary>
-        protected const int BT_LPAR = BT_PERCNT + 1;
-        /// <summary>
-        /// Right paren
-        /// </summary>
-        protected const int BT_RPAR = BT_LPAR + 1;
-        /// <summary>
-        ///
-        /// </summary>
-        protected const int BT_AST = BT_RPAR + 1;
-        /// <summary>
-        /// +
-        /// </summary>
-        protected const int BT_PLUS = BT_AST + 1;
-        /// <summary>
-        /// ,
-        /// </summary>
-        protected const int BT_COMMA = BT_PLUS + 1;
-        /// <summary>
-        /// Pipe
-        /// </summary>
-        protected const int BT_VERBAR = BT_COMMA + 1;
-
-        /// <summary>
-        /// What syntax do each of the ASCII7 characters have?
-        /// </summary>
-        protected static readonly int [] asciiTypeTable = new int[]
-        {
-            /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
-            /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
-            /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
-            /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
-            /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
-            /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
-            /* 0x30 */ BT_NAME, BT_NAME, BT_NAME, BT_NAME,
-            /* 0x34 */ BT_NAME, BT_NAME, BT_NAME, BT_NAME,
-            /* 0x38 */ BT_NAME, BT_NAME, BT_NMSTRT, BT_SEMI,
-            /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
-            /* 0x40 */ BT_OTHER, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x44 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
-            /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
-            /* 0x60 */ BT_OTHER, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x64 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
-            /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
-            /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
-        };
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sourceBuf"></param>
-        /// <param name="sourceStart"></param>
-        /// <param name="sourceEnd"></param>
-        /// <param name="targetBuf"></param>
-        /// <param name="targetStart"></param>
-        /// <returns></returns>
-        protected abstract int convert(byte[] sourceBuf,
-            int sourceStart, int sourceEnd,
-            char[] targetBuf, int targetStart);
-
-
-        private static Encoding utf8Encoding;
-
-        private const byte UTF8_ENCODING = 0;
-        private const byte UTF16_LITTLE_ENDIAN_ENCODING = 1;
-        private const byte UTF16_BIG_ENDIAN_ENCODING = 2;
-        private const byte INTERNAL_ENCODING = 3;
-        private const byte ISO8859_1_ENCODING = 4;
-        private const byte ASCII_ENCODING = 5;
-
-        private static Encoding getEncoding(byte enc)
-        {
-            switch (enc)
-            {
-                case UTF8_ENCODING:
-                    if (utf8Encoding == null)
-                        utf8Encoding = new UTF8Encoding();
-                    return utf8Encoding;
-                    /*
-                case UTF16_LITTLE_ENDIAN_ENCODING:
-                    if (utf16LittleEndianEncoding == null)
-                        utf16LittleEndianEncoding = new UTF16LittleEndianEncoding();
-                    return utf16LittleEndianEncoding;
-                case UTF16_BIG_ENDIAN_ENCODING:
-                    if (utf16BigEndianEncoding == null)
-                        utf16BigEndianEncoding = new UTF16BigEndianEncoding();
-                    return utf16BigEndianEncoding;
-                case INTERNAL_ENCODING:
-                    if (internalEncoding == null)
-                        internalEncoding = new InternalEncoding();
-                    return internalEncoding;
-                case ISO8859_1_ENCODING:
-                    if (iso8859_1Encoding == null)
-                        iso8859_1Encoding = new ISO8859_1Encoding();
-                    return iso8859_1Encoding;
-                case ASCII_ENCODING:
-                    if (asciiEncoding == null)
-                        asciiEncoding = new ASCIIEncoding();
-                    return asciiEncoding;
-                    */
-            }
-            return null;
-        }
-
-        private int minBPC;
-
-        /// <summary>
-        /// Constructor called by subclasses to set the minimum bytes per character
-        /// </summary>
-        /// <param name="minBPC"></param>
-        protected Encoding(int minBPC)
-        {
-            this.minBPC = minBPC;
-        }
-
-        /// <summary>
-        /// Get the byte type of the next byte.  There are guaranteed to be minBPC available bytes starting at off.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected abstract int byteType(byte[] buf, int off);
-
-        /// <summary>
-        /// Really only works for ASCII7.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected abstract char byteToAscii(byte[] buf, int off);
-
-        /// <summary>
-        /// This must only be called when c is an (XML significant)
-        /// ASCII character.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <param name="c"></param>
-        /// <returns></returns>
-        protected abstract bool charMatches(byte[] buf, int off, char c);
-
-        /// <summary>
-        /// Called only when byteType(buf, off) == BT_LEAD2
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected virtual int byteType2(byte[] buf, int off)
-        {
-            return BT_OTHER;
-        }
-
-        /// <summary>
-        /// Called only when byteType(buf, off) == BT_LEAD3
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        int byteType3(byte[] buf, int off)
-        {
-            return BT_OTHER;
-        }
-
-        /// <summary>
-        /// Called only when byteType(buf, off) == BT_LEAD4
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        int byteType4(byte[] buf, int off)
-        {
-            return BT_OTHER;
-        }
-
-        void check2(byte[] buf, int off) { }
-        void check3(byte[] buf, int off) { }
-        void check4(byte[] buf, int off) { }
-
-        /**
-         * Moves a position forward.  On entry, <code>pos</code> gives
-         * the position of the byte at index <code>off</code> in
-         * <code>buf</code>.  On exit, it <code>pos</code> will give
-         * the position of the byte at index <code>end</code>, which
-         * must be greater than or equal to <code>off</code>.  The
-         * bytes between <code>off</code> and <code>end</code> must
-         * encode one or more complete characters.  A carriage return
-         * followed by a line feed will be treated as a single line
-         * delimiter provided that they are given to
-         * <code>movePosition</code> together.
-         */
-        protected abstract void movePosition(byte[] buf, int off, int end, Position pos);
-
-        private void checkCharMatches(byte[] buf, int off, char c)
-        {
-            if (!charMatches(buf, off, c))
-                throw new InvalidTokenException(off);
-        }
-
-        /* off points to character following "<!-" */
-        private TOK scanComment(byte[] buf, int off, int end, Token token)
-        {
-            if (off != end)
-            {
-                checkCharMatches(buf, off, '-');
-                off += minBPC;
-                while (off != end)
-                {
-                    switch (byteType(buf, off))
-                    {
-                        case BT_LEAD2:
-                            if (end - off < 2)
-                                throw new PartialCharException(off);
-                            check2(buf, off);
-                            off += 2;
-                            break;
-                        case BT_LEAD3:
-                            if (end - off < 3)
-                                throw new PartialCharException(off);
-                            check3(buf, off);
-                            off += 3;
-                            break;
-                        case BT_LEAD4:
-                            if (end - off < 4)
-                                throw new PartialCharException(off);
-                            check4(buf, off);
-                            off += 4;
-                            break;
-                        case BT_NONXML:
-                        case BT_MALFORM:
-                            throw new InvalidTokenException(off);
-                        case BT_MINUS:
-                            if ((off += minBPC) == end)
-                                throw new PartialTokenException();
-                            if (charMatches(buf, off, '-'))
-                            {
-                                if ((off += minBPC) == end)
-                                    throw new PartialTokenException();
-                                checkCharMatches(buf, off, '>');
-                                token.TokenEnd = off + minBPC;
-                                return TOK.COMMENT;
-                            }
-                            break;
-                        default:
-                            off += minBPC;
-                            break;
-                    }
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following "<!" */
-        private TOK scanDecl(byte[] buf, int off, int end, Token token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_MINUS:
-                    return scanComment(buf, off + minBPC, end, token);
-                case BT_LSQB:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.COND_SECT_OPEN;
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_PERCNT:
-                        if (off + minBPC == end)
-                            throw new PartialTokenException();
-                        /* don't allow <!ENTITY% foo "whatever"> */
-                    switch (byteType(buf, off + minBPC))
-                    {
-                        case BT_S:
-                        case BT_CR:
-                        case BT_LF:
-                        case BT_PERCNT:
-                            throw new InvalidTokenException(off);
-                    }
-                        /* fall through */
-                        goto case BT_S;
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        token.TokenEnd = off;
-                        return TOK.DECL_OPEN;
-                    case BT_NMSTRT:
-                        off += minBPC;
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        private bool targetIsXml(byte[] buf, int off, int end)
-        {
-            bool upper = false;
-            if (end - off != minBPC*3)
-                return false;
-            switch (byteToAscii(buf, off))
-            {
-                case 'x':
-                    break;
-                case 'X':
-                    upper = true;
-                    break;
-                default:
-                    return false;
-            }
-            off += minBPC;
-            switch (byteToAscii(buf, off))
-            {
-                case 'm':
-                    break;
-                case 'M':
-                    upper = true;
-                    break;
-                default:
-                    return false;
-            }
-            off += minBPC;
-            switch (byteToAscii(buf, off))
-            {
-                case 'l':
-                    break;
-                case 'L':
-                    upper = true;
-                    break;
-                default:
-                    return false;
-            }
-            if (upper)
-                throw new InvalidTokenException(off, InvalidTokenException.XML_TARGET);
-            return true;
-        }
-
-        /* off points to character following "<?" */
-
-        private TOK scanPi(byte[] buf, int off, int end, Token token)
-        {
-            int target = off;
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        bool isXml = targetIsXml(buf, target, off);
-                        token.NameEnd = off;
-                        off += minBPC;
-                        while (off != end)
-                        {
-                            switch (byteType(buf, off))
-                            {
-                                case BT_LEAD2:
-                                    if (end - off < 2)
-                                        throw new PartialCharException(off);
-                                    check2(buf, off);
-                                    off += 2;
-                                    break;
-                                case BT_LEAD3:
-                                    if (end - off < 3)
-                                        throw new PartialCharException(off);
-                                    check3(buf, off);
-                                    off += 3;
-                                    break;
-                                case BT_LEAD4:
-                                    if (end - off < 4)
-                                        throw new PartialCharException(off);
-                                    check4(buf, off);
-                                    off += 4;
-                                    break;
-                                case BT_NONXML:
-                                case BT_MALFORM:
-                                    throw new InvalidTokenException(off);
-                                case BT_QUEST:
-                                    off += minBPC;
-                                    if (off == end)
-                                        throw new PartialTokenException();
-                                    if (charMatches(buf, off, '>'))
-                                    {
-                                        token.TokenEnd = off + minBPC;
-                                        if (isXml)
-                                            return TOK.XML_DECL;
-                                        else
-                                            return TOK.PI;
-                                    }
-                                    break;
-                                default:
-                                    off += minBPC;
-                                    break;
-                            }
-                        }
-                        throw new PartialTokenException();
-                    case BT_QUEST:
-                        token.NameEnd = off;
-                        off += minBPC;
-                        if (off == end)
-                            throw new PartialTokenException();
-                        checkCharMatches(buf, off, '>');
-                        token.TokenEnd = off + minBPC;
-                        return (targetIsXml(buf, target, token.NameEnd)
-                            ? TOK.XML_DECL
-                            : TOK.PI);
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following "<![" */
-        private const string CDATA = "CDATA[";
-
-        private TOK scanCdataSection(byte[] buf, int off, int end, Token token)
-        {
-            /* "CDATA[".length() == 6 */
-            if (end - off < 6 * minBPC)
-                throw new PartialTokenException();
-            for (int i = 0; i < CDATA.Length; i++, off += minBPC)
-                checkCharMatches(buf, off, CDATA[i]);
-            token.TokenEnd = off;
-            return TOK.CDATA_SECT_OPEN;
-        }
-
-        /**
-         * Scans the first token of a byte subarrary that starts with the
-         * content of a CDATA section.
-         * Returns one of the following integers according to the type of token
-         * that the subarray starts with:
-         * <ul>
-         * <li><code>TOK.DATA_CHARS</code></li>
-         * <li><code>TOK.DATA_NEWLINE</code></li>
-         * <li><code>TOK.CDATA_SECT_CLOSE</code></li>
-         * </ul>
-         * <p>
-         * Information about the token is stored in <code>token</code>.
-         * </p>
-         * After <code>TOK.CDATA_SECT_CLOSE</code> is returned, the application
-         * should use <code>tokenizeContent</code>.
-         *
-         * @exception EmptyTokenException if the subarray is empty
-         * @exception PartialTokenException if the subarray contains only part of
-         * a legal token
-         * @exception InvalidTokenException if the subarrary does not start
-         * with a legal token or part of one
-         * @exception ExtensibleTokenException if the subarray encodes just a carriage
-         * return ('\r')
-         *
-         * @see #TOK.DATA_CHARS
-         * @see #TOK.DATA_NEWLINE
-         * @see #TOK.CDATA_SECT_CLOSE
-         * @see Token
-         * @see EmptyTokenException
-         * @see PartialTokenException
-         * @see InvalidTokenException
-         * @see ExtensibleTokenException
-         * @see #tokenizeContent
-         */
-        public TOK tokenizeCdataSection(byte[] buf, int off, int end,
-            Token token)
-        {
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            if (off == end)
-                throw new EmptyTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_RSQB:
-                    off += minBPC;
-                    if (off == end)
-                        throw new PartialTokenException();
-                    if (!charMatches(buf, off, ']'))
-                        break;
-                    off += minBPC;
-                    if (off == end)
-                        throw new PartialTokenException();
-                    if (!charMatches(buf, off, '>'))
-                    {
-                        off -= minBPC;
-                        break;
-                    }
-                    token.TokenEnd = off + minBPC;
-                    return TOK.CDATA_SECT_CLOSE;
-                case BT_CR:
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
-                    if (byteType(buf, off) == BT_LF)
-                        off += minBPC;
-                    token.TokenEnd = off;
-                    return TOK.DATA_NEWLINE;
-                case BT_LF:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.DATA_NEWLINE;
-                case BT_NONXML:
-                case BT_MALFORM:
-                    throw new InvalidTokenException(off);
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    check2(buf, off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    check3(buf, off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    check4(buf, off);
-                    off += 4;
-                    break;
-                default:
-                    off += minBPC;
-                    break;
-            }
-            token.TokenEnd = extendCdata(buf, off, end);
-            return TOK.DATA_CHARS;
-        }
-
-        int extendCdata(byte[] buf, int off, int end)
-        {
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            return off;
-                        check2(buf, off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            return off;
-                        check3(buf, off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            return off;
-                        check4(buf, off);
-                        off += 4;
-                        break;
-                    case BT_RSQB:
-                    case BT_NONXML:
-                    case BT_MALFORM:
-                    case BT_CR:
-                    case BT_LF:
-                        return off;
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            return off;
-        }
-
-
-        /* off points to character following "</" */
-        private TOK scanEndTag(byte[] buf, int off, int end, Token token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        token.NameEnd = off;
-                        for (off += minBPC; off != end; off += minBPC)
-                        {
-                            switch (byteType(buf, off))
-                            {
-                                case BT_S:
-                                case BT_CR:
-                                case BT_LF:
-                                    break;
-                                case BT_GT:
-                                    token.TokenEnd = off + minBPC;
-                                    return TOK.END_TAG;
-                                default:
-                                    throw new InvalidTokenException(off);
-                            }
-                        }
-                        throw new PartialTokenException();
-                    case BT_GT:
-                        token.NameEnd = off;
-                        token.TokenEnd = off + minBPC;
-                        return TOK.END_TAG;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following "&#X" */
-        private TOK scanHexCharRef(byte[] buf, int off, int end, Token token)
-        {
-            if (off != end)
-            {
-                int c = byteToAscii(buf, off);
-                int num;
-                switch (c)
-                {
-                    case '0': case '1': case '2': case '3': case '4':
-                    case '5': case '6': case '7': case '8': case '9':
-                        num = c - '0';
-                        break;
-                    case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
-                        num = c - ('A' - 10);
-                        break;
-                    case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
-                        num = c - ('a' - 10);
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-                for (off += minBPC; off != end; off += minBPC)
-                {
-                    c = byteToAscii(buf, off);
-                    switch (c)
-                    {
-                        case '0': case '1': case '2': case '3': case '4':
-                        case '5': case '6': case '7': case '8': case '9':
-                            num = (num << 4) + c - '0';
-                            break;
-                        case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
-                            num = (num << 4) + c - ('A' - 10);
-                            break;
-                        case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
-                            num = (num << 4) + c - ('a' - 10);
-                            break;
-                        case ';':
-                            token.TokenEnd = off + minBPC;
-                            return setRefChar(num, token);
-                        default:
-                            throw new InvalidTokenException(off);
-                    }
-                    if (num >= 0x110000)
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following "&#" */
-        private TOK scanCharRef(byte[] buf, int off, int end, Token token)
-        {
-            if (off != end)
-            {
-                int c = byteToAscii(buf, off);
-                switch (c)
-                {
-                    case 'x':
-                        return scanHexCharRef(buf, off + minBPC, end, token);
-                    case '0':
-                    case '1':
-                    case '2':
-                    case '3':
-                    case '4':
-                    case '5':
-                    case '6':
-                    case '7':
-                    case '8':
-                    case '9':
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-
-                int num = c - '0';
-                for (off += minBPC; off != end; off += minBPC)
-                {
-                    c = byteToAscii(buf, off);
-                    switch (c)
-                    {
-                        case '0':
-                        case '1':
-                        case '2':
-                        case '3':
-                        case '4':
-                        case '5':
-                        case '6':
-                        case '7':
-                        case '8':
-                        case '9':
-                            num = num * 10 + (c - '0');
-                            if (num < 0x110000)
-                                break;
-                            /* fall through */
-                            goto default;
-                        default:
-                            throw new InvalidTokenException(off);
-                        case ';':
-                            token.TokenEnd = off + minBPC;
-                            return setRefChar(num, token);
-                    }
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* num is known to be < 0x110000; return the token code */
-        private TOK setRefChar(int num, Token token)
-        {
-            if (num < 0x10000)
-            {
-                switch (charTypeTable[num >> 8][num & 0xFF])
-                {
-                    case BT_NONXML:
-                    case BT_LEAD4:
-                    case BT_MALFORM:
-                        throw new InvalidTokenException(token.TokenEnd - minBPC);
-                }
-                token.RefChar1 = (char)num;
-                return TOK.CHAR_REF;
-            }
-            else
-            {
-                num -= 0x10000;
-                token.RefChar1 = (char)((num >> 10) + 0xD800);
-                token.RefChar2 = (char)((num & ((1 << 10) - 1)) + 0xDC00);
-                return TOK.CHAR_PAIR_REF;
-            }
-        }
-
-        private bool isMagicEntityRef(byte[] buf, int off, int end, Token token)
-        {
-            switch (byteToAscii(buf, off))
-            {
-                case 'a':
-                    if (end - off < minBPC*4)
-                        break;
-                switch (byteToAscii(buf, off + minBPC))
-                {
-                    case 'm':
-                        if (charMatches(buf, off + minBPC*2, 'p')
-                            && charMatches(buf, off + minBPC*3, ';'))
-                        {
-                            token.TokenEnd = off + minBPC*4;
-                            token.RefChar1 = '&';
-                            return true;
-                        }
-                        break;
-                    case 'p':
-                        if (end - off >= minBPC*5
-                            && charMatches(buf, off + minBPC*2, 'o')
-                            && charMatches(buf, off + minBPC*3, 's')
-                            && charMatches(buf, off + minBPC*4, ';'))
-                        {
-                            token.TokenEnd = off + minBPC*5;
-                            token.RefChar1 = '\'';
-                            return true;
-                        }
-                        break;
-                }
-                    break;
-                case 'l':
-                    if (end - off >= minBPC*3
-                        && charMatches(buf, off + minBPC, 't')
-                        && charMatches(buf, off + minBPC*2, ';'))
-                    {
-                        token.TokenEnd = off + minBPC*3;
-                        token.RefChar1 = '<';
-                        return true;
-                    }
-                    break;
-                case 'g':
-                    if (end - off >= minBPC*3
-                        && charMatches(buf, off + minBPC, 't')
-                        && charMatches(buf, off + minBPC*2, ';'))
-                    {
-                        token.TokenEnd = off + minBPC*3;
-                        token.RefChar1 = '>';
-                        return true;
-                    }
-                    break;
-                case 'q':
-                    if (end - off >= minBPC*5
-                        && charMatches(buf, off + minBPC, 'u')
-                        && charMatches(buf, off + minBPC*2, 'o')
-                        && charMatches(buf, off + minBPC*3, 't')
-                        && charMatches(buf, off + minBPC*4, ';'))
-                    {
-                        token.TokenEnd = off + minBPC*5;
-                        token.RefChar1 = '"';
-                        return true;
-                    }
-                    break;
-            }
-            return false;
-        }
-
-        /* off points to character following "&" */
-        private TOK scanRef(byte[] buf, int off, int end, Token token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            if (isMagicEntityRef(buf, off, end, token))
-                return TOK.MAGIC_ENTITY_REF;
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                case BT_NUM:
-                    return scanCharRef(buf, off + minBPC, end, token);
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_SEMI:
-                        token.NameEnd = off;
-                        token.TokenEnd = off + minBPC;
-                        return TOK.ENTITY_REF;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following first character of
-           attribute name */
-        private TOK scanAtts(int nameStart, byte[] buf, int off, int end,
-            ContentToken token)
-        {
-            int NameEnd = -1;
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        NameEnd = off;
-                        for (;;)
-                        {
-                            off += minBPC;
-                            if (off == end)
-                                throw new PartialTokenException();
-                            switch (byteType(buf, off))
-                            {
-                                case BT_EQUALS:
-                                    goto loop;
-                                case BT_S:
-                                case BT_LF:
-                                case BT_CR:
-                                    break;
-                                default:
-                                    throw new InvalidTokenException(off);
-                            }
-                        }
-                        loop: ;
-                        /* fall through */
-                        goto case BT_EQUALS;
-                    case BT_EQUALS:
-                    {
-                        if (NameEnd < 0)
-                            NameEnd = off;
-                        int open;
-                        for (;;)
-                        {
-
-                            off += minBPC;
-                            if (off == end)
-                                throw new PartialTokenException();
-                            open = byteType(buf, off);
-                            if (open == BT_QUOT || open == BT_APOS)
-                                break;
-                            switch (open)
-                            {
-                                case BT_S:
-                                case BT_LF:
-                                case BT_CR:
-                                    break;
-                                default:
-                                    throw new InvalidTokenException(off);
-                            }
-                        }
-                        off += minBPC;
-                        int valueStart = off;
-                        bool normalized = true;
-                        int t;
-                        /* in attribute value */
-                        for (;;)
-                        {
-                            if (off == end)
-                                throw new PartialTokenException();
-                            t = byteType(buf, off);
-                            if (t == open)
-                                break;
-                            switch (t)
-                            {
-                                case BT_NONXML:
-                                case BT_MALFORM:
-                                    throw new InvalidTokenException(off);
-                                case BT_LEAD2:
-                                    if (end - off < 2)
-                                        throw new PartialCharException(off);
-                                    check2(buf, off);
-                                    off += 2;
-                                    break;
-                                case BT_LEAD3:
-                                    if (end - off < 3)
-                                        throw new PartialCharException(off);
-                                    check3(buf, off);
-                                    off += 3;
-                                    break;
-                                case BT_LEAD4:
-                                    if (end - off < 4)
-                                        throw new PartialCharException(off);
-                                    check4(buf, off);
-                                    off += 4;
-                                    break;
-                                case BT_AMP:
-                                {
-                                    normalized = false;
-                                    int saveNameEnd = token.NameEnd;
-                                    scanRef(buf, off + minBPC, end, token);
-                                    token.NameEnd = saveNameEnd;
-                                    off = token.TokenEnd;
-                                    break;
-                                }
-                                case BT_S:
-                                    if (normalized
-                                        && (off == valueStart
-                                        || byteToAscii(buf, off) != ' '
-                                        || (off + minBPC != end
-                                        && (byteToAscii(buf, off + minBPC) == ' '
-                                        || byteType(buf, off + minBPC) == open))))
-                                        normalized = false;
-                                    off += minBPC;
-                                    break;
-                                case BT_LT:
-                                    throw new InvalidTokenException(off);
-                                case BT_LF:
-                                case BT_CR:
-                                    normalized = false;
-                                    /* fall through */
-                                    goto default;
-                                default:
-                                    off += minBPC;
-                                    break;
-                            }
-                        }
-                        token.appendAttribute(nameStart, NameEnd, valueStart,
-                            off,
-                            normalized);
-                        off += minBPC;
-                        if (off == end)
-                            throw new PartialTokenException();
-                        t = byteType(buf, off);
-                        switch (t)
-                        {
-                            case BT_S:
-                            case BT_CR:
-                            case BT_LF:
-                                off += minBPC;
-                                if (off == end)
-                                    throw new PartialTokenException();
-                                t = byteType(buf, off);
-                                break;
-                            case BT_GT:
-                            case BT_SOL:
-                                break;
-                            default:
-                                throw new InvalidTokenException(off);
-                        }
-                        /* off points to closing quote */
-                        for (;;)
-                        {
-                            switch (t)
-                            {
-                                case BT_NMSTRT:
-                                    nameStart = off;
-                                    off += minBPC;
-                                    goto skipToName;
-                                case BT_LEAD2:
-                                    if (end - off < 2)
-                                        throw new PartialCharException(off);
-                                    if (byteType2(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    nameStart = off;
-                                    off += 2;
-                                    goto skipToName;
-                                case BT_LEAD3:
-                                    if (end - off < 3)
-                                        throw new PartialCharException(off);
-                                    if (byteType3(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    nameStart = off;
-                                    off += 3;
-                                    goto skipToName;
-                                case BT_LEAD4:
-                                    if (end - off < 4)
-                                        throw new PartialCharException(off);
-                                    if (byteType4(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    nameStart = off;
-                                    off += 4;
-                                    goto skipToName;
-                                case BT_S:
-                                case BT_CR:
-                                case BT_LF:
-                                    break;
-                                case BT_GT:
-                                    token.checkAttributeUniqueness(buf);
-                                    token.TokenEnd = off + minBPC;
-                                    return TOK.START_TAG_WITH_ATTS;
-                                case BT_SOL:
-                                    off += minBPC;
-                                    if (off == end)
-                                        throw new PartialTokenException();
-                                    checkCharMatches(buf, off, '>');
-                                    token.checkAttributeUniqueness(buf);
-                                    token.TokenEnd = off + minBPC;
-                                    return TOK.EMPTY_ELEMENT_WITH_ATTS;
-                                default:
-                                    throw new InvalidTokenException(off);
-                            }
-                            off += minBPC;
-                            if (off == end)
-                                throw new PartialTokenException();
-                            t = byteType(buf, off);
-                        }
-
-                        skipToName:
-                            NameEnd = -1;
-                        break;
-                    }
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /* off points to character following "<" */
-        private TOK scanLt(byte[] buf, int off, int end, ContentToken token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                case BT_EXCL:
-                    if ((off += minBPC) == end)
-                        throw new PartialTokenException();
-                switch (byteType(buf, off))
-                {
-                    case BT_MINUS:
-                        return scanComment(buf, off + minBPC, end, token);
-                    case BT_LSQB:
-                        return scanCdataSection(buf, off + minBPC, end, token);
-                }
-                    throw new InvalidTokenException(off);
-                case BT_QUEST:
-                    return scanPi(buf, off + minBPC, end, token);
-                case BT_SOL:
-                    return scanEndTag(buf, off + minBPC, end, token);
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            /* we have a start-tag */
-            token.NameEnd = -1;
-            token.clearAttributes();
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        token.NameEnd = off;
-                        off += minBPC;
-                        for (;;)
-                        {
-                            if (off == end)
-                                throw new PartialTokenException();
-                            switch (byteType(buf, off))
-                            {
-                                case BT_NMSTRT:
-                                    return scanAtts(off, buf, off + minBPC, end, token);
-                                case BT_LEAD2:
-                                    if (end - off < 2)
-                                        throw new PartialCharException(off);
-                                    if (byteType2(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    return scanAtts(off, buf, off + 2, end, token);
-                                case BT_LEAD3:
-                                    if (end - off < 3)
-                                        throw new PartialCharException(off);
-                                    if (byteType3(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    return scanAtts(off, buf, off + 3, end, token);
-                                case BT_LEAD4:
-                                    if (end - off < 4)
-                                        throw new PartialCharException(off);
-                                    if (byteType4(buf, off) != BT_NMSTRT)
-                                        throw new InvalidTokenException(off);
-                                    return scanAtts(off, buf, off + 4, end, token);
-                                case BT_GT:
-                                case BT_SOL:
-                                    goto loop;
-                                case BT_S:
-                                case BT_CR:
-                                case BT_LF:
-                                    off += minBPC;
-                                    break;
-                                default:
-                                    throw new InvalidTokenException(off);
-                            }
-                        }
-                        loop:
-                            break;
-                    case BT_GT:
-                        if (token.NameEnd < 0)
-                            token.NameEnd = off;
-                        token.TokenEnd = off + minBPC;
-                        return TOK.START_TAG_NO_ATTS;
-                    case BT_SOL:
-                        if (token.NameEnd < 0)
-                            token.NameEnd = off;
-                        off += minBPC;
-                        if (off == end)
-                            throw new PartialTokenException();
-                        checkCharMatches(buf, off, '>');
-                        token.TokenEnd = off + minBPC;
-                        return TOK.EMPTY_ELEMENT_NO_ATTS;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        // Ensure that we always scan a multiple of minBPC bytes.
-        private int adjustEnd(int off, int end)
-        {
-            int n = end - off;
-            if ((n & (minBPC - 1)) != 0)
-            {
-                n &= ~(minBPC - 1);
-                if (n == 0)
-                    throw new PartialCharException(off);
-                return off + n;
-            }
-            else
-                return end;
-        }
-
-        /**
-         * Scans the first token of a byte subarrary that contains content.
-         * Returns one of the following integers according to the type of token
-         * that the subarray starts with:
-         * <ul>
-         * <li><code>TOK.START_TAG_NO_ATTS</code></li>
-         * <li><code>TOK.START_TAG_WITH_ATTS</code></li>
-         * <li><code>TOK.EMPTY_ELEMENT_NO_ATTS</code></li>
-         * <li><code>TOK.EMPTY_ELEMENT_WITH_ATTS</code></li>
-         * <li><code>TOK.END_TAG</code></li>
-         * <li><code>TOK.DATA_CHARS</code></li>
-         * <li><code>TOK.DATA_NEWLINE</code></li>
-         * <li><code>TOK.CDATA_SECT_OPEN</code></li>
-         * <li><code>TOK.ENTITY_REF</code></li>
-         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
-         * <li><code>TOK.CHAR_REF</code></li>
-         * <li><code>TOK.CHAR_PAIR_REF</code></li>
-         * <li><code>TOK.PI</code></li>
-         * <li><code>TOK.XML_DECL</code></li>
-         * <li><code>TOK.COMMENT</code></li>
-         * </ul>
-         * <p>
-         * Information about the token is stored in <code>token</code>.
-         * </p>
-         * When <code>TOK.CDATA_SECT_OPEN</code> is returned,
-         * <code>tokenizeCdataSection</code> should be called until
-         * it returns <code>TOK.CDATA_SECT</code>.
-         *
-         * @exception EmptyTokenException if the subarray is empty
-         * @exception PartialTokenException if the subarray contains only part of
-         * a legal token
-         * @exception InvalidTokenException if the subarrary does not start
-         * with a legal token or part of one
-         * @exception ExtensibleTokenException if the subarray encodes just a carriage
-         * return ('\r')
-         *
-         * @see #TOK.START_TAG_NO_ATTS
-         * @see #TOK.START_TAG_WITH_ATTS
-         * @see #TOK.EMPTY_ELEMENT_NO_ATTS
-         * @see #TOK.EMPTY_ELEMENT_WITH_ATTS
-         * @see #TOK.END_TAG
-         * @see #TOK.DATA_CHARS
-         * @see #TOK.DATA_NEWLINE
-         * @see #TOK.CDATA_SECT_OPEN
-         * @see #TOK.ENTITY_REF
-         * @see #TOK.MAGIC_ENTITY_REF
-         * @see #TOK.CHAR_REF
-         * @see #TOK.CHAR_PAIR_REF
-         * @see #TOK.PI
-         * @see #TOK.XML_DECL
-         * @see #TOK.COMMENT
-         * @see ContentToken
-         * @see EmptyTokenException
-         * @see PartialTokenException
-         * @see InvalidTokenException
-         * @see ExtensibleTokenException
-         * @see #tokenizeCdataSection
-         */
-        public TOK tokenizeContent(byte[] buf, int off, int end,
-            ContentToken token)
-        {
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            if (off == end)
-                throw new EmptyTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_LT:
-                    return scanLt(buf, off + minBPC, end, token);
-                case BT_AMP:
-                    return scanRef(buf, off + minBPC, end, token);
-                case BT_CR:
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
-                    if (byteType(buf, off) == BT_LF)
-                        off += minBPC;
-                    token.TokenEnd = off;
-                    return TOK.DATA_NEWLINE;
-                case BT_LF:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.DATA_NEWLINE;
-                case BT_RSQB:
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.DATA_CHARS);
-                    if (!charMatches(buf, off, ']'))
-                        break;
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.DATA_CHARS);
-                    if (!charMatches(buf, off, '>'))
-                    {
-                        off -= minBPC;
-                        break;
-                    }
-                    throw new InvalidTokenException(off);
-                case BT_NONXML:
-                case BT_MALFORM:
-                    throw new InvalidTokenException(off);
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    check2(buf, off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    check3(buf, off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    check4(buf, off);
-                    off += 4;
-                    break;
-                default:
-                    off += minBPC;
-                    break;
-            }
-            token.TokenEnd = extendData(buf, off, end);
-            return TOK.DATA_CHARS;
-        }
-
-        int extendData(byte[] buf, int off, int end)
-        {
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            return off;
-                        check2(buf, off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            return off;
-                        check3(buf, off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            return off;
-                        check4(buf, off);
-                        off += 4;
-                        break;
-                    case BT_RSQB:
-                    case BT_AMP:
-                    case BT_LT:
-                    case BT_NONXML:
-                    case BT_MALFORM:
-                    case BT_CR:
-                    case BT_LF:
-                        return off;
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            return off;
-        }
-
-        /* off points to character following "%" */
-        private TOK scanPercent(byte[] buf, int off, int end, Token token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                case BT_S:
-                case BT_LF:
-                case BT_CR:
-                case BT_PERCNT:
-                    token.TokenEnd = off;
-                    return TOK.PERCENT;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_SEMI:
-                        token.NameEnd = off;
-                        token.TokenEnd = off + minBPC;
-                        return TOK.PARAM_ENTITY_REF;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-
-        private TOK scanPoundName(byte[] buf, int off, int end, Token token)
-        {
-            if (off == end)
-                throw new PartialTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_NMSTRT:
-                    off += minBPC;
-                    break;
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                    if (byteType2(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 2;
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                    if (byteType3(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 3;
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                    if (byteType4(buf, off) != BT_NMSTRT)
-                        throw new InvalidTokenException(off);
-                    off += 4;
-                    break;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_CR:
-                    case BT_LF:
-                    case BT_S:
-                    case BT_RPAR:
-                    case BT_GT:
-                    case BT_PERCNT:
-                    case BT_VERBAR:
-                        token.TokenEnd = off;
-                        return TOK.POUND_NAME;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new ExtensibleTokenException(TOK.POUND_NAME);
-        }
-
-        private TOK scanLit(int open, byte[] buf, int off, int end, Token token)
-        {
-            while (off != end)
-            {
-                int t = byteType(buf, off);
-                switch (t)
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialTokenException();
-                        check2(buf, off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialTokenException();
-                        check3(buf, off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialTokenException();
-                        check4(buf, off);
-                        off += 4;
-                        break;
-                    case BT_NONXML:
-                    case BT_MALFORM:
-                        throw new InvalidTokenException(off);
-                    case BT_QUOT:
-                    case BT_APOS:
-                        off += minBPC;
-                        if (t != open)
-                            break;
-                        if (off == end)
-                            throw new ExtensibleTokenException(TOK.LITERAL);
-                    switch (byteType(buf, off))
-                    {
-                        case BT_S:
-                        case BT_CR:
-                        case BT_LF:
-                        case BT_GT:
-                        case BT_PERCNT:
-                        case BT_LSQB:
-                            token.TokenEnd = off;
-                            return TOK.LITERAL;
-                        default:
-                            throw new InvalidTokenException(off);
-                    }
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            throw new PartialTokenException();
-        }
-
-        /**
-         * Returns an encoding object to be used to start parsing an
-         * external entity.  The encoding is chosen based on the
-         * initial 4 bytes of the entity.
-         *
-         * @param buf the byte array containing the initial bytes of
-         * the entity @param off the index in <code>buf</code> of the
-         * first byte of the entity @param end the index in
-         * <code>buf</code> following the last available byte of the
-         * entity; <code>end - off</code> must be greater than or
-         * equal to 4 unless the entity has fewer that 4 bytes, in
-         * which case it must be equal to the length of the entity
-         * @param token receives information about the presence of a
-         * byte order mark; if the entity starts with a byte order
-         * mark then <code>token.getTokenEnd()</code> will return
-         * <code>off + 2</code>, otherwise it will return
-         * <code>off</code>
-         *
-         * @see TextDecl
-         * @see XmlDecl
-         * @see #TOK.XML_DECL
-         * @see #getEncoding
-         * @see #getInternalEncoding
-         */
-        public static Encoding getInitialEncoding(byte[] buf, int off, int end,
-            Token token)
-        {
-            token.TokenEnd = off;
-            switch (end - off)
-            {
-                case 0:
-                    break;
-                case 1:
-                    if (buf[off] > 127)
-                        return null;
-                    break;
-                default:
-                    int b0 = buf[off] & 0xFF;
-                    int b1 = buf[off + 1] & 0xFF;
-                switch ((b0 << 8) | b1)
-                {
-                    case 0xFEFF:
-                        token.TokenEnd = off + 2;
-                        /* fall through */
-                        goto case '<';
-                    case '<': /* not legal; but not a fatal error */
-                        return getEncoding(UTF16_BIG_ENDIAN_ENCODING);
-                    case 0xFFFE:
-                        token.TokenEnd = off + 2;
-                        /* fall through */
-                        goto case '<' << 8;
-                    case '<' << 8:  /* not legal; but not a fatal error */
-                        return getEncoding(UTF16_LITTLE_ENDIAN_ENCODING);
-                }
-                    break;
-            }
-            return getEncoding(UTF8_ENCODING);
-        }
-
-        /**
-         * Returns an <code>Encoding</code> corresponding to the
-         * specified IANA character set name.  Returns this
-         * <code>Encoding</code> if the name is null.  Returns null if
-         * the specified encoding is not supported.  Note that there
-         * are two distinct <code>Encoding</code> objects associated
-         * with the name <code>UTF-16</code>, one for each possible
-         * byte order; if this <code>Encoding</code> is UTF-16 with
-         * little-endian byte ordering, then
-         * <code>getEncoding("UTF-16")</code> will return this,
-         * otherwise it will return an <code>Encoding</code> for
-         * UTF-16 with big-endian byte ordering.  @param name a string
-         * specifying the IANA name of the encoding; this is case
-         * insensitive
-         */
-        public Encoding getEncoding(string name)
-        {
-            if (name == null)
-                return this;
-
-            switch (name.ToUpper())
-            {
-                case "UTF-8":
-                    return getEncoding(UTF8_ENCODING);
-                    /*
-                case "UTF-16":
-                    return getUTF16Encoding();
-                case "ISO-8859-1":
-                    return getEncoding(ISO8859_1_ENCODING);
-                case "US-ASCII":
-                    return getEncoding(ASCII_ENCODING);
-                    */
-            }
-            return null;
-        }
-
-        /**
-         * Returns an <code>Encoding</code> for entities encoded with
-         * a single-byte encoding (an encoding in which each byte
-         * represents exactly one character).  @param map a string
-         * specifying the character represented by each byte; the
-         * string must have a length of 256;
-         * <code>map.charAt(b)</code> specifies the character encoded
-         * by byte <code>b</code>; bytes that do not represent any
-         * character should be mapped to <code>\uFFFD</code>
-         */
-        public Encoding getSingleByteEncoding(string map)
-        {
-            //return new SingleByteEncoding(map);
-            throw new System.NotImplementedException();
-        }
-
-        /**
-         * Returns an <code>Encoding</code> object for use with
-         * internal entities.  This is a UTF-16 big endian encoding,
-         * except that newlines are assumed to have been normalized
-         * into line feed, so carriage return is treated like a space.
-         */
-        public static Encoding getInternalEncoding()
-        {
-            return getEncoding(INTERNAL_ENCODING);
-        }
-
-        /**
-         * Scans the first token of a byte subarray that contains part of a
-         * prolog.
-         * Returns one of the following integers according to the type of token
-         * that the subarray starts with:
-         * <ul>
-         * <li><code>TOK.PI</code></li>
-         * <li><code>TOK.XML_DECL</code></li>
-         * <li><code>TOK.COMMENT</code></li>
-         * <li><code>TOK.PARAM_ENTITY_REF</code></li>
-         * <li><code>TOK.PROLOG_S</code></li>
-         * <li><code>TOK.DECL_OPEN</code></li>
-         * <li><code>TOK.DECL_CLOSE</code></li>
-         * <li><code>TOK.NAME</code></li>
-         * <li><code>TOK.NMTOKEN</code></li>
-         * <li><code>TOK.POUND_NAME</code></li>
-         * <li><code>TOK.OR</code></li>
-         * <li><code>TOK.PERCENT</code></li>
-         * <li><code>TOK.OPEN_PAREN</code></li>
-         * <li><code>TOK.CLOSE_PAREN</code></li>
-         * <li><code>TOK.OPEN_BRACKET</code></li>
-         * <li><code>TOK.CLOSE_BRACKET</code></li>
-         * <li><code>TOK.LITERAL</code></li>
-         * <li><code>TOK.NAME_QUESTION</code></li>
-         * <li><code>TOK.NAME_ASTERISK</code></li>
-         * <li><code>TOK.NAME_PLUS</code></li>
-         * <li><code>TOK.COND_SECT_OPEN</code></li>
-         * <li><code>TOK.COND_SECT_CLOSE</code></li>
-         * <li><code>TOK.CLOSE_PAREN_QUESTION</code></li>
-         * <li><code>TOK.CLOSE_PAREN_ASTERISK</code></li>
-         * <li><code>TOK.CLOSE_PAREN_PLUS</code></li>
-         * <li><code>TOK.COMMA</code></li>
-         * </ul>
-         * @exception EmptyTokenException if the subarray is empty
-         * @exception PartialTokenException if the subarray contains only part of
-         * a legal token
-         * @exception InvalidTokenException if the subarrary does not start
-         * with a legal token or part of one
-         * @exception EndOfPrologException if the subarray starts with the document
-         * element; <code>tokenizeContent</code> should be used on the remainder
-         * of the entity
-         * @exception ExtensibleTokenException if the subarray is a legal token
-         * but subsequent bytes in the same entity could be part of the token
-         * @see #TOK.PI
-         * @see #TOK.XML_DECL
-         * @see #TOK.COMMENT
-         * @see #TOK.PARAM_ENTITY_REF
-         * @see #TOK.PROLOG_S
-         * @see #TOK.DECL_OPEN
-         * @see #TOK.DECL_CLOSE
-         * @see #TOK.NAME
-         * @see #TOK.NMTOKEN
-         * @see #TOK.POUND_NAME
-         * @see #TOK.OR
-         * @see #TOK.PERCENT
-         * @see #TOK.OPEN_PAREN
-         * @see #TOK.CLOSE_PAREN
-         * @see #TOK.OPEN_BRACKET
-         * @see #TOK.CLOSE_BRACKET
-         * @see #TOK.LITERAL
-         * @see #TOK.NAME_QUESTION
-         * @see #TOK.NAME_ASTERISK
-         * @see #TOK.NAME_PLUS
-         * @see #TOK.COND_SECT_OPEN
-         * @see #TOK.COND_SECT_CLOSE
-         * @see #TOK.CLOSE_PAREN_QUESTION
-         * @see #TOK.CLOSE_PAREN_ASTERISK
-         * @see #TOK.CLOSE_PAREN_PLUS
-         * @see #TOK.COMMA
-         * @see ContentToken
-         * @see EmptyTokenException
-         * @see PartialTokenException
-         * @see InvalidTokenException
-         * @see ExtensibleTokenException
-         * @see EndOfPrologException
-         */
-        public TOK tokenizeProlog(byte[] buf, int off, int end, Token token)
-        {
-            TOK tok;
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            if (off == end)
-                throw new EmptyTokenException();
-            switch (byteType(buf, off))
-            {
-                case BT_QUOT:
-                    return scanLit(BT_QUOT, buf, off + minBPC, end, token);
-                case BT_APOS:
-                    return scanLit(BT_APOS, buf, off + minBPC, end, token);
-                case BT_LT:
-                {
-                    off += minBPC;
-                    if (off == end)
-                        throw new PartialTokenException();
-                    switch (byteType(buf, off))
-                    {
-                        case BT_EXCL:
-                            return scanDecl(buf, off + minBPC, end, token);
-                        case BT_QUEST:
-                            return scanPi(buf, off + minBPC, end, token);
-                        case BT_NMSTRT:
-                        case BT_LEAD2:
-                        case BT_LEAD3:
-                        case BT_LEAD4:
-                            token.TokenEnd = off - minBPC;
-                            throw new EndOfPrologException();
-                    }
-                    throw new InvalidTokenException(off);
-                }
-                case BT_CR:
-                    if (off + minBPC == end)
-                        throw new ExtensibleTokenException(TOK.PROLOG_S);
-                    /* fall through */
-                    goto case BT_S;
-                case BT_S:
-                case BT_LF:
-                    for (;;)
-                    {
-                        off += minBPC;
-                        if (off == end)
-                            break;
-                        switch (byteType(buf, off))
-                        {
-                            case BT_S:
-                            case BT_LF:
-                                break;
-                            case BT_CR:
-                                /* don't split CR/LF pair */
-                                if (off + minBPC != end)
-                                    break;
-                                /* fall through */
-                                goto default;
-                            default:
-                                token.TokenEnd = off;
-                                return TOK.PROLOG_S;
-                        }
-                    }
-                    token.TokenEnd = off;
-                    return TOK.PROLOG_S;
-                case BT_PERCNT:
-                    return scanPercent(buf, off + minBPC, end, token);
-                case BT_COMMA:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.COMMA;
-                case BT_LSQB:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.OPEN_BRACKET;
-                case BT_RSQB:
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.CLOSE_BRACKET);
-                    if (charMatches(buf, off, ']'))
-                    {
-                        if (off + minBPC == end)
-                            throw new PartialTokenException();
-                        if (charMatches(buf, off + minBPC, '>'))
-                        {
-                            token.TokenEnd = off + 2*minBPC;
-                            return TOK.COND_SECT_CLOSE;
-                        }
-                    }
-                    token.TokenEnd = off;
-                    return TOK.CLOSE_BRACKET;
-                case BT_LPAR:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.OPEN_PAREN;
-                case BT_RPAR:
-                    off += minBPC;
-                    if (off == end)
-                        throw new ExtensibleTokenException(TOK.CLOSE_PAREN);
-                switch (byteType(buf, off))
-                {
-                    case BT_AST:
-                        token.TokenEnd = off + minBPC;
-                        return TOK.CLOSE_PAREN_ASTERISK;
-                    case BT_QUEST:
-                        token.TokenEnd = off + minBPC;
-                        return TOK.CLOSE_PAREN_QUESTION;
-                    case BT_PLUS:
-                        token.TokenEnd = off + minBPC;
-                        return TOK.CLOSE_PAREN_PLUS;
-                    case BT_CR:
-                    case BT_LF:
-                    case BT_S:
-                    case BT_GT:
-                    case BT_COMMA:
-                    case BT_VERBAR:
-                    case BT_RPAR:
-                        token.TokenEnd = off;
-                        return TOK.CLOSE_PAREN;
-                }
-                    throw new InvalidTokenException(off);
-                case BT_VERBAR:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.OR;
-                case BT_GT:
-                    token.TokenEnd = off + minBPC;
-                    return TOK.DECL_CLOSE;
-                case BT_NUM:
-                    return scanPoundName(buf, off + minBPC, end, token);
-                case BT_LEAD2:
-                    if (end - off < 2)
-                        throw new PartialCharException(off);
-                switch (byteType2(buf, off))
-                {
-                    case BT_NMSTRT:
-                        off += 2;
-                        tok = TOK.NAME;
-                        break;
-                    case BT_NAME:
-                        off += 2;
-                        tok = TOK.NMTOKEN;
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-                    break;
-                case BT_LEAD3:
-                    if (end - off < 3)
-                        throw new PartialCharException(off);
-                switch (byteType3(buf, off))
-                {
-                    case BT_NMSTRT:
-                        off += 3;
-                        tok = TOK.NAME;
-                        break;
-                    case BT_NAME:
-                        off += 3;
-                        tok = TOK.NMTOKEN;
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-                    break;
-                case BT_LEAD4:
-                    if (end - off < 4)
-                        throw new PartialCharException(off);
-                switch (byteType4(buf, off))
-                {
-                    case BT_NMSTRT:
-                        off += 4;
-                        tok = TOK.NAME;
-                        break;
-                    case BT_NAME:
-                        off += 4;
-                        tok = TOK.NMTOKEN;
-                        break;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-                    break;
-                case BT_NMSTRT:
-                    tok = TOK.NAME;
-                    off += minBPC;
-                    break;
-                case BT_NAME:
-                case BT_MINUS:
-                    tok = TOK.NMTOKEN;
-                    off += minBPC;
-                    break;
-                default:
-                    throw new InvalidTokenException(off);
-            }
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_NMSTRT:
-                    case BT_NAME:
-                    case BT_MINUS:
-                        off += minBPC;
-                        break;
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        if (!isNameChar2(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        if (!isNameChar3(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        if (!isNameChar4(buf, off))
-                            throw new InvalidTokenException(off);
-                        off += 4;
-                        break;
-                    case BT_GT:
-                    case BT_RPAR:
-                    case BT_COMMA:
-                    case BT_VERBAR:
-                    case BT_LSQB:
-                    case BT_PERCNT:
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        token.TokenEnd = off;
-                        return tok;
-                    case BT_PLUS:
-                        if (tok != TOK.NAME)
-                            throw new InvalidTokenException(off);
-                        token.TokenEnd = off + minBPC;
-                        return TOK.NAME_PLUS;
-                    case BT_AST:
-                        if (tok != TOK.NAME)
-                            throw new InvalidTokenException(off);
-                        token.TokenEnd = off + minBPC;
-                        return TOK.NAME_ASTERISK;
-                    case BT_QUEST:
-                        if (tok != TOK.NAME)
-                            throw new InvalidTokenException(off);
-                        token.TokenEnd = off + minBPC;
-                        return TOK.NAME_QUESTION;
-                    default:
-                        throw new InvalidTokenException(off);
-                }
-            }
-            throw new ExtensibleTokenException(tok);
-        }
-
-        /**
-         * Scans the first token of a byte subarrary that contains part of
-         * literal attribute value.  The opening and closing delimiters
-         * are not included in the subarrary.
-         * Returns one of the following integers according to the type of
-         * token that the subarray starts with:
-         * <ul>
-         * <li><code>TOK.DATA_CHARS</code></li>
-         * <li><code>TOK.DATA_NEWLINE</code></li>
-         * <li><code>TOK.ATTRIBUTE_VALUE_S</code></li>
-         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
-         * <li><code>TOK.ENTITY_REF</code></li>
-         * <li><code>TOK.CHAR_REF</code></li>
-         * <li><code>TOK.CHAR_PAIR_REF</code></li>
-         * </ul>
-         * @exception EmptyTokenException if the subarray is empty
-         * @exception PartialTokenException if the subarray contains only part of
-         * a legal token
-         * @exception InvalidTokenException if the subarrary does not start
-         * with a legal token or part of one
-         * @exception ExtensibleTokenException if the subarray encodes just a carriage
-         * return ('\r')
-         * @see #TOK.DATA_CHARS
-         * @see #TOK.DATA_NEWLINE
-         * @see #TOK.ATTRIBUTE_VALUE_S
-         * @see #TOK.MAGIC_ENTITY_REF
-         * @see #TOK.ENTITY_REF
-         * @see #TOK.CHAR_REF
-         * @see #TOK.CHAR_PAIR_REF
-         * @see Token
-         * @see EmptyTokenException
-         * @see PartialTokenException
-         * @see InvalidTokenException
-         * @see ExtensibleTokenException
-         */
-        public TOK tokenizeAttributeValue(byte[] buf, int off, int end, Token token)
-        {
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            if (off == end)
-                throw new EmptyTokenException();
-            int start = off;
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        off += 4;
-                        break;
-                    case BT_AMP:
-                        if (off == start)
-                            return scanRef(buf, off + minBPC, end, token);
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_LT:
-                        /* this is for inside entity references */
-                        throw new InvalidTokenException(off);
-                    case BT_S:
-                        if (off == start)
-                        {
-                            token.TokenEnd = off + minBPC;
-                            return TOK.ATTRIBUTE_VALUE_S;
-                        }
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_LF:
-                        if (off == start)
-                        {
-                            token.TokenEnd = off + minBPC;
-                            return TOK.DATA_NEWLINE;
-                        }
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_CR:
-                        if (off == start)
-                        {
-                            off += minBPC;
-                            if (off == end)
-                                throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
-                            if (byteType(buf, off) == BT_LF)
-                                off += minBPC;
-                            token.TokenEnd = off;
-                            return TOK.DATA_NEWLINE;
-                        }
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            token.TokenEnd = off;
-            return TOK.DATA_CHARS;
-        }
-
-        /**
-         * Scans the first token of a byte subarrary that contains part of
-         * literal entity value.  The opening and closing delimiters
-         * are not included in the subarrary.
-         * Returns one of the following integers according to the type of
-         * token that the subarray starts with:
-         * <ul>
-         * <li><code>TOK.DATA_CHARS</code></li>
-         * <li><code>TOK.DATA_NEWLINE</code></li>
-         * <li><code>TOK.PARAM_ENTITY_REF</code></li>
-         * <li><code>TOK.MAGIC_ENTITY_REF</code></li>
-         * <li><code>TOK.ENTITY_REF</code></li>
-         * <li><code>TOK.CHAR_REF</code></li>
-         * <li><code>TOK.CHAR_PAIR_REF</code></li>
-         * </ul>
-         * @exception EmptyTokenException if the subarray is empty
-         * @exception PartialTokenException if the subarray contains only part of
-         * a legal token
-         * @exception InvalidTokenException if the subarrary does not start
-         * with a legal token or part of one
-         * @exception ExtensibleTokenException if the subarray encodes just a carriage
-         * return ('\r')
-         * @see #TOK.DATA_CHARS
-         * @see #TOK.DATA_NEWLINE
-         * @see #TOK.MAGIC_ENTITY_REF
-         * @see #TOK.ENTITY_REF
-         * @see #TOK.PARAM_ENTITY_REF
-         * @see #TOK.CHAR_REF
-         * @see #TOK.CHAR_PAIR_REF
-         * @see Token
-         * @see EmptyTokenException
-         * @see PartialTokenException
-         * @see InvalidTokenException
-         * @see ExtensibleTokenException
-         */
-        public TOK tokenizeEntityValue(byte[] buf, int off, int end,
-            Token token)
-        {
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            if (off == end)
-                throw new EmptyTokenException();
-            int start = off;
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        off += 4;
-                        break;
-                    case BT_AMP:
-                        if (off == start)
-                            return scanRef(buf, off + minBPC, end, token);
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_PERCNT:
-                        if (off == start)
-                            return scanPercent(buf, off + minBPC, end, token);
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_LF:
-                        if (off == start)
-                        {
-                            token.TokenEnd = off + minBPC;
-                            return TOK.DATA_NEWLINE;
-                        }
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    case BT_CR:
-                        if (off == start)
-                        {
-                            off += minBPC;
-                            if (off == end)
-                                throw new ExtensibleTokenException(TOK.DATA_NEWLINE);
-                            if (byteType(buf, off) == BT_LF)
-                                off += minBPC;
-                            token.TokenEnd = off;
-                            return TOK.DATA_NEWLINE;
-                        }
-                        token.TokenEnd = off;
-                        return TOK.DATA_CHARS;
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            token.TokenEnd = off;
-            return TOK.DATA_CHARS;
-        }
-
-        /**
-         * Skips over an ignored conditional section.
-         * The subarray starts following the <code><![ IGNORE [</code>.
-         *
-         * @return the index of the character following the closing
-         * <code>]]></code>
-         *
-         * @exception PartialTokenException if the subarray does not contain the
-         * complete ignored conditional section
-         * @exception InvalidTokenException if the ignored conditional section
-         * contains illegal characters
-         */
-        public int skipIgnoreSect(byte[] buf, int off, int end)
-        {
-            if (minBPC > 1)
-                end = adjustEnd(off, end);
-            int level = 0;
-            while (off != end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_LEAD2:
-                        if (end - off < 2)
-                            throw new PartialCharException(off);
-                        check2(buf, off);
-                        off += 2;
-                        break;
-                    case BT_LEAD3:
-                        if (end - off < 3)
-                            throw new PartialCharException(off);
-                        check3(buf, off);
-                        off += 3;
-                        break;
-                    case BT_LEAD4:
-                        if (end - off < 4)
-                            throw new PartialCharException(off);
-                        check4(buf, off);
-                        off += 4;
-                        break;
-                    case BT_NONXML:
-                    case BT_MALFORM:
-                        throw new InvalidTokenException(off);
-                    case BT_LT:
-                        off += minBPC;
-                        if (off == end)
-                            goto loop;
-                        if (!charMatches(buf, off, '!'))
-                            break;
-                        off += minBPC;
-                        if (off == end)
-                            goto loop;
-                        if (!charMatches(buf, off, '['))
-                            break;
-                        level++;
-                        off += minBPC;
-                        break;
-                    case BT_RSQB:
-                        off += minBPC;
-                        if (off == end)
-                            goto loop;
-                        if (!charMatches(buf, off, ']'))
-                            break;
-                        off += minBPC;
-                        if (off == end)
-                            goto loop;
-                        if (charMatches(buf, off, '>'))
-                        {
-                            if (level == 0)
-                                return off + minBPC;
-                            level--;
-                        }
-                        else if (charMatches(buf, off, ']'))
-                            break;
-                        off += minBPC;
-                        break;
-                    default:
-                        off += minBPC;
-                        break;
-                }
-            }
-            loop:
-                throw new PartialTokenException();
-        }
-
-        /**
-         * Checks that a literal contained in the specified byte subarray
-         * is a legal public identifier and returns a string with
-         * the normalized content of the public id.
-         * The subarray includes the opening and closing quotes.
-         * @exception InvalidTokenException if it is not a legal public identifier
-         */
-        public string getPublicId(byte[] buf, int off, int end)
-        {
-            System.Text.StringBuilder sbuf = new System.Text.StringBuilder();
-            off += minBPC;
-            end -= minBPC;
-            for (; off != end; off += minBPC)
-            {
-                char c = (char)byteToAscii(buf, off);
-                switch (byteType(buf, off))
-                {
-                    case BT_MINUS:
-                    case BT_APOS:
-                    case BT_LPAR:
-                    case BT_RPAR:
-                    case BT_PLUS:
-                    case BT_COMMA:
-                    case BT_SOL:
-                    case BT_EQUALS:
-                    case BT_QUEST:
-                    case BT_SEMI:
-                    case BT_EXCL:
-                    case BT_AST:
-                    case BT_PERCNT:
-                    case BT_NUM:
-                        sbuf.Append(c);
-                        break;
-                    case BT_S:
-                        if (charMatches(buf, off, '\t'))
-                            throw new InvalidTokenException(off);
-                        /* fall through */
-                        goto case BT_CR;
-                    case BT_CR:
-                    case BT_LF:
-                        if ((sbuf.Length > 0) && (sbuf[sbuf.Length - 1] != ' '))
-                            sbuf.Append(' ');
-                        break;
-                    case BT_NAME:
-                    case BT_NMSTRT:
-                        if ((c & ~0x7f) == 0)
-                        {
-                            sbuf.Append(c);
-                            break;
-                        }
-                        // fall through
-                        goto default;
-                    default:
-                    switch (c)
-                    {
-                        case '$':
-                        case '@':
-                            break;
-                        default:
-                            throw new InvalidTokenException(off);
-                    }
-                        break;
-                }
-            }
-            if (sbuf.Length > 0 && sbuf[sbuf.Length - 1] == ' ')
-                sbuf.Length = sbuf.Length - 1;
-            return sbuf.ToString();
-        }
-
-        /**
-         * Returns true if the specified byte subarray is equal to the string.
-         * The string must contain only XML significant characters.
-         */
-        public bool matchesXMLstring(byte[] buf, int off, int end, string str)
-        {
-            int len = str.Length;
-            if (len*minBPC != end - off)
-                return false;
-            for (int i = 0; i < len; off += minBPC, i++)
-            {
-                if (!charMatches(buf, off, str[i]))
-                    return false;
-            }
-            return true;
-        }
-
-        /**
-         * Skips over XML whitespace characters at the start of the specified
-         * subarray.
-         *
-         * @return the index of the first non-whitespace character,
-         * <code>end</code> if there is the subarray is all whitespace
-         */
-        public int skipS(byte[] buf, int off, int end)
-        {
-            while (off < end)
-            {
-                switch (byteType(buf, off))
-                {
-                    case BT_S:
-                    case BT_CR:
-                    case BT_LF:
-                        off += minBPC;
-                        break;
-                    default:
-                        goto loop;
-                }
-            }
-            loop:
-                return off;
-        }
-
-        private bool isNameChar2(byte[] buf, int off)
-        {
-            int bt = byteType2(buf, off);
-            return bt == BT_NAME || bt == BT_NMSTRT;
-        }
-
-        private bool isNameChar3(byte[] buf, int off)
-        {
-            int bt = byteType3(buf, off);
-            return bt == BT_NAME || bt == BT_NMSTRT;
-        }
-
-        private bool isNameChar4(byte[] buf, int off)
-        {
-            int bt = byteType4(buf, off);
-            return bt == BT_NAME || bt == BT_NMSTRT;
-        }
-
-        private const string nameStartSingles =
-            "\u003a\u005f\u0386\u038c\u03da\u03dc\u03de\u03e0\u0559\u06d5\u093d\u09b2" +
-            "\u0a5e\u0a8d\u0abd\u0ae0\u0b3d\u0b9c\u0cde\u0e30\u0e84\u0e8a\u0e8d\u0ea5" +
-            "\u0ea7\u0eb0\u0ebd\u1100\u1109\u113c\u113e\u1140\u114c\u114e\u1150\u1159" +
-            "\u1163\u1165\u1167\u1169\u1175\u119e\u11a8\u11ab\u11ba\u11eb\u11f0\u11f9" +
-            "\u1f59\u1f5b\u1f5d\u1fbe\u2126\u212e\u3007";
-
-        private const string nameStartRanges =
-            "\u0041\u005a\u0061\u007a\u00c0\u00d6\u00d8\u00f6\u00f8\u00ff\u0100\u0131" +
-            "\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5" +
-            "\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0388\u038a\u038e\u03a1\u03a3\u03ce" +
-            "\u03d0\u03d6\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481" +
-            "\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9" +
-            "\u0531\u0556\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a" +
-            "\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06e5\u06e6\u0905\u0939" +
-            "\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b6\u09b9" +
-            "\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28" +
-            "\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a72\u0a74" +
-            "\u0a85\u0a8b\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9" +
-            "\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39" +
-            "\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a" +
-            "\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c" +
-            "\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c" +
-            "\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0ce0\u0ce1\u0d05\u0d0c" +
-            "\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e32\u0e33" +
-            "\u0e40\u0e45\u0e81\u0e82\u0e87\u0e88\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3" +
-            "\u0eaa\u0eab\u0ead\u0eae\u0eb2\u0eb3\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69" +
-            "\u10a0\u10c5\u10d0\u10f6\u1102\u1103\u1105\u1107\u110b\u110c\u110e\u1112" +
-            "\u1154\u1155\u115f\u1161\u116d\u116e\u1172\u1173\u11ae\u11af\u11b7\u11b8" +
-            "\u11bc\u11c2\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45" +
-            "\u1f48\u1f4d\u1f50\u1f57\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fc2\u1fc4" +
-            "\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc" +
-            "\u212a\u212b\u2180\u2182\u3041\u3094\u30a1\u30fa\u3105\u312c\uac00\ud7a3" +
-            "\u4e00\u9fa5\u3021\u3029";
-
-        private const string nameSingles =
-            "\u002d\u002e\u05bf\u05c4\u0670\u093c\u094d\u09bc\u09be\u09bf\u09d7\u0a02" +
-            "\u0a3c\u0a3e\u0a3f\u0abc\u0b3c\u0bd7\u0d57\u0e31\u0eb1\u0f35\u0f37\u0f39" +
-            "\u0f3e\u0f3f\u0f97\u0fb9\u20e1\u3099\u309a\u00b7\u02d0\u02d1\u0387\u0640" +
-            "\u0e46\u0ec6\u3005";
-
-        private const string nameRanges =
-            "\u0300\u0345\u0360\u0361\u0483\u0486\u0591\u05a1\u05a3\u05b9\u05bb\u05bd" +
-            "\u05c1\u05c2\u064b\u0652\u06d6\u06dc\u06dd\u06df\u06e0\u06e4\u06e7\u06e8" +
-            "\u06ea\u06ed\u0901\u0903\u093e\u094c\u0951\u0954\u0962\u0963\u0981\u0983" +
-            "\u09c0\u09c4\u09c7\u09c8\u09cb\u09cd\u09e2\u09e3\u0a40\u0a42\u0a47\u0a48" +
-            "\u0a4b\u0a4d\u0a70\u0a71\u0a81\u0a83\u0abe\u0ac5\u0ac7\u0ac9\u0acb\u0acd" +
-            "\u0b01\u0b03\u0b3e\u0b43\u0b47\u0b48\u0b4b\u0b4d\u0b56\u0b57\u0b82\u0b83" +
-            "\u0bbe\u0bc2\u0bc6\u0bc8\u0bca\u0bcd\u0c01\u0c03\u0c3e\u0c44\u0c46\u0c48" +
-            "\u0c4a\u0c4d\u0c55\u0c56\u0c82\u0c83\u0cbe\u0cc4\u0cc6\u0cc8\u0cca\u0ccd" +
-            "\u0cd5\u0cd6\u0d02\u0d03\u0d3e\u0d43\u0d46\u0d48\u0d4a\u0d4d\u0e34\u0e3a" +
-            "\u0e47\u0e4e\u0eb4\u0eb9\u0ebb\u0ebc\u0ec8\u0ecd\u0f18\u0f19\u0f71\u0f84" +
-            "\u0f86\u0f8b\u0f90\u0f95\u0f99\u0fad\u0fb1\u0fb7\u20d0\u20dc\u302a\u302f" +
-            "\u0030\u0039\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f" +
-            "\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f" +
-            "\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29\u3031\u3035\u309d\u309e\u30fc\u30fe";
-
-        /// <summary>
-        ///
-        /// </summary>
-        protected static int[][] charTypeTable;
-        private static void setCharType(char c, int type)
-        {
-            if (c < 0x80)
-                return;
-            int hi = c >> 8;
-            if (charTypeTable[hi] == null)
-            {
-                charTypeTable[hi] = new int[256];
-                for (int i = 0; i < 256; i++)
-                    charTypeTable[hi][i] = BT_OTHER;
-            }
-            charTypeTable[hi][c & 0xFF] = type;
-        }
-
-        private static void setCharType(char min, char max, int type)
-        {
-            int[] shared = null;
-            do
-            {
-                if ((min & 0xFF) == 0)
-                {
-                    for (; min + (char)0xFF <= max; min += (char)0x100)
-                    {
-                        if (shared == null)
-                        {
-                            shared = new int[256];
-                            for (int i = 0; i < 256; i++)
-                                shared[i] = type;
-                        }
-                        charTypeTable[min >> 8] = shared;
-                        if (min + 0xFF == max)
-                            return;
-                    }
-                }
-                setCharType(min, type);
-            } while (min++ != max);
-        }
-
-        static Encoding()
-        {
-            charTypeTable = new int[256][];
-            foreach (char c in nameSingles)
-                setCharType(c, BT_NAME);
-            for (int i = 0; i < nameRanges.Length; i += 2)
-                setCharType(nameRanges[i], nameRanges[i + 1], BT_NAME);
-            for (int i = 0; i < nameStartSingles.Length; i++)
-                setCharType(nameStartSingles[i], BT_NMSTRT);
-            for (int i = 0; i < nameStartRanges.Length; i += 2)
-                setCharType(nameStartRanges[i], nameStartRanges[i + 1],
-                    BT_NMSTRT);
-            setCharType('\uD800', '\uDBFF', BT_LEAD4);
-            setCharType('\uDC00', '\uDFFF', BT_MALFORM);
-            setCharType('\uFFFE', '\uFFFF', BT_NONXML);
-            int[] other = new int[256];
-            for (int i = 0; i < 256; i++)
-                other[i] = BT_OTHER;
-            for (int i = 0; i < 256; i++)
-                if (charTypeTable[i] == null)
-                    charTypeTable[i] = other;
-            System.Array.Copy(asciiTypeTable, 0, charTypeTable[0], 0, 128);
-        }
-
-        /**
-         * Returns the minimum number of bytes required to represent a single
-         * character in this encoding.  The value will be 1, 2 or 4.
-         */
-        public int MinBytesPerChar
-        {
-            get { return minBPC; }
-        }
-    }
-}
diff --git a/lib/jabber-net/xpnet/Exceptions.cs b/lib/jabber-net/xpnet/Exceptions.cs
deleted file mode 100644
index ea32220..0000000
--- a/lib/jabber-net/xpnet/Exceptions.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// Base class for other exceptions
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class TokenException : System.Exception
-    {
-    }
-
-    /// <summary>
-    /// An empty token was detected.  This only happens with a buffer of length 0 is passed in
-    /// to the parser.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EmptyTokenException : TokenException
-    {
-    }
-
-    /// <summary>
-    /// End of prolog.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class EndOfPrologException : TokenException
-    {
-    }
-    /**
-     * Thrown to indicate that the byte subarray being tokenized is a legal XML
-     * token, but that subsequent bytes in the same entity could be part of
-     * the token.  For example, <code>Encoding.tokenizeProlog</code>
-     * would throw this if the byte subarray consists of a legal XML name.
-     * @version $Revision$ $Date$
-     */
-    [SVN(@"$Id$")]
-    public class ExtensibleTokenException : TokenException
-    {
-        private TOK tokType;
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="tokType"></param>
-        public ExtensibleTokenException(TOK tokType)
-        {
-            this.tokType = tokType;
-        }
-
-        /**
-         * Returns the type of token in the byte subarrary.
-         */
-        public TOK TokenType
-        {
-            get { return tokType; }
-        }
-    }
-
-    /// <summary>
-    /// Several kinds of token problems.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class InvalidTokenException : TokenException
-    {
-        private int offset;
-        private byte type;
-
-        /// <summary>
-        /// An illegal character
-        /// </summary>
-        public const byte ILLEGAL_CHAR = 0;
-        /// <summary>
-        /// Doc prefix wasn't XML
-        /// </summary>
-        public const byte XML_TARGET = 1;
-        /// <summary>
-        /// More than one attribute with the same name on the same element
-        /// </summary>
-        public const byte DUPLICATE_ATTRIBUTE = 2;
-
-        /// <summary>
-        /// Some other type of bad token detected
-        /// </summary>
-        /// <param name="offset"></param>
-        /// <param name="type"></param>
-        public InvalidTokenException(int offset, byte type)
-        {
-            this.offset = offset;
-            this.type = type;
-        }
-
-        /// <summary>
-        /// Illegal character detected
-        /// </summary>
-        /// <param name="offset"></param>
-        public InvalidTokenException(int offset)
-        {
-            this.offset = offset;
-            this.type = ILLEGAL_CHAR;
-        }
-
-        /// <summary>
-        /// Offset into the buffer where the problem ocurred.
-        /// </summary>
-        public int Offset
-        {
-            get { return this.offset; }
-        }
-
-        /// <summary>
-        /// Type of exception
-        /// </summary>
-        public int Type
-        {
-            get { return this.type; }
-        }
-
-        /// <summary>
-        /// String
-        /// </summary>
-        /// <returns></returns>
-        public override string ToString()
-        {
-            return "OFFSET: " + this.offset.ToString() + "\r\nTYPE: " + this.type.ToString() + "\r\n" +  base.ToString();
-        }
-    }
-
-    /**
-     * Thrown to indicate that the subarray being tokenized is not the
-     * complete encoding of one or more characters, but might be if
-     * more bytes were added.
-     * @version $Revision$ $Date$
-     */
-    [SVN(@"$Id$")]
-    public class PartialCharException : PartialTokenException
-    {
-        private int leadByteIndex;
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="leadByteIndex"></param>
-        public PartialCharException(int leadByteIndex)
-        {
-            this.leadByteIndex = leadByteIndex;
-        }
-
-        /**
-         * Returns the index of the first byte that is not part of the complete
-         * encoding of a character.
-         */
-        public int LeadByteIndex
-        {
-            get { return leadByteIndex; }
-        }
-    }
-
-    /// <summary>
-    /// A partial token was received.  Try again, after you add more bytes to the buffer.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class PartialTokenException : TokenException
-    {
-    }
-}
diff --git a/lib/jabber-net/xpnet/Position.cs b/lib/jabber-net/xpnet/Position.cs
deleted file mode 100644
index 4be3b0b..0000000
--- a/lib/jabber-net/xpnet/Position.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /**
-     * Represents a position in an entity.
-     * A position can be modified by <code>Encoding.movePosition</code>.
-     * @see Encoding#movePosition
-     * @version $Revision$ $Date$
-     */
-    ///<summary>
-    /// Position of an entry in a table.
-    ///</summary>
-    [SVN(@"$Id$")]
-    public class Position : System.ICloneable
-    {
-        private int lineNumber;
-        private int columnNumber;
-
-        /**
-         * Creates a position for the start of an entity: the line number is
-         * 1 and the column number is 0.
-         */
-        public Position()
-        {
-            lineNumber = 1;
-            columnNumber = 0;
-        }
-
-        /**
-         * Returns the line number.
-         * The first line number is 1.
-         */
-        public int LineNumber
-        {
-            get {return lineNumber;}
-            set {lineNumber = value;}
-        }
-
-        /**
-         * Returns the column number.
-         * The first column number is 0.
-         * A tab character is not treated specially.
-         */
-        public int ColumnNumber
-        {
-            get { return columnNumber; }
-            set { columnNumber = value; }
-        }
-
-        /**
-         * Returns a copy of this position.
-         */
-        public object Clone()
-        {
-            throw new System.NotImplementedException();
-        }
-    }
-}
diff --git a/lib/jabber-net/xpnet/Token.cs b/lib/jabber-net/xpnet/Token.cs
deleted file mode 100644
index 56b4d4d..0000000
--- a/lib/jabber-net/xpnet/Token.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// A token that was parsed.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class Token
-    {
-        private int tokenEnd = -1;
-        private int nameEnd = -1;
-        private char refChar1 = (char)0;
-        private char refChar2 = (char)0;
-
-        /// <summary>
-        /// The end of the current token, in relation to the beginning of the buffer.
-        /// </summary>
-        public int TokenEnd
-        {
-            get {return tokenEnd;}
-            set {tokenEnd = value; }
-        }
-
-        /// <summary>
-        /// The end of the current token's name, in relation to the beginning of the buffer.
-        /// </summary>
-        public int NameEnd
-        {
-            get {return nameEnd;}
-            set {nameEnd = value;}
-        }
-
-        /// <summary>
-        /// The parsed-out character. & for &amp;
-        /// </summary>
-        public char RefChar1
-        {
-            get {return refChar1;}
-            set {refChar1 = value; }
-        }
-        /// <summary>
-        /// The second of two parsed-out characters.  TODO: find example.
-        /// </summary>
-        public char RefChar2
-        {
-            get {return refChar2;}
-            set {refChar2 = value; }
-        }
-
-        /*
-        public void getRefCharPair(char[] ch, int off) {
-            ch[off] = refChar1;
-            ch[off + 1] = refChar2;
-        }
-        */
-    }
-}
diff --git a/lib/jabber-net/xpnet/UTF8Encoding.cs b/lib/jabber-net/xpnet/UTF8Encoding.cs
deleted file mode 100644
index 631a81e..0000000
--- a/lib/jabber-net/xpnet/UTF8Encoding.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-/* --------------------------------------------------------------------------
- * Copyrights
- *
- * Portions created by or assigned to Cursive Systems, Inc. are
- * Copyright (c) 2002-2008 Cursive Systems, Inc.  All Rights Reserved.  Contact
- * information for Cursive Systems, Inc. is available at
- * http://www.cursive.net/.
- *
- * License
- *
- * Jabber-Net is licensed under the LGPL.
- * See LICENSE.txt for details.
- *
- * xpnet is a deriviative of James Clark's XP.  See copying.txt for more info.
- * --------------------------------------------------------------------------*/
-namespace xpnet
-{
-    using bedrock.util;
-
-    /// <summary>
-    /// UTF-8 specific tokenizer.
-    /// </summary>
-    [SVN(@"$Id$")]
-    public class UTF8Encoding : Encoding
-    {
-        private static readonly int[] utf8HiTypeTable = new int[]
-        {
-            /* 0x80 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x84 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x88 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x8C */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x90 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x94 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x98 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0x9C */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xA0 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xA4 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xA8 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xAC */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xB0 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xB4 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xB8 */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xBC */ BT_MALFORM, BT_MALFORM, BT_MALFORM, BT_MALFORM,
-            /* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
-            /* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
-            /* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
-            /* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
-            /* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
-            /* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
-            /* 0xF4 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
-            /* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
-            /* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM
-        };
-
-        private static int[] utf8TypeTable = new int[256];
-
-        static UTF8Encoding()
-        {
-            System.Array.Copy(asciiTypeTable,  0, utf8TypeTable,   0, 128);
-            System.Array.Copy(utf8HiTypeTable, 0, utf8TypeTable, 128, 128);
-        }
-
-        /// <summary>
-        /// New tokenizer
-        /// </summary>
-        public UTF8Encoding() : base(1)
-        {
-        }
-
-        /// <summary>
-        /// What is the type of the current byte?
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected override int byteType(byte[] buf, int off)
-        {
-            return utf8TypeTable[buf[off] & 0xFF];
-        }
-
-        /// <summary>
-        /// Current byte to ASCII char
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected override char byteToAscii(byte[] buf, int off)
-        {
-            return (char)buf[off];
-        }
-
-        /// <summary>
-        /// c is a significant ASCII character
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <param name="c"></param>
-        /// <returns></returns>
-        protected override bool charMatches(byte[] buf, int off, char c)
-        {
-            return ((char)buf[off]) == c;
-        }
-
-        /// <summary>
-        /// A 2 byte UTF-8 representation splits the characters 11 bits
-        /// between the bottom 5 and 6 bits of the bytes.
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <returns></returns>
-        protected override int byteType2(byte[] buf, int off)
-        {
-            int[] page = charTypeTable[(buf[off] >> 2) & 0x7];
-            return page[((buf[off] & 3) << 6) | (buf[off + 1] & 0x3F)];
-        }
-
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="sourceBuf"></param>
-        /// <param name="sourceStart"></param>
-        /// <param name="sourceEnd"></param>
-        /// <param name="targetBuf"></param>
-        /// <param name="targetStart"></param>
-        /// <returns></returns>
-        protected override int convert(byte[] sourceBuf,
-            int sourceStart, int sourceEnd,
-            char[] targetBuf, int targetStart)
-        {
-            int initTargetStart = targetStart;
-            int c;
-            while (sourceStart != sourceEnd)
-            {
-                byte b = sourceBuf[sourceStart++];
-                if (b >= 0)
-                    targetBuf[targetStart++] = (char)b;
-                else
-                {
-                    switch (utf8TypeTable[b & 0xFF])
-                    {
-                        case BT_LEAD2:
-                            /* 5, 6 */
-                            targetBuf[targetStart++]
-                                = (char)(((b & 0x1F) << 6) | (sourceBuf[sourceStart++] & 0x3F));
-                            break;
-                        case BT_LEAD3:
-                            /* 4, 6, 6 */
-                            c = (b & 0xF) << 12;
-                            c |= (sourceBuf[sourceStart++] & 0x3F) << 6;
-                            c |= (sourceBuf[sourceStart++] & 0x3F);
-                            targetBuf[targetStart++] = (char)c;
-                            break;
-                        case BT_LEAD4:
-                            /* 3, 6, 6, 6 */
-                            c = (b & 0x7) << 18;
-                            c |= (sourceBuf[sourceStart++] & 0x3F) << 12;
-                            c |= (sourceBuf[sourceStart++] & 0x3F) << 6;
-                            c |= (sourceBuf[sourceStart++] & 0x3F);
-                            c -= 0x10000;
-                            targetBuf[targetStart++] = (char)((c >> 10) | 0xD800);
-                            targetBuf[targetStart++] = (char)((c & ((1 << 10) - 1)) | 0xDC00);
-                            break;
-                    }
-                }
-            }
-            return targetStart - initTargetStart;
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="buf"></param>
-        /// <param name="off"></param>
-        /// <param name="end"></param>
-        /// <param name="pos"></param>
-        protected override void movePosition(byte[] buf, int off, int end, Position pos)
-        {
-            /* Maintain the invariant: off - colDiff == colNumber. */
-            int colDiff = off - pos.ColumnNumber;
-            int lineNumber = pos.LineNumber;
-            while (off != end)
-            {
-                byte b = buf[off];
-                if (b >= 0)
-                {
-                    ++off;
-                    switch (b)
-                    {
-                        case (byte)'\n':
-                            lineNumber += 1;
-                            colDiff = off;
-                            break;
-                        case (byte)'\r':
-                            lineNumber += 1;
-                            if (off != end && buf[off] == '\n')
-                                off++;
-                            colDiff = off;
-                            break;
-                    }
-                }
-                else
-                {
-                    switch (utf8TypeTable[b & 0xFF])
-                    {
-                        default:
-                            off += 1;
-                            break;
-                        case BT_LEAD2:
-                            off += 2;
-                            colDiff++;
-                            break;
-                        case BT_LEAD3:
-                            off += 3;
-                            colDiff += 2;
-                            break;
-                        case BT_LEAD4:
-                            off += 4;
-                            colDiff += 3;
-                            break;
-                    }
-                }
-            }
-            pos.ColumnNumber = off - colDiff;
-            pos.LineNumber = lineNumber;
-        }
-
-        /*
-        int extendData(byte[] buf, int off, int end)
-        {
-            while (off != end)
-            {
-                int type = utf8TypeTable[buf[off] & 0xFF];
-                if (type >= 0)
-                    off++;
-                else if (type < BT_LEAD4)
-                    break;
-                else
-                {
-                    if (end - off + type < 0)
-                        break;
-                    switch (type)
-                    {
-                        case BT_LEAD3:
-                            check3(buf, off);
-                            break;
-                        case BT_LEAD4:
-                            check4(buf, off);
-                            break;
-                    }
-
-                    off -= (int)type; // this is an ugly hack, James
-                }
-            }
-            return off;
-        }
-        */
-    }
-}
diff --git a/ltmain.sh b/ltmain.sh
index 499e473..68c6d96 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -70,7 +70,7 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.2
+#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.3
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
@@ -80,7 +80,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1.2"
+VERSION="2.4.2 Debian-2.4.2-1.3"
 TIMESTAMP=""
 package_revision=1.3337
 
diff --git a/missing b/missing
index 86a8fc3..cdea514 100755
--- a/missing
+++ b/missing
@@ -1,11 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2012-01-06.13; # UTC
+scriptversion=2012-06-26.16; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake at gnu.org>."
     exit $?
@@ -99,228 +70,141 @@ Send bug reports to <bug-automake at gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f lex.yy.c; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-	/^@setfilename/{
-	  s/.* \([^ ]*\) *$/\1/
-	  p
-	  q
-	}' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'automa4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
     ;;
-esac
-
-exit 0
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/po-Engine-Campfire/LINGUAS b/po-Engine-Campfire/LINGUAS
index 3c5409b..6c025d2 100644
--- a/po-Engine-Campfire/LINGUAS
+++ b/po-Engine-Campfire/LINGUAS
@@ -1,5 +1,8 @@
+cs
 da
 de
+fi
 fr
+pt_BR
 sv
 zh_CN
diff --git a/po-Engine-Campfire/POTFILES.skip b/po-Engine-Campfire/POTFILES.skip
index 7d74a2d..97f7131 100644
--- a/po-Engine-Campfire/POTFILES.skip
+++ b/po-Engine-Campfire/POTFILES.skip
@@ -3,11 +3,13 @@ src/Common/
 src/Frontend/
 src/Frontend-GNOME/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
 src/Engine/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
diff --git a/po-Engine-Campfire/cs.po b/po-Engine-Campfire/cs.po
new file mode 100644
index 0000000..343a5cd
--- /dev/null
+++ b/po-Engine-Campfire/cs.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-05-22 18:05+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:123
+msgid "Connecting to campfire... "
+msgstr "Připojuji se s campfire..."
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
+msgid "Connected to campfire"
+msgstr "Připojen ke campfire"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
+msgid "Campfire Commands"
+msgstr "Příkazy campfire"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
+msgid "Upload"
+msgstr "Upload"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
+#, csharp-format
+msgid "'{0}' ({1} B) {2}"
+msgstr "'{0}' ({1} B) {2}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
+#, csharp-format
+msgid "has uploaded '{0}' ({1} B) {2}"
+msgstr "uploadoval '{0}' ({1} B) {2}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
+#, csharp-format
+msgid "has joined {0}"
+msgstr "vstoupil do {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
+#, csharp-format
+msgid "has left {0}"
+msgstr "odešel z {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
+#, csharp-format
+msgid "has locked {0}"
+msgstr "uzamkl {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
+#, csharp-format
+msgid "has unlocked {0}"
+msgstr "odemkl {0}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
+msgid "has changed the topic"
+msgstr "změnil téma"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
+msgid "has performed an unknown action"
+msgstr "provedl neznámou činnost"
diff --git a/po-Engine-Campfire/da.po b/po-Engine-Campfire/da.po
index 9c1bf40..bc99f6d 100644
--- a/po-Engine-Campfire/da.po
+++ b/po-Engine-Campfire/da.po
@@ -3,12 +3,12 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 20:01+0200\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
 "PO-Revision-Date: 2013-04-16 06:30+0000\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
@@ -22,58 +22,58 @@ msgstr ""
 msgid "Connecting to campfire... "
 msgstr "Forbinder til campfire ..."
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
 msgid "Connected to campfire"
 msgstr "Forbundet til campfire"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
 msgid "Campfire Commands"
 msgstr "Campfire-kommandoer"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
 msgid "Upload"
 msgstr "Overfør"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
 #, csharp-format
 msgid "'{0}' ({1} B) {2}"
 msgstr "»{0}« ({1} B) {2}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
 #, csharp-format
 msgid "has uploaded '{0}' ({1} B) {2}"
 msgstr "har overført »{0}« ({1} B) {2}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
 #, csharp-format
 msgid "has joined {0}"
 msgstr "er sluttet til {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
 #, csharp-format
 msgid "has left {0}"
 msgstr "har forladt {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
 #, csharp-format
 msgid "has locked {0}"
 msgstr "har låst {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
 #, csharp-format
 msgid "has unlocked {0}"
 msgstr "har åbent {0}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
 msgid "has changed the topic"
 msgstr "har ændret emnet"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
 msgid "has performed an unknown action"
 msgstr "har udført ukendt handling"
diff --git a/po-Engine-Campfire/de.po b/po-Engine-Campfire/de.po
index 946c1a2..406a07e 100644
--- a/po-Engine-Campfire/de.po
+++ b/po-Engine-Campfire/de.po
@@ -3,12 +3,12 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2013.
+# Bianca Mix <heavydemon at freenet.de>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 20:01+0200\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
 "PO-Revision-Date: 2013-04-14 19:26+0000\n"
 "Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
@@ -22,58 +22,58 @@ msgstr ""
 msgid "Connecting to campfire... "
 msgstr "verbinde zu campfire..."
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
 msgid "Connected to campfire"
 msgstr "Verbunden mit campfire"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
 msgid "Campfire Commands"
 msgstr "Campfire Kommandos"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
 msgid "Upload"
 msgstr "Hochladen"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
 #, csharp-format
 msgid "'{0}' ({1} B) {2}"
 msgstr "'{0}' ({1} B) {2}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
 #, csharp-format
 msgid "has uploaded '{0}' ({1} B) {2}"
 msgstr "hat '{0}' ({1} B) hochgeladen {2}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
 #, csharp-format
 msgid "has joined {0}"
 msgstr "hat {0} betreten"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
 #, csharp-format
 msgid "has left {0}"
 msgstr "hat {0} verlassen"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
 #, csharp-format
 msgid "has locked {0}"
 msgstr "hat {0} gesperrt"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
 #, csharp-format
 msgid "has unlocked {0}"
 msgstr "hat {0} entsperrt"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
 msgid "has changed the topic"
 msgstr "hat das Thema geändert"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
 msgid "has performed an unknown action"
 msgstr "hat eine unbekannte Aktion ausgeführt"
diff --git a/po-Engine-Campfire/fi.po b/po-Engine-Campfire/fi.po
new file mode 100644
index 0000000..2dfe131
--- /dev/null
+++ b/po-Engine-Campfire/fi.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Kalle Kaitala <cobrian at cobrian.net>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-23 06:20+0000\n"
+"Last-Translator: Kalle Kaitala <cobrian at cobrian.net>\n"
+"Language-Team: Finnish (http://www.transifex.com/projects/p/smuxi/language/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:123
+msgid "Connecting to campfire... "
+msgstr "Yhdistetään campfireen..."
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
+msgid "Connected to campfire"
+msgstr "Yhdistetty campfireen"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
+msgid "Campfire Commands"
+msgstr "Campfire-komennot"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
+msgid "Upload"
+msgstr "Lähetä"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
+#, csharp-format
+msgid "'{0}' ({1} B) {2}"
+msgstr "'{0}' ({1} B) {2}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
+#, csharp-format
+msgid "has uploaded '{0}' ({1} B) {2}"
+msgstr "on lähettänyt '{0}' ({1} B) {2}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
+#, csharp-format
+msgid "has joined {0}"
+msgstr "on liittynyt huoneeseen {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
+#, csharp-format
+msgid "has left {0}"
+msgstr "on lähtenyt huoneesta {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
+#, csharp-format
+msgid "has locked {0}"
+msgstr "on lukinnut huoneen {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
+#, csharp-format
+msgid "has unlocked {0}"
+msgstr "on avannut huoneen {0}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
+msgid "has changed the topic"
+msgstr "on vaihtanut aihetta"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
+msgid "has performed an unknown action"
+msgstr "on suorittanut tuntemattoman toiminnon"
diff --git a/po-Engine-Campfire/fr.po b/po-Engine-Campfire/fr.po
index c78756e..028e98b 100644
--- a/po-Engine-Campfire/fr.po
+++ b/po-Engine-Campfire/fr.po
@@ -5,7 +5,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:37+0200\n"
+"POT-Creation-Date: 2013-08-19 12:17+0200\n"
 "PO-Revision-Date: 2013-04-14 21:48+0100\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
 "Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
@@ -19,58 +19,58 @@ msgstr ""
 msgid "Connecting to campfire... "
 msgstr "Connexion à campfire..."
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
 msgid "Connected to campfire"
 msgstr "Connecté à campfire"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
 msgid "Campfire Commands"
 msgstr "Commandes Campfire"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
 msgid "Upload"
 msgstr "Envoyer"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
 #, csharp-format
 msgid "'{0}' ({1} B) {2}"
 msgstr "'{0}' ({1} O) {2}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
 #, csharp-format
 msgid "has uploaded '{0}' ({1} B) {2}"
 msgstr "a envoyé '{0}' ({1} O) {2}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
 #, csharp-format
 msgid "has joined {0}"
 msgstr "a rejoint {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
 #, csharp-format
 msgid "has left {0}"
 msgstr "a quitté {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
 #, csharp-format
 msgid "has locked {0}"
 msgstr "a bloqué {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
 #, csharp-format
 msgid "has unlocked {0}"
 msgstr "a débloqué {0}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
 msgid "has changed the topic"
 msgstr "a changé le sujet"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
 msgid "has performed an unknown action"
 msgstr "a effectué une action inconnue"
diff --git a/po-Engine-Campfire/pt_BR.po b/po-Engine-Campfire/pt_BR.po
new file mode 100644
index 0000000..e3af63b
--- /dev/null
+++ b/po-Engine-Campfire/pt_BR.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 20:01+0200\n"
+"PO-Revision-Date: 2013-07-15 00:07+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:123
+msgid "Connecting to campfire... "
+msgstr "Conectando a campfire"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+msgid "Connected to campfire"
+msgstr "Conectado a campfire"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+msgid "Campfire Commands"
+msgstr "Comandos do Campfire "
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+msgid "Upload"
+msgstr "Upload"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#, csharp-format
+msgid "'{0}' ({1} B) {2}"
+msgstr "'{0}' ({1} B) {2}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#, csharp-format
+msgid "has uploaded '{0}' ({1} B) {2}"
+msgstr "fez upload '{0}' ({1} B) {2}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#, csharp-format
+msgid "has joined {0}"
+msgstr "Entrou em {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#, csharp-format
+msgid "has left {0}"
+msgstr "Saiu de {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#, csharp-format
+msgid "has locked {0}"
+msgstr "Trancou {0}"
+
+#. TRANSLATOR: {0} is the name of the room
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#, csharp-format
+msgid "has unlocked {0}"
+msgstr "Destravou {0}"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+msgid "has changed the topic"
+msgstr "Mudou o tópico"
+
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+msgid "has performed an unknown action"
+msgstr "Fez uma ação desconhecida"
diff --git a/po-Engine-Campfire/sv.po b/po-Engine-Campfire/sv.po
index c3b3ef1..6808f1a 100644
--- a/po-Engine-Campfire/sv.po
+++ b/po-Engine-Campfire/sv.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 20:01+0200\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
 "PO-Revision-Date: 2013-04-17 04:07+0000\n"
 "Last-Translator: flugsio <flugsio at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
@@ -22,58 +22,58 @@ msgstr ""
 msgid "Connecting to campfire... "
 msgstr "Ansluter till campfire..."
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
 msgid "Connected to campfire"
 msgstr "Ansluten till campfire"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
 msgid "Campfire Commands"
 msgstr "Campfire-kommandon"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
 msgid "Upload"
 msgstr "Ladda upp"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
 #, csharp-format
 msgid "'{0}' ({1} B) {2}"
 msgstr "'{0}' ({1} B) {2}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
 #, csharp-format
 msgid "has uploaded '{0}' ({1} B) {2}"
 msgstr "har laddat upp '{0}' ({1} B) {2}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
 #, csharp-format
 msgid "has joined {0}"
 msgstr "har anslutit {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
 #, csharp-format
 msgid "has left {0}"
 msgstr "har lämnat {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
 #, csharp-format
 msgid "has locked {0}"
 msgstr "har låst {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
 #, csharp-format
 msgid "has unlocked {0}"
 msgstr "har låst upp {0}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
 msgid "has changed the topic"
 msgstr "har ändrat rubrik"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
 msgid "has performed an unknown action"
 msgstr "har utfört en okänd åtgärd"
diff --git a/po-Engine-Campfire/zh_CN.po b/po-Engine-Campfire/zh_CN.po
index 8cd2f20..6485293 100644
--- a/po-Engine-Campfire/zh_CN.po
+++ b/po-Engine-Campfire/zh_CN.po
@@ -3,12 +3,12 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2013.
+# Dean Lee <xslidian at gmail.com>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 20:01+0200\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
 "PO-Revision-Date: 2013-04-15 14:11+0000\n"
 "Last-Translator: Dean Lee <xslidian at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
@@ -22,58 +22,58 @@ msgstr ""
 msgid "Connecting to campfire... "
 msgstr "正在连接到 campfire..."
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:149
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:164
 msgid "Connected to campfire"
 msgstr "已连接到 campfire"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:181
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:196
 msgid "Campfire Commands"
 msgstr "Campfire 命令"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:242
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:256
 msgid "Upload"
 msgstr "上传"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:243
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:257
 #, csharp-format
 msgid "'{0}' ({1} B) {2}"
 msgstr "'{0}' ({1} 字节) {2}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:354
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:368
 #, csharp-format
 msgid "has uploaded '{0}' ({1} B) {2}"
 msgstr "已上传 '{0}' ({1} 字节) {2}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:386
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:400
 #, csharp-format
 msgid "has joined {0}"
 msgstr "已加入 {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:395
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:409
 #, csharp-format
 msgid "has left {0}"
 msgstr "已离开 {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:403
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:417
 #, csharp-format
 msgid "has locked {0}"
 msgstr "已锁定 {0}"
 
 #. TRANSLATOR: {0} is the name of the room
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:407
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:421
 #, csharp-format
 msgid "has unlocked {0}"
 msgstr "已解锁 {0}"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:412
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:426
 msgid "has changed the topic"
 msgstr "已更改主题"
 
-#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:422
+#: ../src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs:436
 msgid "has performed an unknown action"
 msgstr "已执行未知操作"
diff --git a/po-Engine-IRC/LINGUAS b/po-Engine-IRC/LINGUAS
index 857613d..122af0e 100644
--- a/po-Engine-IRC/LINGUAS
+++ b/po-Engine-IRC/LINGUAS
@@ -12,6 +12,7 @@ it
 nb_NO
 pl
 pt
+pt_BR
 ru
 sv
 sk
diff --git a/po-Engine-IRC/POTFILES.skip b/po-Engine-IRC/POTFILES.skip
index f6b3c95..d9a6ab9 100644
--- a/po-Engine-IRC/POTFILES.skip
+++ b/po-Engine-IRC/POTFILES.skip
@@ -2,6 +2,7 @@ glade/
 src/Common/
 src/Engine/
 src/Engine-Campfire/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
@@ -9,6 +10,7 @@ src/Engine-Twitter/
 src/Frontend/
 src/Frontend-GNOME/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
diff --git a/po-Engine-IRC/cs.po b/po-Engine-IRC/cs.po
index 0abed7a..3df73bc 100644
--- a/po-Engine-IRC/cs.po
+++ b/po-Engine-IRC/cs.po
@@ -1,237 +1,280 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-engine-irc 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-15 12:25+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-19 21:29+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
+#, csharp-format
+msgid "{0} invites you to {1}"
+msgstr "{0} Vás zve do {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Přijmout pozvánku (vstoupit do místnosti)"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:221
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1412
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "pryč"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:227
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "zpoždění: {0} sekund"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:233
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "nepřipojen"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:292
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
+#, csharp-format
+msgid "Using proxy: {0}:{1}"
+msgstr "Používám proxy: {0}:{1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Připojování k {0} port {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:298
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
-msgstr "Připojení k {0} navázáno"
+msgstr "Spojení s {0} navázáno"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:301
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Přihlašování..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:321
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Připojení selhalo!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:322
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Připojení selhalo! Příčina: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:331
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Odpojování..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:334
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Odpojování od {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:339
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Odpojeno od {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:342
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
-msgstr "Připojení uzavřeno"
+msgstr "Spojení ukončeno"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:404
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Nepřipojeno"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:376
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Opětovné připojování..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:384
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Opětovné připojování k {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:398
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Chyba při opětovném připojování"
 
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
+#, csharp-format
+msgid "Sleeping for {0} milliseconds"
+msgstr "Spím {0} milisekund"
+
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:747
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
-msgstr "Příkazy správce protokolu Irc"
+msgstr "Příkazy správce protokolu IRC"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:816
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Neplatný port: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:944
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
-msgstr "Zařazování připojení do fronty: {0}"
+msgstr "Zařazování vstoupení do fronty: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:958
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
-msgstr ""
-"Již jste připojeni na kanálu: {0}. Pro přepnutí na tento kanál zadejte /"
-"window {0}."
+msgstr "Již jste v kanálu: {0}. Pro přepnutí na tento kanál zadejte /window {0}."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:993
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
-msgstr "Aktivní připojení: {0} - Fronta s připojeními: {1}"
+msgstr "Aktivní vstupy: {0} - Fronta se vstupy: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1016
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1047
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
-msgstr "Připojování: {0}"
+msgstr "Vstupuji do: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1018
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Zbývající"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1023
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
-msgstr "aktivní připojení: {0}"
+msgstr "aktivní vstupy: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1032
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
-msgstr "fronta s připojeními: {0}"
+msgstr "vstupy ve frontě: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1399
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1401
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Majitel"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "Administrátor kanálu"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1403
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "Půl-op"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Hlas"
 
-#. For translators: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
-msgstr "Téma pro {0}: {1}"
+msgstr "Téma {0}: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1465
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "{0} nemá nastaveno téma"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1559
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "ban"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1569
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "V kanálu nejsou žádné bany"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "výjimka z banů"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "V kanále nejsou žádné výjimky z banů"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "výjimka zvaní"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "V kanále nejsou žádné výjimky zvaní"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Pozvání {0} do {1}"
+msgid "Your user mode is {0}"
+msgstr "Váš režim uživatele je {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
-msgstr "{0} je již na {1}"
+msgstr "{0} je již v {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1715
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Zvu {0} do {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Uživatelé"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1766
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "Celkem {0} uživatelů [{1} opů, {2} hlasových, {3} normálních]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1909
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Chyba spojení! Příčina: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1919
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
-msgstr "Pro příkaz {0} není vloženo dostatek parametrů"
+msgstr "Pro příkaz {0} nebyl zadán dostatek parametrů"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1929
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
-msgstr "Není připojeno k serveru"
+msgstr "Nepřipojen k serveru"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2306
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
-msgstr "{0}: Neplatná přezdívka/kanál"
+msgstr "{0}: Neznámá přezdívka/kanál"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2432
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
-msgstr ""
-"Aby opět nedošlo k zahlcení serveru, bylo zvýšeno spoždění odeslání na {0} ms."
+msgstr "Aby nedošlo opět k zahlcení serveru, bylo zvýšeno zpoždění odeslání na {0} ms."
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2448
-msgid "Nick"
-msgstr "Přezdívka"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2459
-msgid "is already in use"
-msgstr "se již používá"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Přezdívka {0} se již používá"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
-msgstr "Nelze se připojit ke kanálu:"
+msgstr "Nelze vstoupit do kanálu:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2498
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Dostal jste ban"
 
@@ -239,85 +282,88 @@ msgstr "Dostal jste ban"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2608
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] požádal o CTCP {2} od {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "Odpověď CTCP PING od {0}: {1} sekund"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2641
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0} odpověď od {1}: {2}"
 
-#. For translators: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2888
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
-msgstr "{0} [{1}] se připojil {2}"
+msgstr "{0} [{1}] vstoupil do {2}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3024
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
-msgid "{0} [{1}] has left {2} [{3}]"
-msgstr "{0} [{1}] opustil {2} [{3}]"
+msgid "{0} [{1}] has left {2}"
+msgstr "{0} [{1}] odešel z {2}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
-msgid "You were kicked from {0} by {1} [{2}]"
-msgstr "Byl jste vykopnut z {0} uživatelem {1} [{2}]"
+msgid "You were kicked from {0} by {1}"
+msgstr "Byl jste vykopnut z {0} uživatelem {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3051
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
-msgid "{0} was kicked from {1} by {2} [{3}]"
-msgstr "{0} byl vykopnut z {1} uživatelem {2} [{3}]"
+msgid "{0} was kicked from {1} by {2}"
+msgstr "{0} byl vykopnut z {1} uživatelem {2}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3069
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3115
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Nyní jste znám jako {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3143
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} je nyní znám jako {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3200
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} změnil téma {1} na: {2}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3285
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Změna režimu [{0}] uživatele {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3302
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "režim/{0} [{1}] od {2}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3339
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
-msgid "{0} [{1}] has quit [{2}]"
-msgstr "{0} [{1}] opustil [{2}]"
+msgid "{0} [{1}] has quit"
+msgstr "{0} [{1}] se odpojil"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3459
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
+#, csharp-format
+msgid ""
+"Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
+"seconds..."
+msgstr "Spojení s {0} na portu {1} selhalo (pokus {2}); další pokus za {3} vteřin..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} je pryč: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3465
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "Nadále nebudete označován, že jste pryč"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3471
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "Byl jste označen, že jste pryč"
-
-#~ msgid "Not connected!"
-#~ msgstr "Nepřipojeno!"
diff --git a/po-Engine-IRC/da.po b/po-Engine-IRC/da.po
index e7c89ee..0c1a01c 100644
--- a/po-Engine-IRC/da.po
+++ b/po-Engine-IRC/da.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2012-2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2012-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:14+0200\n"
-"PO-Revision-Date: 2013-04-16 06:21+0000\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-20 19:32+0000\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
@@ -18,240 +18,263 @@ msgstr ""
 "Language: da\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} inviterer dig til {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Accepter invitation (gå til rum)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "fraværende"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "lag: {0} sekunder"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "ikke forbundet"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Bruger proxy: {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Forbinder til {0} port {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "Forbindelse til {0} etableret"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Logger ind..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Forbindelse mislykkedes!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Forbindelse mislykkedes! Årsag: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Afbryder..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Afbryder fra {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Afbrudt fra {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "Forbindelse lukket"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Ikke forbundet"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Genforbinder..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Genforbinder til {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Genforbindingsfejl"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "Sover i {0} millisekunder"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "Kommandoer for IrcProtocolManager"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Ugyldig port: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "Sætter join sammen: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
 msgstr "Allerede tilsluttet til kanal: {0}. Tast /window {0} for at skifte."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "Aktive join: {0} - Join i kø: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "Joiner: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Tilbage"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "aktive join: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "join i kø: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Ejer"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "KanalAdm"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "Halfop"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Voice"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "Emne for {0}: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "Intet emne angivet for {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "giv karantæne"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "Ingen karantæner i kanal"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "Karantæneundtagelse"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "Ingen karantæneundtagelser i kanal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "invitationsundtagelse"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "Ingen invitationsundtagelser i kanal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "Din brugertilstand er {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Inviterer {0} til {1}"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} er allerede på {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Inviterer {0} til {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Brugere"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "I alt {0} brugere [{1} op'er, {2} voice'er, {3} normale]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Forbindelsesfejl! Årsag: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Ikke nok parametre for {0} kommando"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "Ikke forbundet til server"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: Intet sådan brugernavn/kanal"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
 msgstr "Øgede forsinkelse for send til {0}ms for at undgå at blive oversvømmet på serveren igen."
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "Brugernavn"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "er allerede i brug"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Brugernavn {0} er allerede i brug"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "Kan ikke slutte til kanal:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Du har karantæne"
 
@@ -259,98 +282,88 @@ msgstr "Du har karantæne"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] anmod om CTCP {2} fra {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "CTCP PING svar fra {0}: {1} sekunder"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0} svar fra {1}: {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] har sluttet sig til {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] har forladt {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "Du blev smidt ud fra {0} af {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} blev smidt ud fra {1} af {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Du er nu kendt som {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} er nu kendt som {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} ændrede emnet på {1} til: {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Tilstandsændring [{0}] for bruger {1}"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "tilstand/{0} [{1}] af {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] er gået"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
 msgstr "Forbindelse til {0} port {1} er mislykkedes (forsøg {2}), forsøger om {3} sekunder..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} er fraværende: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "Du er ikke længere registreret som fraværende"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "Du er registreret som fraværende"
diff --git a/po-Engine-IRC/de.po b/po-Engine-IRC/de.po
index c287e99..35785f4 100644
--- a/po-Engine-IRC/de.po
+++ b/po-Engine-IRC/de.po
@@ -3,14 +3,15 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2012-2013.
+# Bianca Mix <heavydemon at freenet.de>, 2012-2013
+# Mirco Bauer <meebey at gmail.com>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:14+0200\n"
-"PO-Revision-Date: 2013-04-14 19:31+0000\n"
-"Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-22 15:09+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -18,240 +19,263 @@ msgstr ""
 "Language: de\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} lädt Sie in {1} ein"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Einladung akzeptieren (Raum betreten)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "abwesend"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "Verzögerung: {0} Sekunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "nicht verbunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Benutze Proxy: {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Verbinde zu {0} Port {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "Verbindung zu {0} ist hergestellt"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Anmelden..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Verbindung ist fehlgeschlagen!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Verbindung ist fehlgeschlagen! Ursache: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Trenne..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Trenne von {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Getrennt von {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "Verbindung wurde geschlossen"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Nicht verbunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Verbinde erneut..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Verbinde erneut zu {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Fehler beim Wiederverbinden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "Warte für {0} Millisekunden"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "IrcProtocolManager Befehle"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Ungültiger Port: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "Verzögere Beitritte: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
 msgstr "Channel wurde bereits betreten: {0}. Tippen Sie /window {0} um dorthin zu wechseln."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "Aktive Beitritte: {0} - Wartende Beitritte: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "Betrete: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Verbleibend"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "Aktive Beitritte: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "Wartende Beitritte: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Besitzer"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "Channeladministrator"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "Halb-Op"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Voice"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "Thema für {0}: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "Kein Thema für {0} gesetzt"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "Sperre"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "Keine Sperren in diesem Channel"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "Sperrausnahme"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "Keine Sperrausnahme in diesem Channel"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "Einladungsausnahme"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "Keine Einladungsausnahme in diesem Channel"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "Ihr Benutzermodus ist {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Lade {0} in {1} ein"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} ist bereits in {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Lade {0} in {1} ein"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Benutzer"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "Insgesamt {0} Benutzer [{1} Ops, {2} Voices, {3} normal]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Verbindungsfehler! Grund: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Nicht genügend Parameter für den Befehl: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "Nicht mit Server verbunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: Kein solcher Nick/Channel"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
 msgstr "Nachrichtenverzögerung auf {0}ms erhöht, um eine Überflutung des Servers zu verhindern."
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "Nick"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "wird bereits verwendet"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Benutzername {0} ist bereits in Benutzung"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "Konnte Channel nicht beitreten:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Sie sind gesperrt"
 
@@ -259,98 +283,88 @@ msgstr "Sie sind gesperrt"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] fragt CTCP {2} von {3} ab: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "CTCP PING Antwort von {0}: {1} Sekunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0} Antwort von {1}: {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] hat {2} betreten"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] hat {2} verlassen"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "Sie wurden von {1} aus {0} hinausgeworfen"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} wurde von {2} aus {1} hinausgeworfen"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Sie sind nun bekannt als: {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} ist nun bekannt als: {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} hat das Thema des Kanals {1} geändert auf: {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Mode für Benutzer {1} geändert [{0}]"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "mode/{0} [{1}] von {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] hat beendet"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
 msgstr "Die Verbindung {0} über Port {1} ist fehlgeschlagen (Versuch {2}), erneuter Versuch in {3} Sekunden"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} ist abwesend: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
-msgstr "Sie sind nicht mehr als abwesend gekenntzeichet"
+msgstr "Sie sind nicht mehr als abwesend gekennzeichnet"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
-msgstr "Sie sind als abwesend gekenntzeichnet"
+msgstr "Sie sind als abwesend gekennzeichnet"
diff --git a/po-Engine-IRC/fi.po b/po-Engine-IRC/fi.po
index 86eb65f..280e819 100644
--- a/po-Engine-IRC/fi.po
+++ b/po-Engine-IRC/fi.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:14+0200\n"
-"PO-Revision-Date: 2013-05-01 09:46+0000\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-20 06:31+0000\n"
 "Last-Translator: Kalle Kaitala <cobrian at cobrian.net>\n"
 "Language-Team: Finnish (http://www.transifex.com/projects/p/smuxi/language/fi/)\n"
 "MIME-Version: 1.0\n"
@@ -18,240 +18,263 @@ msgstr ""
 "Language: fi\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} kutsuu sinut kanavalle {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Hyväksy kutsu (liity kanavalle)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "poissa"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "viive {0} sekuntia"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "ei yhteydessä"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Käytetään välityspalvelinta: {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Yhdistetään palvelimeen {0} porttiin {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "Yhteys palvelimeen {0} muodostettu"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Kirjaudutaan sisään..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Yhteydenmuodostus epäonnistui!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Yhteydenmuodostus epäonnistui! Syy:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Katkaistaan..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Katkaistaan yhteyttä palvelimeen {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Yhteys palvelimeen {0} katkaistu"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "Yhteys katkaistu"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Ei yhdistetty"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Yhdistetään uudelleen..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Yhdistetään uudelleen palvelimeen {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Virhe uudelleenyhdistämisessä"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "Nukutaan {0} millisekuntia"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "IrcProtocolManager -komennot"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Epäkelpo portti: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "Liittymisiä jonossa: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
 msgstr "Kanava {0} on jo auki. Kirjoita /window {0} siirtyäksesi sinne."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "Aktiivisia liittymisiä: {0} - Liittymisiä jonossa: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "Liitytään: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Jäljellä"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "aktiivisia liittymisiä: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "liittymisiä jonossa: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC-operaattori"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Omistaja"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "KanavaHallinnoija"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Operaattori"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "PuoliOperaattori"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Ääni"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "Aihe kanavalle {0}: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "Ei aihetta kanavalle {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "Porttikielto"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "Ei porttikieltoja kanavalla"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "Porttikieltopoikkeus"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "Ei porttikieltopoikkeuksia kanavalla"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "kutsupoikkeus"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "Ei kutsupoikkeuksia kanavalla"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "Käyttäjätilasi on {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Kutsutaan {0} kanavalle {1}"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} on jo kanavalla {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Kutsutaan {0} kanavalle {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Käyttäjät"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "Yhteensä {0} käyttäjää [{1} operaattoria, {2} äänellistä, {3} normaalia]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Yhteysvirhe! Syy:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Ei tarpeeksi parametrejä komennolle {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "Ei yhdistettynä palvelimelle"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: Ei tällaista käyttäjää/kanavaa"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
 msgstr "Korotettiin lähetysviivettä {0}ms jotta vältytään ylivuotokatkaisulta jatkossa."
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "Lempinimi"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "on jo käytössä"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Käyttäjätunnus {0} on jo käytössä"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "Ei voi liittyä kanavalle:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Sinulla on porttikielto"
 
@@ -259,98 +282,88 @@ msgstr "Sinulla on porttikielto"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] teki CTCP {2} -pyynnön {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "CTCP PING -vastaus käyttäjältä {0}: {1} sekuntia"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0} -vastaus käyttäjältä {1}: {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] liittyi kanavalle {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] on poistunut kanavalta {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "{1} potkaisi sinut kanavalta {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} poistettiin kanavalta {1} käyttäjän {2} toimesta"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Sinut tunnetaan nyt nimellä {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} on nyt nimeltään {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} muutti kanavan {1} aiheeksi: {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Tilan vaihto [{0}] käyttäjälle {1}"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "tila/{0} [{1}] asettajana {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] lopetti"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
 msgstr "Yhteys palvelimeen {0} portti {1} on epäonnistunut (yritys {2}), yritetään uudelleen {3} sekunnin kuluttua..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} on poissa: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "Poissaolomerkintä poistettu"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "Poissaolomerkintä päällä"
diff --git a/po-Engine-IRC/fr.po b/po-Engine-IRC/fr.po
index 83a2512..7d86dcf 100644
--- a/po-Engine-IRC/fr.po
+++ b/po-Engine-IRC/fr.po
@@ -1,261 +1,280 @@
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-#
+# 
 # Translators:
+# Clément Bourgeois <moonpyk at gmail.com>, 2012-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:37+0200\n"
-"PO-Revision-Date: 2013-04-10 22:29+0100\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-19 12:34+0000\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
-"Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
-"Language: fr\n"
+"Language-Team: French (http://www.transifex.com/projects/p/smuxi/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} vous invite sur {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Accepter l'invitation (rejoindre le canal)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "parti"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "lag : {0} secondes"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "non connecté"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Utilisation du proxy {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Connexion au serveur {0}, sur le port {1} en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "Connexion au serveur {0} établie"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Enregistrement en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Connexion impossible !"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Connexion impossible ! Raison :"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Déconnexion en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Déconnexion de {0} en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Déconnecté de {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "Connexion fermée"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Non connecté"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Reconnexion en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Reconnexion à {0} en cours..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Erreur à la reconnexion"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "Mis en pause pendant {0} millisecondes"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "Commandes IrcProtocolManager"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Port invalide : {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "Mise des en attente des inscriptions en cours : {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
-msgstr ""
-"Vous êtes déjà sur le canal: {0}. Utilisez /window {0} pour passer sur celui-"
-"ci."
+msgstr "Vous êtes déjà sur le canal: {0}. Utilisez /window {0} pour passer sur celui-ci."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "Inscriptions en cours : {0} - Inscriptions en attente : {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "Raccordement : {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Restant"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "raccordements actifs : {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "raccordements en attente : {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "Opérateur IRC"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Propriétaire"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "Administrateur de canal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Opérateur"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "Demi-opérateur"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Voicé"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "Sujet de {0} : {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "Pas de sujet sélectionné pour {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "ban"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "Aucun utilisateur banni sur le canal"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "exception de banissement"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "Pas d'exception de banissement sur le canal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "exception d'invitation"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "Pas d'exception d'invitation sur le canal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "Votre mode utilisateur est {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Invitation de {0} par {1}"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} est déjà sur {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Invitation de {0} par {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Utilisateurs"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
-msgstr ""
-"Total de {0} utilisateurs, [{1} opérateur(s), {2} voicé(s), {3} normal(ux)]"
+msgstr "Total de {0} utilisateurs, [{1} opérateur(s), {2} voicé(s), {3} normal(ux)]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Erreur de connexion ! Raison :"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Pas assez de paramètres pour la commande {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "Non connecté au serveur"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: Impossible de trouver le surnom/canal"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
-msgstr ""
-"Augmentation du délai d'envoi jusqu'à {0}ms pour éviter d'être kické pour "
-"flooding du serveur encore une fois."
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "Surnom"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "est déjà en cours d'utilisation"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+msgstr "Augmentation du délai d'envoi jusqu'à {0}ms pour éviter d'être kické pour flooding du serveur encore une fois."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Le pseudo {0} est déjà en cours d'utilisation"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "Impossible de rejoindre le canal :"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Vous êtes banni"
 
@@ -263,100 +282,88 @@ msgstr "Vous êtes banni"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] a fait une requête CTCP {2} de {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "Réponse CTCP PING de {0} : {1} secondes"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "Réponse CTCP {0} de {1} : {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] a rejoint {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] a quitté {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "Vous avez été kické de {0} par {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} a été kické de {1} par {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Vous êtes maintenant connu en tant que {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} est maintenant connu en tant que {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} a changé le sujet de {1} en : {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Changement de mode [{0}] pour l'utilisateur {1}"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "mode/{0} [{1}] par {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] a quitté"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
-msgstr ""
-"La connexion vers {0}, port {1} a échoué (essai {2}), nouvel essai dans {3} "
-"secondes..."
+msgstr "La connexion vers {0}, port {1} a échoué (essai {2}), nouvel essai dans {3} secondes..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} est parti : {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "Vous êtes marqué comme étant revenu"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "Vous avez été marqué comme étant parti"
diff --git a/po-Engine-IRC/pt_BR.po b/po-Engine-IRC/pt_BR.po
new file mode 100644
index 0000000..710320c
--- /dev/null
+++ b/po-Engine-IRC/pt_BR.po
@@ -0,0 +1,356 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:14+0200\n"
+"PO-Revision-Date: 2013-07-08 22:15+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANSLATOR: do NOT change the position of {0}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#, csharp-format
+msgid "{0} invites you to {1}"
+msgstr "{0} está convidando você para {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+msgid "away"
+msgstr "Ausente"
+
+#. TRANSLATOR: {0} is the amount of seconds
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#, csharp-format
+msgid "lag: {0} seconds"
+msgstr "Lag: {0} segundos"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+msgid "not connected"
+msgstr "Não conectado"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#, csharp-format
+msgid "Using proxy: {0}:{1}"
+msgstr "Usando proxy: {0}:{1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#, csharp-format
+msgid "Connecting to {0} port {1}..."
+msgstr "Conectando a {0} na porta {1}..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#, csharp-format
+msgid "Connection to {0} established"
+msgstr "Conexão a {0} feita"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+msgid "Logging in..."
+msgstr "Registrando log..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+msgid "Connection failed!"
+msgstr "Conexão falhou!"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+msgid "Connection failed! Reason: "
+msgstr "Conexão falhou! Razão:"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+msgid "Disconnecting..."
+msgstr "Desconectando..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#, csharp-format
+msgid "Disconnecting from {0}..."
+msgstr "Desconectando de {0}..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#, csharp-format
+msgid "Disconnected from {0}"
+msgstr "Desconectado de {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+msgid "Connection closed"
+msgstr "Conexão encerrada"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+msgid "Not connected"
+msgstr "Não conectado"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+msgid "Reconnecting..."
+msgstr "Re-conectando..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#, csharp-format
+msgid "Reconnecting to {0}..."
+msgstr "Re-conectando a {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+msgid "Reconnect Error"
+msgstr "Erro na Re-conexão"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#, csharp-format
+msgid "Sleeping for {0} milliseconds"
+msgstr "Parando por {0} milisegundos"
+
+#. TRANSLATOR: this line is used as label / category for a
+#. list of commands below
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+msgid "IrcProtocolManager Commands"
+msgstr "Comandos do protocolo Irc"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#, csharp-format
+msgid "Invalid port: {0}"
+msgstr "Porta inválida: {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#, csharp-format
+msgid "Queuing joins: {0}"
+msgstr "Canais para entrar: {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#, csharp-format
+msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
+msgstr "Já entrou no canal: {0}. Digite /window {0} para mudar para ele."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#, csharp-format
+msgid "Active joins: {0} - Queued joins: {1}"
+msgstr "Entradas em canal ativas: {0} - Canais para entrar: {1}"
+
+#. TRANSLATORS: final message will look like this:
+#. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#, csharp-format
+msgid "Joining: {0}"
+msgstr "Entrando: {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+msgid "Remaining"
+msgstr "Restando"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#, csharp-format
+msgid "active joins: {0}"
+msgstr "Entradas em canal ativas: {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#, csharp-format
+msgid "queued joins: {0}"
+msgstr "Canais para entrar: {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+msgid "IRC Op"
+msgstr "IRC Op"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+msgid "Op"
+msgstr "Op"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+msgid "Voice"
+msgstr "Voz"
+
+#. TRANSLATOR: do NOT change the position of {1}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#, csharp-format
+msgid "Topic for {0}: {1}"
+msgstr "Tópico para {0}: {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#, csharp-format
+msgid "No topic set for {0}"
+msgstr "Sem tópico definido para {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+msgid "ban"
+msgstr "banido"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+msgid "No bans in channel"
+msgstr "Sem banidos nesse canal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#, csharp-format
+msgid "Your user mode is {0}"
+msgstr "Seu modo de usuário é {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Convidando {0} para {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#, csharp-format
+msgid "{0} is already on {1}"
+msgstr "{0} já está em {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+msgid "Users"
+msgstr "Usuários"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#, csharp-format
+msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
+msgstr "Total de {0} usuários [{1} ops, {2} voz, {3} normal]"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+msgid "Connection error! Reason: "
+msgstr "Erro de conexão! Razão:"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#, csharp-format
+msgid "Not enough parameters for {0} command"
+msgstr "Parâmetros insfucientes para o comando {0}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+msgid "Not connected to server"
+msgstr "Não conectado ao servidor"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#, csharp-format
+msgid "{0}: No such nick/channel"
+msgstr "{0}: não encontrado nick/canal"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#, csharp-format
+msgid ""
+"Increased send delay to {0}ms to avoid being flooded off the server again."
+msgstr "Aumentado delay de envio de mensagens para {0}ms para evitar ser expulso do servidor por flood novamente."
+
+#. TRANSLATOR: the final line will look like this:
+#. -!- Nick {0} is already in use
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
+msgid "Nick"
+msgstr "Nick"
+
+#. TRANSLATOR: the final line will look like this:
+#. -!- Nick {0} is already in use
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
+msgid "is already in use"
+msgstr "já está em uso"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+msgid "Cannot join to channel:"
+msgstr "Não pode entrar no canal:"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+msgid "You are banned"
+msgstr "Você está banido"
+
+#. TRANSLATOR: {0}: nickname, {1}: ident at host,
+#. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
+#. example:
+#. meebey [meebey at example.com] requested CTCP VERSION from meebey:
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#, csharp-format
+msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
+msgstr "{0} [{1}] requisitou CTCP {2} de {3}: {4}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#, csharp-format
+msgid "CTCP PING reply from {0}: {1} seconds"
+msgstr "CTCP PING resposta de {0}: {1} segundos"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#, csharp-format
+msgid "CTCP {0} reply from {1}: {2}"
+msgstr "CTCP {0} resposta de {1}: {2}"
+
+#. TRANSLATOR: do NOT change the position of {0}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#, csharp-format
+msgid "{0} [{1}] has joined {2}"
+msgstr "{0} [{1}] entrou em {2}"
+
+#. TRANSLATOR: do NOT change the position of {0}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#, csharp-format
+msgid "{0} [{1}] has left {2}"
+msgstr "{0} [{1}] saiu de {2}"
+
+#. TRANSLATOR: do NOT change the position of {1}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#, csharp-format
+msgid "You were kicked from {0} by {1}"
+msgstr "Você foi expulso de {0} por {1}"
+
+#. TRANSLATOR: do NOT change the position of {0} and {2}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#, csharp-format
+msgid "{0} was kicked from {1} by {2}"
+msgstr "{0} foi expulso de {1} por {2}"
+
+#. TRANSLATOR: do NOT change the position of {0}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#, csharp-format
+msgid "You're now known as {0}"
+msgstr "Você é conhecido como {0} agora"
+
+#. TRANSLATOR: do NOT change the position of {0} or {1}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#, csharp-format
+msgid "{0} is now known as {1}"
+msgstr "{0} é conhecido como {1} agora"
+
+#. TRANSLATOR: do NOT change the position of {0} and {2}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#, csharp-format
+msgid "{0} changed the topic of {1} to: {2}"
+msgstr "{0} mudou o tópico do canal {1} para {2}"
+
+#. TRANSLATOR: do NOT change the position of {1}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#, csharp-format
+msgid "Mode change [{0}] for user {1}"
+msgstr "Mudou modo [{0}] para usuário {1}"
+
+#. TRANSLATOR: do NOT change the position of {2}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#, csharp-format
+msgid "mode/{0} [{1}] by {2}"
+msgstr "Modo/{0} [{1}] por {2}"
+
+#. TRANSLATOR: do NOT change the position of {0}!
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#, csharp-format
+msgid "{0} [{1}] has quit"
+msgstr "{0} [{1}] Saiu"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#, csharp-format
+msgid ""
+"Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
+"seconds..."
+msgstr "Conexão para {0} e porta {1} falhou (Tentativa {2}), tentando novamente em {3} segundos..."
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#, csharp-format
+msgid "{0} is away: {1}"
+msgstr "{0} está ausente: {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+msgid "You are no longer marked as being away"
+msgstr "Você não está mais marcado como ausente"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+msgid "You have been marked as being away"
+msgstr "Você está marcado como ausente"
diff --git a/po-Engine-IRC/sv.po b/po-Engine-IRC/sv.po
index d85a5f0..1dfa76a 100644
--- a/po-Engine-IRC/sv.po
+++ b/po-Engine-IRC/sv.po
@@ -9,8 +9,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:14+0200\n"
-"PO-Revision-Date: 2013-04-17 04:10+0000\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-19 13:45+0000\n"
 "Last-Translator: flugsio <flugsio at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
@@ -19,240 +19,263 @@ msgstr ""
 "Language: sv\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} bjuder in dig till {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "Acceptera inbjudan (anslut till rummet)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "borta"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "lagg: {0} sekunder"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "inte ansluten"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Använder proxy: {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "Anluter till {0} port {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "Anslutning till {0} upprättad"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "Loggar in..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "Anslutning misslyckades!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "Anslutning misslyckades! Anledning: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "Kopplar ner..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "Kopplar ner från {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "Anslutning nerkopplad från {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "Anslutning stängd"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "Inte ansluten"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "Återansluter..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "Återansluter till {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "Återanslutningsfel"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "Väntar i {0} millisekunder"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "Kommandon för IRC-protokollhanterare"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "Felaktig port: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "Köar kanalanslutningar: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
 msgstr "Redan ansluten till kanal {0}. Ange kommandot /window {0} för att byta till den."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "Aktiva kanalanslutningar: {0} - Köade kanalanslutningar: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "Ansluter till kanal: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "Återstående"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "aktiva kanalanslutningar: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "köade kanalanslutningar: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC Operatör"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "Ägare"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "KanalAdmin"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "Operatör"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "HalvOperatör"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "Voice"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "Ämne för {0}: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "Inget ämne satt för {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "bannlys"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
-msgstr "Ingen är bannlyst ur kanalen"
+msgstr "Ingen är bannlyst från kanalen"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "bannlys-undantag"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "Inga bannlys-undantag i kanalen"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "inbjuds-undantag"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "Inga inbjuds-undantag i kanalen"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "Ditt användarläge är {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "Bjuder in {0} till {1}"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} är redan på {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "Bjuder in {0} till {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "Användare"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "Totalt {0} användare [{1} operatörer, {2} voice, {3} vanliga]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "Fel i anslutning! Anledning: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Inte tillräckligt med parametrar för kommandot {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "Inte ansluten till server"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: Smeknamnet/kanalen finns inte"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
 msgstr "Ökar väntetid med {0}ms för att undvika att bli utkastad från servern på grund av för snabbt hanterade kommandon."
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "Smeknamnet"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "används redan"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "Användarnamnet {0} är upptaget"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "Kan inte ansluta till kanalen:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "Du är bannlyst"
 
@@ -260,98 +283,88 @@ msgstr "Du är bannlyst"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] begärde CTCP {2} från {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "CTCP PING-svar från {0}: {1} sekunder"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0}-svar från {1}: {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] anslöt till {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] har lämnat {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "Du sparkades från {0} av {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} blev sparkad från {1} av {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "Du kallas numera {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} kallas numera {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} bytte ämne för {1} till: {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "Ändrat användartillstånd [{0}] för användaren {1}"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "användartillstånd/{0} [{1}] av {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] har avslutat"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
 msgstr "Uppkoppling till {0} på port {1} har misslyckats (försök {2}), prövar igen om {3} sekunder..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} är borta: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "Du är inte längre markerad som borta"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "Du har markerats som borta"
diff --git a/po-Engine-IRC/zh_CN.po b/po-Engine-IRC/zh_CN.po
index 280ad96..e65bb89 100644
--- a/po-Engine-IRC/zh_CN.po
+++ b/po-Engine-IRC/zh_CN.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2012-2013.
+# Dean Lee <xslidian at gmail.com>, 2012-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:14+0200\n"
-"PO-Revision-Date: 2013-04-14 14:03+0000\n"
+"POT-Creation-Date: 2013-08-19 14:07+0200\n"
+"PO-Revision-Date: 2013-08-19 17:57+0000\n"
 "Last-Translator: Dean Lee <xslidian at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
@@ -18,240 +18,263 @@ msgstr ""
 "Language: zh_CN\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:244
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:250
 #, csharp-format
 msgid "{0} invites you to {1}"
 msgstr "{0} 邀请您加入 {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:275
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1642
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:266
+msgid "Accept invite (join room)"
+msgstr "接受邀请 (加入房间)"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:294
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1698
 msgid "away"
 msgstr "离开"
 
 #. TRANSLATOR: {0} is the amount of seconds
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:281
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:300
 #, csharp-format
 msgid "lag: {0} seconds"
 msgstr "延后: {0} 秒"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:287
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:306
 msgid "not connected"
 msgstr "未连接"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:347
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:366
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "使用代理: {0}:{1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:354
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:373
 #, csharp-format
 msgid "Connecting to {0} port {1}..."
 msgstr "正在连接到 {0} 端口 {1}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:364
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:491
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:383
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:510
 #, csharp-format
 msgid "Connection to {0} established"
 msgstr "到 {0} 的连接已建立"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:371
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:390
 msgid "Logging in..."
 msgstr "正在登录..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:410
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
 msgid "Connection failed!"
 msgstr "连接失败!"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:413
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:432
 msgid "Connection failed! Reason: "
 msgstr "连接失败! 原因: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:425
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:444
 msgid "Disconnecting..."
 msgstr "正在断开连接..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:429
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:448
 #, csharp-format
 msgid "Disconnecting from {0}..."
 msgstr "正在从 {0} 断开连接..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:435
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:454
 #, csharp-format
 msgid "Disconnected from {0}"
 msgstr "已从 {0} 断开连接"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:440
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:459
 msgid "Connection closed"
 msgstr "连接已关闭"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:447
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:512
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:466
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:531
 msgid "Not connected"
 msgstr "未连接"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:478
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:497
 msgid "Reconnecting..."
 msgstr "正在重新连接..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:485
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:504
 #, csharp-format
 msgid "Reconnecting to {0}..."
 msgstr "正在重新连接到 {0}..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:502
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:521
 msgid "Reconnect Error"
 msgstr "重新连接出错"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:846
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:905
 #, csharp-format
 msgid "Sleeping for {0} milliseconds"
 msgstr "睡眠 {0} 毫秒"
 
 #. TRANSLATOR: this line is used as label / category for a
 #. list of commands below
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:935
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:994
 msgid "IrcProtocolManager Commands"
 msgstr "IrcProtocolManager 命令"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1008
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1076
 #, csharp-format
 msgid "Invalid port: {0}"
 msgstr "端口无效: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1109
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1164
 #, csharp-format
 msgid "Queuing joins: {0}"
 msgstr "正等待加入: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1121
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1183
 #, csharp-format
 msgid "Already joined to channel: {0}. Type /window {0} to switch to it."
 msgstr "已经加入了频道: {0}. 输入 /window {0} 切换过去。"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1157
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1217
 #, csharp-format
 msgid "Active joins: {0} - Queued joins: {1}"
 msgstr "已经加入: {0} - 等待加入: {1}"
 
 #. TRANSLATORS: final message will look like this:
 #. Joining: #chan1 - Remaining active joins: #chan2 / queued joins: #chan3
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1180
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1209
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1240
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1269
 #, csharp-format
 msgid "Joining: {0}"
 msgstr "正在加入: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1182
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1242
 msgid "Remaining"
 msgstr "剩余"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1187
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1247
 #, csharp-format
 msgid "active joins: {0}"
 msgstr "已经加入: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1196
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1256
 #, csharp-format
 msgid "queued joins: {0}"
 msgstr "等待加入: {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1629
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1679
 msgid "IRC Op"
 msgstr "IRC 版主"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1631
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1681
+msgid "Owner"
+msgstr "主人"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1683
+msgid "ChanAdmin"
+msgstr "超级版主"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1685
 msgid "Op"
 msgstr "版主"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1633
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1687
+msgid "Halfop"
+msgstr "版主"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1689
 msgid "Voice"
 msgstr "认证用户"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1696
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1754
 #, csharp-format
 msgid "Topic for {0}: {1}"
 msgstr "{0} 的主题: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1699
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1756
 #, csharp-format
 msgid "No topic set for {0}"
 msgstr "{0} 尚未设定主题"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1781
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1922
 msgid "ban"
 msgstr "封禁"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1792
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1933
 msgid "No bans in channel"
 msgstr "频道内无被封禁用户"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1885
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1972
+msgid "ban exception"
+msgstr "封禁例外"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1983
+msgid "No ban exceptions in channel"
+msgstr "频道内无封禁例外用户"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2022
+msgid "invite exception"
+msgstr "邀请例外"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2033
+msgid "No invite exceptions in channel"
+msgstr "频道内无邀请例外用户"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2149
 #, csharp-format
 msgid "Your user mode is {0}"
 msgstr "您的用户模式为 {0}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1906
-#, csharp-format
-msgid "Inviting {0} to {1}"
-msgstr "正在邀请 {0} 加入 {1}"
-
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1913
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2176
 #, csharp-format
 msgid "{0} is already on {1}"
 msgstr "{0} 已在 {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1940
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2184
+#, csharp-format
+msgid "Inviting {0} to {1}"
+msgstr "正在邀请 {0} 加入 {1}"
+
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2208
 msgid "Users"
 msgstr "用户"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:1982
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2259
 #, csharp-format
 msgid "Total of {0} users [{1} ops, {2} voices, {3} normal]"
 msgstr "总计 {0} 位用户 [{1} 位版主, {2} 位认证用户, {3} 位普通用户]"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2118
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2393
 msgid "Connection error! Reason: "
 msgstr "连接出错! 原因: "
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2130
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2405
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "{0} 命令参数不足"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2139
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2414
 msgid "Not connected to server"
 msgstr "未连接到服务器"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2330
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2618
 #, csharp-format
 msgid "{0}: No such nick/channel"
 msgstr "{0}: 无此昵称/频道"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2455
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2737
 #, csharp-format
 msgid ""
 "Increased send delay to {0}ms to avoid being flooded off the server again."
 msgstr "发送延时已增加到 {0}ms 以避免再次被服务器挤出。"
 
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2469
-msgid "Nick"
-msgstr "昵称"
-
-#. TRANSLATOR: the final line will look like this:
-#. -!- Nick {0} is already in use
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2479
-msgid "is already in use"
-msgstr "已被占用"
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2752
+#, csharp-format
+msgid "Nick {0} is already in use"
+msgstr "昵称 {0} 已被占用"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2489
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2768
 msgid "Cannot join to channel:"
 msgstr "无法加入频道:"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2497
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2770
 msgid "You are banned"
 msgstr "您已被封禁"
 
@@ -259,98 +282,88 @@ msgstr "您已被封禁"
 #. {2}: CTCP command, {3}: own nickname, {4}: CTCP parameter
 #. example:
 #. meebey [meebey at example.com] requested CTCP VERSION from meebey:
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2580
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2853
 #, csharp-format
 msgid "{0} [{1}] requested CTCP {2} from {3}: {4}"
 msgstr "{0} [{1}] 请求 CTCP {2} 来自 {3}: {4}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2607
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2880
 #, csharp-format
 msgid "CTCP PING reply from {0}: {1} seconds"
 msgstr "CTCP PING 回复来自 {0}: {1} 秒"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2616
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2889
 #, csharp-format
 msgid "CTCP {0} reply from {1}: {2}"
 msgstr "CTCP {0} 回复来自 {1}: {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2822
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3095
 #, csharp-format
 msgid "{0} [{1}] has joined {2}"
 msgstr "{0} [{1}] 已加入 {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2948
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3237
 #, csharp-format
 msgid "{0} [{1}] has left {2}"
 msgstr "{0} [{1}] 已离开 {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2974
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3262
 #, csharp-format
 msgid "You were kicked from {0} by {1}"
 msgstr "您被 {1} 从 {0} 踢出"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:2985
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3270
 #, csharp-format
 msgid "{0} was kicked from {1} by {2}"
 msgstr "{0} 被 {2} 从 {1} 踢出"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3005
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3038
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3288
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3320
 #, csharp-format
 msgid "You're now known as {0}"
 msgstr "您现在的昵称为 {0}"
 
-#. TRANSLATOR: do NOT change the position of {0} or {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3043
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3323
 #, csharp-format
 msgid "{0} is now known as {1}"
 msgstr "{0} 现在的昵称为 {1}"
 
-#. TRANSLATOR: do NOT change the position of {0} and {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3079
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3357
 #, csharp-format
 msgid "{0} changed the topic of {1} to: {2}"
 msgstr "{0} 将主题 {1} 改为: {2}"
 
-#. TRANSLATOR: do NOT change the position of {1}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3159
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3519
 #, csharp-format
 msgid "Mode change [{0}] for user {1}"
 msgstr "用户 {1} 模式更改 [{0}]"
 
-#. TRANSLATOR: do NOT change the position of {2}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3169
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3536
 #, csharp-format
 msgid "mode/{0} [{1}] by {2}"
 msgstr "模式/{0} [{1}] by {2}"
 
-#. TRANSLATOR: do NOT change the position of {0}!
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3206
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3562
 #, csharp-format
 msgid "{0} [{1}] has quit"
 msgstr "{0} [{1}] 已退出"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3283
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3639
 #, csharp-format
 msgid ""
 "Connection to {0} port {1} has failed (attempt {2}), retrying in {3} "
 "seconds..."
 msgstr "到 {0} 端口 {1} 的连接失败 (第 {2}次尝试), 将在 {3} 秒后重试..."
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3333
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3689
 #, csharp-format
 msgid "{0} is away: {1}"
 msgstr "{0} 离开: {1}"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3343
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3699
 msgid "You are no longer marked as being away"
 msgstr "您不再被标为离开状态"
 
-#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3353
+#: ../src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs:3709
 msgid "You have been marked as being away"
 msgstr "您已被标为离开状态"
diff --git a/po-Engine-Twitter/LINGUAS b/po-Engine-Twitter/LINGUAS
index f4c8a75..efde092 100644
--- a/po-Engine-Twitter/LINGUAS
+++ b/po-Engine-Twitter/LINGUAS
@@ -10,6 +10,7 @@ hr
 it
 pl
 pt
+pt_BR
 ru
 sk
 sv
diff --git a/po-Engine-Twitter/POTFILES.skip b/po-Engine-Twitter/POTFILES.skip
index dfa80f9..3007b93 100644
--- a/po-Engine-Twitter/POTFILES.skip
+++ b/po-Engine-Twitter/POTFILES.skip
@@ -3,12 +3,14 @@ src/Common/
 src/Engine/
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
 src/Frontend/
 src/Frontend-GNOME/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
diff --git a/po-Engine-Twitter/cs.po b/po-Engine-Twitter/cs.po
index d1a625c..a3326e4 100644
--- a/po-Engine-Twitter/cs.po
+++ b/po-Engine-Twitter/cs.po
@@ -1,116 +1,171 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-engine-twitter 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-15 13:22+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:15+0200\n"
+"PO-Revision-Date: 2013-05-22 17:32+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:101
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:127
 msgid "Home Timeline"
-msgstr "Domovské časové pásmo"
+msgstr "Domovský časový přehled"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:108
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:138
 msgid "Replies"
 msgstr "Odpovědi"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:115
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:149
 msgid "Direct Messages"
 msgstr "Přímé zprávy"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:133
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:197
+#, csharp-format
+msgid "Using proxy: {0}:{1}"
+msgstr "Užívám proxy: {0}:{1}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:204
 msgid "Connecting to Twitter..."
 msgstr "Připojování ke Twitteru..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:141
-msgid "Login failed!"
-msgstr "Přihlášení selhalo!"
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:242
+msgid "Twitter authorization required."
+msgstr "Je nutná autorizace Twitteru."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:143
-msgid "Login failed! Username and/or password are incorrect."
-msgstr "Přihlášení selhalo! Chybné uživatelské jméno nebo heslo."
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:249
+#, csharp-format
+msgid ""
+"Please open the following URL and click \"Allow\" to allow Smuxi to connect "
+"to your Twitter account: {0}"
+msgstr "Otevřete prosím tuto adresu a klikněte na \"Povolit\", aby bylo Smuxi povoleno připojení k Vašemu kontu Twitter: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:149
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:265
+msgid ""
+"Once you have allowed Smuxi to access your Twitter account, Twitter will "
+"provide a PIN."
+msgstr "Po povolení připojení Smuxi k vašemu kontu Twitter Vám Twitter zobrazí PIN."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:272
+msgid "Please type: /pin PIN_FROM_TWITTER"
+msgstr "Zadejte prosím: /pin PIN_OD_TWITTERU"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:279
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:319
 msgid "Connection failed!"
 msgstr "Připojování selhalo!"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:151
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:281
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:321
 msgid "Connection failed! Reason: "
 msgstr "Připojování selhalo z důvodu: "
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:156
-msgid "Successfully connected to Twitter."
-msgstr "Připojení ke Twitteru proběhlo úspěšně."
-
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:164
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:294
 msgid "Fetching user details from Twitter, please wait..."
 msgstr "Probíhá příjem podrobností o uživateli z Twitteru, čekejte prosím..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:169
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:299
 msgid "Finished fetching user details."
 msgstr "Příjem podrobností o uživateli dokončen."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:176
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:304
+msgid "Successfully connected to Twitter."
+msgstr "Připojení ke Twitteru proběhlo úspěšně."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:313
 msgid "Failed to fetch user details from Twitter. Reason: "
 msgstr "Příjem podrobností o uživateli z Twitteru selhal z důvodu: "
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:185
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:334
 msgid "Fetching friends from Twitter, please wait..."
 msgstr "Probíhá příjem seznamu přátel z Twitteru, čekejte prosím..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:190
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:339
 msgid "Finished fetching friends."
 msgstr "Příjem seznamu přátel dokončen."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:193
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:342
 msgid "Failed to fetch friends from Twitter. Reason: "
 msgstr "Příjem seznamu přátel z Twitteru selhal z důvodu: "
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:454
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:619
 msgid "Twitter Commands"
 msgstr "Příkazy Twitteru"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:504
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:661
+msgid "No pending authorization request!"
+msgstr "Žádná nevyřízená žádost o autorizaci nenalezena!"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:682
+#, csharp-format
+msgid "Failed to authorize with Twitter: {0}"
+msgstr "Autorizace s Twitterem selhala: {0}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:690
+msgid "Twitter did not accept your PIN.  Did you enter it correctly?"
+msgstr "Twitter neuznal Váš PIN. Zadal jste jej správně?"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:698
+#, csharp-format
+msgid ""
+"Please retry by closing this tab and reconnecting to the Twitter \"{0}\" "
+"account."
+msgstr "Zkuste to, prosím, znovu: uzavřete tuto záložku a znovu se spojte s kontem Twitter \"{0}\"."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:739
+msgid "Migrated Twitter account from basic auth to OAuth."
+msgstr "Konto Twitter přepnuto z jednoduché autentizace na OAuth."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:753
+#, csharp-format
+msgid "Successfully authorized Twitter account \"{0}\" for Smuxi"
+msgstr "Autorizace konta Twitter \"{0}\" se Smuxi úspěšná."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:775
 #, csharp-format
 msgid "Could not update status - Reason: {0}"
 msgstr "Nelze aktualizovat stav - Příčina: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:513
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:784
 msgid "Cannot send message - no target specified. Use: /msg $nick message"
 msgstr "Zprávu nelze odeslat - nezadali jste příjemce. Zadejte: /msg $nick zpráva"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:526
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:568
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:797
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:834
 #, csharp-format
 msgid "Could not send message - Reason: {0}"
 msgstr "Zprávu nelze odeslat - Příčina: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:555
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:821
 msgid "Could not send message - the specified user does not exist."
 msgstr "Zprávu nelze odeslat - zadaný uživatel neexistuje."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:631
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:910
 msgid ""
 "An error occurred while fetching the friends timeline from Twitter. Reason: "
-msgstr ""
-"Během přijmu časového pásma přátel z Twitteru nastala chyba. Příčina: "
+msgstr "Během přijmu časového pásma přátel z Twitteru nastala chyba. Příčina: "
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:721
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1017
 msgid "An error occurred while fetching the replies from Twitter. Reason: "
 msgstr "Během přijmu odpovědí z Twitteru nastala chyba z důvodu: "
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:816
-msgid "An error occurred while fetching direct messages from Twitter. Reason: "
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1113
+msgid ""
+"An error occurred while fetching direct messages from Twitter. Reason: "
 msgstr "Během přijmu přímých zpráv z Twitteru nastala chyba z důvodu: "
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1457
+msgid "Twitter didn't send a valid response, they're probably overloaded"
+msgstr "Twitter neodeslal platnou odpověď; asi mají problémy s kapacitou"
diff --git a/po-Engine-Twitter/da.po b/po-Engine-Twitter/da.po
index 035270b..da6873c 100644
--- a/po-Engine-Twitter/da.po
+++ b/po-Engine-Twitter/da.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011,2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011,2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
 "POT-Creation-Date: 2013-04-14 10:15+0200\n"
-"PO-Revision-Date: 2013-04-16 06:16+0000\n"
-"Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po-Engine-Twitter/de.po b/po-Engine-Twitter/de.po
index 918c548..b6e3d5d 100644
--- a/po-Engine-Twitter/de.po
+++ b/po-Engine-Twitter/de.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2011,2013.
+# Bianca Mix <heavydemon at freenet.de>, 2011,2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
 "POT-Creation-Date: 2013-04-14 10:15+0200\n"
-"PO-Revision-Date: 2013-04-14 19:27+0000\n"
-"Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po-Engine-Twitter/fi.po b/po-Engine-Twitter/fi.po
index 641860a..5214d97 100644
--- a/po-Engine-Twitter/fi.po
+++ b/po-Engine-Twitter/fi.po
@@ -3,161 +3,169 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Kalle Kaitala <cobrian at cobrian.net>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2010-09-02 15:23+0200\n"
-"PO-Revision-Date: 2010-11-30 04:12+0000\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: Finnish (http://www.transifex.net/projects/p/smuxi/team/fi/)\n"
+"POT-Creation-Date: 2013-04-14 10:15+0200\n"
+"PO-Revision-Date: 2013-08-21 11:16+0000\n"
+"Last-Translator: Kalle Kaitala <cobrian at cobrian.net>\n"
+"Language-Team: Finnish (http://www.transifex.com/projects/p/smuxi/language/fi/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: fi\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:125
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:127
 msgid "Home Timeline"
-msgstr ""
+msgstr "Koti-aikajana"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:132
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:138
 msgid "Replies"
-msgstr ""
+msgstr "Vastaukset"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:139
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:149
 msgid "Direct Messages"
-msgstr ""
+msgstr "Suoraviestit"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:197
+#, csharp-format
+msgid "Using proxy: {0}:{1}"
+msgstr "Käytetään välityspalvelinta: {0}:{1}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:174
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:204
 msgid "Connecting to Twitter..."
-msgstr ""
+msgstr "Yhdistetään Twitteriin..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:203
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:242
 msgid "Twitter authorization required."
-msgstr ""
+msgstr "Twitter-tunnistetiedot vaaditaan."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:218
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:249
 #, csharp-format
 msgid ""
 "Please open the following URL and click \"Allow\" to allow Smuxi to connect "
 "to your Twitter account: {0}"
-msgstr ""
+msgstr "Avaa seuraava URL ja valitse \"Allow\" salliaksesi Smuxin yhdistäminen Twitter-tiliisi: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:234
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:265
 msgid ""
 "Once you have allowed Smuxi to access your Twitter account, Twitter will "
 "provide a PIN."
-msgstr ""
+msgstr "Kun olet sallinut Smuxin pääsyn Twitter-tiliisi, Twitter antaa sinulle PIN-koodin."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:241
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:272
 msgid "Please type: /pin PIN_FROM_TWITTER"
-msgstr ""
+msgstr "Kirjoita: /pin PIN_JONKA_SAIT_TWITTERILTÄ"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:251
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:291
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:279
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:319
 msgid "Connection failed!"
-msgstr ""
+msgstr "Yhteydenmuodostus epäonnistui!"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:253
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:293
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:281
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:321
 msgid "Connection failed! Reason: "
-msgstr ""
+msgstr "Yhteydenmuodostus epäonnistui! Syy:"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:266
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:294
 msgid "Fetching user details from Twitter, please wait..."
-msgstr ""
+msgstr "Noudetaan käyttäjätietoja Twitteristä, odota ole hyvä..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:271
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:299
 msgid "Finished fetching user details."
-msgstr ""
+msgstr "Käyttäjätietojen haku valmis."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:276
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:304
 msgid "Successfully connected to Twitter."
-msgstr ""
+msgstr "Yhdistäminen Twitteriin onnistui."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:285
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:313
 msgid "Failed to fetch user details from Twitter. Reason: "
-msgstr ""
+msgstr "Käyttäjätietojen haku Twitteristä epäonnistui. Syy:"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:306
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:334
 msgid "Fetching friends from Twitter, please wait..."
-msgstr ""
+msgstr "Noudetaan ystäviä Twitteristä, odota ole hyvä..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:311
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:339
 msgid "Finished fetching friends."
-msgstr ""
+msgstr "Ystävien haku valmis."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:314
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:342
 msgid "Failed to fetch friends from Twitter. Reason: "
-msgstr ""
+msgstr "Ystävien haku Twitteristä epäonnistui. Syy:"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:588
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:619
 msgid "Twitter Commands"
-msgstr ""
+msgstr "Twitter-komennot"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:632
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:661
 msgid "No pending authorization request!"
-msgstr ""
+msgstr "Ei voimassaolevaa auktorisointipyyntöä!"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:653
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:682
 #, csharp-format
 msgid "Failed to authorize with Twitter: {0}"
-msgstr ""
+msgstr "Auktorisointi Twitterin kanssa epäonnistui: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:661
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:690
 msgid "Twitter did not accept your PIN.  Did you enter it correctly?"
-msgstr ""
+msgstr "Twitter ei hyväksynyt PIN-koodiasi. Syötitkö sen oikein?"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:669
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:698
 #, csharp-format
 msgid ""
 "Please retry by closing this tab and reconnecting to the Twitter \"{0}\" "
 "account."
-msgstr ""
+msgstr "Yritä uudelleen sulkemalla tämä välilehti ja uudelleenyhdistämällä Twitter \"{0}\"-tiliin."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:709
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:739
 msgid "Migrated Twitter account from basic auth to OAuth."
-msgstr ""
+msgstr "Muutettiin Twitter-autentikointi perustilasta OAuth-tilaan."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:722
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:753
 #, csharp-format
 msgid "Successfully authorized Twitter account \"{0}\" for Smuxi"
-msgstr ""
+msgstr "Twitter-tili \"{0}\" autorisoitu onnistuneesti Smuxiin"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:744
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:775
 #, csharp-format
 msgid "Could not update status - Reason: {0}"
-msgstr ""
+msgstr "Tilaa ei voitu päivittää - Syy: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:753
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:784
 msgid "Cannot send message - no target specified. Use: /msg $nick message"
-msgstr ""
+msgstr "Viestiä ei voida lähettää - kohdetta ei ole määritelty. Käytä: /msg $nick viesti"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:766
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:803
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:797
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:834
 #, csharp-format
 msgid "Could not send message - Reason: {0}"
-msgstr ""
+msgstr "Viestiä ei voitu lähettää - Syy: {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:790
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:821
 msgid "Could not send message - the specified user does not exist."
-msgstr ""
+msgstr "Viestiä ei voitu lähettää - määriteltyä käyttäjää ei ole."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:879
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:910
 msgid ""
 "An error occurred while fetching the friends timeline from Twitter. Reason: "
-msgstr ""
+msgstr "Virhe haettaessa ystävien aikajanaa Twitteristä. Syy:"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:980
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1017
 msgid "An error occurred while fetching the replies from Twitter. Reason: "
-msgstr ""
+msgstr "Virhe haettaessa vastauksia Twitteristä. Syy:"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1073
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1113
 msgid ""
 "An error occurred while fetching direct messages from Twitter. Reason: "
-msgstr ""
-
+msgstr "Virhe haettaessa suoraviestejä Twitteristä. Syy:"
 
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1457
+msgid "Twitter didn't send a valid response, they're probably overloaded"
+msgstr "Twitter ei palauttanut oikeanlaista vastausta, palvelussa voi olla ruuhkaa"
diff --git a/po-Engine-Twitter/fr.po b/po-Engine-Twitter/fr.po
index 2de3b6d..da441e9 100644
--- a/po-Engine-Twitter/fr.po
+++ b/po-Engine-Twitter/fr.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:38+0200\n"
+"POT-Creation-Date: 2013-08-19 12:17+0200\n"
 "PO-Revision-Date: 2013-04-10 22:27+0100\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
 "Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
@@ -18,32 +18,32 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:127
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:120
 msgid "Home Timeline"
 msgstr "Chronologie générale"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:138
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:131
 msgid "Replies"
 msgstr "Réponses"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:149
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:142
 msgid "Direct Messages"
 msgstr "Messages directs"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:197
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:190
 #, csharp-format
 msgid "Using proxy: {0}:{1}"
 msgstr "Utilisation du proxy: {0}:{1}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:204
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:210
 msgid "Connecting to Twitter..."
 msgstr "Connexion à Twitter..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:242
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:248
 msgid "Twitter authorization required."
 msgstr "Autorisation de Twitter nécessaire"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:249
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:255
 #, csharp-format
 msgid ""
 "Please open the following URL and click \"Allow\" to allow Smuxi to connect "
@@ -52,7 +52,7 @@ msgstr ""
 "Veuillez ouvrir l'URL suivante et cliquez sur \"Autoriser\\” pour autoriser "
 "Smuxi à se connecter sur votre compte Twitter : {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:265
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:271
 msgid ""
 "Once you have allowed Smuxi to access your Twitter account, Twitter will "
 "provide a PIN."
@@ -60,70 +60,70 @@ msgstr ""
 "Une fois que vous avez autorisé Smuxi à acceder à votre compte Twitter, "
 "Twitter va vous envoyer un code PIN."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:272
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:278
 msgid "Please type: /pin PIN_FROM_TWITTER"
 msgstr "Veuillez taper : /pin CODE_PIN_DE_TWITTER"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:279
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:319
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:285
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:325
 msgid "Connection failed!"
 msgstr "Connexion impossible !"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:281
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:321
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:287
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:327
 msgid "Connection failed! Reason: "
 msgstr "Connexion impossible ! Raison : "
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:294
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:300
 msgid "Fetching user details from Twitter, please wait..."
 msgstr "Téléchargement des détails utilisateur Twitter. Veuillez patienter..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:299
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:305
 msgid "Finished fetching user details."
 msgstr "Téléchargement des détails utilisateur terminée."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:304
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:310
 msgid "Successfully connected to Twitter."
 msgstr "Connexion à Twitter réussie."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:313
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:319
 msgid "Failed to fetch user details from Twitter. Reason: "
 msgstr "Impossible de télécharger les détails utilisateur de Twitter. Raison :"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:334
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:340
 msgid "Fetching friends from Twitter, please wait..."
 msgstr ""
 "Téléchargement de la liste des amis Twitter en cours, veuillez patienter..."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:339
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:345
 msgid "Finished fetching friends."
 msgstr "Téléchargement de la liste des amis terminée."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:342
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:348
 msgid "Failed to fetch friends from Twitter. Reason: "
 msgstr "Impossible de télécharger la liste des amis Twitter. Raison :"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:619
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:625
 msgid "Twitter Commands"
 msgstr "Commandes Twitter"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:661
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:666
 msgid "No pending authorization request!"
 msgstr "Aucune requête d'autorisation en attente !"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:682
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:687
 #, csharp-format
 msgid "Failed to authorize with Twitter: {0}"
 msgstr "Impossible d'obtenir une autorisation de Twitter : {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:690
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:695
 msgid "Twitter did not accept your PIN.  Did you enter it correctly?"
 msgstr ""
 "Twitter n'a pas accepté votre code PIN. L'avez vous entré correctement ?"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:698
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:703
 #, csharp-format
 msgid ""
 "Please retry by closing this tab and reconnecting to the Twitter \"{0}\" "
@@ -132,58 +132,58 @@ msgstr ""
 "Veuillez réessayer en fermant cet onglet et en vous connectant à nouveau au "
 "compte Twitter \"{0}\"."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:739
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:744
 msgid "Migrated Twitter account from basic auth to OAuth."
 msgstr ""
 "Le compte Twitter géré par autorisation basique à été migré la methode OAuth."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:753
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:758
 #, csharp-format
 msgid "Successfully authorized Twitter account \"{0}\" for Smuxi"
 msgstr ""
 "Twitter a accepté la demande d'autorisation Smuxi pour le compte \"{0}\"."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:775
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:780
 #, csharp-format
 msgid "Could not update status - Reason: {0}"
 msgstr "Impossible de mettre à jour le statut - Raison : {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:784
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:789
 msgid "Cannot send message - no target specified. Use: /msg $nick message"
 msgstr ""
 "Impossible d'envoyer le message. Aucune cible spécifiée. Utilisez /msg $nick "
 "message"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:797
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:834
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:802
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:839
 #, csharp-format
 msgid "Could not send message - Reason: {0}"
 msgstr "Impossible d'envoyer le message - Raison : {0}"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:821
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:826
 msgid "Could not send message - the specified user does not exist."
 msgstr "Impossible d'envoyer le message. L'utilisateur spécifié n'existe pas."
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:910
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:915
 msgid ""
 "An error occurred while fetching the friends timeline from Twitter. Reason: "
 msgstr ""
 "Une erreur c'est produite pendant le téléchargement de la chronologie des "
 "amis Twitter. Raison :"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1017
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1022
 msgid "An error occurred while fetching the replies from Twitter. Reason: "
 msgstr ""
 "Une erreur c'est produite pendant le téléchargement des réponses Twitter. "
 "Raison :"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1113
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1118
 msgid "An error occurred while fetching direct messages from Twitter. Reason: "
 msgstr ""
 "Un erreur s'est produite pendant le téléchargement des messages directs "
 "Twitter. Raison :"
 
-#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1457
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1462
 msgid "Twitter didn't send a valid response, they're probably overloaded"
 msgstr ""
 "Twitter n'a pas envoyé de réponse valide, le service est peut-être en sur-"
diff --git a/po-Engine-Twitter/pt_BR.po b/po-Engine-Twitter/pt_BR.po
new file mode 100644
index 0000000..3bfdb94
--- /dev/null
+++ b/po-Engine-Twitter/pt_BR.po
@@ -0,0 +1,171 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:15+0200\n"
+"PO-Revision-Date: 2013-07-10 20:44+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:127
+msgid "Home Timeline"
+msgstr "Timeline de início"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:138
+msgid "Replies"
+msgstr "Respostas"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:149
+msgid "Direct Messages"
+msgstr "Mensagens diretas"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:197
+#, csharp-format
+msgid "Using proxy: {0}:{1}"
+msgstr "Usando proxy: {0}:{1}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:204
+msgid "Connecting to Twitter..."
+msgstr "Conectando ao Twitter..."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:242
+msgid "Twitter authorization required."
+msgstr "Autorização no Twitter necessária."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:249
+#, csharp-format
+msgid ""
+"Please open the following URL and click \"Allow\" to allow Smuxi to connect "
+"to your Twitter account: {0}"
+msgstr "Abra a seguinte URL e clique em \"autorizar(Allow)\" para autorizar o Smuxi a conectar a sua conta do Twitter: {0}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:265
+msgid ""
+"Once you have allowed Smuxi to access your Twitter account, Twitter will "
+"provide a PIN."
+msgstr "Assim que você autorizar Smuxi a acessar sua conta do Twitter. O Twitter providenciará à você um código PIN."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:272
+msgid "Please type: /pin PIN_FROM_TWITTER"
+msgstr "Por favor digite: /pin PIN_RECEBIDO_NO_TWITTER"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:279
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:319
+msgid "Connection failed!"
+msgstr "Conexão falhou!"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:281
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:321
+msgid "Connection failed! Reason: "
+msgstr "Conexão falhou! Razão:"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:294
+msgid "Fetching user details from Twitter, please wait..."
+msgstr "Recebendo dados de usuário do Twitter, por favor aguarde..."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:299
+msgid "Finished fetching user details."
+msgstr "Finalizado recebimento de dados."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:304
+msgid "Successfully connected to Twitter."
+msgstr "Conectado ao Twitter com sucesso."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:313
+msgid "Failed to fetch user details from Twitter. Reason: "
+msgstr "Não foi possível receber dados do Twitter. Razão:"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:334
+msgid "Fetching friends from Twitter, please wait..."
+msgstr "Recebendo os amigos do Twitter, por favor aguarde..."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:339
+msgid "Finished fetching friends."
+msgstr "Finalizado lista de amigos."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:342
+msgid "Failed to fetch friends from Twitter. Reason: "
+msgstr "Falha no download de amigos do Twitter. Razão:"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:619
+msgid "Twitter Commands"
+msgstr "Comandos Twitter"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:661
+msgid "No pending authorization request!"
+msgstr "Sem requisição de autorizações pendentes!"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:682
+#, csharp-format
+msgid "Failed to authorize with Twitter: {0}"
+msgstr "Falha em autorização com o Twitter: {0}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:690
+msgid "Twitter did not accept your PIN.  Did you enter it correctly?"
+msgstr "Twitter não aceitou seu código PIN. Você entrou o código correto?"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:698
+#, csharp-format
+msgid ""
+"Please retry by closing this tab and reconnecting to the Twitter \"{0}\" "
+"account."
+msgstr "Por favor tente novamente fechando essa aba e re-conectando a conta \"{0}\" do Twitter."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:739
+msgid "Migrated Twitter account from basic auth to OAuth."
+msgstr "Conta do Twitter mudada de autenticação Básica para OAuth."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:753
+#, csharp-format
+msgid "Successfully authorized Twitter account \"{0}\" for Smuxi"
+msgstr "Conta do Twitter \"{0}\" autorizada para o Smuxi"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:775
+#, csharp-format
+msgid "Could not update status - Reason: {0}"
+msgstr "Não foi possível atualizar status - Razão: {0}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:784
+msgid "Cannot send message - no target specified. Use: /msg $nick message"
+msgstr "Não foi possível enviar mensagem - Nenhum alvo especificado. Use: /msg $nick message"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:797
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:834
+#, csharp-format
+msgid "Could not send message - Reason: {0}"
+msgstr "Não foi possível enviar mensagem - Razão: {0}"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:821
+msgid "Could not send message - the specified user does not exist."
+msgstr "Não foi possível enviar mensagem - O usuário especificado não existe."
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:910
+msgid ""
+"An error occurred while fetching the friends timeline from Twitter. Reason: "
+msgstr "Houve um erro ao pegar lista de amigos da sua timeline no Twitter. Razão:"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1017
+msgid "An error occurred while fetching the replies from Twitter. Reason: "
+msgstr "Falha ao pegar respostas do Twitter. Razão:"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1113
+msgid ""
+"An error occurred while fetching direct messages from Twitter. Reason: "
+msgstr "Um erro ocorreu enquanto pegava mensagens diretas do Twitter. Razão:"
+
+#: ../src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs:1457
+msgid "Twitter didn't send a valid response, they're probably overloaded"
+msgstr "Twitter não enviou uma resposta válida. Eles provavelmente estão sobrecarregados"
diff --git a/po-Engine-Twitter/sv.po b/po-Engine-Twitter/sv.po
index c15e05d..2ef0b99 100644
--- a/po-Engine-Twitter/sv.po
+++ b/po-Engine-Twitter/sv.po
@@ -10,8 +10,8 @@ msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
 "POT-Creation-Date: 2013-04-14 10:15+0200\n"
-"PO-Revision-Date: 2013-04-17 04:23+0000\n"
-"Last-Translator: flugsio <flugsio at gmail.com>\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po-Engine-Twitter/zh_CN.po b/po-Engine-Twitter/zh_CN.po
index e01e2f9..70b9635 100644
--- a/po-Engine-Twitter/zh_CN.po
+++ b/po-Engine-Twitter/zh_CN.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2011,2013.
+# Dean Lee <xslidian at gmail.com>, 2011,2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
 "POT-Creation-Date: 2013-04-14 10:15+0200\n"
-"PO-Revision-Date: 2013-04-14 13:57+0000\n"
-"Last-Translator: Dean Lee <xslidian at gmail.com>\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po-Engine/LINGUAS b/po-Engine/LINGUAS
index 770cabe..5698b82 100644
--- a/po-Engine/LINGUAS
+++ b/po-Engine/LINGUAS
@@ -11,6 +11,7 @@ it
 nb_NO
 pl
 pt
+pt_BR
 ru
 sk
 sv
diff --git a/po-Engine/POTFILES.skip b/po-Engine/POTFILES.skip
index 8931ca8..e7f337c 100644
--- a/po-Engine/POTFILES.skip
+++ b/po-Engine/POTFILES.skip
@@ -3,12 +3,14 @@ src/Common/
 src/Frontend/
 src/Frontend-GNOME/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
 src/Engine/Config/ServerModel.cs
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
diff --git a/po-Engine/cs.po b/po-Engine/cs.po
index b4ab7cb..8f1acb4 100644
--- a/po-Engine/cs.po
+++ b/po-Engine/cs.po
@@ -1,132 +1,198 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-engine 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-15 10:29+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-19 21:23+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
-#: ../src/Engine/FrontendManager.cs:219
+#: ../src/Engine/FrontendManager.cs:233
 msgid "No network connections"
 msgstr "Žádná připojení k sítí"
 
-#: ../src/Engine/Protocols/ProtocolManagerBase.cs:146
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:295
+#, csharp-format
+msgid "Optimizing: {0}..."
+msgstr "Optimalizuji: {0}..."
+
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:313
+#, csharp-format
+msgid "Failed to optimize: {0}. Reason: {1}"
+msgstr "Optimalizace {0} se nezdařila. Příčina: {1}"
+
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:347
+msgid ""
+"Your chat history is no longer available because of an error but will be "
+"preserved from now on."
+msgstr "Vaše historie chatů se stala kvůli chybě nedostupnou, ale odteď bude zase uložena."
+
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:166
 msgid "Not connected to server"
 msgstr "Není připojeno k serveru"
 
-#: ../src/Engine/Protocols/ProtocolManagerBase.cs:158
-#: ../src/Engine/Session.cs:731
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
-msgstr "Pro příkaz {0} není vloženo dostatek parametrů"
-
-#: ../src/Engine/Session.cs:154
-msgid "Welcome to Smuxi"
-msgstr "Vítejte ve Smuxi"
+msgstr "Pro příkaz {0} nebyl zadán dostatek parametrů"
 
-#: ../src/Engine/Session.cs:160
-msgid "Type /help to get a list of available commands."
-msgstr "Pro zobrazení seznamu dostupných příkazů napište /help."
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:185
+#, csharp-format
+msgid "Connected to {0}"
+msgstr "Spojen s {0}"
 
-#: ../src/Engine/Session.cs:163
-msgid ""
-"After you have made a connection the list of available commands changes. Use "
-"the /help command again to see the extended command list."
-msgstr ""
-"Seznam dostupných příkazů se změní po té, co se přihlásíte. Pro zobrazení "
-"rozšířeného seznamu dostupných příkazů zadejte znovu příkaz /help."
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:203
+#, csharp-format
+msgid "Disconnected from {0}"
+msgstr "Odpojen od {0}"
 
-#: ../src/Engine/Session.cs:216
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Automatické připojení k {0} selhalo!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:407
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Příkazy enginu"
 
-#: ../src/Engine/Session.cs:510
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Připojení selhalo!"
 
-#: ../src/Engine/Session.cs:539
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Odpojení selhalo - nepodařilo se najít server: {0}"
 
-#: ../src/Engine/Session.cs:574
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Opětovné připojení selhalo!"
 
-#: ../src/Engine/Session.cs:593
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
-msgstr "Nastavení bylo načteno"
+msgstr "Nastavení byla načtena"
 
-#: ../src/Engine/Session.cs:598
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
-msgstr "Nastavení bylo uloženo"
+msgstr "Nastavení byla uložena"
+
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Neplatný formát klíč/hodnota."
 
-#: ../src/Engine/Session.cs:602
-msgid "Invalid parameter for config; use load or save"
-msgstr "Neplatný parametr pro config; zadejte load nebo save"
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Neplatný klíč konfigurace: '{0}'"
+
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Nemohu zkonvertovat konfigurační hodnotu: '{0}' na typ: {1}"
 
-#: ../src/Engine/Session.cs:632
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Neplatný parametr příkazu config: použij load, save, get nebo set."
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Neplatný parametr pro network; zadejte list, switch nebo close"
 
-#: ../src/Engine/Session.cs:643
-msgid "Networks"
-msgstr "Sítě"
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of networks below
+#: ../src/Engine/Session.cs:838
+msgid "Connected Networks"
+msgstr "Spojen k sítím:"
+
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
+msgid "Network"
+msgstr "Síť"
 
-#: ../src/Engine/Session.cs:647
-msgid "Type"
-msgstr "Typ"
+#: ../src/Engine/Session.cs:844
+msgid "Protocol"
+msgstr "Protokol"
 
-#: ../src/Engine/Session.cs:648
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Hostitel"
 
-#: ../src/Engine/Session.cs:649
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Port"
 
-#: ../src/Engine/Session.cs:671
+#. TRANSLATOR: no connected networks
+#. TRANSLATOR: no available networks
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
+msgid "None"
+msgstr "žádné"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of networks below
+#: ../src/Engine/Session.cs:859
+msgid "Available Networks"
+msgstr "Dostupné sítě:"
+
+#: ../src/Engine/Session.cs:888
 #, csharp-format
-msgid "Network close failed - could not find network with host: {0}"
-msgstr "Připojení uzavřeno - hostitelská síť nebyla nalezena: {0}"
+msgid "Network close failed - could not find network: {0}"
+msgstr "Uzavření sítě selhalo - síť nenalezena: {0}"
 
-#: ../src/Engine/Session.cs:705
+#: ../src/Engine/Session.cs:926
 #, csharp-format
-msgid "Network switch failed - could not find network with host: {0}"
-msgstr "Síťový uzel selhal - hostitelská síť nebyla nalezena: {0}"
+msgid "Network switch failed - could not find network: {0}"
+msgstr "Přepnutí sítě selhalo - síť nenalezena: {0}"
 
-#: ../src/Engine/Session.cs:720
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Není připojeno k žádné síti"
 
+#: ../src/Engine/Session.cs:1198
+#, csharp-format
+msgid ""
+"Failed to write to chat history. Your chat history will not be preserved. "
+"Reason: {0}"
+msgstr "Nezdařilo se uložení historie chatů. Vaše historie chatů nebude uchována. Příčina: {0}"
+
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1047
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Připojení selhalo."
 
-#: ../src/Engine/Session.cs:1078
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Pro protokol nebyl nalezen žádný správce protokolu: {0}"
 
+#: ../src/Engine/Session.cs:1641
+msgid "Welcome to Smuxi"
+msgstr "Vítejte ve Smuxi"
+
+#: ../src/Engine/Session.cs:1648
+msgid "Type /help to get a list of available commands."
+msgstr "Pro zobrazení seznamu dostupných příkazů napište /help."
+
+#: ../src/Engine/Session.cs:1654
+msgid ""
+"After you have made a connection the list of available commands changes. Go "
+"to the newly opened connection tab and use the /help command again to see "
+"the extended command list."
+msgstr "Po zdařeném spojení se změní seznam dostupných příkazů. Pro zobrazení rozšířeného seznamu příkazů přepněte na záložku nového spojení a použijte znovu příkaz /help."
+
 #: ../src/Engine/Config/UserListController.cs:117
 msgid "Username must not be empty."
 msgstr "Uživatelské jméno nemůže být prázdné."
@@ -145,5 +211,33 @@ msgstr "Uživatel \"{0}\" neexistuje."
 msgid "User \"{0}\" already exists."
 msgstr "Uživatel \"{0}\" již existuje."
 
-#~ msgid "Unknown protocol: {0}"
-#~ msgstr "Neznámý protokol: {0}"
+#: ../src/Engine/Config/ServerListController.cs:118
+msgid "Network must not be empty."
+msgstr "Síť nesmí být prázdná."
+
+#: ../src/Engine/Config/ServerListController.cs:138
+msgid "Server hostname must not be empty."
+msgstr "Název hostitele serveru nesmí být prázdný."
+
+#: ../src/Engine/Config/ServerListController.cs:141
+msgid "Server hostname contains invalid characters (newline)."
+msgstr "Název hostitele serveru obsahuje neplatné znaky (nové řádky)."
+
+#: ../src/Engine/Config/ServerListController.cs:148
+#, csharp-format
+msgid "Server ID '{0}' already exists."
+msgstr "Identifikace serveru '{0}' již existuje."
+
+#: ../src/Engine/Chats/ChatModel.cs:105
+#, csharp-format
+msgid ""
+"Failed to load chat history. Your chat history will not be preserved. "
+"Reason: {0}"
+msgstr "Nezdařilo se načtení historie chatů. Vaše historie chatů nebude uchována. Příčina: {0}"
+
+#: ../src/Engine/Chats/ChatModel.cs:300
+#, csharp-format
+msgid ""
+"Failed to open chat history for writing. Your chat history will not be "
+"preserved. Reason: {0}"
+msgstr "Nezdařilo se otevření historie chatů pro zápis. Vaše historie chatů nebude uchována. Příčina: {0}"
diff --git a/po-Engine/da.po b/po-Engine/da.po
index 5d026ac..7878c66 100644
--- a/po-Engine/da.po
+++ b/po-Engine/da.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011-2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:13+0200\n"
-"PO-Revision-Date: 2013-04-16 06:28+0000\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-20 18:49+0000\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgid "Not connected to server"
 msgstr "Ikke forbundet til server"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Ikke nok parametre for kommandoen {0}"
@@ -58,95 +58,109 @@ msgstr "Forbundet til {0}"
 msgid "Disconnected from {0}"
 msgstr "Ikke længere forbundet til {0}"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Automatisk tilslutning til {0} mislykkedes!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Motorkommandoer"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Tilslutning mislykkedes!"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Afbrydelse fejlede - kunne ikke finde server: {0}"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Gentilslutning mislykkedes!"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "Konfiguration genindlæst"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "Konfiguration gemt"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "Ugyldigt parameter for konfig; brug load (indlæs) eller save (gem)"
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Ugyldigt nøgle/værdi-format."
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Ugyldig konfigurationsnøgle: »{0}«"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Kunne ikke konvertere konfigurationsværdi: »{0}« til type: {1}"
+
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Ugyldig parameter for konfiguration: brug load (indlæs), save (gem), get (hent) eller set (sæt)."
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Ugyldigt parameter for netværk; brug list (vis), switch (skift) eller close (luk)"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "Forbundne netværk"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "Netværk"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "Protokol"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Vært"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Port"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "Ingen"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "Tilgængelige netværk"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "Lukning af netværk fejlede - kunne ikke finde netværk: {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
 msgstr "Netværksomskifter fejlede - kunne ikke finde netværk: {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Ikke tilsluttet til noget netværk"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
@@ -155,24 +169,24 @@ msgstr "Kunne ikke skrive snakkehistorik. Din snakkehistorik vil ikke blive gemt
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Tilslutning mislykkedes."
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Ingen protokolhåndtering fundet til denne protokol: {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "Velkommen til Smuxi"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "Tast /help for en liste over tilgængelige kommandoer."
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
@@ -221,7 +235,7 @@ msgid ""
 "Reason: {0}"
 msgstr "Kunne ikke indlæse snakkehistorik. Din snakkehistorik vil ikke blive bevaret. Årsag: {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
diff --git a/po-Engine/de.po b/po-Engine/de.po
index 9101a14..12e6c49 100644
--- a/po-Engine/de.po
+++ b/po-Engine/de.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2011-2013.
+# Bianca Mix <heavydemon at freenet.de>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:13+0200\n"
-"PO-Revision-Date: 2013-04-14 19:44+0000\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-20 19:15+0000\n"
 "Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgid "Not connected to server"
 msgstr "Nicht mit dem Server verbunden"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Nicht genügend Parameter für den Befehl: {0}"
@@ -58,95 +58,109 @@ msgstr "Verbunden zu {0}"
 msgid "Disconnected from {0}"
 msgstr "Getrennt von {0}"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Automatische Verbindung zu {0} ist fehlgeschlagen!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Engine Befehle"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Verbindung ist fehlgeschlagen!"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Die Trennung ist fehlgeschlagen - konnte den Server {0} nicht finden"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Wiederverbinden ist fehlgeschlagen!"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "Konfiguration wurde erneuert"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "Konfiguration wurde gespeichert"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "Ungültiger Parameter für \"config\", verwenden Sie \"load\" oder \"save\""
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Ungültiges Schlüssel-/Wertformat"
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Ungültiger Konfigurationsschlüssel: '{0}'"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Konfigurationswert konnte nicht umgewandelt werden: '{0}' zu {1}"
+
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Ungültiger Konfigurationsparameter; benutzen Sie load, save, get oder set"
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Ungültiger Parameter für \"network\", verwenden Sie \"list\", \"switch\" oder \"close\""
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "Verbundene Netzwerke"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "Netzwerk"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "Protokoll"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Host"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Port"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "Keines"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "Verfügbare Netzwerke"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "Schließen des Netzwerks fehlgeschlagen - Netzwerk konnte nicht gefunden werden: {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
 msgstr "Wechseln des Netzwerks fehlgeschlagen - Netzwerk konnte nicht gefunden werden: {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Zu keinem Netzwerk verbunden"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
@@ -155,24 +169,24 @@ msgstr "Schreiben des Gesprächverlaufs fehlgeschlagen. Ihr Gesprächsverlauf wi
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Verbindung ist fehlgeschlagen."
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Kein Protokoll-Manager gefunden für das Protokoll: {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "Willkommen bei Smuxi"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "Geben Sie /help ein, um eine Liste der verfügbaren Befehle zu erhalten."
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
@@ -221,7 +235,7 @@ msgid ""
 "Reason: {0}"
 msgstr "Laden des Gesprächverlaufs fehlgeschlagen. Ihr Gesprächsverlauf wird nicht vorgehalten. Grund: {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
diff --git a/po-Engine/fi.po b/po-Engine/fi.po
index f300434..9aca788 100644
--- a/po-Engine/fi.po
+++ b/po-Engine/fi.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:13+0200\n"
-"PO-Revision-Date: 2013-05-01 13:33+0000\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-21 10:40+0000\n"
 "Last-Translator: Kalle Kaitala <cobrian at cobrian.net>\n"
 "Language-Team: Finnish (http://www.transifex.com/projects/p/smuxi/language/fi/)\n"
 "MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgid "Not connected to server"
 msgstr "Yhteys palvelimeen katkaistu"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Ei tarpeeksi parametrejä komennolle {0}"
@@ -58,95 +58,109 @@ msgstr "Yhdistetty kohteeseen {0}"
 msgid "Disconnected from {0}"
 msgstr "Yhteys katkaistu kohteesta {0}"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Automaattinen yhdistys palvelimeen {0} epäonnistui!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Moottorin komennot"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Yhdistäminen epäonnistui!"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Yhteyden katkaisu epäonnistui - palvelinta {0} ei löydetty"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Uudelleenyhdistäminen epäonnistui!"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "Asetukset ladattu uudelleen"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "Asetukset tallennettu"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "Epäkelpo parametri config:lle; käytä komentoja load tai save"
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Epäkelpo avain/arvo -muoto."
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Epäkelpo asetusavain: '{0}'"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Ei voitu kääntää asetusavainarvoa: '{0}' tyyppiin: {1}"
+
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Epäkelpo parametri asetuksille; käytä komentoja load, save get tai set."
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Epäkelpo parametri network:lle, käytä komentoja list, switch tai close"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "Yhdistetyt Verkot"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "Verkko"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "Protokolla"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Isäntä"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Portti"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "Ei mitään"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "Saatavilla olevat verkot"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "Verkon sulkeminen epäonnistui - verkkoa ei löytynyt: {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
 msgstr "Verkon vaihtaminen epäonnistui - verkkoa ei löytynyt: {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Ei yhdistettynä yhteenkään verkkoon"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
@@ -155,24 +169,24 @@ msgstr "Chat-historian tallennus epäonnistui. Chat-historiaasi ei säilötä. S
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Yhdistäminen epäonnistui."
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Protokollan hallintaa ei löydetty protokollalle {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "Tervetuloa Smuxiin"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "Kirjoita /help saadaksesi listan käytössäolevista komennoista."
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
@@ -221,7 +235,7 @@ msgid ""
 "Reason: {0}"
 msgstr "Chat-historian lataaminen epäonnistui. Chat-historiaasi ei tallenneta. Syy: {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
diff --git a/po-Engine/fr.po b/po-Engine/fr.po
index a2781b0..199def1 100644
--- a/po-Engine/fr.po
+++ b/po-Engine/fr.po
@@ -1,22 +1,22 @@
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-#
+# 
 # Translators:
-# Clément Bourgeois <moonpyk at gmail.com>, 2011.
+# Clément Bourgeois <moonpyk at gmail.com>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:36+0200\n"
-"PO-Revision-Date: 2013-04-10 22:40+0100\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-19 12:39+0000\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
-"Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
-"Language: fr\n"
+"Language-Team: French (http://www.transifex.com/projects/p/smuxi/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
 #: ../src/Engine/FrontendManager.cs:233
 msgid "No network connections"
@@ -36,16 +36,14 @@ msgstr "Impossible d'optimiser : {0}. Raison : {1}"
 msgid ""
 "Your chat history is no longer available because of an error but will be "
 "preserved from now on."
-msgstr ""
-"Votre historique de conversation n'est plus disponible en raison d'une "
-"erreur mais il sera préservé à partir de maintenant."
+msgstr "Votre historique de conversation n'est plus disponible en raison d'une erreur mais il sera préservé à partir de maintenant."
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:166
 msgid "Not connected to server"
 msgstr "Pas de connexion au serveur"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Pas assez d'arguments pour la commande {0}"
@@ -60,132 +58,140 @@ msgstr "Connecté à {0}"
 msgid "Disconnected from {0}"
 msgstr "Deconnecté de {0}"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Connexion automatique à {0} impossible !"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Commandes du moteur"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Connexion impossible !"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Déconnexion impossible : serveur \"{0}\" introuvable"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Reconnexion impossible !"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "Configuration rechargée"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "Configuration sauvegardée"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "Paramètre invalide pour la configuration ; utilisez load ou save"
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Format invalide de paire clé/valeur."
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Clé de configuration incorrecte : '{0}'"
+
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Impossible de convertir la valeur de configuration '{0}' vers le type : {1}"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Paramètre invalide pour la configuration, utilisez \"save\", \"get\" ou \"save\"."
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Paramètre invalide pour le réseau ; utilisez list, switch ou close"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "Réseaux connectés"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "Réseau"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "Protocole"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Hôte"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Port"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "Aucun"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "Réseaux disponibles"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "Impossible de fermer le réseau - impossible de trouver le réseau : {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
-msgstr ""
-"Impossible de changer de réseau - impossible de trouver le réseau : {0}"
+msgstr "Impossible de changer de réseau - impossible de trouver le réseau : {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Aucun réseau connecté"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
 "Reason: {0}"
-msgstr ""
-"Impossible d'écrire votre historique de discussion, celui-ci ne sera pas "
-"préservé. Raison : {0}"
+msgstr "Impossible d'écrire votre historique de discussion, celui-ci ne sera pas préservé. Raison : {0}"
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Connexion impossible."
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Aucun gestionnaire de protocole trouvé pour le protocole : {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "Bienvenue dans Smuxi"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "Tapez /help pour obtenir la liste des commandes disponibles."
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
 "the extended command list."
-msgstr ""
-"Apres s'être connecté, la liste des commandes disponibles change. Allez dans "
-"l'onglet de la nouvelle connexion et utilisez la commande /help pour voir la "
-"nouvelle liste étendue des commandes."
+msgstr "Apres s'être connecté, la liste des commandes disponibles change. Allez dans l'onglet de la nouvelle connexion et utilisez la commande /help pour voir la nouvelle liste étendue des commandes."
 
 #: ../src/Engine/Config/UserListController.cs:117
 msgid "Username must not be empty."
@@ -227,15 +233,11 @@ msgstr "L'identifiant de serveur \"{0}\" existe déjà."
 msgid ""
 "Failed to load chat history. Your chat history will not be preserved. "
 "Reason: {0}"
-msgstr ""
-"Impossible de charger votre historique de discussion, celui-ci ne sera pas "
-"préservé. Raison : {0}"
+msgstr "Impossible de charger votre historique de discussion, celui-ci ne sera pas préservé. Raison : {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
 "preserved. Reason: {0}"
-msgstr ""
-"Impossible d'ouvrir en écriture votre historique de discussion, celui-ci ne "
-"sera pas préservé. Raison : {0}"
+msgstr "Impossible d'ouvrir en écriture votre historique de discussion, celui-ci ne sera pas préservé. Raison : {0}"
diff --git a/po-Engine/pt_BR.po b/po-Engine/pt_BR.po
new file mode 100644
index 0000000..0723923
--- /dev/null
+++ b/po-Engine/pt_BR.po
@@ -0,0 +1,229 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:13+0200\n"
+"PO-Revision-Date: 2013-07-08 17:04+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Engine/FrontendManager.cs:233
+msgid "No network connections"
+msgstr "Sem conexão de rede"
+
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:295
+#, csharp-format
+msgid "Optimizing: {0}..."
+msgstr "Optimizando: {0}..."
+
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:313
+#, csharp-format
+msgid "Failed to optimize: {0}. Reason: {1}"
+msgstr "Falhou a optimização: {0}. Razão: {1}"
+
+#: ../src/Engine/MessageBuffers/Db4oMessageBuffer.cs:347
+msgid ""
+"Your chat history is no longer available because of an error but will be "
+"preserved from now on."
+msgstr "Seu histórico de mensagens não está disponível por causa de um erro, mas será preservado à partir de agora."
+
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:166
+msgid "Not connected to server"
+msgstr "Não conectado ao servidor"
+
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
+#: ../src/Engine/Session.cs:846
+#, csharp-format
+msgid "Not enough parameters for {0} command"
+msgstr "Parâmetros insfucientes para o comando {0}"
+
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:185
+#, csharp-format
+msgid "Connected to {0}"
+msgstr "Conectado a {0}"
+
+#: ../src/Engine/Protocols/ProtocolManagerBase.cs:203
+#, csharp-format
+msgid "Disconnected from {0}"
+msgstr "Desconectado de {0}"
+
+#: ../src/Engine/Session.cs:217
+#, csharp-format
+msgid "Automatic connect to {0} failed!"
+msgstr "Conexão automática a {0} falhou!"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Engine/Session.cs:415
+msgid "Engine Commands"
+msgstr "Comandos principais"
+
+#: ../src/Engine/Session.cs:540
+msgid "Connect failed!"
+msgstr "Conexão falhou!"
+
+#: ../src/Engine/Session.cs:563
+#, csharp-format
+msgid "Disconnect failed - could not find server: {0}"
+msgstr "Desconexão falhou - Não foi possível encontrar servidor: {0}"
+
+#: ../src/Engine/Session.cs:603
+msgid "Reconnect failed!"
+msgstr "Re-conectar falhou!"
+
+#: ../src/Engine/Session.cs:625
+msgid "Configuration reloaded"
+msgstr "Configuração reiniciada"
+
+#: ../src/Engine/Session.cs:629
+msgid "Configuration saved"
+msgstr "Configuração salva"
+
+#: ../src/Engine/Session.cs:633
+msgid "Invalid parameter for config; use load or save"
+msgstr "Parâmetro invalido para config: Use load ou save"
+
+#: ../src/Engine/Session.cs:702
+msgid "Invalid parameter for network; use list, switch, or close"
+msgstr "Parâmetro invalido para rede: use list, switch ou close"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of networks below
+#: ../src/Engine/Session.cs:733
+msgid "Connected Networks"
+msgstr "Redes Conectadas"
+
+#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+msgid "Network"
+msgstr "Rede"
+
+#: ../src/Engine/Session.cs:739
+msgid "Protocol"
+msgstr "Protocolo"
+
+#: ../src/Engine/Session.cs:740
+msgid "Host"
+msgstr "Servidor"
+
+#: ../src/Engine/Session.cs:741
+msgid "Port"
+msgstr "Porta"
+
+#. TRANSLATOR: no connected networks
+#. TRANSLATOR: no available networks
+#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+msgid "None"
+msgstr "Nenhuma"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of networks below
+#: ../src/Engine/Session.cs:754
+msgid "Available Networks"
+msgstr "Redes disponíveis"
+
+#: ../src/Engine/Session.cs:783
+#, csharp-format
+msgid "Network close failed - could not find network: {0}"
+msgstr "Desconexão falhou - Não foi possível encontrar servidor: {0}"
+
+#: ../src/Engine/Session.cs:821
+#, csharp-format
+msgid "Network switch failed - could not find network: {0}"
+msgstr "Troca de rede falhou - não foi possível encontrar rede: {0}"
+
+#: ../src/Engine/Session.cs:839
+msgid "Not connected to any network"
+msgstr "Não conectado em nenhum servidor"
+
+#: ../src/Engine/Session.cs:1093
+#, csharp-format
+msgid ""
+"Failed to write to chat history. Your chat history will not be preserved. "
+"Reason: {0}"
+msgstr "Falha ao escrever o histórico de mensagens. Seu histórico de mensagens não serão preservadas. Razão: {0}"
+
+#. just in case the ProtocolManager is not setting the
+#. protocol chat
+#: ../src/Engine/Session.cs:1266
+msgid "Connect failed."
+msgstr "Conexão falhou!"
+
+#: ../src/Engine/Session.cs:1297
+#, csharp-format
+msgid "No protocol manager found for the protocol: {0}"
+msgstr "Gerenciador de protocolo não encontrado para o protocolo: {0}"
+
+#: ../src/Engine/Session.cs:1529
+msgid "Welcome to Smuxi"
+msgstr "Bem vindo ao Smuxi"
+
+#: ../src/Engine/Session.cs:1536
+msgid "Type /help to get a list of available commands."
+msgstr "Digite /help para pegar lista de comandos disponíveis."
+
+#: ../src/Engine/Session.cs:1542
+msgid ""
+"After you have made a connection the list of available commands changes. Go "
+"to the newly opened connection tab and use the /help command again to see "
+"the extended command list."
+msgstr "Após você conectar a lista de comandos mudam. Vá para a nova aba de conexão e use o comando /help de novo para ver a lista de comandos. "
+
+#: ../src/Engine/Config/UserListController.cs:117
+msgid "Username must not be empty."
+msgstr "Nome de usuário não pode estar vazio."
+
+#: ../src/Engine/Config/UserListController.cs:127
+msgid "Password must not be empty."
+msgstr "Senha não pode estar vazia."
+
+#: ../src/Engine/Config/UserListController.cs:136
+#, csharp-format
+msgid "User \"{0}\" doesn't exist."
+msgstr "Usuário \"{0}\" não existe."
+
+#: ../src/Engine/Config/UserListController.cs:145
+#, csharp-format
+msgid "User \"{0}\" already exists."
+msgstr "Usuário \"{0}\" já existe."
+
+#: ../src/Engine/Config/ServerListController.cs:118
+msgid "Network must not be empty."
+msgstr "Rede não pode estar vazia."
+
+#: ../src/Engine/Config/ServerListController.cs:138
+msgid "Server hostname must not be empty."
+msgstr "Nome do servidor não pode estar vazio."
+
+#: ../src/Engine/Config/ServerListController.cs:141
+msgid "Server hostname contains invalid characters (newline)."
+msgstr "Nome do servidor contem caracteres inválidos (nova linha)."
+
+#: ../src/Engine/Config/ServerListController.cs:148
+#, csharp-format
+msgid "Server ID '{0}' already exists."
+msgstr "Servidor de ID '{0}' já existe."
+
+#: ../src/Engine/Chats/ChatModel.cs:105
+#, csharp-format
+msgid ""
+"Failed to load chat history. Your chat history will not be preserved. "
+"Reason: {0}"
+msgstr "Falha ao carregar histórico de mensagens. Seu histórico de mensagens não será preservados. Razão: {0}"
+
+#: ../src/Engine/Chats/ChatModel.cs:298
+#, csharp-format
+msgid ""
+"Failed to open chat history for writing. Your chat history will not be "
+"preserved. Reason: {0}"
+msgstr "Falha ao abrir histórico de mensagens para escrevê-lá. Seu histórico de mensagens não serão preservados. Razão: {0}"
diff --git a/po-Engine/sv.po b/po-Engine/sv.po
index a30bbef..383016b 100644
--- a/po-Engine/sv.po
+++ b/po-Engine/sv.po
@@ -10,8 +10,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:13+0200\n"
-"PO-Revision-Date: 2013-04-17 04:01+0000\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-19 13:39+0000\n"
 "Last-Translator: flugsio <flugsio at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
@@ -45,7 +45,7 @@ msgid "Not connected to server"
 msgstr "Inte ansluten till server"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Inte tillräckligt med parametrar för kommandot {0}"
@@ -60,95 +60,109 @@ msgstr "Ansluten till {0}"
 msgid "Disconnected from {0}"
 msgstr "Frånkopplad från {0}"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "Automatisk anslutning till {0} misslyckades!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "Kommandon för motorn"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "Anslutning misslyckades!"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "Nedkoppling misslyckades - kunde inte hitta servern: {0}"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "Återanslutning misslyckades!"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "Inställningarna laddades"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "Inställningarna sparades"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "Ogiltig parameter för inställning; använd load eller save"
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "Ogiltigt nykel/värde format."
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "Ogiltig konfigurationsnyckel: '{0}'"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "Kunde inte konvertera konfigurationsvärdet: '{0}' till typen: {1}"
+
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "Ogiltig parameter för inställningar; använd load, save, get eller set."
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "Ogiltig parameter för nätverk; använd list, switch eller close"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "Anslutna nätverk"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "Nätverk"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "Protokoll"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "Värd"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "Port"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "Ingen"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "Tillgängliga nätverk"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "Stängning av nätverk misslyckades - kunde inte hitta nätverket med värdnamn: {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
 msgstr "Byte av nätverk misslyckades - kunde inte hitta nätverket med värdnamn: {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "Inte ansluten till något nätverk"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
@@ -157,24 +171,24 @@ msgstr "Kunde inte spara chatthistorik. Din chatthistorik kommer inte att bibeh
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "Anslutning misslyckades."
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "Ingen protokollshanterare funnen för protokollet: {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "Välkommen till Smuxi"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "Skriv /help för att få en lista med tillgängliga kommandon."
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
@@ -223,7 +237,7 @@ msgid ""
 "Reason: {0}"
 msgstr "Kunde inte läsa in chatthistoriken. Din chatthistorik kommer inte att sparas. Anledning: {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
diff --git a/po-Engine/zh_CN.po b/po-Engine/zh_CN.po
index cda2eb6..6ddfd41 100644
--- a/po-Engine/zh_CN.po
+++ b/po-Engine/zh_CN.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2011-2013.
+# Dean Lee <xslidian at gmail.com>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:13+0200\n"
-"PO-Revision-Date: 2013-04-14 14:06+0000\n"
+"POT-Creation-Date: 2013-08-19 14:06+0200\n"
+"PO-Revision-Date: 2013-08-19 17:55+0000\n"
 "Last-Translator: Dean Lee <xslidian at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgid "Not connected to server"
 msgstr "未连接到服务器"
 
 #: ../src/Engine/Protocols/ProtocolManagerBase.cs:174
-#: ../src/Engine/Session.cs:846
+#: ../src/Engine/Session.cs:951
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "{0} 命令参数不足"
@@ -58,95 +58,109 @@ msgstr "已连接到 {0}"
 msgid "Disconnected from {0}"
 msgstr "已从 {0} 断开连接"
 
-#: ../src/Engine/Session.cs:217
+#: ../src/Engine/Session.cs:224
 #, csharp-format
 msgid "Automatic connect to {0} failed!"
 msgstr "自动连接 {0} 失败!"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Engine/Session.cs:415
+#: ../src/Engine/Session.cs:426
 msgid "Engine Commands"
 msgstr "引擎命令"
 
-#: ../src/Engine/Session.cs:540
+#: ../src/Engine/Session.cs:552
 msgid "Connect failed!"
 msgstr "连接失败!"
 
-#: ../src/Engine/Session.cs:563
+#: ../src/Engine/Session.cs:575
 #, csharp-format
 msgid "Disconnect failed - could not find server: {0}"
 msgstr "连接断开失败 - 找不到服务器: {0}"
 
-#: ../src/Engine/Session.cs:603
+#: ../src/Engine/Session.cs:615
 msgid "Reconnect failed!"
 msgstr "重新连接失败!"
 
-#: ../src/Engine/Session.cs:625
+#: ../src/Engine/Session.cs:641
 msgid "Configuration reloaded"
 msgstr "配置已重新载入"
 
-#: ../src/Engine/Session.cs:629
+#: ../src/Engine/Session.cs:645
 msgid "Configuration saved"
 msgstr "配置已保存"
 
-#: ../src/Engine/Session.cs:633
-msgid "Invalid parameter for config; use load or save"
-msgstr "config 的参数无效; 使用 load 或 save"
+#: ../src/Engine/Session.cs:676
+msgid "Invalid key/value format."
+msgstr "键/值格式无效。"
+
+#: ../src/Engine/Session.cs:686
+#, csharp-format
+msgid "Invalid config key: '{0}'"
+msgstr "配置键无效: '{0}'"
 
-#: ../src/Engine/Session.cs:702
+#: ../src/Engine/Session.cs:696 ../src/Engine/Session.cs:702
+#, csharp-format
+msgid "Could not convert config value: '{0}' to type: {1}"
+msgstr "无法转换配置键: '{0}' 目标类型: {1}"
+
+#: ../src/Engine/Session.cs:711
+msgid "Invalid parameter for config; use load, save, get or set."
+msgstr "config 参数无效; 请使用 load、save、get 或 set。"
+
+#: ../src/Engine/Session.cs:807
 msgid "Invalid parameter for network; use list, switch, or close"
 msgstr "network 的参数无效; 使用 list、switch 或 close"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:733
+#: ../src/Engine/Session.cs:838
 msgid "Connected Networks"
 msgstr "已连接网络"
 
-#: ../src/Engine/Session.cs:738 ../src/Engine/Session.cs:762
+#: ../src/Engine/Session.cs:843 ../src/Engine/Session.cs:867
 msgid "Network"
 msgstr "网络"
 
-#: ../src/Engine/Session.cs:739
+#: ../src/Engine/Session.cs:844
 msgid "Protocol"
 msgstr "协议"
 
-#: ../src/Engine/Session.cs:740
+#: ../src/Engine/Session.cs:845
 msgid "Host"
 msgstr "主机"
 
-#: ../src/Engine/Session.cs:741
+#: ../src/Engine/Session.cs:846
 msgid "Port"
 msgstr "端口"
 
 #. TRANSLATOR: no connected networks
 #. TRANSLATOR: no available networks
-#: ../src/Engine/Session.cs:747 ../src/Engine/Session.cs:768
+#: ../src/Engine/Session.cs:852 ../src/Engine/Session.cs:873
 msgid "None"
 msgstr "无"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of networks below
-#: ../src/Engine/Session.cs:754
+#: ../src/Engine/Session.cs:859
 msgid "Available Networks"
 msgstr "可用网络"
 
-#: ../src/Engine/Session.cs:783
+#: ../src/Engine/Session.cs:888
 #, csharp-format
 msgid "Network close failed - could not find network: {0}"
 msgstr "网络关闭失败——无法找到网络: {0}"
 
-#: ../src/Engine/Session.cs:821
+#: ../src/Engine/Session.cs:926
 #, csharp-format
 msgid "Network switch failed - could not find network: {0}"
 msgstr "网络切换失败——无法找到网络: {0}"
 
-#: ../src/Engine/Session.cs:839
+#: ../src/Engine/Session.cs:944
 msgid "Not connected to any network"
 msgstr "未连接到任何网络"
 
-#: ../src/Engine/Session.cs:1093
+#: ../src/Engine/Session.cs:1198
 #, csharp-format
 msgid ""
 "Failed to write to chat history. Your chat history will not be preserved. "
@@ -155,24 +169,24 @@ msgstr "无法写入聊天历史。您的聊天历史将不会保存。原因: {
 
 #. just in case the ProtocolManager is not setting the
 #. protocol chat
-#: ../src/Engine/Session.cs:1266
+#: ../src/Engine/Session.cs:1371
 msgid "Connect failed."
 msgstr "连接失败。"
 
-#: ../src/Engine/Session.cs:1297
+#: ../src/Engine/Session.cs:1402
 #, csharp-format
 msgid "No protocol manager found for the protocol: {0}"
 msgstr "未找到该协议的协议管理器: {0}"
 
-#: ../src/Engine/Session.cs:1529
+#: ../src/Engine/Session.cs:1641
 msgid "Welcome to Smuxi"
 msgstr "欢迎来到 Smuxi"
 
-#: ../src/Engine/Session.cs:1536
+#: ../src/Engine/Session.cs:1648
 msgid "Type /help to get a list of available commands."
 msgstr "输入 /help 获取可用命令列表。"
 
-#: ../src/Engine/Session.cs:1542
+#: ../src/Engine/Session.cs:1654
 msgid ""
 "After you have made a connection the list of available commands changes. Go "
 "to the newly opened connection tab and use the /help command again to see "
@@ -221,7 +235,7 @@ msgid ""
 "Reason: {0}"
 msgstr "无法加载聊天历史。您的聊天历史将不会保留。原因: {0}"
 
-#: ../src/Engine/Chats/ChatModel.cs:298
+#: ../src/Engine/Chats/ChatModel.cs:300
 #, csharp-format
 msgid ""
 "Failed to open chat history for writing. Your chat history will not be "
diff --git a/po-Frontend-GNOME-IRC/LINGUAS b/po-Frontend-GNOME-IRC/LINGUAS
index 21aa89c..3f5773b 100644
--- a/po-Frontend-GNOME-IRC/LINGUAS
+++ b/po-Frontend-GNOME-IRC/LINGUAS
@@ -9,6 +9,7 @@ hr
 it
 pl
 pt
+pt_BR
 ru
 sv
 zh_CN
diff --git a/po-Frontend-GNOME-IRC/POTFILES.skip b/po-Frontend-GNOME-IRC/POTFILES.skip
index 1f55a38..3ea2802 100644
--- a/po-Frontend-GNOME-IRC/POTFILES.skip
+++ b/po-Frontend-GNOME-IRC/POTFILES.skip
@@ -3,12 +3,14 @@ src/Common/
 src/Engine/
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
 src/Engine-Twitter/
 src/Frontend/
 src/Frontend-GNOME/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
diff --git a/po-Frontend-GNOME-IRC/cs.po b/po-Frontend-GNOME-IRC/cs.po
index ee5c156..3414996 100644
--- a/po-Frontend-GNOME-IRC/cs.po
+++ b/po-Frontend-GNOME-IRC/cs.po
@@ -1,88 +1,90 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-frontend-gnome-irc 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-15 18:58+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:10+0200\n"
+"PO-Revision-Date: 2013-05-22 16:57+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "Soukromý rozhovor"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:340
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:344
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
-msgstr "Deop"
+msgstr "Odebrat op"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:348
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "Hlas"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:352
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
-msgstr "Ukončit hlas"
+msgstr "Odebrat hlas"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:356
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "Vykopnout"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:360
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "Vykopnout + Ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:364
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "Ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:368
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "Zrušit ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:374
-msgid "Query"
-msgstr "Zeptat se"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:378
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:61
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "Kdo je"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:382
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:65
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:391
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:72
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "Pozvat na"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "Verze"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "Čas"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "Finger"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "Info o uživateli"
diff --git a/po-Frontend-GNOME-IRC/da.po b/po-Frontend-GNOME-IRC/da.po
index 875536e..5120162 100644
--- a/po-Frontend-GNOME-IRC/da.po
+++ b/po-Frontend-GNOME-IRC/da.po
@@ -7,85 +7,83 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:22+0100\n"
-"PO-Revision-Date: 2010-11-30 04:12+0000\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: Danish (http://www.transifex.net/projects/p/smuxi/team/da/)\n"
+"POT-Creation-Date: 2013-08-19 14:10+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: da\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:381
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "Forespørgsel"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:385
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
 msgstr "Deop"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:389
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "Voice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:393
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
 msgstr "Devoice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:397
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "Smid ud"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:401
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "Smid ud + giv karantæne"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:405
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "Giv karantæne"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:409
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "Fjern karantæne"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:415
-msgid "Query"
-msgstr "Forespørgsel"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:419
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:64
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "Hvem er"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:423
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:68
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:432
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:75
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "Inviter til"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "Version"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "Tid"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "Finger"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "Brugerinfo"
-
-
diff --git a/po-Frontend-GNOME-IRC/de.po b/po-Frontend-GNOME-IRC/de.po
index f2ad716..30d592a 100644
--- a/po-Frontend-GNOME-IRC/de.po
+++ b/po-Frontend-GNOME-IRC/de.po
@@ -7,85 +7,83 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:22+0100\n"
-"PO-Revision-Date: 2010-11-30 04:12+0000\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: German (http://www.transifex.net/projects/p/smuxi/team/de/)\n"
+"POT-Creation-Date: 2013-08-19 14:10+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: de\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:381
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "Query"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "Op"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:385
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
 msgstr "Deop"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:389
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "Voice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:393
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
 msgstr "Devoice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:397
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "Kick"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:401
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "Kick + Ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:405
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "Ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:409
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "Unban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:415
-msgid "Query"
-msgstr "Query"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:419
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:64
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "Whois"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:423
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:68
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:432
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:75
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "Einladen zu"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "Version"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "Zeit"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "Finger"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "Benutzerinformationen"
-
-
diff --git a/po-Frontend-GNOME-IRC/fr.po b/po-Frontend-GNOME-IRC/fr.po
index 0fe38b6..906cfbc 100644
--- a/po-Frontend-GNOME-IRC/fr.po
+++ b/po-Frontend-GNOME-IRC/fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:43+0200\n"
+"POT-Creation-Date: 2013-08-19 12:17+0200\n"
 "PO-Revision-Date: 2010-11-30 04:12+0000\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
@@ -17,73 +17,73 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:384
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "Chat privé"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "Opper"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:388
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
 msgstr "Enlever l'Op"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:392
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "Voicer"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
 msgstr "Enlever le Voice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "Kicker"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "Kicker + Bannir"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "Bannir"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "Enlever le ban"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:418
-msgid "Query"
-msgstr "Chat privé"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:422
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
 #: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "Whois"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:426
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
 #: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:435
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
 #: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "Inviter à"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "Version"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "Temps"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "Finger"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "Userinfo"
diff --git a/po-Frontend-GNOME-IRC/pt_BR.po b/po-Frontend-GNOME-IRC/pt_BR.po
new file mode 100644
index 0000000..3edd49f
--- /dev/null
+++ b/po-Frontend-GNOME-IRC/pt_BR.po
@@ -0,0 +1,90 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:20+0200\n"
+"PO-Revision-Date: 2013-07-08 22:26+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:384
+msgid "Op"
+msgstr "Op"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:388
+msgid "Deop"
+msgstr "Deop"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:392
+msgid "Voice"
+msgstr "Voz"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
+msgid "Devoice"
+msgstr "Retirado Voz"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
+msgid "Kick"
+msgstr "Expulso"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
+msgid "Kick + Ban"
+msgstr "Expulso + Banido"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
+msgid "Ban"
+msgstr "Banido"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
+msgid "Unban"
+msgstr "Desbanido"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:418
+msgid "Query"
+msgstr "Query"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:422
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:426
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
+msgid "CTCP"
+msgstr "CTCP"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:435
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
+msgid "Invite to"
+msgstr "Convidar para"
+
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+msgid "Ping"
+msgstr "Ping"
+
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+msgid "Version"
+msgstr "Version"
+
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+msgid "Time"
+msgstr "Tempo"
+
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+msgid "Finger"
+msgstr "Finger"
+
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+msgid "Userinfo"
+msgstr "InfoUsuário"
diff --git a/po-Frontend-GNOME-IRC/sv.po b/po-Frontend-GNOME-IRC/sv.po
index 28bc5f4..4f6e785 100644
--- a/po-Frontend-GNOME-IRC/sv.po
+++ b/po-Frontend-GNOME-IRC/sv.po
@@ -7,85 +7,83 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:22+0100\n"
-"PO-Revision-Date: 2010-11-30 04:12+0000\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: Swedish (http://www.transifex.net/projects/p/smuxi/team/sv/)\n"
+"POT-Creation-Date: 2013-08-19 14:10+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: sv\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:381
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "Privat"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "Gör till operatör"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:385
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
 msgstr "Ta bort operatörsskap"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:389
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "Voice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:393
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
 msgstr "Ta bort voice"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:397
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "Sparka"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:401
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "Sparka och stäng ute"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:405
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "Stäng ute"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:409
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "Upphäv utestängning"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:415
-msgid "Query"
-msgstr "Privat"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:419
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:64
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "Användarinformation"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:423
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:68
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:432
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:75
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "Inbjud till"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "Version"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "Tid"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "Finger"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "Användarinformation"
-
-
diff --git a/po-Frontend-GNOME-IRC/zh_CN.po b/po-Frontend-GNOME-IRC/zh_CN.po
index aca23f3..0fe984d 100644
--- a/po-Frontend-GNOME-IRC/zh_CN.po
+++ b/po-Frontend-GNOME-IRC/zh_CN.po
@@ -3,90 +3,88 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2012.
+# Dean Lee <xslidian at gmail.com>, 2012
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:22+0100\n"
-"PO-Revision-Date: 2012-01-07 10:09+0000\n"
-"Last-Translator: Dean Lee <xslidian at gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/smuxi/team/zh_CN/)\n"
+"POT-Creation-Date: 2013-08-19 14:10+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: zh_CN\n"
-"Plural-Forms: nplurals=1; plural=0\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:381
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:390
+msgid "Query"
+msgstr "私聊"
+
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:396
 msgid "Op"
 msgstr "设为版主"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:385
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:400
 msgid "Deop"
 msgstr "撤销版主"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:389
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:404
 msgid "Voice"
 msgstr "设为认证用户"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:393
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:408
 msgid "Devoice"
 msgstr "撤销认证用户"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:397
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:412
 msgid "Kick"
 msgstr "踢除"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:401
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:416
 msgid "Kick + Ban"
 msgstr "踢除 + 封禁"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:405
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:420
 msgid "Ban"
 msgstr "封禁"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:409
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:424
 msgid "Unban"
 msgstr "解封"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:415
-msgid "Query"
-msgstr "私聊"
-
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:419
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:64
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:430
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:63
 msgid "Whois"
 msgstr "详情"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:423
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:68
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:434
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:67
 msgid "CTCP"
 msgstr "CTCP"
 
-#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:432
-#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:75
+#: ../src/Frontend-GNOME-IRC/IrcGroupChatView.cs:443
+#: ../src/Frontend-GNOME-IRC/IrcPersonChatView.cs:74
 msgid "Invite to"
 msgstr "邀请加入"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:72
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:73
 msgid "Ping"
 msgstr "Ping"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:77
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:78
 msgid "Version"
 msgstr "版本"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:82
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:83
 msgid "Time"
 msgstr "用户时间"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:87
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:88
 msgid "Finger"
 msgstr "真实姓名与空闲时间"
 
-#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:92
+#: ../src/Frontend-GNOME-IRC/CtcpMenu.cs:93
 msgid "Userinfo"
 msgstr "用户信息"
-
-
diff --git a/po-Frontend-GNOME-IRC/LINGUAS b/po-Frontend-GNOME-XMPP/LINGUAS
similarity index 100%
copy from po-Frontend-GNOME-IRC/LINGUAS
copy to po-Frontend-GNOME-XMPP/LINGUAS
diff --git a/po-Frontend-GNOME-XMPP/Makefile.in.in b/po-Frontend-GNOME-XMPP/Makefile.in.in
new file mode 100644
index 0000000..e78b0fb
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/Makefile.in.in
@@ -0,0 +1,218 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
+#
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob at ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns at gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE_FRONTEND_GNOME_XMPP@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p at .
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+	$(MSGFMT) -o $@ $<
+
+.po.gmo:
+	file=`echo $* | sed 's,.*/,,'`.gmo \
+	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+	sed -f ../intl/po2msg.sed < $< > $*.msg \
+	  && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+	$(GENPOT)
+
+install: install-data
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+	$(mkdir_p) $(DESTDIR)$(itlocaledir)
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $$dir; \
+	  if test -r $$lang.gmo; then \
+	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+	  else \
+	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $(srcdir)/$$lang.gmo as" \
+		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
+	  fi; \
+	  if test -r $$lang.gmo.m; then \
+	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	  else \
+	    if test -r $(srcdir)/$$lang.gmo.m ; then \
+	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+		$$dir/$(GETTEXT_PACKAGE).mo.m; \
+	      echo "installing $(srcdir)/$$lang.gmo.m as" \
+		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	    else \
+	      true; \
+	    fi; \
+	  fi; \
+	done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+	done
+
+check: all $(GETTEXT_PACKAGE).pot
+	rm -f missing notexist
+	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+	if [ -r missing -o -r notexist ]; then \
+	  exit 1; \
+	fi
+
+mostlyclean:
+	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+	rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES stamp-it
+	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	extra_dists="$(EXTRA_DISTFILES)"; \
+	for file in $$extra_dists; do \
+	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	done; \
+	for file in $$dists; do \
+	  test -f $$file || file="$(srcdir)/$$file"; \
+	  ln $$file $(distdir) 2> /dev/null \
+	    || cp -p $$file $(distdir); \
+	done
+
+update-po: Makefile
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  echo "$$lang:"; \
+	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+	  if $$result; then \
+	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	      rm -f $$tmpdir/$$lang.new.po; \
+            else \
+	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	        :; \
+	      else \
+	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
+	  else \
+	    echo "msgmerge for $$lang.gmo failed!"; \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  fi; \
+	done
+
+Makefile POTFILES: stamp-it
+	@if test ! -f $@; then \
+	  rm -f stamp-it; \
+	  $(MAKE) stamp-it; \
+	fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+	       $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po-Frontend-GNOME-XMPP/POTFILES.in b/po-Frontend-GNOME-XMPP/POTFILES.in
new file mode 100644
index 0000000..a50687a
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/POTFILES.in
@@ -0,0 +1,3 @@
+src/Frontend-GNOME-XMPP/InviteToMenu.cs
+src/Frontend-GNOME-XMPP/XmppGroupChatView.cs
+src/Frontend-GNOME-XMPP/XmppPersonChatView.cs
diff --git a/po-Frontend-GNOME-XMPP/POTFILES.skip b/po-Frontend-GNOME-XMPP/POTFILES.skip
new file mode 100644
index 0000000..8e3b0e5
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/POTFILES.skip
@@ -0,0 +1,18 @@
+glade/
+src/Common/
+src/Engine/
+src/Engine-Campfire/
+src/Engine-IRC/
+src/Engine-JabbR/
+src/Engine-MSNP/
+src/Engine-OSCAR/
+src/Engine-XMPP/
+src/Engine-Twitter/
+src/Frontend/
+src/Frontend-GNOME/
+src/Frontend-GNOME-IRC/
+src/Frontend-STFL/
+src/Frontend-SWF/
+src/Frontend-WPF/
+src/Server/
+lib/
diff --git a/po-Frontend-GNOME-XMPP/cs.po b/po-Frontend-GNOME-XMPP/cs.po
new file mode 100644
index 0000000..4332a5e
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/cs.po
@@ -0,0 +1,78 @@
+# Smuxi - IRC client for sophisticated users
+# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
+# This file is distributed under the same license as the Smuxi package.
+# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: smuxi-frontend-gnome-irc 0.6.4.1-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-07-15 18:58+0200\n"
+"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
+"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Kdo je"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Zeptat se"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Pozvat na"
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Hlas"
+
+#~ msgid "Devoice"
+#~ msgstr "Ukončit hlas"
+
+#~ msgid "Kick"
+#~ msgstr "Vykopnout"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Vykopnout + Ban"
+
+#~ msgid "Ban"
+#~ msgstr "Ban"
+
+#~ msgid "Unban"
+#~ msgstr "Zrušit ban"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Verze"
+
+#~ msgid "Time"
+#~ msgstr "Čas"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Info o uživateli"
diff --git a/po-Frontend-GNOME-XMPP/da.po b/po-Frontend-GNOME-XMPP/da.po
new file mode 100644
index 0000000..b9120e1
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/da.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-11-30 04:12+0000\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: Danish (http://www.transifex.net/projects/p/smuxi/team/da/)\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Hvem er"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Forespørgsel"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Inviter til"
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Devoice"
+
+#~ msgid "Kick"
+#~ msgstr "Smid ud"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Smid ud + giv karantæne"
+
+#~ msgid "Ban"
+#~ msgstr "Giv karantæne"
+
+#~ msgid "Unban"
+#~ msgstr "Fjern karantæne"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Version"
+
+#~ msgid "Time"
+#~ msgstr "Tid"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Brugerinfo"
diff --git a/po-Frontend-GNOME-XMPP/de.po b/po-Frontend-GNOME-XMPP/de.po
new file mode 100644
index 0000000..e150725
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/de.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-11-30 04:12+0000\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: German (http://www.transifex.net/projects/p/smuxi/team/de/)\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Query"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Einladen zu"
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Devoice"
+
+#~ msgid "Kick"
+#~ msgstr "Kick"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Kick + Ban"
+
+#~ msgid "Ban"
+#~ msgstr "Ban"
+
+#~ msgid "Unban"
+#~ msgstr "Unban"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Version"
+
+#~ msgid "Time"
+#~ msgstr "Zeit"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Benutzerinformationen"
diff --git a/po-Frontend-GNOME-XMPP/en_GB.po b/po-Frontend-GNOME-XMPP/en_GB.po
new file mode 100644
index 0000000..f67a409
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/en_GB.po
@@ -0,0 +1,76 @@
+# Smuxi - IRC client for sophisticated users
+# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
+# This file is distributed under the same license as the Smuxi package.
+# Ryan Smith-Evans <Kimera.Kimera at gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: smuxi 0.6.4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-01-09 00:20+0100\n"
+"Last-Translator: Ryan Smith-Evans <Kimera.Kimera at gmail.com>\n"
+"Language-Team: English (British)\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Query"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr ""
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Devoice"
+
+#~ msgid "Kick"
+#~ msgstr "Kick"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Kick + Ban"
+
+#~ msgid "Ban"
+#~ msgstr "Ban"
+
+#~ msgid "Unban"
+#~ msgstr "Unban"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Version"
+
+#~ msgid "Time"
+#~ msgstr "Time"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
diff --git a/po-Frontend-GNOME-XMPP/es.po b/po-Frontend-GNOME-XMPP/es.po
new file mode 100644
index 0000000..ff89e91
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/es.po
@@ -0,0 +1,79 @@
+# Smuxi - IRC client for sophisticated users
+# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
+# This file is distributed under the same license as the Smuxi package.
+# Juan Miguel Carrero <streinleght at gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.6.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Juan Miguel Carrero <streinleght at gmail.com>\n"
+"Language-Team: Spanish Spanish Localization <debian-l10n-spanish at lists."
+"debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Privado"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Invitar a"
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Voz"
+
+#~ msgid "Devoice"
+#~ msgstr "Quitar Voz"
+
+#~ msgid "Kick"
+#~ msgstr "Patada"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Patada + Ban"
+
+#~ msgid "Ban"
+#~ msgstr "Ban"
+
+#~ msgid "Unban"
+#~ msgstr "Quitar Ban"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Versión"
+
+#~ msgid "Time"
+#~ msgstr "Hora"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Información de Usuario"
diff --git a/po-Frontend-GNOME-XMPP/es_AR.po b/po-Frontend-GNOME-XMPP/es_AR.po
new file mode 100644
index 0000000..85f86be
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/es_AR.po
@@ -0,0 +1,61 @@
+# Smuxi - IRC client for sophisticated users
+# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
+# This file is distributed under the same license as the Smuxi package.
+# Juan Miguel Carrero <streinleght at gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.6.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Damian Kleiman <osiservicios at fibertel.com.ar>\n"
+"Language-Team: Spanish Spanish Localization <debian-l10n-spanish at lists."
+"debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Privado"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr ""
+
+#~ msgid "Op"
+#~ msgstr "Op"
+
+#~ msgid "Deop"
+#~ msgstr "Deop"
+
+#~ msgid "Voice"
+#~ msgstr "Voz"
+
+#~ msgid "Devoice"
+#~ msgstr "Quitar Voz"
+
+#~ msgid "Kick"
+#~ msgstr "Patada"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Patada + Ban"
+
+#~ msgid "Ban"
+#~ msgstr "Ban"
+
+#~ msgid "Unban"
+#~ msgstr "Quitar Ban"
diff --git a/po-Frontend-GNOME-XMPP/fr.po b/po-Frontend-GNOME-XMPP/fr.po
new file mode 100644
index 0000000..491eb93
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/fr.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-11-30 04:12+0000\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Chat privé"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Inviter à"
+
+#~ msgid "Op"
+#~ msgstr "Opper"
+
+#~ msgid "Deop"
+#~ msgstr "Enlever l'Op"
+
+#~ msgid "Voice"
+#~ msgstr "Voicer"
+
+#~ msgid "Devoice"
+#~ msgstr "Enlever le Voice"
+
+#~ msgid "Kick"
+#~ msgstr "Kicker"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Kicker + Bannir"
+
+#~ msgid "Ban"
+#~ msgstr "Bannir"
+
+#~ msgid "Unban"
+#~ msgstr "Enlever le ban"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Version"
+
+#~ msgid "Time"
+#~ msgstr "Temps"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Userinfo"
diff --git a/po-Frontend-GNOME-XMPP/hr.po b/po-Frontend-GNOME-XMPP/hr.po
new file mode 100644
index 0000000..0444859
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/hr.po
@@ -0,0 +1,82 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+#   <tty at live.nl>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2012-01-08 08:23+0000\n"
+"Last-Translator: Matias M. <tty at live.nl>\n"
+"Language-Team: Croatian (http://www.transifex.net/projects/p/smuxi/team/"
+"hr/)\n"
+"Language: hr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois naredba"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Upit"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Pozovi u"
+
+#~ msgid "Op"
+#~ msgstr "Dodijeli Op"
+
+#~ msgid "Deop"
+#~ msgstr "Oduzmi Op"
+
+#~ msgid "Voice"
+#~ msgstr "Dodijeli Voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Oduzmi Voice"
+
+#~ msgid "Kick"
+#~ msgstr "Izbaci"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Izbaci + zabrani"
+
+#~ msgid "Ban"
+#~ msgstr "Zabrani"
+
+#~ msgid "Unban"
+#~ msgstr "Skini zabranu"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Inačica"
+
+#~ msgid "Time"
+#~ msgstr "Vrijeme"
+
+#~ msgid "Finger"
+#~ msgstr "Finger naredba"
+
+#~ msgid "Userinfo"
+#~ msgstr "Userinfo naredba"
diff --git a/po-Frontend-GNOME-XMPP/it.po b/po-Frontend-GNOME-XMPP/it.po
new file mode 100644
index 0000000..47078bd
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/it.po
@@ -0,0 +1,80 @@
+# Smuxi - IRC client for sophisticated users
+# Copyright (C) 2005-2010 Mirco Bauer <meebey at meebey.net>
+# This file is distributed under the same license as the Smuxi package.
+# David Paleino <d.paleino at gmail.com>, 2008.
+#
+# Vincenzo Campanella <vinz65 at gmail.com>, 2009-2010, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: smuxi-frontend-gnome-irc\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-07-15 13:28+0200\n"
+"Last-Translator: Vincenzo Campanella <vinz65 at gmail.com>\n"
+"Language-Team: Italian <tp at lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Whois"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Messaggio privato"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Invita a"
+
+#~ msgid "Op"
+#~ msgstr "Operatore"
+
+#~ msgid "Deop"
+#~ msgstr "Rimuovi l'operatore"
+
+#~ msgid "Voice"
+#~ msgstr "Dai la parola"
+
+#~ msgid "Devoice"
+#~ msgstr "Togli la parola"
+
+#~ msgid "Kick"
+#~ msgstr "Espelli (kick)"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Espelli (kick) e allontana (ban)"
+
+#~ msgid "Ban"
+#~ msgstr "Allontana (ban)"
+
+#~ msgid "Unban"
+#~ msgstr "Rimuovi l'allontanamento (unban)"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Versione"
+
+#~ msgid "Time"
+#~ msgstr "Ora"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Informazioni sull'utente"
diff --git a/po-Frontend-GNOME-XMPP/pl.po b/po-Frontend-GNOME-XMPP/pl.po
new file mode 100644
index 0000000..6f93b71
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/pl.po
@@ -0,0 +1,81 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+#   <lukasznaw at gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2012-01-06 20:01+0000\n"
+"Last-Translator: lukasznaw <lukasznaw at gmail.com>\n"
+"Language-Team: Polish (http://www.transifex.net/projects/p/smuxi/team/pl/)\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2)\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Kim jest"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Zapytanie"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Zaproś na"
+
+#~ msgid "Op"
+#~ msgstr "Daj opa"
+
+#~ msgid "Deop"
+#~ msgstr "Zabierz opa"
+
+#~ msgid "Voice"
+#~ msgstr "Daj voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Zabierz voice"
+
+#~ msgid "Kick"
+#~ msgstr "Wyrzuć z kanału"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Wyrzuć z kanału i zbanuj"
+
+#~ msgid "Ban"
+#~ msgstr "Zbanuj"
+
+#~ msgid "Unban"
+#~ msgstr "Odbanuj"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Wersja"
+
+#~ msgid "Time"
+#~ msgstr "Czas"
+
+#~ msgid "Finger"
+#~ msgstr "Finger - informacje o osobie"
+
+#~ msgid "Userinfo"
+#~ msgstr "Informacje o użytkowniku"
diff --git a/po-Frontend-GNOME-XMPP/pt.po b/po-Frontend-GNOME-XMPP/pt.po
new file mode 100644
index 0000000..ea1f09f
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/pt.po
@@ -0,0 +1,80 @@
+# Translation of smuxi-frontend-gnome-irc messages to Portuguese
+# Copyright (C) 2010 the smuxi's copyright holder
+# This file is distributed under the same license as the smuxi-frontend-gnome-irc package.
+#
+# Américo Monteiro <a_monteiro at netcabo.pt>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: smuxi-frontend-gnome-irc \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-07-15 01:56+0100\n"
+"Last-Translator: Américo Monteiro <a_monteiro at netcabo.pt>\n"
+"Language-Team: Portuguese <traduz at debianpt.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Quem é"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Questionar"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Convidar para"
+
+#~ msgid "Op"
+#~ msgstr "Dar Op"
+
+#~ msgid "Deop"
+#~ msgstr "Retirar Op"
+
+#~ msgid "Voice"
+#~ msgstr "Dar Voz"
+
+#~ msgid "Devoice"
+#~ msgstr "Retirar Voz"
+
+#~ msgid "Kick"
+#~ msgstr "Expulsar"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Expulsar + Banir"
+
+#~ msgid "Ban"
+#~ msgstr "Banir"
+
+#~ msgid "Unban"
+#~ msgstr "Retirar dos Banidos"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Versão"
+
+#~ msgid "Time"
+#~ msgstr "Hora"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Informação do utilizador"
diff --git a/po-Frontend-GNOME-XMPP/ru.po b/po-Frontend-GNOME-XMPP/ru.po
new file mode 100644
index 0000000..f8ff254
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/ru.po
@@ -0,0 +1,62 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: smuxi 0.8\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Urmas <davian818 at gmail.com>\n"
+"Language-Team: None <->\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n%10==1 && n%100!=11 ? 3 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Poedit-Language: Russian\n"
+"X-Poedit-Country: RUSSIAN FEDERATION\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Пригласить"
+
+#~ msgid "Op"
+#~ msgstr "Сделать оператором"
+
+#~ msgid "Deop"
+#~ msgstr "Убрать статус оператора"
+
+#~ msgid "Kick"
+#~ msgstr "Выгнать"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Выгнать и запретить"
+
+#~ msgid "Ban"
+#~ msgstr "Запретить"
+
+#~ msgid "Unban"
+#~ msgstr "Разрешить"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Version"
+#~ msgstr "Версия"
+
+#~ msgid "Time"
+#~ msgstr "Время"
diff --git a/po-Frontend-GNOME-XMPP/sv.po b/po-Frontend-GNOME-XMPP/sv.po
new file mode 100644
index 0000000..c891d46
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/sv.po
@@ -0,0 +1,79 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2010-11-30 04:12+0000\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: Swedish (http://www.transifex.net/projects/p/smuxi/team/sv/)\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "Användarinformation"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "Privat"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "Inbjud till"
+
+#~ msgid "Op"
+#~ msgstr "Gör till operatör"
+
+#~ msgid "Deop"
+#~ msgstr "Ta bort operatörsskap"
+
+#~ msgid "Voice"
+#~ msgstr "Voice"
+
+#~ msgid "Devoice"
+#~ msgstr "Ta bort voice"
+
+#~ msgid "Kick"
+#~ msgstr "Sparka"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "Sparka och stäng ute"
+
+#~ msgid "Ban"
+#~ msgstr "Stäng ute"
+
+#~ msgid "Unban"
+#~ msgstr "Upphäv utestängning"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "Version"
+
+#~ msgid "Time"
+#~ msgstr "Tid"
+
+#~ msgid "Finger"
+#~ msgstr "Finger"
+
+#~ msgid "Userinfo"
+#~ msgstr "Användarinformation"
diff --git a/po-Frontend-GNOME-XMPP/zh_CN.po b/po-Frontend-GNOME-XMPP/zh_CN.po
new file mode 100644
index 0000000..6039721
--- /dev/null
+++ b/po-Frontend-GNOME-XMPP/zh_CN.po
@@ -0,0 +1,81 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Dean Lee <xslidian at gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-19 12:23+0200\n"
+"PO-Revision-Date: 2012-01-07 10:09+0000\n"
+"Last-Translator: Dean Lee <xslidian at gmail.com>\n"
+"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/smuxi/"
+"team/zh_CN/)\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:220
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:51
+msgid "Whois"
+msgstr "详情"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:224
+msgid "Query"
+msgstr "私聊"
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:229
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:55
+msgid "Add To Contacts"
+msgstr ""
+
+#: ../src/Frontend-GNOME-XMPP/XmppGroupChatView.cs:234
+#: ../src/Frontend-GNOME-XMPP/XmppPersonChatView.cs:59
+msgid "Invite to"
+msgstr "邀请加入"
+
+#~ msgid "Op"
+#~ msgstr "设为版主"
+
+#~ msgid "Deop"
+#~ msgstr "撤销版主"
+
+#~ msgid "Voice"
+#~ msgstr "设为认证用户"
+
+#~ msgid "Devoice"
+#~ msgstr "撤销认证用户"
+
+#~ msgid "Kick"
+#~ msgstr "踢除"
+
+#~ msgid "Kick + Ban"
+#~ msgstr "踢除 + 封禁"
+
+#~ msgid "Ban"
+#~ msgstr "封禁"
+
+#~ msgid "Unban"
+#~ msgstr "解封"
+
+#~ msgid "CTCP"
+#~ msgstr "CTCP"
+
+#~ msgid "Ping"
+#~ msgstr "Ping"
+
+#~ msgid "Version"
+#~ msgstr "版本"
+
+#~ msgid "Time"
+#~ msgstr "用户时间"
+
+#~ msgid "Finger"
+#~ msgstr "真实姓名与空闲时间"
+
+#~ msgid "Userinfo"
+#~ msgstr "用户信息"
diff --git a/po-Frontend-GNOME/LINGUAS b/po-Frontend-GNOME/LINGUAS
index 9934fe9..13fc497 100644
--- a/po-Frontend-GNOME/LINGUAS
+++ b/po-Frontend-GNOME/LINGUAS
@@ -11,6 +11,7 @@ hr
 it
 pl
 pt
+pt_BR
 ru
 sv
 zh_CN
diff --git a/po-Frontend-GNOME/POTFILES.skip b/po-Frontend-GNOME/POTFILES.skip
index 8e6fdd8..89e78c1 100644
--- a/po-Frontend-GNOME/POTFILES.skip
+++ b/po-Frontend-GNOME/POTFILES.skip
@@ -3,12 +3,14 @@ src/Common/
 src/Frontend/
 src/Frontend-GNOME/obj/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
 src/Engine/
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
diff --git a/po-Frontend-GNOME/cs.po b/po-Frontend-GNOME/cs.po
index 9c358ad..85e144e 100644
--- a/po-Frontend-GNOME/cs.po
+++ b/po-Frontend-GNOME/cs.po
@@ -1,1041 +1,1221 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-frontend-gnome 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:35+0200\n"
-"PO-Revision-Date: 2010-07-19 12:47+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-19 21:21+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:1
-msgid "<b> Chat </b>"
-msgstr "<b> Chat </b>"
+msgid "Smuxi Preferences"
+msgstr "Nastavení Smuxi"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:2
-msgid "<b> Color </b>"
-msgstr "<b> Barva </b>"
+msgid ""
+"The nickname to use. You can specify extra nicknames (separated by spaces) "
+"which will be used as fallbacks when the first choice is not available. By "
+"default $nick_ and $nick__ will be used as fallbacks."
+msgstr "Použít tuto přezdívku. Můžete zvolit více přezdívek (oddělených mezerami), které se použijí jako náhradní v případě, že první přezdívka nebude dostupná. Ve výchozím nastavení budou použity náhradní přezdívky $nick_ a $nick__."
 
 #: ../glade/smuxi-frontend-gnome.glade.h:3
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1372
-msgid "<b> Entry Field </b>"
-msgstr "<b> Vstupní políčko </b>"
+msgid "Nickname(s):"
+msgstr "Přezdívka(y)"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:4
-msgid "<b> Font </b>"
-msgstr "<b> Písmo </b>"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:315
+msgid "Username:"
+msgstr "Uživatelské jméno:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:5
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1702
-msgid "<b> Highlighting </b>"
-msgstr "<b> Zvýraznění </b>"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:338
+msgid "Realname:"
+msgstr "Skutečné jméno:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:6
-msgid "<b> Notification Area Icon </b>"
-msgstr "<b> Ikona oznamovací oblasti </b>"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:359
+msgid "Encoding:"
+msgstr "Kódování:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
-msgid "<b> Person List Position </b>"
-msgstr "<b> Umístění seznamu osob </b>"
+msgid "Automatically convert UTF-8 characters"
+msgstr "Automaticky převádět znaky UTF-8"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:8
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1209
-msgid "<b> Tab Colors </b>"
-msgstr "<b> Barvy záložek </b>"
+msgid "<b>General</b>"
+msgstr "<b>Obecné</b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:9
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1110
-msgid "<b> Tabs Position </b>"
-msgstr "<b> Umístění záložek </b>"
+msgid "Type:"
+msgstr "Druh:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:10
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1515
-msgid "<b> Topic Position </b>"
-msgstr "<b> Umístění témata </b>"
+msgid "Host:"
+msgstr "Hostitel:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:11
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1161
-msgid "Activity"
-msgstr "Aktivita"
+msgid "Password:"
+msgstr "Heslo:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:12
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:107
-msgid "Automatically connect to server at startup"
-msgstr "Po spuštění se automaticky připojit k serveru"
+msgid "Port:"
+msgstr "Port:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:13
-msgid "Background"
-msgstr "Pozadí"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
+msgid "Show Password"
+msgstr "Ukázat heslo"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:14
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1360
-msgid "Bash-Style Completion"
-msgstr "Dokončování ve stylu Bash"
+msgid "<b>Network Proxy</b>"
+msgstr "<b>Síťový proxy</b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:15
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1690
-msgid "Beep on highlight"
-msgstr "Pípnout při zvýraznění"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
+msgid "On Connect Commands:"
+msgstr "Příkazy při připojení:"
 
-#. Container child vbox6.Gtk.Box+BoxChild
-#. Container child vbox11.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:16
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:980
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1002
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1461
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1486
-msgid "Bottom"
-msgstr "Dole"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
+msgid "On Startup Commands:"
+msgstr "Příkazy při spuštění:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:17
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:746
-msgid "Buffer Lines:"
-msgstr "Pamatovat si řádky:"
+msgid "<b>Global Commands</b>"
+msgstr "<b>Globální příkazy</b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:18
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:671
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "_Připojení"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:19
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1312
-msgid "Command Character:"
-msgstr "Znak příkazu:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
+msgid "Timestamp Format:"
+msgstr "Formát času:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:20
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
-msgid "Command History Size:"
-msgstr "Velikost historie příkazů:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
+msgid "Buffer Lines:"
+msgstr "Pamatovat si řádky:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:21
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1292
-msgid "Completion Character:"
-msgstr "Znak dokončování:"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:22
-msgid "Enable"
-msgstr "Povolit"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:23
-msgid "Enabled"
-msgstr "Povoleno"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:24
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:559
-msgid "Encoding:"
-msgstr "Kódování:"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:25
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:769
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "Pamatovat si řádky enginu:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:26
-msgid "Foreground"
-msgstr "Popředí"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:27
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:925
-msgid "General"
-msgstr "Obecné"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:28
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
-msgid "Highlight"
-msgstr "Zvýraznit"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:29
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1666
-msgid "Highlight words:"
-msgstr "Zvýraznit slova:"
-
-#: ../glade/smuxi-frontend-gnome.glade.h:30
-msgid "Hostname:"
-msgstr "Hostitel:"
+#: ../glade/smuxi-frontend-gnome.glade.h:22
+msgid ""
+"ss = seconds\n"
+"mm = minutes\n"
+"hh = hours (01 - 12)\n"
+"HH = hours (00 - 23)\n"
+"tt = AM/PM\n"
+"\n"
+"dd = day\n"
+"MM = month\n"
+"yy/yyyy = year"
+msgstr "ss = sekundy\nmm = minuty\nhh = hodiny (01 - 12)\nHH = hodiny (00 - 23)\ntt = Dopoledne/Odpoledne\n\ndd = den\nMM = měsíc\nyy/yyyy = rok"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:31
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1381
-msgid "Input"
-msgstr "Vstup"
+msgid "Persistency Type:"
+msgstr "Druh ukládání:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:32
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1171
-msgid "Join/Part/Mode"
-msgstr "Join/Part/Mode"
+msgid "Volatile Buffer Lines:"
+msgstr "Počet dočasných řádků v bufferu:"
 
-#. Container child vbox6.Gtk.Box+BoxChild
-#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:33
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1016
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1041
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1535
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1561
-msgid "Left"
-msgstr "Vlevo"
+msgid "Persistent Buffer Lines:"
+msgstr "Počet trvalých řádků v bufferu:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:34
-msgid "Log Filtered Messages"
-msgstr "Uchovávat filtrované zprávy"
+msgid "<b>Message Buffer</b>"
+msgstr "<b>Buffer zpráv</b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:35
-msgid "Network:"
-msgstr "Síť:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
+msgid "Strip Colors"
+msgstr "Barevný proužek"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:36
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1402
-msgid "Nick Colors"
-msgstr "Barvy přezdívek"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
+msgid "Strip Formattings"
+msgstr "Formátování proužku"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:37
-msgid "Nickname(s):"
-msgstr "Přezdívka(y)"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
+msgid "Strip UTF-8"
+msgstr "Proužek v UTF-8"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:38
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1153
-msgid "No Activity"
-msgstr "Žádná aktivita"
+msgid "Show Advanced Settings"
+msgstr "Zobrazit pokročilá nastavení"
 
-#. Container child vbox6.Gtk.Box+BoxChild
-#. Container child vbox11.Gtk.Box+BoxChild
-#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:39
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1096
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1501
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1616
-msgid "None"
-msgstr "Žádné"
+msgid "<b>Advanced</b>"
+msgstr "<b>Pokročilé</b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:40
-msgid "Notification"
-msgstr "Upozornění"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
+msgid "General"
+msgstr "Obecné"
 
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:41
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:581
-msgid "On Connect Commands:"
-msgstr "Příkazy při připojení:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1246
+msgid "Top"
+msgstr "Nahoře"
 
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:42
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:627
-msgid "On Startup Commands:"
-msgstr "Příkazy při spuštění:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1286
+msgid "Bottom"
+msgstr "Dole"
 
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:43
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1714
-msgid "Output"
-msgstr "Výstup"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1361
+msgid "Left"
+msgstr "Vlevo"
 
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:44
-msgid "Override"
-msgstr "Potlačit"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1401
+msgid "Right"
+msgstr "Vpravo"
 
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:45
-msgid "Password:"
-msgstr "Heslo:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
+msgid "None"
+msgstr "Žádné"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:46
-msgid "Port:"
-msgstr "Port:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
+msgid "<b> Tabs Position </b>"
+msgstr "<b> Umístění záložek </b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:47
-msgid "Protocol:"
-msgstr "Protokol:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
+msgid "Highlight"
+msgstr "Zvýraznit"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:48
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:538
-msgid "Realname:"
-msgstr "Skutečné jméno:"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
+msgid "Activity"
+msgstr "Aktivita"
 
-#. Container child vbox6.Gtk.Box+BoxChild
-#. Container child vbox12.Gtk.Box+BoxChild
 #: ../glade/smuxi-frontend-gnome.glade.h:49
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1056
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1081
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1576
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1601
-msgid "Right"
-msgstr "Vpravo"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
+msgid "No Activity"
+msgstr "Žádná aktivita"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:50
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:195
-msgid "Show Password"
-msgstr "Ukázat heslo"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
+msgid "Join/Part/Mode"
+msgstr "Join/Part/Mode"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:51
-msgid "Show always"
-msgstr "Ukazovat vždy"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
+msgid "<b> Tab Colors </b>"
+msgstr "<b> Barvy záložek </b>"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:52
-msgid "Show when window is closed"
-msgstr "Ukázat když je okno zavřeno"
+msgid "Automatically switch to newly opened person chats"
+msgstr "Automaticky přepnout k nově otevřeným chatům s jednotlivci"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:53
-msgid "Show when window is minimized"
-msgstr "Ukázat když je okno minimalizováno"
+msgid "Automatically switch to newly opened group chats"
+msgstr "Automaticky přepnout k nově otevřeným skupinovým chatům"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:54
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:406
-msgid "Smuxi - Preferences"
-msgstr "Smuxi - Předvolby"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
+msgid "Tabs"
+msgstr "Záložky"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:55
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:26
-msgid "Smuxi - Server"
-msgstr "Smuxi - Server"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
+msgid "Completion Character:"
+msgstr "Znak dokončování:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:56
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:828
-msgid "Strip Colors"
-msgstr "Barevný proužek"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
+msgid "Command Character:"
+msgstr "Znak příkazu:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
+msgid "Command History Size:"
+msgstr "Velikost historie příkazů:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
+msgid "Bash-Style Completion"
+msgstr "Dokončování ve stylu Bash"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
+msgid "<b> Entry Field </b>"
+msgstr "<b> Vstupní políčko </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
+msgid "Input"
+msgstr "Vstup"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
+msgid "Nick Colors"
+msgstr "Barvy přezdívek"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:62
+msgid "<b> Person List Position </b>"
+msgstr "<b> Umístění seznamu osob </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:63
+msgid "Override"
+msgstr "Potlačit"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:64
+msgid "<b> Font </b>"
+msgstr "<b> Písmo </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
+msgid "<b> Topic Position </b>"
+msgstr "<b> Umístění témata </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:66
+msgid "Foreground"
+msgstr "Popředí"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:67
+msgid "Background"
+msgstr "Pozadí"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:68
+msgid "<b> Color </b>"
+msgstr "<b> Barva </b>"
+
+#. This is a setting for character based line wrapping vs word based when
+#. showing messages
+#: ../glade/smuxi-frontend-gnome.glade.h:70
+msgid "_Wrap Mode:"
+msgstr "Režim zalamování:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:71
+msgid "<b> Chat </b>"
+msgstr "<b> Chat </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
+msgid "Highlight words:"
+msgstr "Zvýraznit slova:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
+msgid "Beep on highlight"
+msgstr "Pípnout při zvýraznění"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
+msgid "<b> Highlighting </b>"
+msgstr "<b> Zvýraznění </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
+msgid "Output"
+msgstr "Výstup"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:76
+msgid "Enable"
+msgstr "Povolit"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:77
+msgid "Show always"
+msgstr "Ukazovat vždy"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:78
+msgid "Show when window is minimized"
+msgstr "Ukázat když je okno minimalizováno"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:79
+msgid "Show when window is closed"
+msgstr "Ukázat když je okno zavřeno"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:80
+msgid "<b> Notification Area Icon </b>"
+msgstr "<b> Ikona oznamovací oblasti </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:867
-msgid "Strip Formattings"
-msgstr "Formátování proužku"
+#: ../glade/smuxi-frontend-gnome.glade.h:81
+msgid "Show Smuxi in the messaging menu"
+msgstr "Zobrazit Smuxi v nabídce zpráv"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:907
-msgid "Strip UTF-8"
-msgstr "Proužek v UTF-8"
+#: ../glade/smuxi-frontend-gnome.glade.h:82
+msgid "<b>Messaging Menu</b>"
+msgstr "<b>Nabídka zpráv</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1222
-msgid "Tabs"
-msgstr "Záložky"
+#: ../glade/smuxi-frontend-gnome.glade.h:83
+msgid "Show notification popups"
+msgstr "Zobrazit vyskakovací upozornění"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
-msgid ""
-"The nickname to use. You can specify extra nicknames (separated by spaces) "
-"which will be used as fallbacks when the first choice is not available. By "
-"default $nick_ and $nick__ will be used as fallbacks."
-msgstr ""
-"Použít tuto přezdívku. Můžete zvolit více přezdívek (oddělených mezerami), "
-"které se použijí jako náhradní v případě, že první přezdívka nebude "
-"dostupná. Ve výchozím nastavení budou použity náhradní přezdívky $nick_ a "
-"$nick__."
+#: ../glade/smuxi-frontend-gnome.glade.h:84
+msgid "<b>Notification Popups</b>"
+msgstr "<b>Vyskakovací upozornění</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:726
-msgid "Timestamp Format:"
-msgstr "Formát času:"
+#: ../glade/smuxi-frontend-gnome.glade.h:85
+msgid "Notification"
+msgstr "Upozornění"
 
-#. Container child vbox6.Gtk.Box+BoxChild
-#. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:62
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:943
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:967
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1420
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1446
-msgid "Top"
-msgstr "Nahoře"
+#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
+msgid "_Interface"
+msgstr "Vzhled"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:515
-msgid "Username:"
-msgstr "Uživatelské jméno:"
+#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
+msgid "_Servers"
+msgstr "_Servery"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1881
+#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "_Filtry"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1723
-msgid "_Interface"
-msgstr "Vzhled"
+#: ../glade/smuxi-frontend-gnome.glade.h:89
+msgid "Enabled"
+msgstr "Povoleno"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:90
+msgid "Log Filtered Messages"
+msgstr "Uchovávat filtrované zprávy"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "Přihlašování"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1789
-msgid "_Servers"
-msgstr "_Servery"
+#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
+msgid "Smuxi - Server"
+msgstr "Smuxi - Server"
 
-#. This is a setting for character based line wrapping vs word based when showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
-msgid "_Wrap Mode:"
-msgstr "Režim zalamování:"
+#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
+msgid "Automatically connect to server at startup"
+msgstr "Po spuštění se automaticky připojit k serveru"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
-msgid ""
-"ss = seconds\n"
-"mm = minutes\n"
-"hh = hours (01 - 12)\n"
-"HH = hours (00 - 23)\n"
-"tt = AM/PM\n"
-"\n"
-"dd = day\n"
-"MM = month\n"
-"yy/yyyy = year"
-msgstr ""
-"ss = sekundy\n"
-"mm = minuty\n"
-"hh = hodiny (01 - 12)\n"
-"HH = hodiny (00 - 23)\n"
-"tt = Dopoledne/Odpoledne\n"
-"\n"
-"dd = den\n"
-"MM = měsíc\n"
-"yy/yyyy = rok"
+#: ../glade/smuxi-frontend-gnome.glade.h:94
+msgid "Protocol:"
+msgstr "Protokol:"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:52
-msgid "translator-credits"
-msgstr "Michal Simunek <michal.simunek at gmail.com>"
+#: ../glade/smuxi-frontend-gnome.glade.h:95
+msgid "Network:"
+msgstr "Síť:"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:47
-msgid "German"
-msgstr "Němčina"
+#: ../glade/smuxi-frontend-gnome.glade.h:96
+msgid "Hostname:"
+msgstr "Hostitel:"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:48
-msgid "Spanish"
-msgstr "Španělština"
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:1
+msgid "Smuxi"
+msgstr "Smuxi"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:49
-msgid "British English"
-msgstr "Britská angličtina"
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:2
+msgid "IRC Chat"
+msgstr "IRC Chat"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:50
-msgid "French"
-msgstr "Francouzština"
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:3
+msgid "Smuxi IRC Client"
+msgstr "Smuxi klient IRC"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:51
-msgid "Italian"
-msgstr "Italština"
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:4
+msgid "Chat with other people on IRC"
+msgstr "Chatujte s jinými lidmi na IRC"
+
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
+msgid "translator-credits"
+msgstr "Michal Simunek <michal.simunek at gmail.com>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:54
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Web Smuxi"
 
-#: ../src/Frontend-GNOME/CrashDialog.cs:44
+#: ../src/Frontend-GNOME/CrashDialog.cs:46
 msgid "Oops, I did it again..."
 msgstr "Hups, zkouším to znovu..."
 
-#: ../src/Frontend-GNOME/CrashDialog.cs:57
+#: ../src/Frontend-GNOME/CrashDialog.cs:59
 msgid "Smuxi crashed because an unhandled exception was thrown!"
 msgstr "Smuxi spadl, protože obdržel nezpracovatelný požadavek!"
 
-#: ../src/Frontend-GNOME/CrashDialog.cs:61
+#: ../src/Frontend-GNOME/CrashDialog.cs:63
 msgid "Here is the stacktrace, please report this bug!"
 msgstr "Zde je výpis, nahlaste prosím tuto chybu!"
 
-#: ../src/Frontend-GNOME/CrashDialog.cs:81
+#: ../src/Frontend-GNOME/CrashDialog.cs:83
 msgid "_Report Bug"
 msgstr "_Nahlásit chybu"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:61
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:66
+msgid "Engine not found."
+msgstr "Engine nenalezen."
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:81
 msgid "Engine Manager"
 msgstr "Správce enginu"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:68
-msgid "_Connect"
-msgstr "Při_pojit"
-
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:78
-msgid "_Edit"
-msgstr "_Upravit"
-
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:90
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:100
 msgid "Select which Smuxi engine you want to connect to"
 msgstr "Vyberte engine Smuxi ke kterému se chcete připojit"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:96
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:106
 msgid "Engine:"
 msgstr "Engine:"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:122
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:182
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:359
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:117
+msgid "Use Low Bandwidth Mode"
+msgstr "Použít režim pomalého spojení"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:141
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:201
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:383
 msgid "Local Engine"
 msgstr "Místní engine"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:174
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:193
 msgid "Please select an engine!"
 msgstr "Vyberte si prosím engine!"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:195
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:219
 #, csharp-format
 msgid "Your frontend version ({0}) does not match the engine version ({1})!"
 msgstr "Verze rozhraní ({0}) neodpovídá verzi enginu ({1})!"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:222
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:246
 msgid "An error occurred while connecting to the engine!"
 msgstr "Během připojování k enginu se vyskytla chyba!"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:223
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:247
 #, csharp-format
 msgid "Engine URL: {0}"
 msgstr "Adresa enginu: {0}"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:226
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:250
 #, csharp-format
 msgid "Error: {0}"
 msgstr "Chyba: {0}"
 
-#: ../src/Frontend-GNOME/EngineManagerDialog.cs:296
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:320
 #, csharp-format
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "Opravdu si přejete odstranit engine \"{0}\"?"
 
-#: ../src/Frontend-GNOME/Entry.cs:403
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
 msgstr "Chystáte se vložit {0} řádků. Chcete pokračovat?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:506
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "Příkazy rozhraní"
 
-#: ../src/Frontend-GNOME/MainWindow.cs:186
-msgid "_File"
-msgstr "_Soubor"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:202
-msgid "_Server"
-msgstr "S_erver"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:206
-msgid "_Quick Connect"
-msgstr "_Rychlé připojení"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:217
-msgid "_Manage"
-msgstr "Spr_avovat"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:224
-msgid "_Chat"
-msgstr "_Chat"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:228
-msgid "Open / Join Chat"
-msgstr "Otevřít / Připojit se k Chatu"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:233
-msgid "_Find Group Chat"
-msgstr "_Najít skupinový chat"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:238
-msgid "C_lear All Activity"
-msgstr "_Vyprázdnit všechnu aktivitu"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:245
-msgid "_Next Chat"
-msgstr "_Další Chat"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:255
-msgid "_Previous Chat"
-msgstr "Předcho_zí Chat"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:307
-msgid "_Engine"
-msgstr "_Engine"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:311
-msgid "_Use Local Engine"
-msgstr "Po_užit místní engine"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:317
-msgid "_Add Remote Engine"
-msgstr "Př_idat vzdálený engine"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:322
-msgid "_Switch Remote Engine"
-msgstr "Přepnou_t vzdálený engine"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:329
-msgid "_View"
-msgstr "Zo_brazit"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:333
-msgid "_Caret Mode"
-msgstr "Z_nakový režim"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:343
-msgid "_Help"
-msgstr "Nápo_věda"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:567
-#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:222
-msgid "Unable to add server: "
-msgstr "Nelze přidat server: "
-
-#: ../src/Frontend-GNOME/MainWindow.cs:614
-#, csharp-format
-msgid "Unknown ChatType: {0}"
-msgstr "Neznámý typ chatu: {0}"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:822
-msgid ""
-"Switching to local engine will disconnect you from the current engine!\n"
-"Are you sure you want to do this?"
-msgstr ""
-"Přepnutím na místní engine se odpojíte od aktuálního enginu!\n"
-"Opravdu si přejete pokračovat?"
-
-#: ../src/Frontend-GNOME/MainWindow.cs:864
-msgid ""
-"Switching the remote engine will disconnect you from the current engine!\n"
-"Are you sure you want to do this?"
-msgstr ""
-"Přepnutím na vzdálený engine se odpojíte od aktuálního enginu!\n"
-"Opravdu si přejete pokračovat?"
-
 #: ../src/Frontend-GNOME/NotImplementedMessageDialog.cs:40
 msgid "Sorry, not implemented yet!"
 msgstr "Promiňte, ještě není podporováno!"
 
 #. fill ListStore
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:162
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:185
 msgid "Character"
 msgstr "Znak"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:163
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:186
 msgid "Word"
 msgstr "Slovo"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:173
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:139
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:203
+msgid "Volatile"
+msgstr "dočasný"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:205
+msgid "Persistent"
+msgstr "stálý"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:228
+msgid "No Proxy"
+msgstr "Nepoužívat proxy"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
+msgid "System Default"
+msgstr "Podle systému"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:244
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:140
 msgid "Connection"
 msgstr "Připojení"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:177
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:248
 msgid "Interface"
 msgstr "Vzhled"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:181
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:252
 msgid "Servers"
 msgstr "Servery"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:185
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:259
 msgid "Filters"
 msgstr "Filtry"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:189
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:263
 msgid "Logging"
 msgstr "Přihlašování"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:238
-msgid "System Default"
-msgstr "Podle systému"
-
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:505
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "Políčko Přezdívka(y) nemůže být prázdné."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:649
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "Neplatný výraz pro zvýraznění: '{0}'. Příčina: {1}"
 
-#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:69
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:105
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:271
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:81
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:106
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:265
 msgid "Name"
 msgstr "Název"
 
-#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:74
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:86
 msgid "Topic"
 msgstr "Téma"
 
-#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:102
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:115
 msgid ""
-"Searching for group chats without a filter is not recommended.  This may "
-"take a while, or may not work at all.\n"
+"Searching for group chats without a filter is not recommended.  This may take a while, or may not work at all.\n"
 "Do you wish to continue?"
-msgstr ""
-"Vyhledávání skupinových chatů bez filtru není doporučeno.  Nemusí vždy "
-"fungovat, nebo zabere hodně času.\n"
-"Přejete si pokračovat?"
+msgstr "Vyhledávání skupinových chatů bez filtru není doporučeno.  Nemusí vždy fungovat, nebo zabere hodně času.\nPřejete si pokračovat?"
 
-#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:143
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:156
 msgid "Error while fetching the list of group chats from the server."
 msgstr "Chyba při přijmu seznamu skupinových chatů ze serveru."
 
-#: ../src/Frontend-GNOME/Frontend.cs:394
+#: ../src/Frontend-GNOME/Frontend.cs:401
+msgid "Disconnected from engine."
+msgstr "Odpojen od enginu."
+
+#: ../src/Frontend-GNOME/Frontend.cs:443
+#, csharp-format
+msgid "Reconnecting to engine... (attempt {0})"
+msgstr "Obnovuji připojení k enginu... (pokus {0})"
+
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "Způsobeno: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:464
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
-msgstr ""
-"Rozhraní ztratilo spojení se serverem.\n"
-"Chcete se nyní znovu připojit?"
+msgstr "Rozhraní ztratilo spojení se serverem.\nChcete se nyní znovu připojit?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:479
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
-msgstr ""
-"Opětovné připojení k serveru selhalo.\n"
-"Chcete to zkusit znovu?"
+msgstr "Opětovné připojení k serveru selhalo.\nChcete to zkusit znovu?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:580
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
-msgstr ""
-"Server ztratil spojení s rozhraním.\n"
-"Chcete se nyní znovu připojit?"
+msgstr "Server ztratil spojení s rozhraním.\nChcete se nyní znovu připojit?"
 
-#: ../src/Frontend-GNOME/QuickConnectDialog.cs:62
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:238
+#: ../src/Frontend-GNOME/NotifyManager.cs:336
+msgid "Show"
+msgstr "Zobrazit"
+
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:58
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:233
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:70
 msgid "Protocol"
 msgstr "Protokol"
 
-#: ../src/Frontend-GNOME/QuickConnectDialog.cs:63
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:59
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:71
 msgid "Hostname"
 msgstr "Hostitel"
 
-#: ../src/Frontend-GNOME/QuickConnectDialog.cs:166
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:162
 msgid "Unable to load server: "
 msgstr "Nelze nahrát server: "
 
 #: ../src/Frontend-GNOME/ChatTypeWidget.cs:54
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:244
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:239
 msgid "Person / Private"
 msgstr "Osobní / Soukromý"
 
 #: ../src/Frontend-GNOME/ChatTypeWidget.cs:55
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:245
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:240
 msgid "Group / Public"
 msgstr "Skupinový / Veřejný"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:70
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:71
 msgid "Engine Assistant - Smuxi"
 msgstr "Asistent enginu - Smuxi"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:92
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:93
 msgid "Add Smuxi Engine"
 msgstr "Přidat engine Smuxi"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:94
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:95
 msgid "Edit Smuxi Engine"
 msgstr "Upravit engine Smuxi"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:203
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:204
 msgid "Credentials"
 msgstr "Kredity"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:265
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:284
 msgid "Now you can use the Smuxi Engine"
 msgstr "Nyní můžete používat tento engine Smuxi"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:268
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:287
 msgid "Thank you"
 msgstr "Děkujeme"
 
-#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:285
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:304
 msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "Engine s tímto názvem již existuje. Zadejte prosím jiný název."
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:182
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
+msgid "Enter which chat to join"
+msgstr "Zadejte se kterým chatem se připojit"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+msgid "About Smuxi"
+msgstr "O Smuxi"
+
+#. TODO: add cmd+, accelerator
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
+msgid "Preferences"
+msgstr "Nastavení"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
+msgid "Unable to add server: "
+msgstr "Nelze přidat server: "
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
+msgid ""
+"Switching to local engine will disconnect you from the current engine!\n"
+"Are you sure you want to do this?"
+msgstr "Přepnutím na místní engine se odpojíte od aktuálního enginu!\nOpravdu si přejete pokračovat?"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
+msgid ""
+"Switching the remote engine will disconnect you from the current engine!\n"
+"Are you sure you want to do this?"
+msgstr "Přepnutím na vzdálený engine se odpojíte od aktuálního enginu!\nOpravdu si přejete pokračovat?"
+
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
+#, csharp-format
+msgid "Day changed from {0} to {1}"
+msgstr "Den se změnil z {0} v {1}"
+
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "Den změněn na {0}"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:123
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:133
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:120
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:130
 #, csharp-format
 msgid "Invalid filter regex: '{0}'. Reason: {1}"
 msgstr "Neplatný výraz pro filtr: '{0}'. Příčina: {1}"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:200
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:197
 msgid "Are you sure you want to delete the selected filter?"
 msgstr "Opravdu si přejete smazat vybraný filtr?"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:246
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:241
 msgid "Protocol / Server"
 msgstr "Protokol / Server"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:253
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:248
 msgid "Chat Type"
 msgstr "Typ chatu"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:287
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:281
 msgid "Normal"
 msgstr "Normální"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:288
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:282
 msgid "Event"
 msgstr "Událost"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:295
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:289
 msgid "Type"
 msgstr "Typ"
 
-#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:321
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:314
 msgid "Pattern"
 msgstr "Vzor"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:241
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
+msgid "Low Bandwidth Mode is active: no messages synced."
+msgstr "Režim pomalého spojení je aktivní: nesynchronizuji zprávy."
+
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
+msgid "Show _Menubar"
+msgstr "Zobrazit _nabídky"
+
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "Přijímání seznamu uživatelů pro {0}..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:286
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "hotovo."
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:301
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "Osoba"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:68
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Opět se připojit"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
-msgstr ""
-"Zavření tohoto chatového protokolu také zavře všechny otevřené chaty na něm "
-"připojené!\n"
-"Opravdu si přejete pokračovat?"
+msgstr "Zavření tohoto chatového protokolu také zavře všechny otevřené chaty na něm připojené!\nOpravdu si přejete pokračovat?"
 
-#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:184
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:189
 msgid "Are you sure you want to delete the selected server?"
 msgstr "Opravdu si přejete smazat vybraný server?"
 
-#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:240
-#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:274
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:245
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:279
 msgid "Unable to edit server: "
 msgstr "Nelze upravit server: "
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:42
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:24
 msgid "Find"
 msgstr "Najít"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:62
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:44
 msgid "_Search for:"
 msgstr "_Hledat:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:91
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:73
 msgid "_Match Case"
 msgstr "_Výsledky"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:103
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:85
 msgid "Search _Backwards"
 msgstr "Hledat pozpát_ku"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:115
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:97
 msgid "_Wrap Around"
 msgstr "Přenášet te_xt"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:128
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:110
 msgid "Use _Regular Expressions"
 msgstr "Použít re_gulární výrazy"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:40
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:23
 msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - Najít skupinový chat"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:64
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:87
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "_Název:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:32
-msgid "Smuxi - Quick Connect"
-msgstr "Smuxi - Rychlé připojení"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.JoinWidget.cs:69
+msgid "Join"
+msgstr "Vstoupit"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:55
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:56
+msgid "_Smuxi"
+msgstr "_Smuxi"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:58
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:59
+msgid "_Server"
+msgstr "S_erver"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:62
+msgid "_Chat"
+msgstr "_Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:64
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:65
+msgid "_Engine"
+msgstr "_Engine"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:67
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:68
+msgid "_View"
+msgstr "Zo_brazit"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:70
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:71
+msgid "_Help"
+msgstr "Nápo_věda"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:73
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:75
+msgid "Connect"
+msgstr "Spojit se"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+msgid "Open Log"
+msgstr "Otevřít protokol"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:87
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:88
+msgid "_Preferences"
+msgstr "_Nastavení"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:90
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:91
+msgid "_Quit"
+msgstr "_Ukončit"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:93
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:94
+msgid "_Connect"
+msgstr "_Spojit se"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:96
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:97
+msgid "_Add"
+msgstr "_Přidat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:99
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:100
+msgid "_Manage"
+msgstr "Spr_avovat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:102
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:103
+msgid "_Open / Join Chat"
+msgstr "_Otevřít / vstoupit do chatu"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:105
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:106
+msgid "_Find Group Chat"
+msgstr "_Najít skupinový chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:108
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:109
+msgid "C_lear All Activity"
+msgstr "_Vyprázdnit všechnu aktivitu"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:111
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:112
+msgid "_Next Chat"
+msgstr "_Další Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:114
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:115
+msgid "_Previous Chat"
+msgstr "Předcho_zí Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:117
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:118
+msgid "_Close"
+msgstr "_Zavřít"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:120
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:121
+msgid "_Use Local Engine"
+msgstr "Po_užit místní engine"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:123
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:124
+msgid "_Add Remote Engine"
+msgstr "Př_idat vzdálený engine"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:126
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:127
+msgid "Switch Remote Engine"
+msgstr "Připojit se k jinému vzdálenému enginu"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:129
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:130
+msgid "_Caret Mode"
+msgstr "Z_nakový režim"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:132
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:133
+msgid "_Browse Mode"
+msgstr "Mód _prohledávání"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:138
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:139
+msgid "Show _Statusbar"
+msgstr "Zobrazit _stavový řádek"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
+msgid "_Fullscreen"
+msgstr "_Plná obrazovka"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
+msgid "_About"
+msgstr "_O Smuxi"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
+msgid "Find Group Chat"
+msgstr "Najít skupinový chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+msgid "_Website"
+msgstr "_Webová stránka"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "Zobrazit _panel nástrojů"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
+msgid "Smuxi - Connect"
+msgstr "Smuxi - Spojení"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:206
+msgid "Smuxi - Preferences"
+msgstr "Smuxi - Předvolby"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:495
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:295
 msgid "Nicknames:"
 msgstr "Přezdívky:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1630
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1430
 msgid "<b> User List Position </b>"
 msgstr "<b> Umístění seznamu uživatelů </b>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1641
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1441
 msgid "<b> Channel </b>"
 msgstr "<b> Kanál </b>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1852
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1652
 msgid "<b>Channel Filters</b>"
 msgstr "<b>Filtry kanálů</b>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1869
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1669
 msgid "<b>User Filters</b>"
 msgstr "<b>Filtry uživatelů</b>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:64
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:42
 msgid "Use _SSH Tunnel"
 msgstr "Použít tunel _SSH"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:78
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:56
 msgid ""
 "<span size=\"small\">Enables the use of SSH for the connection.  This has a "
 "small performance impact, but is more secure and required when using NAT or "
 "port-based firewalls</span>"
-msgstr ""
-"<span size=\"small\">Povolí používat SSH pro toto připojení.  To má malý "
-"dopad na výkon, ale je to mnohem bezpečnější a je potřeba pokud používáte "
-"NAT nebo firewally založené na portech</span>"
+msgstr "<span size=\"small\">Povolí používat SSH pro toto připojení.  To má malý dopad na výkon, ale je to mnohem bezpečnější a je potřeba pokud používáte NAT nebo firewally založené na portech</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:135
 msgid "SSH _Host:"
 msgstr "_Hostitel SSH:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:168
-msgid ""
-"<span size=\"small\">DNS or IP address and port of the SSH server</span>"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:146
+msgid "<span size=\"small\">DNS or IP address and port of the SSH server</span>"
 msgstr "<span size=\"small\">DNS nebo IP adresa a port SSH serveru</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:181
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:195
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:159
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:173
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:129
 msgid "_Port:"
 msgstr "_Port:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:208
-msgid ""
-"<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:186
+msgid "<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
 msgstr "<span size=\"small\">DNS nebo IP adresa a port serveru Smuxi</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:221
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:199
 msgid "_Smuxi Host:"
 msgstr "Hostitel _Smuxi:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:76
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:52
 msgid "_SSH Username: (optional)"
 msgstr "_SSH uživatelské jméno: (volitelné)"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:99
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:75
 msgid ""
-"<span size=\"small\">Username which will be used to log into the SSH server</"
-"span>"
-msgstr ""
-"<span size=\"small\">Uživatleské jméno pro přihlášení k SSH serveru</span>"
+"<span size=\"small\">Username which will be used to log into the SSH "
+"server</span>"
+msgstr "<span size=\"small\">Uživatelské jméno pro přihlášení k SSH serveru</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:119
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:95
 msgid "_SSH Password: (optional)"
 msgstr "_SSH heslo: (volitelné)"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:143
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:119
 msgid ""
-"<span size=\"small\">Password which will be used to log into the SSH server. "
-"The password is optional if SSH key authorization is used (via Pageant from "
-"the PuTTY tools).</span>"
-msgstr ""
-"<span size=\"small\">Heslo pro přihlášení k serveru SSH. Heslo je volitelné "
-"pokud se používá SSH autorizace klíčem (prostřednictvím Pageant z nástrojů "
-"PuTTY).</span>"
+"<span size=\"small\">Password which will be used to log into the SSH server."
+" The password is optional if SSH key authorization is used (see "
+"below).</span>"
+msgstr "<span size=\"small\">Heslo ke spojení se serverem SSH. Není nutné jej zadat při autorizaci pomocí klíče SSH (viz dole).</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:140
+msgid "_SSH Keyfile: (optional)"
+msgstr "Soubor s klíčem _SSH: (nepovinný)"
+
+#. Container child vbox17.Gtk.Box+BoxChild
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:148
+msgid "Select a File"
+msgstr "Vyberte soubor"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:161
+msgid ""
+"<span size=\"small\">SSH private keyfile which will be used to log into the "
+"SSH server</span>"
+msgstr "<span size=\"small\">Soubor se soukromým klíčem SSH který bude použit při spojování se serverem SSH</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:164
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:223
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:181
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:188
 msgid "_Username:"
 msgstr "_Uživatel:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:187
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:204
 msgid ""
 "<span size=\"small\">Username which will be used to log into the Smuxi "
 "server</span>"
-msgstr ""
-"<span size=\"small\">Uživatelské jméno pro přihlášení k serveru Smuxi</span>"
+msgstr "<span size=\"small\">Uživatelské jméno pro přihlášení k serveru Smuxi</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:207
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:233
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:224
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:87
 msgid "_Password:"
 msgstr "H_eslo:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:231
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:248
 msgid "<span size=\"small\">Password of the user</span>"
 msgstr "<span size=\"small\">Heslo uživatele</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:251
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:268
 msgid "_Verify Password:"
 msgstr "_Ověřit heslo:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:275
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:292
 msgid "<span size=\"small\">Repeat the password for verification</span>"
 msgstr "<span size=\"small\">Zopakujte heslo pro ověření</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantIntroWidget.cs:27
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantIntroWidget.cs:19
 msgid ""
 "Welcome to the Smuxi Engine Configuration Assistant.\n"
 "You need to enter some information before you can use the engine.\n"
 "\n"
 "Click \"Forward\" to begin."
-msgstr ""
-"Vítejte v asistentu nastavení enginu Smuxi.\n"
-"Před použitím enginu bude třeba, aby jste zadali některé informace.\n"
-"\n"
-"Začněte kliknutím na \"Pokračovat\"."
+msgstr "Vítejte v asistentu nastavení enginu Smuxi.\nPřed použitím enginu bude třeba, aby jste zadali některé informace.\n\nZačněte kliknutím na \"Pokračovat\"."
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:52
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:36
 msgid "_Engine Name:"
 msgstr "_Název enginu:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:75
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:59
 msgid "<span size=\"small\">Profile name of the new engine</span>"
 msgstr "<span size=\"small\">Název profilu nového enginu</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:96
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:80
 msgid "_Default Engine:"
 msgstr "_Výchozí engine:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:107
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:91
 msgid "Use as new default engine"
 msgstr "Použít jako nový výchozí engine"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:120
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:104
 msgid ""
-"<span size=\"small\">If enabled, the current engine will be the default next "
-"time Smuxi is started</span>"
-msgstr ""
-"<span size=\"small\">Pokud je zaškrtnuto, aktuální engine bude použit jako "
-"výchozí při příštím spuštění Smuxi</span>"
+"<span size=\"small\">If enabled, the current engine will be the default next"
+" time Smuxi is started</span>"
+msgstr "<span size=\"small\">Pokud je zaškrtnuto, aktuální engine bude použit jako výchozí při příštím spuštění Smuxi</span>"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:34
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:20
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - Otevřít chat"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:77
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Typ"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:95
-msgid "_Network:"
-msgstr "_Síť:"
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:213
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:54
 msgid "_Hostname:"
 msgstr "_Hostitel:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:243
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:75
+msgid "_Network:"
+msgstr "_Síť:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:198
 msgid "_Protocol:"
 msgstr "P_rotokol:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:262
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:222
+msgid "Use Encryption"
+msgstr "Použít šifrování"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:234
+msgid "Validate Server Certificate"
+msgstr "Ověřit certifikát serveru"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:254
 msgid "_On Connect Commands:"
 msgstr "_Příkazy při připojení:"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:273
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:265
 msgid "_Ignore Commands"
 msgstr "_Ignorovat příkazy"
-
-#~ msgid "Joins"
-#~ msgstr "Připojování"
-
-#~ msgid "Parts"
-#~ msgstr "Části"
-
-#~ msgid "Quits"
-#~ msgstr "Odpojování"
-
-#~ msgid "Unknown Command: {0}"
-#~ msgstr "Neznámý příkaz: {0}"
diff --git a/po-Frontend-GNOME/da.po b/po-Frontend-GNOME/da.po
index 6fe91fb..2cd30e5 100644
--- a/po-Frontend-GNOME/da.po
+++ b/po-Frontend-GNOME/da.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011-2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:19+0200\n"
-"PO-Revision-Date: 2013-04-16 06:27+0000\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-20 18:46+0000\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
@@ -49,69 +49,73 @@ msgid "Encoding:"
 msgstr "Kodning:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "Konverter automatisk UTF-8-tegn"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "<b>Generelt</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
 msgstr "Type:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
 msgstr "Vært:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
 msgstr "Adgangskode:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
 msgstr "Port:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
 msgstr "Vis adgangskode"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "<b>Netværksproxy</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
 msgstr "Ingen tilslutningskommandoer:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
 msgstr "Ingen opstartskommandoer:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "<b>Globale kommandoer</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "_Tilslutning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
 msgstr "Tidsstempelformat:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "Mellemlagerlinjer:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "Mellemlagerlinjer for motor:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -124,53 +128,53 @@ msgid ""
 "yy/yyyy = year"
 msgstr "ss = sekunder\nmm = minutter\nhh = timer (01 - 12)\nHH = timer (00 - 23)\ntt = AM/PM\n\ndd = dag\nMM = måned\nyy/yyyy = år"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "Persistenstype:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
 msgstr "Ustabile mellemlagerlinjer:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "Mellemlagerlinjer for persistens:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "<b>Beskedmellemlager</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
 msgstr "Fjern farver"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
 msgstr "Fjern formater"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
 msgstr "Fjern UTF-8"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
 msgstr "Vis avanceret opsætning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "<b>Avanceret</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
 msgstr "Generelt"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
@@ -180,7 +184,7 @@ msgstr "Øverst"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -190,7 +194,7 @@ msgstr "Bund"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
@@ -200,7 +204,7 @@ msgstr "Venstre"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
@@ -211,236 +215,236 @@ msgstr "Højre"
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
 msgstr "Ingen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> Fanebladsplacering </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
 msgstr "Fremhæv"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "Aktivitet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
 msgstr "Ingen aktivitet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
 msgstr "Deltag/del/tilstand"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> Fanebladsfarver </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
 msgstr "Skift automatisk til seneste åbnede personlige samtaler (chat)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
 msgstr "Skift automatisk til seneste åbnede gruppesamtaler (chat)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
 msgstr "Faneblade"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
 msgstr "Afslutningstegn:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
 msgstr "Kommandotegn:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
 msgstr "Historikstørrelse for kommando:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Bashagtig fuldførelse"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> Indtastningsfelt </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
 msgstr "Inddata"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
 msgstr "Farver for brugernavn"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> Placering af personliste </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
 msgstr "Overskriv"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> Skrifttype </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> Emneplacering </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
 msgstr "Forgrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "Baggrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> Farve </b>"
 
 #. This is a setting for character based line wrapping vs word based when
 #. showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
 msgstr "_Ombrydningstilstand:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> Snak </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
 msgstr "Fremhæv ord:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "Beep ved fremhævelse"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> Fremhævelse </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
 msgstr "Uddata"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
 msgstr "Aktiver"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
 msgstr "Vis altid"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
 msgstr "Vis når vinduet er minimeret"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
 msgstr "Vis når vinduet er lukket"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> Ikon for statusfelt </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
 msgstr "Vis Smuxi i beskedmenuen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "<b>Beskedmenu</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
 msgstr "Vis påmindelses-pop op'er"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>Påmindelses-pop op'er</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
 msgstr "Påmindelse"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
 msgstr "_Grænseflade"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
 msgstr "_Servere"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "_Filtre"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
 msgstr "Aktiveret"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
 msgstr "Logfiltrerede beskeder"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "_Logning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
 msgstr "Smuxi - Server"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "Tilslut automatisk til server ved opstart"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
 msgstr "Protokol:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
 msgstr "Netværk:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
 msgstr "Værtsnavn:"
 
@@ -460,11 +464,11 @@ msgstr "Smuxi - IRC-klient"
 msgid "Chat with other people on IRC"
 msgstr "Snak med andre via IRC"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
 msgstr "Joe Hansen <joedalton2 at yahoo.dk>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Smuxis hjemmeside"
 
@@ -538,14 +542,14 @@ msgstr "Fejl: {0}"
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "Er du sikker på, at du ønsker at slette motoren »{0}«?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
 msgstr "Du er ved at indsætte {0} linjer. Ønsker du at fortsætte?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "Grænsefladekommandoer"
 
@@ -575,7 +579,7 @@ msgid "No Proxy"
 msgstr "Ingen proxy"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
 msgstr "Systemstandard"
 
@@ -600,11 +604,11 @@ msgstr "Filtre"
 msgid "Logging"
 msgstr "Logning"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "Brugernavnsfelter må ikke være tomme."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "Ugyldigt fremhævet regulært udtryk: '{0}'. Årsag: {1}"
@@ -629,33 +633,33 @@ msgstr "Søgning efter gruppesnak uden et filter kan ikke anbefales. Det kan tag
 msgid "Error while fetching the list of group chats from the server."
 msgstr "Kunne ikke hente listen over gruppesnak fra serveren."
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
 msgstr "Afbrudt fra motor."
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
 msgstr "Forbinder til motor igen... (forsøg {0})"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "Årsag: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
 msgstr "Grænsefladen har mistet forbindelsen til serveren.\nØnsker du at tilslutte nu?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
 msgstr "Gentilslutning til serveren mislykkedes.\nØnsker du at forsøge igen?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
@@ -719,42 +723,42 @@ msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "En motor med dette navn findes allerede! Angiv venligst et andet."
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
 msgstr "Indtast hvilken samtale (chat) du ønsker at deltage i"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
 msgstr "Om Smuxi"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
 msgstr "Præferencer"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
 msgstr "Kunne ikke tilføje server: "
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Skift til lokal motor vil afbryde dig fra den aktuelle motor!\nEr du sikker på, at du ønsker at gøre dette?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Skift af den eksterne motor vil afbryde dig fra den aktuelle motor!\nEr du sikker på, at du ønsker at gøre dette?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
 msgstr "Dag ændret fra {0} til {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "Dag ændret til {0}"
@@ -793,31 +797,35 @@ msgstr "Type"
 msgid "Pattern"
 msgstr "Mønster"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
 msgstr "Tilstand for lav båndbredde er aktiv: Ingen beskeder synkroniseret."
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
 msgstr "Vis _menubjælke"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "Henter brugerlsite for {0}..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "færdig."
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "Person"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Genforbind"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
@@ -861,7 +869,7 @@ msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - Find gruppesnak"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "_Navn:"
 
@@ -906,8 +914,8 @@ msgstr "Forbind"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
 msgstr "Åbn log"
 
@@ -998,29 +1006,29 @@ msgstr "Vis _statuslinje"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr "Vis _deltagelseslinje"
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_Fullscreen"
 msgstr "_Fuldskærm"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_About"
 msgstr "_Om"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
 msgstr "Find gruppesamtale"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
 msgid "_Website"
 msgstr "_Hjemmeside"
 
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "Vis _værktøjslinje"
+
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
 msgstr "Smuxi - forbind"
@@ -1180,7 +1188,7 @@ msgstr "<span size=\"small\">Hvis aktiveret, vil den aktuelle motor være standa
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - åben snak"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Type:"
 
diff --git a/po-Frontend-GNOME/de.po b/po-Frontend-GNOME/de.po
index 2529040..e8b3325 100644
--- a/po-Frontend-GNOME/de.po
+++ b/po-Frontend-GNOME/de.po
@@ -3,14 +3,15 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2011-2013.
+# Bianca Mix <heavydemon at freenet.de>, 2011-2013
+# Mirco Bauer <meebey at gmail.com>, 2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:19+0200\n"
-"PO-Revision-Date: 2013-04-14 19:41+0000\n"
-"Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-22 18:56+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -49,69 +50,73 @@ msgid "Encoding:"
 msgstr "Kodierung:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "Automatisches Konvertieren von UTF-8 Zeichen"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "Allgemein"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
 msgstr "Typ:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
 msgstr "Host:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
 msgstr "Passwort:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
 msgstr "Port:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
 msgstr "Passwort anzeigen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "Netzwerk Proxy"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
 msgstr "Befehle beim Verbinden:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
 msgstr "Befehle beim Starten:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "übergreifende Kommandos"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "_Verbindung"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
 msgstr "Zeitstempel-Format:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "Puffer-Zeilen:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "Engine-Puffer-Zeilen:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -124,53 +129,53 @@ msgid ""
 "yy/yyyy = year"
 msgstr "ss = Sekunden\nmm = Minuten\nhh = Stunden (1 - 12)\nHH = Stunden (0 - 23)\ntt = AM/PM\n\ndd = Tag\nMM = Monat\nyy/yyyy = Jahr"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "Persistenz-Typ"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
 msgstr "Zeilen Volatilitäts-Puffer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "Zeilen Persistenz-Puffer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "Nachrichtenpuffer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
 msgstr "Farben entfernen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
 msgstr "Formatierungen entfernen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
 msgstr "UTF-8 entfernen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
 msgstr "Zeige erweiterte Einstellungen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "Erweitert"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
 msgstr "Allgemein"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
@@ -180,7 +185,7 @@ msgstr "Oben"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -190,7 +195,7 @@ msgstr "Unten"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
@@ -200,7 +205,7 @@ msgstr "Links"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
@@ -211,236 +216,236 @@ msgstr "Rechts"
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
 msgstr "Nichts"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> Position der Reiter </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
 msgstr "Highlight"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "Aktivität"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
 msgstr "Keine Aktivität"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
 msgstr "Beitreten/Verlassen/Mode"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> Farbe der Reiter </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
 msgstr "Automatisches Wechseln zu neu geöffneten Personen-Gesprächsfenstern"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
 msgstr "Automatisches Wechseln zu neu geöffneten Gruppen-Gesprächsfenstern"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
 msgstr "Reiter"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
 msgstr "Vervollständigungzeichen:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
 msgstr "Befehlszeichen:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
 msgstr "Befehlsprotokollgröße:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Vervollständigung im Bash-Stil"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> Eingabefeld </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
 msgstr "Eingabe"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
 msgstr "Nick-Farben"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> Position der Personenliste </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
 msgstr "Übersteuern"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> Schrift </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> Position des Themas </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
 msgstr "Vordergrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "Hintergrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> Farbe </b>"
 
 #. This is a setting for character based line wrapping vs word based when
 #. showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
 msgstr "_Umbruch-Modus"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> Chat </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
 msgstr "Highlight-Wörter:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "Bei Highlight piepsen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> Highlighting </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
 msgstr "Ausgabe"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
 msgstr "Aktivieren"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
 msgstr "Immer anzeigen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
 msgstr "Zeigen, wenn Fenster minimiert ist"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
 msgstr "Anzeigen, wenn Fenster geschlossen ist"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> Symbol im Benachrichtigungsfeld </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
 msgstr "Zeige Smuxi im Messaging-Menü"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "Messaging-Menü"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
 msgstr "Zeige Benachrichtigungs-Pop-ups"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>Beachrichtigungs-Pop-ups</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
 msgstr "Benachrichtigung"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
 msgstr "_Anzeige"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
 msgstr "_Server"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "_Filter"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
 msgstr "Aktiviert"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
 msgstr "Protokollierung gefilterter Nachrichten"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "_Geprächsprotokollierung"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
 msgstr "Smuxi - Server"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "Beim Start automatisch zu diesem Server verbinden"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
 msgstr "Protokoll:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
 msgstr "Netzwerk:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
 msgstr "Hostname:"
 
@@ -460,11 +465,11 @@ msgstr "Smuxi - Chat Client"
 msgid "Chat with other people on IRC"
 msgstr "Kommuniziere mit anderen Leuten im IRC"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
 msgstr "Mirco Bauer <meebey at meebey.net>\nBianca Mix <heavydemon at freenet.de>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Smuxi Webseite"
 
@@ -538,14 +543,14 @@ msgstr "Fehler: {0}"
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "Möchten Sie wirklich die Engine \"{0}\" löschen?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
 msgstr "Sie sind dabei, {0} Zeilen einzufügen. Möchten Sie fortfahren?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "Frontend Befehle"
 
@@ -575,7 +580,7 @@ msgid "No Proxy"
 msgstr "Kein Proxy"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
 msgstr "System-Standard"
 
@@ -600,11 +605,11 @@ msgstr "Filter"
 msgid "Logging"
 msgstr "Geprächsprotokollierung"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "Das Nickname(n)-Feld darf nicht leer sein."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "Ungültiger Highlight regex: '{0}'. Ursache: {1}"
@@ -629,33 +634,33 @@ msgstr "Vom Suchen nach Gruppen-Chats ohne einen Filter wird abgeraten. Es könn
 msgid "Error while fetching the list of group chats from the server."
 msgstr "Fehler beim Abrufen der Liste für Gruppen-Chats vom Server."
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
 msgstr "Von der Engine getrennt."
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
 msgstr "Wiederverbinden zur Engine... (Versuch {0})"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "Grund: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
 msgstr "Der Server hat die Verbindung zum Frontend verloren.\nMöchten Sie diese nun erneut aufbauen?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
 msgstr "Erneutes Verbindung zum Server ist fehlgeschlagen.\nMöchten Sie es nochmals versuchen?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
@@ -719,42 +724,42 @@ msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "Es existiert bereits eine Engine mit diesem Namen! Bitte geben Sie einen anderen an."
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
 msgstr "Geben Sie den zu betretenden Chat ein"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
 msgstr "Über Smuxi"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
 msgstr "Einstellungen"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
 msgstr "Fehler beim Hinzufügen des Servers:"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Das Wechseln zur lokalen Engine wird Sie von der jetzigen Engine trennen!\nMöchten Sie fortfahren?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Das Wechseln zur entfernten Engine wird Sie von der jetzigen Engine trennen!\nMöchten Sie fortfahren?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
 msgstr "Tag wechselte vom {0} zum {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "Tageswechsel: {0}"
@@ -793,31 +798,35 @@ msgstr "Typ"
 msgid "Pattern"
 msgstr "Muster"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
 msgstr "Geringe-Bandbreite-Modus ist aktiviert: Keine Nachrichten synchronisiert."
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
 msgstr "Zeige Menüleiste"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "Rufe die Benutzer-Liste für {0} ab..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "abgeschlossen."
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "Person"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Wiederverbinden"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
@@ -861,7 +870,7 @@ msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - Finde Gruppen-Chat"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "_Name:"
 
@@ -906,8 +915,8 @@ msgstr "Verbinden"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
 msgstr "Mitschnitt Öffnen"
 
@@ -998,29 +1007,29 @@ msgstr "Zeige _Statusanzeige"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr "Zeige _Beitrittsmenü"
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_Fullscreen"
 msgstr "_Vollbild"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_About"
 msgstr "_Über"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
 msgstr "Finde Gruppen-Chat"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
 msgid "_Website"
 msgstr "_Webseite"
 
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "Zeige _Werkzeugleiste"
+
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
 msgstr "Smuxi - Verbinden"
@@ -1180,7 +1189,7 @@ msgstr "<span size=\"small\">Wenn dies aktiviert ist, wird die Engine standardm
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - Chat Öffnen"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Typ:"
 
diff --git a/po-Frontend-GNOME/fi.po b/po-Frontend-GNOME/fi.po
index 83a47d6..34a90aa 100644
--- a/po-Frontend-GNOME/fi.po
+++ b/po-Frontend-GNOME/fi.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:19+0200\n"
-"PO-Revision-Date: 2013-05-01 14:48+0000\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-22 12:27+0000\n"
 "Last-Translator: Kalle Kaitala <cobrian at cobrian.net>\n"
 "Language-Team: Finnish (http://www.transifex.com/projects/p/smuxi/language/fi/)\n"
 "MIME-Version: 1.0\n"
@@ -27,91 +27,95 @@ msgid ""
 "The nickname to use. You can specify extra nicknames (separated by spaces) "
 "which will be used as fallbacks when the first choice is not available. By "
 "default $nick_ and $nick__ will be used as fallbacks."
-msgstr ""
+msgstr "Käytettävä lempinimi. Voit määritellä ylimääräisiä lempinimiä (eroteltuna välilyönnillä) joita käytetään varalla jos ensimmäinen vaihtoehto ei ole saatavilla. Oletuksena varalla käytetään $nick_ ja $nick__."
 
 #: ../glade/smuxi-frontend-gnome.glade.h:3
 msgid "Nickname(s):"
-msgstr ""
+msgstr "Lempinimi/et:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:4
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:315
 msgid "Username:"
-msgstr ""
+msgstr "Käyttäjänimi:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:5
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:338
 msgid "Realname:"
-msgstr ""
+msgstr "Oikea nimi:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:6
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:359
 msgid "Encoding:"
-msgstr ""
+msgstr "Enkoodaus:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "Käännä UTF-8 -merkit automaattisesti"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "<b>Yleiset</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
-msgstr ""
+msgstr "Tyyppi:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
-msgstr ""
+msgstr "Isäntä:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
-msgstr ""
+msgstr "Salasana:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
-msgstr ""
+msgstr "Portti:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
-msgstr ""
+msgstr "Näytä salasana"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "<b>Verkon välityspalvelin</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
-msgstr ""
+msgstr "Yhdistyksenaikaiset komennot:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
-msgstr ""
+msgstr "Käynnistyksenaikaiset komennot:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "<b>Globaalit komennot</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "Y_hteys"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
-msgstr ""
+msgstr "Aikaleiman muoto:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "Puskuririvit:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
-msgstr ""
+msgstr "Moottorin puskuririvit:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -122,65 +126,65 @@ msgid ""
 "dd = day\n"
 "MM = month\n"
 "yy/yyyy = year"
-msgstr ""
+msgstr "ss = sekunnit\nmm = minuutit\nhh = tunnit (01 - 12)\nHH = tunnit (00-23)\ntt = AM/PM\n\ndd = päivä\nMM = kuukausi\nyy/yyyy = vuosi"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "Pysyvyyden tyyppi:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
-msgstr ""
+msgstr "Epävakaat puskuririvit:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "Pysyvät puskuririvit:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "<b>Viestipuskuri</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
-msgstr ""
+msgstr "Poista värit"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
-msgstr ""
+msgstr "Poista muotoilut"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
-msgstr ""
+msgstr "Poista UTF-8"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
-msgstr ""
+msgstr "Näytä edistyneet asetukset"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "<b>Edistyneet</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
-msgstr ""
+msgstr "Yleiset"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1246
 msgid "Top"
-msgstr ""
+msgstr "Ylhäällä"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -190,961 +194,965 @@ msgstr "Pohjalla"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1361
 msgid "Left"
-msgstr ""
+msgstr "Vasen"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1401
 msgid "Right"
-msgstr ""
+msgstr "Oikea"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
-msgstr ""
+msgstr "Ei mitään"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> Välilehtien sijainti </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
-msgstr ""
+msgstr "Korostaminen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "Aktiviteetti"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
-msgstr ""
+msgstr "Ei aktiviteettia"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
-msgstr ""
+msgstr "Liity/Poistu/Moodi"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> Välilehtien värit </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
-msgstr ""
+msgstr "Siirry automaattisesti uutena avautuvaan yksityiskeskusteluun"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
-msgstr ""
+msgstr "Siirry automaattisesti uutena avautuviin ryhmäkeskusteluihin"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
-msgstr ""
+msgstr "Välilehdet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
-msgstr ""
+msgstr "Täydennysmerkki:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
-msgstr ""
+msgstr "Komentomerkki:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
-msgstr ""
+msgstr "Komentohistorian koko:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Bash-tyylinen täyttäminen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> Syöttökenttä </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
-msgstr ""
+msgstr "Syöte"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
-msgstr ""
+msgstr "Lempinimien värit"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> Henkilölistan sijainti </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
-msgstr ""
+msgstr "Ohita"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> Fontti </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> Aihekentän sijainti </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
-msgstr ""
+msgstr "Etuala"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "Tausta"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> Väri </b>"
 
 #. This is a setting for character based line wrapping vs word based when
 #. showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
-msgstr ""
+msgstr "_Kietaisumoodi:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> Chat </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
-msgstr ""
+msgstr "Korosta sanat:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "Piippaus korostuksen yhteydessä"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> Korostaminen </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
-msgstr ""
+msgstr "Tuloste"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
-msgstr ""
+msgstr "Aktivoi"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
-msgstr ""
+msgstr "Näytä aina"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
-msgstr ""
+msgstr "Näytä kun ikkuna on minimoituna"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
-msgstr ""
+msgstr "Näytä kun ikkuna on suljettuna"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> Huomioalueen ikoni </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
-msgstr ""
+msgstr "Näytä Smuxi viestivalikossa"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "<b>Viestivalikko</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
-msgstr ""
+msgstr "Näytä ilmoitusten ponnahdusikkunat"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>Ilmoitusten ponnahdusikkunat</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
-msgstr ""
+msgstr "Ilmoitus"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
-msgstr ""
+msgstr "_Käyttöliittymä"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
-msgstr ""
+msgstr "_Palvelimet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
-msgstr ""
+msgstr "_Suodattimet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
-msgstr ""
+msgstr "Aktivoitu"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
-msgstr ""
+msgstr "Kirjoita suodatetut viestit lokiin"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
-msgstr ""
+msgstr "_Loki"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
-msgstr ""
+msgstr "Smuxi - Palvelin"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "Yhdistä palvelimeen automaattisesti käynnistyksen yhteydessä"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
-msgstr ""
+msgstr "Protokolla:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
-msgstr ""
+msgstr "Verkko:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
-msgstr ""
+msgstr "Isäntänimi:"
 
 #: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:1
 msgid "Smuxi"
-msgstr ""
+msgstr "Smuxi"
 
 #: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:2
 msgid "IRC Chat"
-msgstr ""
+msgstr "IRC-keskustelu"
 
 #: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:3
 msgid "Smuxi IRC Client"
-msgstr ""
+msgstr "Smuxi IRC-asiakasohjelma"
 
 #: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:4
 msgid "Chat with other people on IRC"
-msgstr ""
+msgstr "Juttele muiden kanssa IRC:ssä"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
-msgstr ""
+msgstr "kääntäjien tiedot"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
-msgstr ""
+msgstr "Smuxi Web-sivu"
 
 #: ../src/Frontend-GNOME/CrashDialog.cs:46
 msgid "Oops, I did it again..."
-msgstr ""
+msgstr "Oops, tein sen taas..."
 
 #: ../src/Frontend-GNOME/CrashDialog.cs:59
 msgid "Smuxi crashed because an unhandled exception was thrown!"
-msgstr ""
+msgstr "Smuxi kaatui koska käsittelemätön poikkeus heitettiin!"
 
 #: ../src/Frontend-GNOME/CrashDialog.cs:63
 msgid "Here is the stacktrace, please report this bug!"
-msgstr ""
+msgstr "Tässä on kasajälki, ole hyvä ja ilmoita tästä bugista!"
 
 #: ../src/Frontend-GNOME/CrashDialog.cs:83
 msgid "_Report Bug"
-msgstr ""
+msgstr "_Raportoi Bugi"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:66
 msgid "Engine not found."
-msgstr ""
+msgstr "Moottoria ei löytynyt."
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:81
 msgid "Engine Manager"
-msgstr ""
+msgstr "Moottorinhallinta"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:100
 msgid "Select which Smuxi engine you want to connect to"
-msgstr ""
+msgstr "Valitse Smuxi-moottori johon haluat yhdistää"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:106
 msgid "Engine:"
-msgstr ""
+msgstr "Moottori:"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:117
 msgid "Use Low Bandwidth Mode"
-msgstr ""
+msgstr "Käytä alhaisen kaistan tilaa"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:141
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:201
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:383
 msgid "Local Engine"
-msgstr ""
+msgstr "Paikallinen moottori"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:193
 msgid "Please select an engine!"
-msgstr ""
+msgstr "Ole hyvä ja valitse moottori!"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:219
 #, csharp-format
 msgid "Your frontend version ({0}) does not match the engine version ({1})!"
-msgstr ""
+msgstr "Käyttöliittymän versio ({0}) ei vastaa moottorin versiota ({1})!"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:246
 msgid "An error occurred while connecting to the engine!"
-msgstr ""
+msgstr "Tapahtui virhe yhdistettäessä moottoriin!"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:247
 #, csharp-format
 msgid "Engine URL: {0}"
-msgstr ""
+msgstr "Moottorin URL: {0}"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:250
 #, csharp-format
 msgid "Error: {0}"
-msgstr ""
+msgstr "Virhe: {0}"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:320
 #, csharp-format
 msgid "Are you sure you want to delete the engine \"{0}\"?"
-msgstr ""
+msgstr "Haluatko varmasti poistaa moottorin \"{0}\"?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
-msgstr ""
+msgstr "Aiot liittää {0} riviä. Haluatko varmasti jatkaa?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
-msgstr ""
+msgstr "Käyttöliittymän komennot"
 
 #: ../src/Frontend-GNOME/NotImplementedMessageDialog.cs:40
 msgid "Sorry, not implemented yet!"
-msgstr ""
+msgstr "Sori, tätä ei ole vielä sisällytetty!"
 
 #. fill ListStore
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:185
 msgid "Character"
-msgstr ""
+msgstr "Merkki"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:186
 msgid "Word"
-msgstr ""
+msgstr "Sana"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:203
 msgid "Volatile"
-msgstr ""
+msgstr "Epävakaa"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:205
 msgid "Persistent"
-msgstr ""
+msgstr "Pysyvä"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:228
 msgid "No Proxy"
-msgstr ""
+msgstr "Ei välityspalvelinta"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
-msgstr ""
+msgstr "Käyttöjärjestelmän oletus"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:244
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:140
 msgid "Connection"
-msgstr ""
+msgstr "Yhteys"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:248
 msgid "Interface"
-msgstr ""
+msgstr "Käyttöliittymä"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:252
 msgid "Servers"
-msgstr ""
+msgstr "Palvelimet"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:259
 msgid "Filters"
-msgstr ""
+msgstr "Suodattimet"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:263
 msgid "Logging"
-msgstr ""
+msgstr "Loki"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
-msgstr ""
+msgstr "Lempinimi-kenttä ei saa olla tyhjä."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
-msgstr ""
+msgstr "Epäkelpo korostuksen regex: '{0}'. Syy: {1}"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:81
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:106
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:265
 msgid "Name"
-msgstr ""
+msgstr "Nimi"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:86
 msgid "Topic"
-msgstr ""
+msgstr "Aihe"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:115
 msgid ""
 "Searching for group chats without a filter is not recommended.  This may take a while, or may not work at all.\n"
 "Do you wish to continue?"
-msgstr ""
+msgstr "Ryhmäkeskusteluiden etsintää ilman suodatinta ei suositella. Tämä voi kestää hetken, tai ei välttämättä toimi ollenkaan. Haluatko jatkaa?"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:156
 msgid "Error while fetching the list of group chats from the server."
-msgstr ""
+msgstr "Virhe haettaessa ryhmäkeskusteluiden listaa palvelimelta."
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
-msgstr ""
+msgstr "Yhteys moottoriin katkaistu."
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
-msgstr ""
+msgstr "Yhdistetään uudelleen moottoriin... (yritys {0})"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
-msgstr ""
+msgstr "Syy: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
-msgstr ""
+msgstr "Käyttöliittymä on menettänyt yhteyden palvelimeen. Haluatko yhdistää uudelleen nyt?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
-msgstr ""
+msgstr "Uudelleenyhdistäminen palvelimeen on epäonnistunut. Haluatko yrittää uudelleen?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
-msgstr ""
+msgstr "Palvelin on menettänyt yhteyden käyttöliittymään. Haluatko yhdistää uudelleen nyt?"
 
 #: ../src/Frontend-GNOME/NotifyManager.cs:336
 msgid "Show"
-msgstr ""
+msgstr "Näytä"
 
 #: ../src/Frontend-GNOME/QuickConnectDialog.cs:58
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:233
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:70
 msgid "Protocol"
-msgstr ""
+msgstr "Protokolla"
 
 #: ../src/Frontend-GNOME/QuickConnectDialog.cs:59
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:71
 msgid "Hostname"
-msgstr ""
+msgstr "Isäntänimi"
 
 #: ../src/Frontend-GNOME/QuickConnectDialog.cs:162
 msgid "Unable to load server: "
-msgstr ""
+msgstr "Palvelinta ei voitu ladata:"
 
 #: ../src/Frontend-GNOME/ChatTypeWidget.cs:54
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:239
 msgid "Person / Private"
-msgstr ""
+msgstr "Henkilö / Yksityinen"
 
 #: ../src/Frontend-GNOME/ChatTypeWidget.cs:55
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:240
 msgid "Group / Public"
-msgstr ""
+msgstr "Ryhmä / Julkinen"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:71
 msgid "Engine Assistant - Smuxi"
-msgstr ""
+msgstr "Moottoriavustaja - Smuxi"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:93
 msgid "Add Smuxi Engine"
-msgstr ""
+msgstr "Lisää Smuxi-moottori"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:95
 msgid "Edit Smuxi Engine"
-msgstr ""
+msgstr "Muokkaa Smuxi-moottoria"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:204
 msgid "Credentials"
-msgstr ""
+msgstr "Todennustiedot"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:284
 msgid "Now you can use the Smuxi Engine"
-msgstr ""
+msgstr "Voit nyt käyttää Smuxi-moottoria"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:287
 msgid "Thank you"
-msgstr ""
+msgstr "Kiitos"
 
 #: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:304
 msgid ""
 "An engine with this name already exists! Please specify a different one."
-msgstr ""
+msgstr "Tämän niminen moottori on jo olemassa! Määritä toinen nimi."
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
-msgstr ""
+msgstr "Syötä liittyttävän keskustelun nimi"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
-msgstr ""
+msgstr "Tietoja Smuxista"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
-msgstr ""
+msgstr "Asetukset"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
-msgstr ""
+msgstr "Palvelinta ei voitu lisätä:"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
-msgstr ""
+msgstr "Paikalliseen moottoriin vaihto katkaisee yhteytesi nykyiseen moottoriin! Haluatko varmasti tehdä tämän?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
-msgstr ""
+msgstr "Etämoottorin vaihto katkaisee yhteyden nykyiseen moottoriin! Haluatko varmasti tehdä tämän?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
-msgstr ""
+msgstr "Päivä vaihtui päivästä {0} päivään {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
-msgstr ""
+msgstr "Päivä vaihtui, {0}"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:120
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:130
 #, csharp-format
 msgid "Invalid filter regex: '{0}'. Reason: {1}"
-msgstr ""
+msgstr "Epäkelpo suodatuksen regex: '{0}'. Syy: {1}"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:197
 msgid "Are you sure you want to delete the selected filter?"
-msgstr ""
+msgstr "Haluatko varmasti poistaa valitun suodattimen?"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:241
 msgid "Protocol / Server"
-msgstr ""
+msgstr "Protokolla / Palvelin"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:248
 msgid "Chat Type"
-msgstr ""
+msgstr "Keskustelutyyppi"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:281
 msgid "Normal"
-msgstr ""
+msgstr "Normaali"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:282
 msgid "Event"
-msgstr ""
+msgstr "Tapahtuma"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:289
 msgid "Type"
-msgstr ""
+msgstr "Tyyppi"
 
 #: ../src/Frontend-GNOME/Views/FilterListWidget.cs:314
 msgid "Pattern"
-msgstr ""
+msgstr "Kuvio"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
-msgstr ""
+msgstr "Alhaisen kaistan tila on päällä: Viestejä ei ole synkronoitu."
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
-msgstr ""
+msgstr "Näytä _valikkopalkki"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
-msgstr ""
+msgstr "Noudetaan käyttäjälistaa {0}:lle..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
-msgstr ""
+msgstr "Valmis."
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
-msgstr ""
+msgstr "Henkilö"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Yhdistä uudelleen"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
-msgstr ""
+msgstr "Protokollakeskustelun sulkeminen sulkee myös kaikki siihen liitetyt keskustelut! Haluatko varmasti tehdä tämän?"
 
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:189
 msgid "Are you sure you want to delete the selected server?"
-msgstr ""
+msgstr "Haluatko varmasti poistaa valitun palvelimen?"
 
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:245
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:279
 msgid "Unable to edit server: "
-msgstr ""
+msgstr "Palvelinta ei voitu muokata:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:24
 msgid "Find"
-msgstr ""
+msgstr "Etsi"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:44
 msgid "_Search for:"
-msgstr ""
+msgstr "_Etsi:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:73
 msgid "_Match Case"
-msgstr ""
+msgstr "_Täsmää sijamuoto"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:85
 msgid "Search _Backwards"
-msgstr ""
+msgstr "Etsi _Takaperin"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:97
 msgid "_Wrap Around"
-msgstr ""
+msgstr "_Kietaise ympäri"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:110
 msgid "Use _Regular Expressions"
-msgstr ""
+msgstr "Käytä _Säännöllisiä lausekkeita"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:23
 msgid "Smuxi - Find Group Chat"
-msgstr ""
+msgstr "Smuxi - Etsi Ryhmäkeskustelua"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
-msgstr ""
+msgstr "_Nimi:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.JoinWidget.cs:69
 msgid "Join"
-msgstr ""
+msgstr "Liity"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:56
 msgid "_Smuxi"
-msgstr ""
+msgstr "_Smuxi"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:59
 msgid "_Server"
-msgstr ""
+msgstr "_Palvelin"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:62
 msgid "_Chat"
-msgstr ""
+msgstr "_Keskustelu"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:64
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:65
 msgid "_Engine"
-msgstr ""
+msgstr "_Moottori"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:67
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:68
 msgid "_View"
-msgstr ""
+msgstr "_Näytä"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:70
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:71
 msgid "_Help"
-msgstr ""
+msgstr "_Apua"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:75
 msgid "Connect"
-msgstr ""
+msgstr "Yhdistä"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
-msgstr ""
+msgstr "Avaa loki"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:88
 msgid "_Preferences"
-msgstr ""
+msgstr "_Asetukset"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:90
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:91
 msgid "_Quit"
-msgstr ""
+msgstr "_Lopeta"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:94
 msgid "_Connect"
-msgstr ""
+msgstr "_Yhdistä"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:96
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:97
 msgid "_Add"
-msgstr ""
+msgstr "_Lisää"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:99
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:100
 msgid "_Manage"
-msgstr ""
+msgstr "_Hallinnoi"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:102
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:103
 msgid "_Open / Join Chat"
-msgstr ""
+msgstr "_Avaa / Liity keskusteluun"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:105
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:106
 msgid "_Find Group Chat"
-msgstr ""
+msgstr "_Etsi ryhmäkeskustelu"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:108
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:109
 msgid "C_lear All Activity"
-msgstr ""
+msgstr "P_uhdista kaikki aktiviteetti"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:111
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:112
 msgid "_Next Chat"
-msgstr ""
+msgstr "_Seuraava keskustelu"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:114
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:115
 msgid "_Previous Chat"
-msgstr ""
+msgstr "_Edellinen keskustelu"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:117
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:118
 msgid "_Close"
-msgstr ""
+msgstr "_Sulje"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:120
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:121
 msgid "_Use Local Engine"
-msgstr ""
+msgstr "_Käytä paikallista moottoria"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:123
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:124
 msgid "_Add Remote Engine"
-msgstr ""
+msgstr "_Lisää etämoottori"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:126
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:127
 msgid "Switch Remote Engine"
-msgstr ""
+msgstr "Vaihda etämoottoria"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:129
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:130
 msgid "_Caret Mode"
-msgstr ""
+msgstr "_Caret-moodi"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:132
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:133
 msgid "_Browse Mode"
-msgstr ""
+msgstr "_Browse-moodi"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:138
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:139
 msgid "Show _Statusbar"
-msgstr ""
+msgstr "Näytä _Statuspalkki"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr ""
+msgid "_Fullscreen"
+msgstr "_Kokoruudun tila"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
-msgid "_Fullscreen"
-msgstr ""
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "_About"
-msgstr ""
+msgstr "_Tietoja"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
-msgstr ""
+msgstr "Etsi ryhmäkeskustelu"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+msgid "_Website"
+msgstr "_Web-sivu"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
-msgid "_Website"
-msgstr ""
+msgid "Show _Toolbar"
+msgstr "Näytä _Työkalupalkki"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
-msgstr ""
+msgstr "Smuxi - Yhdistä"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:206
 msgid "Smuxi - Preferences"
-msgstr ""
+msgstr "Smuxi - asetukset"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:295
 msgid "Nicknames:"
-msgstr ""
+msgstr "Lempinimet:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1430
 msgid "<b> User List Position </b>"
-msgstr ""
+msgstr "<b> Käyttäjälistan sijainti </b>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1441
 msgid "<b> Channel </b>"
-msgstr ""
+msgstr "<b> Kanava </b>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1652
 msgid "<b>Channel Filters</b>"
-msgstr ""
+msgstr "<b>Kanavasuodattimet</b>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1669
 msgid "<b>User Filters</b>"
-msgstr ""
+msgstr "<b>Käyttäjäsuodattimet</b>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:42
 msgid "Use _SSH Tunnel"
-msgstr ""
+msgstr "Käytä _SSH-tunnelia"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:56
 msgid ""
 "<span size=\"small\">Enables the use of SSH for the connection.  This has a "
 "small performance impact, but is more secure and required when using NAT or "
 "port-based firewalls</span>"
-msgstr ""
+msgstr "<span size=\"small\">Mahdollistaa SSH:n käytön yhteydessä. Tällä on pieni suorituskykyvaikutus, mutta tarjoaa lisäturvaa ja on pakollinen käytettäessä NAT:ia tai porttiperustaisia palomuureja</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:135
 msgid "SSH _Host:"
-msgstr ""
+msgstr "SSH-_Isäntä:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:146
 msgid "<span size=\"small\">DNS or IP address and port of the SSH server</span>"
-msgstr ""
+msgstr "<span size=\"small\">DNS tai IP-osoite ja portti SSH-palvelimelle</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:159
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:173
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:129
 msgid "_Port:"
-msgstr ""
+msgstr "_Portti:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:186
 msgid "<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
-msgstr ""
+msgstr "<span size=\"small\">DNS tai IP-osoite ja portti Smuxi-palvelimeen</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:199
 msgid "_Smuxi Host:"
-msgstr ""
+msgstr "_Smuxi-isäntä:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:52
 msgid "_SSH Username: (optional)"
-msgstr ""
+msgstr "_SSH-käyttäjänimi: (valinnainen)"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:75
 msgid ""
 "<span size=\"small\">Username which will be used to log into the SSH "
 "server</span>"
-msgstr ""
+msgstr "<span size=\"small\">Käyttäjänimi jolla kirjaudutaan sisään SSH-palvelimeen</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:95
 msgid "_SSH Password: (optional)"
-msgstr ""
+msgstr "_SSH-salasana: (valinnainen)"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:119
 msgid ""
 "<span size=\"small\">Password which will be used to log into the SSH server."
 " The password is optional if SSH key authorization is used (see "
 "below).</span>"
-msgstr ""
+msgstr "<span size=\"small\">Salasana jota käytetään SSH-palvelimelle kirjautumiseen. Tämä salasana on valinnainen jos SSH-avaintunnistautumista käytetään (katso alempaa).</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:140
 msgid "_SSH Keyfile: (optional)"
-msgstr ""
+msgstr "_SSH-avaintiedosto: (valinnainen)"
 
 #. Container child vbox17.Gtk.Box+BoxChild
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:148
 msgid "Select a File"
-msgstr ""
+msgstr "Valitse tiedosto"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:161
 msgid ""
 "<span size=\"small\">SSH private keyfile which will be used to log into the "
 "SSH server</span>"
-msgstr ""
+msgstr "<span size=\"small\">Yksityinen SSH-avaintiedosto jota käytetään SSH-palvelimelle kirjautumiseen</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:181
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:188
 msgid "_Username:"
-msgstr ""
+msgstr "_Käyttäjänimi:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:204
 msgid ""
 "<span size=\"small\">Username which will be used to log into the Smuxi "
 "server</span>"
-msgstr ""
+msgstr "<span size=\"small\">Käyttäjänimi jolla kirjaudutaan sisään Smuxi-palvelimeen</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:224
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:87
 msgid "_Password:"
-msgstr ""
+msgstr "_Salasana:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:248
 msgid "<span size=\"small\">Password of the user</span>"
-msgstr ""
+msgstr "<span size=\"small\">Käyttäjän salasana</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:268
 msgid "_Verify Password:"
-msgstr ""
+msgstr "_Vahvista salasana:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:292
 msgid "<span size=\"small\">Repeat the password for verification</span>"
-msgstr ""
+msgstr "<span size=\"small\">Toista salasana sen varmentamiseksi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantIntroWidget.cs:19
 msgid ""
@@ -1152,19 +1160,19 @@ msgid ""
 "You need to enter some information before you can use the engine.\n"
 "\n"
 "Click \"Forward\" to begin."
-msgstr ""
+msgstr "Tervetuloa Smuxi-moottorin säätöavustajaan.\nSinun tulee syöttää muutamia tietoja ennen kuin pääset käyttämään moottoria.\n\nValitse \"Eteenpäin\" aloittaaksesi."
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:36
 msgid "_Engine Name:"
-msgstr ""
+msgstr "_Moottorin nimi:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:59
 msgid "<span size=\"small\">Profile name of the new engine</span>"
-msgstr ""
+msgstr "<span size=\"small\">Uuden moottorin profiilinimi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:80
 msgid "_Default Engine:"
-msgstr ""
+msgstr "_Oletusmoottori:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:91
 msgid "Use as new default engine"
@@ -1180,7 +1188,7 @@ msgstr "<span size=\"small\">Jos valittu, nykyinen moottori on oletuksena käyt
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - Avaa keskustelu"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Tyyppi:"
 
diff --git a/po-Frontend-GNOME/fr.po b/po-Frontend-GNOME/fr.po
index ea4038f..3172bc4 100644
--- a/po-Frontend-GNOME/fr.po
+++ b/po-Frontend-GNOME/fr.po
@@ -1,22 +1,22 @@
 # SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-#
+# 
 # Translators:
-# Clément Bourgeois <moonpyk at gmail.com>, 2011.
+# Clément Bourgeois <moonpyk at gmail.com>, 2011-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:42+0200\n"
-"PO-Revision-Date: 2013-04-10 22:38+0100\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-19 12:36+0000\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
-"Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
-"Language: fr\n"
+"Language-Team: French (http://www.transifex.com/projects/p/smuxi/language/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:1
 msgid "Smuxi Preferences"
@@ -27,11 +27,7 @@ msgid ""
 "The nickname to use. You can specify extra nicknames (separated by spaces) "
 "which will be used as fallbacks when the first choice is not available. By "
 "default $nick_ and $nick__ will be used as fallbacks."
-msgstr ""
-"Le surnom est déjà en cours d'utilisation. Vous pouvez spécifier plus d'un "
-"seul surnom, séparés par des espaces. Ceux ci seront utilisés comme solution "
-"de repli si le premier surnom n'est pas disponible. Par défaut, $nick et "
-"$nick__ sont utilisés."
+msgstr "Le surnom est déjà en cours d'utilisation. Vous pouvez spécifier plus d'un seul surnom, séparés par des espaces. Ceux ci seront utilisés comme solution de repli si le premier surnom n'est pas disponible. Par défaut, $nick et $nick__ sont utilisés."
 
 #: ../glade/smuxi-frontend-gnome.glade.h:3
 msgid "Nickname(s):"
@@ -53,69 +49,73 @@ msgid "Encoding:"
 msgstr "Encodage :"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "Convertir automatiquement les caractères UTF-8"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "<b>Général</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
 msgstr "Type :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
 msgstr "Nom d'hôte :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
 msgstr "Mot de passe :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
 msgstr "Port :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
 msgstr "Afficher le mot de passe"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "<b>Proxy réseau</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
 msgstr "Commandes de connexion :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
 msgstr "Commandes de démarrage :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "<b>Commandes globales</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "C_onnexion"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
 msgstr "Format temporel :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "Lignes du tampon :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "Lignes du tampon moteur"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -126,64 +126,55 @@ msgid ""
 "dd = day\n"
 "MM = month\n"
 "yy/yyyy = year"
-msgstr ""
-"ss = secondes\n"
-"mm = minutes\n"
-"hh = heures (format 01 - 12)\n"
-"HH = heures (format 00 - 23)\n"
-"tt = AM/PM\n"
-"\n"
-"dd = jour\n"
-"MM = mois\n"
-"yy/yyyy = année"
+msgstr "ss = secondes\nmm = minutes\nhh = heures (format 01 - 12)\nHH = heures (format 00 - 23)\ntt = AM/PM\n\ndd = jour\nMM = mois\nyy/yyyy = année"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "Type de persistance :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
 msgstr "Lignes de tampon volatiles"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "Lignes de tampon sauvegardées :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "<b>Tampon de messages</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
 msgstr "Ignorer les couleurs"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
 msgstr "Ignorer le formatage"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
 msgstr "Ignorer l'UTF-8"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
 msgstr "Afficher les reglages avancés"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "<b>Avancé</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
 msgstr "Général"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
@@ -193,7 +184,7 @@ msgstr "Haut"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -203,7 +194,7 @@ msgstr "Bas"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
@@ -213,7 +204,7 @@ msgstr "Gauche"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
@@ -224,235 +215,236 @@ msgstr "Droite"
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
 msgstr "Aucun"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> Position des onglets </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
 msgstr "Surligner"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "Activité"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
 msgstr "Aucune activité"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
 msgstr "Join/Part/Mode"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> Couleur des onglets </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
 msgstr "Ouvrir automatiquement les nouveaux chats de personne"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
 msgstr "Ouvrir automatiquement les nouveaux chats de groupe"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
 msgstr "Onglets"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
 msgstr "Caractère de complétion :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
 msgstr "Caractère des commandes :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
 msgstr "Taille de l'historique des commandes :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Complétion style Bash"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> Champ d'entrée </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
 msgstr "Entrée"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
 msgstr "Couleur du surnom"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> Position de la liste des utilisateurs </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
 msgstr "Ignorer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> Police </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> Position du sujet </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
 msgstr "Texte"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "Arrière plan"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> Couleur </b>"
 
-#. This is a setting for character based line wrapping vs word based when showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#. This is a setting for character based line wrapping vs word based when
+#. showing messages
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
 msgstr "Mode _circulaire :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> Discussion </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
 msgstr "Mots surlignés :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "Émettre un son en cas de surlignage"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> Surlignement </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
 msgstr "Sortie"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
 msgstr "Activer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
 msgstr "Toujours montrer"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
 msgstr "Montrer quand la fenêtre est minimisée"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
 msgstr "Montrer quand la fenêtre est fermée"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> Icône de l'aire de notification </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
 msgstr "Afficher Smuxi dans le menu messagerie"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "<b>Menu de messagerie</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
 msgstr "Afficher les popups de notification"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>Popups de notification</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
 msgstr "Notification"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
 msgstr "_Interface"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
 msgstr "_Serveurs"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "_Filtres"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
 msgstr "Activé"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
 msgstr "Journaliser les messages filtrés"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "_Journalisation"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
 msgstr "Smuxi - Serveur"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "Se connecter automatiquement au serveur à chaque démarrage"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
 msgstr "Protocole :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
 msgstr "Réseau :"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
 msgstr "Nom d'hôte"
 
@@ -472,11 +464,11 @@ msgstr "Client IRC Smuxi"
 msgid "Chat with other people on IRC"
 msgstr "Chatter sur IRC avec d'autres gens"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
 msgstr "Clément Bourgeois <moonpyk at gmail.com>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Site web de Smuxi"
 
@@ -529,9 +521,7 @@ msgstr "Sélectionnez un moteur s'il vous plaît !"
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:219
 #, csharp-format
 msgid "Your frontend version ({0}) does not match the engine version ({1})!"
-msgstr ""
-"Votre version de l'interface utilisateur ({0}) ne correspond pas à celle du "
-"moteur ({1}) !"
+msgstr "Votre version de l'interface utilisateur ({0}) ne correspond pas à celle du moteur ({1}) !"
 
 #: ../src/Frontend-GNOME/EngineManagerDialog.cs:246
 msgid "An error occurred while connecting to the engine!"
@@ -552,16 +542,14 @@ msgstr "Erreur : {0}"
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "Êtes vous sûr(e) de vouloir supprimer le moteur \"{0}\" ?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
-msgstr ""
-"Vous vous apprêtez à coller {0} lignes de texte, êtes vous sûr(e) de vouloir "
-"continuer ?"
+msgstr "Vous vous apprêtez à coller {0} lignes de texte, êtes vous sûr(e) de vouloir continuer ?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "Commandes Frontend"
 
@@ -591,7 +579,7 @@ msgid "No Proxy"
 msgstr "Pas de proxy"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
 msgstr "Défaut du système"
 
@@ -616,11 +604,11 @@ msgstr "Filtres"
 msgid "Logging"
 msgstr "Journalisation"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "Le champ surnom(s) ne doit pas être vide."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "Expression régulière de surlignage invalide '{0}'. Raison : {1} "
@@ -637,54 +625,45 @@ msgstr "Sujet"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:115
 msgid ""
-"Searching for group chats without a filter is not recommended.  This may "
-"take a while, or may not work at all.\n"
+"Searching for group chats without a filter is not recommended.  This may take a while, or may not work at all.\n"
 "Do you wish to continue?"
 msgstr "Chercher des groupes de discussion"
 
 #: ../src/Frontend-GNOME/FindGroupChatDialog.cs:156
 msgid "Error while fetching the list of group chats from the server."
-msgstr ""
-"Erreur durant la récupération de la liste des groupes de discussion du "
-"serveur."
+msgstr "Erreur durant la récupération de la liste des groupes de discussion du serveur."
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
 msgstr "Déconnecté du moteur."
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
 msgstr "Reconnexion au moteur... (essai {0})"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "Cause : {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
-msgstr ""
-"Le serveur a perdu la connexion a l'interface.\n"
-"Voulez-vous vous reconnecter maintenant ?"
+msgstr "Le serveur a perdu la connexion a l'interface.\nVoulez-vous vous reconnecter maintenant ?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
-msgstr ""
-"La reconnexion au serveur a échoué.\n"
-"Voulez-vous vous reconnecter maintenant ?"
+msgstr "La reconnexion au serveur a échoué.\nVoulez-vous vous reconnecter maintenant ?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
-msgstr ""
-"Le serveur a perdu la connexion à l'interface.\n"
-"Voulez-vous vous reconnecter maintenant ?"
+msgstr "Le serveur a perdu la connexion à l'interface.\nVoulez-vous vous reconnecter maintenant ?"
 
 #: ../src/Frontend-GNOME/NotifyManager.cs:336
 msgid "Show"
@@ -744,48 +723,42 @@ msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "Un moteur avec ce nom éxiste deja ! Veuillez en spécifier un autre."
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
 msgstr "Entrez le nom du chat à rejoindre"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
 msgstr "À propos de Smuxi"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
 msgstr "Préférences"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
 msgstr "Impossible d'ajouter le serveur :"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
-msgstr ""
-"Changer de moteur vers le moteur local va vous déconnecter du moteur "
-"actuel !\n"
-"Êtes vous sûr(e) de vouloir continuer ?"
+msgstr "Changer de moteur vers le moteur local va vous déconnecter du moteur actuel !\nÊtes vous sûr(e) de vouloir continuer ?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
-msgstr ""
-"Changer de moteur pour un moteur distant va vous déconnecter du moteur "
-"actuel !\n"
-"Êtes vous sûr(e) de vouloir continuer ?"
+msgstr "Changer de moteur pour un moteur distant va vous déconnecter du moteur actuel !\nÊtes vous sûr(e) de vouloir continuer ?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
 msgstr "Jour changé de {0} à {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "Jour changé à {0}"
@@ -824,38 +797,39 @@ msgstr "Type :"
 msgid "Pattern"
 msgstr "Motif"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
 msgstr "Mode faible bande passante activé : aucun message synchronisé."
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
 msgstr "Afficher la barre de _menus"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "Téléchargement de la liste des utilisateurs pour {0}..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "terminé."
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "Personne"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Reconnecter"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
-msgstr ""
-"Fermer la fenêtre de chat du protocole va aussi fermer toutes discussions "
-"connectées sur celui-ci !\n"
-"Êtes vous sûr(e) de vouloir continuer ?"
+msgstr "Fermer la fenêtre de chat du protocole va aussi fermer toutes discussions connectées sur celui-ci !\nÊtes vous sûr(e) de vouloir continuer ?"
 
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:189
 msgid "Are you sure you want to delete the selected server?"
@@ -895,7 +869,7 @@ msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - Trouver un groupe de discussion"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "_Nom :"
 
@@ -940,8 +914,8 @@ msgstr "Connexion"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
 msgstr "Ouvrir le journal"
 
@@ -1032,29 +1006,29 @@ msgstr "Afficher la barre de status"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr "Afficher la barre \"Rejoindre\""
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_Fullscreen"
 msgstr "_Plein écran"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_About"
 msgstr "_À propos"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
 msgstr "Rechercher le groupe de discussion"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
 msgid "_Website"
 msgstr "Site web de Smuxi"
 
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "Afficher la barre d'ou_tils"
+
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
 msgstr "Smuxi - Connexion"
@@ -1092,19 +1066,14 @@ msgid ""
 "<span size=\"small\">Enables the use of SSH for the connection.  This has a "
 "small performance impact, but is more secure and required when using NAT or "
 "port-based firewalls</span>"
-msgstr ""
-"<span size=\"small\">Active l'utilisation de SSH pour la connexion.  Ceci a "
-"un leger impact négatif sur les performances, mais améliore la sécurité et "
-"est parfois nécéssaire en cas d'utilisation d'un systeme NAT ou d'un "
-"firewall régi par ports</span>"
+msgstr "<span size=\"small\">Active l'utilisation de SSH pour la connexion.  Ceci a un leger impact négatif sur les performances, mais améliore la sécurité et est parfois nécéssaire en cas d'utilisation d'un systeme NAT ou d'un firewall régi par ports</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:135
 msgid "SSH _Host:"
 msgstr "SSH _Hôte:"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:146
-msgid ""
-"<span size=\"small\">DNS or IP address and port of the SSH server</span>"
+msgid "<span size=\"small\">DNS or IP address and port of the SSH server</span>"
 msgstr "<span size=\"small\">Adresse IP ou DNS et port du serveur SSH</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:159
@@ -1114,8 +1083,7 @@ msgid "_Port:"
 msgstr "_Port"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:186
-msgid ""
-"<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
+msgid "<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
 msgstr "<span size=\"small\">Adresse IP ou DNS et port du serveur Smuxi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:199
@@ -1128,11 +1096,9 @@ msgstr "Nom d'utilisateur _SSH (optionnel) :"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:75
 msgid ""
-"<span size=\"small\">Username which will be used to log into the SSH server</"
-"span>"
-msgstr ""
-"<span size=\"small\">Nom d'utilisateur qui sera utilisé pour "
-"l'enregistrement auprès du moteur Smuxi</span>"
+"<span size=\"small\">Username which will be used to log into the SSH "
+"server</span>"
+msgstr "<span size=\"small\">Nom d'utilisateur qui sera utilisé pour l'enregistrement auprès du moteur Smuxi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:95
 msgid "_SSH Password: (optional)"
@@ -1140,12 +1106,10 @@ msgstr "Mot de passe _SSH (optionnel) :"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:119
 msgid ""
-"<span size=\"small\">Password which will be used to log into the SSH server. "
-"The password is optional if SSH key authorization is used (see below).</span>"
-msgstr ""
-"<span size=\"small\">Le mot de passe qui sera utilisé pour la connexion au "
-"serveur SSH. Le mot de passe est optionnel si l'authentification par fichier "
-"de clé SSH est activé (voir ci-dessous)</span>"
+"<span size=\"small\">Password which will be used to log into the SSH server."
+" The password is optional if SSH key authorization is used (see "
+"below).</span>"
+msgstr "<span size=\"small\">Le mot de passe qui sera utilisé pour la connexion au serveur SSH. Le mot de passe est optionnel si l'authentification par fichier de clé SSH est activé (voir ci-dessous)</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:140
 msgid "_SSH Keyfile: (optional)"
@@ -1160,9 +1124,7 @@ msgstr "Choisissez un fichier"
 msgid ""
 "<span size=\"small\">SSH private keyfile which will be used to log into the "
 "SSH server</span>"
-msgstr ""
-"<span size=\"small\">Le fichier de clé SSH sera utilisé pour "
-"l'authentification sur le serveur SSH</span>"
+msgstr "<span size=\"small\">Le fichier de clé SSH sera utilisé pour l'authentification sur le serveur SSH</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:181
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:188
@@ -1173,9 +1135,7 @@ msgstr "_Nom d'utilisateur :"
 msgid ""
 "<span size=\"small\">Username which will be used to log into the Smuxi "
 "server</span>"
-msgstr ""
-"<span size=\"small\">Nom d'utilisateur qui sera utilisé pour "
-"l'enregistrement auprès du moteur Smuxi</span>"
+msgstr "<span size=\"small\">Nom d'utilisateur qui sera utilisé pour l'enregistrement auprès du moteur Smuxi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:224
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:87
@@ -1200,12 +1160,7 @@ msgid ""
 "You need to enter some information before you can use the engine.\n"
 "\n"
 "Click \"Forward\" to begin."
-msgstr ""
-"Bienvenue sur l'assistant de configuration du moteur Smuxi.\n"
-"Vous devez entrer plusieurs informations avant de pouvoir utiliser le "
-"moteur.\n"
-"\n"
-"Cliquez sur \"Suivant\" pour commencer."
+msgstr "Bienvenue sur l'assistant de configuration du moteur Smuxi.\nVous devez entrer plusieurs informations avant de pouvoir utiliser le moteur.\n\nCliquez sur \"Suivant\" pour commencer."
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:36
 msgid "_Engine Name:"
@@ -1213,8 +1168,7 @@ msgstr "Nom du _moteur :"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:59
 msgid "<span size=\"small\">Profile name of the new engine</span>"
-msgstr ""
-"<span size=\"small\">Nom du profil pour l'entrée du nouveau moteur</span>"
+msgstr "<span size=\"small\">Nom du profil pour l'entrée du nouveau moteur</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:80
 msgid "_Default Engine:"
@@ -1226,17 +1180,15 @@ msgstr "Utiliser comme moteur par défaut"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:104
 msgid ""
-"<span size=\"small\">If enabled, the current engine will be the default next "
-"time Smuxi is started</span>"
-msgstr ""
-"<span size=\"small\">Activé, cette fonctionnalité rend le moteur courant par "
-"défaut au prochain démarrage de Smuxi</span>"
+"<span size=\"small\">If enabled, the current engine will be the default next"
+" time Smuxi is started</span>"
+msgstr "<span size=\"small\">Activé, cette fonctionnalité rend le moteur courant par défaut au prochain démarrage de Smuxi</span>"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:20
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - Ouvrir un chat"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Type :"
 
@@ -1267,12 +1219,3 @@ msgstr "Commandes de _connexion :"
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:265
 msgid "_Ignore Commands"
 msgstr "_Ignorer les commandes"
-
-#~ msgid "_File"
-#~ msgstr "_Fichier"
-
-#~ msgid "_Quick Connect"
-#~ msgstr "_Connexion rapide"
-
-#~ msgid "Unknown ChatType: {0}"
-#~ msgstr "ChatType inconnu : {0}"
diff --git a/po-Frontend-GNOME/pt_BR.po b/po-Frontend-GNOME/pt_BR.po
new file mode 100644
index 0000000..9696357
--- /dev/null
+++ b/po-Frontend-GNOME/pt_BR.po
@@ -0,0 +1,1213 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:19+0200\n"
+"PO-Revision-Date: 2013-07-15 00:27+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:1
+msgid "Smuxi Preferences"
+msgstr "Preferências do Smuxi"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:2
+msgid ""
+"The nickname to use. You can specify extra nicknames (separated by spaces) "
+"which will be used as fallbacks when the first choice is not available. By "
+"default $nick_ and $nick__ will be used as fallbacks."
+msgstr "O nick para usar. Você pode especificar vários nicks (separados por espaços) que serão usados quando o nick não estiver disponível. Por padrão $nick_ e $nick__ serão usados em caso de erros."
+
+#: ../glade/smuxi-frontend-gnome.glade.h:3
+msgid "Nickname(s):"
+msgstr "Apelido(s):"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:4
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:315
+msgid "Username:"
+msgstr "Nome de usuário:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:5
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:338
+msgid "Realname:"
+msgstr "Nome Real:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:6
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:359
+msgid "Encoding:"
+msgstr "Codificação:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "<b>General</b>"
+msgstr "<b> Geral </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:9
+msgid "Host:"
+msgstr "Servidor:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:10
+msgid "Password:"
+msgstr "Senha:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:11
+msgid "Port:"
+msgstr "Porta:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
+msgid "Show Password"
+msgstr "Mostrar Senha"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:13
+msgid "<b>Network Proxy</b>"
+msgstr "<b> Proxy de Rede </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
+msgid "On Connect Commands:"
+msgstr "Comandos ao conectar:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
+msgid "On Startup Commands:"
+msgstr "Comandos ao iniciar:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:16
+msgid "<b>Global Commands</b>"
+msgstr "<b> Comandos Globais </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
+msgid "C_onnection"
+msgstr "C_onexão"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
+msgid "Timestamp Format:"
+msgstr "Formato do horário:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
+msgid "Buffer Lines:"
+msgstr "Linhas de buffer:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
+msgid "Engine Buffer Lines:"
+msgstr "Linhas de Buffer do motor:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:21
+msgid ""
+"ss = seconds\n"
+"mm = minutes\n"
+"hh = hours (01 - 12)\n"
+"HH = hours (00 - 23)\n"
+"tt = AM/PM\n"
+"\n"
+"dd = day\n"
+"MM = month\n"
+"yy/yyyy = year"
+msgstr "ss = segundos\nmm = minutos\nhh = horas(01-12)\nHH = horas(00-23)\ntt = AM/PM\n\ndd = dia\nMM = mês\nyy/yyyy = ano"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:30
+msgid "Persistency Type:"
+msgstr "Tipo persistente:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:31
+msgid "Volatile Buffer Lines:"
+msgstr "Linhas de buffer volátil:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:32
+msgid "Persistent Buffer Lines:"
+msgstr "Linhas de buffer persistentes:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:33
+msgid "<b>Message Buffer</b>"
+msgstr "<b> Buffer de Mensagem </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
+msgid "Strip Colors"
+msgstr "Tirar Cores"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
+msgid "Strip Formattings"
+msgstr "Tirar formatações"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
+msgid "Strip UTF-8"
+msgstr "Tirar UTF-8"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:37
+msgid "Show Advanced Settings"
+msgstr "Mostrar Configurações Avançadas"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:38
+msgid "<b>Advanced</b>"
+msgstr "<b> Avançado </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
+msgid "General"
+msgstr "Geral"
+
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
+#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1246
+msgid "Top"
+msgstr "Topo"
+
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
+#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1286
+msgid "Bottom"
+msgstr "Fundo"
+
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
+#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1361
+msgid "Left"
+msgstr "Saiu"
+
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
+#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1401
+msgid "Right"
+msgstr "Direita"
+
+#. Container child vbox6.Gtk.Box+BoxChild
+#. Container child vbox11.Gtk.Box+BoxChild
+#. Container child vbox12.Gtk.Box+BoxChild
+#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
+msgid "None"
+msgstr "Nenhuma"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
+msgid "<b> Tabs Position </b>"
+msgstr "<b> Aba de posição </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
+msgid "Highlight"
+msgstr "Realçar"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
+msgid "Activity"
+msgstr "Atividade"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
+msgid "No Activity"
+msgstr "Sem atividade"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
+msgid "Join/Part/Mode"
+msgstr "Join/Part/Mode"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
+msgid "<b> Tab Colors </b>"
+msgstr "<b> Aba de cores </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:51
+msgid "Automatically switch to newly opened person chats"
+msgstr "Automaticamente mudar para novos chats com pessoas"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:52
+msgid "Automatically switch to newly opened group chats"
+msgstr "Automaticamente mudar para novos chats de grupo"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
+msgid "Tabs"
+msgstr "Abas"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
+msgid "Completion Character:"
+msgstr "Completar Caracter:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
+msgid "Command Character:"
+msgstr "Caractere comando:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
+msgid "Command History Size:"
+msgstr "Histórico Tamanho do Comando"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
+msgid "Bash-Style Completion"
+msgstr "Completar Estilo Bash"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
+msgid "<b> Entry Field </b>"
+msgstr "<b> Campo de entrada </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
+msgid "Input"
+msgstr "Entrada"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
+msgid "Nick Colors"
+msgstr "Cores do Nick"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:61
+msgid "<b> Person List Position </b>"
+msgstr "<b> Lista de Posições de Pessoas </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:62
+msgid "Override"
+msgstr "Sobrescrever"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:63
+msgid "<b> Font </b>"
+msgstr "<b> Fonte </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
+msgid "<b> Topic Position </b>"
+msgstr "<b> Posição do Tópico </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:65
+msgid "Foreground"
+msgstr "Primeiro Plano"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:66
+msgid "Background"
+msgstr "Plano de fundo"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:67
+msgid "<b> Color </b>"
+msgstr "<b> Cor </b>"
+
+#. This is a setting for character based line wrapping vs word based when
+#. showing messages
+#: ../glade/smuxi-frontend-gnome.glade.h:69
+msgid "_Wrap Mode:"
+msgstr "_Modo de quebra:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:70
+msgid "<b> Chat </b>"
+msgstr "<b> Chat</b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
+msgid "Highlight words:"
+msgstr "Palavras para Realçar"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
+msgid "Beep on highlight"
+msgstr "Som ao realçar"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
+msgid "<b> Highlighting </b>"
+msgstr "<b> Ressaltar </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
+msgid "Output"
+msgstr "Saida"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:75
+msgid "Enable"
+msgstr "Ativar"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:76
+msgid "Show always"
+msgstr "Sempre mostrar"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:77
+msgid "Show when window is minimized"
+msgstr "Mostrar quando a janela é minimizada"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:78
+msgid "Show when window is closed"
+msgstr "Mostrar quando janela é fechada"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:79
+msgid "<b> Notification Area Icon </b>"
+msgstr "<b> Ícone da Área de Notificação </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:80
+msgid "Show Smuxi in the messaging menu"
+msgstr "Mostrar Smuxi no menu de mensagens"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:81
+msgid "<b>Messaging Menu</b>"
+msgstr "<b> Menu de mensagens </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:82
+msgid "Show notification popups"
+msgstr "Mostrar janela de notificação"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:83
+msgid "<b>Notification Popups</b>"
+msgstr "<b> Janela de notificação </b>"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:84
+msgid "Notification"
+msgstr "Notificação"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
+msgid "_Interface"
+msgstr "_Interface"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
+msgid "_Servers"
+msgstr "_Servidores"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
+msgid "_Filters"
+msgstr "_Filtros"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:88
+msgid "Enabled"
+msgstr "Ativado"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:89
+msgid "Log Filtered Messages"
+msgstr "Mensagens de Log Filtradas"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:90
+msgid "_Logging"
+msgstr "_Logging"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
+msgid "Smuxi - Server"
+msgstr "Smuxi - Servidor"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
+msgid "Automatically connect to server at startup"
+msgstr "Conectar automaticamente ao servidor no início"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:93
+msgid "Protocol:"
+msgstr "Protocolo:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:94
+msgid "Network:"
+msgstr "Rede:"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:95
+msgid "Hostname:"
+msgstr "Servidor:"
+
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:1
+msgid "Smuxi"
+msgstr "Smuxi"
+
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:2
+msgid "IRC Chat"
+msgstr "IRC Chat"
+
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:3
+msgid "Smuxi IRC Client"
+msgstr "Smuxi Cliente IRC"
+
+#: ../src/Frontend-GNOME/smuxi-frontend-gnome.desktop.in.h:4
+msgid "Chat with other people on IRC"
+msgstr "Converse com outras pessoas no IRC"
+
+#: ../src/Frontend-GNOME/AboutDialog.cs:65
+msgid "translator-credits"
+msgstr "creditos tradução"
+
+#: ../src/Frontend-GNOME/AboutDialog.cs:72
+msgid "Smuxi Website"
+msgstr "Smuxi Site"
+
+#: ../src/Frontend-GNOME/CrashDialog.cs:46
+msgid "Oops, I did it again..."
+msgstr "Vix, acho que fiz de novo..."
+
+#: ../src/Frontend-GNOME/CrashDialog.cs:59
+msgid "Smuxi crashed because an unhandled exception was thrown!"
+msgstr "Smuxi falhou por causa de uma exceção que não foi controlada!"
+
+#: ../src/Frontend-GNOME/CrashDialog.cs:63
+msgid "Here is the stacktrace, please report this bug!"
+msgstr "Aqui está a parte do erro, Por favor reporte este problema!"
+
+#: ../src/Frontend-GNOME/CrashDialog.cs:83
+msgid "_Report Bug"
+msgstr "_Reportar Problema"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:66
+msgid "Engine not found."
+msgstr "Motor não encontrado."
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:81
+msgid "Engine Manager"
+msgstr "Controlador de Motor"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:100
+msgid "Select which Smuxi engine you want to connect to"
+msgstr "Selecione qual motor do Smuxi você deseja se conectar"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:106
+msgid "Engine:"
+msgstr "Motor:"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:117
+msgid "Use Low Bandwidth Mode"
+msgstr "Usar modo de pouca largura de banda"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:141
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:201
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:383
+msgid "Local Engine"
+msgstr "Motor Local"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:193
+msgid "Please select an engine!"
+msgstr "Por favor selecione um motor!"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:219
+#, csharp-format
+msgid "Your frontend version ({0}) does not match the engine version ({1})!"
+msgstr "Sua versão de primeiro plano ({0}) não é igual a versão do motor ({1})!"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:246
+msgid "An error occurred while connecting to the engine!"
+msgstr "Aconteceu um erro enquanto conectava ao motor!"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:247
+#, csharp-format
+msgid "Engine URL: {0}"
+msgstr "URL do motor: {0}"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:250
+#, csharp-format
+msgid "Error: {0}"
+msgstr "Erro: {0}"
+
+#: ../src/Frontend-GNOME/EngineManagerDialog.cs:320
+#, csharp-format
+msgid "Are you sure you want to delete the engine \"{0}\"?"
+msgstr "Tem certeza que você deseja deletar o motor \"{0}\"?"
+
+#: ../src/Frontend-GNOME/Entry.cs:474
+#, csharp-format
+msgid "You are going to paste {0} lines. Do you want to continue?"
+msgstr "Você está colando {0} linhas. Deseja continuar?"
+
+#. TRANSLATOR: this line is used as a label / category for a
+#. list of commands below
+#: ../src/Frontend-GNOME/Entry.cs:587
+msgid "Frontend Commands"
+msgstr "Comandos Finais"
+
+#: ../src/Frontend-GNOME/NotImplementedMessageDialog.cs:40
+msgid "Sorry, not implemented yet!"
+msgstr "Desculpe, não implementado ainda!"
+
+#. fill ListStore
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:185
+msgid "Character"
+msgstr "Caracter "
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:186
+msgid "Word"
+msgstr "Palavra"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:203
+msgid "Volatile"
+msgstr "Volátil"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:205
+msgid "Persistent"
+msgstr "Persistente"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:228
+msgid "No Proxy"
+msgstr "Sem Proxy"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+msgid "System Default"
+msgstr "Padrão do Sistema"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:244
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:140
+msgid "Connection"
+msgstr "Conexão"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:248
+msgid "Interface"
+msgstr "Interface"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:252
+msgid "Servers"
+msgstr "Servidores"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:259
+msgid "Filters"
+msgstr "Filtros"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:263
+msgid "Logging"
+msgstr "Registrando log"
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+msgid "Nicknames(s) field must not be empty."
+msgstr "Campo do(s) nick(s) não pode estar vazio."
+
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#, csharp-format
+msgid "Invalid highlight regex: '{0}'. Reason: {1}"
+msgstr "Regex de realçamento Inválido . '{0}', Razão: {1}"
+
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:81
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:106
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:265
+msgid "Name"
+msgstr "Nome"
+
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:86
+msgid "Topic"
+msgstr "Tópico"
+
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:115
+msgid ""
+"Searching for group chats without a filter is not recommended.  This may take a while, or may not work at all.\n"
+"Do you wish to continue?"
+msgstr "Procurando por grupo de chat sem filtro não é recomendado. Isso pode levar muito tempo, ou não funcionar.\nDeseja continuar?"
+
+#: ../src/Frontend-GNOME/FindGroupChatDialog.cs:156
+msgid "Error while fetching the list of group chats from the server."
+msgstr "Erro enquanto baixando lista com grupos de chat do servidor."
+
+#: ../src/Frontend-GNOME/Frontend.cs:400
+msgid "Disconnected from engine."
+msgstr "Desconectado do motor."
+
+#: ../src/Frontend-GNOME/Frontend.cs:442
+#, csharp-format
+msgid "Reconnecting to engine... (attempt {0})"
+msgstr "Reconectando ao motor... (Tentativa {0})"
+
+#: ../src/Frontend-GNOME/Frontend.cs:540
+#, csharp-format
+msgid "Cause: {0}"
+msgstr "Causa: {0}"
+
+#: ../src/Frontend-GNOME/Frontend.cs:666
+msgid ""
+"The frontend has lost the connection to the server.\n"
+"Do you want to reconnect now?"
+msgstr "O programa perdeu a conexão com o servidor.\nDeseja reconectar agora?"
+
+#: ../src/Frontend-GNOME/Frontend.cs:685
+msgid ""
+"Reconnecting to the server has failed.\n"
+"Do you want to try again?"
+msgstr "Reconexão ao servidor falhou.\nDeseja tentar novamente?"
+
+#: ../src/Frontend-GNOME/Frontend.cs:974
+msgid ""
+"The server has lost the connection to the frontend.\n"
+"Do you want to reconnect now?"
+msgstr "O servidor perdeu a conexão com o programa.\nDeseja reconectar agora?"
+
+#: ../src/Frontend-GNOME/NotifyManager.cs:336
+msgid "Show"
+msgstr "Mostrar"
+
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:58
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:233
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:70
+msgid "Protocol"
+msgstr "Protocolo"
+
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:59
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:71
+msgid "Hostname"
+msgstr "Nome do servidor"
+
+#: ../src/Frontend-GNOME/QuickConnectDialog.cs:162
+msgid "Unable to load server: "
+msgstr "Não foi possível carregar servidor:"
+
+#: ../src/Frontend-GNOME/ChatTypeWidget.cs:54
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:239
+msgid "Person / Private"
+msgstr "Pessoa / Privado"
+
+#: ../src/Frontend-GNOME/ChatTypeWidget.cs:55
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:240
+msgid "Group / Public"
+msgstr "Grupo / Público"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:71
+msgid "Engine Assistant - Smuxi"
+msgstr "Assistente de motor - Smuxi"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:93
+msgid "Add Smuxi Engine"
+msgstr "Adicionar Motor Smuxi"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:95
+msgid "Edit Smuxi Engine"
+msgstr "Editar moto Smuxi"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:204
+msgid "Credentials"
+msgstr "Credenciais"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:284
+msgid "Now you can use the Smuxi Engine"
+msgstr "Agora você pode usar o motor do Smuxi"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:287
+msgid "Thank you"
+msgstr "Obrigado"
+
+#: ../src/Frontend-GNOME/Views/Assistants/Engine/EngineAssistant.cs:304
+msgid ""
+"An engine with this name already exists! Please specify a different one."
+msgstr "O motor com esse nome já existe! Por favor especifique outro nome."
+
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+msgid "Enter which chat to join"
+msgstr "Entre qual chat você deseja entrar"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+msgid "About Smuxi"
+msgstr "Sobre Smuxi"
+
+#. TODO: add cmd+, accelerator
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+msgid "Preferences"
+msgstr "Preferências"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
+msgid "Unable to add server: "
+msgstr "Não foi possível adicionar servidor:"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+msgid ""
+"Switching to local engine will disconnect you from the current engine!\n"
+"Are you sure you want to do this?"
+msgstr "Mudando o motor vai fazer com que você desconecte do motor atual!\nTem certeza que deseja fazer isso?"
+
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+msgid ""
+"Switching the remote engine will disconnect you from the current engine!\n"
+"Are you sure you want to do this?"
+msgstr "Mudando para motor remoto você será desconectado do motor atual!\nTem certeza que deseja fazer isso?"
+
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#, csharp-format
+msgid "Day changed from {0} to {1}"
+msgstr "Dia mudado de {0} para {1}"
+
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#, csharp-format
+msgid "Day changed to {0}"
+msgstr "Dia mudado para {0}"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:120
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:130
+#, csharp-format
+msgid "Invalid filter regex: '{0}'. Reason: {1}"
+msgstr "Regex de filtro Inválido . '{0}', Razão: {1}"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:197
+msgid "Are you sure you want to delete the selected filter?"
+msgstr "Tem certeza que deseja apagar o filtro selecionado?"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:241
+msgid "Protocol / Server"
+msgstr "Protocolo / Servidor"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:248
+msgid "Chat Type"
+msgstr "Tipo de Chat"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:281
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:282
+msgid "Event"
+msgstr "Evento"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:289
+msgid "Type"
+msgstr "Tipo"
+
+#: ../src/Frontend-GNOME/Views/FilterListWidget.cs:314
+msgid "Pattern"
+msgstr "Padrão"
+
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+msgid "Low Bandwidth Mode is active: no messages synced."
+msgstr "Modo de pouca largura de banda está ativado: Nenhuma mensagem sincronizada."
+
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
+msgid "Show _Menubar"
+msgstr "Mostrar _Barra de Menu"
+
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#, csharp-format
+msgid "Retrieving user list for {0}..."
+msgstr "Pegando lista de usuário de {0}..."
+
+#. TRANSLATOR: this string will be appended to the one above
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+msgid "done."
+msgstr "Feito."
+
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+msgid "Person"
+msgstr "Pessoa"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+msgid ""
+"Closing the protocol chat will also close all open chats connected to it!\n"
+"Are you sure you want to do this?"
+msgstr "Fechando o protocolo do chat fechará também todos chats conectados a ele!\nCerteza que deseja fazer isso?"
+
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:189
+msgid "Are you sure you want to delete the selected server?"
+msgstr "Tem certeza que deseja apagar o servidor selecionado?"
+
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:245
+#: ../src/Frontend-GNOME/Preferences/ServerListView.cs:279
+msgid "Unable to edit server: "
+msgstr "Não foi possível editar o servidor:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:24
+msgid "Find"
+msgstr "Procurar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:44
+msgid "_Search for:"
+msgstr "_Procurar por:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:73
+msgid "_Match Case"
+msgstr "_Caso combinar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:85
+msgid "Search _Backwards"
+msgstr "Procuar_Atrás"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:97
+msgid "_Wrap Around"
+msgstr "_Quebrar perto de"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ChatFindDialog.cs:110
+msgid "Use _Regular Expressions"
+msgstr "Usar _Expressão Regular"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:23
+msgid "Smuxi - Find Group Chat"
+msgstr "Smuxi - Procurar Grupo de chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+msgid "_Name:"
+msgstr "_Nome:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.JoinWidget.cs:69
+msgid "Join"
+msgstr "Entrar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:55
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:56
+msgid "_Smuxi"
+msgstr "_Smuxi"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:58
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:59
+msgid "_Server"
+msgstr "_Servidor"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:62
+msgid "_Chat"
+msgstr "_Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:64
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:65
+msgid "_Engine"
+msgstr "_Motor"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:67
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:68
+msgid "_View"
+msgstr "_Visão"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:70
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:71
+msgid "_Help"
+msgstr "_Ajuda"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:73
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:75
+msgid "Connect"
+msgstr "Conectar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+msgid "Open Log"
+msgstr "Abrir Log"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:87
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:88
+msgid "_Preferences"
+msgstr "_Preferências"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:90
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:91
+msgid "_Quit"
+msgstr "_Sair"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:93
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:94
+msgid "_Connect"
+msgstr "_Conectar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:96
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:97
+msgid "_Add"
+msgstr "_Adicionar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:99
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:100
+msgid "_Manage"
+msgstr "_Administrar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:102
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:103
+msgid "_Open / Join Chat"
+msgstr "_Abrir / entrar chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:105
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:106
+msgid "_Find Group Chat"
+msgstr "_Procurar Grupo de Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:108
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:109
+msgid "C_lear All Activity"
+msgstr "L_impar todas atividades"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:111
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:112
+msgid "_Next Chat"
+msgstr "_Proximo Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:114
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:115
+msgid "_Previous Chat"
+msgstr "_Chat Anterior"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:117
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:118
+msgid "_Close"
+msgstr "_Fechar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:120
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:121
+msgid "_Use Local Engine"
+msgstr "_Usar Motor Local"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:123
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:124
+msgid "_Add Remote Engine"
+msgstr "_Adicionar Motor Remoto"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:126
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:127
+msgid "Switch Remote Engine"
+msgstr "Mudar motor remoto"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:129
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:130
+msgid "_Caret Mode"
+msgstr "_Modo Acento Circunflexo"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:132
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:133
+msgid "_Browse Mode"
+msgstr "_Modo de Navegação"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:138
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:139
+msgid "Show _Statusbar"
+msgstr "Mostrar _Barra de estatus"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
+msgid "Show _Join Bar"
+msgstr "Mostrar _Barra de entrar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
+msgid "_Fullscreen"
+msgstr "_Tela inteira"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+msgid "_About"
+msgstr "_Sobre"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+msgid "Find Group Chat"
+msgstr "Procurar Grupo de Chat"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "_Website"
+msgstr "_Site"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
+msgid "Smuxi - Connect"
+msgstr "Smuxi - Conectar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:206
+msgid "Smuxi - Preferences"
+msgstr "Smuxi - Preferências"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:295
+msgid "Nicknames:"
+msgstr "Apelidos:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1430
+msgid "<b> User List Position </b>"
+msgstr "<b> Posição da lista de usuários </b>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1441
+msgid "<b> Channel </b>"
+msgstr "<b> Canal </b>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1652
+msgid "<b>Channel Filters</b>"
+msgstr "<b> Filtro de Canais </b>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1669
+msgid "<b>User Filters</b>"
+msgstr "<b> Filtro de Usuário </b>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:42
+msgid "Use _SSH Tunnel"
+msgstr "Usar _Tunnel SSH"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:56
+msgid ""
+"<span size=\"small\">Enables the use of SSH for the connection.  This has a "
+"small performance impact, but is more secure and required when using NAT or "
+"port-based firewalls</span>"
+msgstr "<span size=\"small\">Habilitar o uso do SSH para a conexão. Com isso uma pequena perfomance será perdida, mas é bem mais seguro e é requirido quando usando NAT ou firewall com restrinções de portas</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:135
+msgid "SSH _Host:"
+msgstr "SSH_Servidor:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:146
+msgid "<span size=\"small\">DNS or IP address and port of the SSH server</span>"
+msgstr "<span size=\"small\">DNS ou endereço de IP e porta do servidor SSH</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:159
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:173
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:129
+msgid "_Port:"
+msgstr "_Porta:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:186
+msgid "<span size=\"small\">DNS or IP address and port of the Smuxi server</span>"
+msgstr "<span size=\"small\">DNS ou endereço de IP e porta do servidor Smuxi</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantConnectionWidget.cs:199
+msgid "_Smuxi Host:"
+msgstr "_Servidor Smuxi:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:52
+msgid "_SSH Username: (optional)"
+msgstr "_Nome de usuário SSH: (opcional)"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:75
+msgid ""
+"<span size=\"small\">Username which will be used to log into the SSH "
+"server</span>"
+msgstr "<span size=\"small\">Nome de usuário que será usado para fazer login no servidor SSH</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:95
+msgid "_SSH Password: (optional)"
+msgstr "_Senha SSH: (opcional)"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:119
+msgid ""
+"<span size=\"small\">Password which will be used to log into the SSH server."
+" The password is optional if SSH key authorization is used (see "
+"below).</span>"
+msgstr "<span size=\"small\">Senha que será usada para fazer login no servidor SSH. A senha é opcional se a chave SSH for usada(Veja mais abaixo).</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:140
+msgid "_SSH Keyfile: (optional)"
+msgstr "_Chave SSH: (opcional)"
+
+#. Container child vbox17.Gtk.Box+BoxChild
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:148
+msgid "Select a File"
+msgstr "Selecione o arquivo"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:161
+msgid ""
+"<span size=\"small\">SSH private keyfile which will be used to log into the "
+"SSH server</span>"
+msgstr "<span size=\"small\">Chave SSH privada que será usada para fazer login no servidor SSH</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:181
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:188
+msgid "_Username:"
+msgstr "_Nome de usuário:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:204
+msgid ""
+"<span size=\"small\">Username which will be used to log into the Smuxi "
+"server</span>"
+msgstr "<span size=\"small\">Nome de usuário que será usado para fazer login no servidor Smuxi</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:224
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:87
+msgid "_Password:"
+msgstr "_Senha:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:248
+msgid "<span size=\"small\">Password of the user</span>"
+msgstr "<span size=\"small\">Senha do usuário</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:268
+msgid "_Verify Password:"
+msgstr "_Verificar senha:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantCredentialsWidget.cs:292
+msgid "<span size=\"small\">Repeat the password for verification</span>"
+msgstr "<span size=\"small\">Repetir a senha para verificação</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantIntroWidget.cs:19
+msgid ""
+"Welcome to the Smuxi Engine Configuration Assistant.\n"
+"You need to enter some information before you can use the engine.\n"
+"\n"
+"Click \"Forward\" to begin."
+msgstr "Bem vindo ao assistente de configuração do motor do Smuxi.\nVocê precisa entrar algumas informações antes que possa usar o motor.\n\nClique \"Continuar\" para começar"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:36
+msgid "_Engine Name:"
+msgstr "_Nome Motor:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:59
+msgid "<span size=\"small\">Profile name of the new engine</span>"
+msgstr "<span size=\"small\">Nome do perfil do novo motor</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:80
+msgid "_Default Engine:"
+msgstr "_Motor Padrão:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:91
+msgid "Use as new default engine"
+msgstr "Usar como novo motor padrão"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.EngineAssistantNameWidget.cs:104
+msgid ""
+"<span size=\"small\">If enabled, the current engine will be the default next"
+" time Smuxi is started</span>"
+msgstr "<span size=\"small\">Se ativado, o motor atual será o padrão na proxima vez que o Smuxi iniciar</span>"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:20
+msgid "Smuxi - Open Chat"
+msgstr "Smuxi - Chat Aberto"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+msgid "_Type:"
+msgstr "_Tipo:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:54
+msgid "_Hostname:"
+msgstr "_Endereço Servidor:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:75
+msgid "_Network:"
+msgstr "_Rede:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:198
+msgid "_Protocol:"
+msgstr "_Protocolo:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:222
+msgid "Use Encryption"
+msgstr "Usar Encriptação"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:234
+msgid "Validate Server Certificate"
+msgstr "Validar Certificado do Servidor"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:254
+msgid "_On Connect Commands:"
+msgstr "_Comandos ao conectar:"
+
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:265
+msgid "_Ignore Commands"
+msgstr "_Comandos para ignorar"
diff --git a/po-Frontend-GNOME/sv.po b/po-Frontend-GNOME/sv.po
index 1e0708c..caefefc 100644
--- a/po-Frontend-GNOME/sv.po
+++ b/po-Frontend-GNOME/sv.po
@@ -9,8 +9,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:19+0200\n"
-"PO-Revision-Date: 2013-04-17 04:20+0000\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-19 13:35+0000\n"
 "Last-Translator: flugsio <flugsio at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
@@ -50,69 +50,73 @@ msgid "Encoding:"
 msgstr "Kodning:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "Konvertera UTF-8 tecken automatiskt"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "<b>Allmänt</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
 msgstr "Typ:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
 msgstr "Värd:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
 msgstr "Lösenord:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
 msgstr "Port:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
 msgstr "Visa lösenord"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "<b>Nätverksproxy</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
 msgstr "Kommando vid anslutning:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
 msgstr "Kommando vid uppstart:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "<b>Allmänna kommandon</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "_Anslutning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
 msgstr "Format för tidsstämpel:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "Buffrade rader:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "Buffrade rader i motorn"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -125,53 +129,53 @@ msgid ""
 "yy/yyyy = year"
 msgstr "ss = sekunder\nmm = minuter\nhh = timmar (01 - 12)\nHH = timmar (00 - 23)\ntt = AM/PM\n\ndd = dag\nMM = månad\nyy/yyyy = år"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "Typ av persistens:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
 msgstr "Flyktiga buffer-rader:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "Beständiga buffer-rader:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "<b>Meddelande-buffer</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
 msgstr "Kasta färger"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
 msgstr "Kasta formateringar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
 msgstr "Kasta UTF-8"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
 msgstr "Visa avancerade inställningar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "<b>Avancerat</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
 msgstr "Allmänt"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
@@ -181,7 +185,7 @@ msgstr "Topp"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -191,7 +195,7 @@ msgstr "Botten"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
@@ -201,7 +205,7 @@ msgstr "Vänster"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
@@ -212,236 +216,236 @@ msgstr "Höger"
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
 msgstr "Ingen"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> Position för flikar </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
 msgstr "Förstärk"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "Aktivitet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
 msgstr "Ingen aktivitet"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
 msgstr "Anslut/Lämna/Användartillstånd"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> Flikfärg </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
 msgstr "Byt automatiskt till nyligen öppnade person-chattar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
 msgstr "Byt automatiskt till nyligen öppnade grupp-chattar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
 msgstr "Flikar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
 msgstr "Kompletteringstecken:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
 msgstr "Kommandotecken:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
 msgstr "Antal kommandon i historik:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Bash-liknande komplettering"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> Inmatningsfält </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
 msgstr "Indata"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
 msgstr "Färg på smekanmn"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> Position för personlista </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
 msgstr "ÅSidosätt"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> Teckensnitt </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> Position för rubrik </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
 msgstr "Förgrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "Bakgrund"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> Färg </b>"
 
 #. This is a setting for character based line wrapping vs word based when
 #. showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
 msgstr "_Läge för radbrytning:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> Chatt </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
 msgstr "Förstärk ord"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "Pip vid förstärkning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> Förstärkning </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
 msgstr "Utdata"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
 msgstr "Aktivera"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
 msgstr "Visa alltid"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
 msgstr "Visa när fönster är minimerat"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
 msgstr "Visa när fönster är stängt"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> Ikon i notifieringsområdet </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
 msgstr "Visa Smuxi i meddelandemenyn"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "<b>Meddelandemenu</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
 msgstr "Visa notifieringsmeddelanden"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>Notifieringsmeddelanden</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
 msgstr "Notifiering"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
 msgstr "_Gränssnitt"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
 msgstr "_Servrar"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "_Filter"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
 msgstr "Aktivera"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
 msgstr "Logga filtrerade meddelanden"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "_Loggning"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
 msgstr "Smuxi - Server"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "Anslut automatiskt till server vid uppstart"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
 msgstr "Protokoll:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
 msgstr "Nätverk"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
 msgstr "Värdnamn:"
 
@@ -461,11 +465,11 @@ msgstr "Smuxi IRC-klient"
 msgid "Chat with other people on IRC"
 msgstr "Chatta med andra människor på IRC"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
 msgstr "Martin Bagge <brother at bsnet.se>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Smuxis webbplats"
 
@@ -539,14 +543,14 @@ msgstr "Fel: {0}"
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "Är du säker på att du vill radera motorn \"{0}\"?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
 msgstr "Du kommer att klistra in {0} rader. Vill du fortsätta?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "Kommandon för framdelen"
 
@@ -576,7 +580,7 @@ msgid "No Proxy"
 msgstr "Ingen Proxy"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
 msgstr "Systemstandard"
 
@@ -601,11 +605,11 @@ msgstr "Filter"
 msgid "Logging"
 msgstr "Loggning"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "Fältet för smeknamn kan inte lämnas tomt."
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "Ogiltigt mönster för framhävande: \"{0}\". Anledning: {1}"
@@ -630,33 +634,33 @@ msgstr "Sökning efter gruppchattar utan att använda filter är inte rekomender
 msgid "Error while fetching the list of group chats from the server."
 msgstr "Fel vid hämtning av lista för gruppchattar från servern."
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
 msgstr "Frånkopplad från motorn."
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
 msgstr "Återkopplar till motorn... (försök {0})"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "Anledning: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
 msgstr "Framdelen tappade anslutningen till server.\nVill du återansluta?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
 msgstr "Återanslutningsförsöket fungerade inte.\nVill du försöka igen?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
@@ -720,42 +724,42 @@ msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "En motor med detta namn finns reda. Ange ett annat."
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
 msgstr "Ange vilken chat att ansluta till"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
 msgstr "Om Smuxi"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
 msgstr "Alternativ"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
 msgstr "Kan inte lägga till server:"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Byte till lokal motor kommer att koppla bort dig från den aktuella motorn!\nÄr du säker på att du vill göra detta?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "Byte av fjärrmotor kommer att koppla bort dig från den aktuella motorn!\nÄr du säker på att du vill göra detta?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
 msgstr "Dag ändrades från {0} till {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "Dygnsskifte, {0}"
@@ -794,31 +798,35 @@ msgstr "Typ"
 msgid "Pattern"
 msgstr "Mönster"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
 msgstr "Låg bandbreddsläge är aktiverat: inga meddelanden synkroniserade."
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
 msgstr "Visa Menu"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "Hämtar användarlistan för {0}..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "klar"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "Person"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "Återanslut"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
@@ -862,7 +870,7 @@ msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - Hitta gruppchatt"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "_Namn:"
 
@@ -907,8 +915,8 @@ msgstr "Anslut"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
 msgstr "Öppna logg"
 
@@ -999,29 +1007,29 @@ msgstr "Visa _Statusbar"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr "Visa a_nslutningsbar"
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_Fullscreen"
 msgstr "_Fullskärm"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_About"
 msgstr "_Om"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
 msgstr "Hitta grupp-chat"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
 msgid "_Website"
 msgstr "_Webbplats"
 
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "Visa _Verktygsfält"
+
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
 msgstr "Smuxi - Anslut"
@@ -1181,7 +1189,7 @@ msgstr "<span size=\"small\">Om detta väljs kommer den aktuella motorn att bli
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - Öppen chatt"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_Typ:"
 
diff --git a/po-Frontend-GNOME/zh_CN.po b/po-Frontend-GNOME/zh_CN.po
index c131b99..ca3ca96 100644
--- a/po-Frontend-GNOME/zh_CN.po
+++ b/po-Frontend-GNOME/zh_CN.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2012-2013.
+# Dean Lee <xslidian at gmail.com>, 2012-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:19+0200\n"
-"PO-Revision-Date: 2013-04-14 14:10+0000\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-08-19 17:50+0000\n"
 "Last-Translator: Dean Lee <xslidian at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
@@ -49,69 +49,73 @@ msgid "Encoding:"
 msgstr "编码:"
 
 #: ../glade/smuxi-frontend-gnome.glade.h:7
+msgid "Automatically convert UTF-8 characters"
+msgstr "自动转换 UTF-8 字符"
+
+#: ../glade/smuxi-frontend-gnome.glade.h:8
 msgid "<b>General</b>"
 msgstr "<b>全局</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:8
+#: ../glade/smuxi-frontend-gnome.glade.h:9
 msgid "Type:"
 msgstr "类型:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:9
+#: ../glade/smuxi-frontend-gnome.glade.h:10
 msgid "Host:"
 msgstr "主机:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:10
+#: ../glade/smuxi-frontend-gnome.glade.h:11
 msgid "Password:"
 msgstr "密码:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:11
+#: ../glade/smuxi-frontend-gnome.glade.h:12
 msgid "Port:"
 msgstr "端口:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:12
+#: ../glade/smuxi-frontend-gnome.glade.h:13
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:170
 msgid "Show Password"
 msgstr "显示密码"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:13
+#: ../glade/smuxi-frontend-gnome.glade.h:14
 msgid "<b>Network Proxy</b>"
 msgstr "<b>网络代理</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:14
+#: ../glade/smuxi-frontend-gnome.glade.h:15
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:381
 msgid "On Connect Commands:"
 msgstr "连接时命令:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:15
+#: ../glade/smuxi-frontend-gnome.glade.h:16
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:427
 msgid "On Startup Commands:"
 msgstr "启动时命令:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:16
+#: ../glade/smuxi-frontend-gnome.glade.h:17
 msgid "<b>Global Commands</b>"
 msgstr "<b>全局命令</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:17
+#: ../glade/smuxi-frontend-gnome.glade.h:18
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:471
 msgid "C_onnection"
 msgstr "连接(_O)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:18
+#: ../glade/smuxi-frontend-gnome.glade.h:19
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:526
 msgid "Timestamp Format:"
 msgstr "时间戳格式:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:19
+#: ../glade/smuxi-frontend-gnome.glade.h:20
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:546
 msgid "Buffer Lines:"
 msgstr "缓冲行数:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:20
+#: ../glade/smuxi-frontend-gnome.glade.h:21
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:569
 msgid "Engine Buffer Lines:"
 msgstr "引擎缓冲行数:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:21
+#: ../glade/smuxi-frontend-gnome.glade.h:22
 msgid ""
 "ss = seconds\n"
 "mm = minutes\n"
@@ -124,53 +128,53 @@ msgid ""
 "yy/yyyy = year"
 msgstr "ss = 秒数\nmm = 分数\nhh = 小时数 (01 - 12)\nHH = 小时数 (00 - 23)\ntt = AM/PM\n\ndd = day\nMM = month\nyy/yyyy = year"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:30
+#: ../glade/smuxi-frontend-gnome.glade.h:31
 msgid "Persistency Type:"
 msgstr "持久类型:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:31
+#: ../glade/smuxi-frontend-gnome.glade.h:32
 msgid "Volatile Buffer Lines:"
 msgstr "临时缓冲行数:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:32
+#: ../glade/smuxi-frontend-gnome.glade.h:33
 msgid "Persistent Buffer Lines:"
 msgstr "持久缓冲行数:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:33
+#: ../glade/smuxi-frontend-gnome.glade.h:34
 msgid "<b>Message Buffer</b>"
 msgstr "<b>信息缓冲</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:34
+#: ../glade/smuxi-frontend-gnome.glade.h:35
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:628
 msgid "Strip Colors"
 msgstr "去除颜色"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:35
+#: ../glade/smuxi-frontend-gnome.glade.h:36
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:667
 msgid "Strip Formattings"
 msgstr "去除格式"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:36
+#: ../glade/smuxi-frontend-gnome.glade.h:37
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:707
 msgid "Strip UTF-8"
 msgstr "去除 UTF-8"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:37
+#: ../glade/smuxi-frontend-gnome.glade.h:38
 msgid "Show Advanced Settings"
 msgstr "显示高级设置"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:38
+#: ../glade/smuxi-frontend-gnome.glade.h:39
 msgid "<b>Advanced</b>"
 msgstr "<b>高级</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:39
+#: ../glade/smuxi-frontend-gnome.glade.h:40
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:725
 msgid "General"
 msgstr "全局"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:40
+#: ../glade/smuxi-frontend-gnome.glade.h:41
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:743
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:767
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1220
@@ -180,7 +184,7 @@ msgstr "顶部"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:41
+#: ../glade/smuxi-frontend-gnome.glade.h:42
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:780
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:802
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1261
@@ -190,7 +194,7 @@ msgstr "底部"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:42
+#: ../glade/smuxi-frontend-gnome.glade.h:43
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:816
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:841
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1335
@@ -200,7 +204,7 @@ msgstr "左边"
 
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:43
+#: ../glade/smuxi-frontend-gnome.glade.h:44
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:856
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:881
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1376
@@ -211,236 +215,236 @@ msgstr "右边"
 #. Container child vbox6.Gtk.Box+BoxChild
 #. Container child vbox11.Gtk.Box+BoxChild
 #. Container child vbox12.Gtk.Box+BoxChild
-#: ../glade/smuxi-frontend-gnome.glade.h:44
+#: ../glade/smuxi-frontend-gnome.glade.h:45
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:896
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1301
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1416
 msgid "None"
 msgstr "无"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:45
+#: ../glade/smuxi-frontend-gnome.glade.h:46
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:910
 msgid "<b> Tabs Position </b>"
 msgstr "<b> 标签位置 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:46
+#: ../glade/smuxi-frontend-gnome.glade.h:47
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:981
 msgid "Highlight"
 msgstr "高亮"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:47
+#: ../glade/smuxi-frontend-gnome.glade.h:48
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:961
 msgid "Activity"
 msgstr "活动"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:48
+#: ../glade/smuxi-frontend-gnome.glade.h:49
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:953
 msgid "No Activity"
 msgstr "无活动"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:49
+#: ../glade/smuxi-frontend-gnome.glade.h:50
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:971
 msgid "Join/Part/Mode"
 msgstr "加入/离开/模式"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:50
+#: ../glade/smuxi-frontend-gnome.glade.h:51
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1009
 msgid "<b> Tab Colors </b>"
 msgstr "<b> 标签颜色 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:51
+#: ../glade/smuxi-frontend-gnome.glade.h:52
 msgid "Automatically switch to newly opened person chats"
 msgstr "自动切换到新打开的单人聊天"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:52
+#: ../glade/smuxi-frontend-gnome.glade.h:53
 msgid "Automatically switch to newly opened group chats"
 msgstr "自动切换到新打开的群组聊天"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:53
+#: ../glade/smuxi-frontend-gnome.glade.h:54
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1022
 msgid "Tabs"
 msgstr "标签"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:54
+#: ../glade/smuxi-frontend-gnome.glade.h:55
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1092
 msgid "Completion Character:"
 msgstr "完成字符:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:55
+#: ../glade/smuxi-frontend-gnome.glade.h:56
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1112
 msgid "Command Character:"
 msgstr "命令字符:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:56
+#: ../glade/smuxi-frontend-gnome.glade.h:57
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1135
 msgid "Command History Size:"
 msgstr "命令历史数:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:57
+#: ../glade/smuxi-frontend-gnome.glade.h:58
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1160
 msgid "Bash-Style Completion"
 msgstr "Bash 式完成"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:58
+#: ../glade/smuxi-frontend-gnome.glade.h:59
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1172
 msgid "<b> Entry Field </b>"
 msgstr "<b> 预留字段 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:59
+#: ../glade/smuxi-frontend-gnome.glade.h:60
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1181
 msgid "Input"
 msgstr "输入"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:60
+#: ../glade/smuxi-frontend-gnome.glade.h:61
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1202
 msgid "Nick Colors"
 msgstr "昵称颜色"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:61
+#: ../glade/smuxi-frontend-gnome.glade.h:62
 msgid "<b> Person List Position </b>"
 msgstr "<b> 成员列表位置 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:62
+#: ../glade/smuxi-frontend-gnome.glade.h:63
 msgid "Override"
 msgstr "覆盖"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:63
+#: ../glade/smuxi-frontend-gnome.glade.h:64
 msgid "<b> Font </b>"
 msgstr "<b> 字体 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:64
+#: ../glade/smuxi-frontend-gnome.glade.h:65
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1315
 msgid "<b> Topic Position </b>"
 msgstr "<b> 主题位置 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:65
+#: ../glade/smuxi-frontend-gnome.glade.h:66
 msgid "Foreground"
 msgstr "前景"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:66
+#: ../glade/smuxi-frontend-gnome.glade.h:67
 msgid "Background"
 msgstr "背景"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:67
+#: ../glade/smuxi-frontend-gnome.glade.h:68
 msgid "<b> Color </b>"
 msgstr "<b> 颜色 </b>"
 
 #. This is a setting for character based line wrapping vs word based when
 #. showing messages
-#: ../glade/smuxi-frontend-gnome.glade.h:69
+#: ../glade/smuxi-frontend-gnome.glade.h:70
 msgid "_Wrap Mode:"
 msgstr "_自动换行模式:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:70
+#: ../glade/smuxi-frontend-gnome.glade.h:71
 msgid "<b> Chat </b>"
 msgstr "<b> 聊天 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:71
+#: ../glade/smuxi-frontend-gnome.glade.h:72
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1466
 msgid "Highlight words:"
 msgstr "高亮单词:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:72
+#: ../glade/smuxi-frontend-gnome.glade.h:73
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1490
 msgid "Beep on highlight"
 msgstr "高亮时鸣叫"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:73
+#: ../glade/smuxi-frontend-gnome.glade.h:74
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1502
 msgid "<b> Highlighting </b>"
 msgstr "<b> 高亮 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:74
+#: ../glade/smuxi-frontend-gnome.glade.h:75
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1514
 msgid "Output"
 msgstr "输出"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:75
+#: ../glade/smuxi-frontend-gnome.glade.h:76
 msgid "Enable"
 msgstr "启用"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:76
+#: ../glade/smuxi-frontend-gnome.glade.h:77
 msgid "Show always"
 msgstr "总是显示"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:77
+#: ../glade/smuxi-frontend-gnome.glade.h:78
 msgid "Show when window is minimized"
 msgstr "当窗口最小化时显示"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:78
+#: ../glade/smuxi-frontend-gnome.glade.h:79
 msgid "Show when window is closed"
 msgstr "当窗口关闭时显示"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:79
+#: ../glade/smuxi-frontend-gnome.glade.h:80
 msgid "<b> Notification Area Icon </b>"
 msgstr "<b> 通知区域图标 </b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:80
+#: ../glade/smuxi-frontend-gnome.glade.h:81
 msgid "Show Smuxi in the messaging menu"
 msgstr "在消息菜单中显示 Smuxi"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:81
+#: ../glade/smuxi-frontend-gnome.glade.h:82
 msgid "<b>Messaging Menu</b>"
 msgstr "<b>消息菜单</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:82
+#: ../glade/smuxi-frontend-gnome.glade.h:83
 msgid "Show notification popups"
 msgstr "显示通知弹出"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:83
+#: ../glade/smuxi-frontend-gnome.glade.h:84
 msgid "<b>Notification Popups</b>"
 msgstr "<b>通知弹出</b>"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:84
+#: ../glade/smuxi-frontend-gnome.glade.h:85
 msgid "Notification"
 msgstr "通知"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:85
+#: ../glade/smuxi-frontend-gnome.glade.h:86
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1523
 msgid "_Interface"
 msgstr "界面(_I)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:86
+#: ../glade/smuxi-frontend-gnome.glade.h:87
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1589
 msgid "_Servers"
 msgstr "服务器(_S)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:87
+#: ../glade/smuxi-frontend-gnome.glade.h:88
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.SteticPreferencesDialog.cs:1681
 msgid "_Filters"
 msgstr "过滤器(_F)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:88
+#: ../glade/smuxi-frontend-gnome.glade.h:89
 msgid "Enabled"
 msgstr "启用"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:89
+#: ../glade/smuxi-frontend-gnome.glade.h:90
 msgid "Log Filtered Messages"
 msgstr "记录经过滤的消息"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:90
+#: ../glade/smuxi-frontend-gnome.glade.h:91
 msgid "_Logging"
 msgstr "历史(_L)"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:91
+#: ../glade/smuxi-frontend-gnome.glade.h:92
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs:16
 msgid "Smuxi - Server"
 msgstr "Smuxi - 服务器"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:92
+#: ../glade/smuxi-frontend-gnome.glade.h:93
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerWidget.cs:209
 msgid "Automatically connect to server at startup"
 msgstr "启动时自动连接到服务器"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:93
+#: ../glade/smuxi-frontend-gnome.glade.h:94
 msgid "Protocol:"
 msgstr "协议:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:94
+#: ../glade/smuxi-frontend-gnome.glade.h:95
 msgid "Network:"
 msgstr "网络:"
 
-#: ../glade/smuxi-frontend-gnome.glade.h:95
+#: ../glade/smuxi-frontend-gnome.glade.h:96
 msgid "Hostname:"
 msgstr "主机名:"
 
@@ -460,11 +464,11 @@ msgstr "Smuxi IRC 客户端"
 msgid "Chat with other people on IRC"
 msgstr "和 IRC 上的其他人聊天"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:65
+#: ../src/Frontend-GNOME/AboutDialog.cs:66
 msgid "translator-credits"
 msgstr "Dean Lee <xslidian+smuxi at gmail.com>"
 
-#: ../src/Frontend-GNOME/AboutDialog.cs:72
+#: ../src/Frontend-GNOME/AboutDialog.cs:73
 msgid "Smuxi Website"
 msgstr "Smuxi 网站"
 
@@ -538,14 +542,14 @@ msgstr "错误: {0}"
 msgid "Are you sure you want to delete the engine \"{0}\"?"
 msgstr "您确实要删除引擎 \"{0}\" 吗?"
 
-#: ../src/Frontend-GNOME/Entry.cs:474
+#: ../src/Frontend-GNOME/Entry.cs:482
 #, csharp-format
 msgid "You are going to paste {0} lines. Do you want to continue?"
 msgstr "您正在粘贴 {0} 行。是否继续?"
 
 #. TRANSLATOR: this line is used as a label / category for a
 #. list of commands below
-#: ../src/Frontend-GNOME/Entry.cs:587
+#: ../src/Frontend-GNOME/Entry.cs:595
 msgid "Frontend Commands"
 msgstr "前端命令"
 
@@ -575,7 +579,7 @@ msgid "No Proxy"
 msgstr "无代理"
 
 #: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:230
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:318
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:326
 msgid "System Default"
 msgstr "系统默认"
 
@@ -600,11 +604,11 @@ msgstr "过滤器"
 msgid "Logging"
 msgstr "历史"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:666
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:674
 msgid "Nicknames(s) field must not be empty."
 msgstr "昵称字段不能为空。"
 
-#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:857
+#: ../src/Frontend-GNOME/Preferences/PreferencesDialog.cs:870
 #, csharp-format
 msgid "Invalid highlight regex: '{0}'. Reason: {1}"
 msgstr "高亮正则表达式无效: '{0}'。原因: {1}"
@@ -629,33 +633,33 @@ msgstr "不建议不用过滤器搜索群组聊天。可能要耗费一些时间
 msgid "Error while fetching the list of group chats from the server."
 msgstr "从服务器装载群组聊天列表出错。"
 
-#: ../src/Frontend-GNOME/Frontend.cs:400
+#: ../src/Frontend-GNOME/Frontend.cs:401
 msgid "Disconnected from engine."
 msgstr "从引擎断开连接。"
 
-#: ../src/Frontend-GNOME/Frontend.cs:442
+#: ../src/Frontend-GNOME/Frontend.cs:443
 #, csharp-format
 msgid "Reconnecting to engine... (attempt {0})"
 msgstr "正在重新连接到引擎... (第 {0} 次尝试)"
 
-#: ../src/Frontend-GNOME/Frontend.cs:540
+#: ../src/Frontend-GNOME/Frontend.cs:542
 #, csharp-format
 msgid "Cause: {0}"
 msgstr "原因: {0}"
 
-#: ../src/Frontend-GNOME/Frontend.cs:666
+#: ../src/Frontend-GNOME/Frontend.cs:668
 msgid ""
 "The frontend has lost the connection to the server.\n"
 "Do you want to reconnect now?"
 msgstr "前端与服务器之间的连接已丢失。\n是否希望现在重新连接?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:685
+#: ../src/Frontend-GNOME/Frontend.cs:687
 msgid ""
 "Reconnecting to the server has failed.\n"
 "Do you want to try again?"
 msgstr "重新连接到服务器失败。\n是否重试?"
 
-#: ../src/Frontend-GNOME/Frontend.cs:974
+#: ../src/Frontend-GNOME/Frontend.cs:995
 msgid ""
 "The server has lost the connection to the frontend.\n"
 "Do you want to reconnect now?"
@@ -719,42 +723,42 @@ msgid ""
 "An engine with this name already exists! Please specify a different one."
 msgstr "已存在同名引擎! 请另外指定一个。"
 
-#: ../src/Frontend-GNOME/Views/JoinWidget.cs:87
+#: ../src/Frontend-GNOME/Views/JoinWidget.cs:89
 msgid "Enter which chat to join"
 msgstr "输入要加入的聊天"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:140
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
 msgid "About Smuxi"
 msgstr "关于 Smuxi"
 
 #. TODO: add cmd+, accelerator
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:144
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:148
 msgid "Preferences"
 msgstr "偏好设置"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:238
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:242
 #: ../src/Frontend-GNOME/Preferences/ServerListView.cs:227
 msgid "Unable to add server: "
 msgstr "无法添加服务器: "
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:359
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:363
 msgid ""
 "Switching to local engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "切换到本地引擎会将您与当前引擎断开!\n您确实大赛这样做吗?"
 
-#: ../src/Frontend-GNOME/Views/MenuWidget.cs:403
+#: ../src/Frontend-GNOME/Views/MenuWidget.cs:407
 msgid ""
 "Switching the remote engine will disconnect you from the current engine!\n"
 "Are you sure you want to do this?"
 msgstr "切换到远程引擎会将您与当前引擎断开!\n您确实大赛这样做吗?"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:273
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:274
 #, csharp-format
 msgid "Day changed from {0} to {1}"
 msgstr "天数由 {0} 变为 {1}"
 
-#: ../src/Frontend-GNOME/Views/MessageTextView.cs:277
+#: ../src/Frontend-GNOME/Views/MessageTextView.cs:278
 #, csharp-format
 msgid "Day changed to {0}"
 msgstr "日期已改为 {0}"
@@ -793,31 +797,35 @@ msgstr "类型"
 msgid "Pattern"
 msgstr "匹配"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:538
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:526
 msgid "Low Bandwidth Mode is active: no messages synced."
 msgstr "低带宽模式未启用: 未同步任何信息。"
 
-#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:764
+#: ../src/Frontend-GNOME/Views/Chats/ChatView.cs:752
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:135
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:136
 msgid "Show _Menubar"
 msgstr "显示菜单栏(_M)"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:275
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:299
 #, csharp-format
 msgid "Retrieving user list for {0}..."
 msgstr "正在检索 {0} 的用户列表..."
 
 #. TRANSLATOR: this string will be appended to the one above
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:309
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:336
 msgid "done."
 msgstr "完成。"
 
-#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:320
+#: ../src/Frontend-GNOME/Views/Chats/GroupChatView.cs:368
 msgid "Person"
 msgstr "成员"
 
-#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:146
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:109
+msgid "Reconnect"
+msgstr "重新连接"
+
+#: ../src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs:154
 msgid ""
 "Closing the protocol chat will also close all open chats connected to it!\n"
 "Are you sure you want to do this?"
@@ -861,7 +869,7 @@ msgid "Smuxi - Find Group Chat"
 msgstr "Smuxi - 查找群组聊天"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.FindGroupChatDialog.cs:47
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:71
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:73
 msgid "_Name:"
 msgstr "名称(_N):"
 
@@ -906,8 +914,8 @@ msgstr "连接"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:77
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:79
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:151
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
 msgid "Open Log"
 msgstr "打开聊天历史"
 
@@ -998,29 +1006,29 @@ msgstr "显示状态栏(_S)"
 
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:141
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:142
-msgid "Show _Join Bar"
-msgstr "显示加入栏(_J)"
-
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_Fullscreen"
 msgstr "全屏(_F)"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:147
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:148
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:144
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:145
 msgid "_About"
 msgstr "关于(_A)"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:153
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:150
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:152
 msgid "Find Group Chat"
 msgstr "查找群组聊天"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:154
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:155
 msgid "_Website"
 msgstr "网站(_W)"
 
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:157
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs:158
+msgid "Show _Toolbar"
+msgstr "显示工具栏(_T)"
+
 #: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.QuickConnectDialog.cs:19
 msgid "Smuxi - Connect"
 msgstr "Smuxi - 连接"
@@ -1180,7 +1188,7 @@ msgstr "<span size=\"small\">如果启用,Smuxi 下次启动时当前引擎将
 msgid "Smuxi - Open Chat"
 msgstr "Smuxi - 开放聊天"
 
-#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:61
+#: ../src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.OpenChatDialog.cs:63
 msgid "_Type:"
 msgstr "_类型:"
 
diff --git a/po-Frontend/LINGUAS b/po-Frontend/LINGUAS
index ac32a9e..16de36d 100644
--- a/po-Frontend/LINGUAS
+++ b/po-Frontend/LINGUAS
@@ -10,5 +10,6 @@ hr
 it
 pl
 pt
+pt_BR
 sv
 zh_CN
diff --git a/po-Frontend/POTFILES.skip b/po-Frontend/POTFILES.skip
index b7e421f..c1475e3 100644
--- a/po-Frontend/POTFILES.skip
+++ b/po-Frontend/POTFILES.skip
@@ -2,12 +2,14 @@ glade/
 src/Common/
 src/Frontend-GNOME/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-STFL/
 src/Frontend-SWF/
 src/Frontend-WPF/
 src/Engine/
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
diff --git a/po-Frontend/cs.po b/po-Frontend/cs.po
index 6c14519..10695dd 100644
--- a/po-Frontend/cs.po
+++ b/po-Frontend/cs.po
@@ -1,60 +1,70 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2009 - 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-frontend 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-15 13:51+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-05-22 18:03+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
-#: ../src/Frontend/CommandManager.cs:143
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "Neznámý příkaz: {0}"
 
-#: ../src/Frontend/EngineManager.cs:292
+#: ../src/Frontend/CommandManager.cs:320
+#, csharp-format
+msgid "Not enough parameters for {0} command"
+msgstr "Nedostatek parametrů pro příkaz {0}"
+
+#: ../src/Frontend/EngineManager.cs:122
+msgid "Engine must not be empty."
+msgstr "Engine nesmí být prázdný."
+
+#: ../src/Frontend/EngineManager.cs:133
+msgid "Engine does not exist."
+msgstr "Engine neexistuje."
+
+#: ../src/Frontend/EngineManager.cs:317
 #, csharp-format
-msgid "Unknown channel ({0}) - only the following channel types are supported:"
+msgid ""
+"Unknown channel ({0}) - only the following channel types are supported:"
 msgstr "Neznámý kanál ({0}) - podporovány jsou pouze následující typy kanálů:"
 
-#: ../src/Frontend/EngineManager.cs:301
+#: ../src/Frontend/EngineManager.cs:326
 msgid ""
 "Registration with engine failed!  The username and/or password were wrong - "
 "please verify them."
-msgstr ""
-"Registrace selhala!  Uživatelské jméno nebo heslo bylo chybné - zkontrolujte "
-"je prosím."
+msgstr "Registrace selhala!  Uživatelské jméno nebo heslo bylo chybné - zkontrolujte je prosím."
 
-#: ../src/Frontend/SshTunnelManager.cs:146
+#: ../src/Frontend/SshTunnelManager.cs:144
 msgid "SSH client application was not found: "
 msgstr "Klientská aplikace SSH nebyla nalezena: "
 
-#: ../src/Frontend/SshTunnelManager.cs:149
+#: ../src/Frontend/SshTunnelManager.cs:147
 msgid ""
 "SSH client must be either OpenSSH (ssh) or Plink (plink.exe, not putty.exe)"
-msgstr ""
-"Klient SSH musí být buď OpenSSH (ssh) nebo Plink (plink.exe, nikoli putty."
-"exe)"
+msgstr "Klient SSH musí být buď OpenSSH (ssh) nebo Plink (plink.exe, nikoli putty.exe)"
 
-#: ../src/Frontend/SshTunnelManager.cs:186
+#: ../src/Frontend/SshTunnelManager.cs:184
 #, csharp-format
 msgid ""
 "The local SSH forwarding port {0} is already in use. Is there an old SSH "
 "tunnel still active?"
-msgstr ""
-"Místní forwarding SSH port {0} se již používá. Není stále aktivní dřívější "
-"tunel SSH?"
+msgstr "Místní forwarding SSH port {0} se již používá. Není stále aktivní dřívější tunel SSH?"
 
-#: ../src/Frontend/SshTunnelManager.cs:210
+#: ../src/Frontend/SshTunnelManager.cs:208
 #, csharp-format
 msgid ""
 "SSH tunnel setup failed (exit code: {0})\n"
@@ -66,18 +76,19 @@ msgid ""
 "{3}\n"
 "Program Output:\n"
 "{4}\n"
-msgstr ""
-"Nastavení tunelu SSH selhalo (exit code: {0})\n"
-"\n"
-"Program SSH: {1}\n"
-"Parametry SSH: {2}\n"
-"\n"
-"Chyba programu:\n"
-"{3}\n"
-"Výstup programu:\n"
-"{4}\n"
+msgstr "Nastavení tunelu SSH selhalo (exit code: {0})\n\nProgram SSH: {1}\nParametry SSH: {2}\n\nChyba programu:\n{3}\nVýstup programu:\n{4}\n"
 
-#: ../src/Frontend/SshTunnelManager.cs:405
+#: ../src/Frontend/SshTunnelManager.cs:329
+#: ../src/Frontend/SshTunnelManager.cs:475
+msgid "SSH keyfile not found."
+msgstr "Soubor s klíčem SSH nenalezen."
+
+#: ../src/Frontend/SshTunnelManager.cs:335
+#: ../src/Frontend/SshTunnelManager.cs:481
+msgid "SSH keyfile could not be read."
+msgstr "Načtení souboru s klíčem SSH se nezdařilo."
+
+#: ../src/Frontend/SshTunnelManager.cs:423
 #, csharp-format
 msgid ""
 "OpenSSH version number not found (exit code: {0})\n"
@@ -88,16 +99,21 @@ msgid ""
 "{2}\n"
 "Program Output:\n"
 "{3}\n"
-msgstr ""
-"Nenalezeno číslo verze OpenSSH (exit code: {0})\n"
+msgstr "Nenalezeno číslo verze OpenSSH (exit code: {0})\n\nProgram SSH: {1}\n\nChyba programu:\n{2}\nVýstup programu:\n{3}\n"
+
+#: ../src/Frontend/SshTunnelManager.cs:466
+msgid "PuTTY / Plink requires a username to be set."
+msgstr "PuTTY / Plink potřebuje mít nastavené uživatelské jméno."
+
+#: ../src/Frontend/SshTunnelManager.cs:554
+#, csharp-format
+msgid ""
+"Plink version number not found (exit code: {0})\n"
 "\n"
-"Program SSH: {1}\n"
+"SSH program: {1}\n"
 "\n"
-"Chyba programu:\n"
+"Program Error:\n"
 "{2}\n"
-"Výstup programu:\n"
+"Program Output:\n"
 "{3}\n"
-
-#: ../src/Frontend/SshTunnelManager.cs:441
-msgid "PuTTY / Plink requires a username to be set."
-msgstr "PuTTY / Plink potřebuje mít nastavené uživatelské jméno."
+msgstr "Číslo verze programu Plink nenalezeno (kód ukončení: {0})\n\nProgram SSH: {1}\n\nChyba programu:\n{2}\n\nVýstup programu:\n{3}\n"
diff --git a/po-Frontend/da.po b/po-Frontend/da.po
index f1f543a..0beb976 100644
--- a/po-Frontend/da.po
+++ b/po-Frontend/da.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011,2013.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011,2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:18+0200\n"
-"PO-Revision-Date: 2013-04-16 06:17+0000\n"
-"Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -18,12 +18,12 @@ msgstr ""
 "Language: da\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend/CommandManager.cs:255
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "Ukendt kommando: {0}"
 
-#: ../src/Frontend/CommandManager.cs:264
+#: ../src/Frontend/CommandManager.cs:320
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Ikke nok parametre for kommandoen {0}"
diff --git a/po-Frontend/de.po b/po-Frontend/de.po
index 0d44a3c..b7d7a4f 100644
--- a/po-Frontend/de.po
+++ b/po-Frontend/de.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2011,2013.
+# Bianca Mix <heavydemon at freenet.de>, 2011,2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:18+0200\n"
-"PO-Revision-Date: 2013-04-14 19:28+0000\n"
-"Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -18,12 +18,12 @@ msgstr ""
 "Language: de\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend/CommandManager.cs:255
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "Unbekannter Befehl: {0}"
 
-#: ../src/Frontend/CommandManager.cs:264
+#: ../src/Frontend/CommandManager.cs:320
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Nicht genügend Parameter für Kommando {0}"
diff --git a/po-Frontend/fr.po b/po-Frontend/fr.po
index 261d79e..44b40ab 100644
--- a/po-Frontend/fr.po
+++ b/po-Frontend/fr.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:41+0200\n"
+"POT-Creation-Date: 2013-08-19 12:17+0200\n"
 "PO-Revision-Date: 2013-04-10 22:38+0100\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
 "Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
@@ -18,12 +18,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
 
-#: ../src/Frontend/CommandManager.cs:255
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "Commande inconnue : {0}"
 
-#: ../src/Frontend/CommandManager.cs:264
+#: ../src/Frontend/CommandManager.cs:320
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Pas assez de paramètres pour la commande {0}"
diff --git a/po-Frontend/pt_BR.po b/po-Frontend/pt_BR.po
new file mode 100644
index 0000000..9ed9d2f
--- /dev/null
+++ b/po-Frontend/pt_BR.po
@@ -0,0 +1,119 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:18+0200\n"
+"PO-Revision-Date: 2013-07-15 00:19+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Frontend/CommandManager.cs:255
+#, csharp-format
+msgid "Unknown Command: {0}"
+msgstr "Comando desconhecido: {0}"
+
+#: ../src/Frontend/CommandManager.cs:264
+#, csharp-format
+msgid "Not enough parameters for {0} command"
+msgstr "Parâmetro insuficiente para o comando {0}"
+
+#: ../src/Frontend/EngineManager.cs:122
+msgid "Engine must not be empty."
+msgstr "Motor não pode estar vazio."
+
+#: ../src/Frontend/EngineManager.cs:133
+msgid "Engine does not exist."
+msgstr "Motor não existe."
+
+#: ../src/Frontend/EngineManager.cs:317
+#, csharp-format
+msgid ""
+"Unknown channel ({0}) - only the following channel types are supported:"
+msgstr "Canal desconhecido ({0}) - Somente os seguintes tipos de canais são suportados:"
+
+#: ../src/Frontend/EngineManager.cs:326
+msgid ""
+"Registration with engine failed!  The username and/or password were wrong - "
+"please verify them."
+msgstr "Registro do motor falhou! O nome de usuário e/ou senha estão errados - por favor verifique-os"
+
+#: ../src/Frontend/SshTunnelManager.cs:144
+msgid "SSH client application was not found: "
+msgstr "Programa de cliente SSH não encontrado:"
+
+#: ../src/Frontend/SshTunnelManager.cs:147
+msgid ""
+"SSH client must be either OpenSSH (ssh) or Plink (plink.exe, not putty.exe)"
+msgstr "O cliente SSH deve ser ou OpenSSH(ssh) ou Plink (plink.exe, não putty.exe)"
+
+#: ../src/Frontend/SshTunnelManager.cs:184
+#, csharp-format
+msgid ""
+"The local SSH forwarding port {0} is already in use. Is there an old SSH "
+"tunnel still active?"
+msgstr "A porta {0} que será feito o forwarding já está em uso. Você tem um antigo tunel SSH ainda ativo?"
+
+#: ../src/Frontend/SshTunnelManager.cs:208
+#, csharp-format
+msgid ""
+"SSH tunnel setup failed (exit code: {0})\n"
+"\n"
+"SSH program: {1}\n"
+"SSH parameters: {2}\n"
+"\n"
+"Program Error:\n"
+"{3}\n"
+"Program Output:\n"
+"{4}\n"
+msgstr "Criação do Tunel SSh falhou (código de saída: {0})\n\nPrograma SSH: {1}\nParâmetros SSH: {2}\n\nErro do programa:\n{3}\nSaída do programa:\n{4}\n"
+
+#: ../src/Frontend/SshTunnelManager.cs:329
+#: ../src/Frontend/SshTunnelManager.cs:475
+msgid "SSH keyfile not found."
+msgstr "Arquivo-chave SSH não encontrado."
+
+#: ../src/Frontend/SshTunnelManager.cs:335
+#: ../src/Frontend/SshTunnelManager.cs:481
+msgid "SSH keyfile could not be read."
+msgstr "Arquivo-chave SSH não pôde ser lido."
+
+#: ../src/Frontend/SshTunnelManager.cs:423
+#, csharp-format
+msgid ""
+"OpenSSH version number not found (exit code: {0})\n"
+"\n"
+"SSH program: {1}\n"
+"\n"
+"Program Error:\n"
+"{2}\n"
+"Program Output:\n"
+"{3}\n"
+msgstr "Versão do OpenSSH não encontrada (código de saída: {0})\n\nPrograma SSH: {1}\n\nErro do programa:\n{2}\nSaída do programa:\n{3}\n"
+
+#: ../src/Frontend/SshTunnelManager.cs:466
+msgid "PuTTY / Plink requires a username to be set."
+msgstr "PuTTY / Plink necessita de um nome de usuário para ser usado. "
+
+#: ../src/Frontend/SshTunnelManager.cs:554
+#, csharp-format
+msgid ""
+"Plink version number not found (exit code: {0})\n"
+"\n"
+"SSH program: {1}\n"
+"\n"
+"Program Error:\n"
+"{2}\n"
+"Program Output:\n"
+"{3}\n"
+msgstr "Versão do Plink não encontrada (código de saída: {0})\n\nPrograma SSH: {1}\n\nErro do programa:\n{2}\nSaída do programa:\n{3}\n"
diff --git a/po-Frontend/sv.po b/po-Frontend/sv.po
index 07a13c1..44f15a1 100644
--- a/po-Frontend/sv.po
+++ b/po-Frontend/sv.po
@@ -9,9 +9,9 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:18+0200\n"
-"PO-Revision-Date: 2013-04-17 04:21+0000\n"
-"Last-Translator: flugsio <flugsio at gmail.com>\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -19,12 +19,12 @@ msgstr ""
 "Language: sv\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: ../src/Frontend/CommandManager.cs:255
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "Okänt kommando: {0}"
 
-#: ../src/Frontend/CommandManager.cs:264
+#: ../src/Frontend/CommandManager.cs:320
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "Inte tillräckligt med parametrar för kommandot {0}"
diff --git a/po-Frontend/zh_CN.po b/po-Frontend/zh_CN.po
index f281ad2..950921b 100644
--- a/po-Frontend/zh_CN.po
+++ b/po-Frontend/zh_CN.po
@@ -3,14 +3,14 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2012-2013.
+# Dean Lee <xslidian at gmail.com>, 2012-2013
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2013-04-14 10:18+0200\n"
-"PO-Revision-Date: 2013-04-14 14:00+0000\n"
-"Last-Translator: Dean Lee <xslidian at gmail.com>\n"
+"POT-Creation-Date: 2013-08-19 14:09+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
 "Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -18,12 +18,12 @@ msgstr ""
 "Language: zh_CN\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: ../src/Frontend/CommandManager.cs:255
+#: ../src/Frontend/CommandManager.cs:311
 #, csharp-format
 msgid "Unknown Command: {0}"
 msgstr "未知命令: {0}"
 
-#: ../src/Frontend/CommandManager.cs:264
+#: ../src/Frontend/CommandManager.cs:320
 #, csharp-format
 msgid "Not enough parameters for {0} command"
 msgstr "{0} 命令参数不足"
diff --git a/po-Server/LINGUAS b/po-Server/LINGUAS
index fcddca7..95cc3bb 100644
--- a/po-Server/LINGUAS
+++ b/po-Server/LINGUAS
@@ -7,5 +7,6 @@ hr
 it
 pl
 pt
+pt_BR
 sv
 zh_CN
diff --git a/po-Server/POTFILES.skip b/po-Server/POTFILES.skip
index 66cc22d..5694bf0 100644
--- a/po-Server/POTFILES.skip
+++ b/po-Server/POTFILES.skip
@@ -3,12 +3,14 @@ src/Common/
 src/Engine/
 src/Engine-Campfire/
 src/Engine-IRC/
+src/Engine-JabbR/
 src/Engine-MSNP/
 src/Engine-OSCAR/
 src/Engine-XMPP/
 src/Engine-Twitter/
 src/Frontend/
 src/Frontend-GNOME-IRC/
+src/Frontend-GNOME-XMPP/
 src/Frontend-GNOME/
 src/Frontend-STFL/
 src/Frontend-SWF/
diff --git a/po-Server/cs.po b/po-Server/cs.po
index 6d54de0..caf0e05 100644
--- a/po-Server/cs.po
+++ b/po-Server/cs.po
@@ -1,110 +1,132 @@
-# Smuxi - IRC client for sophisticated users
-# Copyright (C) 2005-2009 Mirco Bauer <meebey at meebey.net>
-# This file is distributed under the same license as the Smuxi package.
-# Michal Simunek <michal.simunek at gmail.com>, 2010.
-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Ondřej Hošek <ondra.hosek at gmail.com>, 2013
 msgid ""
 msgstr ""
-"Project-Id-Version: smuxi-server 0.6.4.1-1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-15 01:40+0200\n"
-"PO-Revision-Date: 2010-07-19 11:31+0200\n"
-"Last-Translator: Michal Simunek <michal.simunek at gmail.com>\n"
-"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
-"Language: cs\n"
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-08-19 14:08+0200\n"
+"PO-Revision-Date: 2013-05-22 17:22+0000\n"
+"Last-Translator: Ondřej Hošek <ondra.hosek at gmail.com>\n"
+"Language-Team: Czech (http://www.transifex.com/projects/p/smuxi/language/cs/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
 
-#: ../src/Server/Main.cs:69
+#: ../src/Server/Main.cs:71
 msgid "Add user to Server"
 msgstr "Přidat uživatele na server"
 
-#: ../src/Server/Main.cs:78
+#: ../src/Server/Main.cs:80
 msgid "Modify existing user of Server"
 msgstr "Upravit existujícího uživatele serveru"
 
-#: ../src/Server/Main.cs:87
+#: ../src/Server/Main.cs:89
 msgid "Delete user from Server"
 msgstr "Smazat uživatele ze serveru"
 
-#: ../src/Server/Main.cs:96
+#: ../src/Server/Main.cs:98
 msgid "List all existing users of Server"
 msgstr "Procházet všechny existující uživatele serveru"
 
-#: ../src/Server/Main.cs:105
+#: ../src/Server/Main.cs:107
 msgid "User to create, modify or delete"
 msgstr "Uživatel, který se má přidat, upravit či smazat"
 
-#: ../src/Server/Main.cs:114
+#: ../src/Server/Main.cs:116
 msgid "Password of the user when creating or modifying a user"
 msgstr "Heslo vytvářeného či upravovaného uživatele"
 
-#: ../src/Server/Main.cs:123
+#: ../src/Server/Main.cs:125
 msgid "Enable debug output"
 msgstr "Povolit ladicí informace"
 
-#: ../src/Server/Main.cs:131
+#: ../src/Server/Main.cs:133
+msgid ""
+"Optimize message buffers and exit (valid values: none, defrag, index, all)"
+msgstr "Optimalizovat buffery zpráv a ukončit (platné hodnoty: none, defrag, index, all)"
+
+#: ../src/Server/Main.cs:146
 msgid "Show this help"
 msgstr "Ukázat tuto nápovědu"
 
-#: ../src/Server/Main.cs:133
+#: ../src/Server/Main.cs:148
 msgid "Usage: smuxi-server [options]"
 msgstr "Používání: smuxi-server [volby]"
 
-#: ../src/Server/Main.cs:135
+#: ../src/Server/Main.cs:150
 msgid "Options:"
 msgstr "Volby:"
 
-#: ../src/Server/Main.cs:146
+#: ../src/Server/Main.cs:161
 #, csharp-format
 msgid "Unknown option: '{0}'"
 msgstr "Neznámá volba: '{0}'"
 
-#: ../src/Server/Main.cs:170
+#: ../src/Server/Main.cs:188
 #, csharp-format
 msgid "Command line error: {0}"
 msgstr "Chybný příkaz: {0}"
 
-#: ../src/Server/Main.cs:214
+#: ../src/Server/Main.cs:232
 msgid ""
-"At most one of --add-user, --modify-user, and --delete-user may be used at a "
-"time."
-msgstr ""
-"V současné době můžete použít jednu z těchto voleb: --add-user, --modify-user "
-"a --delete-user."
+"At most one of --add-user, --modify-user, and --delete-user may be used at a"
+" time."
+msgstr "V současné době můžete použít jednu z těchto voleb: --add-user, --modify-user a --delete-user."
 
-#: ../src/Server/Main.cs:224
+#: ../src/Server/Main.cs:242
 msgid "You must specify a username with the --username option."
 msgstr "U volby --username musíte zadat uživatelské jméno."
 
-#: ../src/Server/Main.cs:230
+#: ../src/Server/Main.cs:248
 msgid "Username must not be empty."
 msgstr "Uživatelské jméno nemůže být prázdné."
 
-#: ../src/Server/Main.cs:240
+#: ../src/Server/Main.cs:258
 msgid "You must specify a password with the --password option."
 msgstr "U volby --password musíte zadat heslo."
 
-#: ../src/Server/Main.cs:246
+#: ../src/Server/Main.cs:264
 msgid "Password must not be empty."
 msgstr "Heslo nemůže být prázdné."
 
-#: ../src/Server/Main.cs:263
+#: ../src/Server/Main.cs:283
+#, csharp-format
+msgid ""
+"Invalid optimization value passed to --optimize-message-buffer, valid values"
+" are: {0}"
+msgstr "Neplatná hodnota předaná volbě --optimize-message-buffer; platné hodnoty jsou: {0}"
+
+#: ../src/Server/Main.cs:303
 #, csharp-format
 msgid "User \"{0}\" successfully added to server."
 msgstr "Uživatel \"{0}\" byl úspěšně přidán na server."
 
-#: ../src/Server/Main.cs:272
+#: ../src/Server/Main.cs:312
 #, csharp-format
 msgid "User \"{0}\" successfully modified."
 msgstr "Uživatel \"{0}\" byl úspěšně upraven."
 
-#: ../src/Server/Main.cs:281
+#: ../src/Server/Main.cs:321
 #, csharp-format
 msgid "User \"{0}\" successfully deleted from server."
 msgstr "Uživatel \"{0}\" byl úspěšně smazán ze serveru."
 
-#: ../src/Server/Main.cs:288
+#: ../src/Server/Main.cs:328
 msgid "Users:"
 msgstr "Uživatelé:"
+
+#: ../src/Server/Main.cs:376
+#, csharp-format
+msgid "Successfully optimized {0} message buffers."
+msgstr "Podařilo se optimalizovat buffery zpráv: {0}"
+
+#: ../src/Server/Main.cs:389
+#, csharp-format
+msgid "Failed to optimize message buffers: {0}"
+msgstr "Optimalizace bufferů zpráv selhala: {0}"
diff --git a/po-Server/da.po b/po-Server/da.po
index 5c4cf60..1a0273d 100644
--- a/po-Server/da.po
+++ b/po-Server/da.po
@@ -3,20 +3,20 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:21+0100\n"
-"PO-Revision-Date: 2011-12-29 19:58+0000\n"
-"Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
-"Language-Team: Danish (http://www.transifex.net/projects/p/smuxi/team/da/)\n"
+"POT-Creation-Date: 2013-08-19 14:08+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Danish (http://www.transifex.com/projects/p/smuxi/language/da/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: da\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: ../src/Server/Main.cs:71
 msgid "Add user to Server"
@@ -49,9 +49,7 @@ msgstr "Aktiver fejlsøgningsuddata"
 #: ../src/Server/Main.cs:133
 msgid ""
 "Optimize message buffers and exit (valid values: none, defrag, index, all)"
-msgstr ""
-"Optimer mellemlager for beskeder og afslut (gyldige værdier: none, defrag, "
-"index, all)"
+msgstr "Optimer mellemlager for beskeder og afslut (gyldige værdier: none, defrag, index, all)"
 
 #: ../src/Server/Main.cs:146
 msgid "Show this help"
@@ -79,9 +77,7 @@ msgstr "Kommandolinjefejl: {0}"
 msgid ""
 "At most one of --add-user, --modify-user, and --delete-user may be used at a"
 " time."
-msgstr ""
-"Kun en af brugerne --add-user, --modify-user eller --delete-user kan bruges "
-"på samme tid."
+msgstr "Kun en af brugerne --add-user, --modify-user eller --delete-user kan bruges på samme tid."
 
 #: ../src/Server/Main.cs:242
 msgid "You must specify a username with the --username option."
@@ -104,9 +100,7 @@ msgstr "Adgangskode må ikke være tomt."
 msgid ""
 "Invalid optimization value passed to --optimize-message-buffer, valid values"
 " are: {0}"
-msgstr ""
-"Ugyldig optimeringsværdi sendt til --optimize-message-buffer, gyldige "
-"værdier er: {0}"
+msgstr "Ugyldig optimeringsværdi sendt til --optimize-message-buffer, gyldige værdier er: {0}"
 
 #: ../src/Server/Main.cs:303
 #, csharp-format
@@ -136,5 +130,3 @@ msgstr "Lykkedes med optimering af {0} beskedmellemlagre."
 #, csharp-format
 msgid "Failed to optimize message buffers: {0}"
 msgstr "Kunne ikke optimere beskedmellemlagre: {0}"
-
-
diff --git a/po-Server/de.po b/po-Server/de.po
index 0523759..c286785 100644
--- a/po-Server/de.po
+++ b/po-Server/de.po
@@ -3,20 +3,20 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Bianca Mix <heavydemon at freenet.de>, 2011.
+# Bianca Mix <heavydemon at freenet.de>, 2011
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:21+0100\n"
-"PO-Revision-Date: 2011-12-30 23:07+0000\n"
-"Last-Translator: Bianca Mix <heavydemon at freenet.de>\n"
-"Language-Team: German (http://www.transifex.net/projects/p/smuxi/team/de/)\n"
+"POT-Creation-Date: 2013-08-19 14:08+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: German (http://www.transifex.com/projects/p/smuxi/language/de/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: de\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: ../src/Server/Main.cs:71
 msgid "Add user to Server"
@@ -40,8 +40,7 @@ msgstr "Benutzer, der erstellt, verändert oder entfernt werden soll"
 
 #: ../src/Server/Main.cs:116
 msgid "Password of the user when creating or modifying a user"
-msgstr ""
-"Passwort für den Benutzer, wenn Benutzer erstellt oder verändert werden soll"
+msgstr "Passwort für den Benutzer, wenn Benutzer erstellt oder verändert werden soll"
 
 #: ../src/Server/Main.cs:125
 msgid "Enable debug output"
@@ -50,9 +49,7 @@ msgstr "Aktivieren der Ausgabe zur Fehlerbeseitigung"
 #: ../src/Server/Main.cs:133
 msgid ""
 "Optimize message buffers and exit (valid values: none, defrag, index, all)"
-msgstr ""
-"Optimiere Nachrichtenpuffer und Verlassen (Gültige Werte: none, defrag, "
-"index, all)"
+msgstr "Optimiere Nachrichtenpuffer und Verlassen (Gültige Werte: none, defrag, index, all)"
 
 #: ../src/Server/Main.cs:146
 msgid "Show this help"
@@ -80,9 +77,7 @@ msgstr "Kommandozeilenfehler: {0}"
 msgid ""
 "At most one of --add-user, --modify-user, and --delete-user may be used at a"
 " time."
-msgstr ""
-"Höchstens einer der Optionen --add-user, --modify-user, und --delete-user "
-"darf gleichzeitig verwendet werden."
+msgstr "Höchstens einer der Optionen --add-user, --modify-user, und --delete-user darf gleichzeitig verwendet werden."
 
 #: ../src/Server/Main.cs:242
 msgid "You must specify a username with the --username option."
@@ -105,9 +100,7 @@ msgstr "Passwort darf nicht leer sein."
 msgid ""
 "Invalid optimization value passed to --optimize-message-buffer, valid values"
 " are: {0}"
-msgstr ""
-"Ungültige Optimierungswerte übergeben an --optimize-message-buffer, gültige "
-"Werte sind: {0}"
+msgstr "Ungültige Optimierungswerte übergeben an --optimize-message-buffer, gültige Werte sind: {0}"
 
 #: ../src/Server/Main.cs:303
 #, csharp-format
@@ -137,5 +130,3 @@ msgstr "Erfolgreich {0} Nachrichtenpuffer optimiert"
 #, csharp-format
 msgid "Failed to optimize message buffers: {0}"
 msgstr "Optimierung der Nachrichtenpuffer fehlgeschlagen: {0}"
-
-
diff --git a/po-Server/fr.po b/po-Server/fr.po
index adb8215..8918c3d 100644
--- a/po-Server/fr.po
+++ b/po-Server/fr.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-10 21:39+0200\n"
+"POT-Creation-Date: 2013-08-19 12:17+0200\n"
 "PO-Revision-Date: 2011-12-30 23:04+0000\n"
 "Last-Translator: Clément Bourgeois <moonpyk at gmail.com>\n"
 "Language-Team: French (http://www.transifex.net/projects/p/smuxi/team/fr/)\n"
diff --git a/po-Server/pt_BR.po b/po-Server/pt_BR.po
new file mode 100644
index 0000000..d217e85
--- /dev/null
+++ b/po-Server/pt_BR.po
@@ -0,0 +1,132 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# 
+# Translators:
+# Leonardopf <leonardo at piresfelix.com>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: Smuxi - IRC client\n"
+"Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
+"POT-Creation-Date: 2013-04-14 10:16+0200\n"
+"PO-Revision-Date: 2013-07-10 20:52+0000\n"
+"Last-Translator: Leonardopf <leonardo at piresfelix.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/smuxi/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../src/Server/Main.cs:71
+msgid "Add user to Server"
+msgstr "Adicionar usuário ao Servidor"
+
+#: ../src/Server/Main.cs:80
+msgid "Modify existing user of Server"
+msgstr "Modificar usuário existente no Servidor"
+
+#: ../src/Server/Main.cs:89
+msgid "Delete user from Server"
+msgstr "Apagar usuário do Servidor"
+
+#: ../src/Server/Main.cs:98
+msgid "List all existing users of Server"
+msgstr "Exibir todos usuários existentes do Servidor"
+
+#: ../src/Server/Main.cs:107
+msgid "User to create, modify or delete"
+msgstr "Usuário para criar, modificar ou apagar"
+
+#: ../src/Server/Main.cs:116
+msgid "Password of the user when creating or modifying a user"
+msgstr "Senha do usuário ao criar ou modificar um usuário"
+
+#: ../src/Server/Main.cs:125
+msgid "Enable debug output"
+msgstr "Ativar saída em modo debug"
+
+#: ../src/Server/Main.cs:133
+msgid ""
+"Optimize message buffers and exit (valid values: none, defrag, index, all)"
+msgstr "Otimizar os buffers de mensagens e sair (Valores válidos: none, defrag, index, all)"
+
+#: ../src/Server/Main.cs:146
+msgid "Show this help"
+msgstr "Mostrar esta ajuda"
+
+#: ../src/Server/Main.cs:148
+msgid "Usage: smuxi-server [options]"
+msgstr "Modo de usar: smuxi-server [opções]"
+
+#: ../src/Server/Main.cs:150
+msgid "Options:"
+msgstr "Opções:"
+
+#: ../src/Server/Main.cs:161
+#, csharp-format
+msgid "Unknown option: '{0}'"
+msgstr "Opção desconhecida: '{0}'"
+
+#: ../src/Server/Main.cs:188
+#, csharp-format
+msgid "Command line error: {0}"
+msgstr "Erro linha de comando: {0}"
+
+#: ../src/Server/Main.cs:232
+msgid ""
+"At most one of --add-user, --modify-user, and --delete-user may be used at a"
+" time."
+msgstr "No máximo um de --add-user, --modify-user, e --delete-user pode ser usado por vez."
+
+#: ../src/Server/Main.cs:242
+msgid "You must specify a username with the --username option."
+msgstr "Você deve especificar um nome de usuário com a opção --username."
+
+#: ../src/Server/Main.cs:248
+msgid "Username must not be empty."
+msgstr "Nome de usuário não pode estar vazio."
+
+#: ../src/Server/Main.cs:258
+msgid "You must specify a password with the --password option."
+msgstr "Você deve especificar uma senha com a opção --password."
+
+#: ../src/Server/Main.cs:264
+msgid "Password must not be empty."
+msgstr "Senha não pode estar vazia."
+
+#: ../src/Server/Main.cs:283
+#, csharp-format
+msgid ""
+"Invalid optimization value passed to --optimize-message-buffer, valid values"
+" are: {0}"
+msgstr "Valores de otimização invalido passados por --optimize-message-buffer. Os valores válidos são: {0}"
+
+#: ../src/Server/Main.cs:303
+#, csharp-format
+msgid "User \"{0}\" successfully added to server."
+msgstr "Usuário \"{0}\" adicionado com sucesso ao servidor."
+
+#: ../src/Server/Main.cs:312
+#, csharp-format
+msgid "User \"{0}\" successfully modified."
+msgstr "Usuário \"{0}\" editado com sucesso."
+
+#: ../src/Server/Main.cs:321
+#, csharp-format
+msgid "User \"{0}\" successfully deleted from server."
+msgstr "Usuário \"{0}\" apagado com sucesso do servidor."
+
+#: ../src/Server/Main.cs:328
+msgid "Users:"
+msgstr "Usuários:"
+
+#: ../src/Server/Main.cs:376
+#, csharp-format
+msgid "Successfully optimized {0} message buffers."
+msgstr "Otimização do buffers de mensagem de {0} feito com sucesso."
+
+#: ../src/Server/Main.cs:389
+#, csharp-format
+msgid "Failed to optimize message buffers: {0}"
+msgstr "Erro ao otimizar buffers de mensagem: {0}"
diff --git a/po-Server/sv.po b/po-Server/sv.po
index 3ac9560..1d50bf7 100644
--- a/po-Server/sv.po
+++ b/po-Server/sv.po
@@ -3,20 +3,20 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-#   <flugsio at gmail.com>, 2011.
+# flugsio <flugsio at gmail.com>, 2011
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:21+0100\n"
-"PO-Revision-Date: 2011-12-31 11:01+0000\n"
-"Last-Translator: flugsio <flugsio at gmail.com>\n"
-"Language-Team: Swedish (http://www.transifex.net/projects/p/smuxi/team/sv/)\n"
+"POT-Creation-Date: 2013-08-19 14:08+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Swedish (http://www.transifex.com/projects/p/smuxi/language/sv/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: sv\n"
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #: ../src/Server/Main.cs:71
 msgid "Add user to Server"
@@ -49,9 +49,7 @@ msgstr "Aktivera utskrift av fellogg"
 #: ../src/Server/Main.cs:133
 msgid ""
 "Optimize message buffers and exit (valid values: none, defrag, index, all)"
-msgstr ""
-"Optimera meddelandebuffertarna och avsluta (giltiga värden: none, defrag, "
-"index, all)"
+msgstr "Optimera meddelandebuffertarna och avsluta (giltiga värden: none, defrag, index, all)"
 
 #: ../src/Server/Main.cs:146
 msgid "Show this help"
@@ -79,9 +77,7 @@ msgstr "Komandoradsfel: {0}"
 msgid ""
 "At most one of --add-user, --modify-user, and --delete-user may be used at a"
 " time."
-msgstr ""
-"Endast en av --add-user, --modify-user eller --delete-user kan användas i "
-"taget."
+msgstr "Endast en av --add-user, --modify-user eller --delete-user kan användas i taget."
 
 #: ../src/Server/Main.cs:242
 msgid "You must specify a username with the --username option."
@@ -104,9 +100,7 @@ msgstr "Lösenordet kan inte vara tomt."
 msgid ""
 "Invalid optimization value passed to --optimize-message-buffer, valid values"
 " are: {0}"
-msgstr ""
-"Ogiltigt optimeringsvärde för --optimize-message-buffer, giltiga värden är: "
-"{0}"
+msgstr "Ogiltigt optimeringsvärde för --optimize-message-buffer, giltiga värden är: {0}"
 
 #: ../src/Server/Main.cs:303
 #, csharp-format
@@ -136,5 +130,3 @@ msgstr "Lyckades optimera {0} meddelandebufftertar."
 #, csharp-format
 msgid "Failed to optimize message buffers: {0}"
 msgstr "Misslyckades att optimera buffertar: {0}"
-
-
diff --git a/po-Server/zh_CN.po b/po-Server/zh_CN.po
index 86010f2..6a0915f 100644
--- a/po-Server/zh_CN.po
+++ b/po-Server/zh_CN.po
@@ -3,20 +3,20 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
-# Dean Lee <xslidian at gmail.com>, 2012.
+# Dean Lee <xslidian at gmail.com>, 2012
 msgid ""
 msgstr ""
 "Project-Id-Version: Smuxi - IRC client\n"
 "Report-Msgid-Bugs-To: http://www.smuxi.org/issues\n"
-"POT-Creation-Date: 2011-12-29 09:21+0100\n"
-"PO-Revision-Date: 2012-01-07 10:07+0000\n"
-"Last-Translator: Dean Lee <xslidian at gmail.com>\n"
-"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/smuxi/team/zh_CN/)\n"
+"POT-Creation-Date: 2013-08-19 14:08+0200\n"
+"PO-Revision-Date: 2013-04-29 08:41+0000\n"
+"Last-Translator: Mirco Bauer <meebey at gmail.com>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/projects/p/smuxi/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: zh_CN\n"
-"Plural-Forms: nplurals=1; plural=0\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
 
 #: ../src/Server/Main.cs:71
 msgid "Add user to Server"
@@ -130,5 +130,3 @@ msgstr "成功优化 {0} 块信息缓存。"
 #, csharp-format
 msgid "Failed to optimize message buffers: {0}"
 msgstr "无法优化信息缓存: {0}"
-
-
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 402a25f..06a8cfe 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -49,8 +49,8 @@ MSGFMT = @MSGFMT@
 XGETTEXT = @XGETTEXT@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
 ALL_LINGUAS = @ALL_LINGUAS@
 
@@ -73,15 +73,20 @@ CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$l
 .SUFFIXES:
 .SUFFIXES: .po .pox .gmo .mo .msg .cat
 
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
+INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL__v_MSGFMT_0 = @echo "  MSGFMT" $@;
+
 .po.pox:
 	$(MAKE) $(GETTEXT_PACKAGE).pot
 	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
 .po.mo:
-	$(MSGFMT) -o $@ $<
+	$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
 
 .po.gmo:
-	file=`echo $* | sed 's,.*/,,'`.gmo \
+	$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
 	  && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 .po.cat:
@@ -129,7 +134,7 @@ install-data-yes: all
 	done
 
 # Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
+dvi info ctags tags CTAGS TAGS ID:
 
 # Define this as empty until I found a useful application.
 install-exec installcheck:
diff --git a/src/AssemblyVersion.cs b/src/AssemblyVersion.cs
index 18ee3ea..07d16fa 100644
--- a/src/AssemblyVersion.cs
+++ b/src/AssemblyVersion.cs
@@ -36,5 +36,5 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 
-[assembly: AssemblyVersion("0.8.11")]
+[assembly: AssemblyVersion("0.9")]
 
diff --git a/src/Common/Defines.cs b/src/Common/Defines.cs
index edd727d..c6a791e 100644
--- a/src/Common/Defines.cs
+++ b/src/Common/Defines.cs
@@ -26,11 +26,11 @@ namespace Smuxi.Common
 {
     public static class Defines
     {
-        public const string GitBranch   = "";
-        public const string GitCommitHash = "";
+        public const string GitBranch   = "master";
+        public const string GitCommitHash = "082f74b";
 
         private static readonly string f_InstallPrefix = "/usr/local";
-        private static readonly string f_DistVersion = "dist-osx";
+        private static readonly string f_DistVersion = "master/082f74b";
         private static readonly string f_TwitterApiKey = "60QV2qQx9cS7y1BJDbgAA|2VgD6qQKddsF5HYQ0TrRgs3tFTnCwDONBmRlTmG658";
 
         public static string InstallPrefix {
diff --git a/src/Common/Makefile.in b/src/Common/Makefile.in
index 1b8862a..c895ce2 100644
--- a/src/Common/Makefile.in
+++ b/src/Common/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Defines.cs.in $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/smuxi-common.pc.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/Defines.cs.in \
+	$(srcdir)/smuxi-common.pc.in ChangeLog
 subdir = src/Common
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +149,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +195,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +300,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -644,11 +684,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -794,19 +834,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Common/Platform.cs b/src/Common/Platform.cs
index 9574652..75d06c3 100644
--- a/src/Common/Platform.cs
+++ b/src/Common/Platform.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 // 
-// Copyright (c) 2010-2011 Mirco Bauer <meebey at meebey.net>
+// Copyright (c) 2010-2012 Mirco Bauer <meebey at meebey.net>
 // 
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 // 
@@ -48,6 +48,7 @@ namespace Smuxi.Common
                 var info = new ProcessStartInfo("uname", "-o");
                 info.UseShellExecute = false;
                 info.RedirectStandardOutput = true;
+                info.RedirectStandardError = true;
                 var process = Process.Start(info);
                 process.WaitForExit();
                 if (process.ExitCode == 0) {
@@ -67,6 +68,7 @@ namespace Smuxi.Common
                     info = new ProcessStartInfo("uname", "-s");
                     info.UseShellExecute = false;
                     info.RedirectStandardOutput = true;
+                    info.RedirectStandardError = true;
                     process = Process.Start(info);
                     process.WaitForExit();
                     if (process.ExitCode == 0) {
diff --git a/src/Common/TaskQueue.cs b/src/Common/TaskQueue.cs
index 6a20886..f1cdf26 100644
--- a/src/Common/TaskQueue.cs
+++ b/src/Common/TaskQueue.cs
@@ -255,7 +255,9 @@ namespace Smuxi.Common
                 thread.Abort();
                 InitThread();
             }
-            tasks.Clear();
+            lock (tasks) {
+                tasks.Clear();
+            }
         }
         
         public void Reset()
diff --git a/src/Engine-Campfire/AssemblyInfo.cs b/src/Engine-Campfire/AssemblyInfo.cs
index a526cc6..c83dfab 100644
--- a/src/Engine-Campfire/AssemblyInfo.cs
+++ b/src/Engine-Campfire/AssemblyInfo.cs
@@ -3,8 +3,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
-[assembly: AssemblyTitle("Smuxi - Campfire support for engine")]
-[assembly: AssemblyCopyright("2012 © Carlos Martín Nieto <cmn at dwim.me>")]
+[assembly: AssemblyTitle("Smuxi - Campfire support")]
+[assembly: AssemblyCopyright("2012-2013 © Carlos Martín Nieto <cmn at dwim.me>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Engine-Campfire/Makefile.in b/src/Engine-Campfire/Makefile.in
index 9e28d8a..f4b2477 100644
--- a/src/Engine-Campfire/Makefile.in
+++ b/src/Engine-Campfire/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,8 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(top_srcdir)/Makefile.include
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am
 subdir = src/Engine-Campfire
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -100,6 +127,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DIST_SOURCES =
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
@@ -108,6 +147,25 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(pkgapp_DATA) $(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -153,6 +211,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -257,7 +316,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -627,12 +685,58 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
 
-ctags: CTAGS
-CTAGS:
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -709,7 +813,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-am
 
@@ -778,8 +882,9 @@ uninstall-am: uninstall-binSCRIPTS \
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-binSCRIPTS install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
@@ -791,8 +896,9 @@ uninstall-am: uninstall-binSCRIPTS \
 	install-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-binSCRIPTS uninstall-linuxdesktopapplicationsDATA \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binSCRIPTS \
+	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappDATA \
 	uninstall-pkgappSCRIPTS uninstall-programfilesDATA \
 	uninstall-programfilesiconsDATA
diff --git a/src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs b/src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs
index 526ab93..b0f63c9 100644
--- a/src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs
+++ b/src/Engine-Campfire/Protocols/Campfire/CampfireProtocolManager.cs
@@ -125,7 +125,22 @@ namespace Smuxi.Engine
             var bld = CreateMessageBuilder().AppendEventPrefix().AppendText(msg);
             Session.AddMessageToChat(NetworkChat, bld.ToMessage());
 
-
+            if (!server.ValidateServerCertificate) {
+                var whitelist = Session.CertificateValidator.HostnameWhitelist;
+                lock (whitelist) {
+                    // needed for favicon
+                    if (!whitelist.Contains("campfirenow.com")) {
+                        whitelist.Add("campfirenow.com");
+                    }
+                    // needed for receiving messages
+                    if (!whitelist.Contains("streaming.campfirenow.com")) {
+                        whitelist.Add("streaming.campfirenow.com");
+                    }
+                    if (!whitelist.Contains(Host)) {
+                        whitelist.Add(Host);
+                    }
+                }
+            }
 
             Client = new JsonServiceClient(BaseUri.AbsoluteUri);
             var creds = new NetworkCredential(server.Username, server.Password);
@@ -182,7 +197,6 @@ namespace Smuxi.Engine
             cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
 
             string[] help = {
-                "help",
                 "connect campfire username password",
                 "list",
                 "uploads",
diff --git a/src/Engine-IRC/AssemblyInfo.cs b/src/Engine-IRC/AssemblyInfo.cs
index 5fcb93d..695fa64 100644
--- a/src/Engine-IRC/AssemblyInfo.cs
+++ b/src/Engine-IRC/AssemblyInfo.cs
@@ -25,8 +25,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
-[assembly: AssemblyTitle("Smuxi - IRC protocol support for engine")]
-[assembly: AssemblyCopyright("2005-2011 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyTitle("Smuxi - IRC protocol support")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Engine-IRC/Makefile.am b/src/Engine-IRC/Makefile.am
index c11ab2a..a75d0b3 100644
--- a/src/Engine-IRC/Makefile.am
+++ b/src/Engine-IRC/Makefile.am
@@ -18,7 +18,6 @@ SMUXI_ENGINE_DLL_MDB=
 LOG4NET_DLL_SOURCE=../../lib/log4net.dll
 NINI_DLL_SOURCE=../../lib/Nini.dll
 SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll
-MEEBEY_SMARTIRC4NET_DLL_SOURCE=../../lib/Meebey.SmartIrc4net.dll
 SMUXI_COMMON_DLL_SOURCE=../../bin/release/smuxi-common.dll
 
 endif
@@ -39,7 +38,6 @@ SMUXI_ENGINE_DLL_MDB=$(BUILD_DIR)/smuxi-engine.dll.mdb
 LOG4NET_DLL_SOURCE=../../lib/log4net.dll
 NINI_DLL_SOURCE=../../lib/Nini.dll
 SMUXI_ENGINE_DLL_SOURCE=../../bin/debug/smuxi-engine.dll
-MEEBEY_SMARTIRC4NET_DLL_SOURCE=../../lib/Meebey.SmartIrc4net.dll
 SMUXI_COMMON_DLL_SOURCE=../../bin/debug/smuxi-common.dll
 
 endif
@@ -50,8 +48,6 @@ SATELLITE_ASSEMBLY_NAME=.resources.dll
 PROGRAMFILES = \
 	$(LOG4NET_DLL) \
 	$(NINI_DLL) \
-	$(SMARTIRC4NET_DLL) \
-	$(SMARTIRC4NET_DLL_MDB) \
 	$(SMUXI_COMMON_DLL) \
 	$(SMUXI_COMMON_DLL_MDB) \
 	$(SMUXI_ENGINE_DLL) \
@@ -79,19 +75,14 @@ RESOURCES =
 EXTRAS = \
 	smuxi-engine-irc.pc.in 
 
-SMARTIRC4NET_LIBS = $(foreach file, $(SMARTIRC4NET_FILES), $(top_builddir)/$(file))
-SMARTIRC4NET_DLL_SOURCE = $(SMARTIRC4NET_LIBS)
-SMARTIRC4NET_DLL = $(foreach file, $(SMARTIRC4NET_FILES), $(BUILD_DIR)/$(shell basename $(file)))
-SMARTIRC4NET_DLL_MDB_SOURCE = $(foreach file, $(SMARTIRC4NET_DLL_SOURCE), $(file).mdb)
-SMARTIRC4NET_DLL_MDB = $(foreach file, $(SMARTIRC4NET_DLL), $(file).mdb)
-
 REFERENCES =  \
 	System \
+	System.Core \
 	Mono.Posix \
-	$(SMARTIRC4NET_LIBS) \
 	$(LOG4NET_LIBS)
 
-DLL_REFERENCES =
+DLL_REFERENCES = \
+    $(BUILD_DIR)/Meebey.SmartIrc4net.dll
 
 CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) 
 
@@ -102,8 +93,6 @@ SMUXI_ENGINE_DLL = $(BUILD_DIR)/smuxi-engine.dll
 SMUXI_COMMON_DLL = $(BUILD_DIR)/smuxi-common.dll
 
 $(eval $(call emit-deploy-wrapper,ENGINE_IRC_PC,smuxi-engine-irc.pc))
-$(eval $(call emit-deploy-target,SMARTIRC4NET_DLL_MDB))
-$(eval $(call emit-deploy-target,SMARTIRC4NET_DLL))
 $(eval $(call emit-deploy-target,SMUXI_ENGINE_DLL_MDB))
 $(eval $(call emit-deploy-target,SMUXI_ENGINE_DLL))
 $(eval $(call emit-deploy-target,SMUXI_COMMON_DLL))
diff --git a/src/Engine-IRC/Makefile.in b/src/Engine-IRC/Makefile.in
index f32356b..6f98a07 100644
--- a/src/Engine-IRC/Makefile.in
+++ b/src/Engine-IRC/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-engine-irc.pc.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-engine-irc.pc.in \
+	ChangeLog
 subdir = src/Engine-IRC
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +149,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +195,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +300,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -363,8 +403,6 @@ EXTRA_DIST = $(build_sources) $(build_resx_files) \
 @ENABLE_RELEASE_TRUE at NINI_DLL_SOURCE = ../../lib/Nini.dll
 @ENABLE_DEBUG_TRUE at SMUXI_ENGINE_DLL_SOURCE = ../../bin/debug/smuxi-engine.dll
 @ENABLE_RELEASE_TRUE at SMUXI_ENGINE_DLL_SOURCE = ../../bin/release/smuxi-engine.dll
- at ENABLE_DEBUG_TRUE@MEEBEY_SMARTIRC4NET_DLL_SOURCE = ../../lib/Meebey.SmartIrc4net.dll
- at ENABLE_RELEASE_TRUE@MEEBEY_SMARTIRC4NET_DLL_SOURCE = ../../lib/Meebey.SmartIrc4net.dll
 @ENABLE_DEBUG_TRUE at SMUXI_COMMON_DLL_SOURCE = ../../bin/debug/smuxi-common.dll
 @ENABLE_RELEASE_TRUE at SMUXI_COMMON_DLL_SOURCE = ../../bin/release/smuxi-common.dll
 @ENABLE_DEBUG_TRUE at SMUXI_ENGINE_DLL_MDB_SOURCE = ../../bin/debug/smuxi-engine.dll.mdb
@@ -373,8 +411,6 @@ SATELLITE_ASSEMBLY_NAME = .resources.dll
 PROGRAMFILES = \
 	$(LOG4NET_DLL) \
 	$(NINI_DLL) \
-	$(SMARTIRC4NET_DLL) \
-	$(SMARTIRC4NET_DLL_MDB) \
 	$(SMUXI_COMMON_DLL) \
 	$(SMUXI_COMMON_DLL_MDB) \
 	$(SMUXI_ENGINE_DLL) \
@@ -398,18 +434,15 @@ RESOURCES =
 EXTRAS = \
 	smuxi-engine-irc.pc.in 
 
-SMARTIRC4NET_LIBS = $(foreach file, $(SMARTIRC4NET_FILES), $(top_builddir)/$(file))
-SMARTIRC4NET_DLL_SOURCE = $(SMARTIRC4NET_LIBS)
-SMARTIRC4NET_DLL = $(foreach file, $(SMARTIRC4NET_FILES), $(BUILD_DIR)/$(shell basename $(file)))
-SMARTIRC4NET_DLL_MDB_SOURCE = $(foreach file, $(SMARTIRC4NET_DLL_SOURCE), $(file).mdb)
-SMARTIRC4NET_DLL_MDB = $(foreach file, $(SMARTIRC4NET_DLL), $(file).mdb)
 REFERENCES = \
 	System \
+	System.Core \
 	Mono.Posix \
-	$(SMARTIRC4NET_LIBS) \
 	$(LOG4NET_LIBS)
 
-DLL_REFERENCES = 
+DLL_REFERENCES = \
+    $(BUILD_DIR)/Meebey.SmartIrc4net.dll
+
 CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) $(ASSEMBLY) \
 	$(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \
 	$(build_satellite_assembly_list)
@@ -661,11 +694,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -811,19 +844,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
@@ -859,8 +892,6 @@ $(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
 	$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
 
 $(eval $(call emit-deploy-wrapper,ENGINE_IRC_PC,smuxi-engine-irc.pc))
-$(eval $(call emit-deploy-target,SMARTIRC4NET_DLL_MDB))
-$(eval $(call emit-deploy-target,SMARTIRC4NET_DLL))
 $(eval $(call emit-deploy-target,SMUXI_ENGINE_DLL_MDB))
 $(eval $(call emit-deploy-target,SMUXI_ENGINE_DLL))
 $(eval $(call emit-deploy-target,SMUXI_COMMON_DLL))
diff --git a/src/Engine-IRC/Protocols/Irc/IrcGroupPersonModel.cs b/src/Engine-IRC/Protocols/Irc/IrcGroupPersonModel.cs
index 6261eea..86e5d1e 100644
--- a/src/Engine-IRC/Protocols/Irc/IrcGroupPersonModel.cs
+++ b/src/Engine-IRC/Protocols/Irc/IrcGroupPersonModel.cs
@@ -29,27 +29,12 @@ namespace Smuxi.Engine
     [Serializable]
     public class IrcGroupPersonModel : IrcPersonModel
     {
-        private bool _IsOp;
-        private bool _IsVoice;
-        
-        public bool IsOp {
-            get {
-                return _IsOp;
-            }
-            internal set {
-                _IsOp = value;
-            }
-        }
+        public bool IsOwner { get; internal set; }
+        public bool IsChannelAdmin { get; internal set; }
+        public bool IsOp { get; internal set; }
+        public bool IsHalfop { get; internal set; }
+        public bool IsVoice { get; internal set; }
 
-        public bool IsVoice {
-            get {
-                return _IsVoice;
-            }
-            internal set {
-                _IsVoice = value;
-            }
-        }
-        
         internal IrcGroupPersonModel(string nickname, string realname,
                                      string ident, string host, string networkID,
                                      IProtocolManager networkManager) :
@@ -78,8 +63,11 @@ namespace Smuxi.Engine
             
             base.GetObjectData(sw);
 
-            sw.Write(_IsOp);
-            sw.Write(_IsVoice);
+            sw.Write(IsOp);
+            sw.Write(IsVoice);
+            sw.Write(IsOwner);
+            sw.Write(IsChannelAdmin);
+            sw.Write(IsHalfop);
         }
 
         protected override void SetObjectData(SerializationReader sr)
@@ -90,8 +78,15 @@ namespace Smuxi.Engine
             
             base.SetObjectData(sr);
             
-            _IsOp    = sr.ReadBoolean();
-            _IsVoice = sr.ReadBoolean();
+            IsOp = sr.ReadBoolean();
+            IsVoice = sr.ReadBoolean();
+
+            // backward compatibility
+            if (sr.PeekChar() != -1) {
+                IsOwner = sr.ReadBoolean();
+                IsChannelAdmin = sr.ReadBoolean();
+                IsHalfop = sr.ReadBoolean();
+            }
         }
 
         public override int CompareTo(ContactModel contact)
@@ -102,14 +97,26 @@ namespace Smuxi.Engine
             }
 
             int status1 = 0;
-            if (IsOp) {
+            if (IsOwner) {
+                status1 += 5;
+            } else if (IsChannelAdmin) {
+                status1 += 4;
+            } else if (IsOp) {
+                status1 += 3;
+            } else if (IsHalfop) {
                 status1 += 2;
             } else if (IsVoice) {
                 status1 += 1;
             }
 
             int status2 = 0;
-            if (ircContact.IsOp) {
+            if (ircContact.IsOwner) {
+                status2 += 5;
+            } else if (ircContact.IsChannelAdmin) {
+                status2 += 4;
+            } else if (ircContact.IsOp) {
+                status2 += 3;
+            } else if (ircContact.IsHalfop) {
                 status2 += 2;
             } else if (ircContact.IsVoice) {
                 status2 += 1;
diff --git a/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs b/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
index 1aee2a3..ee4ae1c 100644
--- a/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
+++ b/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
@@ -1,7 +1,7 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2005-2011 Mirco Bauer <meebey at meebey.net>
+ * Copyright (c) 2005-2013 Mirco Bauer <meebey at meebey.net>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -28,6 +28,7 @@ using System.Globalization;
 using System.Threading;
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 using Meebey.SmartIrc4net;
 using Smuxi.Common;
 using IrcProxyType = Meebey.SmartIrc4net.ProxyType;
@@ -66,6 +67,7 @@ namespace Smuxi.Engine
         IList<ChannelInfo> NetworkChannels { get; set; }
         DateTime NetworkChannelsAge { get; set; }
         TimeSpan NetworkChannelsMaxAge { get; set; }
+        List<string> ChannelTypes { get; set; }
 
         public override bool IsConnected {
             get {
@@ -145,6 +147,7 @@ namespace Smuxi.Engine
             Trace.Call(session);
 
             NetworkChannelsMaxAge = TimeSpan.FromMinutes(5);
+            ChannelTypes = new List<string>(new string[] {"#", "&", "!", "+"});
 
             _IrcClient = new IrcFeatures();
             _IrcClient.AutoRetry = true;
@@ -159,14 +162,13 @@ namespace Smuxi.Engine
             // are many reconnects like when the network connection goes flaky,
             // see: http://projects.qnetp.net/issues/show/163
             _IrcClient.AutoNickHandling = false;
-            _IrcClient.ActiveChannelSyncing = true;
             _IrcClient.CtcpVersion      = Engine.VersionString;
             _IrcClient.SendDelay        = 250;
+            _IrcClient.SupportNonRfc    = true;
             _IrcClient.OnRawMessage     += new IrcEventHandler(_OnRawMessage);
             _IrcClient.OnChannelMessage += new IrcEventHandler(_OnChannelMessage);
             _IrcClient.OnChannelAction  += new ActionEventHandler(_OnChannelAction);
             _IrcClient.OnChannelNotice  += new IrcEventHandler(_OnChannelNotice);
-            _IrcClient.OnChannelActiveSynced += new IrcEventHandler(_OnChannelActiveSynced);
             _IrcClient.OnQueryMessage   += new IrcEventHandler(_OnQueryMessage);
             _IrcClient.OnQueryAction    += new ActionEventHandler(_OnQueryAction);
             _IrcClient.OnQueryNotice    += new IrcEventHandler(_OnQueryNotice);
@@ -175,8 +177,14 @@ namespace Smuxi.Engine
             _IrcClient.OnPart           += new PartEventHandler(_OnPart);
             _IrcClient.OnKick           += new KickEventHandler(_OnKick);
             _IrcClient.OnNickChange     += new NickChangeEventHandler(_OnNickChange);
+            _IrcClient.OnOwner          += new OwnerEventHandler(OnOwner);
+            _IrcClient.OnDeowner        += new DeownerEventHandler(OnDeowner);
+            _IrcClient.OnChannelAdmin   += new ChannelAdminEventHandler(OnChannelAdmin);
+            _IrcClient.OnDeChannelAdmin += new DeChannelAdminEventHandler(OnDeChannelAdmin);
             _IrcClient.OnOp             += new OpEventHandler(_OnOp);
             _IrcClient.OnDeop           += new DeopEventHandler(_OnDeop);
+            _IrcClient.OnHalfop         += new HalfopEventHandler(OnHalfop);
+            _IrcClient.OnDehalfop       += new DehalfopEventHandler(OnDehalfop);
             _IrcClient.OnVoice          += new VoiceEventHandler(_OnVoice);
             _IrcClient.OnDevoice        += new DevoiceEventHandler(_OnDevoice);
             _IrcClient.OnModeChange     += new IrcEventHandler(_OnModeChange);
@@ -239,12 +247,12 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
             builder.MessageType = MessageType.Normal;
-            builder.AppendIdendityName(CreatePerson(e.Who));
-            // TRANSLATOR: do NOT change the position of {0}!
-            var text = builder.CreateText(_("{0} invites you to {1}"),
-                                          String.Empty, e.Channel);
-            text.IsHighlight = true;
-            builder.AppendText(text);
+            var msg = builder.CreateFormat(_("{0} invites you to {1}"),
+                                           CreatePerson(e.Who), e.Channel);
+            foreach (var part in msg) {
+                part.IsHighlight = true;
+            }
+            builder.Append(msg);
             Session.AddMessageToChat(_NetworkChat, builder.ToMessage());
 
             builder = CreateMessageBuilder();
@@ -807,6 +815,30 @@ namespace Smuxi.Engine
                             CommandDeop(command);
                             handled = true;
                             break;
+                        case "owner":
+                            CommandOwner(command);
+                            handled = true;
+                            break;
+                        case "deowner":
+                            CommandDeowner(command);
+                            handled = true;
+                            break;
+                        case "chanadmin":
+                            CommandChanAdmin(command);
+                            handled = true;
+                            break;
+                        case "dechanadmin":
+                            CommandDeChanAdmin(command);
+                            handled = true;
+                            break;
+                        case "halfop":
+                            CommandHalfop(command);
+                            handled = true;
+                            break;
+                        case "dehalfop":
+                            CommandDehalfop(command);
+                            handled = true;
+                            break;
                         case "voice":
                             CommandVoice(command);
                             handled = true;
@@ -823,6 +855,22 @@ namespace Smuxi.Engine
                             CommandUnban(command);
                             handled = true;
                             break;
+                        case "banexcept":
+                            CommandBanException(command);
+                            handled = true;
+                            break;
+                        case "unbanexcept":
+                            CommandUnBanException(command);
+                            handled = true;
+                            break;
+                        case "inviteexcept":
+                            CommandInviteException(command);
+                            handled = true;
+                            break;
+                        case "uninviteexcept":
+                            CommandUnInviteException(command);
+                            handled = true;
+                            break;
                         case "kick":
                             CommandKick(command);
                             handled = true;
@@ -947,7 +995,6 @@ namespace Smuxi.Engine
             cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
 
             string[] help = {
-            "help",
             "connect irc server [port|+port] [password] [nicknames]",
             "say",
             "join/j channel(s) [key]",
@@ -969,16 +1016,26 @@ namespace Smuxi.Engine
             "version nick",
             "time nick",
             "finger nick",
-            "mode new-mode",
+            "mode [target] [new-mode]",
             "away [away-message]",
             "kick nick(s) [reason]",
             "kickban/kb nick(s) [reason]",
             "ban [mask]",
             "unban mask",
+            "banexcept [mask]",
+            "unbanexcept mask",
+            "inviteexcept [mask]",
+            "uninviteexcept mask",
             "voice nick",
             "devoice nick",
             "op nick",
             "deop nick",
+            "owner nick",
+            "deowner nick",
+            "chanadmin nick",
+            "dechanadmin nick",
+            "halfop nick",
+            "dehalfop nick",
             "nick newnick",
             "ctcp destination command [data]",
             "raw/quote irc-command",
@@ -1060,16 +1117,18 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder();
             builder.AppendSenderPrefix(Me);
             Match m = Regex.Match(message, String.Format(@"^@(?<nick>\S+)|^(?<nick>\S+)(?:\:|,)"));
-            if (m.Success) {
+            if (m.Success && chat is GroupChatModel) {
                 // this is probably a reply with a nickname
                 string nick = m.Groups["nick"].Value;
 #if LOG4NET
                 _Logger.Debug("_Say(): detected reply with possible nick: '" + nick + "' in: '" + m.Value + "'");
 #endif
-                if (_IrcClient.GetChannelUser(chat.ID, nick) != null) {
+                var groupChat = (GroupChatModel) chat;
+                PersonModel person;
+                if (groupChat.Persons.TryGetValue(nick, out person)) {
                     // bingo, it's a nick on this channel
                     message = message.Substring(m.Value.Length);
-                    var coloredNick = builder.CreateIdendityName(GetPerson(chat, nick));
+                    var coloredNick = builder.CreateIdendityName(person);
                     coloredNick.Text = m.Value;
                     builder.AppendText(coloredNick);
                 }
@@ -1083,27 +1142,12 @@ namespace Smuxi.Engine
             Trace.Call(cd);
 
             MessageBuilder builder;
-            string channelStr = null;
-            if ((cd.DataArray.Length >= 2) &&
-                (cd.DataArray[1].Length >= 1)) {
-                switch (cd.DataArray[1][0]) {
-                    case '#':
-                    case '!':
-                    case '+':
-                    case '&':
-                        channelStr = cd.DataArray[1];
-                        break;
-                    default:
-                        channelStr = "#" + cd.DataArray[1];
-                        break;
-                }
-            } else {
+            if (cd.DataArray.Length < 2) {
                 _NotEnoughParameters(cd);
                 return;
             }
             
-
-            string[] channels = channelStr.Split(',');
+            string[] channels = cd.DataArray[1].Split(',');
             string[] keys = null;
             if (cd.DataArray.Length > 2) {
                 keys = cd.DataArray[2].Split(',');
@@ -1124,8 +1168,15 @@ namespace Smuxi.Engine
 
             int i = 0;
             foreach (string channel in channels) {
+                // HACK: copy channel from foreach() into our scope
+                var chan = channel;
+                var chanType = chan[0];
+                if (!ChannelTypes.Contains(chanType.ToString())) {
+                    chan = "#" + chan;
+                }
+
                 string key = keys != null && keys.Length > i ? keys[i] : null;
-                if (_IrcClient.IsJoined(channel)) {
+                if (GetChat(chan, ChatType.Group) != null) {
                     builder = CreateMessageBuilder();
                     builder.AppendEventPrefix();
                     builder.AppendText(
@@ -1141,8 +1192,6 @@ namespace Smuxi.Engine
                     _QueuedChannelJoinList.Add(channel);
                 }
 
-                // HACK: copy channel from foreach() into our scope
-                string chan = channel;
                 _ChannelJoinQueue.Queue(delegate {
                     try {
                         int count = 0;
@@ -1287,18 +1336,13 @@ namespace Smuxi.Engine
             
             if ((cd.DataArray.Length >= 2) &&
                 (cd.DataArray[1].Length >= 1)) {
-                switch (cd.DataArray[1][0]) {
-                    case '#':
-                    case '!':
-                    case '+':
-                    case '&':
-                        // seems to be a channel
-                        CommandMessageChannel(cd);
-                        break;
-                    default:
-                        // seems to be a nick
-                        CommandMessageNick(cd);
-                        break;
+                var chanType = cd.DataArray[1][0].ToString();
+                if (ChannelTypes.Contains(chanType)) {
+                    // seems to be a channel
+                    CommandMessageChannel(cd);
+                } else {
+                    // seems to be a nick
+                    CommandMessageNick(cd);
                 }
             } else {
                 NotEnoughParameters(cd);
@@ -1316,7 +1360,16 @@ namespace Smuxi.Engine
                     chat = Session.CreatePersonChat(person, nickname,
                                                     nickname, this);
                     Session.AddChat(chat);
-                    Session.SyncChat(chat);
+                    if (Session.IsLocal) {
+                        Session.SyncChat(chat);
+                    } else {
+                        // HACK: lower probability of sync race condition swallowing
+                        // messages, see: https://www.smuxi.org/issues/show/634
+                        ThreadPool.QueueUserWorkItem(delegate {
+                            Thread.Sleep(1000);
+                            Session.SyncChat(chat);
+                        });
+                    }
                 }
             }
             
@@ -1514,29 +1567,24 @@ namespace Smuxi.Engine
             if ((cd.DataArray.Length >= 2) &&
                 (cd.DataArray[1].Length >= 1)) {
                 // have to guess here if we got a channel passed or not
-                switch (cd.DataArray[1][0]) {
-                    case '#':
-                    case '&':
-                    case '!':
-                    case '+':
-                        // seems to be a channel
-                        string[] channels = cd.DataArray[1].Split(new char[] {','});
-                        string message = null;
-                        if  (cd.DataArray.Length >= 3) {
-                            message = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);
-                        }
-                        foreach (string channel in channels) {
-                            if (message != null) {
-                                _IrcClient.RfcPart(channel, message);
-                            } else { 
-                                _IrcClient.RfcPart(channel);
-                            }
+                var chanType = cd.DataArray[1][0].ToString();
+                if (ChannelTypes.Contains(chanType)) {
+                    // seems to be a channel
+                    string[] channels = cd.DataArray[1].Split(new char[] {','});
+                    string message = null;
+                    if  (cd.DataArray.Length >= 3) {
+                        message = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);
+                    }
+                    foreach (string channel in channels) {
+                        if (message != null) {
+                            _IrcClient.RfcPart(channel, message);
+                        } else {
+                            _IrcClient.RfcPart(channel);
                         }
-                        break;
-                    default:
-                        // sems to be only a part message
-                        _IrcClient.RfcPart(chat.ID, cd.Parameter);
-                        break;
+                    }
+                } else {
+                    // sems to be only a part message
+                    _IrcClient.RfcPart(chat.ID, cd.Parameter);
                 }
             } else {
                 _IrcClient.RfcPart(chat.ID);
@@ -1638,8 +1686,14 @@ namespace Smuxi.Engine
                 string mode;
                 if (info.IsIrcOp) {
                     mode = _("IRC Op");
+                } else if (info.IsOwner) {
+                    mode = _("Owner");
+                } else if (info.IsChannelAdmin) {
+                    mode = _("ChanAdmin");
                 } else if (info.IsOp) {
                     mode = _("Op");
+                } else if (info.IsHalfop) {
+                    mode = _("Halfop");
                 } else if (info.IsVoice) {
                     mode = _("Voice");
                 } else {
@@ -1698,14 +1752,15 @@ namespace Smuxi.Engine
             if (cd.DataArray.Length >= 2) {
                 _IrcClient.RfcTopic(channel, cd.Parameter);
             } else {
-                if (_IrcClient.IsJoined(channel)) {
-                    string topic = _IrcClient.GetChannel(channel).Topic;
+                var groupChat = (GroupChatModel) Session.GetChat(
+                    channel, ChatType.Group, this
+                );
+                if (groupChat != null) {
+                    var topic = groupChat.Topic;
                     builder = CreateMessageBuilder();
                     builder.AppendEventPrefix();
-                    if (topic.Length > 0) {
-                        // TRANSLATOR: do NOT change the position of {1}!
-                        builder.AppendText(_("Topic for {0}: {1}"), channel, String.Empty);
-                        builder.AppendMessage(topic);
+                    if (topic != null && !topic.IsEmpty) {
+                        builder.AppendFormat(_("Topic for {0}: {1}"), channel, topic);
                     } else {
                         builder.AppendText(_("No topic set for {0}"), channel);
                     }
@@ -1770,6 +1825,90 @@ namespace Smuxi.Engine
             }
         }
 
+        public void CommandOwner(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.Owner(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.Owner(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandDeowner(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.Deowner(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.Deowner(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandChanAdmin(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.ChanAdmin(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.ChanAdmin(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandDeChanAdmin(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.DeChanAdmin(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.DeChanAdmin(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandHalfop(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.Halfop(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.Halfop(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandDehalfop(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.Dehalfop(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.Dehalfop(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
         public void CommandBan(CommandModel cd)
         {
             MessageBuilder builder;
@@ -1820,6 +1959,106 @@ namespace Smuxi.Engine
             }
         }
 
+        public void CommandBanException(CommandModel cd)
+        {
+            MessageBuilder builder;
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                // TODO: use a smart mask by default
+                _IrcClient.BanException(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.BanException(channel, candidates);
+            } else {
+                IList<BanInfo> infos = _IrcClient.GetBanExceptionList(channel);
+                int i = 1;
+                foreach (BanInfo info in infos) {
+                    string msg = String.Format(
+                        "{0} - {1}: {2} {3}",
+                        i++,
+                        info.Channel,
+                        _("ban exception"),
+                        info.Mask
+                    );
+                    builder = CreateMessageBuilder();
+                    builder.AppendEventPrefix();
+                    builder.AppendText(msg);
+                    cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                }
+                if (infos.Count == 0) {
+                    builder = CreateMessageBuilder();
+                    builder.AppendEventPrefix();
+                    builder.AppendText(_("No ban exceptions in channel"), channel);
+                    cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                }
+            }
+        }
+
+        public void CommandUnBanException(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.UnBanException(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.UnBanException(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
+        public void CommandInviteException(CommandModel cd)
+        {
+            MessageBuilder builder;
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                // TODO: use a smart mask by default
+                _IrcClient.InviteException(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.InviteException(channel, candidates);
+            } else {
+                IList<BanInfo> infos = _IrcClient.GetInviteExceptionList(channel);
+                int i = 1;
+                foreach (BanInfo info in infos) {
+                    string msg = String.Format(
+                        "{0} - {1}: {2} {3}",
+                        i++,
+                        info.Channel,
+                        _("invite exception"),
+                        info.Mask
+                    );
+                    builder = CreateMessageBuilder();
+                    builder.AppendEventPrefix();
+                    builder.AppendText(msg);
+                    cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                }
+                if (infos.Count == 0) {
+                    builder = CreateMessageBuilder();
+                    builder.AppendEventPrefix();
+                    builder.AppendText(_("No invite exceptions in channel"), channel);
+                    cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                }
+            }
+        }
+
+        public void CommandUnInviteException(CommandModel cd)
+        {
+            ChatModel chat = cd.Chat;
+            string channel = chat.ID;
+            if (cd.DataArray.Length == 2) {
+                _IrcClient.UnInviteException(channel, cd.Parameter);
+            } else if (cd.DataArray.Length > 2) {
+                string[] candidates = cd.Parameter.TrimEnd().Split(new char[] {' '});
+                _IrcClient.UnInviteException(channel, candidates);
+            } else {
+                _NotEnoughParameters(cd);
+            }
+        }
+
         public void CommandKick(CommandModel cd)
         {
             ChatModel chat = cd.Chat;
@@ -1843,59 +2082,84 @@ namespace Smuxi.Engine
 
         public void CommandKickban(CommandModel cd)
         {
-            ChatModel chat = cd.Chat;
+            if (cd.DataArray.Length < 2) {
+                _NotEnoughParameters(cd);
+                return;
+            }
+            var chat = cd.Chat as GroupChatModel;
+            if (chat == null) {
+                return;
+            }
+
             string channel = chat.ID;
-            IrcUser ircuser;
-            if (cd.DataArray.Length >= 2) {
-                string[] candidates = cd.DataArray[1].Split(new char[] {','});
-                if (cd.DataArray.Length >= 3) {
-                    string reason = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);  
-                    foreach (string nick in candidates) {
-                        ircuser = _IrcClient.GetIrcUser(nick);
-                        if (ircuser != null) {
-                            _IrcClient.Ban(channel, "*!*" + ircuser.Ident + "@" + ircuser.Host);
-                            _IrcClient.RfcKick(channel, nick, reason);
-                        }
-                    }
+            string[] candidates = cd.DataArray[1].Split(new char[] {','});
+            string reason = null;
+            if (cd.DataArray.Length >= 3) {
+                reason = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);
+            }
+            foreach (string nick in candidates) {
+                var victim = (IrcGroupPersonModel) chat.GetPerson(nick);
+                if (victim == null) {
+                    continue;
+                }
+                _IrcClient.Ban(channel, "*!*" + victim.Ident + "@" + victim.Host);
+                if (reason == null) {
+                    _IrcClient.RfcKick(channel, victim.NickName);
                 } else {
-                    foreach (string nick in candidates) {
-                        ircuser = _IrcClient.GetIrcUser(nick);
-                        if (ircuser != null) {
-                            _IrcClient.Ban(channel, "*!*" + ircuser.Ident + "@" + ircuser.Host);
-                            _IrcClient.RfcKick(channel, nick);
-                        }
-                    }
+                    _IrcClient.RfcKick(channel, victim.NickName, reason);
                 }
-            } else {
-                _NotEnoughParameters(cd);
             }
         }
 
         public void CommandMode(CommandModel cd)
         {
-            MessageBuilder builder;
-            ChatModel chat = cd.Chat;
+            string target = null;
+            string mode = null;
             if (cd.DataArray.Length >= 2) {
-                // does cd.Chat cause a remoting call?
-                if (chat.ChatType == ChatType.Group) {
-                    string channel = chat.ID;
-                    _IrcClient.RfcMode(channel, cd.Parameter);
+                // /mode #smuxi
+                // /mode meebey
+                var param1 = cd.DataArray[1];
+                if (param1.StartsWith("+") || param1.StartsWith("-")) {
+                    // no target given, this is the mode already
+                    // /mode +i (on server)
+                    // /mode +b (on channel)
+                    // /mode +b *!*@foo (on channel)
+                    if (cd.Chat.ChatType == ChatType.Group) {
+                        target = cd.Chat.ID;
+                    } else {
+                        target = _IrcClient.Nickname;
+                    }
+                    mode = cd.Parameter;
                 } else {
-                    _IrcClient.RfcMode(_IrcClient.Nickname, cd.Parameter);
+                    target = param1;
+                    if (cd.DataArray.Length >= 3) {
+                        // /mode #smuxi +b *!*@foo
+                        // /mode #smuxi +b
+                        // /mode meebey +i
+                        mode = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);
+                    }
                 }
             } else {
-                if (chat.ChatType == ChatType.Group) {
-                    Channel chan = _IrcClient.GetChannel(cd.Chat.ID);
-                    builder = CreateMessageBuilder();
-                    builder.AppendEventPrefix();
-                    builder.AppendText("mode/{0} [{1}]", chat.Name, chan.Mode);
-                    cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                // /mode (on server)
+                // /mode (on channel)
+                if (cd.Chat.ChatType == ChatType.Group) {
+                    target = cd.Chat.ID;
                 } else {
-                    builder = CreateMessageBuilder();
+                    target = _IrcClient.Nickname;
+                }
+            }
+
+            if (target != null && mode != null) {
+                _IrcClient.RfcMode(target, mode);
+            } else if (target != null) {
+                if (_IrcClient.IsMe(target)) {
+                    var builder = CreateMessageBuilder();
                     builder.AppendEventPrefix();
                     builder.AppendText(_("Your user mode is {0}"),
                                        String.Format("[{0}]", _IrcClient.Usermode));
                     cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
+                } else {
+                    _IrcClient.RfcMode(target);
                 }
             }
         }
@@ -1909,25 +2173,27 @@ namespace Smuxi.Engine
             } else {
                 channel = chat.ID;
             }
-            if (cd.DataArray.Length >= 2) {
-                if (!_IrcClient.IsJoined(channel, cd.DataArray[1])) {
-                    _IrcClient.RfcInvite(cd.DataArray[1], channel);
-                    var msg = CreateMessageBuilder().
-                        AppendEventPrefix().
-                        AppendText(_("Inviting {0} to {1}"),
-                                   cd.DataArray[1], channel).
-                        ToMessage();
-                    cd.FrontendManager.AddMessageToChat(chat, msg);
-                } else {
-                    var msg = CreateMessageBuilder().
-                        AppendEventPrefix().
-                        AppendText(_("{0} is already on {1}"),
-                                   cd.DataArray[1], channel).
-                        ToMessage();
-                    cd.FrontendManager.AddMessageToChat(chat, msg);
-                }
-            } else {
+            if (cd.DataArray.Length < 2) {
                 _NotEnoughParameters(cd);
+                return;
+            }
+            var invitee = cd.DataArray[1];
+            var groupChat = chat as GroupChatModel;
+            if (groupChat != null && groupChat.GetPerson(invitee) != null) {
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendText(_("{0} is already on {1}"),
+                               invitee, channel).
+                    ToMessage();
+                cd.FrontendManager.AddMessageToChat(chat, msg);
+            } else {
+                _IrcClient.RfcInvite(invitee, channel);
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendText(_("Inviting {0} to {1}"),
+                               invitee, channel).
+                    ToMessage();
+                cd.FrontendManager.AddMessageToChat(chat, msg);
             }
         }
         
@@ -1967,9 +2233,18 @@ namespace Smuxi.Engine
             builder.AppendText("[ ");
             foreach (IrcGroupPersonModel ircPerson in ircPersons) {
                 string mode;
-                if (ircPerson.IsOp) {
+                if (ircPerson.IsOwner) {
+                    opCount++;
+                    mode = "~";
+                } else if (ircPerson.IsChannelAdmin) {
+                    opCount++;
+                    mode = "&";
+                } else if (ircPerson.IsOp) {
                     opCount++;
                     mode = "@";
+                } else if (ircPerson.IsHalfop) {
+                    opCount++;
+                    mode = "%";
                 } else if (ircPerson.IsVoice) {
                     voiceCount++;
                     mode = "+";
@@ -2029,10 +2304,8 @@ namespace Smuxi.Engine
                 string message = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);  
                 _IrcClient.SendMessage(SendType.Notice, target, message);
                 
-                ChatModel chat;
-                if (_IrcClient.IsJoined(target)) {
-                    chat = GetChat(target, ChatType.Group);
-                } else {
+                var chat = GetChat(target, ChatType.Group);
+                if (chat == null) {
                     // wasn't a channel but maybe a query
                     chat = GetChat(target, ChatType.Person);
                 }
@@ -2207,6 +2480,13 @@ namespace Smuxi.Engine
                 }
             }
 
+            if (config["Connection/AutoConvertUTF8"] == null) {
+                _IrcClient.EnableUTF8Recode = true;
+            } else {
+                _IrcClient.EnableUTF8Recode =
+                    (bool) config["Connection/AutoConvertUTF8"];
+            }
+
             var proxySettings = new ProxySettings();
             proxySettings.ApplyConfig(config);
             var protocol = server.UseEncryption ? "ircs" : "irc";
@@ -2330,6 +2610,12 @@ namespace Smuxi.Engine
                             case "SAFELIST":
                                 HasSafeListSupport = true;
                                 break;
+                            case "CHANTYPES":
+                                ChannelTypes.Clear();
+                                foreach (var type in supportValue) {
+                                    ChannelTypes.Add(type.ToString());
+                                }
+                                break;
                         }
                     }
                     break;
@@ -2371,16 +2657,10 @@ namespace Smuxi.Engine
                     _OnErrorNicknameInUse(e);
                     break;
                 case ReplyCode.EndOfNames:
-                    chan = e.Data.RawMessageArray[3];
-                    GroupChatModel groupChat = (GroupChatModel)GetChat(
-                       chan, ChatType.Group);
-                    if (groupChat == null) {
-                        break;
-                    }
-                    groupChat.IsSynced = true;
-#if LOG4NET
-                    _Logger.Debug("_OnRawMessage(): " + chan + " synced");
-#endif
+                    OnEndOfNames(e);
+                    break;
+                case ReplyCode.ChannelModeIs:
+                    OnChannelModeIs(e);
                     break;
                 default:
                     if (!handled) {
@@ -2475,19 +2755,11 @@ namespace Smuxi.Engine
         {
             var builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
-            // TRANSLATOR: the final line will look like this:
-            // -!- Nick {0} is already in use
-            builder.AppendText(_("Nick"));
-            builder.AppendSpace();
 
             var text = builder.CreateText(e.Data.RawMessageArray[3]);
             text.Bold = true;
-            builder.AppendText(text);
-            builder.AppendSpace();
+            builder.AppendFormat(_("Nick {0} is already in use"), text);
 
-            // TRANSLATOR: the final line will look like this:
-            // -!- Nick {0} is already in use
-            builder.AppendText(_("is already in use"));
             Session.AddMessageToChat(_NetworkChat, builder.ToMessage());
 
             AutoRenick();
@@ -2497,15 +2769,14 @@ namespace Smuxi.Engine
         {
             var builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
-            builder.AppendText(_("Cannot join to channel:"));
-            builder.AppendSpace();
 
             var text = builder.CreateText(e.Data.RawMessageArray[3]);
             text.Bold = true;
-            builder.AppendText(text);
-            builder.AppendSpace();
 
-            builder.AppendText("({0})", _("You are banned"));
+            builder.AppendFormat("{0}: {1} ({2})",
+                                 _("Cannot join to channel:"),
+                                 text,
+                                 _("You are banned"));
             Session.AddMessageToChat(_NetworkChat, builder.ToMessage());
         }
         
@@ -2634,6 +2905,7 @@ namespace Smuxi.Engine
         private void _OnChannelMessage(object sender, IrcEventArgs e)
         {
             var chat = GetChat(e.Data.Channel, ChatType.Group) ?? Chat;
+            UpdateGroupPerson(chat, e.Data);
 
             var builder = CreateMessageBuilder();
             builder.AppendMessage(GetPerson(chat, e.Data.Nick), e.Data.Message);
@@ -2646,6 +2918,7 @@ namespace Smuxi.Engine
         private void _OnChannelAction(object sender, ActionEventArgs e)
         {
             var chat = GetChat(e.Data.Channel, ChatType.Group) ?? Chat;
+            UpdateGroupPerson(chat, e.Data);
 
             var builder = CreateMessageBuilder();
             builder.AppendActionPrefix();
@@ -2661,6 +2934,7 @@ namespace Smuxi.Engine
         private void _OnChannelNotice(object sender, IrcEventArgs e)
         {
             var chat = GetChat(e.Data.Channel, ChatType.Group) ?? Chat;
+            UpdateGroupPerson(chat, e.Data);
 
             var builder = CreateMessageBuilder();
             builder.AppendText("-{0}:{1}- ", e.Data.Nick, e.Data.Channel);
@@ -2697,7 +2971,14 @@ namespace Smuxi.Engine
                     return;
                 }
                 Session.AddChat(chat);
-                Session.SyncChat(chat);
+                Session.AddMessageToChat(chat, msg);
+                // HACK: lower probability of sync race condition swallowing
+                // messages, see: https://www.smuxi.org/issues/show/634
+                ThreadPool.QueueUserWorkItem(delegate {
+                    Thread.Sleep(1000);
+                    Session.SyncChat(chat);
+                });
+                return;
             }
 
             Session.AddMessageToChat(chat, msg);
@@ -2731,7 +3012,14 @@ namespace Smuxi.Engine
                     return;
                 }
                 Session.AddChat(chat);
-                Session.SyncChat(chat);
+                Session.AddMessageToChat(chat, msg);
+                // HACK: lower probability of sync race condition swallowing
+                // messages, see: https://www.smuxi.org/issues/show/634
+                ThreadPool.QueueUserWorkItem(delegate {
+                    Thread.Sleep(1000);
+                    Session.SyncChat(chat);
+                });
+                return;
             }
 
             Session.AddMessageToChat(chat, msg);
@@ -2818,22 +3106,19 @@ namespace Smuxi.Engine
 #endif
                     // ignore
                 } else {
-                    IrcUser siuser = _IrcClient.GetIrcUser(e.Who);
-                    var icuser = CreateGroupPerson(e.Who);
-                    icuser.Ident = siuser.Ident;
-                    icuser.Host = siuser.Host;
-                    Session.AddPersonToGroupChat(groupChat, icuser);
+                    var person = CreateGroupPerson(e.Who);
+                    person.Ident = e.Data.Ident;
+                    person.Host = e.Data.Host;
+                    Session.AddPersonToGroupChat(groupChat, person);
                 }
             }
 
             var builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
-            builder.AppendIdendityName(GetPerson(groupChat, e.Who));
-            // TRANSLATOR: do NOT change the position of {0}!
-            builder.AppendText(_("{0} [{1}] has joined {2}"),
-                               String.Empty,
-                               String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
-                               e.Channel);
+            builder.AppendFormat(_("{0} [{1}] has joined {2}"),
+                                 GetPerson(groupChat, e.Who),
+                                 String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
+                                 e.Channel);
 
             var msg = builder.ToMessage();
             Session.AddMessageToChat(groupChat, msg);
@@ -2851,8 +3136,7 @@ namespace Smuxi.Engine
                 return;
             }
 
-            // would be nice if SmartIrc4net would take care of removing prefixes
-            foreach (string user in e.UserList) {
+            foreach (string user in e.RawUserList) {
                 // skip empty users (some IRC servers send an extra space)
                 if (user.TrimEnd(' ').Length == 0) {
                     continue;
@@ -2867,11 +3151,30 @@ namespace Smuxi.Engine
                     case '&':
                     case '%':
                     case '~':
+                    case '!':
+                    case '.':
                         username = user.Substring(1);
                         break;
                 }
                 
                 var groupPerson = CreateGroupPerson(username);
+                switch (user[0]) {
+                    case '~':
+                        groupPerson.IsOwner = true;
+                        break;
+                    case '&':
+                        groupPerson.IsChannelAdmin = true;
+                        break;
+                    case '@':
+                        groupPerson.IsOp = true;
+                        break;
+                    case '%':
+                        groupPerson.IsHalfop = true;
+                        break;
+                    case '+':
+                        groupPerson.IsVoice = true;
+                        break;
+                }
                 
                 groupChat.UnsafePersons.Add(groupPerson.NickName, groupPerson);
 #if LOG4NET
@@ -2881,49 +3184,49 @@ namespace Smuxi.Engine
             }
         }
         
-        private void _OnChannelActiveSynced(object sender, IrcEventArgs e)
+        void OnEndOfNames(IrcEventArgs e)
         {
-#if LOG4NET
-            _Logger.Debug("_OnChannelActiveSynced() e.Data.Channel: " + e.Data.Channel);
-#endif
+            Trace.Call(e);
+
+            var chan = e.Data.RawMessageArray[3];
 
             lock (_ActiveChannelJoinList) {
-                _ActiveChannelJoinList.Remove(e.Data.Channel.ToLower());
+                _ActiveChannelJoinList.Remove(chan.ToLower());
             }
             // tell the currently waiting join task item from the task queue
             // that one channel is finished
             _ActiveChannelJoinHandle.Set();
 
-            GroupChatModel groupChat = (GroupChatModel) GetChat(e.Data.Channel, ChatType.Group);
+            var groupChat = (GroupChatModel) GetChat(chan, ChatType.Group);
             if (groupChat == null) {
 #if LOG4NET
-                _Logger.Error("_OnChannelActiveSynced(): GetChat(" + e.Data.Channel + ", ChatType.Group) returned null!");
+                _Logger.Error("OnEndOfNames(): GetChat(" + e.Data.Channel + ", ChatType.Group) returned null!");
 #endif
                 return;
             }
-
-            Channel channel = _IrcClient.GetChannel(e.Data.Channel);
-            foreach (ChannelUser channelUser in channel.Users.Values) {
-                IrcGroupPersonModel groupPerson = (IrcGroupPersonModel) groupChat.GetPerson(channelUser.Nick);
-                if (groupPerson == null) {
-                    // we should not get here anymore, _OnNames creates the users already
 #if LOG4NET
-                    _Logger.Error("_OnChannelActiveSynced(): groupChat.GetPerson(" + channelUser.Nick + ") returned null!");
+            _Logger.Debug("OnEndOfNames(): " + chan + " synced");
 #endif
-                    continue;
-                }
-                
-                groupPerson.RealName = channelUser.Realname;
-                groupPerson.Ident    = channelUser.Ident;
-                groupPerson.Host     = channelUser.Host;
-                groupPerson.IsOp     = channelUser.IsOp;
-                groupPerson.IsVoice  = channelUser.IsVoice;
-            }
+            groupChat.IsSynced = true;
 
             // prime-time
             Session.SyncChat(groupChat);
         }
-        
+
+        void OnChannelModeIs(IrcEventArgs e)
+        {
+            Trace.Call(e);
+
+            var chat = GetChat(e.Data.Channel, ChatType.Group) ?? Chat;
+            var mode = String.Join(" ", e.Data.RawMessageArray.Skip(4).ToArray()).Trim();
+            var channelName = e.Data.RawMessageArray[3];
+
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            builder.AppendText("mode/{0} [{1}]", channelName, mode);
+            Session.AddMessageToChat(chat, builder.ToMessage());
+        }
+
         private void _OnPart(object sender, PartEventArgs e)
         {
 #if LOG4NET
@@ -2954,12 +3257,10 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder();
             builder.MessageType = MessageType.Event;
             builder.AppendEventPrefix();
-            builder.AppendIdendityName(GetPerson(groupChat, e.Who));
-            // TRANSLATOR: do NOT change the position of {0}!
-            builder.AppendText(_("{0} [{1}] has left {2}"),
-                               String.Empty,
-                               String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
-                               e.Channel);
+            builder.AppendFormat(_("{0} [{1}] has left {2}"),
+                                 GetPerson(groupChat, e.Who),
+                                 String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
+                                 e.Channel);
 
             if (!String.IsNullOrEmpty(e.PartMessage)) {
                 builder.AppendText(" [");
@@ -2981,21 +3282,16 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
             if (e.Data.Irc.IsMe(e.Whom)) {
-                // TRANSLATOR: do NOT change the position of {1}!
-                builder.AppendText(_("You were kicked from {0} by {1}"),
-                                   e.Channel, String.Empty);
-                builder.AppendIdendityName(GetPerson(chat, e.Who));
+                builder.AppendFormat(_("You were kicked from {0} by {1}"),
+                                     e.Channel, GetPerson(chat, e.Who));
                 builder.AppendText(" [").AppendMessage(e.KickReason).AppendText("]");
                 Session.AddMessageToChat(chat, builder.ToMessage());
                 Session.DisableChat(chat);
             } else {
                 PersonModel user = chat.GetPerson(e.Whom);
                 Session.RemovePersonFromGroupChat(chat, user);
-                builder.AppendIdendityName(GetPerson(chat, e.Whom));
-                // TRANSLATOR: do NOT change the position of {0} and {2}!
-                builder.AppendText(_("{0} was kicked from {1} by {2}"),
-                                   String.Empty, e.Channel, String.Empty);
-                builder.AppendIdendityName(GetPerson(chat, e.Who));
+                builder.AppendFormat(_("{0} was kicked from {1} by {2}"),
+                                     GetPerson(chat, e.Whom), e.Channel, GetPerson(chat, e.Who));
                 builder.AppendText(" [").AppendMessage(e.KickReason).AppendText("]");
                 Session.AddMessageToChat(chat, builder.ToMessage());
             }
@@ -3012,52 +3308,46 @@ namespace Smuxi.Engine
 
                 var builder = CreateMessageBuilder();
                 builder.AppendEventPrefix();
-                // TRANSLATOR: do NOT change the position of {0}!
-                builder.AppendText(_("You're now known as {0}"),
-                                  String.Empty);
-                builder.AppendIdendityName(CreatePerson(e.NewNickname));
+                builder.AppendFormat(_("You're now known as {0}"),
+                                     CreatePerson(e.NewNickname));
 
                 Session.AddMessageToChat(_NetworkChat, builder.ToMessage());
             }
-            
-            IrcUser ircuser = e.Data.Irc.GetIrcUser(e.NewNickname);
-            if (ircuser != null) {
-                foreach (string channel in ircuser.JoinedChannels) {
-                    GroupChatModel cchat = (GroupChatModel)GetChat(channel, ChatType.Group);
-                    
-                    // clone the old user to a new user
-                    IrcGroupPersonModel olduser = (IrcGroupPersonModel) cchat.GetPerson(e.OldNickname);
-                    if (olduser == null) {
-#if LOG4NET
-                        _Logger.Error("cchat.GetPerson(e.OldNickname) returned null! cchat.Name: "+cchat.Name+" e.OldNickname: "+e.OldNickname);
-#endif
-                        continue;
-                    }
-                    var newuser = CreateGroupPerson(e.NewNickname);
-                    newuser.RealName = olduser.RealName;
-                    newuser.Ident = olduser.Ident;
-                    newuser.Host = olduser.Host;
-                    newuser.IsOp = olduser.IsOp;
-                    newuser.IsVoice = olduser.IsVoice;
-                    
-                    Session.UpdatePersonInGroupChat(cchat, olduser, newuser);
-                    
-                    var builder = CreateMessageBuilder();
-                    builder.AppendEventPrefix();
-                    if (e.Data.Irc.IsMe(e.NewNickname)) {
-                        // TRANSLATOR: do NOT change the position of {0}!
-                        builder.AppendText(_("You're now known as {0}"),
-                                           String.Empty);
-                    } else {
-                        builder.AppendIdendityName(olduser);
-                        // TRANSLATOR: do NOT change the position of {0} or {1}!
-                        builder.AppendText(_("{0} is now known as {1}"),
-                                           String.Empty,
-                                           String.Empty);
-                    }
-                    builder.AppendIdendityName(newuser);
-                    Session.AddMessageToChat(cchat, builder.ToMessage());
+
+            foreach (var chat in Chats) {
+                if (!(chat is GroupChatModel)) {
+                    continue;
                 }
+                var groupChat = (GroupChatModel) chat;
+                var oldPerson = (IrcGroupPersonModel) groupChat.GetPerson(e.OldNickname);
+                if (oldPerson == null) {
+                    // nobodoy to rename
+                    continue;
+                }
+                // clone the old user to a new user
+                var newPerson = CreateGroupPerson(e.NewNickname);
+                newPerson.RealName = oldPerson.RealName;
+                newPerson.Ident = oldPerson.Ident;
+                newPerson.Host = oldPerson.Host;
+                newPerson.IsOwner = oldPerson.IsOwner;
+                newPerson.IsChannelAdmin = oldPerson.IsChannelAdmin;
+                newPerson.IsOp = oldPerson.IsOp;
+                newPerson.IsHalfop = oldPerson.IsHalfop;
+                newPerson.IsVoice = oldPerson.IsVoice;
+
+                Session.UpdatePersonInGroupChat(groupChat, oldPerson, newPerson);
+
+                var builder = CreateMessageBuilder();
+                builder.AppendEventPrefix();
+                if (e.Data.Irc.IsMe(e.NewNickname)) {
+                    builder.AppendFormat(_("You're now known as {0}"),
+                                         newPerson);
+                } else {
+                    builder.AppendFormat(_("{0} is now known as {1}"),
+                                         oldPerson,
+                                         newPerson);
+                }
+                Session.AddMessageToChat(groupChat, builder.ToMessage());
             }
         }
         
@@ -3079,20 +3369,75 @@ namespace Smuxi.Engine
             builder = CreateMessageBuilder();
             builder.AppendEventPrefix();
 
+            MessagePartModel who;
             if (String.IsNullOrEmpty(e.Who)) {
                 // server changed topic
-                builder.AppendText(e.Data.From);
+                who = builder.CreateText(e.Data.From);
             } else {
-                builder.AppendIdendityName(GetPerson(cchat, e.Who));
+                who = builder.CreateIdendityName(GetPerson(cchat, e.Who));
             }
 
-            // TRANSLATOR: do NOT change the position of {0} and {2}!
-            builder.AppendText(_("{0} changed the topic of {1} to: {2}"),
-                             String.Empty, e.Channel, String.Empty);
-            builder.AppendMessage(e.NewTopic);
+            builder.AppendFormat(_("{0} changed the topic of {1} to: {2}"),
+                                 who, e.Channel, e.NewTopic);
             Session.AddMessageToChat(cchat, builder.ToMessage());
         }
-        
+
+        void OnOwner(object sender, OwnerEventArgs e)
+        {
+            var cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
+            var user = (IrcGroupPersonModel) cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsOwner = true;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnOwner(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
+
+        void OnDeowner(object sender, DeownerEventArgs e)
+        {
+            var cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
+            var user = (IrcGroupPersonModel) cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsOwner = false;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnDeowner(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
+
+        void OnChannelAdmin(object sender, ChannelAdminEventArgs e)
+        {
+            var cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
+            var user = (IrcGroupPersonModel) cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsChannelAdmin = true;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnChannelAdmin(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
+
+        void OnDeChannelAdmin(object sender, DeChannelAdminEventArgs e)
+        {
+            var cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
+            var user = (IrcGroupPersonModel) cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsChannelAdmin = false;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnDeChannelAdmin(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
+
         private void _OnOp(object sender, OpEventArgs e)
         {
             GroupChatModel cchat = (GroupChatModel)GetChat(e.Channel, ChatType.Group);
@@ -3120,6 +3465,34 @@ namespace Smuxi.Engine
 #endif
             }
         }
+
+        void OnHalfop(object sender, HalfopEventArgs e)
+        {
+            var cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
+            var user = (IrcGroupPersonModel) cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsHalfop = true;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnHalfop(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
+
+        void OnDehalfop(object sender, DehalfopEventArgs e)
+        {
+            GroupChatModel cchat = (GroupChatModel)GetChat(e.Channel, ChatType.Group);
+            IrcGroupPersonModel user = (IrcGroupPersonModel)cchat.GetPerson(e.Whom);
+            if (user != null) {
+                user.IsHalfop = false;
+                Session.UpdatePersonInGroupChat(cchat, user, user);
+#if LOG4NET
+            } else {
+                _Logger.Error("OnDehalfop(): cchat.GetPerson(e.Whom) returned null! cchat.Name: "+cchat.Name+" e.Whom: "+e.Whom);
+#endif
+            }
+        }
         
         private void _OnVoice(object sender, VoiceEventArgs e)
         {
@@ -3166,28 +3539,25 @@ namespace Smuxi.Engine
                     who = e.Data.Irc.Nickname;
                     target = _NetworkChat;
 
-                    // TRANSLATOR: do NOT change the position of {1}!
-                    builder.AppendText(_("Mode change [{0}] for user {1}"),
-                                       modechange, String.Empty);
-                    builder.AppendIdendityName(CreatePerson(who));
+                    builder.AppendFormat(_("Mode change [{0}] for user {1}"),
+                                         modechange, CreatePerson(who));
                     break;
                 case ReceiveType.ChannelModeChange:
                     modechange = String.Join(" ", e.Data.RawMessageArray, 3,
                                              e.Data.RawMessageArray.Length - 3);
                     target = GetChat(e.Data.Channel, ChatType.Group) ?? Chat;
+                    UpdateGroupPerson(target, e.Data);
 
-                    // TRANSLATOR: do NOT change the position of {2}!
-                    builder.AppendText(_("mode/{0} [{1}] by {2}"),
-                                       e.Data.Channel, modechange, String.Empty);
-
+                    MessagePartModel whoMsgPart;
                     if (e.Data.Nick != null && e.Data.Nick.Length > 0) {
-                        who = e.Data.Nick;
-                        builder.AppendIdendityName(GetPerson(target, who));
+                        whoMsgPart = builder.CreateIdendityName(GetPerson(target, e.Data.Nick));
                     } else {
                         // server changed mode
-                        who = e.Data.From;
-                        builder.AppendText(who);
+                        whoMsgPart = builder.CreateText(e.Data.From);
                     }
+
+                    builder.AppendFormat(_("mode/{0} [{1}] by {2}"),
+                                         e.Data.Channel, modechange, whoMsgPart);
                     break;
             }
 
@@ -3212,12 +3582,10 @@ namespace Smuxi.Engine
             } else {
                 var builder = CreateMessageBuilder();
                 builder.AppendEventPrefix();
-                builder.AppendIdendityName(CreatePerson(e.Who));
-                // TRANSLATOR: do NOT change the position of {0}!
-                builder.AppendText(_("{0} [{1}] has quit"),
-                                   String.Empty,
-                                   String.Format("{0}@{1}",
-                                                 e.Data.Ident, e.Data.Host));
+                builder.AppendFormat(_("{0} [{1}] has quit"),
+                                     CreatePerson(e.Who),
+                                     String.Format("{0}@{1}",
+                                                   e.Data.Ident, e.Data.Host));
                 builder.AppendText(" [");
                 // colors are annoying in quit messages
                 builder.StripColors = true;
@@ -3470,6 +3838,26 @@ namespace Smuxi.Engine
             return person;
         }
 
+        void UpdateGroupPerson(ChatModel chat, IrcMessageData msg)
+        {
+            if (!(chat is GroupChatModel)) {
+                return;
+            }
+            // server messages have no nick
+            if (msg.Nick == null) {
+                return;
+            }
+
+            // write-back ident/host to person
+            var groupChat = (GroupChatModel) chat;
+            var person = groupChat.GetPerson(msg.Nick) as IrcGroupPersonModel;
+            if (person == null) {
+                return;
+            }
+            person.Ident = person.Ident ?? msg.Ident;
+            person.Host = person.Host ?? msg.Host;
+        }
+
         private ChatModel GetChat(IrcMessageData msg)
         {
             if (msg == null) {
diff --git a/src/Engine-JabbR/AssemblyInfo.cs b/src/Engine-JabbR/AssemblyInfo.cs
new file mode 100644
index 0000000..0ec8ac1
--- /dev/null
+++ b/src/Engine-JabbR/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+/*
+ * Smuxi - Smart MUltipleXed Irc
+ *
+ * Copyright (c) 2012 Mirco Bauer <meebey at meebey.net>
+ *
+ * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Smuxi - JabbR protocol support")]
+[assembly: AssemblyCopyright("2012-2013 (C) Mirco Bauer <meebey at meebey.net>")]
+
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+
+[assembly: CLSCompliant(true)]
+[assembly: ComVisible(false)]
diff --git a/src/Engine-JabbR/JabbrMessageBuilder.cs b/src/Engine-JabbR/JabbrMessageBuilder.cs
new file mode 100644
index 0000000..dee403e
--- /dev/null
+++ b/src/Engine-JabbR/JabbrMessageBuilder.cs
@@ -0,0 +1,67 @@
+// Smuxi - Smart MUltipleXed Irc
+// 
+// Copyright (c) 2012 Mirco Bauer <meebey at meebey.net>
+// 
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+using System;
+using System.Web;
+using System.Text;
+using System.Text.RegularExpressions;
+using Smuxi.Common;
+
+namespace Smuxi.Engine
+{
+    public class JabbrMessageBuilder : MessageBuilder
+    {
+        public JabbrMessageBuilder() : base()
+        {
+        }
+
+        public override MessageBuilder AppendMessage(string msg)
+        {
+            return base.AppendMessage(HtmlToText(msg));
+        }
+
+        string HtmlToText(string html)
+        {
+            // TODO: implement <a> tag
+            if (html.Contains("\n")) {
+                var normalized = new StringBuilder(html.Length);
+                html = html.Replace("\r\n", "\n");
+                foreach (var htmlPart in html.Split('\n')) {
+                    var trimmed = htmlPart.TrimEnd(' ');
+                    if (trimmed.Length == 0) {
+                        // skip empty lines
+                        continue;
+                    }
+                    normalized.AppendFormat("{0} ", trimmed);
+                }
+                // remove trailing space
+                normalized.Length--;
+                html = normalized.ToString();
+            }
+            // strip all HTML tags
+            var text = Regex.Replace(html, "<[^>]+>", String.Empty);
+            // strip leading and trailing whitespace
+            text = text.Trim();
+            // convert HTML entities to their string values
+            text = HttpUtility.HtmlDecode(text);
+            return text;
+        }
+    }
+}
diff --git a/src/Engine-JabbR/JabbrProtocolManager.cs b/src/Engine-JabbR/JabbrProtocolManager.cs
new file mode 100644
index 0000000..02321a5
--- /dev/null
+++ b/src/Engine-JabbR/JabbrProtocolManager.cs
@@ -0,0 +1,513 @@
+// Smuxi - Smart MUltipleXed Irc
+// 
+// Copyright (c) 2012-2013 Mirco Bauer <meebey at meebey.net>
+// 
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+using JabbR.Client;
+using JabbR.Client.Models;
+using Microsoft.AspNet.SignalR.Client.Transports;
+using Microsoft.AspNet.SignalR.Client.Http;
+using Smuxi.Common;
+
+namespace Smuxi.Engine
+{
+    // https://github.com/davidfowl/Jabbot/blob/master/Jabbot/Bot.cs
+    // https://github.com/davidfowl/JabbR/blob/master/JabbR/Hubs/Chat.cs
+    [ProtocolManagerInfo(Name = "JabbR", Description = "JabbR Chat", Alias = "jabbr")]
+    public class JabbrProtocolManager : ProtocolManagerBase
+    {
+#if LOG4NET
+        private static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+#endif
+        const string LibraryTextDomain = "smuxi-engine-jabbr";
+        ChatModel ProtocolChat { get; set; }
+        JabbRClient Client { get; set; }
+        string Username { get; set; }
+        ServerModel Server { get; set; }
+
+        public override string NetworkID {
+            get {
+                if (Server == null) {
+                    return Protocol;
+                }
+                return Server.Hostname;
+            }
+        }
+
+        public override string Protocol {
+            get {
+                return "JabbR";
+            }
+        }
+
+        public override ChatModel Chat {
+            get {
+                return ProtocolChat;
+            }
+        }
+
+        public JabbrProtocolManager(Session session) : base(session)
+        {
+            Trace.Call(session);
+        }
+
+        public override bool Command(CommandModel cmd)
+        {
+            Trace.Call(cmd);
+
+            if (cmd.IsCommand) {
+                switch (cmd.Command) {
+                    case "j":
+                    case "join":
+                        CommandJoin(cmd);
+                        break;
+                }
+            } else {
+                CommandMessage(cmd);
+            }
+            return true;
+        }
+
+        public void CommandJoin(CommandModel cmd)
+        {
+            Trace.Call(cmd);
+
+            if (String.IsNullOrEmpty(cmd.Parameter)) {
+                NotEnoughParameters(cmd);
+                return;
+            }
+
+            try {
+                Client.JoinRoom(cmd.Parameter);
+            } catch (Exception ex) {
+#if LOG4NET
+                Logger.Error(ex);
+#endif
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendErrorText(_("Joining room failed. Reason: {0}"),
+                                    ex.Message).
+                    ToMessage();
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, msg);
+            }
+        }
+
+        public void CommandMessage(CommandModel cmd)
+        {
+            Trace.Call(cmd);
+
+            try {
+                switch (cmd.Chat.ChatType) {
+                    case ChatType.Group:
+                        Client.Send(cmd.Data, cmd.Chat.ID).Wait();
+                        break;
+                    case ChatType.Person:
+                        Client.SendPrivateMessage(cmd.Chat.ID, cmd.Data).Wait();
+                        break;
+                }
+            } catch (Exception ex) {
+#if LOG4NET
+                Logger.Error(ex);
+#endif
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendErrorText(_("Sending message failed. Reason: {0}"),
+                                    ex.Message).
+                    ToMessage();
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, msg);
+            }
+        }
+
+        public override void Connect(FrontendManager fm, ServerModel server)
+        {
+            Trace.Call(fm, server);
+
+            Server = server;
+            var chatName = String.Format("{0} {1}", Protocol, NetworkID);
+            ProtocolChat = new ProtocolChatModel(NetworkID, chatName, this);
+            ProtocolChat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+            Session.AddChat(Chat);
+            Session.SyncChat(Chat);
+
+            try {
+                string url;
+                if (server.Hostname.StartsWith("http://") ||
+                    server.Hostname.StartsWith("https://")) {
+                    url = server.Hostname;
+                } else {
+                    if (server.UseEncryption && server.Port == 443) {
+                        url = String.Format("https://{0}", server.Hostname);
+                    } else if (server.UseEncryption) {
+                        url = String.Format("https://{0}:{1}",
+                                            server.Hostname, server.Port);
+                    } else if (!server.UseEncryption && server.Port == 80) {
+                        url = String.Format("http://{0}", server.Hostname);
+                    } else {
+                        url = String.Format("http://{0}:{1}",
+                                            server.Hostname, server.Port);
+                    }
+                }
+                // HACK: SignalR's ServerSentEventsTransport times out on Mono
+                // for some reason and then fallbacks to LongPollingTransport
+                // this takes 10 seconds though, so let's go LP directly
+                Func<IClientTransport> transport = null;
+                if (Type.GetType("Mono.Runtime") != null) {
+                    transport = () => new LongPollingTransport();
+                }
+                var authProvider = new DefaultAuthenticationProvider(url);
+                Client = new JabbRClient(url, authProvider, transport);
+                Client.MessageReceived += OnMessageReceived;
+                Client.MeMessageReceived += OnMeMessageReceived;
+                Client.UserLeft += OnUserLeft;
+                Client.UserJoined += OnUserJoined;
+                Client.JoinedRoom += OnJoinedRoom;
+                Client.PrivateMessage += OnPrivateMessage;
+
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendText(_("Connecting to {0}..."), url).
+                    ToMessage();
+                Session.AddMessageToChat(ProtocolChat, msg);
+
+                Username = server.Username;
+                var res = Client.Connect(server.Username, server.Password);
+                res.Wait();
+                // HACK: this event can only be subscribed if we have made an
+                // actual connection o_O
+                Client.Disconnected += OnDisconnected;
+                IsConnected = true;
+                OnConnected(EventArgs.Empty);
+                OnLoggedOn(res.Result.Rooms);
+
+                Me = CreatePerson(Username);
+                Me.IdentityNameColored.ForegroundColor = new TextColor(0, 0, 255);
+                Me.IdentityNameColored.BackgroundColor = TextColor.None;
+                Me.IdentityNameColored.Bold = true;
+            } catch (Exception ex) {
+#if LOG4NET
+                Logger.Error(ex);
+#endif
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendErrorText(_("Connection failed! Reason: {0}"),
+                                    ex.Message).
+                    ToMessage();
+                Session.AddMessageToChat(ProtocolChat, msg);
+            }
+        }
+
+        void OnPrivateMessage(string fromUserName, string toUserName, string message)
+        {
+            Trace.Call(fromUserName, toUserName, message);
+
+            string targetChat;
+            string targetUser;
+            if (fromUserName == Username) {
+                targetChat = toUserName;
+                targetUser = toUserName;
+            } else {
+                targetChat = fromUserName;
+                targetUser = fromUserName;
+            }
+            var chat = (PersonChatModel) GetChat(targetChat, ChatType.Person);
+            if (chat == null) {
+                var person = CreatePerson(targetUser);
+                chat = new PersonChatModel(person, targetUser, targetUser, this);
+                chat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+                Session.AddChat(chat);
+                Session.SyncChat(chat);
+            }
+            var builder = CreateMessageBuilder<JabbrMessageBuilder>();
+            if (fromUserName == Username) {
+                builder.AppendSenderPrefix(Me);
+            } else {
+                builder.AppendSenderPrefix(chat.Person, true);
+            }
+            builder.AppendMessage(message);
+            Session.AddMessageToChat(chat, builder.ToMessage());
+        }
+
+        void OnDisconnected()
+        {
+            Trace.Call();
+
+            IsConnected = false;
+            OnDisconnected(EventArgs.Empty);
+        }
+
+        void OnJoinedRoom(Room room)
+        {
+            Trace.Call(room);
+
+            var groupChat = new GroupChatModel(room.Name, room.Name, this);
+            groupChat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+
+            var task = Client.GetRoomInfo(room.Name);
+            task.Wait();
+            // check task.Exception
+            var roomInfo = task.Result;
+
+            groupChat.Topic = CreateMessageBuilder<JabbrMessageBuilder>().
+                AppendMessage(roomInfo.Topic).
+                ToMessage();
+            foreach (var user in roomInfo.Users) {
+                groupChat.UnsafePersons.Add(user.Name,
+                                            CreatePerson(user));
+            }
+            // add ourself if needed
+            if (!groupChat.UnsafePersons.ContainsKey(Username)) {
+                groupChat.UnsafePersons.Add(Username, Me);
+            }
+            Session.AddChat(groupChat);
+            Session.SyncChat(groupChat);
+        }
+
+        public override void Reconnect(FrontendManager fm)
+        {
+            Trace.Call(fm);
+
+            throw new NotImplementedException();
+        }
+
+        public override void Disconnect(FrontendManager fm)
+        {
+            Trace.Call(fm);
+
+            Client.Disconnect();
+        }
+
+        public override IList<GroupChatModel> FindGroupChats(GroupChatModel filter)
+        {
+            Trace.Call(filter);
+
+            var res = Client.GetRooms();
+            res.Wait();
+            // res.Exception
+            var groupChats = new List<GroupChatModel>();
+            foreach (var room in res.Result) {
+                var groupChat = new GroupChatModel(room.Name, room.Name, this);
+                groupChat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+                groupChat.PersonCount = room.Count;
+                groupChats.Add(groupChat);
+            }
+            return groupChats;
+        }
+
+        public override void OpenChat(FrontendManager fm, ChatModel chat)
+        {
+            Trace.Call(fm, chat);
+
+            switch (chat.ChatType) {
+                case ChatType.Person:
+                    var personChat = (PersonChatModel) GetChat(chat.ID, ChatType.Person);
+                    if (personChat != null) {
+                        return;
+                    }
+                    var person = CreatePerson(chat.ID);
+                    personChat = new PersonChatModel(person, chat.ID, chat.ID, this);
+                    personChat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+                    Session.AddChat(personChat);
+                    Session.SyncChat(personChat);
+                    break;
+                case ChatType.Group:
+                    Client.JoinRoom(chat.ID);
+                    break;
+            }
+        }
+
+        public override void CloseChat(FrontendManager fm, ChatModel chatInfo)
+        {
+            Trace.Call(fm, chatInfo);
+
+            // get real chat object from session
+            var chat = GetChat(chatInfo.ID, chatInfo.ChatType);
+            if (chat == null) {
+#if LOG4NET
+                Logger.Error("CloseChat(): Session.GetChat(" +
+                             chatInfo.ID + ", " + chatInfo.ChatType + ")" +
+                             " returned null!");
+#endif
+                return;
+            }
+
+            switch (chat.ChatType) {
+                case ChatType.Person:
+                    Session.RemoveChat(chat);
+                    break;
+                case ChatType.Group:
+                    Client.LeaveRoom(chat.ID);
+                    break;
+            }
+        }
+
+        public override void SetPresenceStatus(PresenceStatus status, string message)
+        {
+            //throw new NotImplementedException();
+        }
+
+        public override string ToString()
+        {
+            string result = Chat.Name;
+            if (!IsConnected) {
+                result += " (" + _("not connected") + ")";
+            }
+            return result;
+        }
+
+        void OnMessageReceived(Message message, string room)
+        {
+            Trace.Call(message, room);
+
+            var chat = GetChat(room, ChatType.Group) ?? ProtocolChat;
+
+            string content = message.Content;
+            string name = message.User.Name;
+
+            var builder = CreateMessageBuilder<JabbrMessageBuilder>();
+            ContactModel sender = null;
+            if (name == Username) {
+                sender = Me;
+            } else {
+                sender = CreatePerson(name);
+            }
+            builder.AppendSenderPrefix(sender);
+            builder.AppendMessage(content);
+            if (sender != Me) {
+                builder.MarkHighlights();
+            }
+            var msg = builder.ToMessage();
+            Session.AddMessageToChat(chat, msg);
+        }
+
+        void OnMeMessageReceived(string userName, string content, string roomName)
+        {
+            Trace.Call(userName, content, roomName);
+
+            var chat = GetChat(roomName, ChatType.Group) ?? ProtocolChat;
+            var builder = CreateMessageBuilder<JabbrMessageBuilder>().
+                AppendActionPrefix().
+                AppendIdendityName(GetPerson<PersonModel>(chat, userName)).
+                AppendSpace().
+                AppendMessage(content);
+            if (userName != Username) {
+                builder.MarkHighlights();
+            }
+            var msg = builder.ToMessage();
+            Session.AddMessageToChat(chat, msg);
+        }
+
+        void OnUserJoined(User user, string room, bool isOwner)
+        {
+            Trace.Call(user, room, isOwner);
+
+            var chat = (GroupChatModel) GetChat(room, ChatType.Group);
+            if (chat == null) {
+                return;
+            }
+
+            var person = CreatePerson(user.Name);
+            lock (chat) {
+                if (chat.Persons.ContainsKey(person.ID)) {
+#if LOG4NET
+                    Logger.Warn("OnUserJoined(): person already on chat, ignoring...");
+#endif
+                    return;
+                }
+                Session.AddPersonToGroupChat(chat, person);
+            }
+        }
+
+        void OnUserLeft(User user, string room)
+        {
+            Trace.Call(user, room);
+
+            var chat = (GroupChatModel) GetChat(room, ChatType.Group);
+            if (chat == null) {
+                return;
+            }
+
+            if (user.Name == Username) {
+                Session.RemoveChat(chat);
+                return;
+            }
+
+            PersonModel person = null;
+            if (chat.Persons.TryGetValue(user.Name, out person)) {
+                Session.RemovePersonFromGroupChat(chat, person);
+            }
+        }
+
+        void OnLoggedOn(IEnumerable<Room> rooms)
+        {
+            Trace.Call(rooms);
+
+            try {
+                foreach (var room in rooms) {
+                    var groupChat = new GroupChatModel(room.Name, room.Name, this);
+                    groupChat.InitMessageBuffer(MessageBufferPersistencyType.Volatile);
+
+                    var task = Client.GetRoomInfo(room.Name);
+                    task.Wait();
+                    // check task.Exception
+                    var roomInfo = task.Result;
+                    groupChat.Topic = CreateMessageBuilder<JabbrMessageBuilder>().
+                        AppendMessage(roomInfo.Topic).
+                        ToMessage();
+                    foreach (var user in roomInfo.Users) {
+                        groupChat.UnsafePersons.Add(user.Name,
+                                                    CreatePerson(user));
+                    }
+                    // add ourself if needed
+                    if (!groupChat.UnsafePersons.ContainsKey(Username)) {
+                        groupChat.UnsafePersons.Add(Username, Me);
+                    }
+                    Session.AddChat(groupChat);
+                    Session.SyncChat(groupChat);
+                }
+            } catch (Exception ex) {
+#if LOG4NET
+                Logger.Error(ex);
+#endif
+                var msg = CreateMessageBuilder().
+                    AppendEventPrefix().
+                    AppendErrorText(_("Retrieving chat information failed " +
+                                      "Reason: {0}"),
+                                    ex.Message).
+                    ToMessage();
+                Session.AddMessageToChat(ProtocolChat, msg);
+            }
+        }
+
+        PersonModel CreatePerson(User user)
+        {
+            return CreatePerson(user.Name);
+        }
+
+        PersonModel CreatePerson(string username)
+        {
+            return new PersonModel(username, username, NetworkID, Protocol, this);
+        }
+
+        static string _(string msg)
+        {
+            return LibraryCatalog.GetString(msg, LibraryTextDomain);
+        }
+    }
+}
diff --git a/src/Engine-JabbR/Makefile.am b/src/Engine-JabbR/Makefile.am
new file mode 100644
index 0000000..c29e87b
--- /dev/null
+++ b/src/Engine-JabbR/Makefile.am
@@ -0,0 +1,37 @@
+TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
+ASSEMBLY_NAME = smuxi-engine-jabbr
+ASSEMBLY_FILENAME = $(ASSEMBLY_NAME).dll
+ASSEMBLY_TARGET = $(TARGET_DIR)/$(ASSEMBLY_FILENAME)
+
+SOURCES = \
+	$(top_srcdir)/src/AssemblyVersion.cs \
+	AssemblyInfo.cs \
+	JabbrMessageBuilder.cs \
+	JabbrProtocolManager.cs
+
+REFERENCES = \
+	System \
+	System.Web \
+	Mono.Posix \
+	$(LOG4NET_LIBS)
+
+DLL_REFERENCES = \
+	$(TARGET_DIR)/smuxi-common.dll \
+	$(TARGET_DIR)/smuxi-engine.dll \
+	$(TARGET_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(TARGET_DIR)/JabbR.Client.dll
+
+SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
+
+# automake magic variables
+EXTRA_DIST = $(SOURCES_BUILD)
+CLEANFILES = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb
+
+pkgapp_DATA = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb
+
+include $(top_srcdir)/Makefile.include
+
+all: $(ASSEMBLY_TARGET)
+
+$(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb: $(SOURCES) $(DLL_REFERENCES)
+	$(CSC) $(CSC_FLAGS) $(build_references_ref) -target:library -out:$@ $(SOURCES_BUILD)
diff --git a/src/Engine-JabbR/Makefile.in b/src/Engine-JabbR/Makefile.in
new file mode 100644
index 0000000..10257f6
--- /dev/null
+++ b/src/Engine-JabbR/Makefile.in
@@ -0,0 +1,940 @@
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-engine-jabbr.pc.in
+subdir = src/Engine-JabbR
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
+	$(top_srcdir)/intltool.m4 $(top_srcdir)/libtool.m4 \
+	$(top_srcdir)/ltoptions.m4 $(top_srcdir)/ltsugar.m4 \
+	$(top_srcdir)/ltversion.m4 $(top_srcdir)/lt~obsolete.m4 \
+	$(top_srcdir)/mono.m4 $(top_srcdir)/programs.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = smuxi-engine-jabbr.pc
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
+	"$(DESTDIR)$(linuxdesktopapplicationsdir)" \
+	"$(DESTDIR)$(linuxpkgconfigdir)" "$(DESTDIR)$(pkgappdir)" \
+	"$(DESTDIR)$(programfilesdir)" \
+	"$(DESTDIR)$(programfilesiconsdir)"
+SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
+	$(pkgapp_DATA) $(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSC = @CSC@
+CSC_FLAGS = @CSC_FLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DB4O_CFLAGS = @DB4O_CFLAGS@
+DB4O_FILES = @DB4O_FILES@
+DB4O_LIBS = @DB4O_LIBS@
+DBUS_LIBS = @DBUS_LIBS@
+DBUS_SHARP_CFLAGS = @DBUS_SHARP_CFLAGS@
+DBUS_SHARP_GLIB_CFLAGS = @DBUS_SHARP_GLIB_CFLAGS@
+DBUS_SHARP_GLIB_LIBS = @DBUS_SHARP_GLIB_LIBS@
+DBUS_SHARP_LIBS = @DBUS_SHARP_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEV_VERSION_SUFFIX = @DEV_VERSION_SUFFIX@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FRONTEND_GNOME_COMPILER_FLAGS = @FRONTEND_GNOME_COMPILER_FLAGS@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
+GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
+GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
+GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
+GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
+GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
+GETTEXT_PACKAGE_FRONTEND_CURSES = @GETTEXT_PACKAGE_FRONTEND_CURSES@
+GETTEXT_PACKAGE_FRONTEND_GNOME = @GETTEXT_PACKAGE_FRONTEND_GNOME@
+GETTEXT_PACKAGE_FRONTEND_GNOME_IRC = @GETTEXT_PACKAGE_FRONTEND_GNOME_IRC@
+GETTEXT_PACKAGE_FRONTEND_GNOME_XMPP = @GETTEXT_PACKAGE_FRONTEND_GNOME_XMPP@
+GETTEXT_PACKAGE_FRONTEND_STFL = @GETTEXT_PACKAGE_FRONTEND_STFL@
+GETTEXT_PACKAGE_FRONTEND_SWF = @GETTEXT_PACKAGE_FRONTEND_SWF@
+GETTEXT_PACKAGE_FRONTEND_WPF = @GETTEXT_PACKAGE_FRONTEND_WPF@
+GETTEXT_PACKAGE_SERVER = @GETTEXT_PACKAGE_SERVER@
+GIO_SHARP_CFLAGS = @GIO_SHARP_CFLAGS@
+GIO_SHARP_FILES = @GIO_SHARP_FILES@
+GIO_SHARP_LIBS = @GIO_SHARP_LIBS@
+GLADE_SHARP_20_CFLAGS = @GLADE_SHARP_20_CFLAGS@
+GLADE_SHARP_20_LIBS = @GLADE_SHARP_20_LIBS@
+GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@
+GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@
+GTKSPELL_LIBS = @GTKSPELL_LIBS@
+GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@
+GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@
+INDICATE_SHARP_CFLAGS = @INDICATE_SHARP_CFLAGS@
+INDICATE_SHARP_LIBS = @INDICATE_SHARP_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOG4NET_CFLAGS = @LOG4NET_CFLAGS@
+LOG4NET_LIBS = @LOG4NET_LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MCS = @MCS@
+MESSAGINGMENU_SHARP_CFLAGS = @MESSAGINGMENU_SHARP_CFLAGS@
+MESSAGINGMENU_SHARP_FILES = @MESSAGINGMENU_SHARP_FILES@
+MESSAGINGMENU_SHARP_LIBS = @MESSAGINGMENU_SHARP_LIBS@
+MESSAGING_MENU_CFLAGS = @MESSAGING_MENU_CFLAGS@
+MESSAGING_MENU_LIBS = @MESSAGING_MENU_LIBS@
+MKDIR_P = @MKDIR_P@
+MONO = @MONO@
+MONO_MODULE_CFLAGS = @MONO_MODULE_CFLAGS@
+MONO_MODULE_LIBS = @MONO_MODULE_LIBS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NDESK_DBUS_CFLAGS = @NDESK_DBUS_CFLAGS@
+NDESK_DBUS_GLIB_CFLAGS = @NDESK_DBUS_GLIB_CFLAGS@
+NDESK_DBUS_GLIB_LIBS = @NDESK_DBUS_GLIB_LIBS@
+NDESK_DBUS_LIBS = @NDESK_DBUS_LIBS@
+NINI_CFLAGS = @NINI_CFLAGS@
+NINI_LIBS = @NINI_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@
+NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POSUB = @POSUB@
+PROFILE = @PROFILE@
+RANLIB = @RANLIB@
+SED = @SED@
+SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STFL_CFLAGS = @STFL_CFLAGS@
+STFL_LIBS = @STFL_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XBUILD = @XBUILD@
+XBUILD_FLAGS = @XBUILD_FLAGS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+dist_version = @dist_version@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+expanded_libdir = @expanded_libdir@
+git_branch = @git_branch@
+git_commit_hash = @git_commit_hash@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+twitter_api_key = @twitter_api_key@
+TARGET_DIR = $(top_builddir)/bin/$(PROFILE)
+ASSEMBLY_NAME = smuxi-engine-jabbr
+ASSEMBLY_FILENAME = $(ASSEMBLY_NAME).dll
+ASSEMBLY_TARGET = $(TARGET_DIR)/$(ASSEMBLY_FILENAME)
+SOURCES = \
+	$(top_srcdir)/src/AssemblyVersion.cs \
+	AssemblyInfo.cs \
+	JabbrMessageBuilder.cs \
+	JabbrProtocolManager.cs
+
+REFERENCES = \
+	System \
+	System.Web \
+	Mono.Posix \
+	$(LOG4NET_LIBS)
+
+DLL_REFERENCES = \
+	$(TARGET_DIR)/smuxi-common.dll \
+	$(TARGET_DIR)/smuxi-engine.dll \
+	$(TARGET_DIR)/Microsoft.AspNet.SignalR.Client.dll \
+	$(TARGET_DIR)/JabbR.Client.dll
+
+SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
+
+# automake magic variables
+EXTRA_DIST = $(SOURCES_BUILD) $(build_sources) $(build_resx_files) \
+	$(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \
+	$(DATA_FILES) $(build_culture_res_files)
+CLEANFILES = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb $(ASSEMBLY) \
+	$(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \
+	$(build_satellite_assembly_list)
+pkgapp_DATA = $(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb
+VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-I [...]
+build_sources = $(FILES) $(GENERATED_FILES)
+build_sources_embed = $(build_sources:%='$(srcdir)/%')
+comma__ = ,
+get_resource_name = $(firstword $(subst $(comma__), ,$1))
+get_culture = $(lastword $(subst ., ,$(basename $1)))
+is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
+build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
+build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
+build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
+build_others_list = $(build_non_culture_others_list)
+build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
+
+# resgen all .resx resources
+build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
+build_resx_resources = $(build_resx_files:.resx=.resources)
+
+# embed resources for the main assembly
+build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
+build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
+build_others_files = $(foreach res, $(build_others_list),$(call get_resource_name,$(res)))
+build_others_resources = $(build_others_files)
+build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')
+build_resources = $(build_resx_resources) $(build_others_resources)
+build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
+build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter \
+	-pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), \
+	-r:$(ref)))) $(foreach ref, $(DLL_REFERENCES), -r:$(ref)) \
+	$(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
+DISTCLEANFILES = $(GENERATED_FILES) $(pc_files)
+pkgappdir = $(pkglibdir)
+pkgapp_SCRIPTS = $(ASSEMBLY)
+bin_SCRIPTS = $(BINARIES)
+programfilesdir = @libdir@/@PACKAGE@
+programfiles_DATA = $(PROGRAMFILES)
+programfilesiconsdir = @libdir@/@PACKAGE@/icons
+programfilesicons_DATA = $(PROGRAMFILES_ICONS)
+linuxpkgconfigdir = @libdir@/pkgconfig
+linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
+linuxdesktopapplicationsdir = @prefix@/share/applications
+linuxdesktopapplications_DATA = $(LINUX_DESKTOPAPPLICATIONS)
+
+# generating satellite assemblies
+culture_resources = $(foreach res, $(RESOURCES), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
+cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
+culture_resource_dependencies = $(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)
+culture_resource_commandlines = cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)'
+build_satellite_assembly_list = $(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))
+build_culture_res_files = $(foreach res, $(culture_resources),$(call get_resource_name,$(res)))
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Engine-JabbR/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/Engine-JabbR/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+$(top_srcdir)/Makefile.include:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+smuxi-engine-jabbr.pc: $(top_builddir)/config.status $(srcdir)/smuxi-engine-jabbr.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+install-pkgappSCRIPTS: $(pkgapp_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(pkgapp_SCRIPTS)'; test -n "$(pkgappdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgappdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgappdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgappdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgappdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-pkgappSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgapp_SCRIPTS)'; test -n "$(pkgappdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(pkgappdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-linuxdesktopapplicationsDATA: $(linuxdesktopapplications_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(linuxdesktopapplications_DATA)'; test -n "$(linuxdesktopapplicationsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(linuxdesktopapplicationsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(linuxdesktopapplicationsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxdesktopapplicationsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxdesktopapplicationsdir)" || exit $$?; \
+	done
+
+uninstall-linuxdesktopapplicationsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(linuxdesktopapplications_DATA)'; test -n "$(linuxdesktopapplicationsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(linuxdesktopapplicationsdir)'; $(am__uninstall_files_from_dir)
+install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(linuxpkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(linuxpkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(linuxpkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-linuxpkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(linuxpkgconfig_DATA)'; test -n "$(linuxpkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(linuxpkgconfigdir)'; $(am__uninstall_files_from_dir)
+install-pkgappDATA: $(pkgapp_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(pkgapp_DATA)'; test -n "$(pkgappdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgappdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgappdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgappdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgappdir)" || exit $$?; \
+	done
+
+uninstall-pkgappDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgapp_DATA)'; test -n "$(pkgappdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgappdir)'; $(am__uninstall_files_from_dir)
+install-programfilesDATA: $(programfiles_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(programfiles_DATA)'; test -n "$(programfilesdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(programfilesdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(programfilesdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(programfilesdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(programfilesdir)" || exit $$?; \
+	done
+
+uninstall-programfilesDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(programfiles_DATA)'; test -n "$(programfilesdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(programfilesdir)'; $(am__uninstall_files_from_dir)
+install-programfilesiconsDATA: $(programfilesicons_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(programfilesiconsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(programfilesiconsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(programfilesiconsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(programfilesiconsdir)" || exit $$?; \
+	done
+
+uninstall-programfilesiconsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" "$(DESTDIR)$(linuxdesktopapplicationsdir)" "$(DESTDIR)$(linuxpkgconfigdir)" "$(DESTDIR)$(pkgappdir)" "$(DESTDIR)$(programfilesdir)" "$(DESTDIR)$(programfilesiconsdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-linuxdesktopapplicationsDATA \
+	install-linuxpkgconfigDATA install-pkgappDATA \
+	install-pkgappSCRIPTS install-programfilesDATA \
+	install-programfilesiconsDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS \
+	uninstall-linuxdesktopapplicationsDATA \
+	uninstall-linuxpkgconfigDATA uninstall-pkgappDATA \
+	uninstall-pkgappSCRIPTS uninstall-programfilesDATA \
+	uninstall-programfilesiconsDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binSCRIPTS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am \
+	install-linuxdesktopapplicationsDATA \
+	install-linuxpkgconfigDATA install-man install-pdf \
+	install-pdf-am install-pkgappDATA install-pkgappSCRIPTS \
+	install-programfilesDATA install-programfilesiconsDATA \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binSCRIPTS \
+	uninstall-linuxdesktopapplicationsDATA \
+	uninstall-linuxpkgconfigDATA uninstall-pkgappDATA \
+	uninstall-pkgappSCRIPTS uninstall-programfilesDATA \
+	uninstall-programfilesiconsDATA
+
+
+# macros
+
+# $(call emit-deploy-target,deploy-variable-name)
+define emit-deploy-target
+$($1): $($1_SOURCE)
+	mkdir -p $$(dir $($1))
+	cp '$$<' '$$@'
+endef
+
+# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
+# assumes that for a wrapper foo.pc its source template is foo.pc.in
+# if $3 is non-empty then wrapper is marked exec
+define emit-deploy-wrapper
+$($1): $2 
+	mkdir -p '$$(@D)'
+	cp '$$<' '$$@'
+	$(if $3,chmod +x '$$@')
+
+endef
+
+$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
+$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
+
+$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
+	mkdir -p '$(@D)'
+	$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
+
+all: $(ASSEMBLY_TARGET)
+
+$(ASSEMBLY_TARGET) $(ASSEMBLY_TARGET).mdb: $(SOURCES) $(DLL_REFERENCES)
+	$(CSC) $(CSC_FLAGS) $(build_references_ref) -target:library -out:$@ $(SOURCES_BUILD)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Engine-JabbR/smuxi-engine-jabbr.pc.in b/src/Engine-JabbR/smuxi-engine-jabbr.pc.in
new file mode 100644
index 0000000..d78a967
--- /dev/null
+++ b/src/Engine-JabbR/smuxi-engine-jabbr.pc.in
@@ -0,0 +1,6 @@
+Name: Engine-JabbR
+Description: Engine-JabbR
+Version: @VERSION@
+
+Requires: smuxi-engine
+Libs: -r:@expanded_libdir@/@PACKAGE@/smuxi-engine-jabbr.dll
diff --git a/src/Engine-Twitter/AssemblyInfo.cs b/src/Engine-Twitter/AssemblyInfo.cs
index 07837af..251996b 100644
--- a/src/Engine-Twitter/AssemblyInfo.cs
+++ b/src/Engine-Twitter/AssemblyInfo.cs
@@ -25,8 +25,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
-[assembly: AssemblyTitle("Smuxi - Twitter support for engine")]
-[assembly: AssemblyCopyright("2009-2011 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyTitle("Smuxi - Twitter support")]
+[assembly: AssemblyCopyright("2009-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Engine-Twitter/Makefile.in b/src/Engine-Twitter/Makefile.in
index f429d33..b76a038 100644
--- a/src/Engine-Twitter/Makefile.in
+++ b/src/Engine-Twitter/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,8 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(top_srcdir)/Makefile.include
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am
 subdir = src/Engine-Twitter
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -100,6 +127,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DIST_SOURCES =
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
@@ -108,6 +147,25 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(pkgapp_DATA) $(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -153,6 +211,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -257,7 +316,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -620,12 +678,58 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
 
-ctags: CTAGS
-CTAGS:
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -702,7 +806,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-am
 
@@ -771,8 +875,9 @@ uninstall-am: uninstall-binSCRIPTS \
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-binSCRIPTS install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
@@ -784,8 +889,9 @@ uninstall-am: uninstall-binSCRIPTS \
 	install-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-binSCRIPTS uninstall-linuxdesktopapplicationsDATA \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binSCRIPTS \
+	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappDATA \
 	uninstall-pkgappSCRIPTS uninstall-programfilesDATA \
 	uninstall-programfilesiconsDATA
diff --git a/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs b/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
index e3e1867..56478a8 100644
--- a/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
+++ b/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
@@ -111,13 +111,6 @@ namespace Smuxi.Engine
             }
         }
 
-        static TwitterProtocolManager()
-        {
-            //ServicePointManager.CertificatePolicy = new CertificateValidator();
-            ServicePointManager.ServerCertificateValidationCallback =
-                ValidateCertificate;
-        }
-
         public TwitterProtocolManager(Session session) : base(session)
         {
             Trace.Call(session);
@@ -200,6 +193,19 @@ namespace Smuxi.Engine
                 Session.AddMessageToChat(Chat, builder.ToMessage());
             }
 
+            if (!server.ValidateServerCertificate) {
+                var whitelist = Session.CertificateValidator.HostnameWhitelist;
+                lock (whitelist) {
+                    // needed for favicon
+                    if (!whitelist.Contains("www.twitter.com")) {
+                        whitelist.Add("www.twitter.com");
+                    }
+                    if (!whitelist.Contains("api.twitter.com")) {
+                        whitelist.Add("api.twitter.com");
+                    }
+                }
+            }
+
             string msg;
             msg = String.Format(_("Connecting to Twitter..."));
             fm.SetStatus(msg);
@@ -620,7 +626,6 @@ namespace Smuxi.Engine
             cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
 
             string[] help = {
-                "help",
                 "connect twitter username",
                 "pin pin-number",
             };
@@ -1568,33 +1573,6 @@ namespace Smuxi.Engine
             return (T)(object) builder;
         }
 
-        private static bool ValidateCertificate(object sender,
-                                         X509Certificate certificate,
-                                         X509Chain chain,
-                                         SslPolicyErrors sslPolicyErrors)
-        {
-            if (sslPolicyErrors == SslPolicyErrors.None) {
-                return true;
-            }
-
-            // HACK: Mono's 2.6.7 certificate chain validator is buggy
-            if (sslPolicyErrors == SslPolicyErrors.RemoteCertificateChainErrors &&
-                sender is HttpWebRequest) {
-                var request = (HttpWebRequest) sender;
-                if (request.RequestUri.Host == "api.twitter.com") {
-                    return true;
-                }
-            }
-
-#if LOG4NET
-            f_Logger.Error(
-                "ValidateCertificate(): Certificate error: " +
-                sslPolicyErrors
-            );
-#endif
-            return false;
-        }
-
         private string[] GetApiKey()
         {
             var key = Defines.TwitterApiKey.Split('|');
diff --git a/src/Engine-XMPP/AssemblyInfo.cs b/src/Engine-XMPP/AssemblyInfo.cs
index 148958d..f6e6202 100644
--- a/src/Engine-XMPP/AssemblyInfo.cs
+++ b/src/Engine-XMPP/AssemblyInfo.cs
@@ -25,8 +25,10 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
-[assembly: AssemblyTitle("Smuxi - XMPP protocol support for engine")]
-[assembly: AssemblyCopyright("2007-2011 (C) Mirco Bauer <meebey at meebey.net>, 2011 (C) Tuukka Hastrup <Tuukka.Hastrup at iki.fi>")]
+[assembly: AssemblyTitle("Smuxi - XMPP protocol support")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>, " +
+                             "2011 (C) Tuukka Hastrup <Tuukka.Hastrup at iki.fi>, " +
+                             "2013 (C) Oliver Schneider <smuxi at oli-obk.de>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Engine-XMPP/Config/XmppPersonModel.cs b/src/Engine-XMPP/Config/XmppPersonModel.cs
new file mode 100644
index 0000000..e1891a4
--- /dev/null
+++ b/src/Engine-XMPP/Config/XmppPersonModel.cs
@@ -0,0 +1,135 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2013 Oliver Schneider <smuxi at oli-obk.de>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+using System;
+using agsXMPP.protocol.client;
+using System.Collections.Generic;
+using agsXMPP;
+using Smuxi.Common;
+using agsXMPP.protocol.iq.roster;
+using agsXMPP.protocol.iq.disco;
+
+namespace Smuxi.Engine
+{
+    internal class XmppResourceModel
+    {
+        public Presence Presence { get; set; }
+        public DiscoInfo Disco { get; set; }
+        public string Name { get; set; }
+    }
+    
+    internal class XmppPersonModel : PersonModel
+    {
+        public bool Temporary { get; set; }
+        public Jid Jid { get; set; }
+        public Dictionary<string, XmppResourceModel> Resources { get; private set; }
+        public Dictionary<Jid, XmppResourceModel> MucResources { get; private set; }
+        public SubscriptionType Subscription { get; set; }
+        public AskType Ask { get; set; }
+        public XmppPersonModel(Jid jid, string nick, XmppProtocolManager protocolManager)
+            :base(jid, nick, protocolManager.NetworkID, protocolManager.Protocol, protocolManager)
+        {
+            Trace.Call(jid, nick, protocolManager);
+            Jid = jid.Bare;
+            Resources = new Dictionary<string, XmppResourceModel>();
+            MucResources = new Dictionary<Jid, XmppResourceModel>();
+            Ask = AskType.NONE;
+            Subscription = SubscriptionType.none;
+            Temporary = true;
+            if (!String.IsNullOrEmpty(jid.Resource)) {
+                GetOrCreateResource(jid);
+            }
+        }
+        
+        public XmppResourceModel GetOrCreateResource(Jid jid, out bool isNew)
+        {
+            XmppResourceModel ret;
+            string res = jid.Resource ?? "";
+            if (Resources.TryGetValue(res, out ret)) {
+                isNew = false;
+                return ret;
+            }
+            ret = new XmppResourceModel();
+            ret.Name = res;
+            Resources.Add(res, ret);
+            isNew = true;
+            return ret;
+        }
+        
+        public XmppResourceModel GetOrCreateResource(Jid jid)
+        {
+            XmppResourceModel ret;
+            string res = jid.Resource ?? "";
+            if (Resources.TryGetValue(res, out ret)) {
+                return ret;
+            }
+            ret = new XmppResourceModel();
+            ret.Name = res;
+            Resources.Add(res, ret);
+            return ret;
+        }
+
+        public XmppResourceModel GetOrCreateMucResource(Jid jid)
+        {
+            Trace.Call(jid);
+            XmppResourceModel ret;
+            if (MucResources.TryGetValue(jid, out ret)) {
+                return ret;
+            }
+            ret = new XmppResourceModel();
+            ret.Name = jid;
+            MucResources.Add(jid, ret);
+            return ret;
+        }
+        
+        public List<XmppResourceModel> GetResourcesWithHighestPriority()
+        {
+            List<XmppResourceModel> ret = new List<XmppResourceModel>();
+            int prio = -99999;
+            foreach (var res in Resources) {
+                if (res.Value.Presence.Priority > prio) {
+                    ret.Clear();
+                    ret.Add(res.Value);
+                    prio = res.Value.Presence.Priority;
+                } else if (res.Value.Presence.Priority == prio) {
+                    ret.Add(res.Value);
+                }
+            }
+            return ret;
+        }
+        
+        public void RemoveResource(Jid jid)
+        {
+            Resources.Remove(jid.Resource ?? "");
+        }
+        
+        public PersonModel ToPersonModel()
+        {
+            return new PersonModel(
+                base.ID,
+                base.IdentityName,
+                base.NetworkID,
+                base.NetworkID,
+                base.ProtocolManager
+                );
+        }
+    }
+}
+
diff --git a/src/Engine-XMPP/Makefile.am b/src/Engine-XMPP/Makefile.am
index d76793d..352bec8 100644
--- a/src/Engine-XMPP/Makefile.am
+++ b/src/Engine-XMPP/Makefile.am
@@ -9,17 +9,20 @@ SOURCES = \
 	Config/XmppServerModel.cs \
 	Protocols/Xmpp/XmppGroupChatModel.cs \
 	Protocols/Xmpp/XmppProtocolManager.cs \
+	Config/XmppPersonModel.cs \
 	Protocols/Xmpp/IQ/OwnMessage.cs
 
 REFERENCES = \
 	System \
+	System.Core \
 	Mono.Posix \
 	$(LOG4NET_LIBS)
 
 DLL_REFERENCES = \
 	$(TARGET_DIR)/smuxi-common.dll \
 	$(TARGET_DIR)/smuxi-engine.dll \
-	$(TARGET_DIR)/jabber-net.dll
+	$(TARGET_DIR)/StarkSoftProxy.dll \
+	$(TARGET_DIR)/agsxmpp.dll
 
 SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
 
diff --git a/src/Engine-XMPP/Makefile.in b/src/Engine-XMPP/Makefile.in
index 0dd7ad0..7b8059b 100644
--- a/src/Engine-XMPP/Makefile.in
+++ b/src/Engine-XMPP/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-engine-xmpp.pc.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-engine-xmpp.pc.in \
+	ChangeLog
 subdir = src/Engine-XMPP
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DIST_SOURCES =
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
@@ -109,6 +148,25 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(pkgapp_DATA) $(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -154,6 +212,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -258,7 +317,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -339,17 +397,20 @@ SOURCES = \
 	Config/XmppServerModel.cs \
 	Protocols/Xmpp/XmppGroupChatModel.cs \
 	Protocols/Xmpp/XmppProtocolManager.cs \
+	Config/XmppPersonModel.cs \
 	Protocols/Xmpp/IQ/OwnMessage.cs
 
 REFERENCES = \
 	System \
+	System.Core \
 	Mono.Posix \
 	$(LOG4NET_LIBS)
 
 DLL_REFERENCES = \
 	$(TARGET_DIR)/smuxi-common.dll \
 	$(TARGET_DIR)/smuxi-engine.dll \
-	$(TARGET_DIR)/jabber-net.dll
+	$(TARGET_DIR)/StarkSoftProxy.dll \
+	$(TARGET_DIR)/agsxmpp.dll
 
 SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
 
@@ -627,12 +688,58 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
 
-ctags: CTAGS
-CTAGS:
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -709,7 +816,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-am
 
@@ -778,8 +885,9 @@ uninstall-am: uninstall-binSCRIPTS \
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-binSCRIPTS install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
@@ -791,8 +899,9 @@ uninstall-am: uninstall-binSCRIPTS \
 	install-ps install-ps-am install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-binSCRIPTS uninstall-linuxdesktopapplicationsDATA \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binSCRIPTS \
+	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappDATA \
 	uninstall-pkgappSCRIPTS uninstall-programfilesDATA \
 	uninstall-programfilesiconsDATA
diff --git a/src/Engine-XMPP/Protocols/Xmpp/IQ/OwnMessage.cs b/src/Engine-XMPP/Protocols/Xmpp/IQ/OwnMessage.cs
index c1fbab5..02e1aee 100644
--- a/src/Engine-XMPP/Protocols/Xmpp/IQ/OwnMessage.cs
+++ b/src/Engine-XMPP/Protocols/Xmpp/IQ/OwnMessage.cs
@@ -20,9 +20,12 @@
 
 using System;
 using System.Xml;
-using jabber;
-using jabber.protocol;
-using jabber.protocol.client;
+
+
+using agsXMPP;
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+using agsXMPP.Xml.Dom;
 
 namespace Smuxi.Engine
 {
@@ -33,12 +36,7 @@ namespace Smuxi.Engine
      *   </own-message>
      * </iq>
      */
-    internal class OwnMessageIQ : TypedIQ<OwnMessageQuery>
-    {
-        public OwnMessageIQ(XmlDocument doc) : base(doc)
-        {
-        }
-    }
+
 
     internal class OwnMessageQuery : Element
     {
@@ -46,41 +44,29 @@ namespace Smuxi.Engine
         ///
         /// </summary>
         /// <param name="doc"></param>
-        public OwnMessageQuery(XmlDocument doc)
-                        : base("own-message",
-                               "http://www.facebook.com/xmpp/messages",
-                               doc)
-        {
-        }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="prefix"></param>
-        /// <param name="qname"></param>
-        /// <param name="doc"></param>
-        public OwnMessageQuery(string prefix, XmlQualifiedName qname, XmlDocument doc) :
-                          base(prefix, qname, doc)
+        public OwnMessageQuery()
         {
+            base.Namespace = "http://www.facebook.com/xmpp/messages";
+            base.TagName = "own-message";
         }
 
-        public JID To {
+        public Jid To {
             get {
-                return (JID) GetAttr("to");
+                return GetAttributeJid("to");
             }
             set {
-                SetAttr("to", value);
+                SetAttribute("to", value);
             }
         }
 
         public bool Self {
             get {
                 var value = true;
-                Boolean.TryParse(GetAttr("self"), out value);
+                Boolean.TryParse(GetAttribute("self"), out value);
                 return value;
             }
             set {
-                SetAttr("self", value.ToString());
+                SetAttribute("self", value.ToString());
             }
         }
 
@@ -89,10 +75,10 @@ namespace Smuxi.Engine
         /// </summary>
         public string Body {
             get {
-                return GetElem("body");
+                return GetTag("body");
             }
             set {
-                SetElem("body", value);
+                SetTag("body", value);
             }
         }
     }
diff --git a/src/Engine-XMPP/Protocols/Xmpp/XmppGroupChatModel.cs b/src/Engine-XMPP/Protocols/Xmpp/XmppGroupChatModel.cs
index 7e32352..a68e741 100644
--- a/src/Engine-XMPP/Protocols/Xmpp/XmppGroupChatModel.cs
+++ b/src/Engine-XMPP/Protocols/Xmpp/XmppGroupChatModel.cs
@@ -24,9 +24,10 @@ namespace Smuxi.Engine
 {
     public class XmppGroupChatModel : GroupChatModel
     {
-        public string LatestSeenStamp { get; set; }
-        public bool SeenNewMessages { get; set; }
-        public string OwnNickname { get; set; }
+        internal DateTime LatestSeenStamp { get; set; }
+        internal bool SeenNewMessages { get; set; }
+        internal string OwnNickname { get; set; }
+        internal string Password { get; set; }
 
         public XmppGroupChatModel(string id, string name, IProtocolManager networkManager) :
                          base(id, name, networkManager)
diff --git a/src/Engine-XMPP/Protocols/Xmpp/XmppProtocolManager.cs b/src/Engine-XMPP/Protocols/Xmpp/XmppProtocolManager.cs
index 77f358c..6f6c8fa 100644
--- a/src/Engine-XMPP/Protocols/Xmpp/XmppProtocolManager.cs
+++ b/src/Engine-XMPP/Protocols/Xmpp/XmppProtocolManager.cs
@@ -1,8 +1,9 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2005-2011 Mirco Bauer <meebey at meebey.net>
+ * Copyright (c) 2005-2013 Mirco Bauer <meebey at meebey.net>
  * Copyright (c) 2011 Tuukka Hastrup <Tuukka.Hastrup at iki.fi>
+ * Copyright (c) 2013 Oliver Schneider <smuxi at oli-obk.de>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -25,6 +26,7 @@ using System;
 using System.IO;
 using System.Net.Security;
 using System.Xml;
+using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Security.Cryptography.X509Certificates;
@@ -33,22 +35,35 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
 
-using jabber;
-using jabber.client;
-using jabber.connection;
-using jabber.protocol;
-using jabber.protocol.client;
-using jabber.protocol.iq;
-using XmppMessageType = jabber.protocol.client.MessageType;
-using XmppProxyType = jabber.connection.ProxyType;
+using agsXMPP;
+using agsXMPP.protocol;
+using agsXMPP.protocol.client;
+using agsXMPP.protocol.x.muc;
+using agsXMPP.protocol.iq;
+using agsXMPP.protocol.iq.roster;
+using agsXMPP.protocol.iq.disco;
+using agsXMPP.protocol.extensions.caps;
+using agsXMPP.protocol.extensions.chatstates;
+using XmppMessageType = agsXMPP.protocol.client.MessageType;
+using agsXMPP.Factory;
+using agsXMPP.Net;
+
+using Starksoft.Net.Proxy;
 
 using Smuxi.Common;
+using System.Runtime.CompilerServices;
 
 namespace Smuxi.Engine
 {
     [ProtocolManagerInfo(Name = "XMPP", Description = "Extensible Messaging and Presence Protocol", Alias = "jabber")]
     public class JabberProtocolManager : XmppProtocolManager
     {
+        public override string Protocol {
+            get {
+                return "Jabber";
+            }
+        }
+
         public JabberProtocolManager(Session session) : base(session)
         {
         }
@@ -58,12 +73,15 @@ namespace Smuxi.Engine
     public class XmppProtocolManager : ProtocolManagerBase
     {
 #if LOG4NET
-        private static readonly log4net.ILog _Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+        static readonly log4net.ILog _Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 #endif
-        JabberClient JabberClient { get; set; }
-        RosterManager RosterManager { get; set; }
-        ConferenceManager ConferenceManager { get; set; }
-        PresenceManager PresenceManager { get; set; }
+        XmppClientConnection JabberClient { get; set; }
+        MucManager MucManager { get; set; }
+        DiscoManager Disco { get; set; }
+        string[] Nicknames { get; set; }
+        
+        Dictionary<Jid, XmppPersonModel> Contacts { get; set; }
+        Dictionary<string, DiscoInfo> DiscoCache { get; set; }
 
         ChatModel NetworkChat { get; set; }
         GroupChatModel ContactChat { get; set; }
@@ -73,16 +91,14 @@ namespace Smuxi.Engine
         // facebook messed up, this is part of a hack to fix that messup
         string LastSentMessage { get; set; }
         bool SupressLocalMessageEcho { get; set; }
+        bool AutoReconnect { get; set; }
+        int AutoReconnectDelay { get; set; }
+
+        bool IsFacebook { get; set; }
 
         public override string NetworkID {
             get {
-                if (!String.IsNullOrEmpty(JabberClient.NetworkHost)) {
-                    return JabberClient.NetworkHost;
-                }
-                if (!String.IsNullOrEmpty(JabberClient.Server)) {
-                    return JabberClient.Server;
-                }
-                return "XMPP";
+                return Host;
             }
         }
         
@@ -101,37 +117,96 @@ namespace Smuxi.Engine
         public XmppProtocolManager(Session session) : base(session)
         {
             Trace.Call(session);
+            Contacts = new Dictionary<Jid, XmppPersonModel>();
+            DiscoCache = new Dictionary<string, DiscoInfo>();
+
+            SupressLocalMessageEcho = false;
+            AutoReconnectDelay = 60;
 
-            JabberClient = new JabberClient();
+            JabberClient = new XmppClientConnection();
             JabberClient.Resource = "Smuxi";
-            JabberClient.AutoLogin = true;
-            JabberClient.AutoPresence = false;
-            JabberClient.OnStreamInit += OnStreamInit;
+            JabberClient.AutoRoster = true;
+            JabberClient.AutoPresence = true;
             JabberClient.OnMessage += OnMessage;
-            JabberClient.OnConnect += OnConnect;
-            JabberClient.OnDisconnect += OnDisconnect;
-            JabberClient.OnAuthenticate += OnAuthenticate;
+            JabberClient.OnClose += OnClose;
+            JabberClient.OnLogin += OnLogin;
             JabberClient.OnError += OnError;
-            JabberClient.OnProtocol += OnProtocol;
-            JabberClient.OnWriteText += OnWriteText;
-            JabberClient.OnIQ += OnIQ;
-
-            RosterManager = new RosterManager();
-            RosterManager.Stream = JabberClient;
-            RosterManager.OnRosterItem += OnRosterItem;
-
-            PresenceManager = new PresenceManager();
-            PresenceManager.Stream = JabberClient;
+            JabberClient.OnStreamError += OnStreamError;
             JabberClient.OnPresence += OnPresence;
+            JabberClient.OnRosterItem += OnRosterItem;
+            JabberClient.OnReadXml += OnReadXml;
+            JabberClient.OnWriteXml += OnWriteXml;
+            JabberClient.OnAuthError += OnAuthError;
+            JabberClient.OnIq += OnIq;
+            JabberClient.AutoAgents = false; // outdated feature
+            JabberClient.EnableCapabilities = true;
+            JabberClient.Capabilities.Node = "https://smuxi.im";
+            JabberClient.ClientVersion = Engine.VersionString;
+
+            // identify smuxi
+            var ident = JabberClient.DiscoInfo.AddIdentity();
+            ident.Category = "client";
+            ident.Type = "pc";
+            ident.Name = Engine.VersionString;
+
+            // add features here (this is just for notification of other clients)
+            JabberClient.DiscoInfo.AddFeature().Var = "http://jabber.org/protocol/caps";
+            JabberClient.DiscoInfo.AddFeature().Var = "jabber:iq:last";
+            JabberClient.DiscoInfo.AddFeature().Var = "http://jabber.org/protocol/muc";
+            JabberClient.DiscoInfo.AddFeature().Var = "http://jabber.org/protocol/disco#info";
+            JabberClient.DiscoInfo.AddFeature().Var = "http://www.facebook.com/xmpp/messages";
+            JabberClient.DiscoInfo.AddFeature().Var = "http://jabber.org/protocol/xhtml-im";
+
+            Disco = new DiscoManager(JabberClient);
+            Disco.AutoAnswerDiscoInfoRequests = true;
+
+            // facebook own message echo
+            ElementFactory.AddElementType("own-message", "http://www.facebook.com/xmpp/messages", typeof(OwnMessageQuery));
+
+            MucManager = new MucManager(JabberClient);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnStreamError(object sender, agsXMPP.Xml.Dom.Element e)
+        {
+            Trace.Call(sender, e);
+            var error = e as agsXMPP.protocol.Error;
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            // TODO: create user readable error messages from the error.Condition
+            //builder.AppendErrorText(error.Condition.ToString());
+            switch (error.Condition) {
+                case StreamErrorCondition.SystemShutdown:
+                    builder.AppendErrorText(_("The Server has shut down"));
+                    break;
+                case StreamErrorCondition.Conflict:
+                    builder.AppendErrorText(_("Another client logged in with the same resource, you have been disconnected"));
+                    break;
+                case StreamErrorCondition.SeeOtherHost:
+                    Server.Hostname = e.GetTag("see-other-host");
+                    Reconnect(null);
+                    break;
+                default:
+                    builder.AppendErrorText(error.Text ?? error.Condition.ToString());
+                    break;
+            }
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+        }
 
-            ConferenceManager = new ConferenceManager();
-            ConferenceManager.Stream = JabberClient;
-            ConferenceManager.OnJoin += OnJoin;
-            ConferenceManager.OnLeave += OnLeave;
-            ConferenceManager.OnParticipantJoin += OnParticipantJoin;
-            ConferenceManager.OnParticipantLeave += OnParticipantLeave;
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
+        {
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            builder.AppendErrorText(_("Authentication failed, either username does not exist or invalid password"));
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+            builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            builder.AppendMessage(_("if you want to create an account with the specified user and password, type /register now"));
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void Connect(FrontendManager fm, ServerModel server)
         {
             Trace.Call(fm, server);
@@ -165,68 +240,80 @@ namespace Smuxi.Engine
                 Server.ValidateServerCertificate = server.ValidateServerCertificate;
             }
             
-            Host = server.Hostname;
-            Port = server.Port;
-
-            ApplyConfig(Session.UserConfig, Server);
+            Host = Server.Hostname;
+            Port = Server.Port;
 
             // TODO: use config for single network chat or once per network manager
             NetworkChat = Session.CreateChat<ProtocolChatModel>(
-                NetworkID, "Jabber " + Host, this
+                NetworkID, String.Format("{0} {1}", Protocol, Host), this
             );
             Session.AddChat(NetworkChat);
             Session.SyncChat(NetworkChat);
 
-            OpenContactChat();
+            Connect();
+        }
 
-            if (!String.IsNullOrEmpty(JabberClient.ProxyHost)) {
-                var builder = CreateMessageBuilder();
-                builder.AppendEventPrefix();
-                builder.AppendText(_("Using proxy: {0}:{1}"),
-                                   JabberClient.ProxyHost,
-                                   JabberClient.ProxyPort);
-                Session.AddMessageToChat(Chat, builder.ToMessage());
-            }
-            JabberClient.Connect();
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void Connect()
+        {
+            Trace.Call();
+            Contacts.Clear();
+
+            AutoReconnect = true;
+
+            ApplyConfig(Session.UserConfig, Server);
+
+            OpenContactChat();
+            
+#if LOG4NET
+            _Logger.Debug("calling JabberClient.Open()");
+#endif
+            IsFacebook = (JabberClient.Server == "chat.facebook.com");
+            JabberClient.Open();
         }
-        
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void Reconnect(FrontendManager fm)
         {
             Trace.Call(fm);
 
+            AutoReconnect = true;
             JabberClient.Close();
-            JabberClient.Connect();
         }
-        
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void Disconnect(FrontendManager fm)
         {
             Trace.Call(fm);
-
-            JabberClient.Close(false);
+            
+            IsConnected = false;
+            AutoReconnect = false;
+            JabberClient.Close();
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void Dispose()
         {
             Trace.Call();
 
             base.Dispose();
-
-            JabberClient.Dispose();
+            
+            IsConnected = false;
+            AutoReconnect = false;
+            JabberClient.Close();
         }
 
+        // this method is used as status / title
         public override string ToString()
         {
-            string result = "Jabber ";
-            if (JabberClient != null) {
-                result += JabberClient.Server + ":" + JabberClient.Port;
-            }
-            
+            var status = String.Format("{0} ({1})", JabberClient.Server, Protocol);
             if (!IsConnected) {
-                result += " (" + _("not connected") + ")";
+                status += " (" + _("not connected") + ")";
             }
-            return result;
+            return status;
         }
-        
+
+        // no need to synchronize this method as it only checks for null
         public override IList<GroupChatModel> FindGroupChats(GroupChatModel filter)
         {
             Trace.Call(filter);
@@ -238,26 +325,35 @@ namespace Smuxi.Engine
             return list;
         }
 
-        public void OpenContactChat ()
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public void OpenContactChat()
         {
-            var chat = Session.GetChat("Contacts", ChatType.Group, this);
-
-            if (chat != null) return;
+            if (ContactChat == null) {
+                ContactChat = Session.CreateChat<GroupChatModel>(
+                    "Contacts", "Contacts", this
+                );
+                Session.AddChat(ContactChat);
+            } else if (!ContactChat.IsEnabled) {
+                Session.EnableChat(ContactChat);
+            } else {
+                // already open
+                return;
+            }
 
-            ContactChat = Session.CreateChat<GroupChatModel>(
-                "Contacts", "Contacts", this
-            );
-            Session.AddChat(ContactChat);
-            Session.SyncChat(ContactChat);
-            foreach(JID jid in PresenceManager) {
-                if (PresenceManager.IsAvailable(jid)) {
-                    lock (ContactChat) {
-                        Session.AddPersonToGroupChat(ContactChat, CreatePerson(jid));
-                    }
+            foreach (var pair in Contacts) {
+                if (pair.Value.Resources.Count != 0) {
+                    ContactChat.UnsafePersons.Add(pair.Key, pair.Value.ToPersonModel());
                 }
             }
+
+            // HACK: lower probability of sync race condition during connect
+            ThreadPool.QueueUserWorkItem(delegate {
+                Thread.Sleep(5000);
+                Session.SyncChat(ContactChat);
+            });
         }
 
+        // no need to synchronize as no members are accessed
         public override void OpenChat(FrontendManager fm, ChatModel chat)
         {
             Trace.Call(fm, chat);
@@ -276,6 +372,7 @@ namespace Smuxi.Engine
             }
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void CloseChat(FrontendManager fm, ChatModel chat)
         {
             Trace.Call(fm, chat);
@@ -284,43 +381,48 @@ namespace Smuxi.Engine
                 Session.RemoveChat(chat);
                 ContactChat = null;
             } else if (chat.ChatType == ChatType.Group) {
-                ConferenceManager.GetRoom(chat.ID+"/"+JabberClient.User).Leave("Closed");
-            } else {
+                MucManager.LeaveRoom(chat.ID, ((XmppGroupChatModel)chat).OwnNickname);
+            } else if (chat.ChatType == ChatType.Person) {
                 Session.RemoveChat(chat);
+            } else {
+#if LOG4NET
+                _Logger.Error("CloseChat(): Invalid chat type");
+#endif
             }
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public override void SetPresenceStatus(PresenceStatus status,
                                                string message)
         {
             Trace.Call(status, message);
 
-            if (!IsConnected || !JabberClient.IsAuthenticated) {
+            if (!IsConnected || !JabberClient.Authenticated) {
                 return;
             }
 
-            PresenceType? xmppType = null;
-            string xmppShow = null;
             switch (status) {
                 case PresenceStatus.Online:
-                    xmppType = PresenceType.available;
+                    JabberClient.Show = ShowType.NONE;
                     JabberClient.Priority = Server.Priorities[status];
                     break;
                 case PresenceStatus.Away:
-                    xmppType = PresenceType.available;
                     JabberClient.Priority = Server.Priorities[status];
-                    xmppShow = "away";
-                    break;
-                case PresenceStatus.Offline:
-                    xmppType = PresenceType.unavailable;
+                    JabberClient.Show = ShowType.away;
+                    JabberClient.Status = message;
                     break;
             }
-            if (xmppType == null) {
-                return;
-            }
 
-            JabberClient.Presence(xmppType.Value, message, xmppShow,
-                                  JabberClient.Priority);
+            JabberClient.SendMyPresence();
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public void CommandRegister(CommandModel command)
+        {
+            Trace.Call(command);
+            Connect();
+            JabberClient.RegisterAccount = true;
+            // TODO: add callbacks to process in case of error or success
         }
 
         public override bool Command(CommandModel command)
@@ -338,14 +440,26 @@ namespace Smuxi.Engine
                             CommandMessageQuery(command);
                             handled = true;
                             break;
+                        case "me":
+                            CommandMe(command);
+                            handled = true;
+                            break;
                         case "say":
                             CommandSay(command);
                             handled = true;
                             break;
+                        case "joinas":
+                            CommandJoinAs(command);
+                            handled = true;
+                            break;
                         case "join":
                             CommandJoin(command);
                             handled = true;
                             break;
+                        case "invite":
+                            CommandInvite(command);
+                            handled = true;
+                            break;
                         case "part":
                         case "leave":
                             CommandPart(command);
@@ -367,6 +481,14 @@ namespace Smuxi.Engine
                             CommandPriority(command);
                             handled = true;
                             break;
+                        case "whois":
+                            CommandWhoIs(command);
+                            handled = true;
+                            break;
+                        case "register":
+                            CommandRegister(command);
+                            handled = true;
+                            break;
                     }
                 } else {
                     _Say(command.Chat, command.Data);
@@ -395,7 +517,121 @@ namespace Smuxi.Engine
             return handled;
         }
 
-        public void CommandContact (CommandModel cd)
+        public void CommandMe(CommandModel command)
+        {
+            if (command.Data.Length <= 4) {
+                return;
+            }
+
+            string actionstring = command.Data.Substring(3);
+            // http://xmpp.org/extensions/xep-0245.html
+            // says we should append "/me " no matter what our command char is
+            _Say(command.Chat, "/me" + actionstring, true, false);
+
+            // groupchat echos messages anyway
+            if (command.Chat.ChatType == ChatType.Person) {
+                var builder = CreateMessageBuilder();
+                builder.AppendActionPrefix();
+                builder.AppendIdendityName(Me);
+                builder.AppendText(actionstring);
+                Session.AddMessageToChat(command.Chat, builder.ToMessage());
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void printResource(MessageBuilder builder, XmppResourceModel res)
+        {
+            builder.AppendText("\n\tName: {0}", res.Name);
+            var pres = res.Presence;
+            builder.AppendText("\n\tPresence:");
+            builder.AppendText("\n\t\tShow:\t{0}", pres.Show);
+            builder.AppendText("\n\t\tStatus:\t{0}", pres.Status);
+            builder.AppendText("\n\t\tLast:\t{0}", (pres.Last!=null)?pres.Last.Seconds.ToString():"");
+            builder.AppendText("\n\t\tPriority:\t{0}", pres.Priority);
+            builder.AppendText("\n\t\tType:\t{0}", pres.Type);
+            builder.AppendText("\n\t\tXDelay:\t{0}", (pres.XDelay!=null)?pres.XDelay.Stamp.ToString():"");
+            if (res.Disco != null) {
+                builder.AppendText("\n\tFeatures:");
+                foreach(var feat in res.Disco.GetFeatures()) {
+                    builder.AppendText("\n\t\t{0}", feat.Var);
+                }
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public void CommandWhoIs(CommandModel cmd)
+        {
+            Jid jid;
+            if (cmd.DataArray.Length < 2) {
+                if ((cmd.DataArray.Length == 1)
+                    && (cmd.Chat is PersonChatModel)) {
+                    jid = (cmd.Chat as PersonChatModel).Person.ID;
+                } else {
+                    NotEnoughParameters(cmd);
+                    return;
+                }
+            } else {
+                jid = GetJidFromNickname(cmd.DataArray[1]);
+            }
+            XmppPersonModel person;
+            var builder = CreateMessageBuilder();
+            if (!Contacts.TryGetValue(jid.Bare, out person)) {
+                builder.AppendErrorText(_("Could not find contact {0}"), jid);
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+                return;
+            }
+            if (!String.IsNullOrEmpty(jid.Resource)) {
+                if (person.Resources.Count > 1) {
+                    builder.AppendText(_("Contact {0} has {1} known resources"), jid.Bare, person.Resources.Count);
+                }
+                XmppResourceModel res;
+                if (!person.Resources.TryGetValue(jid.Resource, out res)) {
+                    builder.AppendErrorText(_("{0} is not a known resource"), jid.Resource);
+                    cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+                    return;
+                }
+                printResource(builder, res);
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+                return;
+            }
+            builder.AppendText(_("Contact's Jid: {0}"), person.Jid);
+            builder.AppendText("\n");
+            switch (person.Subscription) {
+                case SubscriptionType.both:
+                    builder.AppendText(_("You have a mutual subscription with this contact"));
+                    break;
+                case SubscriptionType.none:
+                    builder.AppendText(_("You have no subscription with this contact and this contact is not subscribed to you"));
+                    break;
+                case SubscriptionType.to:
+                    builder.AppendText(_("You are subscribed to this contact, but the contact is not subcribed to you"));
+                    break;
+                case SubscriptionType.from:
+                    builder.AppendText(_("You are not subscribed to this contact, but the contact is subcribed to you"));
+                    break;
+                case SubscriptionType.remove:
+#if LOG4NET
+                    _Logger.Error("a contact with SubscriptionType remove has been found");
+#endif
+                    break;
+            }
+            int i = 0;
+            foreach(var res in person.Resources) {
+                builder.AppendText("\nResource({0}):", i);
+                printResource(builder, res.Value);
+                i++;
+            }
+            i = 0;
+            foreach(var res in person.MucResources) {
+                builder.AppendText("\nMucResource({0}):", i);
+                printResource(builder, res.Value);
+                i++;
+            }
+            cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        public void CommandContact(CommandModel cd)
         {
             FrontendManager fm = cd.FrontendManager;
             // todo: allow length of 2 in private chat windows
@@ -403,34 +639,73 @@ namespace Smuxi.Engine
                 NotEnoughParameters(cd);
                 return;
             }
-            JID jid = cd.DataArray[2];
+            Jid jid = GetJidFromNickname(cd.DataArray[2]);
             string cmd = cd.DataArray[1];
+            // the logic here is taken from
+            // http://xmpp.org/rfcs/rfc3921.html#int
             switch (cmd) {
+                case "addgroup":
+                    if (cd.DataArray.Length < 4) {
+                        NotEnoughParameters(cd);
+                        return;
+                    }
+                    JabberClient.RosterManager.AddRosterItem(jid, null, cd.DataArray[3]);
+                    break;
+                case "addonly":
+                    JabberClient.RosterManager.AddRosterItem(jid);
+                    break;
                 case "add":
+                    XmppPersonModel person;
+                    if (Contacts.TryGetValue(jid.Bare, out person)) {
+                        if (person.Subscription == SubscriptionType.both) break;
+                        if (person.Subscription != SubscriptionType.to) {
+                            JabberClient.PresenceManager.Subscribe(jid);
+                        }
+                        if (person.Subscription != SubscriptionType.from) {
+                            // in case we already know this contact… but he can't see us
+                            JabberClient.PresenceManager.ApproveSubscriptionRequest(jid);
+                        }
+                    } else {
+                        JabberClient.RosterManager.AddRosterItem(jid);
+                        JabberClient.PresenceManager.Subscribe(jid);
+                        JabberClient.PresenceManager.ApproveSubscriptionRequest(jid);
+                    }
+                    break;
                 case "subscribe":
-                    // also use GetJidFromNickname(jid) here, so jid is checked for validity
-                    RosterManager.Add(GetJidFromNickname(jid));
+                    JabberClient.PresenceManager.Subscribe(jid);
+                    break;
+                case "unsubscribe":
+                    // stop receiving status updates from this contact
+                    // that contact will still receive your updates
+                    JabberClient.PresenceManager.Unsubscribe(jid);
                     break;
                 case "remove":
                 case "rm":
                 case "del":
-                    RosterManager.Remove(GetJidFromNickname(jid));
+                case "delete":
+                    JabberClient.RosterManager.RemoveRosterItem(jid);
+                    // unsubscribing is unnecessary, the server is required to do this
                     break;
                 case "accept":
                 case "allow":
-                    RosterManager.Allow(GetJidFromNickname(jid));
+                case "approve":
+                case "auth":
+                case "authorize":
+                    JabberClient.PresenceManager.ApproveSubscriptionRequest(jid);
                     break;
                 case "deny":
-                    RosterManager.Deny(GetJidFromNickname(jid));
+                case "refuse":
+                    // stop the contact from receiving your updates
+                    // you will still receive the contact's status updates
+                    JabberClient.PresenceManager.RefuseSubscriptionRequest(jid);
                     break;
                 case "rename":
                     if (cd.DataArray.Length < 4) {
-                        NotEnoughParameters(cd);
-                        return;
+                        JabberClient.RosterManager.UpdateRosterItem(jid, "");
+                    } else {
+                        var newNick = String.Join(" ", cd.DataArray.Skip(3).ToArray());
+                        JabberClient.RosterManager.UpdateRosterItem(jid, newNick);
                     }
-                    Item it = RosterManager[GetJidFromNickname(jid)];
-                    it.Nickname = cd.DataArray[3];
-                    RosterManager.Modify(it);
                     break;
                 default:
                     var builder = CreateMessageBuilder();
@@ -445,20 +720,18 @@ namespace Smuxi.Engine
             var builder = CreateMessageBuilder();
             // TRANSLATOR: this line is used as a label / category for a
             // list of commands below
-            builder.AppendHeader(_("XMPP Commands"));
+            builder.AppendHeader(_("{0} Commands"), Protocol);
             cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
 
             string[] help = {
-            "help",
             "connect xmpp/jabber server port username password [resource]",
             "msg/query jid/nick message",
             "say message",
-            "join muc-jid [custom-chat-nick]",
+            "join muc-jid [password]",
             "part/leave [muc-jid]",
             "away [away-message]",
-            "contact add/remove/accept/deny jid/nick",
-            "contact rename jid/nick newnick"
-            ,"priority away/online/temp priority-value"
+            "contact add/remove jid/nick",
+            "contact rename jid/nick [newnick]"
             };
             
             foreach (string line in help) {
@@ -467,8 +740,28 @@ namespace Smuxi.Engine
                 builder.AppendText(line);
                 cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
             }
+            
+            // TRANSLATOR: this line is used as a label / category for a
+            // list of commands below
+            builder = CreateMessageBuilder();
+            builder.AppendHeader(_("Advanced {0} Commands"), Protocol);
+            cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+
+            string[] help2 = {
+            "contact addonly/subscribe/unsubscribe/approve/deny",
+            "whois jid",
+            "joinas muc-jid nickname [password]",
+            "priority away/online/temp priority-value"
+            };
+            
+            foreach (string line in help2) {
+                builder = CreateMessageBuilder();
+                builder.AppendEventPrefix();
+                builder.AppendText(line);
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, builder.ToMessage());
+            }
         }
-        
+
         public void CommandConnect(CommandModel cd)
         {
             FrontendManager fm = cd.FrontendManager;
@@ -516,6 +809,7 @@ namespace Smuxi.Engine
             Connect(fm, server);
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public void CommandPriority(CommandModel command)
         {
             if (command.DataArray.Length < 3) {
@@ -535,7 +829,6 @@ namespace Smuxi.Engine
                 command.FrontendManager.AddMessageToChat(command.Chat, builder.ToMessage());
                 return;
             }
-            var me = PresenceManager[JabberClient.JID];
             JabberClient.Priority = prio;
             bool change_current_prio = false;
             switch (subcmd) {
@@ -546,89 +839,123 @@ namespace Smuxi.Engine
                     break;
                 case "away":
                     Server.Priorities[PresenceStatus.Away] = prio;
-                    if (me != null) {
-                        change_current_prio = (me.Type == PresenceType.available) && (me.Show == "away");
-                    }
+                    change_current_prio = (JabberClient.Show == ShowType.away);
+                    JabberClient.Priority = prio;
                     break;
                 case "online":
                 case "available":
                     Server.Priorities[PresenceStatus.Online] = prio;
-                    if (me != null) {
-                        change_current_prio = (me.Type == PresenceType.available) && string.IsNullOrEmpty(me.Show);
-                    }
+                    change_current_prio = (JabberClient.Show == ShowType.NONE);
+                    JabberClient.Priority = prio;
                     break;
                 default:
                     return;
             }
             if (change_current_prio) {
                 // set priority and keep all other presence info
-                JabberClient.Presence(me.Type, me.Status, me.Show, prio);
+                JabberClient.SendMyPresence();
             }
         }
 
-        private JID GetJidFromNickname(string nickname)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        Jid GetJidFromNickname(string nickname)
         {
-            Item it = RosterManager[nickname];
-            if (it != null) {
-                return it.JID;
+            XmppPersonModel it;
+            Jid jid = nickname;
+            if (Contacts.TryGetValue(jid, out it)) {
+                // nickname is a jid we know
+                return jid;
+            }
+            if (Contacts.TryGetValue(jid.Bare, out it)) {
+                // is a jid with resource
+                return jid;
             }
 
             // arg is not a jid in our rostermanager
             // find a jid to which the nickname belongs
-            foreach (JID j in RosterManager) {
-                Item item = RosterManager[j];
-                if (item.Nickname != null &&
-                    item.Nickname.Replace(" ", "_") == nickname) {
-                    return item.JID;
+            foreach (var pair in Contacts) {
+                if (pair.Value.IdentityName != null &&
+                    pair.Value.IdentityName.Replace(" ", "_") == nickname) {
+                    return pair.Key;
                 }
             }
             // not found in roster, message directly to jid
             // TODO: check jid for validity
-            return nickname;
+            return jid;
         }
-        
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void MessageQuery(Jid jid, string message)
+        {
+            var chat = GetOrCreatePersonChat(jid);
+            if (message != null && message.Trim().Length > 0) {
+                _Say(chat, message);
+            }
+        }
+
         public void CommandMessageQuery(CommandModel cd)
         {
-            ChatModel chat = null;
-            if (cd.DataArray.Length >= 2) {
-                string arg = cd.DataArray[1];
-                JID jid = GetJidFromNickname(arg);
-                chat = GetChat(jid, ChatType.Person);
-                if (chat == null) {
-                    PersonModel person = CreatePerson(jid);
-                    chat = Session.CreatePersonChat(person, jid, person.IdentityName, this);
-                    Session.AddChat(chat);
-                    Session.SyncChat(chat);
-                }
+            if (cd.DataArray.Length < 2) {
+                NotEnoughParameters(cd);
+                return;
             }
-            
+            Jid jid = GetJidFromNickname(cd.DataArray[1]);
             if (cd.DataArray.Length >= 3) {
+                // we have a message
                 string message = String.Join(" ", cd.DataArray, 2, cd.DataArray.Length-2);
-                // ignore empty messages
-                if (message.TrimEnd(' ').Length > 0) {
-                    _Say(chat, message);
-                }
+                MessageQuery(jid, message);
+            } else {
+                MessageQuery(jid, null);
             }
         }
-        
+
         public void CommandJoin(CommandModel cd)
         {
             if (cd.DataArray.Length < 2) {
                 NotEnoughParameters(cd);
                 return;
             }
-
-            string jid = cd.DataArray[1];
-            ChatModel chat = GetChat(jid, ChatType.Group);
-            string nickname = JabberClient.User;
+            string password = null;
             if (cd.DataArray.Length > 2) {
-                nickname = cd.DataArray[2];
+                password = cd.DataArray[2];
+            }
+            JoinRoom(cd.DataArray[1], null, password);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void JoinRoom(Jid jid, string nickname, string password)
+        {
+            XmppGroupChatModel chat = (XmppGroupChatModel)GetChat(jid, ChatType.Group);
+            if (nickname == null) {
+                nickname = Nicknames[0];
             }
+            MucManager.JoinRoom(jid, nickname, password);
             if (chat == null) {
-                ConferenceManager.GetRoom(jid+"/"+nickname).Join();
+                chat = Session.CreateChat<XmppGroupChatModel>(jid, jid, this);
+                Session.AddChat(chat);
+            }
+            Session.DisableChat(chat);
+            if (password != null) {
+                chat.Password = password;
+            }
+            chat.IsSynced = false;
+            chat.OwnNickname = nickname;
+        }
+
+        public void CommandJoinAs(CommandModel cd)
+        {
+            if (cd.DataArray.Length < 3) {
+                NotEnoughParameters(cd);
+                return;
+            }
+            string password = null;
+            if (cd.DataArray.Length > 3) {
+                password = cd.DataArray[3];
             }
+            JoinRoom(cd.DataArray[1], cd.DataArray[2], password);
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public void CommandPart(CommandModel cd)
         {
             string jid;
@@ -636,10 +963,50 @@ namespace Smuxi.Engine
                 jid = cd.DataArray[1];
             else
                 jid = cd.Chat.ID;
-            ChatModel chat = GetChat(jid, ChatType.Group);
+            XmppGroupChatModel chat = (XmppGroupChatModel)GetChat(jid, ChatType.Group);
             if (chat != null) {
-                ConferenceManager.GetRoom(jid+"/"+JabberClient.User).Leave("Part");
+                MucManager.LeaveRoom(jid, chat.OwnNickname);
+            }
+        }
+
+        public void CommandInvite(CommandModel cd)
+        {
+            if (cd.DataArray.Length < 3) {
+                NotEnoughParameters(cd);
+                return;
+            }
+            string password = null;
+            if (cd.DataArray.Length > 3) {
+                password = cd.DataArray[3];
+            }
+            Invite(cd.DataArray[2], cd.DataArray[1], null, password);
+        }
+
+        void Invite(Jid jid, Jid room, string reason, string password)
+        {
+            Invite(new Jid[]{jid}, room, reason, password);
+        }
+
+        void Invite(string[] jids_string, string room, string reason, string password)
+        {
+            var jids = new Jid[jids_string.Length];
+            for (int i = 0; i < jids.Length; i++) {
+                jids[i] = jids_string[i];
             }
+            Invite(jids, room, reason, password);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void Invite(Jid[] jid, Jid room, string reason, string password)
+        {
+            JoinRoom(room, null, password);
+            XmppGroupChatModel chat = (XmppGroupChatModel)GetChat(room, ChatType.Group);
+            // if no password is passed, but we are already in the chatroom and know
+            // about a password, use that password
+            if (password == null && chat != null) {
+                password = chat.Password;
+            }
+            MucManager.Invite(jid, room, reason, password);
         }
 
         public void CommandAway(CommandModel cd)
@@ -651,6 +1018,7 @@ namespace Smuxi.Engine
             }
         }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
         public void CommandRoster(CommandModel cd)
         {
             bool full = false;
@@ -662,23 +1030,33 @@ namespace Smuxi.Engine
             builder.AppendHeader("Roster");
             cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
 
-            foreach (JID j in RosterManager) {
+            foreach (var pair in Contacts) {
                 string status = "+";
-                if (!PresenceManager.IsAvailable(j)) {
-                    if (!full) continue;
+                var contact = pair.Value;
+                if (contact.Resources.Count == 0) {
+                    if (!full) {
+                        continue;
+                    }
                     status = "-";
                 }
-                string nick = RosterManager[j].Nickname;
-                string mesg = "";
-                Presence item = PresenceManager[j];
-                if (item != null) {
-                    if (item.Show != null && item.Show.Length != 0) {
-                        status = item.Show;
+                builder = CreateMessageBuilder();
+                builder.AppendText("{0} {1}\t({2}): {3},{4}",
+                                   status,
+                                   contact.IdentityName,
+                                   pair.Key,
+                                   contact.Subscription,
+                                   contact.Ask
+                );
+                foreach (var p in contact.Resources) {
+                    builder.AppendText("\t|\t{0}:{1}:{2}",
+                                       p.Key,
+                                       p.Value.Presence.Type.ToString(),
+                                       p.Value.Presence.Priority
+                    );
+                    if (!String.IsNullOrEmpty(p.Value.Presence.Status)) {
+                        builder.AppendText(":\"{0}\"", p.Value.Presence.Status);
                     }
-                    mesg = item.Status;
                 }
-                builder = CreateMessageBuilder();
-                builder.AppendText("{0}\t{1}\t({2}): {3}", status, nick, j, mesg);
                 cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
             }
         }
@@ -687,13 +1065,19 @@ namespace Smuxi.Engine
         {
             _Say(cd.Chat, cd.Parameter);
         }  
-        
-        private void _Say(ChatModel chat, string text)
+
+        void _Say(ChatModel chat, string text)
         {
             _Say(chat, text, true);
         }
 
-        private void _Say(ChatModel chat, string text, bool send)
+        void _Say(ChatModel chat, string text, bool send)
+        {
+            _Say(chat, text, send, true);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void _Say(ChatModel chat, string text, bool send, bool display)
         {
             if (!chat.IsEnabled) {
                 return;
@@ -703,41 +1087,45 @@ namespace Smuxi.Engine
             }
             
             if (send) {
-                string target = chat.ID;
                 if (chat.ChatType == ChatType.Person) {
-                    JabberClient.Message(target, text);
+                    var _person = (chat as PersonChatModel).Person as PersonModel;
+                    XmppPersonModel person = GetOrCreateContact(_person.ID, _person.IdentityName);
+                    Jid jid = person.Jid;
+                    if (!String.IsNullOrEmpty(jid.Resource)) {
+                        JabberClient.Send(new Message(jid, XmppMessageType.chat, text));
+                    } else {
+                        var resources = person.GetResourcesWithHighestPriority();
+                        if (resources.Count == 0) {
+                            // no connected resource, send to bare jid
+                            JabberClient.Send(new Message(jid.Bare, XmppMessageType.chat, text));
+                        } else {
+                            foreach (var res in resources) {
+                                Jid j = new Jid(jid);
+                                j.Resource = res.Name;
+                                JabberClient.Send(new Message(j, XmppMessageType.chat, text));
+                            }
+                        }
+                    }
                 } else if (chat.ChatType == ChatType.Group) {
-                    var room = ConferenceManager.GetRoom(
-                        String.Format(
-                            "{0}/{1}",
-                            target, JabberClient.User
-                        )
-                    );
-                    room.PublicMessage(text);
+                    JabberClient.Send(new Message(chat.ID, XmppMessageType.groupchat, text));
                     return; // don't show now. the message will be echoed back if it's sent successfully
                 }
-                if (SupressLocalMessageEcho) {
+                if (IsFacebook && SupressLocalMessageEcho) {
                     // don't show, facebook is bugging again
                     return;
                 }
                 LastSentMessage = text;
             }
 
-            var builder = CreateMessageBuilder();
-            builder.AppendSenderPrefix(Me);
-            builder.AppendMessage(text);
-            Session.AddMessageToChat(chat, builder.ToMessage());
-        }
-        
-        void OnStreamInit(object sender, ElementStream stream)
-        {
-            Trace.Call(sender, stream);
-
-            stream.AddType("own-message", "http://www.facebook.com/xmpp/messages", typeof(OwnMessageQuery));
-            SupressLocalMessageEcho = false;
+            if (display) {
+                var builder = CreateMessageBuilder();
+                builder.AppendSenderPrefix(Me);
+                builder.AppendMessage(text);
+                Session.AddMessageToChat(chat, builder.ToMessage());
+            }
         }
 
-        void OnProtocol(object sender, XmlElement tag)
+        void OnReadXml(object sender, string text)
         {
             if (!DebugProtocol) {
                 return;
@@ -749,9 +1137,14 @@ namespace Smuxi.Engine
                 xmlWriter.Formatting = Formatting.Indented;
                 xmlWriter.Indentation = 2;
                 xmlWriter.IndentChar =  ' ';
-                tag.WriteTo(xmlWriter);
-
+                
+                var document = new XmlDocument();
+                document.LoadXml(text);
+                document.WriteContentTo(xmlWriter);
+                
                 DebugRead("\n" + strWriter.ToString());
+            } catch (XmlException) {
+                DebugRead("\n" + text);
             } catch (Exception ex) {
 #if LOG4NET
                 _Logger.Error("OnProtocol(): Exception", ex);
@@ -759,15 +1152,15 @@ namespace Smuxi.Engine
             }
         }
 
-        void OnWriteText(object sender, string text)
+        void OnWriteXml(object sender, string text)
         {
             if (!DebugProtocol) {
                 return;
             }
 
             try {
-                if (text != null && text.Trim().Length == 0) {
-                    DebugWrite(text);
+                if (text == null || text.Trim().Length == 0) {
+                    // suppress logging keep-alive messages
                     return;
                 }
 
@@ -793,312 +1186,946 @@ namespace Smuxi.Engine
             }
         }
 
-        public void OnRosterItem(object sender, Item ri)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        XmppPersonModel GetOrCreateContact(Jid jid, string name)
         {
-            string jid = ri.JID.Bare;
+            XmppPersonModel p;
+            if (!Contacts.TryGetValue(jid.Bare, out p)) {
+                p = new XmppPersonModel(jid, name, this);
+                Contacts[jid.Bare] = p;
+            }
+            return p;
+        }
 
-            if (ContactChat == null) return;
-            lock (ContactChat) {
-                PersonModel oldp = ContactChat.GetPerson(jid);
-                if (oldp == null) {
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnRosterItem(object sender, RosterItem rosterItem)
+        {
+            // setting to none also removes the person from chat, as we'd never get an offline message anymore
+            if (rosterItem.Subscription == SubscriptionType.none
+                || rosterItem.Subscription == SubscriptionType.remove) {
+                if (rosterItem.Subscription == SubscriptionType.remove) {
+                    Contacts.Remove(rosterItem.Jid);
+                }
+                if (ContactChat == null) {
+                    return;
+                }
+                PersonModel oldp = ContactChat.GetPerson(rosterItem.Jid);
+                if (oldp == null) {
                     // doesn't exist, don't need to do anything
                     return;
                 }
-                PersonModel newp = CreatePerson(jid);
-                Session.UpdatePersonInGroupChat(ContactChat, oldp, newp);
+                Session.RemovePersonFromGroupChat(ContactChat, oldp);
+                return;
+            }
+            // create or update a roster item
+            var contact = GetOrCreateContact(rosterItem.Jid.Bare, rosterItem.Name ?? rosterItem.Jid);
+            contact.Temporary = false;
+            contact.Subscription = rosterItem.Subscription;
+            contact.Ask = rosterItem.Ask;
+            string oldIdentityName = contact.IdentityName;
+            var oldIdentityNameColored = contact.IdentityNameColored;
+            if (IsFacebook) {
+                // facebook bug. prevent clearing of name
+                if (rosterItem.Name != null) {
+                    contact.IdentityName = rosterItem.Name;
+                }
+            } else {
+                contact.IdentityName = rosterItem.Name ?? rosterItem.Jid;
+            }
+
+            if (oldIdentityName == contact.IdentityName) {
+                // identity name didn't change
+                // the rest of this function only handles changed identity names
+                return;
+            }
+
+            contact.IdentityNameColored = null; // uncache
+
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            string idstring = "";
+            if (!IsFacebook && oldIdentityName != contact.Jid) {
+                idstring = " [" + contact.Jid + "]";
+            }
+            oldIdentityNameColored.BackgroundColor = TextColor.None;
+            builder.AppendFormat("{2}{1} is now known as {0}", contact, idstring, oldIdentityNameColored);
+
+            if (ContactChat != null) {
+                PersonModel oldp = ContactChat.GetPerson(rosterItem.Jid.Bare);
+                if (oldp == null) {
+                    // doesn't exist, don't need to do anything
+                    return;
+                }
+                Session.UpdatePersonInGroupChat(ContactChat, oldp, contact.ToPersonModel());
+
+                Session.AddMessageToChat(ContactChat, builder.ToMessage());
+            }
+            
+            var chat = Session.GetChat(rosterItem.Jid.Bare, ChatType.Person, this) as PersonChatModel;
+            if (chat != null) {
+                // TODO: implement update chat
+                var oldp = chat.Person;
+                Session.RemoveChat(chat);
+                chat = Session.CreatePersonChat(oldp, this);
+                Session.AddChat(chat);
+                Session.AddMessageToChat(chat, builder.ToMessage());
+                Session.SyncChat(chat);
             }
         }
 
-        void OnPresence(object sender, Presence pres)
+        void RequestCapabilities(Jid jid, Capabilities caps)
         {
-            JID jid = pres.From;
-            var groupChat = (XmppGroupChatModel) Session.GetChat(jid.Bare, ChatType.Group, this);
+            string hash = caps.Node + "#" + caps.Version;
+            RequestCapabilities(jid, hash);
+        }
 
-            MessageBuilder builder = CreateMessageBuilder();
-            builder.AppendEventPrefix();
-            PersonModel person = null;
-            if (groupChat != null) {
-                string displayName = jid.Resource ?? jid.Bare;
-                person = new PersonModel("", displayName, "", "", this);
-            } else {
-                person = CreatePerson(jid.Bare);
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void RequestCapabilities(Jid jid, string hash)
+        {
+            // already in cache?
+            DiscoInfo info;
+            if (DiscoCache.TryGetValue(hash, out info)) {
+                AddCapabilityToResource(jid, info);
+                return;
+            }
+            // prevent duplicate requests
+            DiscoCache[hash] = null;
+            // request it
+            Disco.DiscoverInformation(jid, OnDiscoInfo, hash);
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void AddCapabilityToResource(Jid jid, DiscoInfo info)
+        {
+            XmppPersonModel contact;
+            if (!Contacts.TryGetValue(jid.Bare, out contact)) {
+                return;
             }
-            builder.AppendIdendityName(person);
-            if (jid != person.IdentityName) {
-                builder.AppendText(" [{0}]", jid);
+            XmppResourceModel res;
+            if (!contact.Resources.TryGetValue(jid.Resource, out res)) {
+                return;
             }
+            res.Disco = info;
+        }
 
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnDiscoInfo(object sender, IQ iq, object pars)
+        {
+            if (iq.Error != null) {
+                var msg = CreateMessageBuilder();
+                msg.AppendEventPrefix();
+                msg.AppendErrorText(_("An error happened during service discovery for {0}: {1}"),
+                                    iq.From,
+                                    iq.Error.ErrorText ?? iq.Error.Condition.ToString());
+                Session.AddMessageToChat(NetworkChat, msg.ToMessage());
+                // clear item from cache so the request is done again some time
+                DiscoCache.Remove(pars as string);
+                return;
+            }
+            if (iq.Type != IqType.result) {
+                throw new ArgumentException("discoinfoiq is not a result");
+            }
+            if (!(iq.Query is DiscoInfo)) {
+                throw new ArgumentException("discoinfoiq query is not a discoinfo");
+            }
+            DiscoCache[pars as string] = iq.Query as DiscoInfo;
+            if (String.IsNullOrEmpty(iq.From.User)) {
+                // server capabilities
+                var builder = CreateMessageBuilder();
+                builder.AppendText("The Server supports the following features: ");
+                Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+                foreach ( var feature in (iq.Query as DiscoInfo).GetFeatures()) {
+                    builder = CreateMessageBuilder();
+                    builder.AppendText(feature.Var);
+                    Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+                }
+            } else {
+                AddCapabilityToResource(iq.From, iq.Query as DiscoInfo);
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        MessageModel CreatePresenceUpdateMessage(Jid jid, PersonModel person, Presence pres)
+        {
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            string idstring = "";
+            // print jid (except in case of facebook where it is meaningless)
+            if (!IsFacebook && jid.Bare != person.IdentityName) {
+                idstring = String.Format(" [{0}]", jid.Bare);
+            }
+            // print the type (and in case of available detailed type)
             switch (pres.Type) {
                 case PresenceType.available:
-                    // groupchat is already managed
-                    if (groupChat == null) {
-                        if (ContactChat != null) {
-                            // anyone who is online/away/dnd will be added to the list
-                            lock (ContactChat) {
-                                PersonModel p = ContactChat.GetPerson(jid.Bare);
-                                if (p != null) {
-                                    // p already exists, don't add a new person
-                                    Session.UpdatePersonInGroupChat(ContactChat, p, person);
-                                } else {
-                                    Session.AddPersonToGroupChat(ContactChat, person);
-                                }
-                            }
-                        }
-                    }
-                    if (pres.Show == null) {
-                        builder.AppendText(_(" is now available"));
-                    } else if (pres.Show == "away") {
-                        builder.AppendText(_(" is now away"));
-                    } else if (pres.Show == "dnd") {
-                        builder.AppendText(_(" wishes not to be disturbed"));
-                    } else {
-                        builder.AppendText(_(" set status to {0}"), pres.Show);
+                    switch(pres.Show) {
+                        case ShowType.NONE:
+                            builder.AppendFormat(_("{0}{1} is available"), person, idstring);
+                            break;
+                        case ShowType.away:
+                            builder.AppendFormat(_("{0}{1} is away"), person, idstring);
+                            break;
+                        case ShowType.xa:
+                            builder.AppendFormat(_("{0}{1} is extended away"), person, idstring);
+                            break;
+                        case ShowType.dnd:
+                            builder.AppendFormat(_("{0}{1} wishes not to be disturbed"), person, idstring);
+                            break;
+                        case ShowType.chat:
+                            builder.AppendFormat(_("{0}{1} wants to chat"), person, idstring);
+                            break;
+                            
                     }
-                    if (pres.Status == null) break;
-                    if (pres.Status.Length == 0) break;
-                    builder.AppendText(": {0}", pres.Status);
                     break;
                 case PresenceType.unavailable:
-                    builder.AppendText(_(" is now offline"));
-                    if(groupChat == null) {
-                        if (ContactChat != null) {
-                            lock (ContactChat) {
-                                PersonModel p = ContactChat.GetPerson(jid.Bare);
-                                if (p == null) {
-                                    // doesn't exist, got an offline message w/o a preceding online message?
-                                    return;
-                                }
-                                Session.RemovePersonFromGroupChat(ContactChat, p);
-                            }
-                        }
-                    }
+                    builder.AppendFormat(_("{0}{1} is offline"), person, idstring);
                     break;
                 case PresenceType.subscribe:
-                    builder.AppendText(_(" wishes to subscribe to you"));
+                    if ((person as XmppPersonModel).Ask == AskType.subscribe) {
+                        builder = CreateMessageBuilder();
+                        builder.AppendActionPrefix();
+                        builder.AppendFormat(_("Automatically allowed {0} to subscribe to you, since you are already asking to subscribe"),
+                                           person
+                        );
+                    } else {
+                        builder.AppendFormat(_("{0}{1} wishes to subscribe to you"),
+                                             person, idstring);
+                        // you have to respond
+                        builder.MarkAsHighlight();
+                    }
                     break;
                 case PresenceType.subscribed:
-                    builder.AppendText(_(" allows you to subscribe"));
+                    // you can now see their presences
+                    builder.AppendFormat(_("{0}{1} allowed you to subscribe"), person, idstring);
+                    break;
+                case PresenceType.unsubscribed:
+                    if ((person as XmppPersonModel).Subscription == SubscriptionType.from) {
+                        builder = CreateMessageBuilder();
+                        builder.AppendActionPrefix();
+                        builder.AppendFormat(
+                            _("Automatically removed {0}'s subscription to " +
+                              "your presences after losing the subscription " +
+                              "to theirs"),
+                            person
+                        );
+                    } else {
+                        // you cannot (anymore?) see their presences
+                        builder.AppendFormat(_("{0}{1} denied/removed your subscription"), person, idstring);
+                    }
+                    break;
+                case PresenceType.unsubscribe:
+                    // you might still be able to see their presences
+                    builder.AppendFormat(_("{0}{1} unsubscribed from you"), person, idstring);
+                    break;
+                case PresenceType.error:
+                    if (pres.Error == null) {
+                        builder.AppendErrorText(_("received a malformed error message: {0}"), pres);
+                        break;
+                    }
+                    switch (pres.Error.Type) {
+                        case ErrorType.cancel:
+                            switch (pres.Error.Condition) {
+                                case ErrorCondition.RemoteServerNotFound:
+                                    builder.AppendErrorText(_("{0}{1}'s server could not be found"), person.IdentityName, idstring);
+                                    break;
+                                case ErrorCondition.Conflict:
+                                    builder.AppendErrorText(_("{0}{1} is already using your requested resource"), person.IdentityName, idstring);
+                                    break;
+                                default:
+                                    if (!String.IsNullOrEmpty(pres.Error.ErrorText)) {
+                                        builder.AppendErrorText(pres.Error.ErrorText);
+                                    } else {
+                                        builder.AppendErrorText(
+                                            _("There is currently no useful error message for {0}, {1}, {2}{3}"),
+                                            pres.Error.Type,
+                                            pres.Error.Condition,
+                                            person.IdentityName,
+                                            idstring);
+                                    }
+                                    break;
+                            }
+                            break;
+                        case ErrorType.auth:
+                            switch (pres.Error.Condition) {
+                                case ErrorCondition.Forbidden:
+                                    builder.AppendErrorText(
+                                        _("You do not have permission to access {0}{1}")
+                                        , person.IdentityName,
+                                        idstring);
+                                    break;
+                                default:
+                                    if (!String.IsNullOrEmpty(pres.Error.ErrorText)) {
+                                        builder.AppendErrorText(pres.Error.ErrorText);
+                                    } else {
+                                        builder.AppendErrorText(
+                                            _("There is currently no useful error message for {0}, {1}, {2}{3}"),
+                                            pres.Error.Type,
+                                            pres.Error.Condition,
+                                            person.IdentityName,
+                                            idstring);
+                                    }
+                                    break;
+                            }
+                            break;
+                        default:
+                            if (!String.IsNullOrEmpty(pres.Error.ErrorText)) {
+                                builder.AppendErrorText(pres.Error.ErrorText);
+                            } else {
+                                builder.AppendErrorText(
+                                    _("There is currently no useful error message for {0}, {1}, {2}{3}"),
+                                    pres.Error.Type,
+                                    pres.Error.Condition,
+                                    person.IdentityName,
+                                    idstring);
+                            }
+                            break;
+                    }
                     break;
             }
-            if (groupChat != null) {
-                Session.AddMessageToChat(groupChat, builder.ToMessage());
-            } else if (ContactChat != null) {
-                Session.AddMessageToChat(ContactChat, builder.ToMessage());
+            // print timestamp of presence
+            if (pres.XDelay != null || pres.Last != null) {
+                DateTime stamp = DateTime.MinValue;
+                TimeSpan span = TimeSpan.MinValue;
+                if (pres.XDelay != null) {
+                    stamp = pres.XDelay.Stamp;
+                    span = DateTime.Now.Subtract(stamp);
+                } else if (pres.Last != null) {
+                    span = TimeSpan.FromSeconds(pres.Last.Seconds);
+                    stamp = DateTime.Now.Subtract(span);
+                }
+                string spanstr;
+                if (span > TimeSpan.FromDays(1)) {
+                    spanstr = String.Format(
+                        "{0:00}:{1:00}:{2:00}:{3:00}",
+                        span.TotalDays, span.Hours, span.Minutes, span.Seconds
+                    );
+                    spanstr = String.Format(_("{0} days"), spanstr);
+                } else if (span > TimeSpan.FromHours(1)) {
+                    spanstr = String.Format(
+                        "{0:00}:{1:00}:{2:00}",
+                        span.Hours, span.Minutes, span.Seconds
+                    );
+                    spanstr = String.Format(_("{0} hours"), spanstr);
+                } else if (span > TimeSpan.FromMinutes(1)) {
+                    spanstr = String.Format("{0:00}:{1:00}",
+                                            span.Minutes, span.Seconds);
+                    spanstr = String.Format(_("{0} minutes"), spanstr);
+                } else {
+                    spanstr = String.Format("{0:00}", span.Seconds);
+                    spanstr = String.Format(_("{0} seconds"), spanstr);
+                }
+
+                string timestamp = null;
+                try {
+                    string format = Session.UserConfig["Interface/Notebook/TimestampFormat"] as string;
+                    if (!String.IsNullOrEmpty(format)) {
+                        timestamp = stamp.ToString(format);
+                    }
+                } catch (FormatException e) {
+                    timestamp = "Timestamp Format ERROR: " + e.Message;
+                }
+                builder.AppendText(_(" since {0} ({1})"), timestamp, spanstr);
             }
-            var personChat = Session.GetChat(jid.Bare, ChatType.Person, this);
-            if (personChat != null) {
-                Session.AddMessageToChat(personChat, builder.ToMessage());
+            // print user defined message
+            if (pres.Status != null && pres.Status.Trim().Length > 0) {
+                builder.AppendText(": {0}", pres.Status);
             }
+            return builder.ToMessage();
         }
 
-        private void OnMessage(object sender, Message msg)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void PrintGroupChatPresence(XmppGroupChatModel chat, XmppPersonModel person, Presence pres)
         {
-            if (msg.Body == null) {
-                return;
+            Jid jid = pres.From;
+            XmppResourceModel resource;
+            if (person.MucResources.TryGetValue(jid.Resource??"", out resource)) {
+                if (resource.Presence.Show == pres.Show
+                    && resource.Presence.Status == pres.Status
+                    && resource.Presence.Last == pres.Last
+                    && resource.Presence.XDelay == pres.XDelay
+                    && resource.Presence.Priority == pres.Priority
+                    && resource.Presence.Nickname == pres.Nickname
+                    && resource.Presence.Type == pres.Type
+                    ) {
+                    // presence didn't change enough to warrent a display message -> abort
+                    return;
+                }
             }
 
-            var delay = msg["delay"];
-            string stamp = null;
-            if (delay != null) {
-                stamp = delay.Attributes["stamp"].Value;
+            var msg = CreatePresenceUpdateMessage(person.Jid, person, pres);
+            Session.AddMessageToChat(chat, msg);
+            // clone directly to muc person chat
+            // don't care about real jid, that has its own presence packets
+            var personChat = Session.GetChat(jid, ChatType.Person, this);
+            if (personChat != null) {
+                Session.AddMessageToChat(personChat, msg);
             }
-            bool display = true;
+        }
 
-            ChatModel chat = null;
-            PersonModel person = null;
-            if (msg.Type != XmppMessageType.groupchat) {
-                var sender_jid = msg.From.Bare;
-                var personChat = (PersonChatModel) Session.GetChat(
-                    sender_jid, ChatType.Person, this
-                );
-                if (personChat == null) {
-                    person = CreatePerson(msg.From);
-                    personChat = Session.CreatePersonChat(
-                        person, sender_jid, person.IdentityName, this
-                    );
-                    Session.AddChat(personChat);
-                    Session.SyncChat(personChat);
-                } else {
-                    person = personChat.Person;
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnGroupChatPresence(XmppGroupChatModel chat, Presence pres)
+        {
+            Jid jid = pres.From;
+            XmppPersonModel person;
+            // check whether we know the real jid of this muc user
+            if (pres.MucUser != null &&
+                pres.MucUser.Item != null &&
+                pres.MucUser.Item.Jid != null ) {
+                string nick = pres.From.Resource;
+                if (!string.IsNullOrEmpty(pres.MucUser.Item.Nickname)) {
+                    nick = pres.MucUser.Item.Nickname;
                 }
-                chat = personChat;
+                person = GetOrCreateContact(pres.MucUser.Item.Jid.Bare, nick);
             } else {
-                string group_jid = msg.From.Bare;
-                string group_name = group_jid;
-                XmppGroupChatModel groupChat = (XmppGroupChatModel) Session.GetChat(group_jid, ChatType.Group, this);
-                if (groupChat == null) {
-                    groupChat = Session.CreateChat<XmppGroupChatModel>(
-                        group_jid, group_name, this
-                    );
-                    Session.AddChat(groupChat);
+                // we do not know the real jid of this user, don't add it to our local roster
+                // BUG? pres.From.Resource can be null?
+                person = new XmppPersonModel(jid, pres.From.Resource, this);
+            }
+            person.GetOrCreateMucResource(jid).Presence = pres;
+            PrintGroupChatPresence(chat, person, pres);
+            switch (pres.Type) {
+                case PresenceType.available:
+                    // don't do anything if the contact already exists
+                    if (chat.UnsafePersons.ContainsKey(person.ID)) {
+                        return;
+                    }
+                    // is the chat synced? add the new contact the regular way
+                    if (chat.IsSynced) {
+                        Session.AddPersonToGroupChat(chat, person.ToPersonModel());
+                        return;
+                    }
+                    
+                    chat.UnsafePersons.Add(person.ID, person.ToPersonModel());
+        
+                    // did I join? then the chat roster is fully received
+                    if (pres.From.Resource == chat.OwnNickname) {
+                        // HACK: lower probability of sync race condition swallowing messages
+                        ThreadPool.QueueUserWorkItem(delegate {
+                            Thread.Sleep(1000);
+                            chat.IsSynced = true;
+                            Session.SyncChat(chat);
+                            Session.EnableChat(chat);
+                        });
+                    }
+                    break;
+                case PresenceType.unavailable:
+                    Session.RemovePersonFromGroupChat(chat, person.ToPersonModel());
+                    // did I leave? then I "probably" left the room
+                    if (pres.From.Resource == chat.OwnNickname) {
+                        Session.RemoveChat(chat);
+                    }
+                    break;
+                case PresenceType.error:
+                    if (pres.Error == null) break;
+                    switch (pres.Error.Type) {
+                        case ErrorType.cancel:
+                            switch (pres.Error.Condition) {
+                                case ErrorCondition.Conflict:
+                                    // nickname already in use
+                                    // autorejoin with _ appended to nickname
+                                    JoinRoom(chat.ID, chat.OwnNickname + "_", chat.Password);
+                                    break;
+                            }
+                            break;
+                    }
+                    break;
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void PrintPrivateChatPresence(XmppPersonModel person, Presence pres)
+        {
+            Jid jid = pres.From;
+            XmppResourceModel resource;
+            if (person.Resources.TryGetValue(jid.Resource??"", out resource)) {
+                if (resource.Presence.Show == pres.Show
+                    && resource.Presence.Status == pres.Status
+                    && resource.Presence.Last == pres.Last
+                    && resource.Presence.XDelay == pres.XDelay
+                    && resource.Presence.Priority == pres.Priority
+                    && resource.Presence.Type == pres.Type
+                    ) {
+                    // presence didn't change enough to warrent a display message -> abort
+                    return;
+                }
+            }
+            MessageModel msg = CreatePresenceUpdateMessage(jid, person, pres);
+            if (!String.IsNullOrEmpty(jid.Resource)) {
+                var directchat = Session.GetChat(jid, ChatType.Person, this);
+                if (directchat != null) {
+                    // in case of direct chat we still send this message
+                    Session.AddMessageToChat(directchat, msg);
+                }
+            }
+            // a nonexisting resource going offline?
+            if (pres.Type == PresenceType.unavailable) {
+                if (!person.Resources.ContainsKey(jid.Resource??"")) {
+                    return;
+                }
+            }
+            var res = person.GetOrCreateResource(jid);
+            var oldpres = res.Presence;
+            res.Presence = pres;
+            // highest pres
+            Jid hjid = jid;
+            Jid nextjid = jid;
+            // 2nd highest pres
+            Presence hpres = pres;
+            Presence nextpres = null;
+            bool amHighest = true;
+            bool wasHighest = true;
+            foreach (var pair in person.Resources) {
+                if (pair.Value == res) continue;
+                if (nextpres == null || pair.Value.Presence.Priority > nextpres.Priority) {
+                    nextjid.Resource = pair.Key;
+                    nextpres = pair.Value.Presence;
                 }
-                // resource can be empty for room messages
-                var sender_id = msg.From.Resource ?? msg.From.Bare;
-                person = groupChat.GetPerson(sender_id);
-                if (person == null) {
-                    // happens in case of a delayed message if the participant has left meanwhile
-                    person = new PersonModel(sender_id,
-                                             sender_id,
-                                             NetworkID, Protocol, this);
+                if (pair.Value.Presence.Priority > hpres.Priority) {
+                    // someone has a higher priority than I do
+                    // print the status of that resource
+                    hjid.Resource = pair.Key;
+                    hpres = pair.Value.Presence;
+                    amHighest = false;
                 }
+                if (oldpres != null && pair.Value.Presence.Priority > oldpres.Priority) {
+                    wasHighest = false;
+                }
+            }
+            if (pres.Type == PresenceType.available) {
+                // wasn't and isn't highiest prio -> ignore
+                if (!wasHighest && !amHighest) return;
+                // just another below zero prio -> ignore
+                if (amHighest && pres.Priority < 0) return;
+                // was highest, isn't anymore -> show presence of new highest
+                if (wasHighest && !amHighest) {
+                    msg = CreatePresenceUpdateMessage(hjid, person, hpres);
+                }
+            } else if (pres.Type == PresenceType.unavailable) {
+                // still a resource left with positive priority
+                if (nextpres != null && nextpres.Priority >= 0) {
+                    msg = CreatePresenceUpdateMessage(nextjid, person, nextpres);
+                }
+            }
+            var chat = Session.GetChat(jid.Bare, ChatType.Person, this);
+            if (chat != null) {
+                Session.AddMessageToChat(chat, msg);
+            }
+            if (ContactChat != null) {
+                Session.AddMessageToChat(ContactChat, msg);
+            }
+        }
 
-                // XXX maybe only a Google Talk bug requires this:
-                if (stamp != null) {
-                    // XXX can't use > because of seconds precision :-(
-                    if (stamp.CompareTo(groupChat.LatestSeenStamp) >= 0) {
-                        groupChat.LatestSeenStamp = stamp;
-                    } else {
-                        display = false; // already seen newer delayed message
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnPrivateChatPresence(Presence pres)
+        {
+            Jid jid = pres.From;
+            var person = GetOrCreateContact(jid.Bare, jid);
+            PrintPrivateChatPresence(person, pres);
+            switch (pres.Type) {
+                case PresenceType.available:
+                    if (pres.Priority < 0) break;
+                    if (ContactChat == null) break;
+                    if (ContactChat.UnsafePersons.ContainsKey(jid.Bare)) break;
+                    Session.AddPersonToGroupChat(ContactChat, person.ToPersonModel());
+                    break;
+                case PresenceType.unavailable:
+                    person.RemoveResource(jid);
+                    if (pres.Priority < 0) break;
+                    if (ContactChat == null) break;
+                    if (!ContactChat.UnsafePersons.ContainsKey(jid.Bare)) break;
+                    var pers = ContactChat.GetPerson(jid.Bare);
+                    Session.RemovePersonFromGroupChat(ContactChat, pers);
+                    break;
+                case PresenceType.subscribe:
+                    if (person.Ask == AskType.subscribe) {
+                        // we are currently asking the contact OR are subscribed to him
+                        // so we allow the contact to subscribe
+                        // TODO: make the following dependent on some user setable boolean
+                        JabberClient.PresenceManager.ApproveSubscriptionRequest(jid);
                     }
-                    if (groupChat.SeenNewMessages) {
-                        display = false; // already seen newer messages
+                    break;
+                case PresenceType.subscribed:
+                    // we are now able to see that contact's presences
+                    break;
+                case PresenceType.unsubscribed:
+                    // the contact does not wish us to see his presences anymore
+                    if (person.Subscription == SubscriptionType.from) {
+                        // but the contact can still see us
+                        // TODO: make the following dependent on some user setable boolean
+                        JabberClient.PresenceManager.RefuseSubscriptionRequest(jid);
+                    } else {
+                        // TODO: this contact was just created in OnPresence… prevent it from doing that?
+                        // TODO: this can happen when a subscription=none contact sends a deny…
+                        Contacts.Remove(jid.Bare);
                     }
-                } else {
-                    groupChat.SeenNewMessages = true;
-                }
+                    break;
+                case PresenceType.unsubscribe:
+                    // the contact does not wish to see our presence anymore?
+                    // we could care less
+                    break;
+            }
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnPresence(object sender, Presence pres)
+        {
+            Trace.Call(sender, pres);
 
-                chat = groupChat;
+            Jid jid = pres.From;
+            if (jid == JabberClient.MyJID) return; // we don't care about ourself
+            if (pres.Capabilities != null && pres.Type == PresenceType.available) {
+                // only test capabilities of users going online or changing something in their online state
+                RequestCapabilities(jid, pres.Capabilities);
             }
+            
+            var groupChat = (XmppGroupChatModel) Session.GetChat(jid.Bare, ChatType.Group, this);
+            
+            if (groupChat != null) {
+                OnGroupChatPresence(groupChat, pres);
+            } else {
+                OnPrivateChatPresence(pres);
+            }
+        }
 
-            if (display) {
-                var builder = CreateMessageBuilder();
-                if (msg.Type != XmppMessageType.error) {
-                    if (chat is PersonChatModel) {
-                        // private message
-                        builder.AppendSenderPrefix(person, true);
-                        builder.AppendMessage(msg.Body);
-                        builder.MarkHighlights();
-                    } else if (chat is XmppGroupChatModel) {
-                        // public message
-                        builder.AppendMessage(person, msg.Body);
-                        // mark highlights only for received messages
-                        var muc = (XmppGroupChatModel) chat;
-                        if (person.ID != muc.OwnNickname) {
-                            builder.MarkHighlights();
-                        }
-                    }
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnGroupChatMessage(Message msg)
+        {
+            string group_jid = msg.From.Bare;
+            XmppGroupChatModel groupChat = (XmppGroupChatModel) Session.GetChat(group_jid, ChatType.Group, this);
+            // resource can be empty for room messages
+            var sender_id = msg.From.Resource ?? msg.From.Bare;
+            var person = groupChat.GetPerson(sender_id);
+            if (person == null) {
+                // happens in case of a delayed message if the participant has left meanwhile
+                // TODO: or in case of a room message?
+                person = new PersonModel(sender_id,
+                                         sender_id,
+                                         NetworkID, Protocol, this);
+            }
+            
+            // XXX maybe only a Google Talk bug requires this:
+            if (msg.XDelay != null) {
+                var stamp = msg.XDelay.Stamp;
+                if (stamp > groupChat.LatestSeenStamp) {
+                    groupChat.LatestSeenStamp = stamp;
                 } else {
-                    // TODO: nicer formatting
-                    builder.AppendMessage(msg.Error.ToString());
+                    return; // already seen newer delayed message
                 }
-                if (stamp != null) {
-                    string format = DateTimeFormatInfo.InvariantInfo.UniversalSortableDateTimePattern.Replace(" ", "T");
-                    builder.TimeStamp = DateTime.ParseExact(stamp, format, null);
+                if (groupChat.SeenNewMessages) {
+                    return; // already seen newer messages
                 }
-                Session.AddMessageToChat(chat, builder.ToMessage());
+            } else {
+                groupChat.SeenNewMessages = true;
             }
+            
+            // mark highlights only for received messages
+            bool hilight = person.ID != groupChat.OwnNickname;
+            var message = CreateMessage(person, msg, hilight, false);
+            Session.AddMessageToChat(groupChat, message);
         }
 
-        void OnIQ(object sender, IQ iq)
+        void AddMessageToChatIfNotFiltered(MessageModel msg, ChatModel chat, bool isNew)
         {
-            Trace.Call(sender, iq);
+            if (Session.IsFilteredMessage(chat, msg)) {
+                Session.LogMessage(chat, msg, true);
+                return;
+            }
+            if (isNew) {
+                Session.AddChat(chat);
+                Session.SyncChat(chat);
+            }
+            Session.AddMessageToChat(chat, msg);
+        }
 
-            if (iq.Query is OwnMessageQuery) {
-                OnIQOwnMessage((OwnMessageQuery) iq.Query);
-                iq.Handled = true;
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnPrivateChatMessage(Message msg)
+        {
+            var chat = Session.GetChat(msg.From, ChatType.Person, this) as PersonChatModel;
+            bool isNew = false;
+            if (chat == null) {
+                // in case full jid doesn't have a chat window, use bare jid
+                chat = GetOrCreatePersonChat(msg.From.Bare, out isNew);
             }
+            AddMessageToChatIfNotFiltered(CreateMessage(chat.Person, msg, true, true), chat, isNew);
         }
 
-        void OnIQOwnMessage(OwnMessageQuery query)
+        MessageModel CreateMessage(PersonModel person, Message msg, bool mark_hilights, bool force_hilight)
         {
-            if (query.Self) {
-                // we send this message from Smuxi, nothing to do...
-                return;
+            var builder = CreateMessageBuilder();
+            string msgstring;
+            if (msg.Html != null) {
+                msgstring = msg.Html.ToString();
+            } else {
+                msgstring = msg.Body.Trim();
             }
-            
-            if (!SupressLocalMessageEcho && (query.Body == LastSentMessage)) {
-                SupressLocalMessageEcho = true;
-                return;
+
+            if (msgstring.StartsWith("/me ")) {
+                // leave the " " intact
+                msgstring = msgstring.Substring(3);
+                builder.AppendActionPrefix();
+                builder.AppendIdendityName(person, force_hilight);
+            } else {
+                builder.AppendSenderPrefix(person, force_hilight);
             }
 
-            var target_jid = query.To.Bare;
-            var chat = (PersonChatModel) Session.GetChat(target_jid,
-                                                         ChatType.Person, this);
-            if (chat == null) {
-                var person = CreatePerson(query.To);
-                chat = Session.CreatePersonChat(person, this);
-                Session.AddChat(chat);
-                Session.SyncChat(chat);
+            if (msg.Html != null) {
+                builder.AppendHtmlMessage(msgstring);
+            } else {
+                builder.AppendMessage(msgstring);
+            }
+            if (mark_hilights) {
+                builder.MarkHighlights();
             }
 
-            _Say(chat, query.Body, false);
+            if (msg.XDelay != null) {
+                builder.TimeStamp = msg.XDelay.Stamp;
+            }
+            return builder.ToMessage();
         }
 
-        void OnJoin(Room room)
+        void OnGroupChatMessageError(Message msg, XmppGroupChatModel chat)
         {
-            AddPersonToGroup(room, room.Nickname);
+            var builder = CreateMessageBuilder();
+            // TODO: nicer formatting
+            if (msg.Error.ErrorText != null) {
+                builder.AppendErrorText(msg.Error.ErrorText);
+            } else {
+                builder.AppendErrorText(msg.Error.ToString());
+            }
+            Session.AddMessageToChat(chat, builder.ToMessage());
         }
 
-        void OnLeave(Room room, Presence presence)
+        void OnPrivateChatMessageError(Message msg, PersonChatModel chat)
         {
-            var chat = Session.GetChat(room.JID.Bare, ChatType.Group, this);
-            if (chat.IsEnabled)
-                Session.RemoveChat(chat);
+            var builder = CreateMessageBuilder();
+            // TODO: nicer formatting
+            if (msg.Error.ErrorText != null) {
+                builder.AppendErrorText(msg.Error.ErrorText);
+            } else {
+                builder.AppendErrorText(msg.Error.ToString());
+            }
+            Session.AddMessageToChat(chat, builder.ToMessage());
         }
 
-        void OnParticipantJoin(Room room, RoomParticipant roomParticipant)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnMessage(object sender, Message msg)
         {
-            AddPersonToGroup(room, roomParticipant.Nick);
+            // process chatstates
+            if (msg.Chatstate != agsXMPP.protocol.extensions.chatstates.Chatstate.None) {
+                OnChatState(msg);
+            }
+            if (String.IsNullOrEmpty(msg.Body)) {
+                // TODO: capture events and stuff
+                return;
+            }
+            switch (msg.Type) {
+                case XmppMessageType.groupchat:
+                    OnGroupChatMessage(msg);
+                    break;
+                case XmppMessageType.chat:
+                case XmppMessageType.headline:
+                case XmppMessageType.normal:
+                    if (String.IsNullOrEmpty(msg.From.User)) {
+                        OnServerMessage(msg);
+                    } else if (msg.MucUser != null) {
+                        OnMucMessage(msg);
+                    } else {
+                        OnPrivateChatMessage(msg);
+                    }
+                    break;
+                case XmppMessageType.error:
+                {
+                    var chat = Session.GetChat(msg.From, ChatType.Group, this);
+                    if (chat != null) {
+                        OnGroupChatMessageError(msg, chat as XmppGroupChatModel);
+                        break;
+                    }
+                    chat = Session.GetChat(msg.From, ChatType.Person, this);
+                    if (chat != null) {
+                        OnPrivateChatMessageError(msg, chat as PersonChatModel);
+                        break;
+                    }
+                    // no person and no groupchat open? -> dump in networkchat
+                    var builder = CreateMessageBuilder();
+                    // TODO: nicer formatting
+                    if (msg.Error.ErrorText != null) {
+                        builder.AppendErrorText(msg.Error.ErrorText);
+                    } else {
+                        builder.AppendErrorText(msg.Error.ToString());
+                    }
+                    Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+                }
+                    break;
+            }
         }
 
-        private void AddPersonToGroup(Room room, string nickname)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnMucMessage (Message msg)
         {
-            string jid = room.JID.Bare;
-            var chat = (XmppGroupChatModel) Session.GetChat(jid, ChatType.Group, this);
-            // first notice we're joining a group chat is the participant info:
-            if (chat == null) {
-                chat = Session.CreateChat<XmppGroupChatModel>(jid, jid, this);
-                chat.OwnNickname = room.Nickname;
-                Session.AddChat(chat);
+            User user = msg.MucUser;
+            string text;
+            if (user.Invite != null) {
+                if (user.Invite.Reason != null && user.Invite.Reason.Trim().Length > 0) {
+                    text = String.Format(_("You have been invited to {2} by {0} because {1}"),
+                                         user.Invite.From,
+                                         user.Invite.Reason,
+                                         msg.From
+                                         );
+                } else {
+                    text = String.Format(_("You have been invited to {1} by {0}"),
+                                         user.Invite.From,
+                                         msg.From
+                                         );
+                }
+            } else {
+                text = msg.ToString();
             }
+            var builder = CreateMessageBuilder();
+            builder.AppendEventPrefix();
+            var txt = builder.CreateText(text);
+            txt.IsHighlight = true;
+            builder.AppendText(txt);
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+            builder = CreateMessageBuilder();
+            string url;
+            if (!String.IsNullOrEmpty(user.Password)) {
+                url = String.Format("xmpp:{0}?join;password={1}", msg.From, user.Password);
+            } else {
+                url = String.Format("xmpp:{0}?join", msg.From);
+            }
+            builder.AppendUrl(url, _("Accept invite (join room)"));
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
+        }
 
-            lock (chat) {
-                if (chat.UnsafePersons.ContainsKey(nickname)) {
-                    return;
-                }
-                // manual construction is necessary for group chats
-                var person = new PersonModel(nickname, nickname, NetworkID, Protocol, this);
-                if (chat.IsSynced) {
-                    Session.AddPersonToGroupChat(chat, person);
-                } else {
-                    chat.UnsafePersons.Add(nickname, person);
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnChatState(Message msg)
+        {
+            if (msg.Body != null) return;
+            switch (msg.Type) {
+                case XmppMessageType.chat:
+                case XmppMessageType.headline:
+                case XmppMessageType.normal:
+                {
+                    var chat = GetChat(msg.From, ChatType.Person) as PersonChatModel;
+                    bool isNew = false;
+                    // no full jid chat
+                    if (chat == null) {
+                        // create chat
+                        chat = GetOrCreatePersonChat(msg.From.Bare, out isNew);
+                    }
+                    var builder = CreateMessageBuilder();
+                    builder.AppendEventPrefix();
+                    builder.AppendFormat(_("{0} changed the chatstate to {1}"),
+                                       chat.Person, msg.Chatstate.ToString());
+                    AddMessageToChatIfNotFiltered(builder.ToMessage(), chat, isNew);
                 }
+                    break;
+                default:
+                    break;
             }
+        }
 
-            // did I join? then the chat roster is fully received
-            if (!chat.IsSynced && nickname == room.Nickname) {
-                chat.IsSynced = true;
-                Session.SyncChat(chat);
+        void OnServerMessage(Message msg)
+        {
+            var builder = CreateMessageBuilder();
+            builder.AppendText("<{0}> {1}", msg.From, msg.Body);
+            builder.MarkHighlights();
+            // todo: can server messages have an xdelay?
+            if (msg.XDelay != null) {
+                builder.TimeStamp = msg.XDelay.Stamp;
             }
+            Session.AddMessageToChat(NetworkChat, builder.ToMessage());
         }
-        
-        public void OnParticipantLeave(Room room, RoomParticipant roomParticipant)
+
+        void OnIq(object sender, IQ iq)
         {
-            string jid = room.JID.Bare;
-            var chat = (GroupChatModel) Session.GetChat(jid, ChatType.Group, this);
-            string nickname = roomParticipant.Nick;
+            Trace.Call(sender, iq);
 
-            lock (chat) {
-                var person = chat.GetPerson(nickname);
-                if (person == null) {
-                    return;
-                }
+            // not as pretty as the previous implementation, but it works
+            var elem = iq.SelectSingleElement("own-message");
+            if (elem is OwnMessageQuery) {
+                OnIQOwnMessage((OwnMessageQuery) elem);
+            }
+        }
 
-                Session.RemovePersonFromGroupChat(chat, person);
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnIQOwnMessage(OwnMessageQuery query)
+        {
+            if (query.Self) {
+                // we send this message from Smuxi, nothing to do...
+                return;
             }
+            
+            if (!SupressLocalMessageEcho && (query.Body == LastSentMessage)) {
+                SupressLocalMessageEcho = true;
+                return;
+            }
+            var chat = GetOrCreatePersonChat(query.To);
+
+            _Say(chat, query.Body, false);
         }
 
-        void OnConnect(object sender, StanzaStream stream)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        PersonChatModel GetOrCreatePersonChat(Jid jid)
         {
-            Trace.Call(sender, stream);
+            bool isNew;
+            var chat = GetOrCreatePersonChat(jid, out isNew);
+            if (isNew) {
+                Session.AddChat(chat);
+                Session.SyncChat(chat);
+            }
+            return chat;
         }
 
-        void OnDisconnect(object sender)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        PersonChatModel GetOrCreatePersonChat(Jid jid, out bool isNew)
+        {
+            var chat = (PersonChatModel) Session.GetChat(jid, ChatType.Person, this);
+            isNew = false;
+            if (chat != null) return chat;
+            var person = GetOrCreateContact(jid.Bare, jid);
+            PersonModel pers;
+            if (!String.IsNullOrEmpty(jid.Resource)) {
+                pers = new PersonModel(jid, person.IdentityName, NetworkID, Protocol, this);
+            } else {
+                pers = person.ToPersonModel();
+            }
+            isNew = true;
+            chat = Session.CreatePersonChat(pers, this);
+            if (jid == JabberClient.MyJID || jid == JabberClient.MyJID.Bare) {
+                var builder = CreateMessageBuilder();
+                builder.AppendEventPrefix();
+                builder.AppendText("Note: you are now talking to yourself");
+                Session.AddMessageToChat(chat, builder.ToMessage());
+            }
+            return chat;
+        }
+
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnClose(object sender)
         {
             Trace.Call(sender);
+            if (ContactChat != null) {
+                Session.DisableChat(ContactChat);
+            }
 
             IsConnected = false;
             OnDisconnected(EventArgs.Empty);
+
+            JabberClient.SocketConnectionType = SocketConnectionType.Direct;
+
+            if (AutoReconnect) {
+                var builder = CreateMessageBuilder();
+                builder.AppendEventPrefix();
+                builder.AppendText(_("Reconnecting to {0} in {1} seconds..."),
+                                   JabberClient.Server, AutoReconnectDelay);
+                Session.AddMessageToChat(Chat, builder.ToMessage());
+
+                ThreadPool.QueueUserWorkItem(delegate {
+                    // sleep for N seconds, we don't want to be abusive
+                    Thread.Sleep(AutoReconnectDelay * 1000);
+                    Connect();
+                });
+            }
         }
 
         void OnError(object sender, Exception ex)
@@ -1116,7 +2143,8 @@ namespace Smuxi.Engine
             Session.AddMessageToChat(NetworkChat, builder.ToMessage());
         }
 
-        void OnAuthenticate(object sender)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void OnLogin(object sender)
         {
             Trace.Call(sender);
 
@@ -1126,64 +2154,56 @@ namespace Smuxi.Engine
             builder.AppendEventPrefix();
             builder.AppendText(_("Authenticated"));
             Session.AddMessageToChat(Chat, builder.ToMessage());
-
-            // send initial presence
-            SetPresenceStatus(PresenceStatus.Online, null);
+            if (JabberClient.ServerCapabilities != null) {
+                RequestCapabilities(JabberClient.MyJID.Server, JabberClient.ServerCapabilities.Version);
+            }
 
             OnConnected(EventArgs.Empty);
         }
 
-        private void ApplyConfig(UserConfig config, XmppServerModel server)
+        [MethodImpl(MethodImplOptions.Synchronized)]
+        void ApplyConfig(UserConfig config, XmppServerModel server)
         {
+            Nicknames = (string[]) config["Connection/Nicknames"];
+
             if (server.Username.Contains("@")) {
                 var jid_user = server.Username.Split('@')[0];
                 var jid_host = server.Username.Split('@')[1];
-                JabberClient.NetworkHost = server.Hostname;
-                JabberClient.User = jid_user;
+                JabberClient.ConnectServer = server.Hostname;
+                JabberClient.AutoResolveConnectServer = false;
+                JabberClient.Username = jid_user;
                 JabberClient.Server = jid_host;
             } else {
                 JabberClient.Server = server.Hostname;
-                JabberClient.User = server.Username;
+                JabberClient.Username = server.Username;
             }
             JabberClient.Port = server.Port;
             JabberClient.Password = server.Password;
 
-            Me = CreatePerson(
-                String.Format("{0}@{1}",
-                    JabberClient.User,
-                    JabberClient.Server
-                ),
-                JabberClient.User
-            );
-            Me.IdentityNameColored.ForegroundColor = new TextColor(0, 0, 255);
-            Me.IdentityNameColored.BackgroundColor = TextColor.None;
-            Me.IdentityNameColored.Bold = true;
-
-            // XMPP specific settings
-            JabberClient.Resource = server.Resource;
-
-            JabberClient.OnInvalidCertificate -= ValidateCertificate;
-
-            JabberClient.AutoStartTLS = server.UseEncryption;
-            if (!server.ValidateServerCertificate) {
-                JabberClient.OnInvalidCertificate += ValidateCertificate;
-            }
-
             var proxySettings = new ProxySettings();
-            proxySettings.ApplyConfig(Session.UserConfig);
-            var protocol = server.UseEncryption ? "xmpps" : "xmpp";
+            proxySettings.ApplyConfig(config);
+            var protocol = Server.UseEncryption ? "xmpps" : "xmpp";
             var serverUri = String.Format("{0}://{1}:{2}", protocol,
-                                          server.Hostname, server.Port);
+                                          Server.Hostname, Server.Port);
             var proxy = proxySettings.GetWebProxy(serverUri);
+            var socket = JabberClient.ClientSocket as ClientSocket;
             if (proxy == null) {
-                JabberClient.Proxy = XmppProxyType.None;
+                socket.Proxy = null;
             } else {
+                var builder = CreateMessageBuilder();
+                builder.AppendEventPrefix();
+                builder.AppendText(_("Using proxy: {0}:{1}"),
+                                   proxy.Address.Host,
+                                   proxy.Address.Port);
+                Session.AddMessageToChat(Chat, builder.ToMessage());
+
                 var proxyScheme = proxy.Address.Scheme;
-                var xmppProxyType = XmppProxyType.None;
+                var proxyType = Starksoft.Net.Proxy.ProxyType.None;
                 try {
-                    // HACK: map proxy scheme to SmartIrc4net's ProxyType
-                    xmppProxyType = (XmppProxyType) Enum.Parse(
-                        typeof(XmppProxyType), proxyScheme, true
+                    proxyType = (Starksoft.Net.Proxy.ProxyType) Enum.Parse(
+                        typeof(Starksoft.Net.Proxy.ProxyType),
+                        proxy.Address.Scheme,
+                        true
                     );
                 } catch (ArgumentException ex) {
 #if LOG4NET
@@ -1191,15 +2211,48 @@ namespace Smuxi.Engine
                                   proxyScheme, ex);
 #endif
                 }
-                JabberClient.Proxy = xmppProxyType;
-                JabberClient.ProxyHost = proxy.Address.Host;
-                JabberClient.ProxyPort = proxy.Address.Port;
-                JabberClient.ProxyUsername = proxySettings.ProxyUsername;
-                JabberClient.ProxyPassword = proxySettings.ProxyPassword;
+
+                var proxyFactory = new ProxyClientFactory();
+                if (String.IsNullOrEmpty(proxySettings.ProxyUsername) &&
+                    String.IsNullOrEmpty(proxySettings.ProxyPassword)) {
+                    socket.Proxy = proxyFactory.CreateProxyClient(
+                        proxyType,
+                        proxy.Address.Host,
+                        proxy.Address.Port
+                    );
+                } else {
+                    socket.Proxy = proxyFactory.CreateProxyClient(
+                        proxyType,
+                        proxy.Address.Host,
+                        proxy.Address.Port,
+                        proxySettings.ProxyUsername,
+                        proxySettings.ProxyPassword
+                    );
+                }
+            }
+
+            Me = new PersonModel(
+                String.Format("{0}@{1}",
+                    JabberClient.Username,
+                    JabberClient.Server
+                ),
+                JabberClient.Username,
+                NetworkID, Protocol, this
+            );
+            Me.IdentityNameColored.ForegroundColor = new TextColor(0, 0, 255);
+            Me.IdentityNameColored.BackgroundColor = TextColor.None;
+            Me.IdentityNameColored.Bold = true;
+
+            // XMPP specific settings
+            JabberClient.Resource = server.Resource;
+            
+            JabberClient.UseStartTLS = server.UseEncryption;
+            if (!server.ValidateServerCertificate) {
+                JabberClient.ClientSocket.OnValidateCertificate += ValidateCertificate;
             }
         }
 
-        private static bool ValidateCertificate(object sender,
+        static bool ValidateCertificate(object sender,
                                          X509Certificate certificate,
                                          X509Chain chain,
                                          SslPolicyErrors sslPolicyErrors)
@@ -1207,27 +2260,7 @@ namespace Smuxi.Engine
             return true;
         }
 
-        PersonModel CreatePerson(JID jid)
-        {
-            if (jid == null) {
-                throw new ArgumentNullException("jid");
-            }
-            var contact = RosterManager[jid.Bare];
-            string nickname = null;
-            if (contact == null || String.IsNullOrEmpty(contact.Nickname)) {
-                nickname = jid.Bare;
-            } else {
-                nickname = contact.Nickname;
-            }
-            return CreatePerson(jid.Bare, nickname);
-        }
-
-        PersonModel CreatePerson(string jid, string nickname)
-        {
-            return new PersonModel(jid, nickname, NetworkID, Protocol, this);
-        }
-
-        private static string _(string msg)
+        static string _(string msg)
         {
             return Mono.Unix.Catalog.GetString(msg);
         }
diff --git a/src/Engine/AssemblyInfo.cs b/src/Engine/AssemblyInfo.cs
index 0d8c490..86092c4 100644
--- a/src/Engine/AssemblyInfo.cs
+++ b/src/Engine/AssemblyInfo.cs
@@ -26,7 +26,7 @@ using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 [assembly: AssemblyTitle("Smuxi - engine")]
-[assembly: AssemblyCopyright("2005-2012 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Engine/CertificateValidator.cs b/src/Engine/CertificateValidator.cs
new file mode 100644
index 0000000..4ee90e3
--- /dev/null
+++ b/src/Engine/CertificateValidator.cs
@@ -0,0 +1,114 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2013 Mirco Bauer <meebey at meebey.net>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+using System;
+using System.Net;
+using System.Net.Security;
+using System.Security.Cryptography.X509Certificates;
+using System.Collections.Generic;
+using Smuxi.Common;
+
+namespace Smuxi.Engine
+{
+    public class CertificateValidator
+    {
+#if LOG4NET
+        static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+#endif
+        public List<string> HostnameWhitelist { get; private set; }
+        public List<string> HashWhitelist { get; private set; }
+
+        public CertificateValidator()
+        {
+            HostnameWhitelist = new List<string>();
+            HashWhitelist = new List<string>();
+
+#if LOG4NET
+            if (ServicePointManager.ServerCertificateValidationCallback != null) {
+                Logger.Warn(
+                    "CertificateValidator.ctor(): overwriting existing " +
+                    "ServicePointManager.ServerCertificateValidationCallback"
+                );
+            }
+#endif
+            ServicePointManager.ServerCertificateValidationCallback = ValidateCertificate;
+        }
+
+        bool ValidateCertificate(object sender,
+                                 X509Certificate certificate,
+                                 X509Chain chain,
+                                 SslPolicyErrors sslPolicyErrors)
+        {
+            Trace.Call(sender, "(X509Certificate)", chain, sslPolicyErrors);
+
+            if (sslPolicyErrors == SslPolicyErrors.None) {
+                return true;
+            }
+
+            var hash = certificate.GetCertHashString();
+            string hostname = null;
+            if (sender is HttpWebRequest) {
+                var request = (HttpWebRequest) sender;
+                hostname = request.RequestUri.Host;
+            }
+            var certInfo =  String.Format(
+                "\n Subject: '{0}'" +
+                "\n Issuer: '{1}'" +
+                "\n Hash: '{2}'" +
+                "\n Hostname: '{3}'",
+                certificate.Subject, certificate.Issuer, hash, hostname
+            );
+
+            lock (HashWhitelist) {
+                if (HashWhitelist.Contains(hash)) {
+#if LOG4NET
+                    Logger.DebugFormat(
+                        "ValidateCertificate(): Validated certificate " +
+                        "via hash whitelist: {0}", certInfo
+                    );
+#endif
+                    return true;
+                }
+            }
+
+            if (hostname != null) {
+                lock (HostnameWhitelist) {
+                    if (HostnameWhitelist.Contains(hostname)) {
+#if LOG4NET
+                        Logger.DebugFormat(
+                            "ValidateCertificate(): Validated certificate " +
+                            "via hostname whitelist: {0}", certInfo
+                        );
+#endif
+                        return true;
+                    }
+                }
+            }
+
+#if LOG4NET
+            Logger.ErrorFormat(
+                "ValidateCertificate(): Validation failed: {0}" +
+                "\n SslPolicyErrors: {1}",
+                certInfo, sslPolicyErrors
+            );
+#endif
+            return false;
+        }
+    }
+}
diff --git a/src/Engine/Chats/ChatModel.cs b/src/Engine/Chats/ChatModel.cs
index 5b273e0..1f25774 100644
--- a/src/Engine/Chats/ChatModel.cs
+++ b/src/Engine/Chats/ChatModel.cs
@@ -175,6 +175,8 @@ namespace Smuxi.Engine
 
         public void ApplyConfig(UserConfig config)
         {
+            Trace.Call(config);
+
             if (config == null) {
                 throw new ArgumentNullException("config");
             }
diff --git a/src/Engine/Config/Config.cs b/src/Engine/Config/Config.cs
index fa096d0..b02f6dd 100644
--- a/src/Engine/Config/Config.cs
+++ b/src/Engine/Config/Config.cs
@@ -292,7 +292,8 @@ namespace Smuxi.Engine
             Get(prefix+"BeepOnHighlight", false);
             
             prefix = "Engine/Users/DEFAULT/Connection/";
-            Get(prefix+"Encoding", "UTF-8");
+            Get(prefix+"Encoding", "ISO-8859-1");
+            Get(prefix+"AutoConvertUTF8", true);
             Get(prefix+"ProxyType", "System");
             Get(prefix+"ProxyHostname", String.Empty);
             Get(prefix+"ProxyPort", -1);
@@ -450,6 +451,18 @@ namespace Smuxi.Engine
                 LoadUserEntry(user, "Connection/Realname", realname);
                 LoadUserEntry(user, "Connection/Encoding", String.Empty);
 
+                if (Get(prefix+user+"/Connection/AutoConvertUTF8", null) == null) {
+                    // upgrade path
+                    var enc = Get<string>(prefix+user+"/Connection/Encoding", String.Empty);
+                    if (((enc == String.Empty) &&
+                         (System.Text.Encoding.Default.WebName.ToUpper() == "UTF-8")) ||
+                        (enc.ToUpper() == "UTF-8")) {
+                        this[prefix+user+"/Connection/Encoding"] = "ISO-8859-1";
+                        this[prefix+user+"/Connection/AutoConvertUTF8"] = true;
+                    }
+                }
+                LoadUserEntry(user, "Connection/AutoConvertUTF8", true);
+
                 LoadUserEntry(user, "Connection/ProxyType", "System");
                 LoadUserEntry(user, "Connection/ProxyHostname", String.Empty);
                 LoadUserEntry(user, "Connection/ProxyPort", -1);
@@ -530,6 +543,8 @@ namespace Smuxi.Engine
                                       Get(dprefix + server + "/Network", null));
                             LoadEntry(sprefix + server + "/Encoding",
                                       Get(dprefix + server + "/Encoding", null));
+                            LoadEntry(sprefix + server + "/AutoConvertUTF8",
+                                      Get(dprefix + server + "/AutoConvertUTF8", null));
                             LoadEntry(sprefix + server + "/Username",
                                       Get(dprefix + server + "/Username", null));
                             LoadEntry(sprefix + server + "/Password",
@@ -555,6 +570,7 @@ namespace Smuxi.Engine
                     LoadEntry(sprefix+"Port", null);
                     LoadEntry(sprefix+"Network", String.Empty);
                     LoadEntry(sprefix+"Encoding", null);
+                    LoadEntry(sprefix+"AutoConvertUTF8", null);
                     LoadEntry(sprefix+"Username", String.Empty);
                     LoadEntry(sprefix+"Password", String.Empty);
                     LoadEntry(sprefix+"UseEncryption", false);
diff --git a/src/Engine/Config/FrontendConfig.cs b/src/Engine/Config/FrontendConfig.cs
index 03eb53a..9d320a1 100644
--- a/src/Engine/Config/FrontendConfig.cs
+++ b/src/Engine/Config/FrontendConfig.cs
@@ -45,6 +45,10 @@ namespace Smuxi.Engine
         public new object this[string key]
         {
             get {
+                var value = base["Engine/" + key];
+                if (value != null) {
+                    return value;
+                }
                 return base[_Prefix+key];
             }
             set {
@@ -81,8 +85,8 @@ namespace Smuxi.Engine
             // setting required default values
             prefix = "Frontend/";
             LoadEntry(prefix+"UseLowBandwidthMode", false);
-            LoadEntry(prefix+"ShowQuickJoin", true);
             LoadEntry(prefix+"ShowMenuBar", true);
+            LoadEntry(prefix+"ShowToolBar", true);
             LoadEntry(prefix+"ShowStatusBar", true);
 
             prefix = "Frontend/Engines/";
@@ -114,6 +118,7 @@ namespace Smuxi.Engine
             }
             
             LoadAllEntries("Frontend/"+_UIName);
+            LoadAllEntries("Engine");
         }
         
         public new void Remove(string key)
diff --git a/src/Engine/Config/ProxySettings.cs b/src/Engine/Config/ProxySettings.cs
index 05be4aa..f5f2a5f 100644
--- a/src/Engine/Config/ProxySettings.cs
+++ b/src/Engine/Config/ProxySettings.cs
@@ -38,6 +38,14 @@ namespace Smuxi.Engine
         public IWebProxy SystemWebProxy { get; set; }
         public WebProxy DefaultWebProxy { get; set; }
 
+        static ProxySettings()
+        {
+            try {
+                WorkaroundNoProxyMonoBug();
+            } catch {
+            }
+        }
+
         public ProxySettings()
         {
             ProxyType = ProxyType.None;
@@ -119,9 +127,9 @@ namespace Smuxi.Engine
                     SystemWebProxy = null;
                     break;
                 case ProxyType.System:
-                    var proxy = WebRequest.GetSystemWebProxy();
                     // TODO: add GNOME (gconf) support
                     var no_proxy = Environment.GetEnvironmentVariable("no_proxy");
+                    var proxy = WebRequest.GetSystemWebProxy();
                     if (!String.IsNullOrEmpty(no_proxy) && proxy is WebProxy) {
                         var webProxy = (WebProxy) proxy;
                         // BypassArrayList expects regexes while no_proxy
@@ -162,5 +170,31 @@ namespace Smuxi.Engine
                     break;
             }
         }
+
+        static void WorkaroundNoProxyMonoBug()
+        {
+            // HACK: workaround bug in Mono 2.10.8 throwing
+            // ArgumentOutOfRangeException because it always tries to remove
+            // *.local from the no_proxy envrionment variable, see:
+            // https://www.smuxi.org/issues/show/873
+            var no_proxy = Environment.GetEnvironmentVariable("no_proxy");
+            if (no_proxy == null) {
+                // nothing to workaround
+                return;
+            }
+
+            try {
+                WebRequest.GetSystemWebProxy();
+            } catch (ArgumentOutOfRangeException) {
+#if LOG4NET
+                f_Logger.Debug("WorkaroundNoProxyMonoBug(): enabling no_proxy workaround...");
+#endif
+                if (!no_proxy.Contains("*.local")) {
+                    var no_proxy_with_local = no_proxy + ",*.local";
+                    Environment.SetEnvironmentVariable("no_proxy",
+                                                       no_proxy_with_local);
+                }
+            }
+        }
     }
 }
diff --git a/src/Engine/Config/UserConfig.cs b/src/Engine/Config/UserConfig.cs
index f76a6d9..846b3dc 100644
--- a/src/Engine/Config/UserConfig.cs
+++ b/src/Engine/Config/UserConfig.cs
@@ -36,8 +36,10 @@ namespace Smuxi.Engine
         private Config    _Config;
         private string    _UserPrefix;
         private string    _DefaultPrefix = "Engine/Users/DEFAULT/";
-        private Hashtable _Cache; 
-        
+        private Hashtable _Cache;
+
+        public FrontendConfig FrontendConfig { get; set; }
+
         public event EventHandler<ConfigChangedEventArgs> Changed;
 
         public bool IsCaching
@@ -57,13 +59,21 @@ namespace Smuxi.Engine
         public object this[string key]
         {
             get {
+                object obj = null;
+                // allow engine config to be overriden by frontend config
+                if (FrontendConfig != null) {
+                    obj = FrontendConfig[key];
+                    if (obj != null) {
+                        return obj;
+                    }
+                }
+
                 if (IsCaching) {
                     if (_Cache.Contains(key)) {
                         return _Cache[key];
                     }
                 }
                 
-                object obj;
                 obj = _Config[_UserPrefix + key];
                 if (obj != null) {
                     if (IsCaching) {
@@ -85,6 +95,11 @@ namespace Smuxi.Engine
                 return obj;
             }
             set {
+                // ignore writing back overridden config keys
+                if (FrontendConfig != null && FrontendConfig[key] != null) {
+                    return;
+                }
+
                 // TODO: make remoting calls after a timeout and batch the update
                 _Config[_UserPrefix + key] = value;
                 
diff --git a/src/Engine/Makefile.am b/src/Engine/Makefile.am
index 23b9684..20a953a 100644
--- a/src/Engine/Makefile.am
+++ b/src/Engine/Makefile.am
@@ -49,6 +49,7 @@ all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG)
 FILES = \
 	$(top_srcdir)/src/AssemblyVersion.cs \
 	AssemblyInfo.cs \
+	CertificateValidator.cs \
 	CommandModel.cs \
 	Engine.cs \
 	FrontendManager.cs \
@@ -59,6 +60,7 @@ FILES = \
 	SessionManager.cs \
 	TextColor.cs \
 	TextColorContrast.cs \
+	TextColorPalettes.cs \
 	TextColorTools.cs \
 	UICommand.cs \
 	UICommandContainer.cs \
diff --git a/src/Engine/Makefile.in b/src/Engine/Makefile.in
index 5621ca1..34df3a3 100644
--- a/src/Engine/Makefile.in
+++ b/src/Engine/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-engine.pc.in $(top_srcdir)/Makefile.include \
-	ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-engine.pc.in ChangeLog
 @BUNDLE_NINI_TRUE at am__append_1 = $(NINI_DLL)
 @BUNDLE_DB4O_TRUE at am__append_2 = $(DB4O_INCLUDED_LIBS)
 subdir = src/Engine
@@ -103,6 +129,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -112,6 +150,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -157,6 +196,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -261,7 +301,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -369,6 +408,7 @@ LINUX_PKGCONFIG = \
 FILES = \
 	$(top_srcdir)/src/AssemblyVersion.cs \
 	AssemblyInfo.cs \
+	CertificateValidator.cs \
 	CommandModel.cs \
 	Engine.cs \
 	FrontendManager.cs \
@@ -379,6 +419,7 @@ FILES = \
 	SessionManager.cs \
 	TextColor.cs \
 	TextColorContrast.cs \
+	TextColorPalettes.cs \
 	TextColorTools.cs \
 	UICommand.cs \
 	UICommandContainer.cs \
@@ -693,11 +734,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -843,19 +884,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Engine/Messages/MessageBuilder.cs b/src/Engine/Messages/MessageBuilder.cs
index 34d20da..6653edc 100644
--- a/src/Engine/Messages/MessageBuilder.cs
+++ b/src/Engine/Messages/MessageBuilder.cs
@@ -20,6 +20,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
 using System;
+using System.Text;
 using System.Text.RegularExpressions;
 using System.Collections.Generic;
 using System.IO;
@@ -106,6 +107,30 @@ namespace Smuxi.Engine
             return this;
         }
 
+        public virtual MessageBuilder Append(IEnumerable<MessagePartModel> msgParts)
+        {
+            if (msgParts == null) {
+                throw new ArgumentNullException("msgParts");
+            }
+
+            foreach (var part in msgParts) {
+                Append(part);
+            }
+            return this;
+        }
+
+        public virtual MessageBuilder Append(MessageModel msg)
+        {
+            if (msg == null) {
+                throw new ArgumentNullException("msg");
+            }
+
+            foreach (var part in msg.MessageParts) {
+                Append(part);
+            }
+            return this;
+        }
+
         public virtual TextMessagePartModel CreateText(TextMessagePartModel text)
         {
             if (text == null) {
@@ -259,7 +284,7 @@ namespace Smuxi.Engine
         }
 
         public virtual MessageBuilder AppendWarningText(string errorText,
-                                                        params string[] args)
+                                                        params object[] args)
         {
             var text = CreateText(errorText, args);
             text.Bold = true;
@@ -267,7 +292,7 @@ namespace Smuxi.Engine
         }
 
         public virtual MessageBuilder AppendErrorText(string errorText,
-                                                      params string[] args)
+                                                      params object[] args)
         {
             var text = CreateText(errorText, args);
             text.ForegroundColor = new TextColor(255, 0, 0);
@@ -460,6 +485,11 @@ namespace Smuxi.Engine
                 return;
             }
 
+            MarkAsHighlight();
+        }
+
+        public virtual void MarkAsHighlight()
+        {
             // colorize the whole message
             foreach (MessagePartModel msgPart in Message.MessageParts) {
                 if (!(msgPart is TextMessagePartModel)) {
@@ -479,7 +509,6 @@ namespace Smuxi.Engine
                 textMsg.IsHighlight = true;
                 textMsg.ForegroundColor = HighlightColor;
             }
-            return;
         }
 
         public virtual void ClearHighlights()
@@ -617,5 +646,122 @@ namespace Smuxi.Engine
             ParseHtml(doc, new TextMessagePartModel());
             return this;
         }
+
+        public virtual IList<MessagePartModel> CreateFormat(string format, params object[] objs)
+        {
+            if (format == null) {
+                throw new ArgumentNullException("format");
+            }
+            if (objs == null) {
+                throw new ArgumentNullException("objs");
+            }
+
+            var parts = new List<MessagePartModel>();
+            var assembling = new StringBuilder(format.Length);
+            var inPlaceholder = false;
+
+            for (int i = 0; i < format.Length; ++i) {
+                char c = format[i];
+                char peek = (i < format.Length-1) ? format[i+1] : '\0';
+
+                if (c == '{') {
+                    if (peek == '{') {
+                        // escaped brace
+                        assembling.Append('{');
+
+                        // skip the second brace too
+                        ++i;
+                    } else if (!inPlaceholder) {
+                        // we're parsing a placeholder here
+
+                        // first, append the currently assembled string
+                        parts.Add(CreateText(assembling.ToString()));
+
+                        // we will now assemble the placeholder text
+                        assembling.Length = 0;
+                        inPlaceholder = true;
+                    } else {
+                        // nested formatting?!
+                        throw new System.FormatException("nested formatting is forbidden");
+                    }
+                } else if (c == '}') {
+                    if (peek == '}') {
+                        // escaped brace
+                        assembling.Append('}');
+
+                        // skip the second brace too
+                        ++i;
+                    } else if (inPlaceholder) {
+                        // substitute the placeholder
+
+                        var placeholderText = assembling.ToString();
+                        uint placeholderInt;
+
+                        if (!uint.TryParse(placeholderText, out placeholderInt)) {
+                            // that's not even an integer...
+                            throw new System.FormatException("format placeholder must be an integer >= 0 in braces");
+                        }
+                        if (placeholderInt >= objs.Length) {
+                            // placeholder out of bounds
+                            throw new System.FormatException("format placeholder number is greater than the array");
+                        }
+
+                        var placeMe = objs[placeholderInt];
+                        if (placeMe == null) {
+                            throw new System.FormatException("null object in objs array");
+                        } else if (placeMe is String) {
+                            // append strings as-is
+                            parts.Add(CreateText((String) placeMe));
+                        } else if (placeMe is ContactModel) {
+                            // append contacts as their identity names
+                            parts.Add(CreateIdendityName((ContactModel) placeMe));
+                        } else if (placeMe is MessagePartModel) {
+                            // append the part verbatim
+                            parts.Add((MessagePartModel) placeMe);
+                        } else if (placeMe is MessageModel) {
+                            // append all parts of the message
+                            foreach (var part in ((MessageModel) placeMe).MessageParts) {
+                                parts.Add(part);
+                            }
+                        } else {
+                            // no idea how to format this
+                            throw new System.FormatException("unknown object type to format: " + placeMe.GetType().ToString());
+                        }
+
+                        // we are done with this placeholder
+                        assembling.Length = 0;
+                        inPlaceholder = false;
+                    } else {
+                        // closing brace without opening brace
+                        throw new System.FormatException("format placeholder closing brace without corresponding opening brace");
+                    }
+                } else {
+                    // simply append
+                    assembling.Append(c);
+                }
+            }
+
+            // done parsing
+
+            if (inPlaceholder) {
+                // unterminated brace
+                throw new System.FormatException("format placeholder opening brace without corresponding closing brace");
+            }
+
+            if (assembling.Length > 0) {
+                // bit of text at the end
+                parts.Add(CreateText(assembling.ToString()));
+            }
+
+            return parts;
+        }
+
+        public virtual MessageBuilder AppendFormat(string format, params object[] objs)
+        {
+            foreach (var part in CreateFormat(format, objs)) {
+                Append(part);
+            }
+            return this;
+        }
     }
 }
diff --git a/src/Engine/Persons/ContactModel.cs b/src/Engine/Persons/ContactModel.cs
index 44cf136..ac23122 100644
--- a/src/Engine/Persons/ContactModel.cs
+++ b/src/Engine/Persons/ContactModel.cs
@@ -1,7 +1,7 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2005-2007, 2010-2011 Mirco Bauer <meebey at meebey.net>
+ * Copyright (c) 2005-2007, 2010-2011, 2013 Mirco Bauer <meebey at meebey.net>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -24,19 +24,21 @@ using System;
 using System.Text;
 using System.Runtime.Serialization;
 using System.Security.Cryptography;
+using System.Threading;
 using System.Globalization;
 using Smuxi.Common;
 
 namespace Smuxi.Engine
 {
     [Serializable]
-    public class ContactModel : ITraceable, ISerializable, IComparable<ContactModel>
+    public class ContactModel : ITraceable, ISerializable, IComparable<ContactModel>, IComparable
     {
         private string          _ID;
         private string          _IdentityName;
         private string          _NetworkID;
         private string          _NetworkProtocol;
         private TextMessagePartModel _IdentityNameColored;
+        object IdentityNameSyncRoot { get; set; }
 
         public string ID {
             get {
@@ -44,20 +46,32 @@ namespace Smuxi.Engine
             }
         }
         
+        /// <remarks>
+        /// This property is thread safe.
+        /// </remarks>
         public string IdentityName {
             get {
                 return _IdentityName;
             }
             set {
-                _IdentityName = value;
+                lock (IdentityNameSyncRoot) {
+                    _IdentityName = value;
+                    _IdentityNameColored = null;
+                }
             }
         }
 
+        /// <remarks>
+        /// This property is thread safe.
+        /// </remarks>
         public TextMessagePartModel IdentityNameColored {
             get {
                 if (_IdentityNameColored == null) {
-                    _IdentityNameColored = GetColoredIdentityName(_IdentityName,
-                                                                  null);
+                    lock (IdentityNameSyncRoot) {
+                        _IdentityNameColored = GetColoredIdentityName(
+                            _IdentityName, null
+                        );
+                    }
                 }
                 return _IdentityNameColored;
             }
@@ -100,6 +114,7 @@ namespace Smuxi.Engine
             _IdentityName = identityName;
             _NetworkID = networkID;
             _NetworkProtocol = networkProtocol;
+            IdentityNameSyncRoot = new Object();
         }
         
         protected ContactModel(SerializationInfo info, StreamingContext ctx)
@@ -108,6 +123,8 @@ namespace Smuxi.Engine
                 throw new ArgumentNullException("info");
             }
 
+            IdentityNameSyncRoot = new Object();
+
             SerializationReader sr = SerializationReader.GetReader(info);
             SetObjectData(sr);
         }
@@ -197,6 +214,11 @@ namespace Smuxi.Engine
 
         }
 
+        int IComparable.CompareTo(object contact)
+        {
+            return CompareTo(contact as ContactModel);
+        }
+
         public override bool Equals(object obj)
         {
             var value = obj as ContactModel;
diff --git a/src/Engine/Session.cs b/src/Engine/Session.cs
index e23ca74..ec94881 100644
--- a/src/Engine/Session.cs
+++ b/src/Engine/Session.cs
@@ -40,6 +40,7 @@ namespace Smuxi.Engine
         private static readonly log4net.ILog f_Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 #endif
         private static readonly string                _LibraryTextDomain = "smuxi-engine";
+        public static CertificateValidator CertificateValidator { get; private set; }
         private int                                   _Version = 0;
         private IDictionary<string, FrontendManager>  _FrontendManagers;
         private IList<IProtocolManager>               _ProtocolManagers;
@@ -105,7 +106,13 @@ namespace Smuxi.Engine
                 return _Username == "local";
             }
         }
-        
+
+
+        static Session()
+        {
+            CertificateValidator = new CertificateValidator();
+        }
+
         public Session(Config config, ProtocolManagerFactory protocolManagerFactory,
                        string username)
         {
@@ -195,31 +202,44 @@ namespace Smuxi.Engine
                         continue;
                     }
 
-                    bool isError = false;
-                    try {
-                        IProtocolManager protocolManager = Connect(server, fm);
+                    var msg = String.Format(
+                        _("Automatically connecting to {0}..."),
+                        String.Format("{0}/{1} ({2}:{3})", server.Protocol,
+                                      server.Network, server.Hostname, server.Port)
+                    );
+#if LOG4NET
+                    f_Logger.Info(msg);
+#endif
+                    fm.SetStatus(msg);
 
-                        // if the connect command was correct, we should be
-                        // able to get the chat model
-                        if (protocolManager.Chat == null) {
-                            isError = true;
-                        }
-                    } catch (Exception ex) {
+                    var srv = server;
+                    // run connects in background threads as they block
+                    ThreadPool.QueueUserWorkItem(delegate {
+                        bool isError = false;
+                        try {
+                            IProtocolManager protocolManager = Connect(srv, fm);
+
+                            // if the connect command was correct, we should be
+                            // able to get the chat model
+                            if (protocolManager.Chat == null) {
+                                isError = true;
+                            }
+                        } catch (Exception ex) {
 #if LOG4NET
-                        f_Logger.Error("RegisterFrontendUI(): Exception during "+
-                                       "automatic connect: ", ex);
+                            f_Logger.Error("RegisterFrontendUI(): Exception during "+
+                                           "automatic connect: ", ex);
 #endif
-                        isError = true;
-                    }
-                    if (isError) {
-                        var builder = CreateMessageBuilder();
-                        builder.AppendErrorText(
-                            _("Automatic connect to {0} failed!"),
-                            server.Hostname + ":" + server.Port
-                        );
-                        fm.AddMessageToChat(_SessionChat, builder.ToMessage());
-                        continue;
-                    }
+                            isError = true;
+                        }
+                        if (isError) {
+                            var builder = CreateMessageBuilder();
+                            builder.AppendErrorText(
+                                _("Automatic connect to {0} failed!"),
+                                srv.Hostname + ":" + srv.Port
+                            );
+                            fm.AddMessageToChat(_SessionChat, builder.ToMessage());
+                        }
+                    });
                 }
             }
         }
@@ -389,6 +409,10 @@ namespace Smuxi.Engine
                         CommandShutdown(cd);
                         handled = true;
                         break;
+                    case "echo":
+                        CommandEcho(cd);
+                        handled = true;
+                        break;
                 }
             } else {
                 // normal text
@@ -416,7 +440,6 @@ namespace Smuxi.Engine
             cd.FrontendManager.AddMessageToChat(cd.Chat, builder.ToMessage());
 
             string[] help = {
-                "help",
                 "connect/server protocol [protocol-parameters]",
                 "connect/server network",
                 "disconnect [server]",
@@ -718,8 +741,19 @@ namespace Smuxi.Engine
 #endif
             lock (_ProtocolManagers) {
                 foreach (var protocolManager in _ProtocolManagers) {
-                    protocolManager.Disconnect(cmd.FrontendManager);
-                    protocolManager.Dispose();
+                    try {
+                        protocolManager.Disconnect(cmd.FrontendManager);
+                        protocolManager.Dispose();
+                    } catch (Exception ex) {
+#if LOG4NET
+                        f_Logger.ErrorFormat(
+                            "CommandShutdown(): {0}.Disconnect/Dispose() " +
+                            "failed, continuing with shutdown...",
+                            protocolManager.ToString()
+                        );
+                        f_Logger.Error("CommandShutdown(): Exception", ex);
+#endif
+                    }
                 }
             }
 
@@ -734,6 +768,25 @@ namespace Smuxi.Engine
             Environment.Exit(0);
         }
 
+        public void CommandEcho(CommandModel cmd)
+        {
+            Trace.Call(cmd);
+
+            if (cmd == null) {
+                throw new ArgumentNullException("cmd");
+            }
+
+            var msg = new MessageBuilder().
+                AppendEventPrefix().
+                    AppendText(cmd.Parameter).
+                    ToMessage();
+            if (cmd.FrontendManager == null) {
+                AddMessageToChat(cmd.Chat, msg, true);
+            } else {
+                cmd.FrontendManager.AddMessageToChat(cmd.Chat, msg);
+            }
+        }
+
         public void CommandNetwork(CommandModel cd)
         {
             Trace.Call(cd);
@@ -1487,6 +1540,13 @@ namespace Smuxi.Engine
                 // TODO: use a timeout here to only refresh once in 1 second
                 _Filters = _FilterListController.GetFilterList().Values;
             }
+            if (e.Key == "Interface/Notebook/EngineBufferLines") {
+                lock (_Chats) {
+                    foreach (var chat in _Chats) {
+                        chat.ApplyConfig(UserConfig);
+                    }
+                }
+            }
        }
 
         public void CheckPresenceStatus()
@@ -1623,10 +1683,11 @@ namespace Smuxi.Engine
             Trace.Call();
 
             try {
-                var url = "http://news.smuxi.org/feed.php";
-                var req = WebRequest.Create(url);
                 var proxySettings = new ProxySettings();
                 proxySettings.ApplyConfig(UserConfig);
+
+                var url = "http://news.smuxi.org/feed.php";
+                var req = WebRequest.Create(url);
                 req.Proxy = proxySettings.GetWebProxy(url);
                 if (req is HttpWebRequest) {
                     var httpReq = (HttpWebRequest) req;
diff --git a/src/Engine/TextColorPalettes.cs b/src/Engine/TextColorPalettes.cs
new file mode 100644
index 0000000..32c6807
--- /dev/null
+++ b/src/Engine/TextColorPalettes.cs
@@ -0,0 +1,61 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2012 Mirco Bauer <meebey at meebey.net>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+
+namespace Smuxi.Engine
+{
+    public static class TextColorPalettes
+    {
+        public static List<TextColor> LinuxConsole { get; set; }
+        public static List<TextColor> Xterm { get; set; }
+
+        static TextColorPalettes() {
+            var hexColors = new string[] {
+                "#000000",
+                "#800000",
+                "#008000",
+                "#808000",
+                "#000080",
+                "#800080",
+                "#008080",
+                "#c0c0c0",
+                "#808080",
+                "#ff0000",
+                "#00ff00",
+                "#ffff00",
+                "#0000ff",
+                "#ff00ff",
+                "#00ffff",
+                "#ffffff"
+            };
+            LinuxConsole = new List<TextColor>(16);
+            foreach (var hexColor in hexColors) {
+                LinuxConsole.Add(TextColor.Parse(hexColor));
+            }
+
+            Xterm = new List<TextColor>(256);
+            Xterm.AddRange(LinuxConsole);
+            // TODO: add all xterm colors
+            // http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
+        }
+    }
+}
diff --git a/src/Engine/TextColorTools.cs b/src/Engine/TextColorTools.cs
index 9d611b9..c3508f8 100644
--- a/src/Engine/TextColorTools.cs
+++ b/src/Engine/TextColorTools.cs
@@ -1,7 +1,7 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2008-2011 Mirco Bauer <meebey at meebey.net>
+ * Copyright (c) 2008-2013 Mirco Bauer <meebey at meebey.net>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -33,10 +33,12 @@ namespace Smuxi.Engine
         private static readonly log4net.ILog f_Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 #endif
         private static Dictionary<int, TextColor> f_BestContrastColors;
+        static Dictionary<object, Dictionary<TextColor, TextColor>> NearestColors { get; set; }
 
         static TextColorTools()
         {
             f_BestContrastColors = new Dictionary<int, TextColor>(1024);
+            NearestColors = new Dictionary<object, Dictionary<TextColor, TextColor>>(16);
         }
 
         public static TextColor GetBestTextColor(TextColor fgColor, TextColor bgColor)
@@ -204,8 +206,18 @@ namespace Smuxi.Engine
                 throw new ArgumentNullException("palette");
             }
 
-            var hslColor1 = ToHSL(color);
             TextColor nearestColor = null;
+            Dictionary<TextColor, TextColor> cache;
+            if (NearestColors.TryGetValue(palette, out cache)) {
+                if (cache.TryGetValue(color, out nearestColor)) {
+                    return nearestColor;
+                }
+            } else {
+                cache = new Dictionary<TextColor, TextColor>(1024);
+                NearestColors.Add(palette, cache);
+            }
+
+            var hslColor1 = ToHSL(color);
             double nearestDifference = Double.MaxValue;
             foreach (var color2 in palette) {
                 // compute the Euclidean distance between the two HSL colors
@@ -233,6 +245,7 @@ namespace Smuxi.Engine
                     break;
                 }
             }
+            cache.Add(color, nearestColor);
             return nearestColor;
         }
 
diff --git a/src/Frontend-Curses/Makefile.in b/src/Frontend-Curses/Makefile.in
index 4d51482..f26e7a7 100644
--- a/src/Frontend-Curses/Makefile.in
+++ b/src/Frontend-Curses/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend-curses.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend-curses.in \
+	ChangeLog
 subdir = src/Frontend-Curses
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +149,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +195,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +300,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -668,11 +708,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -818,19 +858,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend-GNOME-IRC/AssemblyInfo.cs b/src/Frontend-GNOME-IRC/AssemblyInfo.cs
index 5afed5b..c919688 100644
--- a/src/Frontend-GNOME-IRC/AssemblyInfo.cs
+++ b/src/Frontend-GNOME-IRC/AssemblyInfo.cs
@@ -24,7 +24,7 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 
 [assembly: AssemblyTitle("Smuxi - IRC support for GNOME frontend")]
-[assembly: AssemblyCopyright("2005-2011 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Frontend-GNOME-IRC/CtcpMenu.cs b/src/Frontend-GNOME-IRC/CtcpMenu.cs
index 18af5b0..c99c1e8 100644
--- a/src/Frontend-GNOME-IRC/CtcpMenu.cs
+++ b/src/Frontend-GNOME-IRC/CtcpMenu.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 //
-// Copyright (c) 2010 Mirco Bauer <meebey at meebey.net>
+// Copyright (c) 2010, 2013 Mirco Bauer <meebey at meebey.net>
 //
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 //
@@ -19,6 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
 using System;
+using System.Threading;
 using System.Collections.Generic;
 using Smuxi.Common;
 using Smuxi.Engine;
@@ -103,13 +104,20 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             foreach (PersonModel target in Targets) {
-                ProtocolManager.CommandPing(
-                    new CommandModel(
-                        Frontend.FrontendManager,
-                        ChatViewManager.ActiveChat.ChatModel,
-                        target.ID
-                    )
-                );
+                var targetId = target.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandPing(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                targetId
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
             }
         }
 
@@ -118,13 +126,20 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             foreach (PersonModel target in Targets) {
-                ProtocolManager.CommandVersion(
-                    new CommandModel(
-                        Frontend.FrontendManager,
-                        ChatViewManager.ActiveChat.ChatModel,
-                        target.ID
-                    )
-                );
+                var targetId = target.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandVersion(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                targetId
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
             }
         }
 
@@ -133,13 +148,20 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             foreach (PersonModel target in Targets) {
-                ProtocolManager.CommandTime(
-                    new CommandModel(
-                        Frontend.FrontendManager,
-                        ChatViewManager.ActiveChat.ChatModel,
-                        target.ID
-                    )
-                );
+                var targetId = target.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandTime(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                targetId
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
             }
         }
 
@@ -148,13 +170,20 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             foreach (PersonModel target in Targets) {
-                ProtocolManager.CommandFinger(
-                    new CommandModel(
-                        Frontend.FrontendManager,
-                        ChatViewManager.ActiveChat.ChatModel,
-                        target.ID
-                    )
-                );
+                var targetId = target.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandFinger(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                targetId
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
             }
         }
 
@@ -163,13 +192,20 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             foreach (PersonModel target in Targets) {
-                ProtocolManager.CommandCtcp(
-                    new CommandModel(
-                        Frontend.FrontendManager,
-                        ChatViewManager.ActiveChat.ChatModel,
-                        String.Format("{0} {1}", target.ID, "USERINFO")
-                    )
-                );
+                var targetId = target.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandCtcp(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                String.Format("{0} {1}", targetId, "USERINFO")
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
             }
         }
 
diff --git a/src/Frontend-GNOME-IRC/InviteToMenu.cs b/src/Frontend-GNOME-IRC/InviteToMenu.cs
index 48ca586..15bfa31 100644
--- a/src/Frontend-GNOME-IRC/InviteToMenu.cs
+++ b/src/Frontend-GNOME-IRC/InviteToMenu.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 //
-// Copyright (c) 2010 Mirco Bauer <meebey at meebey.net>
+// Copyright (c) 2010, 2013 Mirco Bauer <meebey at meebey.net>
 //
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 //
@@ -19,6 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
 using System;
+using System.Threading;
 using System.Collections.Generic;
 using Smuxi.Common;
 using Smuxi.Engine;
@@ -85,17 +86,7 @@ namespace Smuxi.Frontend.Gnome
                     // HACK: anonymous methods inside foreach loops needs this
                     var chat = chatView;
                     item.Activated += delegate {
-                        foreach (var invitee in Invitees) {
-                            ProtocolManager.CommandInvite(
-                                new CommandModel(
-                                    Frontend.FrontendManager,
-                                    ChatViewManager.ActiveChat.ChatModel,
-                                    String.Format("{0} {1}",
-                                                  invitee.ID,
-                                                  chat.ID)
-                                )
-                            );
-                        }
+                        OnItemActivated(chat);
                     };
                     item.Show();
                     Append(item);
@@ -104,5 +95,27 @@ namespace Smuxi.Frontend.Gnome
 
             base.OnShown();
         }
+
+        void OnItemActivated(ChatView chat)
+        {
+            Trace.Call(chat);
+
+            foreach (var invitee in Invitees) {
+                var inviteeId = invitee.ID;
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        ProtocolManager.CommandInvite(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatViewManager.ActiveChat.ChatModel,
+                                String.Format("{0} {1}", inviteeId, chat.ID)
+                            )
+                        );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
+            }
+        }
     }
 }
diff --git a/src/Frontend-GNOME-IRC/IrcGroupChatView.cs b/src/Frontend-GNOME-IRC/IrcGroupChatView.cs
index 2ee4050..0fd631b 100644
--- a/src/Frontend-GNOME-IRC/IrcGroupChatView.cs
+++ b/src/Frontend-GNOME-IRC/IrcGroupChatView.cs
@@ -36,7 +36,7 @@ namespace Smuxi.Frontend.Gnome
         private static readonly log4net.ILog _Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 #endif
         private static readonly string       _LibraryTextDomain = "smuxi-frontend-gnome-irc";
-        private IrcProtocolManager _IrcProtocolManager;
+        IrcProtocolManager IrcProtocolManager { get; set; }
 
         public IrcGroupChatView(GroupChatModel groupChat) : base(groupChat)
         {
@@ -51,7 +51,7 @@ namespace Smuxi.Frontend.Gnome
                 column.Spacing = 0;
                 column.SortIndicator = false;
                 column.Sizing = Gtk.TreeViewColumnSizing.GrowOnly;
-                column.SetCellDataFunc(cellr, new Gtk.TreeCellDataFunc(_RenderIrcGroupPersonMode));
+                column.SetCellDataFunc(cellr, new Gtk.TreeCellDataFunc(RenderIrcGroupPersonMode));
                 
                 PersonTreeView.AppendColumn(column);
                 PersonTreeView.MoveColumnAfter(IdentityNameColumn, column);
@@ -64,14 +64,14 @@ namespace Smuxi.Frontend.Gnome
 
             base.Sync();
 
-            _IrcProtocolManager = (IrcProtocolManager) ProtocolManager;
+            IrcProtocolManager = (IrcProtocolManager) ProtocolManager;
         }
 
-        private void _RenderIrcGroupPersonMode(Gtk.TreeViewColumn column,
-                                               Gtk.CellRenderer cellr,
-                                               Gtk.TreeModel model, Gtk.TreeIter iter)
+        void RenderIrcGroupPersonMode(Gtk.TreeViewColumn column,
+                                      Gtk.CellRenderer cellr,
+                                      Gtk.TreeModel model, Gtk.TreeIter iter)
         {
-            IrcGroupPersonModel person = model.GetValue(iter, 0) as IrcGroupPersonModel;
+            var person = model.GetValue(iter, 0) as IrcGroupPersonModel;
             if (person == null) {
 #if LOG4NET
                 _Logger.Error("_RenderIrcGroupPersonMode(): person == null");
@@ -80,8 +80,14 @@ namespace Smuxi.Frontend.Gnome
             }
             
             string mode;
-            if (person.IsOp) {
+            if (person.IsOwner) {
+                mode = "~";
+            } else if (person.IsChannelAdmin) {
+                mode = "&";
+            } else if (person.IsOp) {
                 mode = "@";
+            } else if (person.IsHalfop) {
+                mode = "%";
             } else if (person.IsVoice) {
                 mode = "+";
             } else {
@@ -90,23 +96,23 @@ namespace Smuxi.Frontend.Gnome
             (cellr as Gtk.CellRendererText).Text = mode;
         }
         
-        private void _OnUserListMenuOpActivated(object sender, EventArgs e)
+        void OnUserListMenuOpActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
             
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
             // do smart mode changes
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandOp(
+                    IrcProtocolManager.CommandOp(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -119,23 +125,23 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuDeopActivated(object sender, EventArgs e)
+        void OnUserListMenuDeopActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
             
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
             // do smart mode changes
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandDeop(
+                    IrcProtocolManager.CommandDeop(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -148,23 +154,23 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuVoiceActivated(object sender, EventArgs e)
+        void OnUserListMenuVoiceActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
             
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
             // do smart mode changes
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandVoice(
+                    IrcProtocolManager.CommandVoice(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -177,23 +183,23 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuDevoiceActivated(object sender, EventArgs e)
+        void OnUserListMenuDevoiceActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
             // do smart mode changes
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandDevoice(
+                    IrcProtocolManager.CommandDevoice(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -206,20 +212,20 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuKickActivated(object sender, EventArgs e)
+        void OnUserListMenuKickActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
-            foreach (PersonModel person in persons) {
+            foreach (var person in persons) {
                 var per = person;
                 ThreadPool.QueueUserWorkItem(delegate {
                     try {
-                        _IrcProtocolManager.CommandKick(
+                        IrcProtocolManager.CommandKick(
                             new CommandModel(
                                 Frontend.FrontendManager,
                                 ChatModel,
@@ -233,20 +239,20 @@ namespace Smuxi.Frontend.Gnome
             }
         }
         
-        private void _OnUserListMenuKickBanActivated(object sender, EventArgs e)
+        void OnUserListMenuKickBanActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
-            foreach (PersonModel person in persons) {
+            foreach (var person in persons) {
                 var per = person;
                 ThreadPool.QueueUserWorkItem(delegate {
                     try {
-                        _IrcProtocolManager.CommandKickban(
+                        IrcProtocolManager.CommandKickban(
                             new CommandModel(
                                 Frontend.FrontendManager,
                                 ChatModel,
@@ -260,23 +266,23 @@ namespace Smuxi.Frontend.Gnome
             }
         }
         
-        private void _OnUserListMenuBanActivated(object sender, EventArgs e)
+        void OnUserListMenuBanActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
             // do smart mode changes
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandBan(
+                    IrcProtocolManager.CommandBan(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -289,22 +295,22 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuUnbanActivated(object sender, EventArgs e)
+        void OnUserListMenuUnbanActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
-            List<string> nicks = new List<string>(); 
-            foreach (PersonModel person in persons) {
+            var nicks = new List<string>();
+            foreach (var person in persons) {
                 nicks.Add(person.ID);
             }
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandUnban(
+                    IrcProtocolManager.CommandUnban(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
@@ -317,20 +323,20 @@ namespace Smuxi.Frontend.Gnome
             });
         }
         
-        private void _OnUserListMenuQueryActivated(object sender, EventArgs e)
+        void OnUserListMenuQueryActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
-            foreach (PersonModel person in persons) {
+            foreach (var person in persons) {
                 var per = person;
                 ThreadPool.QueueUserWorkItem(delegate {
                     try {
-                        _IrcProtocolManager.CommandMessageQuery(
+                        IrcProtocolManager.CommandMessageQuery(
                             new CommandModel(
                                 Frontend.FrontendManager,
                                 ChatModel,
@@ -344,20 +350,20 @@ namespace Smuxi.Frontend.Gnome
             }
         }
 
-        private void _OnUserListMenuWhoisActivated(object sender, EventArgs e)
+        void OnUserListMenuWhoisActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
-            IList<PersonModel> persons = GetSelectedPersons();
+            var persons = GetSelectedPersons();
             if (persons == null) {
                 return;
             }
 
-            foreach (PersonModel person in persons) {
+            foreach (var person in persons) {
                 var per = person;
                 ThreadPool.QueueUserWorkItem(delegate {
                     try {
-                        _IrcProtocolManager.CommandWhoIs(
+                        IrcProtocolManager.CommandWhoIs(
                             new CommandModel(
                                 Frontend.FrontendManager,
                                 ChatModel,
@@ -381,51 +387,53 @@ namespace Smuxi.Frontend.Gnome
 
             base.OnPersonMenuShown(sender, e);
 
+            Gtk.ImageMenuItem query_item = new Gtk.ImageMenuItem(_("Query"));
+            query_item.Activated += OnUserListMenuQueryActivated;
+            PersonMenu.Append(query_item);
+
+            PersonMenu.Append(new Gtk.SeparatorMenuItem());
+
             Gtk.ImageMenuItem op_item = new Gtk.ImageMenuItem(_("Op"));
-            op_item.Activated += _OnUserListMenuOpActivated;
+            op_item.Activated += OnUserListMenuOpActivated;
             PersonMenu.Append(op_item);
 
             Gtk.ImageMenuItem deop_item = new Gtk.ImageMenuItem(_("Deop"));
-            deop_item.Activated += _OnUserListMenuDeopActivated;
+            deop_item.Activated += OnUserListMenuDeopActivated;
             PersonMenu.Append(deop_item);
 
             Gtk.ImageMenuItem voice_item = new Gtk.ImageMenuItem(_("Voice"));
-            voice_item.Activated += _OnUserListMenuVoiceActivated;
+            voice_item.Activated += OnUserListMenuVoiceActivated;
             PersonMenu.Append(voice_item);
 
             Gtk.ImageMenuItem devoice_item = new Gtk.ImageMenuItem(_("Devoice"));
-            devoice_item.Activated += _OnUserListMenuDevoiceActivated;
+            devoice_item.Activated += OnUserListMenuDevoiceActivated;
             PersonMenu.Append(devoice_item);
 
             Gtk.ImageMenuItem kick_item = new Gtk.ImageMenuItem(_("Kick"));
-            kick_item.Activated += _OnUserListMenuKickActivated;
+            kick_item.Activated += OnUserListMenuKickActivated;
             PersonMenu.Append(kick_item);
 
             Gtk.ImageMenuItem kickban_item = new Gtk.ImageMenuItem(_("Kick + Ban"));
-            kickban_item.Activated += _OnUserListMenuKickBanActivated;
+            kickban_item.Activated += OnUserListMenuKickBanActivated;
             PersonMenu.Append(kickban_item);
 
             Gtk.ImageMenuItem ban_item = new Gtk.ImageMenuItem(_("Ban"));
-            ban_item.Activated += _OnUserListMenuBanActivated;
+            ban_item.Activated += OnUserListMenuBanActivated;
             PersonMenu.Append(ban_item);
 
             Gtk.ImageMenuItem unban_item = new Gtk.ImageMenuItem(_("Unban"));
-            unban_item.Activated += _OnUserListMenuUnbanActivated;
+            unban_item.Activated += OnUserListMenuUnbanActivated;
             PersonMenu.Append(unban_item);
 
             PersonMenu.Append(new Gtk.SeparatorMenuItem());
 
-            Gtk.ImageMenuItem query_item = new Gtk.ImageMenuItem(_("Query"));
-            query_item.Activated += _OnUserListMenuQueryActivated;
-            PersonMenu.Append(query_item);
-
             Gtk.ImageMenuItem whois_item = new Gtk.ImageMenuItem(_("Whois"));
-            whois_item.Activated += _OnUserListMenuWhoisActivated;
+            whois_item.Activated += OnUserListMenuWhoisActivated;
             PersonMenu.Append(whois_item);
 
             Gtk.MenuItem ctcp_item = new Gtk.MenuItem(_("CTCP"));
             Gtk.Menu ctcp_menu = new CtcpMenu(
-                _IrcProtocolManager,
+                IrcProtocolManager,
                 Frontend.MainWindow.ChatViewManager,
                 GetSelectedPersons()
             );
@@ -434,7 +442,7 @@ namespace Smuxi.Frontend.Gnome
 
             Gtk.MenuItem invite_to_item = new Gtk.MenuItem(_("Invite to"));
             Gtk.Menu invite_to_menu_item = new InviteToMenu(
-                _IrcProtocolManager,
+                IrcProtocolManager,
                 Frontend.MainWindow.ChatViewManager,
                 GetSelectedPersons()
             );
diff --git a/src/Frontend-GNOME-IRC/IrcPersonChatView.cs b/src/Frontend-GNOME-IRC/IrcPersonChatView.cs
index 19b7df1..286bbc4 100644
--- a/src/Frontend-GNOME-IRC/IrcPersonChatView.cs
+++ b/src/Frontend-GNOME-IRC/IrcPersonChatView.cs
@@ -32,13 +32,13 @@ namespace Smuxi.Frontend.Gnome
     public class IrcPersonChatView : PersonChatView
     {
         private static readonly string _LibraryTextDomain = "smuxi-frontend-gnome-irc";
-        private IrcProtocolManager _IrcProtocolManager;
+        IrcProtocolManager IrcProtocolManager;
 
         public IrcPersonChatView(PersonChatModel personChat) : base(personChat)
         {
             Trace.Call(personChat);
 
-            OutputMessageTextView.PopulatePopup += _OnOutputMessageTextViewPopulatePopup;
+            OutputMessageTextView.PopulatePopup += OnOutputMessageTextViewPopulatePopup;
         }
 
         public override void Sync()
@@ -47,10 +47,10 @@ namespace Smuxi.Frontend.Gnome
 
             base.Sync();
 
-            _IrcProtocolManager = (IrcProtocolManager) ProtocolManager;
+            IrcProtocolManager = (IrcProtocolManager) ProtocolManager;
         }
 
-        private void _OnOutputMessageTextViewPopulatePopup (object o, Gtk.PopulatePopupArgs args)
+        void OnOutputMessageTextViewPopulatePopup(object o, Gtk.PopulatePopupArgs args)
         {
             if (OutputMessageTextView.IsAtUrlTag) {
                 return;
@@ -61,18 +61,18 @@ namespace Smuxi.Frontend.Gnome
             popup.Append(new Gtk.SeparatorMenuItem());
 
             Gtk.ImageMenuItem whois_item = new Gtk.ImageMenuItem(_("Whois"));
-            whois_item.Activated += _OnMenuWhoisItemActivated;
+            whois_item.Activated += OnMenuWhoisItemActivated;
             popup.Append(whois_item);
 
             Gtk.ImageMenuItem ctcp_item = new Gtk.ImageMenuItem(_("CTCP"));
-            Gtk.Menu ctcp_menu_item = new CtcpMenu(_IrcProtocolManager,
+            Gtk.Menu ctcp_menu_item = new CtcpMenu(IrcProtocolManager,
                                                    Frontend.MainWindow.ChatViewManager,
                                                    PersonModel);
             ctcp_item.Submenu = ctcp_menu_item;
             popup.Append(ctcp_item);
 
             Gtk.ImageMenuItem invite_to_item = new Gtk.ImageMenuItem(_("Invite to"));
-            Gtk.Menu invite_to_menu_item = new InviteToMenu(_IrcProtocolManager,
+            Gtk.Menu invite_to_menu_item = new InviteToMenu(IrcProtocolManager,
                                                             Frontend.MainWindow.ChatViewManager,
                                                             PersonModel);
             invite_to_item.Submenu = invite_to_menu_item;
@@ -81,17 +81,17 @@ namespace Smuxi.Frontend.Gnome
             popup.ShowAll();
         }
 
-        void _OnMenuWhoisItemActivated (object sender, EventArgs e)
+        void OnMenuWhoisItemActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
-                    _IrcProtocolManager.CommandWhoIs(
+                    IrcProtocolManager.CommandWhoIs(
                         new CommandModel(
                             Frontend.FrontendManager,
                             ChatModel,
-                            ChatModel.ID
+                            ID
                         )
                      );
                 } catch (Exception ex) {
diff --git a/src/Frontend-GNOME-IRC/Makefile.am b/src/Frontend-GNOME-IRC/Makefile.am
index fa56dc0..1cdbe15 100644
--- a/src/Frontend-GNOME-IRC/Makefile.am
+++ b/src/Frontend-GNOME-IRC/Makefile.am
@@ -100,10 +100,10 @@ EXTRAS =
 
 REFERENCES =  \
 	Mono.Posix \
-	$(GTK_SHARP_20_LIBS) \
-	$(MEEBEY_SMARTIRC4NET_DLL)
+	$(GTK_SHARP_20_LIBS)
 
-DLL_REFERENCES = 
+DLL_REFERENCES = \
+	$(BUILD_DIR)/Meebey.SmartIrc4net.dll
 
 CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) 
 
diff --git a/src/Frontend-GNOME-IRC/Makefile.in b/src/Frontend-GNOME-IRC/Makefile.in
index 84757ef..c4f254e 100644
--- a/src/Frontend-GNOME-IRC/Makefile.in
+++ b/src/Frontend-GNOME-IRC/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,8 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am ChangeLog
 subdir = src/Frontend-GNOME-IRC
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -100,6 +127,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -109,6 +148,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -154,6 +194,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -258,7 +299,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -417,10 +457,11 @@ RESOURCES =
 EXTRAS = 
 REFERENCES = \
 	Mono.Posix \
-	$(GTK_SHARP_20_LIBS) \
-	$(MEEBEY_SMARTIRC4NET_DLL)
+	$(GTK_SHARP_20_LIBS)
+
+DLL_REFERENCES = \
+	$(BUILD_DIR)/Meebey.SmartIrc4net.dll
 
-DLL_REFERENCES = 
 CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) $(ASSEMBLY) \
 	$(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \
 	$(build_satellite_assembly_list)
@@ -675,11 +716,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -825,19 +866,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend-GNOME-XMPP/AssemblyInfo.cs b/src/Frontend-GNOME-XMPP/AssemblyInfo.cs
index 3f18ee2..ac4f78e 100644
--- a/src/Frontend-GNOME-XMPP/AssemblyInfo.cs
+++ b/src/Frontend-GNOME-XMPP/AssemblyInfo.cs
@@ -30,7 +30,8 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 
 [assembly: AssemblyTitle("Smuxi - XMPP support for GNOME frontend")]
-[assembly: AssemblyCopyright("2005-2008 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyCopyright("2010 (C) Mirco Bauer <meebey at meebey.net>, " +
+                             "2013 (C) Oliver Schneider <smuxi at oli-obk.de>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Frontend-GNOME-XMPP/InviteToMenu.cs b/src/Frontend-GNOME-XMPP/InviteToMenu.cs
new file mode 100644
index 0000000..5f63086
--- /dev/null
+++ b/src/Frontend-GNOME-XMPP/InviteToMenu.cs
@@ -0,0 +1,117 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2010 Mirco Bauer <meebey at meebey.net>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+using System;
+using System.Collections.Generic;
+using Smuxi.Common;
+using Smuxi.Engine;
+using System.Threading;
+
+namespace Smuxi.Frontend.Gnome
+{
+    public class InviteToMenu : Gtk.Menu
+    {
+        XmppProtocolManager ProtocolManager { get; set; }
+        ChatViewManager    ChatViewManager { get; set; }
+        IList<PersonModel> Invitees { get; set; }
+        bool               IsPopulated { get; set; }
+
+        public InviteToMenu(XmppProtocolManager protocolManager,
+                            ChatViewManager chatViewManager,
+                            PersonModel invitee) :
+                       this(protocolManager,
+                            chatViewManager,
+                            new [] { invitee })
+        {
+        }
+
+        public InviteToMenu(XmppProtocolManager protocolManager,
+                            ChatViewManager chatViewManager,
+                            IList<PersonModel> invitees)
+        {
+            if (protocolManager == null) {
+                throw new ArgumentNullException("protocolManager");
+            }
+            if (chatViewManager == null) {
+                throw new ArgumentNullException("chatViewManager");
+            }
+            if (invitees == null) {
+                throw new ArgumentNullException("invitees");
+            }
+
+            ProtocolManager = protocolManager;
+            ChatViewManager = chatViewManager;
+            Invitees = invitees;
+        }
+
+        protected override void OnShown()
+        {
+            Trace.Call();
+
+            if (!IsPopulated) {
+                IsPopulated = true;
+                foreach (var chatView in ChatViewManager.Chats) {
+                    if (!(chatView is XmppGroupChatView)) {
+                        // only invite to group chats
+                        continue;
+                    }
+                    if (chatView == ChatViewManager.ActiveChat) {
+                        // don't need to add current chat to invite list
+                        continue;
+                    }
+                    if (chatView.ProtocolManager != ProtocolManager) {
+                        // only add chats from current server
+                        continue;
+                    }
+                    var groupChatView = (XmppGroupChatView) chatView;
+                    if (groupChatView.IsContactList) {
+                        // ignore our abused groupchatview
+                        continue;
+                    }
+
+                    var item = new Gtk.ImageMenuItem(chatView.Name);
+                    item.Image = new Gtk.Image(GroupChatView.IconPixbuf);
+                    var chatid = chatView.ID;
+                    item.Activated += delegate {
+                        ThreadPool.QueueUserWorkItem(delegate {
+                            try {
+                                for (int i = 0; i < Invitees.Count; i++) {
+                                    ProtocolManager.CommandInvite(
+                                        new CommandModel(
+                                            Frontend.FrontendManager,
+                                            ChatViewManager.ActiveChat.ChatModel,
+                                            chatid + " " + Invitees[i].ID
+                                        )
+                                     );
+                                }
+                            } catch (Exception ex) {
+                                Frontend.ShowException(ex);
+                            }
+                        });
+                    };
+                    item.Show();
+                    Append(item);
+                }
+            }
+
+            base.OnShown();
+        }
+    }
+}
diff --git a/src/Frontend-GNOME-XMPP/Makefile.am b/src/Frontend-GNOME-XMPP/Makefile.am
index ec4997a..c70c5cf 100644
--- a/src/Frontend-GNOME-XMPP/Makefile.am
+++ b/src/Frontend-GNOME-XMPP/Makefile.am
@@ -10,6 +10,7 @@ ASSEMBLY = ../../bin/release/smuxi-frontend-gnome-xmpp.dll
 ASSEMBLY_MDB = 
 COMPILE_TARGET = library
 PROJECT_REFERENCES =  \
+	../../bin/release/smuxi-frontend.dll \
 	../../bin/release/smuxi-frontend-gnome.exe \
 	../../bin/release/smuxi-engine.dll \
 	../../bin/release/smuxi-common.dll \
@@ -27,7 +28,6 @@ NINI_DLL_SOURCE=../../lib/Nini.dll
 SMUXI_FRONTEND_GNOME_EXE_SOURCE=../../bin/release/smuxi-frontend-gnome.exe
 LOG4NET_DLL_SOURCE=../../lib/log4net.dll
 SMUXI_ENGINE_DLL_SOURCE=../../bin/release/smuxi-engine.dll
-JABBER_NET_DLL_SOURCE=../../lib/jabber-net.dll
 
 endif
 
@@ -39,6 +39,7 @@ ASSEMBLY = ../../bin/debug/smuxi-frontend-gnome-xmpp.dll
 ASSEMBLY_MDB = $(ASSEMBLY).mdb
 COMPILE_TARGET = library
 PROJECT_REFERENCES =  \
+	../../bin/debug/smuxi-frontend.dll \
 	../../bin/debug/smuxi-frontend-gnome.exe \
 	../../bin/debug/smuxi-engine.dll \
 	../../bin/debug/smuxi-common.dll \
@@ -60,7 +61,6 @@ NINI_DLL_SOURCE=../../lib/Nini.dll
 SMUXI_FRONTEND_GNOME_EXE_SOURCE=../../bin/debug/smuxi-frontend-gnome.exe
 LOG4NET_DLL_SOURCE=../../lib/log4net.dll
 SMUXI_ENGINE_DLL_SOURCE=../../bin/debug/smuxi-engine.dll
-JABBER_NET_DLL_SOURCE=../../lib/jabber-net.dll
 
 endif
 
@@ -85,7 +85,10 @@ all: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG)
 
 FILES = \
 	$(top_srcdir)/src/AssemblyVersion.cs \
-	AssemblyInfo.cs 
+	AssemblyInfo.cs \
+	InviteToMenu.cs \
+	XmppGroupChatView.cs \
+	XmppPersonChatView.cs
 
 DATA_FILES = 
 
@@ -93,7 +96,9 @@ RESOURCES =
 
 EXTRAS = 
 
-REFERENCES = 
+REFERENCES = \
+	Mono.Posix \
+	$(GTK_SHARP_20_LIBS)
 
 DLL_REFERENCES = 
 
@@ -108,7 +113,6 @@ NINI_DLL = $(BUILD_DIR)/Nini.dll
 SMUXI_FRONTEND_GNOME_EXE = $(BUILD_DIR)/smuxi-frontend-gnome.exe
 LOG4NET_DLL = $(BUILD_DIR)/log4net.dll
 SMUXI_ENGINE_DLL = $(BUILD_DIR)/smuxi-engine.dll
-JABBER_NET_DLL = $(BUILD_DIR)/jabber-net.dll
 
 $(eval $(call emit-deploy-target,SMUXI_COMMON_DLL))
 $(eval $(call emit-deploy-target,SMUXI_ENGINE_XMPP_DLL_MDB))
@@ -129,4 +133,4 @@ $(build_resx_resources) : %.resources: %.resx
 
 $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
 	mkdir -p $(dir $(ASSEMBLY))
-	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(JABBER_NET_LIBS) $(LOG4NET_LIBS)
+	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
diff --git a/src/Frontend-GNOME-XMPP/Makefile.in b/src/Frontend-GNOME-XMPP/Makefile.in
index 07acb78..a5fb0d5 100644
--- a/src/Frontend-GNOME-XMPP/Makefile.in
+++ b/src/Frontend-GNOME-XMPP/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,8 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am ChangeLog
 subdir = src/Frontend-GNOME-XMPP
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -100,6 +127,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -109,6 +148,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -154,6 +194,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -258,7 +299,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -345,12 +385,14 @@ EXTRA_DIST = $(build_sources) $(build_resx_files) \
 @ENABLE_DEBUG_TRUE at COMPILE_TARGET = library
 @ENABLE_RELEASE_TRUE at COMPILE_TARGET = library
 @ENABLE_DEBUG_TRUE at PROJECT_REFERENCES = \
+ at ENABLE_DEBUG_TRUE@	../../bin/debug/smuxi-frontend.dll \
 @ENABLE_DEBUG_TRUE@	../../bin/debug/smuxi-frontend-gnome.exe \
 @ENABLE_DEBUG_TRUE@	../../bin/debug/smuxi-engine.dll \
 @ENABLE_DEBUG_TRUE@	../../bin/debug/smuxi-common.dll \
 @ENABLE_DEBUG_TRUE@	../../bin/debug/smuxi-engine-xmpp.dll
 
 @ENABLE_RELEASE_TRUE at PROJECT_REFERENCES = \
+ at ENABLE_RELEASE_TRUE@	../../bin/release/smuxi-frontend.dll \
 @ENABLE_RELEASE_TRUE@	../../bin/release/smuxi-frontend-gnome.exe \
 @ENABLE_RELEASE_TRUE@	../../bin/release/smuxi-engine.dll \
 @ENABLE_RELEASE_TRUE@	../../bin/release/smuxi-common.dll \
@@ -380,8 +422,6 @@ EXTRA_DIST = $(build_sources) $(build_resx_files) \
 @ENABLE_RELEASE_TRUE at LOG4NET_DLL_SOURCE = ../../lib/log4net.dll
 @ENABLE_DEBUG_TRUE at SMUXI_ENGINE_DLL_SOURCE = ../../bin/debug/smuxi-engine.dll
 @ENABLE_RELEASE_TRUE at SMUXI_ENGINE_DLL_SOURCE = ../../bin/release/smuxi-engine.dll
- at ENABLE_DEBUG_TRUE@JABBER_NET_DLL_SOURCE = ../../lib/jabber-net.dll
- at ENABLE_RELEASE_TRUE@JABBER_NET_DLL_SOURCE = ../../lib/jabber-net.dll
 @ENABLE_DEBUG_TRUE at SMUXI_ENGINE_XMPP_DLL_MDB_SOURCE = ../../bin/debug/smuxi-engine-xmpp.dll.mdb
 @ENABLE_DEBUG_TRUE at SMUXI_FRONTEND_GNOME_EXE_MDB_SOURCE = ../../bin/debug/smuxi-frontend-gnome.exe.mdb
 @ENABLE_DEBUG_TRUE at SMUXI_ENGINE_DLL_MDB_SOURCE = ../../bin/debug/smuxi-engine.dll.mdb
@@ -404,12 +444,18 @@ LINUX_PKGCONFIG = \
 
 FILES = \
 	$(top_srcdir)/src/AssemblyVersion.cs \
-	AssemblyInfo.cs 
+	AssemblyInfo.cs \
+	InviteToMenu.cs \
+	XmppGroupChatView.cs \
+	XmppPersonChatView.cs
 
 DATA_FILES = 
 RESOURCES = 
 EXTRAS = 
-REFERENCES = 
+REFERENCES = \
+	Mono.Posix \
+	$(GTK_SHARP_20_LIBS)
+
 DLL_REFERENCES = 
 CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) $(ASSEMBLY) \
 	$(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) \
@@ -470,7 +516,6 @@ NINI_DLL = $(BUILD_DIR)/Nini.dll
 SMUXI_FRONTEND_GNOME_EXE = $(BUILD_DIR)/smuxi-frontend-gnome.exe
 LOG4NET_DLL = $(BUILD_DIR)/log4net.dll
 SMUXI_ENGINE_DLL = $(BUILD_DIR)/smuxi-engine.dll
-JABBER_NET_DLL = $(BUILD_DIR)/jabber-net.dll
 all: all-am
 
 .SUFFIXES:
@@ -665,11 +710,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -815,19 +860,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
@@ -880,7 +925,7 @@ $(build_resx_resources) : %.resources: %.resx
 
 $(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
 	mkdir -p $(dir $(ASSEMBLY))
-	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(JABBER_NET_LIBS) $(LOG4NET_LIBS)
+	$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) $(LOG4NET_LIBS)
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/Frontend-GNOME-XMPP/XmppGroupChatView.cs b/src/Frontend-GNOME-XMPP/XmppGroupChatView.cs
new file mode 100644
index 0000000..7280ea5
--- /dev/null
+++ b/src/Frontend-GNOME-XMPP/XmppGroupChatView.cs
@@ -0,0 +1,260 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2013 Oliver Schneider <smuxi at oli-obk.de>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+using System;
+using Smuxi.Common;
+using Smuxi.Engine;
+using System.Threading;
+using System.Collections.Generic;
+
+namespace Smuxi.Frontend.Gnome
+{
+    [ChatViewInfo(ChatType = ChatType.Group, ProtocolManagerType = typeof(XmppProtocolManager))]
+    public class XmppGroupChatView : GroupChatView
+    {
+        private static readonly string _LibraryTextDomain = "smuxi-frontend-gnome-xmpp";
+        private XmppProtocolManager XmppProtocolManager { get; set; }
+
+        public bool IsContactList {
+            get {
+                return ID == "Contacts";
+            }
+        }
+
+        public XmppGroupChatView(GroupChatModel chat) : base(chat)
+        {
+            Trace.Call(chat);
+        }
+
+        void OnPersonRenameEditingStarted(object o, Gtk.EditingStartedArgs e)
+        {
+            Trace.Call(o, e);
+
+            // only allow editing once from the context menu
+            IdentityNameCellRenderer.Editable = false;
+
+            Gtk.TreeIter iter;
+            if (!PersonTreeView.Model.GetIterFromString(out iter, e.Path)) {
+                return;
+            }
+            var person = (PersonModel) PersonTreeView.Model.GetValue(iter, 0);
+            var entry = (Gtk.Entry) e.Editable;
+            entry.Text = person.IdentityName;
+        }
+
+        private static string _(string msg)
+        {
+            return LibraryCatalog.GetString(msg, _LibraryTextDomain);
+        }
+
+        public override void Sync()
+        {
+            Trace.Call();
+
+            base.Sync();
+
+            XmppProtocolManager = (XmppProtocolManager) ProtocolManager;
+        }
+
+        void _OnUserListMenuWhoisActivated(object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+            
+            IList<PersonModel> persons = GetSelectedPersons();
+            if (persons == null) {
+                return;
+            }
+
+            foreach (PersonModel person in persons) {
+                var per = person;
+            
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        XmppProtocolManager.CommandWhoIs(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatModel,
+                                per.ID
+                            )
+                         );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
+            }
+        }
+
+        void _OnUserListMenuQueryActivated (object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+            
+            IList<PersonModel> persons = GetSelectedPersons();
+            if (persons == null) {
+                return;
+            }
+
+            foreach (PersonModel person in persons) {
+                var per = person;
+            
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        XmppProtocolManager.CommandMessageQuery(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatModel,
+                                per.ID
+                            )
+                         );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
+            }
+        }
+
+        void _OnMenuAddToContactsItemActivated(object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+
+            IList<PersonModel> persons = GetSelectedPersons();
+            if (persons == null) {
+                return;
+            }
+
+            foreach (PersonModel person in persons) {
+                var per = person;
+
+                // is this a groupchat contact whose real id is unknown
+                if (person.ID.StartsWith(ID)) {
+                    continue;
+                }
+
+                ThreadPool.QueueUserWorkItem(delegate {
+                    try {
+                        XmppProtocolManager.CommandContact(
+                            new CommandModel(
+                                Frontend.FrontendManager,
+                                ChatModel,
+                                "add " + per.ID
+                            )
+                         );
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                });
+            }
+        }
+
+        void OnPersonRenameEdited(object o, Gtk.EditedArgs e)
+        {
+            Trace.Call(o, e);
+
+            Gtk.TreeIter iter;
+            if (!PersonTreeView.Model.GetIterFromString(out iter, e.Path)) {
+                return;
+            }
+            PersonModel person = (PersonModel) PersonTreeView.Model.GetValue(iter, 0);
+
+            ThreadPool.QueueUserWorkItem(delegate {
+                try {
+                    XmppProtocolManager.CommandContact(
+                        new CommandModel(
+                            Frontend.FrontendManager,
+                            ChatModel,
+                            "rename " + person.ID + " " + e.NewText
+                        )
+                    );
+                } catch (Exception ex) {
+                    Frontend.ShowException(ex);
+                }
+            });
+        }
+
+        protected override void OnPersonMenuShown(object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+
+            foreach (var child in PersonMenu.Children) {
+                PersonMenu.Remove(child);
+            }
+
+            base.OnPersonMenuShown(sender, e);
+
+            // minimum version of any command below
+            if (Frontend.EngineVersion < new Version(0, 8, 9)) {
+                return;
+            }
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 9)) {
+                Gtk.ImageMenuItem query_item = new Gtk.ImageMenuItem(_("Query"));
+                query_item.Activated += _OnUserListMenuQueryActivated;
+                PersonMenu.Append(query_item);
+            }
+
+            PersonMenu.Append(new Gtk.SeparatorMenuItem());
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 12)) {
+                Gtk.ImageMenuItem whois_item = new Gtk.ImageMenuItem(_("Whois"));
+                whois_item.Activated += _OnUserListMenuWhoisActivated;
+                PersonMenu.Append(whois_item);
+            }
+
+            if (!IsContactList && Frontend.EngineVersion >= new Version(0, 8, 11)) {
+                var add_to_contacts_item = new Gtk.ImageMenuItem(_("Add To Contacts"));
+                add_to_contacts_item.Activated += _OnMenuAddToContactsItemActivated;
+                PersonMenu.Append(add_to_contacts_item);
+            }
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 12)) {
+                Gtk.MenuItem invite_to_item = new Gtk.MenuItem(_("Invite to"));
+                Gtk.Menu invite_to_menu_item = new InviteToMenu(
+                    XmppProtocolManager,
+                    Frontend.MainWindow.ChatViewManager,
+                    GetSelectedPersons()
+                );
+                invite_to_item.Submenu = invite_to_menu_item;
+                PersonMenu.Append(invite_to_item);
+            }
+
+            if (IsContactList && Frontend.EngineVersion >= new Version(0, 8, 11)) {
+                // cleanup old handlers
+                IdentityNameCellRenderer.EditingStarted -= OnPersonRenameEditingStarted;
+                IdentityNameCellRenderer.Edited -= OnPersonRenameEdited;
+
+                IdentityNameCellRenderer.EditingStarted += OnPersonRenameEditingStarted;
+                IdentityNameCellRenderer.Edited += OnPersonRenameEdited;
+
+                var rename_item = new Gtk.ImageMenuItem(_("Rename"));
+                rename_item.Activated += (o, args) => {
+                    var paths = PersonTreeView.Selection.GetSelectedRows();
+                    if (paths == null || paths.Length == 0) {
+                        return;
+                    }
+                    var path = paths[0];
+                    IdentityNameCellRenderer.Editable = true;
+                    PersonTreeView.SetCursor(path, IdentityNameColumn, true);
+                };
+                PersonMenu.Append(rename_item);
+            }
+
+            PersonMenu.ShowAll();
+        }
+    }
+}
+
diff --git a/src/Frontend-GNOME-XMPP/XmppPersonChatView.cs b/src/Frontend-GNOME-XMPP/XmppPersonChatView.cs
new file mode 100644
index 0000000..07e22af
--- /dev/null
+++ b/src/Frontend-GNOME-XMPP/XmppPersonChatView.cs
@@ -0,0 +1,133 @@
+// Smuxi - Smart MUltipleXed Irc
+//
+// Copyright (c) 2013 Oliver Schneider <smuxi at oli-obk.de>
+//
+// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+using System;
+using Smuxi.Common;
+using Smuxi.Engine;
+using System.Threading;
+using System.Collections.Generic;
+
+namespace Smuxi.Frontend.Gnome
+{
+    [ChatViewInfo(ChatType = ChatType.Person, ProtocolManagerType = typeof(XmppProtocolManager))]
+    public class XmppPersonChatView : PersonChatView
+    {
+        private static readonly string _LibraryTextDomain = "smuxi-frontend-gnome-xmpp";
+        private XmppProtocolManager XmppProtocolManager { get; set; }
+
+        public XmppPersonChatView(PersonChatModel personChat) : base(personChat)
+        {
+            Trace.Call(personChat);
+
+            OutputMessageTextView.PopulatePopup += _OnOutputMessageTextViewPopulatePopup;
+        }
+
+        private void _OnOutputMessageTextViewPopulatePopup (object o, Gtk.PopulatePopupArgs args)
+        {
+            if (OutputMessageTextView.IsAtUrlTag) {
+                return;
+            }
+
+            Gtk.Menu popup = args.Menu;
+
+            // minimum version of any command below
+            if (Frontend.EngineVersion < new Version(0, 8, 11)) {
+                return;
+            }
+
+            popup.Append(new Gtk.SeparatorMenuItem());
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 12)) {
+                Gtk.ImageMenuItem whois_item = new Gtk.ImageMenuItem(_("Whois"));
+                whois_item.Activated += _OnMenuWhoisItemActivated;
+                popup.Append(whois_item);
+            }
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 11)) {
+                Gtk.ImageMenuItem AddToContacts_item = new Gtk.ImageMenuItem(_("Add To Contacts"));
+                AddToContacts_item.Activated += _OnMenuAddToContactsItemActivated;
+                popup.Append(AddToContacts_item);
+            }
+
+            if (Frontend.EngineVersion >= new Version(0, 8, 12)) {
+                Gtk.ImageMenuItem invite_to_item = new Gtk.ImageMenuItem(_("Invite to"));
+                Gtk.Menu invite_to_menu_item = new InviteToMenu(XmppProtocolManager,
+                                                                Frontend.MainWindow.ChatViewManager,
+                                                                PersonModel);
+                invite_to_item.Submenu = invite_to_menu_item;
+                popup.Append(invite_to_item);
+            }
+
+            popup.ShowAll();
+        }
+
+        void _OnMenuWhoisItemActivated(object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+
+            ThreadPool.QueueUserWorkItem(delegate {
+                try {
+                    XmppProtocolManager.CommandWhoIs(
+                        new CommandModel(
+                            Frontend.FrontendManager,
+                            ChatModel,
+                            PersonModel.ID
+                        )
+                     );
+                } catch (Exception ex) {
+                    Frontend.ShowException(ex);
+                }
+            });
+        }
+
+        void _OnMenuAddToContactsItemActivated(object sender, EventArgs e)
+        {
+            Trace.Call(sender, e);
+
+            ThreadPool.QueueUserWorkItem(delegate {
+                try {
+                    XmppProtocolManager.CommandContact(
+                        new CommandModel(
+                            Frontend.FrontendManager,
+                            ChatModel,
+                            "add " + PersonModel.ID
+                        )
+                     );
+                } catch (Exception ex) {
+                    Frontend.ShowException(ex);
+                }
+            });
+        }
+        
+        private static string _(string msg)
+        {
+            return LibraryCatalog.GetString(msg, _LibraryTextDomain);
+        }
+
+        public override void Sync()
+        {
+            Trace.Call();
+
+            base.Sync();
+
+            XmppProtocolManager = (XmppProtocolManager) ProtocolManager;
+        }
+    }
+}
+
diff --git a/src/Frontend-GNOME/AboutDialog.cs b/src/Frontend-GNOME/AboutDialog.cs
index 72c6021..7a35e52 100644
--- a/src/Frontend-GNOME/AboutDialog.cs
+++ b/src/Frontend-GNOME/AboutDialog.cs
@@ -43,7 +43,7 @@ namespace Smuxi.Frontend.Gnome
             }
             Version += "\n Frontend: " + Frontend.UIName + " " + version  +
                        "\n Engine: " + Frontend.EngineVersion;
-            Copyright = "Copyright © 2005-2012 Mirco Bauer <meebey at meebey.net>";
+            Copyright = "Copyright © 2005-2013 Mirco Bauer <meebey at meebey.net>";
             Authors = new string[] {
                 "Mirco Bauer <meebey at meebey.net>",
                 "David Paleino <dapal at debian.org>",
@@ -59,8 +59,9 @@ namespace Smuxi.Frontend.Gnome
                 "Rodney Dawes <dobey at novell.com>",
                 "Lapo Calamandrei <calamandrei at gmail.com>",
                 "Ahmed Abdellah <a3dman1 at gmail.com>",
-                "Matthieu James <matthieu.james at gmail.com>",
-                "George Karavasilev <motorslav at gmail.com>"
+                "George Karavasilev <motorslav at gmail.com>",
+                "Joern Konopka <cldx3000 at googlemail.com>",
+                "Nuno F. Pinheiro <nuno at oxygen-icons.org>"
             };
             TranslatorCredits = _("translator-credits");
             Logo = Frontend.LoadIcon(
diff --git a/src/Frontend-GNOME/AssemblyInfo.cs b/src/Frontend-GNOME/AssemblyInfo.cs
index 49eefaf..079e768 100644
--- a/src/Frontend-GNOME/AssemblyInfo.cs
+++ b/src/Frontend-GNOME/AssemblyInfo.cs
@@ -24,7 +24,7 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 
 [assembly: AssemblyTitle("Smuxi - GNOME frontend")]
-[assembly: AssemblyCopyright("2005-2012 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Frontend-GNOME/ChatViewManager.cs b/src/Frontend-GNOME/ChatViewManager.cs
index acec410..2b6fbbd 100644
--- a/src/Frontend-GNOME/ChatViewManager.cs
+++ b/src/Frontend-GNOME/ChatViewManager.cs
@@ -279,9 +279,14 @@ namespace Smuxi.Frontend.Gnome
                 f_Notebook.SetTabReorderable(chatView, true);
 #endif
 
-                if ((chatView is PersonChatView && AutoSwitchPersonChats) ||
-                    (chatView is GroupChatView && AutoSwitchGroupChats)) {
-                    CurrentChatNumber = idx;
+                // we can't do auto switch for remote engines for now as that
+                // kills all unseen highlights, see:
+                // https://www.smuxi.org/issues/show/866
+                if (Frontend.IsLocalEngine) {
+                    if ((chatView is PersonChatView && AutoSwitchPersonChats) ||
+                        (chatView is GroupChatView && AutoSwitchGroupChats)) {
+                        CurrentChatNumber = idx;
+                    }
                 }
 
                 if (ChatAdded != null) {
diff --git a/src/Frontend-GNOME/Entry.cs b/src/Frontend-GNOME/Entry.cs
index 35f912e..de3f18a 100644
--- a/src/Frontend-GNOME/Entry.cs
+++ b/src/Frontend-GNOME/Entry.cs
@@ -21,6 +21,7 @@
  */
 
 using System;
+using System.Linq;
 using System.Runtime.InteropServices;
 using System.Threading;
 using System.Collections;
@@ -252,10 +253,16 @@ namespace Smuxi.Frontend.Gnome
                 QueueDraw();
             }
 
+            if (ChatViewManager.CurrentChatView == null) {
+                // we are during a sync, so don't process keys yet
+                return;
+            }
+
             int keynumber = (int)e.Event.KeyValue;
             Gdk.Key key = e.Event.Key;
-            if ((e.Event.State & Gdk.ModifierType.ControlMask) != 0) {
-                // ctrl is pressed
+            if ((e.Event.State & Gdk.ModifierType.ControlMask) != 0 ||
+                (Frontend.IsMacOSX && (e.Event.State & Gdk.ModifierType.MetaMask) != 0)) {
+                // ctrl / cmd is pressed
                 e.RetVal = true;
                 switch (key) {
                     case Gdk.Key.x:
@@ -551,10 +558,6 @@ namespace Smuxi.Frontend.Gnome
                         _CommandDetach(cd);
                         handled = true;
                         break;
-                    case "echo":
-                        _CommandEcho(cd);
-                        handled = true;
-                        break;
                     case "window":
                         _CommandWindow(cd);
                         handled = true;
@@ -571,6 +574,10 @@ namespace Smuxi.Frontend.Gnome
                         _CommandSync(cd);
                         handled = true;
                         break;
+                    case "sort":
+                        CommandSort(cd);
+                        handled = true;
+                        break;
                     case "gc":
                         GC.Collect();
                         handled = true;
@@ -595,9 +602,9 @@ namespace Smuxi.Frontend.Gnome
             chatView.AddMessage(builder.ToMessage());
 
             string[] help = {
-            "help",
             "window (number|channelname|queryname|close)",
             "sync",
+            "sort",
             "clear",
             "echo data",
             "exec command",
@@ -623,15 +630,6 @@ namespace Smuxi.Frontend.Gnome
             Frontend.Quit();
         }
 
-        private void _CommandEcho(CommandModel cd)
-        {
-            var msg = new MessageBuilder().
-                AppendEventPrefix().
-                AppendText(cd.Parameter).
-                ToMessage();
-            cd.FrontendManager.AddMessageToChat(cd.Chat, msg);
-        }
-    
         private void _CommandWindow(CommandModel cd)
         {
             if (cd.DataArray.Length >= 2) {
@@ -687,15 +685,16 @@ namespace Smuxi.Frontend.Gnome
             var chatView = ChatViewManager.CurrentChatView;
             ThreadPool.QueueUserWorkItem(delegate {
                 try {
+                    var oldValue = Frontend.UseLowBandwidthMode;
                     // HACK: force a full sync
                     Frontend.UseLowBandwidthMode = false;
                     chatView.Sync();
-                    Frontend.UseLowBandwidthMode = true;
+                    Frontend.UseLowBandwidthMode = oldValue;
 
                     Gtk.Application.Invoke(delegate {
                         Frontend.UseLowBandwidthMode = false;
                         chatView.Populate();
-                        Frontend.UseLowBandwidthMode = true;
+                        Frontend.UseLowBandwidthMode = oldValue;
                         chatView.ScrollToEnd();
                     });
                 } catch (Exception ex) {
@@ -704,48 +703,85 @@ namespace Smuxi.Frontend.Gnome
             });
         }
 
-        private void _CommandClear(CommandModel cd)
+        void CommandSort(CommandModel cmd)
         {
-            ChatViewManager.CurrentChatView.Clear();
-        }
+            var chats = new List<ChatView>(ChatViewManager.Chats);
+            // as the sorting does 2 remoting calls, we use a background thread
+            ThreadPool.QueueUserWorkItem(delegate {
+                try {
+                    chats.Sort((x, y) => {
+                        if (x.ProtocolManager != null &&
+                            y.ProtocolManager != null &&
+                            x.ProtocolManager != y.ProtocolManager) {
+                            // REMOTING CALL 1
+                            var xprot = x.ProtocolManager.Protocol;
+                            // REMOTING CALL 2
+                            var yprot = y.ProtocolManager.Protocol;
+                            var prot = xprot.CompareTo(yprot);
+                            if (prot != 0) {
+                                return prot;
+                            }
+
+                            // theirs protocols are equal, so their network decide
+                            // REMOTING CALL 3
+                            var xnet = x.ProtocolManager.NetworkID;
+                            // REMOTING CALL 4
+                            var ynet = y.ProtocolManager.NetworkID;
+                            var net = xnet.CompareTo(ynet);
+                            if (net != 0) {
+                               return net;
+                            }
+                        }
 
-        void CommandGenerateMessages(CommandModel cd)
-        {
-            var count = 0;
-            Int32.TryParse(cd.Parameter, out count);
+                        // their networks are equal, so their type decide
+                        var type = GetChatSortValue(y).CompareTo(GetChatSortValue(x));
+                        if (type != 0) {
+                            return type;
+                        }
 
-            var chat = ChatViewManager.CurrentChatView;
-            var builder = new MessageBuilder();
-            var sender = new ContactModel("msg-tester", "msg-tester", "test", "test");
-            builder.AppendMessage(sender, "time for a messsage generator command so I can test speed and memory usage");
-            var text = builder.CreateText(" *formatted text* ");
-            text.Bold = true;
-            builder.Append(text);
-            builder.AppendUrl("https://www.smuxi.org/");
+                        // their types are equal, so their name decides
+                        return x.ID.CompareTo(y.ID);
+                    });
 
-            var msgs = new List<MessageModel>(count);
-            for (var i = 0; i < count; i++) {
-                var msg = builder.ToMessage();
-                msgs.Add(msg);
-            }
+                    Gtk.Application.Invoke(delegate {
+                        for (int i = 0; i < chats.Count; i++) {
+                            Frontend.MainWindow.Notebook.ReorderChild(chats[i], i);
+                        }
+                    });
+                } catch (Exception ex) {
+#if LOG4NET
+                    _Logger.Error("CommandSort(): Exception", ex);
+#endif
+                }
+            });
+        }
 
-            DateTime start, stop;
-            start = DateTime.UtcNow;
-            foreach (var msg in msgs) {
-                chat.AddMessage(msg);
+        int GetChatSortValue(ChatView chat)
+        {
+            int status = 0;
+            if (chat is SessionChatView) {
+                status += 100;
             }
-            stop = DateTime.UtcNow;
+            if (chat is ProtocolChatView) {
+                status += 50;
+            }
+            if (chat is GroupChatView) {
+                status += 10;
+            }
+            return status;
+        }
 
-            builder = new MessageBuilder();
-            builder.AppendText(
-                "ChatView.AddMessage(): count: {0} took: {1:0} ms avg: {2:0.00} ms",
-                count,
-                (stop - start).TotalMilliseconds,
-                (stop - start).TotalMilliseconds / count
-            );
-            chat.AddMessage(builder.ToMessage());
+        private void _CommandClear(CommandModel cd)
+        {
+            ChatViewManager.CurrentChatView.Clear();
+        }
 
-            builder = new MessageBuilder();
+        void CommandGenerateMessages(CommandModel cmd)
+        {
+            var chat = ChatViewManager.CurrentChatView;
+            _CommandManager.CommandGenerateMessages(cmd, chat);
+
+            var builder = new MessageBuilder();
             builder.AppendText(
                 "ChatView.AddMessage(): MessageTextTagTable.Size: {0}",
                 chat.OutputMessageTextView.MessageTextTagTable.Size
diff --git a/src/Frontend-GNOME/Frontend.cs b/src/Frontend-GNOME/Frontend.cs
index 2a185df..2dd1234 100644
--- a/src/Frontend-GNOME/Frontend.cs
+++ b/src/Frontend-GNOME/Frontend.cs
@@ -1,7 +1,7 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2005-2011 Mirco Bauer <meebey at meebey.net>
+ * Copyright (c) 2005-2013 Mirco Bauer <meebey at meebey.net>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -458,6 +458,7 @@ namespace Smuxi.Frontend.Gnome
                     }
                     Session = _MainWindow.EngineManager.Session;
                     _UserConfig = _MainWindow.EngineManager.UserConfig;
+                    EngineVersion = _MainWindow.EngineManager.EngineVersion;
 
                     Gtk.Application.Invoke(delegate {
                         Frontend.ConnectEngineToGUI();
@@ -512,7 +513,13 @@ namespace Smuxi.Frontend.Gnome
 
                 DisconnectEngineFromGUI();
             }
-            
+
+#if LOG4NET
+            // HACK: workaround log4net deadlock issue. Not sure if it has any
+            // effect though, see: https://www.smuxi.org/issues/show/876
+            log4net.Core.LoggerManager.Shutdown();
+#endif
+
             Gtk.Application.Quit();
             
             Environment.Exit(0);
@@ -1077,17 +1084,21 @@ namespace Smuxi.Frontend.Gnome
                 }
             }
             var appIconDir = Path.Combine(appDir, "icons");
-            if (Directory.Exists(appIconDir) &&
-                (Frontend.IsMacOSX ||
-                 Frontend.IsWindows ||
-                 unityWithLightIcons)) {
-                var iconTheme = "Faenza-Smuxi";
+            if (Directory.Exists(appIconDir)) {
+                var iconTheme = "Smuxi-Symbolic";
 #if LOG4NET
                 _Logger.InfoFormat("InitGtk(): Setting icon theme to: {0}",
                                     iconTheme);
 #endif
+                var origin = Assembly.GetExecutingAssembly().FullName;
                 settings.SetStringProperty(
-                    "gtk-icon-theme-name", iconTheme, Assembly.GetExecutingAssembly().FullName
+                    "gtk-icon-theme-name", iconTheme, origin
+                );
+                settings.SetLongProperty(
+                    "gtk-menu-images", 0, origin
+                 );
+                settings.SetLongProperty(
+                    "gtk-button-images", 0, origin
                 );
 #if LOG4NET
                 _Logger.InfoFormat("InitGtk(): Prepending {0} to icon search path",
diff --git a/src/Frontend-GNOME/Makefile.in b/src/Frontend-GNOME/Makefile.in
index 4690296..3a06d01 100644
--- a/src/Frontend-GNOME/Makefile.in
+++ b/src/Frontend-GNOME/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend-gnome.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend-gnome.in \
+	ChangeLog
 @WITH_MESSAGINGMENU_SHARP_INCLUDED_TRUE at am__append_1 = $(MESSAGINGMENU_SHARP_INCLUDED_LIBS) \
 @WITH_MESSAGINGMENU_SHARP_INCLUDED_TRUE@	$(MESSAGINGMENU_SHARP_INCLUDED_LIBS).config \
 @WITH_MESSAGINGMENU_SHARP_INCLUDED_TRUE@	$(GIO_SHARP_DLL) \
@@ -109,6 +136,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)" "$(DESTDIR)$(svgicondir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -120,6 +159,7 @@ DATA = $(desktop_DATA) $(icon128_DATA) $(icon16_DATA) $(icon22_DATA) \
 	$(icon24_DATA) $(icon256_DATA) $(icon32_DATA) $(icon48_DATA) \
 	$(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA) $(svgicon_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -165,6 +205,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -269,7 +310,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -985,11 +1025,11 @@ uninstall-svgiconDATA:
 	@list='$(svgicon_DATA)'; test -n "$(svgicondir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(svgicondir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -1145,22 +1185,23 @@ uninstall-am: uninstall-binSCRIPTS uninstall-desktopDATA \
 .MAKE: install-am install-data-am install-strip uninstall-am
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am \
-	install-data-hook install-desktopDATA install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-icon128DATA install-icon16DATA \
-	install-icon22DATA install-icon24DATA install-icon256DATA \
-	install-icon32DATA install-icon48DATA install-info \
-	install-info-am install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-data-hook install-desktopDATA \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-icon128DATA \
+	install-icon16DATA install-icon22DATA install-icon24DATA \
+	install-icon256DATA install-icon32DATA install-icon48DATA \
+	install-info install-info-am \
+	install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip install-svgiconDATA installcheck installcheck-am \
 	installdirs maintainer-clean maintainer-clean-generic \
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
+	ps ps-am tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-desktopDATA uninstall-hook uninstall-icon128DATA \
 	uninstall-icon16DATA uninstall-icon22DATA uninstall-icon24DATA \
 	uninstall-icon256DATA uninstall-icon32DATA \
diff --git a/src/Frontend-GNOME/NetworkManager.cs b/src/Frontend-GNOME/NetworkManager.cs
index 87a35f1..be3c625 100644
--- a/src/Frontend-GNOME/NetworkManager.cs
+++ b/src/Frontend-GNOME/NetworkManager.cs
@@ -20,6 +20,7 @@
 
 #if IPC_DBUS
 using System;
+using System.Threading;
     #if DBUS_SHARP
 using DBus;
     #else
@@ -129,7 +130,15 @@ namespace Smuxi.Frontend.Gnome
                     if (WasLocalEngine) {
                         // reconnect local protocol managers
                         foreach (var protocolManager in Frontend.Session.ProtocolManagers) {
-                            protocolManager.Reconnect(Frontend.FrontendManager);
+                            var pm = protocolManager;
+                            // run in background so it can't block the GUI
+                            ThreadPool.QueueUserWorkItem(delegate {
+                                try {
+                                    pm.Reconnect(Frontend.FrontendManager);
+                                } catch (Exception ex) {
+                                    Frontend.ShowException(ex);
+                                }
+                            });
                         }
                     } else {
                         Frontend.ReconnectEngineToGUI(false);
diff --git a/src/Frontend-GNOME/Preferences/PreferencesDialog.cs b/src/Frontend-GNOME/Preferences/PreferencesDialog.cs
index 855f42f..25c3bfb 100644
--- a/src/Frontend-GNOME/Preferences/PreferencesDialog.cs
+++ b/src/Frontend-GNOME/Preferences/PreferencesDialog.cs
@@ -305,6 +305,14 @@ namespace Smuxi.Frontend.Gnome
             string connect_commands = String.Join("\n", (string[])Frontend.UserConfig["Connection/OnConnectCommands"]);
             ((Gtk.TextView)_Glade["OnConnectCommandsTextView"]).Buffer.Text = connect_commands;
 
+            var autoConvertUTF8CheckButton = (Gtk.CheckButton) _Glade["AutoConvertUTF8CheckButton"];
+            if (Frontend.EngineVersion >= new Version("0.8.12")) {
+                autoConvertUTF8CheckButton.Active =
+                    (bool) Frontend.UserConfig["Connection/AutoConvertUTF8"];
+            } else {
+                autoConvertUTF8CheckButton.Sensitive = false;
+            }
+
             string encoding = (string)Frontend.UserConfig["Connection/Encoding"];
             encoding = encoding.ToUpper();
 
@@ -681,7 +689,12 @@ namespace Smuxi.Frontend.Gnome
                 ((Gtk.Entry)_Glade["ConnectionRealnameEntry"]).Text;
             Frontend.UserConfig["Connection/OnConnectCommands"] = 
                 ((Gtk.TextView)_Glade["OnConnectCommandsTextView"]).Buffer.Text.Split(new char[] {'\n'});
-            
+
+            if (Frontend.EngineVersion >= new Version("0.8.12")) {
+                Frontend.UserConfig["Connection/AutoConvertUTF8"] =
+                    ((Gtk.CheckButton)_Glade["AutoConvertUTF8CheckButton"]).Active;
+            }
+
             Gtk.ComboBox cb = (Gtk.ComboBox)_Glade["EncodingComboBox"];
             Gtk.TreeIter iter;
             cb.GetActiveIter(out iter);
@@ -1036,6 +1049,7 @@ namespace Smuxi.Frontend.Gnome
             ((Gtk.Entry) _Glade["ConnectionUsernameEntry"]).Visible = showAdvanced;
             ((Gtk.Label) _Glade["EncodingLabel"]).Visible = showAdvanced;
             ((Gtk.ComboBox) _Glade["EncodingComboBox"]).Visible = showAdvanced;
+            ((Gtk.CheckButton) _Glade["AutoConvertUTF8CheckButton"]).Visible = showAdvanced;
             ((Gtk.Frame) _Glade["NetworkProxyFrame"]).Visible = showAdvanced;
             ((Gtk.Frame) _Glade["GlobalCommandsFrame"]).Visible = showAdvanced;
         }
diff --git a/src/Frontend-GNOME/QuickConnectDialog.cs b/src/Frontend-GNOME/QuickConnectDialog.cs
index a3cd11c..e8bb14f 100644
--- a/src/Frontend-GNOME/QuickConnectDialog.cs
+++ b/src/Frontend-GNOME/QuickConnectDialog.cs
@@ -206,16 +206,10 @@ namespace Smuxi.Frontend.Gnome
             f_ConnectButton.Sensitive =
                 !f_Widget.HostnameEntry.Visible ||
                 f_Widget.HostnameEntry.Text.Trim().Length > 0;
-        }
-        
-        protected virtual void OnHostnameEntryChanged(object sender, EventArgs e)
-        {
-            Trace.Call(sender, e);
-            
-            try {
-                CheckConnectButton();
-            } catch (Exception ex) {
-                Frontend.ShowException(ex);
+            if (f_ConnectButton.Sensitive &&
+                f_Widget.ProtocolComboBox.ActiveText == "Campfire" &&
+                f_Widget.HostnameEntry.Text == ".campfirenow.com") {
+                f_ConnectButton.Sensitive = false;
             }
         }
     }
diff --git a/src/Frontend-GNOME/Views/Chats/ChatView.cs b/src/Frontend-GNOME/Views/Chats/ChatView.cs
index 2917306..32828d6 100644
--- a/src/Frontend-GNOME/Views/Chats/ChatView.cs
+++ b/src/Frontend-GNOME/Views/Chats/ChatView.cs
@@ -221,6 +221,8 @@ namespace Smuxi.Frontend.Gnome
             get {
                 return new List<PersonModel>();
             }
+            protected set {
+            }
         }
 
         public Gtk.Widget LabelWidget {
@@ -745,18 +747,23 @@ namespace Smuxi.Frontend.Gnome
             }
 
             Gtk.Menu popup = e.Menu;
-            popup.Prepend(new Gtk.SeparatorMenuItem());
 
-            var item = new Gtk.CheckMenuItem(_("Show _Menubar"));
-            item.Active = Frontend.MainWindow.ShowMenuBar;
-            item.Activated += delegate {
-                try {
-                    Frontend.MainWindow.ShowMenuBar = !Frontend.MainWindow.ShowMenuBar;
-                } catch (Exception ex) {
-                    Frontend.ShowException(ex);
-                }
-            };
-            popup.Prepend(item);
+            // hide menu bar item as it uses the app menu on OS X
+            if (!Frontend.IsMacOSX) {
+                popup.Prepend(new Gtk.SeparatorMenuItem());
+
+                var item = new Gtk.CheckMenuItem(_("Show _Menubar"));
+                item.Active = Frontend.MainWindow.ShowMenuBar;
+                item.Activated += delegate {
+                    try {
+                        Frontend.MainWindow.ShowMenuBar = !Frontend.MainWindow.ShowMenuBar;
+                    } catch (Exception ex) {
+                        Frontend.ShowException(ex);
+                    }
+                };
+                popup.Prepend(item);
+            }
+
             popup.ShowAll();
         }
 
diff --git a/src/Frontend-GNOME/Views/Chats/GroupChatView.cs b/src/Frontend-GNOME/Views/Chats/GroupChatView.cs
index be4df9c..e3d94b7 100644
--- a/src/Frontend-GNOME/Views/Chats/GroupChatView.cs
+++ b/src/Frontend-GNOME/Views/Chats/GroupChatView.cs
@@ -24,6 +24,7 @@ using System;
 using System.Threading;
 using System.Collections.Generic;
 using System.Globalization;
+using System.Linq;
 using Mono.Unix;
 using Smuxi.Engine;
 using Smuxi.Common;
@@ -51,6 +52,9 @@ namespace Smuxi.Frontend.Gnome
         private Gtk.TreeViewColumn _IdentityNameColumn;
         IDictionary<string, PersonModel> SyncedPersons { get; set; }
         MessageModel                     SyncedTopic  { get; set; }
+        public override IList<PersonModel> Participants { get; protected set; }
+        protected Gtk.CellRendererText IdentityNameCellRenderer { get; set; }
+        Gtk.ScrolledWindow PersonScrolledWindow { get; set; }
 
         public override bool HasSelection {
             get {
@@ -82,20 +86,6 @@ namespace Smuxi.Frontend.Gnome
             }
         }
 
-        public override IList<PersonModel> Participants {
-            get {
-                var participants = new List<PersonModel>();
-                if (_PersonListStore == null) {
-                    return participants;
-                }
-                foreach (object[] row in _PersonListStore) {
-                    var person = (PersonModel) row[0];
-                    participants.Add(person);
-                }
-                return participants;
-            }
-        }
-
         protected Gtk.TreeView PersonTreeView {
             get {
                 return _PersonTreeView;
@@ -134,12 +124,46 @@ namespace Smuxi.Frontend.Gnome
             _GroupChatModel = groupChat;
             
             // person list
+            Participants = new List<PersonModel>();
             _OutputHPaned = new Gtk.HPaned();
-            
+            _OutputHPaned.ButtonPressEvent += (sender, e) => {;
+                // reset person list size on double click
+                if (e.Event.Type == Gdk.EventType.TwoButtonPress &&
+                    e.Event.Button == 1) {
+                    GLib.Timeout.Add(200, delegate {
+                        _OutputHPaned.Position = -1;
+                        return false;
+                    });
+                }
+            };
+
             Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
-            //sw.WidthRequest = 150;
+            PersonScrolledWindow = sw;
             sw.HscrollbarPolicy = Gtk.PolicyType.Never;
-            
+            sw.SizeRequested += (o, args) => {
+                // predict and set useful treeview width
+                var persons = SyncedPersons;
+                if (persons == null || persons.Count == 0) {
+                    return;
+                }
+
+                int longestNameWidth = 0;
+                foreach (var person in persons.Values) {
+                    int lineWidth, lineHeigth;
+                    using (var layout = _PersonTreeView.CreatePangoLayout(person.IdentityName)) {
+                        layout.GetPixelSize(out lineWidth, out lineHeigth);
+                    }
+                    if (lineWidth > longestNameWidth) {
+                        longestNameWidth = lineWidth;
+                    }
+                }
+
+                var bestSize = new Gtk.Requisition() {
+                    Width = longestNameWidth
+                };
+                args.Requisition = bestSize;
+            };
+
             Gtk.TreeView tv = new Gtk.TreeView();
             _PersonTreeView = tv;
             //tv.CanFocus = false;
@@ -149,7 +173,7 @@ namespace Smuxi.Frontend.Gnome
             
             Gtk.TreeViewColumn column;
             Gtk.CellRendererText cellr = new Gtk.CellRendererText();
-            cellr.WidthChars = 12;
+            IdentityNameCellRenderer = cellr;
             column = new Gtk.TreeViewColumn(String.Empty, cellr);
             column.SortColumnId = 0;
             column.Spacing = 0;
@@ -301,7 +325,8 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call();
 
             // sync persons
-            if (_PersonTreeView != null) {
+            var persons = SyncedPersons;
+            if (_PersonTreeView != null && persons != null) {
                 // HACK: out of scope
                 string status = String.Format(
                                     _("Retrieving user list for {0}..."),
@@ -313,31 +338,25 @@ namespace Smuxi.Frontend.Gnome
                 ls.Clear();
                 // detach the model (less CPU load)
                 _PersonTreeView.Model = new Gtk.ListStore(typeof(PersonModel));
+                Participants = new List<PersonModel>();
                 string longestName = String.Empty;
-                foreach (PersonModel person in SyncedPersons.Values) {
+                foreach (var person in persons.Values.OrderBy(x => x)) {
                     ls.AppendValues(person);
                     
                     if (person.IdentityName.Length > longestName.Length) {
                         longestName = person.IdentityName;
                     }
+                    Participants.Add(person);
                 }
                 // attach the model again
                 // BUG? TreeView doesn't seem to recognize existing values in the model?!?
                 // see: http://www.smuxi.org/issues/show/132
                 _PersonTreeView.Model = ls;
                 _PersonTreeView.SearchColumn = 0;
-                
-                /*
-                // predict and set useful width
-                Console.WriteLine("longestNickname: " + longestName);
-                Pango.Layout layout = _PersonScrolledWindow.CreatePangoLayout(longestName);
-                //_PersonScrolledWindow.WidthRequest = layout.Width;
-                Console.WriteLine("layout.Width: " + layout.Width);
-                _PersonScrolledWindow.SetSizeRequest(layout.Width, 0);
-                */
-                
-                UpdatePersonCount(); 
-               
+
+                PersonScrolledWindow.CheckResize();
+                UpdatePersonCount();
+
                 // TRANSLATOR: this string will be appended to the one above
                 status += String.Format(" {0}", _("done."));
                 Frontend.MainWindow.Status = status;
@@ -348,6 +367,26 @@ namespace Smuxi.Frontend.Gnome
 
             base.Populate();
         }
+
+        public override void AddMessage(MessageModel msg)
+        {
+            base.AddMessage(msg);
+
+            var nick = msg.GetNick();
+            if (nick == null) {
+                return;
+            }
+
+            // update who spoke last
+            for (int i = 0; i < Participants.Count; ++i) {
+                var speaker = Participants[i];
+                if (speaker.IdentityName == nick) {
+                    Participants.RemoveAt(i);
+                    Participants.Insert(0, speaker);
+                    break;
+                }
+            }
+        }
         
         protected void UpdatePersonCount()
         {
@@ -365,6 +404,7 @@ namespace Smuxi.Frontend.Gnome
             }
             
             _PersonListStore.AppendValues(person);
+            Participants.Add(person);
             UpdatePersonCount();
         }
         
@@ -395,6 +435,13 @@ namespace Smuxi.Frontend.Gnome
             } while (_PersonListStore.IterNext(ref iter));
             _PersonTreeView.CheckResize();
             //_PersonListStore.Reorder();
+
+            for (int i = 0; i < Participants.Count; ++i) {
+                if (Participants[i].ID == oldPerson.ID) {
+                    Participants[i] = newPerson;
+                    break;
+                }
+            }
         }
         
         public void RemovePerson(PersonModel person)
@@ -422,6 +469,14 @@ namespace Smuxi.Frontend.Gnome
                     break;
                 }
             } while (_PersonListStore.IterNext(ref iter));
+
+            for (int i = 0; i < Participants.Count; ++i) {
+                if (Participants[i].ID == person.ID) {
+                    Participants.RemoveAt(i);
+                    break;
+                }
+            }
+
             UpdatePersonCount();
         }
 
@@ -480,11 +535,11 @@ namespace Smuxi.Frontend.Gnome
                 _OutputHPaned.Remove(_OutputVBox);
             }
             if (userlist_pos == "left") {
-                _OutputHPaned.Pack1(_PersonTreeViewFrame, false, false);
+                _OutputHPaned.Pack1(_PersonTreeViewFrame, false, true);
                 _OutputHPaned.Pack2(_OutputVBox, true, true);
             } else if (userlist_pos == "right") {
                 _OutputHPaned.Pack1(_OutputVBox, true, true);
-                _OutputHPaned.Pack2(_PersonTreeViewFrame, false, false);
+                _OutputHPaned.Pack2(_PersonTreeViewFrame, false, true);
             } else if (userlist_pos == "none") {
                 _OutputHPaned.Pack1(_OutputVBox, true, true);
             } else {
diff --git a/src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs b/src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs
index d1cb278..e6de0fa 100644
--- a/src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs
+++ b/src/Frontend-GNOME/Views/Chats/ProtocolChatView.cs
@@ -87,7 +87,16 @@ namespace Smuxi.Frontend.Gnome
             // Twitter
             NetworkWebsiteUrls.Add("Twitter", "http://www.twitter.com/");
 
-            // XMPP
+            // XMPP - with federation
+            NetworkWebsiteUrls.Add("XMPP", "http://xmpp.org/");
+            NetworkWebsiteUrls.Add("jabber.org", "http://planet.jabber.org/");
+            NetworkWebsiteUrls.Add("jabber.de", "http://www.jabber.de/");
+            NetworkWebsiteUrls.Add("jabber.at", "http://planet.jabber.org/");
+            NetworkWebsiteUrls.Add("jabber.ccc.de", "http://web.jabber.ccc.de/");
+            NetworkWebsiteUrls.Add("xmpp-gmx.gmx.net", "http://planet.jabber.org/");
+            NetworkWebsiteUrls.Add("xmpp-webde.gmx.net", "http://planet.jabber.org/");
+            NetworkWebsiteUrls.Add("jabber.gmx.net", "http://planet.jabber.org/");
+            // XMPP - without federation
             NetworkWebsiteUrls.Add("talk.google.com", "http://www.google.com/talk/");
             NetworkWebsiteUrls.Add("chat.facebook.com", "http://www.facebook.com/");
 
@@ -96,6 +105,19 @@ namespace Smuxi.Frontend.Gnome
 
             // Campfire
             NetworkWebsiteUrls.Add("Campfire", "http://campfirenow.com");
+
+            // support downloading favicons via https
+            var whitelist = Session.CertificateValidator.HostnameWhitelist;
+            lock (whitelist) {
+                foreach (var url in NetworkWebsiteUrls.Values) {
+                    var uri = new Uri(url);
+                    var hostname = uri.Host;
+                    if (whitelist.Contains(hostname)) {
+                        continue;
+                    }
+                    whitelist.Add(hostname);
+                }
+            }
         }
 
         public ProtocolChatView(ChatModel chat) : base(chat)
@@ -220,8 +242,6 @@ namespace Smuxi.Frontend.Gnome
                 // download in background so Sync() doesn't get slowed down
                 ThreadPool.QueueUserWorkItem(delegate {
                     try {
-                        // HACK: work around Mono's buggy certificate validation
-                        ServicePointManager.ServerCertificateValidationCallback += ValidateCertificate;
                         DownloadServerIcon(websiteUrl, iconFile);
                         iconFile.Refresh();
                         if (!iconFile.Exists || iconFile.Length == 0) {
@@ -232,8 +252,6 @@ namespace Smuxi.Frontend.Gnome
 #if LOG4NET
                         f_Logger.Error("CheckIcon(): Exception", ex);
 #endif
-                    } finally {
-                        ServicePointManager.ServerCertificateValidationCallback -= ValidateCertificate;
                     }
                 });
             }
@@ -253,8 +271,8 @@ namespace Smuxi.Frontend.Gnome
                     // null so explicitely override this by setting an empty proxy
                     proxy = new WebProxy();
                 }
+                webClient.Proxy = proxy;
             }
-            webClient.Proxy = proxy;
             var content = webClient.DownloadString(websiteUrl);
             var links = new List<Dictionary<string, string>>();
             foreach (Match linkMatch in Regex.Matches(content, @"<link[\s]+([^>]*?)/?>")) {
@@ -300,7 +318,10 @@ namespace Smuxi.Frontend.Gnome
 #endif
 
             var iconRequest = WebRequest.Create(faviconUrl);
-            iconRequest.Proxy = proxy;
+            // ignore proxy settings of remote engines
+            if (Frontend.IsLocalEngine) {
+                iconRequest.Proxy = proxy;
+            }
             if (iconRequest is HttpWebRequest) {
                 var iconHttpRequest = (HttpWebRequest) iconRequest;
                 if (iconFile.Exists) {
diff --git a/src/Frontend-GNOME/Views/MenuWidget.cs b/src/Frontend-GNOME/Views/MenuWidget.cs
index 8486a52..e2c6767 100644
--- a/src/Frontend-GNOME/Views/MenuWidget.cs
+++ b/src/Frontend-GNOME/Views/MenuWidget.cs
@@ -106,13 +106,17 @@ namespace Smuxi.Frontend.Gnome
             f_OpenLogToolAction.IconName = Gtk.Stock.Open;
             f_FindGroupChatToolAction.IconName = Gtk.Stock.Find;
 
+            f_MenuToolbar.ShowAll();
+            f_MenuToolbar.NoShowAll = true;
+            f_MenuToolbar.Visible = (bool) Frontend.FrontendConfig["ShowToolBar"];
+
             f_MenuBar.ShowAll();
             f_MenuBar.NoShowAll = true;
             f_MenuBar.Visible = (bool) Frontend.FrontendConfig["ShowMenuBar"];
 
             JoinWidget = new JoinWidget();
             JoinWidget.NoShowAll = true;
-            JoinWidget.Visible = (bool) Frontend.FrontendConfig["ShowQuickJoin"];
+            JoinWidget.Visible = f_MenuToolbar.Visible;
             JoinWidget.Activated += OnJoinWidgetActivated;
 
             var joinToolItem = new Gtk.ToolItem();
@@ -121,8 +125,8 @@ namespace Smuxi.Frontend.Gnome
             f_JoinToolbar.ShowAll();
 
             f_ShowMenubarAction.Active = (bool) Frontend.FrontendConfig["ShowMenuBar"];
+            f_ShowToolbarAction.Active = (bool) Frontend.FrontendConfig["ShowToolBar"];
             f_ShowStatusbarAction.Active = (bool) Frontend.FrontendConfig["ShowStatusBar"];
-            f_ShowJoinBarAction.Active = JoinWidget.Visible;
 
             if (Frontend.IsMacOSX) {
                 // Smuxi menu is already shown as app menu
@@ -133,6 +137,8 @@ namespace Smuxi.Frontend.Gnome
                 IgeMacMenu.GlobalKeyHandlerEnabled = true;
                 IgeMacMenu.MenuBar = f_MenuBar;
                 f_ShowMenubarAction.Active = false;
+                // no need for the menu bar as have the app menu
+                f_ShowMenubarAction.Visible = false;
 
                 var appGroup = IgeMacMenu.AddAppMenuGroup();
                 appGroup.AddMenuItem(
@@ -262,8 +268,8 @@ namespace Smuxi.Frontend.Gnome
             Trace.Call(sender, e);
 
             try {
-                if (!f_ShowJoinBarAction.Active) {
-                    f_ShowJoinBarAction.Activate();
+                if (!f_ShowToolbarAction.Active) {
+                    f_ShowToolbarAction.Activate();
                 }
                 JoinWidget.HasFocus = true;
             } catch (Exception ex) {
@@ -460,42 +466,44 @@ namespace Smuxi.Frontend.Gnome
             }
         }
 
-        protected void OnShowStatusbarActionToggled(object sender, EventArgs e)
+        protected void OnShowToolbarActionToggled(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
             try {
-                var active = f_ShowStatusbarAction.Active;
-                MainWindow.ShowStatusbar = active;
-                Frontend.FrontendConfig["ShowStatusBar"] = active;
+                var active = f_ShowToolbarAction.Active;
+                f_MenuToolbar.Visible = active;
+                // also hide/show join bar
+                JoinWidget.Visible = active;
+                Frontend.FrontendConfig["ShowToolBar"] = active;
                 Frontend.FrontendConfig.Save();
             } catch (Exception ex) {
                 Frontend.ShowException(Parent, ex);
             }
         }
 
-        protected virtual void OnJoinWidgetActivated(object sender, EventArgs e)
+        protected void OnShowStatusbarActionToggled(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
             try {
-                var chatLink = JoinWidget.GetChatLink();
-                Frontend.OpenChatLink(chatLink);
-                JoinWidget.Clear();
+                var active = f_ShowStatusbarAction.Active;
+                MainWindow.ShowStatusbar = active;
+                Frontend.FrontendConfig["ShowStatusBar"] = active;
+                Frontend.FrontendConfig.Save();
             } catch (Exception ex) {
                 Frontend.ShowException(Parent, ex);
             }
         }
 
-        protected void OnShowJoinBarActionToggled(object sender, EventArgs e)
+        protected virtual void OnJoinWidgetActivated(object sender, EventArgs e)
         {
             Trace.Call(sender, e);
 
             try {
-                var active = f_ShowJoinBarAction.Active;
-                JoinWidget.Visible = active;
-                Frontend.FrontendConfig["ShowQuickJoin"] = active;
-                Frontend.FrontendConfig.Save();
+                var chatLink = JoinWidget.GetChatLink();
+                Frontend.OpenChatLink(chatLink);
+                JoinWidget.Clear();
             } catch (Exception ex) {
                 Frontend.ShowException(Parent, ex);
             }
diff --git a/src/Frontend-GNOME/Views/MessageTextView.cs b/src/Frontend-GNOME/Views/MessageTextView.cs
index c821c01..0153870 100644
--- a/src/Frontend-GNOME/Views/MessageTextView.cs
+++ b/src/Frontend-GNOME/Views/MessageTextView.cs
@@ -321,11 +321,6 @@ namespace Smuxi.Frontend.Gnome
                     var linkText = urlPart.Text ?? urlPart.Url;
 
                     var url = urlPart.Url;
-                    // HACK: assume http if no protocol/scheme was specified
-                    if (urlPart.Protocol == UrlProtocol.None ||
-                        !Regex.IsMatch(url, @"^[a-zA-Z0-9\-]+:")) {
-                        url = String.Format("http://{0}", url);
-                    }
                     Uri uri;
                     try {
                         uri = new Uri(url);
diff --git a/src/Frontend-GNOME/Views/ServerDialog.cs b/src/Frontend-GNOME/Views/ServerDialog.cs
index 975e8a7..9bf7893 100644
--- a/src/Frontend-GNOME/Views/ServerDialog.cs
+++ b/src/Frontend-GNOME/Views/ServerDialog.cs
@@ -51,6 +51,15 @@ namespace Smuxi.Frontend.Gnome
 
             f_Widget.InitProtocols(supportedProtocols);
             f_Widget.InitNetworks(networks);
+
+            f_Widget.ProtocolComboBox.Changed += delegate {
+                CheckOkButton();
+            };
+            f_Widget.HostnameEntry.Changed += delegate {
+                CheckOkButton();
+            };
+            CheckOkButton();
+
             if (server != null) {
                 try {
                     f_Widget.Load(server);
@@ -61,6 +70,20 @@ namespace Smuxi.Frontend.Gnome
             }
         }
 
+        protected virtual void CheckOkButton()
+        {
+            Trace.Call();
+
+            f_OkButton.Sensitive = true;
+            switch (f_Widget.ProtocolComboBox.ActiveText) {
+                case "Campfire":
+                    if (f_Widget.HostnameEntry.Text == ".campfirenow.com") {
+                        f_OkButton.Sensitive = false;
+                    }
+                    break;
+            }
+        }
+
         public ServerModel GetServer()
         {
             return f_Widget.GetServer();
diff --git a/src/Frontend-GNOME/Views/ServerWidget.cs b/src/Frontend-GNOME/Views/ServerWidget.cs
index 2d40a85..482720f 100644
--- a/src/Frontend-GNOME/Views/ServerWidget.cs
+++ b/src/Frontend-GNOME/Views/ServerWidget.cs
@@ -1,8 +1,6 @@
-// $Id$
-// 
 // Smuxi - Smart MUltipleXed Irc
 // 
-// Copyright (c) 2010 Mirco Bauer <meebey at meebey.net>
+// Copyright (c) 2010-2013 Mirco Bauer <meebey at meebey.net>
 // 
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 // 
@@ -46,6 +44,28 @@ namespace Smuxi.Frontend.Gnome
             }
         }
 
+        public string Protocol {
+            set {
+                Gtk.ListStore store = (Gtk.ListStore) ProtocolComboBox.Model;
+                int protocolPosition = -1;
+                int j = 0;
+                foreach (object[] row in store) {
+                    string protocolName = (string) row[0];
+                    if (protocolName == value) {
+                        protocolPosition = j;
+                        break;
+                    }
+                    j++;
+                }
+                if (protocolPosition == -1) {
+                    throw new ArgumentOutOfRangeException(
+                        "Unsupported protocol: " + value
+                    );
+                }
+                f_ProtocolComboBox.Active = protocolPosition;
+            }
+        }
+
         public Gtk.ComboBoxEntry NetworkComboBoxEntry {
             get {
                 return f_NetworkComboBoxEntry;
@@ -110,22 +130,8 @@ namespace Smuxi.Frontend.Gnome
 
             // protocol is part of the PKEY, not allowed to change
             f_ProtocolComboBox.Sensitive = false;
-            Gtk.ListStore store = (Gtk.ListStore) ProtocolComboBox.Model;
-
-            int protocolPosition = -1;
-            int j = 0;
-            foreach (object[] row in store) {
-                string protocolName = (string) row[0];
-                if (protocolName == server.Protocol) {
-                    protocolPosition = j;
-                    break;
-                }
-                j++;
-            }
-            if (protocolPosition == -1) {
-                throw new ApplicationException("Unsupported protocol: " + server.Protocol);
-            }
-            f_ProtocolComboBox.Active = protocolPosition;
+
+            Protocol = server.Protocol;
             ServerID = server.ServerID;
             f_HostnameEntry.Text = server.Hostname;
             f_NetworkComboBoxEntry.Entry.Text = server.Network;
@@ -199,7 +205,12 @@ namespace Smuxi.Frontend.Gnome
             }
             store.SetSortColumnId(0, Gtk.SortType.Ascending);
             f_ProtocolComboBox.Model = store;
-            f_ProtocolComboBox.Active = 0;
+
+            try {
+                // select IRC by default (if available)
+                Protocol = "IRC";
+            } catch (ArgumentOutOfRangeException) {
+            }
         }
 
         public void InitNetworks(IList<string> networks)
@@ -266,6 +277,9 @@ namespace Smuxi.Frontend.Gnome
                 case "IRC":
                     f_PortSpinButton.Value = useEncryption ? 6697 : 6667;
                     break;
+                case "JabbR":
+                    f_PortSpinButton.Value = useEncryption ? 443 : 80;
+                    break;
             }
         }
 
@@ -324,10 +338,14 @@ namespace Smuxi.Frontend.Gnome
                     ShowHostname = false;
                     ShowNetwork = false;
                     ShowPassword = false;
-                    SupportUseEncryption = false;
+                    SupportUseEncryption = true;
+                    // engine always uses https
+                    f_UseEncryptionCheckButton.Active = true;
+                    f_UseEncryptionCheckButton.Sensitive = false;
 
                     f_HostnameEntry.Text = String.Empty;
-                    f_PortSpinButton.Value = 0;
+                    f_PortSpinButton.Value = 443;
+                    f_PortSpinButton.Sensitive = false;
                     f_NetworkComboBoxEntry.Entry.Text = String.Empty;
                     f_PasswordEntry.Text = String.Empty;
                     break;
@@ -335,11 +353,28 @@ namespace Smuxi.Frontend.Gnome
                     ShowHostname = true;
                     ShowNetwork = false;
                     ShowPassword = true;
-                    SupportUseEncryption = false;
+                    SupportUseEncryption = true;
+                    // engine always uses https
+                    f_UseEncryptionCheckButton.Active = true;
+                    f_UseEncryptionCheckButton.Sensitive = false;
 
                     f_HostnameEntry.Text = ".campfirenow.com";
                     f_HostnameEntry.Sensitive = true;
-                    f_PortSpinButton.Value = 0;
+                    f_PortSpinButton.Value = 443;
+                    f_PortSpinButton.Sensitive = false;
+                    f_NetworkComboBoxEntry.Entry.Text = String.Empty;
+                    f_PasswordEntry.Text = String.Empty;
+                    break;
+                case "JabbR":
+                    ShowHostname = true;
+                    ShowNetwork = false;
+                    ShowPassword = true;
+                    SupportUseEncryption = true;
+
+                    f_HostnameEntry.Text = "jabbr.net";
+                    f_HostnameEntry.Sensitive = true;
+                    f_PortSpinButton.Sensitive = true;
+                    f_UseEncryptionCheckButton.Active = true;
                     f_NetworkComboBoxEntry.Entry.Text = String.Empty;
                     f_PasswordEntry.Text = String.Empty;
                     break;
diff --git a/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs b/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs
index fafba22..940c36e 100644
--- a/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs
+++ b/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.MenuWidget.cs
@@ -33,18 +33,18 @@ namespace Smuxi.Frontend.Gnome
 		private global::Gtk.ToggleAction f_BrowseModeAction;
 		private global::Gtk.ToggleAction f_ShowMenubarAction;
 		private global::Gtk.ToggleAction f_ShowStatusbarAction;
-		private global::Gtk.ToggleAction f_ShowJoinBarAction;
 		private global::Gtk.Action f_FullscreenAction;
 		private global::Gtk.Action f_AboutAction;
 		private global::Gtk.Action f_OpenLogAction;
 		private global::Gtk.Action f_FindGroupChatToolAction;
 		private global::Gtk.Action f_WebsiteAction;
+		private global::Gtk.ToggleAction f_ShowToolbarAction;
 		private global::Gtk.VBox vbox2;
 		private global::Gtk.MenuBar f_MenuBar;
 		private global::Gtk.HBox hbox1;
 		private global::Gtk.Toolbar f_MenuToolbar;
 		private global::Gtk.Toolbar f_JoinToolbar;
-        
+
 		protected virtual void Build ()
 		{
 			global::Stetic.Gui.Initialize (this);
@@ -138,9 +138,6 @@ namespace Smuxi.Frontend.Gnome
 			this.f_ShowStatusbarAction = new global::Gtk.ToggleAction ("f_ShowStatusbarAction", global::Mono.Unix.Catalog.GetString ("Show _Statusbar"), null, null);
 			this.f_ShowStatusbarAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Show _Statusbar");
 			w2.Add (this.f_ShowStatusbarAction, null);
-			this.f_ShowJoinBarAction = new global::Gtk.ToggleAction ("f_ShowJoinBarAction", global::Mono.Unix.Catalog.GetString ("Show _Join Bar"), null, null);
-			this.f_ShowJoinBarAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Show _Join Bar");
-			w2.Add (this.f_ShowJoinBarAction, null);
 			this.f_FullscreenAction = new global::Gtk.Action ("f_FullscreenAction", global::Mono.Unix.Catalog.GetString ("_Fullscreen"), null, "gtk-fullscreen");
 			this.f_FullscreenAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Fullscreen");
 			w2.Add (this.f_FullscreenAction, "F11");
@@ -157,13 +154,16 @@ namespace Smuxi.Frontend.Gnome
 			this.f_WebsiteAction = new global::Gtk.Action ("f_WebsiteAction", global::Mono.Unix.Catalog.GetString ("_Website"), null, null);
 			this.f_WebsiteAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Website");
 			w2.Add (this.f_WebsiteAction, null);
+			this.f_ShowToolbarAction = new global::Gtk.ToggleAction ("f_ShowToolbarAction", global::Mono.Unix.Catalog.GetString ("Show _Toolbar"), null, null);
+			this.f_ShowToolbarAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Show _Toolbar");
+			w2.Add (this.f_ShowToolbarAction, null);
 			this.UIManager.InsertActionGroup (w2, 0);
 			this.Name = "Smuxi.Frontend.Gnome.MenuWidget";
 			// Container child Smuxi.Frontend.Gnome.MenuWidget.Gtk.Container+ContainerChild
 			this.vbox2 = new global::Gtk.VBox ();
 			this.vbox2.Name = "vbox2";
 			// Container child vbox2.Gtk.Box+BoxChild
-			this.UIManager.AddUiFromString ("<ui><menubar name='f_MenuBar'><menu name='f_SmuxiAction' action='f_SmuxiAction'><menuitem name='f_PreferencesAction' action='f_PreferencesAction'/><menuitem name='f_QuitAction' action='f_QuitAction'/></menu><menu name='ServerAction' action='ServerAction'><menuitem name='f_ConnectAction' action='f_ConnectAction'/><separator/><menuitem name='f_AddServerAction' action='f_AddServerAction'/><menuitem name='f_ManageServerAction' action='f_ManageServerAction' [...]
+			this.UIManager.AddUiFromString ("<ui><menubar name='f_MenuBar'><menu name='f_SmuxiAction' action='f_SmuxiAction'><menuitem name='f_PreferencesAction' action='f_PreferencesAction'/><menuitem name='f_QuitAction' action='f_QuitAction'/></menu><menu name='ServerAction' action='ServerAction'><menuitem name='f_ConnectAction' action='f_ConnectAction'/><separator/><menuitem name='f_AddServerAction' action='f_AddServerAction'/><menuitem name='f_ManageServerAction' action='f_ManageServerAction' [...]
 			this.f_MenuBar = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/f_MenuBar")));
 			this.f_MenuBar.Name = "f_MenuBar";
 			this.vbox2.Add (this.f_MenuBar);
@@ -227,12 +227,12 @@ namespace Smuxi.Frontend.Gnome
 			this.f_BrowseModeAction.Toggled += new global::System.EventHandler (this.OnBrowseModeActionToggled);
 			this.f_ShowMenubarAction.Toggled += new global::System.EventHandler (this.OnShowMenubarActionToggled);
 			this.f_ShowStatusbarAction.Toggled += new global::System.EventHandler (this.OnShowStatusbarActionToggled);
-			this.f_ShowJoinBarAction.Toggled += new global::System.EventHandler (this.OnShowJoinBarActionToggled);
 			this.f_FullscreenAction.Activated += new global::System.EventHandler (this.OnFullscreenActionActivated);
 			this.f_AboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated);
 			this.f_OpenLogAction.Activated += new global::System.EventHandler (this.OnOpenLogActionActivated);
 			this.f_FindGroupChatToolAction.Activated += new global::System.EventHandler (this.OnFindGroupChatActionActivated);
 			this.f_WebsiteAction.Activated += new global::System.EventHandler (this.OnWebsiteActionActivated);
+			this.f_ShowToolbarAction.Toggled += new global::System.EventHandler (this.OnShowToolbarActionToggled);
 		}
 	}
 }
diff --git a/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs b/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs
index 12049b9..305dfcb 100644
--- a/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs
+++ b/src/Frontend-GNOME/gtk-gui/Smuxi.Frontend.Gnome.ServerDialog.cs
@@ -6,8 +6,8 @@ namespace Smuxi.Frontend.Gnome
 	{
 		private global::Smuxi.Frontend.Gnome.ServerWidget f_Widget;
 		private global::Gtk.Button buttonCancel;
-		private global::Gtk.Button buttonOk;
-        
+		private global::Gtk.Button f_OkButton;
+
 		protected virtual void Build ()
 		{
 			global::Stetic.Gui.Initialize (this);
@@ -46,15 +46,15 @@ namespace Smuxi.Frontend.Gnome
 			w4.Expand = false;
 			w4.Fill = false;
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
-			this.buttonOk = new global::Gtk.Button ();
-			this.buttonOk.CanDefault = true;
-			this.buttonOk.CanFocus = true;
-			this.buttonOk.Name = "buttonOk";
-			this.buttonOk.UseStock = true;
-			this.buttonOk.UseUnderline = true;
-			this.buttonOk.Label = "gtk-ok";
-			this.AddActionWidget (this.buttonOk, -5);
-			global::Gtk.ButtonBox.ButtonBoxChild w5 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3 [this.buttonOk]));
+			this.f_OkButton = new global::Gtk.Button ();
+			this.f_OkButton.CanDefault = true;
+			this.f_OkButton.CanFocus = true;
+			this.f_OkButton.Name = "f_OkButton";
+			this.f_OkButton.UseStock = true;
+			this.f_OkButton.UseUnderline = true;
+			this.f_OkButton.Label = "gtk-ok";
+			this.AddActionWidget (this.f_OkButton, -5);
+			global::Gtk.ButtonBox.ButtonBoxChild w5 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3 [this.f_OkButton]));
 			w5.Position = 1;
 			w5.Expand = false;
 			w5.Fill = false;
diff --git a/src/Frontend-GNOME/gtk-gui/gui.stetic b/src/Frontend-GNOME/gtk-gui/gui.stetic
index 458ea6e..ecb1367 100644
--- a/src/Frontend-GNOME/gtk-gui/gui.stetic
+++ b/src/Frontend-GNOME/gtk-gui/gui.stetic
@@ -3753,7 +3753,7 @@ Click "Forward" to begin.</property>
           </packing>
         </child>
         <child>
-          <widget class="Gtk.Button" id="buttonOk">
+          <widget class="Gtk.Button" id="f_OkButton">
             <property name="MemberName" />
             <property name="CanDefault">True</property>
             <property name="CanFocus">True</property>
@@ -4517,14 +4517,6 @@ Click "Forward" to begin.</property>
         <property name="Active">False</property>
         <signal name="Toggled" handler="OnShowStatusbarActionToggled" />
       </action>
-      <action id="f_ShowJoinBarAction">
-        <property name="Type">Toggle</property>
-        <property name="Label" translatable="yes">Show _Join Bar</property>
-        <property name="ShortLabel" translatable="yes">Show _Join Bar</property>
-        <property name="DrawAsRadio">False</property>
-        <property name="Active">False</property>
-        <signal name="Toggled" handler="OnShowJoinBarActionToggled" />
-      </action>
       <action id="f_FullscreenAction">
         <property name="Type">Action</property>
         <property name="Accelerator">F11</property>
@@ -4559,6 +4551,14 @@ Click "Forward" to begin.</property>
         <property name="ShortLabel" translatable="yes">_Website</property>
         <signal name="Activated" handler="OnWebsiteActionActivated" />
       </action>
+      <action id="f_ShowToolbarAction">
+        <property name="Type">Toggle</property>
+        <property name="Label" translatable="yes">Show _Toolbar</property>
+        <property name="ShortLabel" translatable="yes">Show _Toolbar</property>
+        <property name="DrawAsRadio">False</property>
+        <property name="Active">False</property>
+        <signal name="Toggled" handler="OnShowToolbarActionToggled" />
+      </action>
     </action-group>
     <property name="MemberName" />
     <property name="Visible">False</property>
@@ -4600,8 +4600,8 @@ Click "Forward" to begin.</property>
                 <node type="Menuitem" action="f_CaretModeAction" />
                 <node type="Menuitem" action="f_BrowseModeAction" />
                 <node type="Menuitem" action="f_ShowMenubarAction" />
+                <node type="Menuitem" action="f_ShowToolbarAction" />
                 <node type="Menuitem" action="f_ShowStatusbarAction" />
-                <node type="Menuitem" action="f_ShowJoinBarAction" />
                 <node type="Menuitem" action="f_FullscreenAction" />
               </node>
               <node type="Menu" action="f_HelpAction">
diff --git a/src/Frontend-GNOME/smuxi-frontend-gnome.desktop b/src/Frontend-GNOME/smuxi-frontend-gnome.desktop
index ad56827..2303dfd 100644
--- a/src/Frontend-GNOME/smuxi-frontend-gnome.desktop
+++ b/src/Frontend-GNOME/smuxi-frontend-gnome.desktop
@@ -1,46 +1,58 @@
 [Desktop Entry]
 Version=1.0
 Name=Smuxi
+Name[cs]=Smuxi
 Name[da]=Smuxi
 Name[de]=Smuxi
+Name[fi]=Smuxi
 Name[fr]=Smuxi
 Name[hr]=Smuxi
 Name[pt]=Smuxi
+Name[pt_BR]=Smuxi
 Name[sv]=Smuxi
 Name[zh_CN]=Smuxi
 GenericName=IRC Chat
 GenericName[ca]=_Xat a l'IRC
+GenericName[cs]=IRC Chat
 GenericName[da]=IRC-snak
 GenericName[de]=IRC Chat
 GenericName[es]=IRC Chat
+GenericName[fi]=IRC-keskustelu
 GenericName[fr]=Chat IRC
 GenericName[hr]=IRC Chat
 GenericName[it]=Chat IRC
 GenericName[pt]=Conversação de IRC
+GenericName[pt_BR]=IRC Chat
 GenericName[ru]=IRC-чат
 GenericName[sv]=IRC chatt
 GenericName[zh_CN]=IRC 聊天
 X-GNOME-FullName=Smuxi IRC Client
 X-GNOME-FullName[ca]=Client d'IRC Smuxi
+X-GNOME-FullName[cs]=Smuxi klient IRC
 X-GNOME-FullName[da]=Smuxi - IRC-klient
 X-GNOME-FullName[de]=Smuxi - Chat Client
 X-GNOME-FullName[es]=Cliente IRC Smuxi
+X-GNOME-FullName[fi]=Smuxi IRC-asiakasohjelma
 X-GNOME-FullName[fr]=Client IRC Smuxi
 X-GNOME-FullName[hr]=Smuxi IRC klijent
 X-GNOME-FullName[it]=Client di IRC Smuxi
 X-GNOME-FullName[pt]=Cliente de IRC Smuxi
+X-GNOME-FullName[pt_BR]=Smuxi Cliente IRC
 X-GNOME-FullName[ru]=IRC-клиент Smuxi
 X-GNOME-FullName[sv]=Smuxi IRC-klient
 X-GNOME-FullName[zh_CN]=Smuxi IRC 客户端
 Comment=Chat with other people on IRC
 Comment[ca]=Xategeu amb altres persones a l'IRC
+Comment[cs]=Chatujte s jinými lidmi na IRC
 Comment[da]=Snak med andre via IRC
 Comment[de]=Kommuniziere mit anderen Leuten im IRC
 Comment[es]=Charla con otras personas en IRC
+Comment[fi]=Juttele muiden kanssa IRC:ssä
 Comment[fr]=Chatter sur IRC avec d'autres gens
 Comment[hr]=Chatajte sa drugim ljudima na IRCu
 Comment[it]=Chiacchiera con altre persone su IRC
 Comment[pt]=Conversar com outra pessoa no IRC
+Comment[pt_BR]=Converse com outras pessoas no IRC
 Comment[ru]=Разговор с людьми в сети IRC
 Comment[sv]=Chatta med andra människor på IRC
 Comment[zh_CN]=和 IRC 上的其他人聊天
diff --git a/src/Frontend-STFL/AssemblyInfo.cs b/src/Frontend-STFL/AssemblyInfo.cs
index b2cc841..cf7632d 100644
--- a/src/Frontend-STFL/AssemblyInfo.cs
+++ b/src/Frontend-STFL/AssemblyInfo.cs
@@ -24,7 +24,7 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 
 [assembly: AssemblyTitle("Smuxi - STFL frontend")]
-[assembly: AssemblyCopyright("2007-2011 (C) Mirco Bauer <meebey at meebey.net>, 2011 (C) Andrius Bentkus <andrius.bentkus at gmail.com>")]
+[assembly: AssemblyCopyright("2007-2013 (C) Mirco Bauer <meebey at meebey.net>, 2011 (C) Andrius Bentkus <andrius.bentkus at gmail.com>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Frontend-STFL/ChatViewManager.cs b/src/Frontend-STFL/ChatViewManager.cs
index f6f12a5..2b47ad8 100644
--- a/src/Frontend-STFL/ChatViewManager.cs
+++ b/src/Frontend-STFL/ChatViewManager.cs
@@ -68,6 +68,7 @@ namespace Smuxi.Frontend.Stfl
                     UpdateNavigation();
                     UpdateInput();
                     UpdateTitle();
+                    UpdateTopic();
                 }
 
                 if (CurrentChatSwitched != null) {
@@ -214,6 +215,23 @@ namespace Smuxi.Frontend.Stfl
                 NcursesApi.refresh();
             }
         }
+
+        public void UpdateTopic()
+        {
+            string topic = String.Empty;
+            var chatView = CurrentChat;
+
+            if (chatView is GroupChatView) {
+                var topicModel = ((GroupChatView) chatView).Topic;
+
+                if (topicModel != null) {
+                    topic = topicModel.ToString();
+                }
+            }
+
+            f_MainWindow.TopicLabel = topic;
+            f_MainWindow.ShowTopic = !String.IsNullOrEmpty(topic);
+        }
     }
 
     public delegate void ChatSwitchedEventHandler(object sender, ChatSwitchedEventArgs e);
diff --git a/src/Frontend-STFL/Entry.cs b/src/Frontend-STFL/Entry.cs
index d16ab50..5729b19 100644
--- a/src/Frontend-STFL/Entry.cs
+++ b/src/Frontend-STFL/Entry.cs
@@ -237,6 +237,10 @@ namespace Smuxi.Frontend.Stfl
                         GC.Collect();
                         handled = true;
                         break;
+                    case "generate_messages":
+                        CommandGenerateMessages(cmd);
+                        handled = true;
+                        break;
                 }
             }
             return handled;
@@ -252,7 +256,6 @@ namespace Smuxi.Frontend.Stfl
             chatView.AddMessage(builder.ToMessage());
 
             string[] help = {
-                "help",
                 "window (number|close)",
                 "exit",
             };
@@ -292,6 +295,12 @@ namespace Smuxi.Frontend.Stfl
             cmd.FrontendManager.AddMessageToChat(cmd.Chat, msg);
         }
 
+        void CommandGenerateMessages(CommandModel cmd)
+        {
+            var chat = f_ChatViewManager.CurrentChat;
+            CommandManager.CommandGenerateMessages(cmd, chat);
+        }
+
         // gets the position of the first space left
         private int GetLeftSpace(int end)
         {
diff --git a/src/Frontend-STFL/MainWindow.cs b/src/Frontend-STFL/MainWindow.cs
index 1237220..f516b3b 100644
--- a/src/Frontend-STFL/MainWindow.cs
+++ b/src/Frontend-STFL/MainWindow.cs
@@ -32,6 +32,9 @@ namespace Smuxi.Frontend.Stfl
 {
     public class MainWindow : Form
     {
+#if LOG4NET
+        static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+#endif
         public StflUI UI { get; private set; }
         Entry Entry { get; set; }
         public ChatViewManager ChatViewManager { get; private set; }
@@ -72,12 +75,31 @@ namespace Smuxi.Frontend.Stfl
             }
         }
 
+        public bool ShowTopic {
+            get {
+                return this["topic_hbox_display"] == "1";
+            }
+            set {
+                this["topic_hbox_display"] = value ? "1" : "0";
+            }
+        }
+
+        public string TopicLabel {
+            get {
+                return this["topic_label_text"];
+            }
+            set {
+                this["topic_label_text"] = value;
+            }
+        }
+
         public MainWindow() : base(null, "MainWindow.stfl")
         {
             ChatViewManager = new ChatViewManager(this);
             Entry = new Entry(this, ChatViewManager);
             UI = new StflUI(ChatViewManager);
 
+            Resized += OnResized;
             if (StflApi.IsXterm) {
                 ShowTitle = false;
             }
@@ -86,6 +108,17 @@ namespace Smuxi.Frontend.Stfl
             ChatViewManager.Load(asm);
         }
 
+        void OnResized(object sender, EventArgs e)
+        {
+#if LOG4NET
+            Logger.DebugFormat(
+                "OnResized(): terminal resized, columns: {0} lines: {1}",
+                this["root_vbox:w"],
+                this["root_vbox:h"]
+            );
+#endif
+        }
+
         public void ApplyConfig(UserConfig config)
         {
             Entry.ApplyConfig(config);
diff --git a/src/Frontend-STFL/MainWindow.stfl b/src/Frontend-STFL/MainWindow.stfl
index 958882f..82dd857 100644
--- a/src/Frontend-STFL/MainWindow.stfl
+++ b/src/Frontend-STFL/MainWindow.stfl
@@ -1,4 +1,4 @@
-vbox
+vbox[root_vbox]
   autobind:0
   hbox[title_hbox]
     .display[title_hbox_display]:1
@@ -6,6 +6,12 @@ vbox
     @style_normal:fg=white,bg=blue
     label[title_label]
       text[title_label_text]:"Smuxi"
+  hbox[topic_hbox]
+    .display[topic_hbox_display]:0
+    .expand:0 .height:1
+    @style_normal:fg=white,bg=blue
+    label[topic_label]
+      text[topic_label_text]:"insert topic here"
   hbox[menu_hbox]
     .display:0
     .expand:0 .height:1
diff --git a/src/Frontend-STFL/Makefile.am b/src/Frontend-STFL/Makefile.am
index d2fdc21..86ccc3a 100644
--- a/src/Frontend-STFL/Makefile.am
+++ b/src/Frontend-STFL/Makefile.am
@@ -72,6 +72,7 @@ EXTRAS = \
 
 REFERENCES =  \
 	System \
+	System.Core \
 	Mono.Posix \
 	$(LOG4NET_LIBS)
 
diff --git a/src/Frontend-STFL/Makefile.in b/src/Frontend-STFL/Makefile.in
index 05f5e3b..d060925 100644
--- a/src/Frontend-STFL/Makefile.in
+++ b/src/Frontend-STFL/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend-stfl.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend-stfl.in \
+	ChangeLog
 @ENABLE_STATIC_STFL_TRUE at am__append_1 = $(STFLSHARP_SO)
 subdir = src/Frontend-STFL
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -102,15 +129,28 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -120,9 +160,29 @@ DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
 	distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -196,6 +256,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -300,7 +361,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -439,6 +499,7 @@ EXTRAS = \
 
 REFERENCES = \
 	System \
+	System.Core \
 	Mono.Posix \
 	$(LOG4NET_LIBS)
 
@@ -705,22 +766,25 @@ uninstall-programfilesiconsDATA:
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -735,57 +799,12 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -801,12 +820,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -818,15 +832,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -835,6 +845,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -1005,25 +1030,23 @@ uninstall-am: uninstall-binSCRIPTS \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-binSCRIPTS \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	installdirs-am maintainer-clean maintainer-clean-generic \
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-recursive uninstall uninstall-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-binSCRIPTS uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend-STFL/STFL/Form.cs b/src/Frontend-STFL/STFL/Form.cs
index f202d53..fe0c60a 100644
--- a/src/Frontend-STFL/STFL/Form.cs
+++ b/src/Frontend-STFL/STFL/Form.cs
@@ -42,6 +42,7 @@ namespace Stfl
 
         public event KeyPressedEventHandler KeyPressed;
         public event EventHandler<EventReceivedEventArgs> EventReceived;
+        public event EventHandler Resized;
         
         public string this[string name] {
             get {
@@ -140,9 +141,15 @@ namespace Stfl
         protected virtual void ProcessEvent(string @event)
         {
             OnEventReceived(new EventReceivedEventArgs(@event));
-            if (@event != null && @event != "TIMEOUT") {
-                ProcessKey(@event);
+            switch (@event) {
+                case null:
+                case "TIMEOUT":
+                    return;
+                case "RESIZE":
+                    OnResized(EventArgs.Empty);
+                    return;
             }
+            ProcessKey(@event);
         }
 
         protected virtual void OnEventReceived(EventReceivedEventArgs e)
@@ -152,6 +159,13 @@ namespace Stfl
             }
         }
 
+        protected virtual void OnResized(EventArgs e)
+        {
+            if (Resized != null) {
+                Resized(this, e);
+            }
+        }
+
         protected virtual void ProcessKey(string key)
         {
             CheckDisposed();
diff --git a/src/Frontend-STFL/STFL/Makefile.in b/src/Frontend-STFL/STFL/Makefile.in
index 345f83a..da75682 100644
--- a/src/Frontend-STFL/STFL/Makefile.in
+++ b/src/Frontend-STFL/STFL/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,7 +78,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src/Frontend-STFL/STFL
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
 	$(top_srcdir)/intltool.m4 $(top_srcdir)/libtool.m4 \
@@ -64,6 +91,18 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -71,6 +110,7 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -116,6 +156,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -220,7 +261,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -334,11 +374,11 @@ mostlyclean-libtool:
 
 clean-libtool:
 	-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -475,15 +515,16 @@ uninstall-am:
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags-am uninstall uninstall-am
 
 
 @ENABLE_STATIC_STFL_TRUE at all: $(LIB_FILE)
diff --git a/src/Frontend-STFL/STFL/TextView.cs b/src/Frontend-STFL/STFL/TextView.cs
index ce59252..c33b5be 100644
--- a/src/Frontend-STFL/STFL/TextView.cs
+++ b/src/Frontend-STFL/STFL/TextView.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 // 
-// Copyright (c) 2011 Mirco Bauer
+// Copyright (c) 2011, 2013 Mirco Bauer
 // 
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 // 
@@ -19,17 +19,23 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
 using System;
+using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Collections.Generic;
 
 namespace Stfl
 {
     public class TextView : Widget
     {
+#if LOG4NET
+        static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+#endif
         public string OffsetVariableName { get; set; }
         public bool AutoLineWrap { get; set; }
         List<string> Lines { get; set; }
         int WrappedLineCount { get; set; }
+        static Regex StyleTagRegex = new Regex("<([^>]+)>");
 
         public int Offset {
             get {
@@ -168,6 +174,69 @@ namespace Stfl
             ScrollToStart();
         }
 
+        /// <summary>
+        /// Splits a line into characters, keeping style tags intact and
+        /// attached to the character following them, and not breaking apart
+        /// escapes of <c><</c>.
+        /// </summary>
+        private static IList<string> SplitStyledLineIntoCharacters(string line)
+        {
+            var chars = new List<string>();
+            string assembleStyle = null;
+            bool tagging = false;
+
+            for (int i = 0; i < line.Length; ++i) {
+                char c = line [i];
+                if (c == '<') {
+                    if (i < line.Length - 1 && line [i+1] == '>') {
+                        // this is <> which is an escape of <
+                        if (assembleStyle != null) {
+                            chars.Add('<' + assembleStyle + "><>");
+                        } else {
+                            chars.Add("<>");
+                        }
+                        // no style anymore
+                        assembleStyle = null;
+                        // skip the > too
+                        ++i;
+                    } else {
+                        // style begins
+                        assembleStyle = String.Empty;
+                        tagging = true;
+                    }
+                } else if (c == '>') {
+                    // style ended
+                    tagging = false;
+                } else if (tagging) {
+                    // add to style
+                    assembleStyle += c;
+                } else {
+                    // normal character
+                    if (assembleStyle != null) {
+                        // we have a style too
+                        chars.Add('<' + assembleStyle + '>' + c);
+                    } else {
+                        chars.Add(c.ToString());
+                    }
+                    // no style anymore
+                    assembleStyle = null;
+                }
+            }
+
+            return chars;
+        }
+
+        /// <summary>
+        /// Returns the length of the given line in characters that will
+        /// actually be displayed.
+        /// </summary>
+        private static int LengthWithoutStyle(string line)
+        {
+            var untaggedString = StyleTagRegex.Replace(line, "");
+            var unescapedString = untaggedString.Replace("<>", "<");
+            return unescapedString.Length;
+        }
+
         public static List<string> WrapLine(string line, int wrapWidth)
         {
             if (line == null) {
@@ -178,18 +247,71 @@ namespace Stfl
                                             "wrapWidth");
             }
 
+            // split the line on spaces
+            IList<string> splitOnSpaces = line.Split(' ').ToList();
             var wrappedLine = new List<string>();
-            if (line.Length <= wrapWidth) {
-                wrappedLine.Add(line);
-                return wrappedLine;
-            }
+            var freshestStyle = "";
 
-            for (int i = 0; i < line.Length; i += wrapWidth) {
-                var chunkSize = Math.Min(line.Length - i, wrapWidth);
-                // FIXME: don't break style tags
-                // TODO: word wrapping
-                var chunk = line.Substring(i, chunkSize);
-                wrappedLine.Add(chunk);
+            // as long as there is anything left to wrap
+            while (splitOnSpaces.Count > 0) {
+                var joinedUp = splitOnSpaces [0];
+                int currentLengthWithoutStyle = LengthWithoutStyle(joinedUp);
+
+                // take one word
+                if (currentLengthWithoutStyle > wrapWidth) {
+                    // uh-oh, cannot grab first word whole; must split it
+                    var chars = SplitStyledLineIntoCharacters(joinedUp);
+                    joinedUp = String.Join("", chars.Take(wrapWidth).ToArray());
+                    currentLengthWithoutStyle = wrapWidth;
+
+                    // process the remaining characters next time
+                    var rest = splitOnSpaces [0].Substring(joinedUp.Length);
+                    splitOnSpaces.RemoveAt(0);
+                    splitOnSpaces.Insert(0, rest);
+                } else {
+                    // that worked
+                    splitOnSpaces.RemoveAt(0);
+
+                    // try taking more words
+                    var joinedUpBuilder = new StringBuilder(joinedUp, wrapWidth*2);
+                    while (splitOnSpaces.Count > 0) {
+                        // + 1 accounts for the joining space
+                        var newLengthWithoutStyle = currentLengthWithoutStyle + 1 + LengthWithoutStyle(splitOnSpaces [0]);
+                        if (newLengthWithoutStyle > wrapWidth) {
+                            // that won't work anymore
+                            break;
+                        }
+
+                        joinedUpBuilder.Append(' ');
+                        joinedUpBuilder.Append(splitOnSpaces [0]);
+                        currentLengthWithoutStyle = newLengthWithoutStyle;
+                        splitOnSpaces.RemoveAt(0);
+                    }
+                    joinedUp = joinedUpBuilder.ToString();
+                }
+
+                // prepend the currently freshest style unless the line starts with a style
+                if (!joinedUp.StartsWith("<")) {
+                    joinedUp = freshestStyle + joinedUp;
+                }
+
+                // find out the now-freshest style
+                var styleTags = StyleTagRegex.Matches(joinedUp);
+                if (styleTags.Count > 0) {
+                    var lastTagName = styleTags[styleTags.Count-1].Groups[1].Value;
+                    if (lastTagName.IndexOf('/') != -1) {
+                        // closing tag -- no more style
+                        freshestStyle = "";
+                    } else {
+                        // we have a new style
+                        freshestStyle = '<' + lastTagName + '>';
+                        // make sure to terminate our string
+                        joinedUp += "</>";
+                    }
+                }
+
+                // add the joined-up, style-terminated line to the list
+                wrappedLine.Add(joinedUp);
             }
 
             return wrappedLine;
@@ -203,10 +325,18 @@ namespace Stfl
                 return;
             }
 
+            var estimatedLines = Math.Max(WrappedLineCount, Lines.Count);
+            // see items.AppendFormat() below
+            var lineStyleOverhead = 18;
+            var listStyleOverhead = 6;
+            var estimatedLength = listStyleOverhead +
+                (estimatedLines * (width + lineStyleOverhead));
+            estimatedLength = (int) (estimatedLength * 1.2);
+
             // re-wrap all lines and re-apply offset
             WrappedLineCount = 0;
             var offset = Offset;
-            var items = new StringBuilder("{list", Lines.Count + 2);
+            var items = new StringBuilder("{list", estimatedLength);
             foreach (var line in Lines) {
                 foreach (var wrappedLine in WrapLine(line, width)) {
                     WrappedLineCount++;
@@ -222,7 +352,20 @@ namespace Stfl
         void OnEventReceived(object sender, EventReceivedEventArgs e)
         {
             if (e.Event == "RESIZE") {
+                DateTime start, stop;
+                start = DateTime.UtcNow;
                 Resize();
+                stop = DateTime.UtcNow;
+#if LOG4NET
+                Logger.DebugFormat(
+                    "OnEventReceived(): Resize() took: {0:0.00} ms " +
+                    "lines: {1} wrapped lines: {2} width: {3}",
+                    (stop - start).TotalMilliseconds,
+                    Lines.Count,
+                    WrappedLineCount,
+                    Width
+                );
+#endif
             }
         }
     }
diff --git a/src/Frontend-STFL/STFL/Widget.cs b/src/Frontend-STFL/STFL/Widget.cs
index 70b92f5..d0a114c 100644
--- a/src/Frontend-STFL/STFL/Widget.cs
+++ b/src/Frontend-STFL/STFL/Widget.cs
@@ -34,7 +34,7 @@ namespace Stfl
                 Render();
                 var variableName = HeigthVariableName;
                 if (variableName == null) {
-                    variableName = String.Format("{0}:w", WidgetName);
+                    variableName = String.Format("{0}:h", WidgetName);
                 }
                 return Int32.Parse(Form[variableName]);
             }
diff --git a/src/Frontend-STFL/StflUI.cs b/src/Frontend-STFL/StflUI.cs
index 22fdba3..74dc2c6 100644
--- a/src/Frontend-STFL/StflUI.cs
+++ b/src/Frontend-STFL/StflUI.cs
@@ -195,8 +195,33 @@ namespace Smuxi.Frontend.Stfl
         public void UpdateTopicInGroupChat(GroupChatModel groupChat, MessageModel topic)
         {
             Trace.Call(groupChat, topic);
-            
-            //Console.WriteLine("Topic changed to: "+topic+ " on "+cpage.Name);
+
+            try {
+                var chatView = _ChatViewManager.GetChat(groupChat);
+                if (chatView == null) {
+#if LOG4NET
+                    _Logger.Fatal(String.Format("UpdateTopicInGroupChat(): _ChatViewManager.GetChat(groupChat) groupChat.Name: {0} returned null!", groupChat.Name));
+#endif
+                    return;
+                }
+
+                if (!(chatView is GroupChatView)) {
+#if LOG4NET
+                    _Logger.Fatal(String.Format("UpdateTopicInGroupChat(): _ChatViewManager.GetChat(groupChat) groupChat.Name: {0} returned something that isn't a group chat view!", groupChat.Name));
+#endif
+                    return;
+                }
+
+                var groupChatView = (GroupChatView) chatView;
+
+                groupChatView.Topic = topic;
+
+                _ChatViewManager.UpdateTopic();
+            } catch (Exception ex) {
+#if LOG4NET
+                _Logger.Fatal(ex);
+#endif
+            }
         }
         
         public void RemovePersonFromGroupChat(GroupChatModel groupChat, PersonModel person)
diff --git a/src/Frontend-STFL/Views/ChatView.cs b/src/Frontend-STFL/Views/ChatView.cs
index e2619ff..9a24106 100644
--- a/src/Frontend-STFL/Views/ChatView.cs
+++ b/src/Frontend-STFL/Views/ChatView.cs
@@ -124,7 +124,22 @@ namespace Smuxi.Frontend.Stfl
                         ".display[" + f_WidgetID + "d]:0 " +
                         "offset[" + f_WidgetID + "os]:0 " +
                         "richtext:1 " +
-                        "style_red_normal:fg=red " +
+                        "style_color0_normal:fg=black " +
+                        "style_color1_normal:fg=red " +
+                        "style_color2_normal:fg=green " +
+                        "style_color3_normal:fg=yellow " +
+                        "style_color4_normal:fg=blue " +
+                        "style_color5_normal:fg=magenta " +
+                        "style_color6_normal:fg=cyan " +
+                        "style_color7_normal:fg=white " +
+                        "style_color8_normal:fg=black,attr=bold " +
+                        "style_color9_normal:fg=red,attr=bold " +
+                        "style_color10_normal:fg=green,attr=bold " +
+                        "style_color11_normal:fg=yellow,attr=bold " +
+                        "style_color12_normal:fg=blue,attr=bold " +
+                        "style_color13_normal:fg=magenta,attr=bold " +
+                        "style_color14_normal:fg=cyan,attr=bold " +
+                        "style_color15_normal:fg=white,attr=bold " +
                         "style_url_normal:attr=underline " +
                         "style_u_normal:attr=underline " +
                         "style_b_normal:attr=bold " +
@@ -223,7 +238,7 @@ namespace Smuxi.Frontend.Stfl
         {
         }
 
-        public void AddMessage(MessageModel msg)
+        public virtual void AddMessage(MessageModel msg)
         {
             // OPT: typical message length
             var line = new StringBuilder(512);
@@ -255,17 +270,26 @@ namespace Smuxi.Frontend.Stfl
 
                     var tags = new List<string>();
                     if (txtPart.ForegroundColor != TextColor.None) {
-                        // TODO: implement color mapping, see:
-                        // http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
-                        //tags.Add("red");
+                        var palette = TextColorPalettes.LinuxConsole;
+                        var color = TextColorTools.GetNearestColor(
+                            txtPart.ForegroundColor,
+                            palette
+                        );
+                        var colorNumber = palette.IndexOf(color);
+                        tags.Add(String.Format("color{0}", colorNumber));
                     }
-                    if (txtPart.Underline) {
+                    // HACK: STFL doesn't support applying multiple styles at
+                    // the same time and thus simply overwrites any previous
+                    // style. As a workaround we only apply one style with the
+                    // highest priority in this order:
+                    // color >> underline >> bold >> italic
+                    if (txtPart.Underline && tags.Count == 0) {
                         tags.Add("u");
                     }
-                    if (txtPart.Bold) {
+                    if (txtPart.Bold && tags.Count == 0) {
                         tags.Add("b");
                     }
-                    if (txtPart.Italic) {
+                    if (txtPart.Italic && tags.Count == 0) {
                         tags.Add("i");
                     }
 
diff --git a/src/Frontend-STFL/Views/GroupChatView.cs b/src/Frontend-STFL/Views/GroupChatView.cs
index ab86192..48bc870 100644
--- a/src/Frontend-STFL/Views/GroupChatView.cs
+++ b/src/Frontend-STFL/Views/GroupChatView.cs
@@ -18,6 +18,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 using System;
+using System.Linq;
 using Smuxi.Common;
 using Smuxi.Engine;
 
@@ -34,15 +35,37 @@ namespace Smuxi.Frontend.Stfl
             Trace.Call(chat, window);
         }
 
+        public override void AddMessage(MessageModel msg)
+        {
+            base.AddMessage(msg);
+
+            var nick = msg.GetNick();
+            if (nick == null) {
+                return;
+            }
+
+            // update who spoke last
+            for (int i = 0; i < Participants.Count; ++i) {
+                var speaker = Participants[i];
+                if (speaker.IdentityName == nick) {
+                    Participants.RemoveAt(i);
+                    Participants.Insert(0, speaker);
+                    break;
+                }
+            }
+        }
+
         public override void Sync()
         {
             base.Sync();
 
             var groupChat = (GroupChatModel) ChatModel;
             Topic = groupChat.Topic;
+
             var persons = groupChat.Persons;
             if (persons != null) {
-                foreach (var person in persons.Values) {
+                Participants.Clear();
+                foreach (var person in persons.Values.OrderBy(x => x)) {
                     Participants.Add(person);
                 }
             }
diff --git a/src/Frontend-STFL/smuxi-frontend-stfl.exe.config b/src/Frontend-STFL/smuxi-frontend-stfl.exe.config
index cba442c..ce81471 100644
--- a/src/Frontend-STFL/smuxi-frontend-stfl.exe.config
+++ b/src/Frontend-STFL/smuxi-frontend-stfl.exe.config
@@ -4,7 +4,8 @@
         <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
     </configSections>
     <dllmap dll="stfl" target="libstfl.so.0" />
-    <dllmap dll="ncurses" target="libncursesw.so.5" />
+    <dllmap os="linux" dll="ncurses" target="libncursesw.so.5" />
+    <dllmap os="openbsd" dll="ncurses" target="libncursesw.so.12.1" />
     <log4net>
         <root>
           <level value="DEBUG" />
diff --git a/src/Frontend-SWF/Chats/GroupChatView.cs b/src/Frontend-SWF/Chats/GroupChatView.cs
index 752a9a1..a9047f8 100644
--- a/src/Frontend-SWF/Chats/GroupChatView.cs
+++ b/src/Frontend-SWF/Chats/GroupChatView.cs
@@ -27,8 +27,9 @@
  */
 
 using System;
-using System.Collections.Generic;
+using System.Linq;
 using System.Windows.Forms;
+using System.Collections.Generic;
 using Mono.Unix;
 using Smuxi.Engine;
 
@@ -129,11 +130,11 @@ namespace Smuxi.Frontend.Swf
 
         public override IList<PersonModel> Participants {
             get {
-                var ret = new List<PersonModel>();
-                foreach (PersonModel person in GroupChatModel.Persons.Values) {
-                    ret.Add(person);
+                var participants = new List<PersonModel>();
+                foreach (PersonModel person in _PersonListBox.Items) {
+                    participants.Add(person);
                 }
-                return ret;
+                return new List<PersonModel>(participants.OrderBy(x => x));
             }
         }
     }
diff --git a/src/Frontend-SWF/Entry.cs b/src/Frontend-SWF/Entry.cs
index 5cc832b..88168f5 100644
--- a/src/Frontend-SWF/Entry.cs
+++ b/src/Frontend-SWF/Entry.cs
@@ -557,7 +557,6 @@ namespace Smuxi.Frontend.Swf
             cd.FrontendManager.AddMessageToChat(cd.Chat, msg);
             
             string[] help = {
-            "help",
             "window (number|channelname|queryname|close",
             "clear",
             "echo data",
diff --git a/src/Frontend-SWF/Makefile.in b/src/Frontend-SWF/Makefile.in
index 9f957fb..423908f 100644
--- a/src/Frontend-SWF/Makefile.in
+++ b/src/Frontend-SWF/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,8 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend-swf.in $(top_srcdir)/Makefile.include \
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend-swf.in \
 	ChangeLog
 subdir = src/Frontend-SWF
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +149,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +195,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +300,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -674,11 +714,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -824,19 +864,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend-Test/Makefile.in b/src/Frontend-Test/Makefile.in
index f385f11..e5a645a 100644
--- a/src/Frontend-Test/Makefile.in
+++ b/src/Frontend-Test/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend-test.in \
-	$(top_srcdir)/Makefile.include ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend-test.in \
+	ChangeLog
 subdir = src/Frontend-Test
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +128,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +149,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +195,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +300,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -648,11 +688,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -798,19 +838,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend/AssemblyInfo.cs b/src/Frontend/AssemblyInfo.cs
index 3bece5c..10e5851 100644
--- a/src/Frontend/AssemblyInfo.cs
+++ b/src/Frontend/AssemblyInfo.cs
@@ -32,7 +32,7 @@ using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 [assembly: AssemblyTitle("Smuxi - frontend library")]
-[assembly: AssemblyCopyright("2005-2010 (C) Mirco Bauer <meebey at meebey.net>")]
+[assembly: AssemblyCopyright("2005-2013 (C) Mirco Bauer <meebey at meebey.net>")]
 
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
diff --git a/src/Frontend/ChatViewSyncManager.cs b/src/Frontend/ChatViewSyncManager.cs
index 9139d72..7a726b4 100644
--- a/src/Frontend/ChatViewSyncManager.cs
+++ b/src/Frontend/ChatViewSyncManager.cs
@@ -188,6 +188,13 @@ namespace Smuxi.Frontend
             lock (SyncWaitQueue) {
                 SyncWaitQueue.TryGetValue(chatKey, out syncWait);
             }
+            if (syncWait == null) {
+#if LOG4NET
+                Logger.Error("ReleaseSync(<" + chatView.ID + ">): failed to release " +
+                             "<" + chatKey + "> as syncWait is null!");
+#endif
+                return;
+            }
             // release the sync worker
             syncWait.Set();
         }
diff --git a/src/Frontend/CommandManager.cs b/src/Frontend/CommandManager.cs
index 9a13a9a..3356d98 100644
--- a/src/Frontend/CommandManager.cs
+++ b/src/Frontend/CommandManager.cs
@@ -20,6 +20,7 @@
 
 using System;
 using System.Linq;
+using System.Collections.Generic;
 using SysDiag = System.Diagnostics;
 using Smuxi.Common;
 using Smuxi.Engine;
@@ -118,6 +119,10 @@ namespace Smuxi.Frontend
                         CommandExec(cmd);
                         handled = true;
                         break;
+                    case "echo":
+                        CommandEcho(cmd);
+                        handled = true;
+                        break;
                 }
             }
             if (handled) {
@@ -217,6 +222,7 @@ namespace Smuxi.Frontend
             var info = new SysDiag.ProcessStartInfo() {
                 FileName = file,
                 Arguments = args,
+                RedirectStandardInput = true,
                 RedirectStandardOutput = true,
                 RedirectStandardError = true,
                 UseShellExecute = false
@@ -228,6 +234,7 @@ namespace Smuxi.Frontend
 
                 try {
                     process.Start();
+                    process.StandardInput.Close();
                     process.BeginOutputReadLine();
                     process.BeginErrorReadLine();
                     process.WaitForExit();
@@ -248,6 +255,55 @@ namespace Smuxi.Frontend
             }
         }
 
+        private void CommandEcho(CommandModel cmd)
+        {
+            Trace.Call(cmd);
+
+            var msg = new MessageBuilder().
+                AppendEventPrefix().
+                    AppendText(cmd.Parameter).
+                    ToMessage();
+            cmd.FrontendManager.AddMessageToChat(cmd.Chat, msg);
+        }
+
+        public void CommandGenerateMessages(CommandModel cmd, IChatView chat)
+        {
+            Trace.Call(cmd, chat);
+
+            var count = 0;
+            Int32.TryParse(cmd.Parameter, out count);
+
+            var builder = new MessageBuilder();
+            var sender = new ContactModel("msg-tester", "msg-tester", "test", "test");
+            builder.AppendMessage(sender, "time for a messsage generator command so I can test speed and memory usage");
+            var text = builder.CreateText(" *formatted text* ");
+            text.Bold = true;
+            builder.Append(text);
+            builder.AppendUrl("https://www.smuxi.org/");
+
+            var msgs = new List<MessageModel>(count);
+            for (var i = 0; i < count; i++) {
+                var msg = builder.ToMessage();
+                msgs.Add(msg);
+            }
+
+            DateTime start, stop;
+            start = DateTime.UtcNow;
+            foreach (var msg in msgs) {
+                chat.AddMessage(msg);
+            }
+            stop = DateTime.UtcNow;
+
+            builder = new MessageBuilder();
+            builder.AppendText(
+                "IChatView.AddMessage(): count: {0} took: {1:0} ms avg: {2:0.00} ms",
+                count,
+                (stop - start).TotalMilliseconds,
+                (stop - start).TotalMilliseconds / count
+            );
+            chat.AddMessage(builder.ToMessage());
+        }
+
         private void Unknown(CommandModel cmd)
         {
             var msg = CreateMessageBuilder().
diff --git a/src/Frontend/EngineManager.cs b/src/Frontend/EngineManager.cs
index 70aa13e..a4b2295 100644
--- a/src/Frontend/EngineManager.cs
+++ b/src/Frontend/EngineManager.cs
@@ -331,6 +331,7 @@ namespace Smuxi.Frontend
             f_UserConfig = new UserConfig(f_Session.Config,
                                          username);
             f_UserConfig.IsCaching = true;
+            f_UserConfig.FrontendConfig = f_FrontendConfig;
         }
 
         public void Reconnect()
diff --git a/src/Frontend/Makefile.in b/src/Frontend/Makefile.in
index 20e8657..c37a207 100644
--- a/src/Frontend/Makefile.in
+++ b/src/Frontend/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,9 +79,8 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-frontend.pc.in $(top_srcdir)/Makefile.include \
-	ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-frontend.pc.in ChangeLog
 subdir = src/Frontend
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -101,6 +127,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -110,6 +148,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -155,6 +194,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -259,7 +299,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -658,11 +697,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -808,19 +847,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/Frontend/NickCompleter.cs b/src/Frontend/NickCompleter.cs
index bbb2cd7..0582853 100644
--- a/src/Frontend/NickCompleter.cs
+++ b/src/Frontend/NickCompleter.cs
@@ -81,9 +81,11 @@ namespace Smuxi.Frontend
         /// Returns a list containing only the nicknames matching the given prefix.
         /// </summary>
         /// <returns>
-        /// The (sorted) list of nicknames matching the given prefix.
+        /// The list of nicknames matching the given prefix.
         /// </returns>
-        /// <param name="persons">List of people to enumerate.</param>
+        /// <param name="persons">
+        /// List of people to enumerate. The ordering will be taken over verbatim.
+        /// </param>
         /// <param name="prefix">Prefix of nicknames to return.</param>
         protected static IList<string> NicksMatchingPrefix(IList<PersonModel> persons, string prefix)
         {
@@ -95,7 +97,6 @@ namespace Smuxi.Frontend
                     ret.Add(nick);
                 }
             }
-            ret.Sort();
             return ret;
         }
 
diff --git a/src/Makefile.am b/src/Makefile.am
index a5b5d88..5da17b8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,10 @@ if ENABLE_ENGINE_CAMPFIRE
 ENGINE_CAMPFIRE = Engine-Campfire
 endif
 
+if ENABLE_ENGINE_JABBR
+ENGINE_JABBR = Engine-JabbR
+endif
+
 # Frontends
 if ENABLE_FRONTEND_GNOME
 FRONTEND_GNOME = Frontend-GNOME
@@ -53,6 +57,7 @@ SUBDIRS =	Common \
 		$(ENGINE_IRC) \
 		$(ENGINE_TWITTER) \
 		$(ENGINE_CAMPFIRE) \
+		$(ENGINE_JABBR) \
 		$(ENGINE_XMPP) \
 		Server \
 		Frontend \
diff --git a/src/Makefile.in b/src/Makefile.in
index ab1b5a0..b0658d9 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -15,23 +14,51 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,8 +78,9 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src
-DIST_COMMON = $(srcdir)/AssemblyVersion.cs.in $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(srcdir)/smuxi-win32.nsis.in ChangeLog
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/AssemblyVersion.cs.in $(srcdir)/smuxi-win32.nsis.in \
+	ChangeLog
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
 	$(top_srcdir)/intltool.m4 $(top_srcdir)/libtool.m4 \
@@ -65,15 +93,28 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES = AssemblyVersion.cs smuxi-win32.nsis
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -81,15 +122,35 @@ am__can_run_installinfo = \
   esac
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
 	distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = Common Engine Engine-IRC Engine-Twitter Engine-Campfire \
-	Engine-XMPP Server Frontend Frontend-GNOME Frontend-GNOME-IRC \
-	Frontend-GNOME-XMPP Frontend-STFL Frontend-Curses Frontend-SWF \
-	Frontend-Test
+	Engine-JabbR Engine-XMPP Server Frontend Frontend-GNOME \
+	Frontend-GNOME-IRC Frontend-GNOME-XMPP Frontend-STFL \
+	Frontend-Curses Frontend-SWF Frontend-Test
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -160,6 +221,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -264,7 +326,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -341,6 +402,7 @@ twitter_api_key = @twitter_api_key@
 @ENABLE_ENGINE_XMPP_TRUE at ENGINE_XMPP = Engine-XMPP
 @ENABLE_ENGINE_TWITTER_TRUE at ENGINE_TWITTER = Engine-Twitter
 @ENABLE_ENGINE_CAMPFIRE_TRUE at ENGINE_CAMPFIRE = Engine-Campfire
+ at ENABLE_ENGINE_JABBR_TRUE@ENGINE_JABBR = Engine-JabbR
 
 # Frontends
 @ENABLE_FRONTEND_GNOME_TRUE at FRONTEND_GNOME = Frontend-GNOME
@@ -357,6 +419,7 @@ SUBDIRS = Common \
 		$(ENGINE_IRC) \
 		$(ENGINE_TWITTER) \
 		$(ENGINE_CAMPFIRE) \
+		$(ENGINE_JABBR) \
 		$(ENGINE_XMPP) \
 		Server \
 		Frontend \
@@ -414,22 +477,25 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 # This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
 	  echo "Making $$target in $$subdir"; \
 	  if test "$$subdir" = "."; then \
 	    dot_seen=yes; \
@@ -444,57 +510,12 @@ $(RECURSIVE_TARGETS):
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -510,12 +531,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -527,15 +543,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
 	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
 	     $$unique
@@ -544,6 +556,21 @@ GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
 	  && $(am__cd) $(top_srcdir) \
 	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -704,22 +731,20 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-	install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am check check-am clean clean-generic clean-libtool \
-	ctags ctags-recursive distclean distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/Server/Makefile.in b/src/Server/Makefile.in
index 9797502..50bc673 100644
--- a/src/Server/Makefile.in
+++ b/src/Server/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile.in generated by automake 1.13.3 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,23 +16,51 @@
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -54,9 +81,8 @@ build_triplet = @build@
 host_triplet = @host@
 @ENABLE_RELEASE_TRUE at am__append_1 = -noconfig -codepage:utf8 -warn:4 -optimize+
 @ENABLE_DEBUG_TRUE at am__append_2 = -noconfig -codepage:utf8 -warn:4 -optimize- -debug -define:DEBUG "-define:TRACE,DEBUG,LOG4NET"
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/smuxi-server.in $(top_srcdir)/Makefile.include \
-	ChangeLog
+DIST_COMMON = $(top_srcdir)/Makefile.include $(srcdir)/Makefile.in \
+	$(srcdir)/Makefile.am $(srcdir)/smuxi-server.in ChangeLog
 subdir = src/Server
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/expansions.m4 \
@@ -103,6 +129,18 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgappdir)" \
 	"$(DESTDIR)$(programfilesdir)" \
 	"$(DESTDIR)$(programfilesiconsdir)"
 SCRIPTS = $(bin_SCRIPTS) $(pkgapp_SCRIPTS)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -112,6 +150,7 @@ am__can_run_installinfo = \
   esac
 DATA = $(linuxdesktopapplications_DATA) $(linuxpkgconfig_DATA) \
 	$(programfiles_DATA) $(programfilesicons_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -157,6 +196,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GETTEXT_PACKAGE_ENGINE = @GETTEXT_PACKAGE_ENGINE@
 GETTEXT_PACKAGE_ENGINE_CAMPFIRE = @GETTEXT_PACKAGE_ENGINE_CAMPFIRE@
 GETTEXT_PACKAGE_ENGINE_IRC = @GETTEXT_PACKAGE_ENGINE_IRC@
+GETTEXT_PACKAGE_ENGINE_JABBR = @GETTEXT_PACKAGE_ENGINE_JABBR@
 GETTEXT_PACKAGE_ENGINE_TWITTER = @GETTEXT_PACKAGE_ENGINE_TWITTER@
 GETTEXT_PACKAGE_ENGINE_XMPP = @GETTEXT_PACKAGE_ENGINE_XMPP@
 GETTEXT_PACKAGE_FRONTEND = @GETTEXT_PACKAGE_FRONTEND@
@@ -261,7 +301,6 @@ SED = @SED@
 SERVER_COMPILER_FLAGS = @SERVER_COMPILER_FLAGS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SMARTIRC4NET_FILES = @SMARTIRC4NET_FILES@
 STFL_CFLAGS = @STFL_CFLAGS@
 STFL_LIBS = @STFL_LIBS@
 STRIP = @STRIP@
@@ -654,11 +693,11 @@ uninstall-programfilesiconsDATA:
 	@list='$(programfilesicons_DATA)'; test -n "$(programfilesiconsdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(programfilesiconsdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
 
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
 
 
 distdir: $(DISTFILES)
@@ -804,19 +843,19 @@ uninstall-am: uninstall-binSCRIPTS \
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binSCRIPTS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-linuxdesktopapplicationsDATA \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-binSCRIPTS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-linuxdesktopapplicationsDATA \
 	install-linuxpkgconfigDATA install-man install-pdf \
 	install-pdf-am install-pkgappSCRIPTS install-programfilesDATA \
 	install-programfilesiconsDATA install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	uninstall uninstall-am uninstall-binSCRIPTS \
+	tags-am uninstall uninstall-am uninstall-binSCRIPTS \
 	uninstall-linuxdesktopapplicationsDATA \
 	uninstall-linuxpkgconfigDATA uninstall-pkgappSCRIPTS \
 	uninstall-programfilesDATA uninstall-programfilesiconsDATA
diff --git a/src/smuxi-win32.nsis.in b/src/smuxi-win32.nsis.in
index 02652aa..d67f522 100644
--- a/src/smuxi-win32.nsis.in
+++ b/src/smuxi-win32.nsis.in
@@ -511,21 +511,25 @@ Section "Main" SEC01
   Delete "$INSTDIR\zlib1.dll"
   Delete "$INSTDIR\MonoPosixHelper.dll"
 
-  SetOverwrite try
+  SetOverwrite on
   File "../bin-win32/log4net.dll"
   File "../bin-win32/Meebey.SmartIrc4net.dll"
+  File "../bin-win32/StarkSoftProxy.dll"
   File "../bin-win32/Mono.Posix.dll"
   File "../bin-win32/Nini.dll"
   File "../bin-win32/Twitterizer2.dll"
   File "../bin-win32/Newtonsoft.Json.dll"
-  File "../bin-win32/jabber-net.dll"
+  File "../bin-win32/agsxmpp.dll"
   File "../bin-win32/Db4objects.Db4o.dll"
   File "../bin-win32/ServiceStack.Text.dll"
   File "../bin-win32/ServiceStack.Interfaces.dll"
   File "../bin-win32/ServiceStack.Common.dll"
+  File "../bin-win32/Microsoft.AspNet.SignalR.Client.dll"
+  File "../bin-win32/JabbR.Client.dll"
   File "../bin-win32/smuxi-common.dll"
   File "../bin-win32/smuxi-engine-campfire.dll"
   File "../bin-win32/smuxi-engine-irc.dll"
+  File "../bin-win32/smuxi-engine-jabbr.dll"
   File "../bin-win32/smuxi-engine-twitter.dll"
   File "../bin-win32/smuxi-engine-xmpp.dll"
   File "../bin-win32/smuxi-engine.dll"
@@ -602,19 +606,23 @@ Section Uninstall
   Delete "$INSTDIR\smuxi-engine.dll"
   Delete "$INSTDIR\smuxi-engine-campfire.dll"
   Delete "$INSTDIR\smuxi-engine-irc.dll"
+  Delete "$INSTDIR\smuxi-engine-jabbr.dll"
   Delete "$INSTDIR\smuxi-engine-twitter.dll"
   Delete "$INSTDIR\smuxi-engine-xmpp.dll"
   Delete "$INSTDIR\smuxi-common.dll"
   Delete "$INSTDIR\Twitterizer2.dll"
   Delete "$INSTDIR\Newtonsoft.Json.dll"
-  Delete "$INSTDIR\jabber-net.dll"
+  Delete "$INSTDIR\agsxmpp.dll"
   Delete "$INSTDIR\Db4objects.Db4o.dll"
   Delete "$INSTDIR\Nini.dll"
   Delete "$INSTDIR\Mono.Posix.dll"
   Delete "$INSTDIR\Meebey.SmartIrc4net.dll"
+  Delete "$INSTDIR\StarkSoftProxy.dll"
   Delete "$INSTDIR\ServiceStack.Text.dll"
   Delete "$INSTDIR\ServiceStack.Interfaces.dll"
   Delete "$INSTDIR\ServiceStack.Common.dll"
+  Delete "$INSTDIR\Microsoft.AspNet.SignalR.Client.dll"
+  Delete "$INSTDIR\JabbR.Client.dll"
   Delete "$INSTDIR\log4net.dll"
   Delete "$INSTDIR\plink.exe"
   Delete "$INSTDIR\Fixedsys500c.ttf"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/smuxi.git



More information about the Pkg-cli-apps-commits mailing list